Posts

Showing posts from September, 2012

SQL Server Pivot or UnPivot so confused -

i working on creating report using sql server database. unfortunately not able figure out how it. here database structure: create table #mytable ( [foryear] [smallint] not null, [formonth] [tinyint] not null, [trainingdonethismonth] [bit] null, [foodqualitystatus] [bit] null, [noofalldrugtests] [int] null, [noofallalcoholtests] [int] null ) insert #mytable values (2016, 1, 1, 0, 5, 10), (2016, 2, 0, 1, 15, 5), (2016, 3, 1, 0, 20, 15), (2016, 4, 0, 1, 5, 25), (2016, 5, 1, 0, 10, 30) i need report in following format. column names converted rows , corresponding values transformed. report sample i have tried pivot , unpivot not able desired results please help. this trying: select 1,2,3 ( select noofallalcoholtests,formonth #mytable ) d pivot ( sum(noofallalcoholtests) formonth in ([1],[2],[3]) ) piv; unpivot pivot: select objective, [january], [february], [march], [april], ...

unity3d - Application.LoadLevel("string") is obsolete -

this question has answer here: unity 5.3 how load current level? 3 answers i got code has lots of application.loadlevel("whatever"); . monodevelop says obsolete , should use scenemanager.loadscene instead. how do that? actually application.loadlevel("whatever"); line doesn't work unless add corresponding scene "build settings" just import unityengine.scenemanagement this: using unityengine.scenemanagement; then replace every application.loadlevel("whatever"); with: scenemanager.loadscene("whatever"); ...it can done in 1 line: unityengine.scenemanagement.scenemanager.loadscene("whatever");

c# - Issue with JSON serialization in Unity -

