Posts

Showing posts from August, 2015

mysql - PhpMyAdmin export : reference without uppercase -

first, i'm sorry poor english, i'm french. i use phpmyadmin xampp in localhost , other phpmyadmin on server my tables personne, adresse, titre. when use export option server sql perfect : create table if not exists `personne` ( `idpersonne` int(11) not null auto_increment, `email` varchar(255) collate utf8_unicode_ci default null, `gsm` varchar(255) collate utf8_unicode_ci default null, `nom` varchar(255) collate utf8_unicode_ci not null, `prenom` varchar(255) collate utf8_unicode_ci default null, `telephone` varchar(255) collate utf8_unicode_ci default null, `idadresse` int(11) default null, `idtitre` int(11) default null, primary key (`idpersonne`), unique key `uniquepersonne` (`nom`,`prenom`), key `idx_f6b8abb9d3e663e4` (`idadresse`), key `idx_f6b8abb9e8b304a9` (`idtitre`) ) engine=innodb default charset=utf8 collate=utf8_unicode_ci auto_increment=685 ; alter table `personne` add constraint `fk_f6b8abb9d3e663e4` foreign key (`idadresse...

ejabberd - XMPP support for avatars in multi-user chat -

i'm creating (yet another) mobile chat app, using smack , ejabberd. i'm trying ascertain best way implement user avatars use in multi-user chat rooms, , of course roster members. looking @ possible solutions, can see: xep-0008 iq based avatars - avatars limited 64 64 pixels, small. xep-0153 vcard based avatars - easy implement both users in roster , muc rooms, (a) sources such this seem indicate one's own vcard needs downloaded on every login (is strictly true? can't see in specs), , (b) should less 96 96 pixels (still pretty small) xep-0084 user avatar based on personal eventing protocol - i'm not clear how can retrieve avatars users in multi-user chat room based on protocol. after joining chat room, need subscribe metadata node of users, , subsequently joining users? , unsubscribe when leave room? figure pretty ugly , clumsy implement. can kindly point me in right direction, or indicate may have misunderstood? thanks. i guess best way a...

node.js - Not able to connect to mongodb when start node server -

i trying run node app locally on vm. when running command: sudo node_env= xyz port=80 node server/app.js i'm getting error: /node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/mongo_client.js:378 throw err ^ error: connection closed @ null. (/node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/connection/server.js:605:24) @ emit (events.js:92:17) @ null. (/node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:155:15) @ emit (events.js:98:17) @ socket. (//node_modules/mongo-oplog/node_modules/mongodb/lib/mongodb/connection/connection.js:528:12) @ socket.emit (events.js:95:17) my mongodb running fine , can connect local db robomongo. any highly appreciated on this.

How to sign rpm packages using digital signatures? -

i know there way sign using keys requirement sign using digital certificates. try # rpm -ba --sign blather-7.9.spec enter pass phrase: <passphrase> (not echoed) pass phrase good. * package: blather … binary packaging: blather-7.9-1 finding dependencies... … generating signature: 1002 wrote: /usr/src/redhat/rpms/i386/blather-7.9-1.i386.rpm … source packaging: blather-7.9-1 … generating signature: 1002 wrote: /usr/src/redhat/srpms/blather-7.9-1.src.rpm #

ios - Set Images Randomly for buttons from array and take button's cgrect's from aray -

i have 42 buttons in storyboard , have take array of images. in array there total 7 images. nsarray *arrimg=[nsarray arraywithobjects:@"book.png", @"lock.png", @"exclamation.png", @"game.png", @"music.png", @"videos.png", @"camera32.png", nil]; so how take random images every time on button? should take button collection or else? note:- have not take buttons programatically. a new question stand: how take 42 button's cgrect array , display randomly in screen. nsmutablearray *mutarr=[[nsmutablearray alloc]init]; nsmutablearray *array=[nsmutablearray arraywitharray:mutarr]; [array addobject:[nsvalue valuewithcgrect:cgrectmake(50, 50, 47, 25)]]; [array addobject:[nsvalue valuewithcgrect:cgrectmake(97, 50, 47, 25)]]; [array addobject:[nsvalue valuewithcgrect:cgrectmake(144, 50, 47, 25)]]; cgrect somerect1 = [[array objectatindex:0] cgrectvalue]; cgrect somerect2 = [[array objec...

visual c++ - Changing the text of a C++ CLI label -

Image
i trying change text of label in c++ cli program. need take value the user entered in textbox, insert short string, change label string. have no problem constructing string, having trouble setting label new string. here code... std::string v1str = "phase a: "; v1str.append(vt2); //vt2 type str::string v1str.append(" vac"); label->text = v1str; this error message i'm getting... why not allowed pass v1str label text setter? how can pass string i've constructed label text setter? label::text has type of system::string^ , managed .net string object. cannot assign std:string system::string^ directly becuase different types. you can convert std::string system::string . want use system::string type directly: system::string^ v1str = "phase a: "; v1st += vt2; // or maybe gcnew system::string(vt2.c_str()); v1str += " vac"; label->text = v1str;

c++ - Configuring Flycheck to work with C++11 -

i having significant trouble configuring flycheck c++11. right now, flycheck flagging things std::to_string() . checker using g++. can add in .emacs file such flycheck assume c++11 default? flycheck provides option flycheck-gcc-language-standard purpose. should not set globally, because break checking of c files, can set c++-mode-hook following code in init file: (add-hook 'c++-mode-hook (lambda () (setq flycheck-gcc-language-standard "c++11"))) however, recommend against this. instead, use directory variables configure language standard per project. open root directory of project in dired c-x d , , type m-x add-dir-local-variable ret c++-mode ret flycheck-gcc-language-standard ret "c++11" . create .dir-locals.el file in root directory of project. emacs reads file whenever visit file directory or subdirectory, , sets variables according rules in file. specifically, emacs set language standard flycheck syntax checking c++ 11 c++ files...

html - How to create a custom shapes using CSS? -

Image
for eg. need able create key shape using css jsbin convenience you can try this: #key { margin: 50px 0 0 100px; width: 200px; height: 30px; border-radius: 30px; position: relative; background: red; } #key:after { content: ''; position: absolute; bottom: 100%; right: 20px; height: 20px; width: 50px; background: red; } #key:before { content: ''; position: absolute; border: 30px solid red; border-radius: 50%; height: 60px; width: 60px; left: -100px; top: 50%; margin-top: -60px; } <div id="key"></div>

html - Centering buttons within a div -

i can't seem center social media buttons. all-soc-share class right empty. how should center them in css? (its hassle provide fiddle) the html code <div class="col span-2-of-2 all-soc-share"> <div class="soc-share"> <!--fb share--> <div class="fb-share-button" data-href="http://example.com" data-layout="button_count"></div> </div> <div class="soc-share"> <!--twitter share--> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://example.com" data-text="dummy text" data-size="large">tweet</a> <script>!function(d,s,id){var js,fjs=d.getelementsbytagname(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getelementbyid(i...

android - Toolbar not visible in layout -

below layout, , when running toolbar not visible @ all, 2 tabs on tabview take entire screen. in preview in androidstudio see actionbar expect @ top. missing? <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/c"> <android.support.v7.widget.toolbar android:id="@+id/my_toolbar2" android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="?attr/colorprimary" android:layout_marginbottom="10dp" app:theme="@style/themeoverlay.appcompat.dark.actionbar" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" /> <relativelayout xmlns:android="http://sch...

minify - Statistics on renaming via JavaScript minifier -

i new minification of javascript. setting of problem: assuming have original javascript code , minified code a′ (which generated minifier uglifyjs or closure compiler), how can i: count number of variables have been renamed, , map every variable's original name minified name any detailed instructions welcomed, tool uglifyjs or closure compiler better :) there 2 approaches: 1) closure compiler can produce "renaming map" both properties , variables. map not include unrenamed variables there still work do. see --variable_renaming_report command-line option https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/commandlinerunner.java#l215 . 2) closure compiler , other tools produce source maps. source map can used map every byte original character in original. for second closure compiler project includes java library reading source maps: https://github.com/google/closure-compiler/blob/master/src/com/google/debugg...

java - Can't switch HttpURLConnection method to POST -

i trying send http post request url, using httpsurlconnection. here trying do: url requestedurl = null; httpurlconnection urlconnection = null; try { requestedurl = new url("https://www.test.local/login/"); } catch (malformedurlexception e) { e.printstacktrace(); } try { urlconnection = (httpsurlconnection) requestedurl.openconnection(); try { urlconnection.setrequestmethod("post"); } catch (protocolexception e1) { e1.printstacktrace(); } urlconnection.setrequestproperty("content-type","application/json"); urlconnection.setrequestproperty("accept", "application/json"); urlconnection.setdoinput(true); urlconnection.setdooutput(true); urlconnection.setusecaches(false); urlconnection.setconnecttimeout(1500); try { ...

ios - How can I push the next view controller on a navigation controller programmatically? -

how can push next view controller on navigation controller programmatically (without need of button)? i know how instantiate , present new controller below var next = self.storyboard?.instantiateviewcontrollerwithidentifier("placeinfo") as! placeinfocontroller self.presentviewcontroller(next, animated: false, completion: nil) but want push next view controller on navigation controller. tried below self.navigationcontroller?.pushviewcontroller() no success var next = self.storyboard?.instantiateviewcontrollerwithidentifier("placeinfo") as! placeinfocontroller self.navigationcontroller?.pushviewcontroller(next, animated: true) have tried using performseguewithidentifier ? learn more here: https://developer.apple.com/library/mac/documentation/appkit/reference/nssegueperforming_protocol/#//apple_ref/occ/intfm/nssegueperforming/performseguewithidentifier:sender :

Python + Selenium WebDriver - Get div value if sibling contains string -

i trying value div in web page using python/selenium class names repeated contain unique strings, such structure below.. <div class='classname'> <div class="col_num">1 </div> <div class="col_val">5.00 </div> </div> <div class='classname'> <div class="col_num">2 </div> <div class="col_val">2.00 </div> </div> how value of 'col_val' div contains "col_num = 1"? (the value 5.00 should returned , saved variable) my current attempt @ solution comes converting selenium ide (code obtained own past question) python below, doesnt work 'contains' not valid in css selector beleive must use xpath not know how. price = driver.find_element_by_css_selector("div:contains(\"1\")+[class=col_val]").text following-sibling axis here: the following-sibling axis indicates nodes have same paren...

css - Video element not quite centered at all widths -

so have video element centered page widths on number, not always. element has been rotated , if width of page falls below length of element, things no longer center correctly. it's hard explain here's jsfiddle: https://jsfiddle.net/05m04069/ you can shrink down output window width-wise (make skinnier) see how things no longer centered. posting code here well: <body class="main-container"> <div class="centered" id="location-header"> seattle </div> <div id="clicktargetcontainer"> <video loop muted id="mainvideo" src="http://player.vimeo.com/external/123836285.hd.mp4?s=6ddd98cc75f1bb6fb776369a8fa372bf&profile_id=113" type="video/mp4" webkit-playsinline="webkit-playsinline"e ad-outlet="video"> browser not support html5 video. </video> </div> </body> and here's css well: video { overflow: hidden; pos...

Python: Methods inside a method in a class -

import numpy np class y: def __init__(self): return none def f(self,x): return x def g(self,x): return f(x)**2 y=y() print y.g(3) i know above code give error, somehow want following, there modification do? the reason doesn't work because have f(x)**2 instead of self.f(x)**2 . make change , it'll work perfectly.

ios - Getting YUV from CMSampleBufferRef for video streaming -

i building ios video streaming chat application , library working requires send video data passing yuv (or guess ycbcr) data individually. i have delegate set up, i'm not sure how individual yuv elements cmsamplebufferref . alot of apple guides seen, reference stuff capturing video frames uiimages though. stream format - (bool)setupwitherror:(nserror **)error { avcapturedevice *videocapturedevice = [avcapturedevice defaultdevicewithmediatype:avmediatypevideo]; avcapturedeviceinput *videoinput = [avcapturedeviceinput deviceinputwithdevice:videocapturedevice error:error]; if (! videoinput) { return no; } [self.capturesession addinput:videoinput]; self.processingqueue = dispatch_queue_create("abcdefghijk", null); [self.dataoutput setalwaysdiscardslatevideoframes:yes]; nsnumber *value = [nsnumber numberwithunsignedint:kcvpixelformattype_420ypcbcr8biplanarvideorange]; [self.dataoutput setvideosettings:[nsdictionary di...

java - Is there a different way to use methods of another class? -

i fixed it. extended abstractpage methods are. @ first test class must have singular no-argument constructor. realized in @before driver variable , startup variable made problems after removed , called open chromedriver() method , openhomepage method eclipse happy , allowed me run tests , remove part had call class method. help. package seleniumtests.qa.com; public class testforpage { private webdriver driver; @before public void setup() { abstractpage startup = new abstractpage(driver); driver = startup.openchromedriver(); onregistrationpage = new registrationpage(driver); onregistrationpage.openhomepage(driver); } @test public void register() { onregistrationpage.clickon(onregistrationpage.registration_link); assertequals(onregistrationpage.geturl(),"http://demoqa.com/registration/"); // write first name** onregistrationpage.type(onregistrationpage.first_name_input, "user"); // write last name onregistrationpag...

datetime - Python - time: how to check if seconds == 00 -

in script want run function when seconds 00. example if start script @ 8:12:32, want function start @ 8:13:00. have tried use datetime.datetime.now() haven't figured out how sort out seconds time. in python 3 documentation have found time.second , datetime.second haven't had success using them. import datetime, time delta = 60 - datetime.datetime.now().second time.sleep(delta) the next statement executed on minute ( hh:mm:00 ).

android - getAdapterPosition() not returning position of item in RecyclerView -

this sort of follow-up or complement this post . trying position of item in recyclerview, none of methods have tried have worked. i called getadapterposition() in personviewholder constructor , assigned value integer position, used in unitonefragment class accordingly (see onclick() method). whatever is, doesn't happen , guess because getadapterposition() method doesn't work or isn't used correctly. my adapter: public class rvadapter extends recyclerview.adapter<rvadapter.personviewholder> { context mcontext; rvadapter(context context, list<chapter> chapters) { mcontext = context; this.chapters = chapters; } public static cardview cv; public static int position; public static string chapternumbertitle; public class personviewholder extends recyclerview.viewholder implements view.onclicklistener { textview chaptername; textview chapternumber; // imageview chapterphoto; public personviewholder(view itemview) { super...

html - Center tag works on link but not CSS or align attribute -

i'm trying center button <a> tag. however, thing work <center> tag. i've tried using <a style="text-align: center">button</a> , <a align="center">button</a> , none of 2 worked. why center tag works? my css this: .btn { color: white; background-color: orange; padding: 5px; border-radius: 10px; -webkit-border-radius: 10px; -moz-border-radius: 10px; text-decoration: none; transition: 200ms all; } .btn:hover { background-color: #ffc964; color: white; cursor: pointer; } html: <a href="http://example.com" class="btn">button</a> the <center> tag deprecated , removed in browsers. , <a> tag inline in nature, text-align: center should given it's parent block element: .make-center {text-align: center;} <div class="make-center"> <a href="#">i link</a> </div> ...

python - nose get list of test without running them -

is there way list of tests recognized nose, without running them? according doc --collect-only enable collect-only: collect , output test names only, don't run tests. [collect_only] however when nosetests --collect-only get: ran 101 tests in 0.642s ok how can names tests? try -v option: nosetests -v --collect-only if you're trying debug how nose finds tests, go -vv

"End of file reached" error OR Zlib::BufError using HTTParty -

i experiencing 2 different errors - depending on whether use httparty in ruby app or use command line. url trying access: http://apiv2.ahrefs.com/?token= $insert_valid_ahrefs_api_token&from=backlinks&output=json&mode=domain&target=blog.ahrefs.com&limit=1000 http method: get when directly in bundle console zlib::buferror : httparty.get "http://apiv2.ahrefs.com/?token=$insert_valid_ahrefs_api_token&from=backlinks_new_lost&output=json&mode=domain&target=blog.ahrefs.com&limit=1000" zlib::buferror: buffer error /users/medic/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/http/response.rb:357:in `finish' /users/medic/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/http/response.rb:357:in `finish' /users/medic/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/http/response.rb:262:in `ensure in inflater' /users/medic/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/http/response.rb:262:in `inflater' /users/medic/.rbenv/version...

javascript - Changing aria-control attribute value in Cloned fields -

i've altered code given milan jaric question jquery clone form fields , increment id i'm coming across issue i'm trying clone bootstrap collapse. can't see figure out how alter attribute 'aria-control' value. here's the demo of have. id , href work fine themselves, moment try change 'aria-control' value, of ids , hrefs in bootstrap collapse not change default values. ideas? js script var regex = /^(.*)(\d)+$/i; var cloneindex = $(".clonedbox").length; function clone() { $(this).parents(".clonedbox").clone() .appendto("div#accession_boxes") .attr("id", "clonedbox" + cloneindex) .find("*") .each(function () { var id = this.id || ""; var match = id.match(regex) || []; if (match.length == 3) { this.id = match[1] + (cloneindex); this.href = match[1] + (cloneindex); ...

ios - Scenekit PhysicEngine follow rolling ball -

i want follow rotating sphere in apple's scenekit. i've added lookat constraint camera , sphere falls down cam aleays points if sphere rolls away camera stays @ current position. want cam follow sphere in third persond shooter predefined distance it. if make cam childnode of sphere cam "orbits" around ball rolling. ideas how can follow ball cam? it's pretty simple. need change camera node's position @ each frame ball's presentationnode plus offset avoid being inside of it. i'm not familiar swift code this: func renderer(arenderer: scnscenerenderer, didsimulatephysicsattime time: nstimeinterval){ var ballp = ballnode.presentationnode.position // offset camera , on x: var camerap = scnvector3(x: ballp.x+5, y: ballp.y+10, z: ballp.z) cameranode.position = camerap }

html - CSS-only tabs in a C# System.Windows.Forms.WebBrowser -

i'm trying create css-only tabs using [id^=tab]:checked + .tab-content { display: block; } approach see many websites saying right approach. my code produces proper results in ie, firefox , chrome fails work in browser component (system.windows.forms.webbrowser) within c# program. i thought browser component ie stripped of user interface, why not work??

javascript - Are bluebird promises blocking in nature -

i may bit new understand underlying functioning of promises esp bluebird. trying accomplish api server processes bulk write of 250k+ rows database. takes around 30s complete request. want api server return ok or error based on success of bulk write. when don't use promises don't opportunity bubble error because request not waiting bulk write complete. however, if use promise error , success works properly. server becomes unresponsive till action complete. in nutshell, using promise library handle bulk write blocks api server. function chunk(arr, chunksize) { var r = []; (var i=0,len=arr.length; i<len; i+=chunksize) { r.push(arr.slice(i,i+chunksize)); } return promise.resolve(r); } exports.add = function(req, res) { var po_std_lt_time = 90; //days parts.sync() .then(function() { return parts.destroy({ where: {} }); }) .then(function() { var workbook = xlsx.readfilesy...

Why am I getting a LAUNCH_ERROR, NOT_FOUND when attempting to play to an audio-only Google Cast device? -

i purchased lg music flow h3 test google cast app 'audio-only' device. i've enabled audio-only device support within google cast dashboard , i've registered device development. app works expected when played google chromecasts, when attempting load receiver app on lg device following error: {"reason":"not_found","requestid":1,"type":"launch_error"} thinking perhaps 3rd-party devices can't registered development, went ahead , published app. unfortunately did not address problem. upon further investigation, i'm noticing other google cast apps (i.e. songza, tunein, pandora, etc. on both android & ios) aren't able play lg music flow h3 either. i discovered way h3 play google cast apps (both app , others) first run lg music flow multi-room audio app. running lg music flow app appears effect device's _googlecast._tcp zeroconf service discoverability. , h3 shows in zeroconf yet still can't pl...

python - How to mock.patch a class imported in another module -

i have python class such module: xy.py from a.b import classa class classb: def method_1(): = classa() a.method2() then have classa defined as: b.py from c import classc class classa: def method2(): c = classc() c.method3() now in code, when writing test xy.py want mock.patch classc, there way achieve in python? obviously tried: mock.patch('a.b.classa.classc) and mock.patch('a.b.c.classc') none of these worked. you need patch classc located that's classc in b : mock.patch('b.classc') or, in other words, classc imported module b , that's scope in classc needs patched.

c# - How to get Key, Value from dictionary when value is a list -

so have dictionary have key, , value list contains strings.. example.. {"key1", list1} list1 = [value 1 value2, value3] and have multiple keys , therefore values have lists. want display shows key1: value1 key1: value2 key1: value3 so want able display key , value. unsure of how that. foreach (var value in foodcategory_item.values) { foreach(var item in value) { console.writeline("value of dictionary item is: {0}", item); } } that's have far, iterate on values, know how do, not sure how key values in there well, because iterate on values first, , iterate through key items.. this should work: foreach (keyvaluepair<string, list<string>> kvp in foodcategory_item) { foreach (string item in kvp.value) { console.writeline ("{0}: {1}", kvp.key, item); } } dictionary implements ienumerable<keyvaluepair<tkey, tvalue>> , can iterate on directly.

php - Issue with ACF fields showing up in WordPress template -

okay, having bizarre issue ever. have custom home page template wordpress site working on. you can see screenshot of how have acf fields template setup on backend here . the issue having when try display field <img src="<?php the_field('slide_1_thumb'); ?>" alt="" /> the image doesn't show @ all. have return value set 'image url', , odd thing shows images for <?php the_field('slide_1'); ?> just fine no issues @ all. i'm not sure doing wrong here, there no spelling errors @ all, reason slide_1_thumb images won't show up. want think 1 of occam's razor type of situations missed simple, i've gone on million times no luck. below find copy of php code home-page.php template. <?php /** * template name: home page * * custom template home page. * * "template name:" bit above allows selectable * dropdown menu on edit page screen. */ get_header(); ?> <div id="...

Selenium WebDriver (Firefox): dynamically disable Javascript -

i know can use firefox profiles disable javascript. example, see enable/disable javascript using selenium webdriver . however, have case need javascript enabled in order me log in page, want javascript disabled after logged in, when page_source , returns dom if javascript has not run. key login page requires javascript. possible dynamically control whether javascript on or off in selenium webdriver? i suggest not dynamically disable javascript functionality of webdriver written in javascript , may give unexpected results sometimes. better use firefox profiles disable it, have written code may disable during runtime. webdriver driver = new firefoxdriver(); driver.get("about:config"); actions act = new actions(driver); act.sendkeys(keys.return).sendkeys("javascript.enabled").perform(); thread.sleep(1000); act.sendkeys(keys.tab).sendkeys(keys.return).sendkeys(keys.f5).perform(); if using selenium ide, can refer: http://thom.org.uk/2006/03/12/disab...

netstat - Cannot establish connection to application listening on 0.0.0.0:8443 -

i have application listening on 0.0.0.0:8443 (local address). "netstat -ant" output: proto||recv-q||send-q||local address||foreign address||state tcp||0||0||0.0.0.0:22||0.0.0.0: ||listen tcp||0||0||0.0.0.0:8443||0.0.0.0: ||listen these 2 ports listening. when telnet localhost port 22 , 8443, both able connect. when telnet computer on same subnet, able connect port 22 not port 8443. host , client computer connected via switch. cause? looks not open in iptables. please follow below link same. https://serverfault.com/questions/301903/cannot-access-port-80-from-remote-location-but-works-on-local guess deals same question.

php - How to get Current Hour and Minute as seperate values -

how current hour , minutes on users pc separate values in php , echo them separately? i want echo hour , minute current in different locations. thanks! edit: since cant user time, lets server time. $dt = new datetime(); echo $dt->format('h'); echo $dt->format('i');

java - Can't get RCaller to to run simple example -

i trying run simple example of rcaller on windows 7 machine. rcaller caller = new rcaller(); rcode code = new rcode(); caller.setrscriptexecutable("c:\\program files\\r\\r-3.2.1\\bin\\rscript.exe"); double[] numbers = new double[]{1, 4, 3, 5, 6, 10}; code.adddoublearray("x", numbers); code.addrcode("my.mean<-mean(x)"); code.addrcode("my.var<-var(x)"); code.addrcode("my.all<-list(mean=my.mean, variance=my.var)"); caller.setrcode(code); caller.runandreturnresult("my.all"); double[] results = caller.getparser().getasdoublearray("mean");` system.out.println(results[0]); this error message: cat(makexml(obj=my.all, name="my.all"), file="c:/users/bob smith/appdata/local/temp/routput8089051805366000971") rcaller.exception.parseexception: can not handle r results due : ...

terminal - Executing GUI .sh file with Osx -

i'm beginner in kind of stuff suppose solution problem may not difficult. i'm trying open gui file of meka (an extension weka) , it's manual tells me execute file called: run.sh . go console , type ' my file's location '/run.sh , happens message: "the main class not located , loaded", or that. this content of run.sh file: #!/bin/bash memory=512m main=meka.gui.explorer.explorer java -xmx$memory -cp "./lib/*" $main $1 so tips? thank you. the script depends on being run folder resides in. try: cd filelocation ./run.sh

for loop in C: return each processed element -

i have linked list, , want write function go through each node, , return appropriate elements. this: struct list* returnelements(struct list *head){ (; head != null ; head=head->next){ if (head->field1 == "something") return head; } and function called returnelements have somehow catch each returned node, , it. is somehow possible? i think easier without function right inside function call returnelements make new variable , set type struct list* , traverse list within function , if find node need use something this: struct list *temp = head; for(; temp != null; temp = temp->next) { if(strcmp(temp->field1, "something") == 0) { //do whatever want node } }

jquery - Datatables with FixedHeader extension, offsetTop option creates 2 headers -

i'm using datatables fixedheader extension. i'm using offsettop option fixed header, useful making header stop below navigation menu @ top. when scroll page, header row stops supposed stop (130px top of page), scrolling can briefly see 2 headers, 1 sticking in place, , original one. is there can header doesn't show twice? clear, on development server don't have link post. there indeed double header appears unless positioning correctly. i highlight important parts of solution. css: added overflow:auto because .navbar has 20px bottom margin , make #nav-wrapper correct size measure later. javascript: the trick here adjust <body> top padding compensate fixed header. code $(this).height() measures height of #nav-wrapper , why setting overflow:auto important in css. also later need measure offsettop correctly fixedheader extension. trick here we're measuring height of navigation bar without 20px bottom margin $('#nav-wrapp...

.gitignore when developing Python and Django Applications on Windows -

what should change in .gitignore file when i'm developing python/django applications using ptvs, naturally, on windows? github has nice collection of .gitignore templates . when start django project grab python template , add needed. i don't develop on windows, have visual studio template . grab both , merge them needed. i doubt these github links gonna die anytime soon, i'll add current contents of these files anyway. python.gitignore # byte-compiled / optimized / dll files __pycache__/ *.py[cod] *$py.class # c extensions *.so # distribution / packaging .python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # pyinstaller # these files written python script template # before pyinstaller builds exe, inject date/other infos it. *.manifest *.spec # installer logs pip-log.txt pip-delete-this-directory.txt # unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .c...