Posts

javafx 8 - JavaFX8 TreeTableView multiple root items -

treeitem<filemodel> root = new treeitem<filemodel>(playlist); treetblviewfiles.setroot(root); treetblviewfiles.setshowroot(true); the code above sets 1 root item, need have several called root items expandable list of child items. how do that? in advance. you make parent root, don't show. that parent's children may roots, show.

c# - Twilio SMS messaging not working in Console Application -

i funded twilio account , working in console application. when go documentation (here: https://www.twilio.com/user/account/developer-tools/api-explorer/message-create ) , enter phone number request works. however, when copy code local console application nothing happens. literally copy code line line , make sure sid, token, , numbers correct , nothing happens @ all, console app runs end of execution. string accountsid = "mysid"; string authtoken = "myauthtoken"; var twilio = new twiliorestclient(accountsid, authtoken); var message = twilio.sendsmsmessage("+12222222222", "+13333333333","hello world"); console.writeline(message.sid); i run fiddler , raw packet. fiddler says result 401 status code. post https://api.twilio.com/2010-04-01/accounts/mysid/sms/messages.json http/1.1 authorization: basic {tonsofrandomcharactersthatlooklikeishouldhide} accept: application/json, application/xml, text/json, text/x-json, text/javascript, ...

java - Android-Controlled Car [General Info] -

this beginner's question. i'm trying control car on bluetooth on android device. although i'm no expert once know little, can start working on it. the functionality of car want control via android device is: fire engine (ignition) steer car's wheel accelerate gas pedal brake shift gears i know need mechanical micro-controllers don't have experience in field. question start , need do? , software might me it. for have start micro-controller implementation. make circuit can data bluetooth device , according it, micro-controller trigger relays above work. while in android app can make app send particular data (like 1,2,3,4 each work).

memory management - data type storage in C -

i want understand how declaring variable char saves memory declaring int or short. know fact declaring char reserves 1 byte in memory while 2 or 4 bytes reserved int. now, suppose in 16 bit processor, variable char stored @ location 0xabcd. since 16 bit processor, 1 byte or 8 bits of 16 bits @ address 0xabcd reserved char. int variable stored @ location 0xbcde, accordingly reserve 16 bits of 16 bits available @ location 0xbcde. want know happens 8 bits @ location 0xabcd left on after reserving memory char variable considering fact @ 1 memory location 1 variable can stored. memory addresses not work "variables". can not store 8 or 16 bits, can only , exclusively store exactly 8 bits (one single byte). (a) when int gets stored "at" address, takes more space -- not "in" same address, flowing on in next memory addresses, following "the" memory address. thus, if store char @ 0xabcd, compiler knows it's safe assume next value ...

Search and delete files owned by selected user through batch -

my objective is: - find files owned selected user - delete them my current code: @echo off /f %%f in ('dir /b /s') call :delete_file %%f goto :eof :delete_file ( set var=%1 dir /q %var%| find "\user" ) i'm looping files in current directory, i'm calling :delete_file parameter %%f (file path), in :delete_file i'm setting var first received parameter (%1 - file path). , now, i'm parsing again file (with /q paramter - output owner) in search of owner. question is, how set output of: dir /q %var%| find "\user" to variable? if output null, file not owned selected user, otherwise can delete file. how check this? this should echo del command files matching text if happy remove echo keyword , run real. i made text compare case insensitive. @echo off /f %%f in ('dir /b /s /a-d') ( dir /q "%%f"| find /v ":\" |find /i "%computername%\user">nul && echo del "%%f...

how to share virtual sharepoint server and get it in host windows and visual studio? -

i installed windows 8.1 , installed visual studio 2013 on win 8.1 because need sharepoint server installed windows server 2012 r2 on windows 8.1 hyper-v , installed sql server 2012 , sharepoint server 2013 , create first farm server want create sharepoint app in visual studio installed on windows 8.1 when tap vs 2013 sharepoint solution give me same error if sharepoint not running on local machine . when browse sp server admin center in windows 8.1 browser it's able load sp server central admin installed sharepoint designer on windows 8.1 , it's able create site virtual sp server visual studio not able find virtual server ? please me how can add virtual sp server visual studio ( visual studio installed on win 8.1 ) ?? (forgive me bad english) best regards: raha install vs 2013 on hyper-v sharepoint server installed on. run vs 2013 inside hyper-v , should local sharepoint server. good luck

how to remove the base line on the yaxis of highcharts? -

Image
i need remove following encircled parts highcharts chart, 1 base line on y axis , other values label on x axis. i've tried several things mentioned in api haven't been able achieve yet. fiddle http://jsfiddle.net/ftaran/jbhdm/ $(function () { $('#container').highcharts({ chart: { type: 'bar' }, title: { text: null }, xaxis: { labels: { enabled: false } }, yaxis: { labels: { enabled: false }, tickwidth: 0, gridlinewidth: 0, labels: { enabled: false }, "startontick": true }, tooltip: { formatter: function () { return '<b>' + this.series.name + ':</b> ' + this.y + '<br/>' + this.percentage.tofixed(2) + '%'; ...

python - ImportError: matplotlib requires dateutil; import matplotlib.pyplot as plt -

am new progamming , python, keep getting error below when run program. advised should use pip solve it. cant pip installed using cmd. though suceeded using powershell still cant make work. how solve this, tips go along way. thanks traceback (most recent call last): file "<pyshell#0>", line 1, in <module> satmc import satmc file "c:\python27\starb_models_grid1\satmc.py", line 3, in <module> import matplotlib.pyplot plt file "c:\python27\lib\site-packages\matplotlib\__init__.py", line 110, in <module> raise importerror("matplotlib requires dateutil") importerror: matplotlib requires dateutil am using version 2.7.3 you need install various packages numpy working correctly. libsvm-3.17.win32-py2.7 pyparsing-2.0.1.win32-py2.7 python-dateutil-2.2.win32-py2.7 pytz-2013.9.win32-py2.7 six-1.5.2.win32-py2.7 scipy-0.13.3.win32-py2.7 numpy-mkl-1.8.0.win32-py2.7 matplotlib download binar...

r - Function with extra parameters from another function's input -

this relatively problem i'm stumped. programming in r, don't think problem restricted r. below i've tried write simple code demonstrating problem: f1 = function(x) { return(a + x) } f2 = function(ftn) { return(ftn(1)) } f3 = function(a) { return(f2(f1)) } the problem: if call f3(2) [for example], f2(f1) returned, , f2(f1) returns f1(a+1). f1 not recognize value of 'a' put in f3, code doesn't work! there way can make f1 recognizes input f3? r uses lexical scope, not dynamic scope. functions free variables (variables used not defined within them) in environment in function defined. f1 defined in global environment a looked in global environment , there no a there. can force f1 free variables in running instance of f3 this: f3 = function(a) { environment(f1) <- environment() return(f2(f1)) } this temporarily creates new f1 within f3 desired environment. another possibility if f1 needed within f3 define f1 there (ra...

javascript - HTML Multiple columns in multiple pages -

i want display webpage in book-like fashion, 2 columns, spread through several pages. i using column-count , works fine 1 page, need split text after number of lines display rest in new page. so instead of displaying text as: a b c d e... (each letter represents column of text) i want: a b c d e.. ho this, specifying number of lines per page displayed (and number of columns, although in case 2) , automatically arrange javascript? thanks help. you forgot, each space rendered column! however, cannot use css break line @ each character, either use max-width: 5px; /* approximately 1 char */ or you'll use jquery break string @ each character , write appending <br /> line. var chars = "a b c d e f"; chararray = chars.split(" "); /* @ white space */ (int = 0; < chararray.length; i++) { /* write , add <br /> @ end */ } this way can handle it.

jQuery: create array with all unique values of a table -

is there way can create array using jquery / js contains unique values table, i.e. without duplicates ? also, values interested in in tds class ( myclass ) + exclude "" , " " non-valid values. in below example output should [item1,item2,item3] unique , valid values. example table: <table id="mytable"> <thead> <tr> <th class="myheader">cat 1</th> <th>vol 1</th> <th class="myheader">cat 2</th> <th>vol 2</th> <th class="myheader">cat 3</th> <th>vol 3</th> //... </tr> </thead> <tbody> <tr> <td class="myclass">item1</td><td>8</td><td class="myclass">item2</td><td>7</td><td class="myclass">item1...

Interrogations about "servless CI with git" bash script -

i in reference excellent article david gageot : serverless ci git . let me include david's script here: #!/bin/bash if [ 0 -eq `git remote -v | grep -c push` ]; remote_repo=`git remote -v | sed 's/origin//'` else remote_repo=`git remote -v | grep "(push)" | sed 's/origin//' | sed 's/(push)//'` fi if [ ! -z "$1" ]; git add . git commit -a -m "$1" fi git pull if [ ! -d ".privatebuild" ]; git clone . .privatebuild fi cd .privatebuild git clean -df git pull if [ -e "pom.xml" ]; mvn clean install if [ $? -eq 0 ]; echo "publishing to: $remote_repo" git push $remote_repo master else echo "unable build" exit $? fi fi if understand correctly script, clone initial git repository second hidden git repository unit tests run. if unit tests pass, second hidden repository pushed initial working repository. my questions follows: how 1 supposed use s...

android - activity A B C and startActivityForResult method -

i have 3 activities a, b , c. a main activity. call b , c when button pressed i have in @suppresswarnings("unchecked") @override protected void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); // fragment fragment = getsupportfragmentmanager().findfragmentbyid(r.id.pager); if(data!=null) { if(null!=data.getserializableextra("result")) { m_calpage.updatelistview((arraylist<listtype>) data.getserializableextra("result")); } } } b , c related onactivityresult (call rel ) @suppresswarnings("unchecked") @override public void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == 1) { if(resultcode == -1) { updatelistview((arraylist<listtype>) data.getseria...

sql server - SQL query needed for best product mix data -

i work small company dealing herbal ingredients. count regularly effectiveness of ingredients, based on "product mix" (how of ingredient a, b , c). have table thousands of rows, following: product ingredient ingredient b ingredient c effectiveness 1                          28                               94                            550                      4,1 2 b              ...

deducing the name of the variable from positional parameters in a posix shell -

#!/bin/sh foo() { printf "$1" } random_var="hello\n" foo $random_var when pass 1 or more variables function, in case foo , accessible through $1 $2 , on; how go step inside foo , print name of original variable in case means random_var ? succinctly, don't or can't tell inside function variables used create argument function. there's no guarantee argument variable, or single variable — example: foo 123 foo ${home}:${path} further, if function cares, mis-written. should self-contained possible, , therefore independent of such issues. if isn't, suggests maybe function not functionally cohesive.

Python (maybe sys or os module) to get a unique identifier of client's machine -

i want use (maybe os or sys module or other module) python unique identifier of client. such cpu number or else fixed , never changes. how possible? i'd take https://pypi.python.org/pypi/pycpuid or question: get unique computer id in python on windows , linux

SQL query to get value of next 5th row without using while loop or cursor in SQL Server 2008 -

i working on query need next nth no of row. table structure id stockname stockdate dayopen dayhigh daylow dayclose -------------------------------------------------------------------- 60 idbi 2014-01-01 66.50 67.80 66.50 67.60 197 idbi 2014-01-02 67.55 69.20 65.25 65.60 334 idbi 2014-01-03 65.00 66.40 64.35 66.15 471 idbi 2014-01-06 66.15 66.35 65.10 65.55 608 idbi 2014-01-07 66.10 66.15 63.85 64.25 745 idbi 2014-01-08 64.00 67.10 63.10 66.80 882 idbi 2014-01-09 66.60 67.80 64.50 64.75 1019 idbi 2014-01-10 65.00 65.90 63.75 64.10 1156 idbi 2014-01-13 63.85 65.00 63.25 64.20 1293 idbi 2014-01-14 64.00 64.95 63.80 64.05 what want output column name give me next 5th row date e.g. 1st row new column should return value of next 5th row date ie 2014-01-08 same 2nd row should return 2014-01-09 date. and can't use datediff -5 day cou...

java - boolean &= assignment operator meaning -

if have 2 variables boolean k = true; boolean m = false; what following do; k &= m; that's compound assignment operator, equivalent to: k = (boolean)(k & m);

php - Autocomplete,display search term results? -

a quick question, know how make php script search database record pertaining autocomplete search term (if makes sense @ all). i guess trying that, when search on google , auto-suggestions once click on suggestion results suggestion shows straight away...is there way of doing this? basically create form ajaxes file gives suggestions based on term via database (like query possibly). you can use jqueryui's autocomplete client side. http://jqueryui.com/autocomplete/

html - Place an image next to my title -

i have picture , picture title. i'm trying display text alongside image. current code <p class="title"> <img src="images/football.png" /> sports section </p> .title { float:left; } try removing float p tag, , place on image. <p class="title"> <img class="my_image" src="images/football.png" /> sports section </p> .my_image { float:left; }