i'm trying serialize array of custom monobehaviours, using json. know can't done directly, i'm using wrapper class , serializing instead. this wrapper object [system.serializable] public class wavescollection { public wave[] waves; } that's object being wrapped (only important bits of it) [system.serializable] public class wave : monobehaviour { [serializefield]public float[] appeartimes;//at time should n-th enemy appear; [serializefield]public vector2[] positions;//where should n-th enemy appear; [serializefield]public enemytype[] enemiestoappear;//what enemies should appear } wavesarray = new wave[] {thiswave, thiswave, thiswave}; wavescollection collection = new wavescollection(); collection.waves = new wave[10]; wavesarray.copyto(collection.waves, 0); streamwriter sw = file.createtext(writepath); string json = jsonutility.tojson(collection); sw.writeline(json); sw.close()...

sql - Mysql: How to get a result for each day in between an start and an end date from a table that contains also a start and an end date? -

i have start date , end date. each day between start , end date result, if there no results within stats table. the best suggestion solve stored procedure creates temporary table each date (day) create join. begin declare d datetime; create temporary table joindates (d date not null); set d = fkstartdate; while d <= fkenddate insert joindates (d) values (d); set d = date_add(d, interval 1 day); end while; select * `joindates` tempt left join `radacct` stats on stats.acctstarttime <= tempt.d , (stats.acctstoptime >= tempt.d or stats.acctstoptime null) , calledstationid = calledstationid order tempt.d asc; drop temporary table joindates; end the join not finalized (just testing). see, join perfect if "radacct" table use 1 date col. create join using = operator on. now "radacct" using acctstarttime , acctstoptime there entries (i can not modify table, given radius server) both datetime types. so ...

c# - Quartz is not working in real server -

i have access db , ftp live server. want schedule task. did schedule in quartz.net (asp.net c#) , it's working fine in local server, when upload server no out put. added file write command top , bottom of task, files writing destination. here code wrote public partial class saaitest : system.web.ui.page { protected void page_load(object sender, eventargs e) { testclass t = new testclass(); t.method("start"); ischedulerfactory factory = new stdschedulerfactory(); ischeduler scheduler = factory.getscheduler(); ijobdetail job = jobbuilder.create<testclass>() .withidentity("name", "group") .build(); itrigger triggercron = triggerbuilder.create() .withcronschedule("0 0/1 * 1/1 * ? *") .startnow() .build(); scheduler.schedulejob(job, triggercron); scheduler.start(); thread.sleep(timespan.frommi...

javascript - Shoppingcart system from GET to AJAX post/get -

i made shopping cart website using php .get this: every page starts with: <?php session_start(); require("dbconnect.php"); if(!isset($_session['cart'])) { $cart = array(); $_session['cart'] = $cart; } ?> every product generated has following check when generated on website: if(!in_array($id, $_session['cart'])) { echo '<a href="'.get_site_url(). '/sem?action=add&id=' .$id. '#wpc-products"><img width="20px" style="margin-left: 175px; margin-top: -42px; float:left" src="http://bgc-testomgeving.nl/sem/wp-content/themes/sem/images/voeg-toe.png" alt="voeg product toe"/></a>'; } else { echo '<a href="'.get_site_url(). '/sem?action=delete&id=' .$id. '#wpc-products"><img width="20px" style="margin-left: 175px; margin-top: -42px; float:left"...

angular - angular2, angular2-highcharts. Remove a chart from the page -

i have parent component (a) 2 child components (b) & (c). b contains angular2-tree populated on page load. c angular2-highcharts , information rendered when node on tree clicked. when navigating between nodes, show charts , others wont. currently, when don't pass data chart options, assuming i've shown chart, chart continues render. how destroy chart when don't want show? didnt think of way destroy chart, have added *ngif html tag chart. hide chart when options set null.

parse.com - Parse Javascript - Relation is not a function -

i'm trying understand how relation works , did wrote simple script: var parse = require('parse/node'); parse.initialize('myappid'); parse.serverurl = 'http://localhost:1337/parse'; var userquery = new parse.query(parse.user); userquery.equalto('username', 'the_username'); userquery.find() .then(user => { return user; }) .then(user => { var systems = parse.object.extend("systems"); var systemquery = new parse.query(systems); systemquery.equalto('customer', 'mycustomer'); systemquery.find() .then(system => { var relation = user.relation('systems_ref'); // here relation not func relation.add(system); console.log('adding relation'); user.save() .then(response => console.log('user saved')) .catch(error => co...

xaml - Xamarin.Forms: User Interface working properly in UWP but not on the Android Part -

Image
good day everyone. i'm working on simple program enables user crud record of employee. i able retrieve created data asp.net web application , display on uwp part of program. however, it's not working on whenever run on android. meaning, menu , buttons not being displayed. i code of in xamarin.forms portable. here code of menu page should displayed on both platform. if want see more codes, please let me know. lot. <?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:class="xamarinformsdemo.views.menupage" backgroundimage="bg3.jpg"> <stacklayout> <stacklayout orientation="vertical" padding="30" heightrequest="30" backgroundcolor="#24e97d"> <image source="ebms...

java - DBunit - Unable to typecast <1997/02/14> to TimeStamp -

i'm doing integration testing dbunit (2.49) + hibernate (4.1.3) following tutorial . production database : oracle 10 test database : hsqldb 2.3.3 context my data contains current format of date : yyyy/mm/dd . however,according dbunit faq, dbunit supports format yyyy-mm-dd hh:mm:ss.fffffffff , had create new format timestamp. how tried fix it i created customtimestampdatatype based on tutorial . changed part: string formats[] = {"yyyy-mm-dd hh:mm", "yyyy-mm-dd hh:mm a", "yyyy-mm-dd hh:mm:ss.fffffffff"}; into one: string formats[] = {"yyyy/mm/dd"}; i created customedatatypefactory following same tutorial. make extend oracle10datatypefactory rather defaultdatattypefactory . in hibernatedbunittestcase , override setdatabaseconfig() following: @override protected void setupdatabaseconfig(databaseconfig config){ config.setproperty(databaseconfig.property_datatype_factory, new customdatatypefactory()); ...

wso2is - WSO2 common registry space and multitenancy -

i have installed wso2 identity server , wso2 api manager according documentation of products clustering & deployment guide "configuring pre-packaged identity server 5.1.0 api manager 1.10.0". according configuration wso2 , wso2 use common registry data-source (for governance , configuration). later in wso2 have added additional tenant - example vu.lt. and when login wso2 , wso2 management console super-tenant admin, works ok. when login wso2 management console admin of vu.lt tenant - ok. but when login wso2 admin of vu.lt tenant little strange view: header of page identity manager, content api manager. after tests found out css file (main.css) loaded governance part of registry .../governance/repository/theme/admin/main.css. means main.css loaded data-source. same css loaded when login wso2 is. same happen if install 1 more server (for example bps) , configure use common registry space. maybe situation not bad, don't know consequences can later. so...

How to configure custom login page with Azure Active directory authentication in ASP.NET MVC 4.5 -

i using azure active directory authenticate users. when click on openconnectid in home page, getting redirected microsoft login page. there options use custom login page instead , may call authentication api here. app.setdefaultsigninasauthenticationtype(cookieauthenticationdefaults.authenticationtype); app.usecookieauthentication(new cookieauthenticationoptions() { loginpath = new pathstring("/account/login") }); app.useopenidconnectauthentication(new openidconnectauthenticationoptions { clientid = "xxxx", authority = "xxx", redirecturi = "account/login", });

hashtable - Powershell v2.0 substitute null values from a Hash table -

i have hash table below: $hash = @{ team1=$team1.count team2=$team2.count team3=$team3.count } $groupbyteam = new-object psobject -property $hash | select 'team1','team2','team3' | convertto-html -fragment this fine , each "team" returns own value. however, teams may have null value , wish substitute "0". in attempt work out, have tried select null value first can't seem this: $hash.values | select -property values values ------ {1, 2} but $hash.values | select -property values | {$_.values $null} doesn't pull anything. tried: $hash.values | select -expandproperty values | {$_.values $null} any ideas? thanks your best option cast values int when creating hashtable: $hash = @{ team1 = [int]$team1.count team2 = [int]$team2.count team3 = [int]$team3.count } if that's not possible reason go enumerator: ($hash.getenumerator()) | foreach-object { if ($_.value -eq $null) { $hash[$_.nam...

android - A issue occurred evaluating project ':ActionBarSherlock' -

when try sync project got below error ,what wrong in gradle file error: problem occurred evaluating project ':actionbarsherlock'. failed apply plugin [id 'com.android.library'] plugin id 'com.android.library' not found. build.gradle: apply plugin: 'com.android.library' dependencies { compile filetree(dir: 'libs', include: '*.jar') } android { compilesdkversion 17 buildtoolsversion "23.0.0" sourcesets { main { manifest.srcfile 'androidmanifest.xml' java.srcdirs = ['src'] resources.srcdirs = ['src'] aidl.srcdirs = ['src'] renderscript.srcdirs = ['src'] res.srcdirs = ['res'] assets.srcdirs = ['assets'] } // move tests tests/java, tests/res, etc... instrumenttest.setroot('tests') // move build types build-types/<type> // instance, build-types/debug...

android - How to keep the header of Navigation Drawer Fixed ie Non Scrolling header? -

how can keep header of navigation drawer fixed , content below scrolling? what want header of navigation drawer should fixed ie non scrollable content part should scroll how can that? content of navigation drawer menu file. activity_main.xml <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.appbarlayout android:id="@+id/view" android:elevation="10dp" app:elevation="10dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/themeoverlay.appcompat.dark.actionbar"> <include layout="@layout/toolbar_layout...

image - Android - Unable to save photo in specified location if the photo is under DCIM file -

i'm facing problem: when trying save photo specified location under file of app, if choose photo under dcim file, mobile( htc d816h version 4.4.2, has sd card ) stores photo in other wrong place. however, if photo under pictures file select, cropped photo saved in correct place. on other hand, when app runs on mobile same version( htc d626ph version 4.4.2 ) mine, there's nothing wrong , goes fine. problem why can't store photos in specified place if comes photos dcim file? , why problem happens on mobile? procedure first, select photo gallery of mobile. second, crop photo whatever size want. third, save cropped photo specified location in file of app. last, display cropped photo imageview . i've made lots of research still not find solution or reason it. hope here. in advance! here's code: private uri m_uricropphoto = null; private void crop(uri uriorig) { file photo = null; try { string strfilepath = getfilepath(getactivity...

c# - How to use the new IValueResolver of AutoMapper? -

i @ loss how use new ivalueresolver interface in new version of automapper. perhaps used them improperly in previous versions of automapper... i have lot of model classes, of them generated several databases on several database servers, using sqlmetal. some of these classes has string property, publicationcode , identifies publication subscription, or offer, or invoice, or whatever is, belongs to. the publication can exist in either of 2 systems (the old , new system), hence have bool property on destination model classes tells whether publication in old or new system. using old version (<5?) of automapper, used valueresolver<string, bool> took publicationcode input parameter, , returned bool indicating location of publication (old or new system). with new version (5+?) of automapper, seems no longer possible. new ivalueresolver requires unique implementation of each , every combination of source , destination models have, src.publicationcode needs resolved ...

WSO2 Log4J RollingFileAppendeder does not work in wso2esb-4.8.1 -

we using wso2esb-4.8.1. default log4j properties uses log4j.appender.carbon_logfile=org.wso2.carbon.logging.appenders.carbondailyrollingfileappender i want size based rolling file. per documentation @ https://docs.wso2.com/display/carbon420/managing+logs , following should trick. ##comment following ###log4j.appender.carbon_logfile=org.wso2.carbon.logging.appenders.carbondailyrollingfileappender ##add followng log4j.appender.carbon_logfile=org.apache.log4j.rollingfileappender log4j.appender.carbon_logfile.maxfilesize=10mb log4j.appender.carbon_logfile.maxbackupindex=20 but after these changes, logs rotating @ 10mb, 1 file maintained. is known issue in wso2 esb 4.8.1 ? this working cleanly in wso2 esb 4.9.0. however, not have option upgrade since of other features need broken there. simulated log rotation behavior in wso2 task. refer https://docs.wso2.com/display/esb481/writing+tasks+sample understand how write sample wso2 task. this code import java....

sql - Filter in select where values start with NIR_ -

i trying filter result set return values start nir_ . my sql statement follows select * run name %nir_% the result set includes names like nirmeta_invalid nirmeta_position i not sure doing wrong. need select names start nir_ . you need escape underscore in like pattern if want treated literal. in sql server: select * run name 'nir[_]%' in mysql , oracle: select * run name 'nir\_%'

sql - MDX Calculation in SSAS for Sum of Sales from Start date till today -

i trying write query in ssas calculations tab should produce below result. ytd calculation calculating 1st feb 2016 till today. have written below query in management studio need convert ssas calculations , write calculations tab. with member [measures].[ytd sales target 2] sum ( strtomember ( '[sales date].[date].&[' + format(now(),'yyyy-') + '02-01t00:00:00]' ) : strtomember ( '[sales date].[date].&[' + format(now(),'yyyy-') + format(now(),'mm-') + format ( now() ,'dd' ) + 't00:00:00]' ) ,[measures].[sales target] ) select [measures].[ytd sales target 2] on 0 [sales]; it should simple as: create member currentcube.[measures].[ytd sales target 2] sum ( strtomember ( '...

java - Not getting response of a webservice in android code -

i working on application in have developed ios code making webservice call , giving me response successfully,the same webservice call when trying call in android not working not giving me response,i posting both code,can me figure it? ios code nsurl *url = [nsurl urlwithstring:[nsstring stringwithformat:@"%@/%@",k_server_base_address,service_name]]; nsurlsessionconfiguration *config = [nsurlsessionconfiguration defaultsessionconfiguration]; nsurlsession *session = [nsurlsession sessionwithconfiguration:config]; // 2 nsmutableurlrequest *request = [[nsmutableurlrequest alloc] initwithurl:url]; request.httpmethod = @"post"; [request setvalue:[nsstring stringwithformat:@"%@",k_content_type] forhttpheaderfield:@"content-type"]; // 3 nsmutabledictionary *dictionary = [[nsmutabledictionary alloc] init]; [dictionary setobject:[nsstring stringwithformat:@"%@",k_user_name] forkey:@"apiusernam...

C++ WinSock Get Data From PHP Page? -

hello i'm quite new using sockets , not familiar them yet, trying pass string variable web address (e.g. www.example.com/index.php?example=stringexample ) , response, example return "test example" if index.php looked this: <?php if($_get['example'] == "stringexample") { echo "test example"; } ?> here i've tried in c++: struct sockaddr_in socketaddress; hostent* addr = gethostbyname("www.example.com/index.php?example=stringexample"); int sizeofaddr = sizeof(addr); socketaddress.sin_addr.s_addr = inet_addr(addr->h_name); socketaddress.sin_port = htons(80); socketaddress.sin_family = af_inet; socket connection = socket(af_inet, sock_stream, null); if (connect(connection, (sockaddr*)&addr, sizeofaddr) != 0) { return 0; //failed connect } char buffff[256]; recv(connection, buffff, sizeof(buffff), null); //"test example" stored in buffff what doing wrong? btw in case not use li...

angularjs - Angular filter with multiple checkboxes in separate filters -

i wrong because can't achieve result need. my json data looks [{ type_id: 1, brand_id: 0, name: 'title', description: 'description', img: 'url' },...] so need filter data type_id , brand_id has not complicated task stuck lot , appreciate can't handle now. and how view looks like. have 2 filters generated ng-repeat , ng-repeat devices need filter type , brand filter. // filter 1 <div class="filters"> <h3 class="filters__title">choose type</h3> <div class="swiper-container"> <div class="swiper-arrow-prev"></div> <div class="swiper-arrow-next"></div> <div class="swiper-overflow"> <div class="swiper-wrapper filter" data-id="type"> <div class="swiper-slide filter__checkbox" ng-repeat="item in types"> <input type=...

In WordPress, when using query_posts(), why does pagination not work? -

this code in index.php. when click "older posts", still shows first page content. default loop works pagination. <?php query_posts('showposts=10'); query_posts("cat=2"); if( have_posts() ): while( have_posts() ): the_post(); ?> <?php get_template_part('content',get_post_format()); ?> <?php endwhile; ?> <?php next_posts_link('« older posts'); ?> <?php previous_posts_link('newer posts »'); ?> <?php endif; wp_reset_query(); ?> query_posts() not recommended use way, overwrite main query, , specific case, does not support pagination default. should use get_posts() or use wp_query object. if must use query_posts() , there explanation on link above on how add paged parameter query. here's same code, using get_posts() . <?php $args = array('numberposts' => 10, 'cate...

python - pywinrm - running New-Mailbox powershell cmdlet remotely -

i've been trying pywinrm module run new-mailbox powershell cmdlet remotely. have far: import winrm ps_text = "$pass = convertto-securestring -string '%s' -asplaintext -force; \ add-pssnapin microsoft.exchange.management.powershell.e2010; \ new-mailbox -userprincipalname '%s@contoso.lan' \ -alias '%s' -name '%s' -password $pass \ -firstname '%s' \ -lastname '%s' \ -displayname '%s' \ -primarysmtpaddress '%s'" % \ ('password123', 'jfd', 'john.doe', 'john doe', 'john', 'doe', 'john doe', 'john.doe@contoso.co.uk') remote = winrm.session('https://contoso.co.uk:5986', auth=('ps_remote', ...

angularjs - Button text color isn't changing -

i'm trying change md-button text color using accent palette color using angular material 1.0.9 version. not changing button text color. if i'm using latest beta got fix. i'm not going production unstable version. code: <md-toolbar class="md-primary md-hue-1"> <div class="md-toolbar-tools"> <md-button class="md-accent">my profile</md-button> </div> </md-toolbar> below plnkr urls: angular material 1-0-9 plnkr url angular material latest beta plnkr url can suggest fix? it appears v1.0.9 md-accent within md-toolbar not work non-raised buttons raised ones. works non-raised buttons outside md-toolbar . the fix css .md-toolbar-accent span { color: #6a1b9a; } plunker .

javascript - how solve long name folders path creation with node js -

this not question because answer maybe usefull else: i'm on windows , , testing purpose add create high number of folders in folder, use code , createfolder.js: var fs = require('fs') var root = './root/' var start = 0 var end = 10000 while (start < end) { fs.mkdirsync(root+start) root +=start+'/' } this huge mistake . because of , unable delete root folder because of long path name, anoying. so try few different method, includely 1 : how delete long path in windows. but can't figure why did not work. i embarassed. but when did test , figured out able rename folder. as i'm linux user remenber can move folder rename command. then solution, can't did straight cause long. so here litlle snippet in case uid.js: module.exports=function( ){ function s4() { return math.floor((1 + math.random()) * 0x10000) .tostring(16) .substring(1); } return s4() + s4() + '-' + s4() + '-...

sql - Combobox filter on a query not working while Null (in the form only) -

i working on project on ms-access 2010 , struggling issue hours. apply filter on select/pivot statement. result of query displayed in listbox. the issue no results displayed when combobox set null. when select specific values in combobox works perfectly. the cbbox filter declared parameter my query clause looks : where (jobs.fk_group=[formulaires]![frm_main]![lst_filtergroup] , (fk_othercritera='xxx')) or ((([formulaires]![frm_main]![lst_filtergroup]) null) , (fk_othercritera='xxx')) the query works while enter manually value of parameter (=when enter empty string, displays records = want) idk if important, listview use swap dynamically recordsource (=it runs 2 differents queries), depending cbbox i checked parameters values vba code before mylistview.requery calls , isnull(mycbboxreference) returns true , other criteria ok. i have no clue of did wrong, need :-( best regards, lr i recommend use special value in combobox displaying...

java - Liquibase upgrade issue with MySQL -

i having problem in upgrading liquibase. have application jbilling-community-4.1.1. i want migrate data jbilling-community3.1.0 jbilling-community4.1.1 when run command grails upgrade-db -user=root -pass=root -db=jbilling_test -dbversion=3.2 -url="jdbc:mysql://localhost:3306/jbilling_test" it gives error error executing script upgradedb: : liquibase.exception.lockexception: liquibase.exception.databaseexception: error executing sql create table public.databasechangeloglock (id int not null, locked bit(1) not null, lockgranted datetime null, lockedby varchar(255) null, constraint pk_databasechangeloglock primary key (id)): unknown database 'public' (use --stacktrace see full trace) upgrade-db script upgrade database. have upgrade using postgres default database jbilling can run mysql to. getting exception , related liquibase posting here. try grails upgrade-db -user=root -pass=root -db=jbilling_test -dbversion=3.2 -url="jdbc:mysql://lo...

linux - cd && ls | grep: How to execute a command in the current shell and pass the output -

i created alias in order not write ls every time move new directory: alias cl='cd_(){ cd "$@" && ls; }; cd_' let have folder named "downloads" (which of course happen have) type following in terminal: cl downloads now find myself in "downloads" folder , receive list of stuff have in folder, say: example.txt, hack.hs, picture.jpg,... if want move directory , if there is, say, hack.hs try this: cl downloads | grep hack what output: hack.hs but remain in folder (which means not in downloads). i understand happens because every command executed in subshell, , cd downloads && ls executed in subshell of own , output (namely list of stuff have) gets redirected via pipe grep. why not in new folder. my question following: how do in order able write "cl downloads | grep hack" , "hack"-greped list of stuff , in downloads folder? thank much, pol for ever googling this: quick fix proposed @g...

Android view getheight() returns wrong px value on some devices -

i working on feature in app need know exact height of parent view. apparently value wrong on devices (e.g. huawei p8 lite). i realized wrong when tried drawing @ point (x, view.getheight), point didn't show @ bottom, rather near middle of screen. not case on google nexus. here snippet of code problem lies: final overlaybuilder builder = new overlaybuilder(context, parentview, tag); builder.setonlayoutlistener(new servicecallback<overlaybuilder.overlayrelativelayout>() { @override public void onsuccess(overlaybuilder.overlayrelativelayout overlaylayout) { viewgroup.marginlayoutparams lp = (viewgroup.marginlayoutparams) createagentbtn.getlayoutparams(); linearlayout childcontainer = overlaylayout.getchildcontainer(); int parentheight = parentview.getheight(); view iconview = childcontainer.getchildat(0); view textview ...

android - Themes.xml not working on appcompat 23 -

i developing app used max api 21 , appcompat-v7:21.0.0 library. after migrating api 23 , appcompat same version, themes.xml don`t have effect on api 21 , above. <?xml version="1.0" encoding="utf-8"?> <resources> <style name="aaaactionbartheme" parent="@style/theme.appcompat.light"> <item name="android:actionbarstyle">@style/aaaactionbar</item> <item name="android:popupmenustyle">@style/aaapopupmenu</item> <item name="android:itemtextappearance">@style/aaapopupmenutextappearance</item> <item name="android:actionoverflowbuttonstyle">@style/aaapopupmenubuttonoverflow</item> <!-- support library compatibility --> <item name="actionbarstyle">@style/aaaactionbar</item> <item name="popupmenustyle">@style/aaapopupmenu</item> ...

How to know if Dropbox is in syncing using Dropbox API with Vb.net? -

i need dropbox state (syncing or pause). have installed dropbox api in visual studio , use vb.net. thank here code: imports dropbox.api public class dropbox private dbx dropboxclient public property oaut2accesstoken() string public function dropboxissyncing() boolean dbx = new dropboxclient(oaut2accesstoken) 'here need help... end function end class it sounds you're referring dropbox desktop client, , want know if it's uploading or downloading files. the dropbox api doesn't offer way check status of official desktop client that, we'll consider feature request.

django - Search Form for NullBooleanField -

i write search form django model contains column is_ok nullbooleanfield. i want have 4 choices: search instances column true. search instances column false. search instances column null. ignore column in search up use this: is_ok = forms.nullbooleanfield(required=false) but renders 3 options (as drop-down list). how distinguish between "is null" , "not set" here? as @alasdair said, you'll have create custom field: class unsettype: def __str__(self): return '__unset__' unset = unsettype() class unsetornullbooleanselect(nullbooleanselect): def __init__(self, attrs=none): choices = ( ('__unset__', ugettext_lazy('unset')), ('1', ugettext_lazy('unknown')), ('2', ugettext_lazy('yes')), ('3', ugettext_lazy('no')), ) super().__init__(attrs, choices) def render(self, name, v...

html - starting 1 timer clock after another and looping it using javascript -

i have 2 count-down timers in website. 1 timer start automatically, next 1 should start after 1st completed. should loop on forever, i.e. starting 1 clock after another. here code tried: function count() { var starttime = document.getelementbyid('hms').innerhtml; var pieces = starttime.split(":"); var time = new date(); time.sethours(pieces[0]); time.setminutes(pieces[1]); time.setseconds(pieces[2]); var timedif = new date(time.valueof() - 1000); var newtime = timedif.totimestring().split(" ")[0]; document.getelementbyid('hms').innerhtml = newtime; if (newtime !== '00:00:00') { settimeout(count, 1000); } else { count1(); } } count(); function count1() { var starttime = document.getelementbyid('hms1').innerhtml; var pieces = starttime.split(":"); var time = new date(); time.sethours(); time.setminutes(pieces[1]); time.setseconds...

python - SymPy: Swap two variables -

in expression like import sympy = sympy.symbol('a') b = sympy.symbol('b') x = + 2*b i'd swap a , b retrieve b + 2*a . tried y = x.subs([(a, b), (b, a)]) y = x.subs({a: b, b: a}) but neither works; result 3*a in both cases b , reason, gets replaced first. any hints? there simultaneous argument can pass substitution, ensure substitutions happen simultaneously , don't interfere 1 doing now. y = x.subs({a:b, b:a}, simultaneous=true) outputs : 2*a + b from docs subs : if keyword simultaneous true , subexpressions not evaluated until substitutions have been made.