Posts

Showing posts from June, 2012

ember.js - Ember Data: Can I add extra properties when persisting data? -

there's route on our api create production post /productions . have option of passing project_id property body attach production project in 1 go. request looks follows: // post /productions { title: "production title", goal_date: "2015-04-30 01:37:03", project_id: "prj_hash123" } when store.createrecord('production', { title: "production title", ... }); , project_id property stripped off , not sent save() . there way using ember data send along request property? note: have tried modifying restserializer.serialize method, project_id property doesn't make there. assume because it's not defined on model, it's stripped when createrecord called.

mysql - Insert into with select and group by -

i try insert into select , group by, this: insert client(name, age, last_name, id_city) select l.name_client, l.age_client, l.last_name, l.id_city list_request l inner join product pd on l.id = pd.id_list_request; when run it, 4 results appear, repeated, need one. what can solve this, try use group by, not work, or don't know how use it. edit: sorry, forgot 2 columns, need group name , age. try insert client(name, age) select l.name_client, l.age_client list_request l inner join product pd on l.id = pd.id_list_request group l.name_client, l.age_client; if doesn't work can print out getting select , add question?

Git post-receive hook is not working -

i work git 1.95 (local) , 1.71 (remote). i've read of threads on git hooks don't work, haven't found solution yet. what's happening: have set remote non-bare repository push local repo through ssh. post-receive hook simple: #!/bin/bash -x touch worked.txt i added necessary permissions chmod +x , , works when executed manually. ended reading this , still don't have solution. should simple, instead it's frustrating.

c++ - fatal error: opencv2/contrib/contrib.hpp' file not found (open cv already built) -

i have downloaded , built open cv according these open cv docs . i trying compile eigenfaces demo , , getting following error. fatal error: 'opencv2/contrib/contrib.hpp' file not found the line of concern is #include "opencv2/contrib/contrib.hpp" the contrib directory not in usr/local/include/opencv/ directory. have referenced following so question , seems handle case of building scratch. also, repository references opencv_contrib not contain file contrib.hpp how can add necessary source files current build without having rebuild everything? since you're using opencv3.0: the contrib parts have been outsourced separate github repo you'll have that, append main opencv (re-)build, , then: #include <opencv2/face.hpp> using namespace cv; ptr<face::facerecognizer> model = face::createlbphfacerecognizer(...) (an additional namespace added here)

sql - Left Outer Join Query returns too many rows -

i'm having issue trying data 4 tables. i've tried 4 left outer joins , i'm trying subselect. try ad.accountdirecttocommitmentitemcategoryid field, query goes returning desired 4 rows 16 rows. i'm trying add column results duplicating each row each data in column. how should writing query differently? select distinct ad.accountdirecttocommitmentitemcategoryid, cic.commitmentitemcategoryname, cict.commitmentitemcategorytypename, cic.commitmentitemcategorytypeid, cic.commitmentitemcategoryid, vw.dollarsallocated [dbo].[tblcommitmentitemcategory] cic left outer join [dbo].vw_parentaccountdollarsallocatedbycommitmentitemcategory] vw on vw.commitmentitemcategoryid = cic.commitmentitemcategoryid left outer join [dbo].[tblcommitmentitemcategorytype] cict on cic.commitmentitemcategorytypeid = cict.commitmentitemcategorytypeid left outer join ( select distinct accountdirecttocommitmentitemcategoryid, accountdirectparentid [dbo].[tblaccountdirect

javascript - if ("i am on this html page") { play this music}; -

if ("i on html page") {play music}; are there commands make possible using javascript? this code worked me :) var soundefx2 = document.getelementbyid("soundefx2"); var soundmain = "music/main.mp3"; if(window.location.href.split('/').pop() == "game2.html") { soundefx2.src = soundmain; soundefx2.play(); soundefx2.loop = true; } let's url http://foo.com/bar.html . with window.location.href you're getting whole url ( http://foo.com/bar.html ), need last url segment ( bar.html ) of url, use: if(window.location.href.split('/').pop() == "game2.html"){ // rest of code }

SQL Server mdf files not changing -

here sql server question. while data getting populated or deleted data base (ex. northwinddb), corresponding mdf file not changing @ all. test restarted sql server services , see change in time stamp , size of mdf file. is there way can force data base changes reflect in corresponding mdf , ldf files without restarting sql service. yes, can use: dbcc shrinkfile (transact-sql) check here . personally use this: use mydb; go -- truncate log changing database recovery model simple. alter database mydb; set recovery simple; go -- shrink truncated log file 1 mb. dbcc shrinkfile (mydb_log_name, 1); go -- reset database recovery model. alter database mydb; set recovery full; go

node.js - Sequelize returns _previousDataValues, _options, options, and all kinds of other junk -

if run simple query following, object junk ( _previousdatavalues, _options, options, etc). how disable meta data , return actual datavalues? can't find in spotty documentation. models.product.findall({ attributes: ["id", "name"] }) all 'junk' used sequelize fancy stuff orms do: keep change of changed values etc. etc... they removed automagically when serialize instances json, or might manually using .get({ plain: true }) or .tojson()

python - Pandas file structure not supported error -

i notimplementederror: file structure not yet supported when run code below on file import constants, pandas, pdb datetime import datetime, timedelta df = pandas.read_csv('300113r1.dnc', skiprows = 11, delim_whitespace=true,usecols=['y','m','d','prcp'], parse_dates={"datetime": [0,1,2]}, index_col="datetime", date_parser=lambda x: pandas.datetime.strptime(x, '%y %m %d')) any idea on might going wrong? related query on smaller sample of same dataset here: date parse error in python pandas while reading file thanks @cosmoscalibur spotting file missing columns, 1 solution skip parsing header: df = pandas.read_csv('300113r1.dnc', skiprows = 12, delim_whitespace=true,usecols=[0,1,2,3], header=none parse_dates={"datetime": [0,1,2]}, index_col="datetime", date_parser=lambda x: pandas.datetime.strpt

python - List of variable length lists -

i want have n lists of different length , refer them list. possible. example, can hard code: list1 = [0, 2, 3, 4, 1] list2 = [1, 4, 2, 1] list4 = [1, 1, 0] and refer them directly, able call list[1][1] , same thing list1[1] return or have list[3][2] return error since list3 not defined (and list[3] have length 0). is possible? i looking way dynamically create list of lists , append various lists later. you try initializing list lists = [[] _ in xrange(3)] now when assigning elements, do: lists[0].append(value) lists[2].append(value2) which add value first sublist within lists, value2 third sublist , on.. you can use approach dict also. >>> data = {'list%i' % : [] in range(4)} >>> data {'list0': [], 'list1': [], 'list2': [], 'list3': []} so append items in list way >>> data['list1'].append(1) >>> data {'list0': [], 'list1': [1], 'list2&#

objective c - NSCharacterSet URLHostAllowedCharacterSet doesn't replace '+' sign? -

i'm struggling transmit long encrypted strings on network , them come out correctly on server. example, have encrypted string on client: wcwserzch8xm1hpbno1ksd1lvfmpuur4wmq9hquwek0vyclefpgwfr/sbtes1a4rpv6eyp9nzeeu9ukkifstdp+sposquf6evjf3wrhrxmre81lirhuryk0irwone5uik+vlpr41ketmznxa4+gelmf53r7oayrkkffnipdmpo+wbge0vl3pqeosxb01twjydibisz5wjiieim3zojw/sw== as can see, has few characters not transmit on network without url encoding ( + , / , notably). i'm not entirely sure if there other characters arise in other situations, want make sure solution 'universally' correct. using line: nsstring *escapedstring = [cipherstring stringbyaddingpercentencodingwithallowedcharacters:[nscharacterset urlhostallowedcharacterset]]; which found in highly reviewed answer . however, i'm still having trouble decrypting on server side, printed out results on client before sending, , see this: wcwserzch8xm1hpbno1ksd1lvfmpuur4wmq9hquwek0vyclefpgwfr%2fsbtes1a4rpv6eyp9nze

Why do I get a blank page after any saving in joomla 3 administration? -

i have turned debugging on, , max error display, when saving these settings blank page, nothing. saving module, same. saving article, same. reload page , changes made/saved, gets extremely annoying reload things twice blank screen indicate fatal error -you need enable error reporting in joomla configuration (e.g. set maximum). , exact error related plugins or configurations , resolve per error existence.

version control - How to get a snapshot of old code with bitbucket? -

i use bitbucket vcs , i'd know how old versions of project. can browse changesets don't know how complete version snapshot of project how last thursday , not individual changesets. how can done? i've used github , function. bitbucket not vcs (nor github). host clone of dvcs . the easiest/best way ask use local clone (or make new one, see hg clone ) , use hg update (or whatever) whatever version want. (see hg update .) for people outside project, if don't want use dvcs directly reason, can use bitbucket's project download pages download tar-ball or zip file of tip or tag or branch.

html - JavaScript - Outputting a line with Document Write -

i trying output line javascript document.write function, however, on submitting form, line flashes , disappears any thoughts? <!doctype html> <html> <head> <title>form validation</title> </head> <body> <script type="text/javascript"> function checkage() { var x = document.forms['myform']['age'].value; if(x < 18) { document.write("<p>you young. form not submitted</p>"); } else { document.write("form sent successfully"); } } function tips() { alert("please enter name in name box, \nand age in age box.\nyou have on 18 submit form"); } </script> <form id="myform" action="formvalidation.html" onsubmit="checkage();&qu

java ee - CDI: ProxyObject ClassCastException when inject DAO -

i trying instantiate dao classes using cdi 1.0 in websphere 8.0. in workspace have ejb class located in ejb project calls dao class located in dao project. followed this example (in portuguese, sorry) used producer method. these classes: the dao class (in dao project): public class naturezadao extends basedao<naturezaorm> { @inject public naturezadao(entitymanager em) throws daoexception { super(naturezaorm.class, em); } // ... } the producer class (in dao project): import java.io.serializable; import javax.enterprise.context.applicationscoped; import javax.enterprise.context.requestscoped; import javax.enterprise.inject.disposes; import javax.enterprise.inject.produces; import javax.persistence.entitymanager; import javax.persistence.entitymanagerfactory; import javax.persistence.persistenceunit; /** * code extracted * http://blog.caelum.com.br/acessando-multiplos-bancos-de-dados-com-jpa-e-cdi/ */ @applicationscoped public class enti

java - modelmapper-jooq and handling 'null' fields -

i'm using modelmapper-jooq map jooq records custom pojos. let's assume have table like | name | second_name | surname ---------------------------- 1 | mary | jane | mcleod ---------------------------- 2 | john | henry | newman ---------------------------- 3 | paul | | signac ---------------------------- 4 | anna | | pavlova so second_name can null . person pojo looks like: public class person { private string name; private string secondname; private string surname; // assume getters , setters } when map result<record> collection<person> , every element in collection has secondname equal null . when map first 2 rows, ok. how handle properly, secondname field null when corresponding field in database null ? i've checked fields in record instances have proper values. configure modelmapper in way: modelmapper modelmapper = new modelmapper(); modelmapper.getconfiguration().addvaluereader(new

Output discrepancy between SAS and R -

i have coded same program in r , in sas (university edition running on oracle virtualbox on mac) , i'm noticing discrepancy - means messed up. the first discrepancy appears in principal component analysis run , believe has options intrinsic functions available in 2 programs. diligently working on looking on documentation grateful assistance of brilliant experts on site. i have been using file - https://drive.google.com/file/d/0b9oqam9ykac3bepicestrw8wuzg/view?usp=sharing - test 2 programs. in r, code pca simple: pca1=prcomp(predictor_matrix, scale.=true) and first observation transformed following <1.01, -0.79, -0.03, -1.08, 1.86, -0.13, 0.04, -0.03, 0.02, -0.01> in sas, code pca looks like: proc factor data=regressors simple corr mineigen=0 /*retain eigenfunctions*/ nfactors=10 /*print optional data*/ out=newdata /*get transformed data*/ ; run; and first observation transformed following <0.55, -0.53, -0.0

sqlite - Android DB - Syntax error -

i want create db. here dbhelper public class dbhelper extends sqliteopenhelper { string tag = const.tag_db_helper; public dbhelper(context context) { super(context, const.db_table_name, null, 1); } public void oncreate(sqlitedatabase db) { db.execsql("create table " + const.db_table_name + " (" + const.db_column_id_name + " integer primary key autoincrement," + const.db_column_name_name + " text," + const.db_column_from_name + " text," + const.db_column_to_name + " text," + const.db_column_days_name + " text," + const.db_column_sound_name + " text," + const.db_column_indicator_name + " text);"); log.w(tag, "database '" + const.db_table_name + "' created successfully!"); } public void onupgrade(sqlitedatabase db, int oldversion, int newversion) { } here vars :

Getting char* array from c++ stringstream ostringstream -

i trying copy ostringstream char* array , hoping can me understanding mistake lies. looked on forum, found things similar , unfortunately still unable property copy ostringstream char*. in short trying copy char* via: ostringstream bld bld<<"test"<<"is"<<"good" const char * result = bld.str().c_str(); the complete code reproduce error below. in code having 2 functions build strings via ostringstream. in makefilepath( ) function build complete file path (ie /path/file.txt ). in add() function, add 2 more char* arrays argument prefix /path/file.txt suffix . the problem unknown reason me fullfilepath changes prefix /path/file.txt suffix . last 3 lines of code exhibit that. i spent hours on this, thinking maybe referencing issue or else. however, none attemped worked. ideas how on problem? thanks!! #include <iostream> #include <sstream> #include <string> using std::cout; using std::endl; using

Javascript value to MySQL Select -

i have form select , options choose from. select option values brought asp classic loop. the second select filled javascript based on first select value has been made. sends value out by var newoption = document.createelement("option"); newoption.value = "2015"; newoption.innerhtml = "year"; s2.options.add(newoption); so want expand bring mysql recordset (without submitting yet) based on second select choice have been made set package = objconn.execute ("select * pack_plan idpack = "js.value??"") so want able receive value , select records it. , have no idea how done. appreciated. the following solution works fine me. since don't want reload page need make asynchronous request retrieve values of second select according choice user makes on first select. on page have form selects , few lines of javascript make asynchronous call. <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js&qu

c# - What is the behaviour of await inside of a Parallel.ForEach() loop? -

i have computationally intensive program attempting parallelize, 1 of limiting steps i/o operation controlled phenomenally inefficient api have no control on have no choice use. imperative parallelization not increase number of i/o operations, or benefit disappear. the layout this: have 2 classes, foo , bar , , in order calculate foo , involves no small quantity of calculations, must pass instance, or few instances, of bar import other file in extremely expensive i/o operation. require large number of both foo , bar instances , many of these bar instances used calculate more 1 foo instance. result, not want discard bar instances after calculate each foo , not want import them more once each. potentially of note, make matters more complicated api 32-bit, whereas program must 64-bit avoid memoryexception , handled locally hosted server communicate using wcf. here proposed solution, extremely new parallelization , in particular unsure of how await handled inside of foreac

asp.net - How to deny users and redirect to login page when they type the same url in web page -

after login enter librarianform. when copy url , paste in new tab it's showing page without login. want redirect users login page when copy , paste url. how that.can please explain it. thank you. asp.net has login mechanism can use. enable it, add below in web.config file. change loginurl attribute path of own login page. <configuration> <system.web> <authentication mode="forms"> <forms loginurl="~/login.aspx" timeout="28800" name="webappname" /> </authentication> </system.web> </configuration> to create asp.net authentication cookie need call formsauthentication.redirectfromloginpage can see below string username = ""; bool rememberme = true; // implement own login mechanism , if user authenticated // set username variable , make call below formsauthentication.redirectfromloginpage(username, rememberme); finally, logout user can c

c++ - Convert legacy MFC DAO application to use Access 2013 -

i have legacy application vc6.0 , upgrading vs2013. converted .mdb format .accdb access 2013, dao old it. i have been looking online for issue, can find things vb not apply mfc/c++. does know of guide use ? heard acedao can't find upgrade either. thanks. simply switch odbc . you'll have change cdaodatabase -> cdatabase , cdaorecordset -> crecordset , etc. there should no problems. api pretty same.

visual c++ - WinHttp doesn't download from Amazon S3 on WinXP -

recently amazon has disabled support of ssl s3 buckets , seems causes problems on win xp sp3. use code hsession = winhttpopen(l"mysession", winhttp_access_type_default_proxy, winhttp_no_proxy_name, winhttp_no_proxy_bypass, 0); if (bhttps) { dword flags = winhttp_flag_secure_protocol_tls1; winhttpsetoption(hsession, winhttp_option_secure_protocols, &flags, sizeof(flags)); } port = bhttps ? internet_default_https_port : internet_default_http_port; hconnect = winhttpconnect(hsession, srv_w, port, 0); hrequest = winhttpopenrequest(hconnect, vrb_w, adr_w, null, winhttp_no_referer, null, winhttp_flag_refresh | (bhttps ? winhttp_flag_secure : 0)); if (bhttps) { dword dwsecflag = security_flag_ignore_cert_cn_invalid | security_flag_ignore_cert_date_invalid | security_flag_ignore_unknown_ca | security_flag_ignore_cert_wrong_usa

Running PhantomJS with PHP server side -

i'm trying run phantomjs using php on linux web server. run cron job i'm running through php script uploading via ftp server. php script: $cmd = '/usr/local/bin/phantomjs /home/accountname/public_html/myscript.js'; $result = exec($cmd); var_dump($result); (note have changed account name in path above "accountname" privacy correct in real script - , copied myriad of other php scripts work perfectly.) myscript.js content: console.log('hello, world!'); phantom.exit(); the resulting output is: string(0) "" i have tried number of examples phantomjs website never output - either on screen, in console or examples create screenshots png files never appear in right place - though specifying exact paths. i did try returning phantomjs version , returned correct version: $cmd = '/usr/local/bin/phantomjs --version'; $result = exec($cmd); var_dump($result); returned: string(5) "1.9.2" i know "exec"

android - ListView Adapter: Unable to start activity ComponentInfo{..} : java.lang.NullPointerException -

i'm trying start new activity, , i'm getting nullpointerexception . i'm not quite sure getting nullpointerexception . during debug app crashes when creating adapter, can't see did wrong nullpointerexception in code. error log: java.lang.runtimeexception: unable start activity componentinfo{com.app.app/com.app.app.spaactivity}: java.lang.nullpointerexception @ android.app.activitythread.performlaunchactivity(activitythread.java:2394) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2446) @ android.app.activitythread.access$600(activitythread.java:165) @ android.app.activitythread$h.handlemessage(activitythread.java:1373) @ android.os.handler.dispatchmessage(handler.java:107) @ android.os.looper.loop(looper.java:194) @ android.app.activitythread.main(activitythread.java:5434) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(metho

ruby on rails - Understanding polymorphic associations the right way -

i've tried set polymorphic association in app, when test out, seem able retreive association 1 way: class event < activerecord::base has_many :category_associations, :as => :categorized end class categoryassociation < activerecord::base belongs_to :categorized, :polymorphic => true end now, in console, created categoryassociations (one being @ca ) , event ( @e ). do @ca.categorized = @e @ca.save my problem is, if load event , try @e.category_associations empty array ... when try loading @ca , @ca.categorized , event !! are polymorphic associations 1 way ? or missing ? thanks tadman questions, 1 asking me check ruby version, had quit console , restart it. didn't else association both ways ! i'm gonna try reproduce now, problem solved...

android - How to add button tint programmatically -

in new appcompat library, can tint button way: <button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/follow" android:id="@+id/button_follow" android:backgroundtint="@color/blue_100" /> how can set tint of button programmatically in code? i'm trying implement conditional coloring of button based on user input according documentation related method android:backgroundtint setbackgroundtintlist(colorstatelist list) update follow link know how create color state list resource. <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:color="#your_color_here" /> </selector> then load using setbackgroundtintlist(contextinstance.getresourc

MongoDB 3 (text search) or Elasticsearch? -

mongodb 3 offers text indexes ( http://docs.mongodb.org/manual/core/index-text/ ). question is, should use elasticsearch or mongodb 3 text index feature? best searching through lots of entries? 1 best performance (5 million+ entries) in 2015? i googled information, found out-dated answers. thanks lot! edit: use case searching titles, descriptions , profiles keywords. mongodb 3 capable of searching these things text index feature (as fast or close to) elasticsearch? depends on use case is. if want full text search capabilities finding document based on keywords, or finding product based on keywords may present in title, description, review or tags of product. if such use case elastic search thing go for. you may want evaluate lucene/ solr above use cases.

asp.net - Parsing in C#, or possibly a tweak to Global Group detector -

i'm trying run through list of global groups user belongs to, , determine whether or not belong specific group. i've got code found somewhere (possibly here) few minor tweaks: using system; using system.collections.generic; using system.directoryservices; using system.linq; using system.text; using system.web; using system.web.ui; using system.web.ui.webcontrols; namespace clientdpl { public partial class webformx : page { protected void page_load(object sender, eventargs e) { string strusername = system.web.httpcontext.current.user.identity.name; string username = strusername.substring(strusername.indexof('\\') + 1); string myglobalgroup = "l_wdjack127_wdc_ssis_user_ch"; list<string> usernestedmembership = new list<string>(); directoryentry domainconnection = new directoryentry(); // use query default domain //directoryentry domainconne

matlab - BSXFUN on memory efficiency with relational operations -

Image
there 2 things research on here - there 6 built-in relational operations use bsxfun : @eq (equal) , @ne (not-equal) , @lt (less-than) , @le (less-than or equal) , @gt (greater-than) , @ge (greater-than or equal) . lots of times use them on floating point numbers , being relational operations, output logical arrays. so, got me curious, if inherent expansion bsxfun when using these relational operations on floating point numbers involve actual replication of input elements , precisely first question. i know how memory efficiency issue translates anonymous functions when used bsxfun , again case of relational operations. this inspired runtime/speedup tests performed comparing bsxfun , repmat . introduction & test setup to perform memory tests inquire points raised in question, let's define inputs a , b : a = rand(m,n) b = rand(1,n) here, m , n size parameters , kept large numbers. i using repmat comparisons seems closest alternative bsxfun . so

javascript - PHP echo json_encode(); show the JSON in the page -

i have code: $route->get_view('index'); echo json_encode(["test"]); and in html: <!doctype html> <html> <head lang="en"> <meta charset="utf-8"> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> $(document).on("ready", function(){ $.ajax({ type:"post", url:"../app/routes.php" }).done(function(data){ console.log(data); }); }); </script> </head> <body> jhdjd </body> </html>

How do i setup magnific-popup -

i new please keep in mind before judging me. i having problems getting script work me. what did following: i built js builder on page magnific - popup i downloaded css file. i included scriptfile before /body tag i tried open popup with: <a class="popup-iframe mfp-iframe" href="index.php/9-uncategorised/230-contact">contact</a> i dont know missing here :( tried different classes, dont know were. any appreciated edit: nvm fixed me downloading other plugin (nonumbers modals) works me. fixed me downloading other plugin (nonumbers modals) works me.

playframework - SBT is installing dependencies from package.json -

i'm unsure if bug or have activated somehow. have play framework app doesn't running tests when have package.json file in root folder. runs fine when run app. have had no luck finding same kind of problem me. running test inside sbt runs fine when package.json not present . if package.json present, sbt begins install/download these dependencies /node_modules , corrupt installed npm modules. have reinstall afterwards npm modules working again. this error message multiple times in console. exception in thread "trireme async pool" java.security.accesscontrolexception: access denied ("java.io.filepermission" "/home/anders/vidme/node_modules/grunt-ts/node_modules/.bin/rimraf" "readlink") @ java.security.accesscontrolcontext.checkpermission(accesscontrolcontext.java:372) @ java.security.accesscontroller.checkpermission(accesscontroller.java:559) @ sun.nio.fs.unixfilesystemprovider.readsymboliclink(unixfilesystemprovider.java:48

python - The best way to mark (split?) dataset in each string -

i have dataset containing 485k strings (1.1 gb). each string contains 700 of chars featuring 250 variables (1-16 chars per variable), doesn't have splitmarks. lengths of each variable known. best way modify , mark data symbol , ? for example: have strings like: 0123456789012... 1234567890123... and array of lengths: 5,3,1,4,... should this: 01234,567,8,9012,... 12345,678,9,0123,... could me this? python or r-tools preferred me... pandas load using read_fwf : in [321]: t="""0123456789012...""" pd.read_fwf(io.stringio(t), widths=[5,3,1,4], header=none) out[321]: 0 1 2 3 0 1234 567 8 9012 this give dataframe allowing access each individual column whatever purpose require

javascript - Does the EcmaScript specification place any constraints on the process model used to implement the runtime? -

does ecmascript specification place constraints on process model used implement runtime? for example, event loop required on separate thread thread managing runtime communication operating system io subsystems? no, not specify those. runtime communication , io not part of language, come implementation-dependent exotic objects. the ecmascript specification not use term "event loop", though define jobs , job queues work similar. there no reason implement multiple threads, after all, js alone runs sequentially. in contrast, html5 spec define event loops , process model , there no requirement multithreading either.

java.lang.NoClassDefFoundError: org/hibernate/cache/spi/RegionFactory - When upgrading from spring 3 to spring 4 -

Image
i'm updating spring project 3.0.5 4.0.3. everything's building fine, @ boot time, when spring tries create beans, i'm hitting error message: the class of course not present in ehcache-core, hibernate-ehcache, or hibernate-core. in fact, package spi isn't present anywhere seems. however, i've checked maven dependencies, , seems spring 4.0.3 , hibernate 3.6.10 should compatible. in pom directly depend on hibernate-ehcache, in turn pulls in appropriate version of ehcache-core automatically(apparently done thing), this: my dependencies like: i've searched extensively error, can find couple of references it. given it's obscurity, i'm guessing it's configuration within project somewhere that's referencing regionfactory class, however, despite searching, can't find thing. any ideas how can project building spring 4.0.3?? i can provide additional data need. the key project building against spring 4.0.3.release. whatever versi

Android - How to get selected file name from the document -

i launching intent selecting documnets using following code. private void showfilechooser() { intent intent = new intent(intent.action_get_content); intent.settype("*/*"); intent.addcategory(intent.category_openable); try { startactivityforresult( intent.createchooser(intent, "select file upload"), 1); } catch (android.content.activitynotfoundexception ex) { // potentially direct user market dialog toast.maketext(this, "please install file manager.", toast.length_short).show(); } } in onactivity results when trying file path giving other number in place of file name. @override protected void onactivityresult(int requestcode, int resultcode, intent data) { switch (requestcode) { case 1: if (resultcode == result_ok) { // uri of selected file uri uri = data.getdata(); file myfile = new file(uri.tostring());

ember.js - Ember CLI + HTMLBars -- Passing Parameters to a Helper -

i'm trying pass parameter htmlbars template helper. as per documentation, i've created helper , explicitly registered helper: export default ember.htmlbars.makeboundhelper('is-foo', function(value, options) { console.log("value: "+value); }); but error "error: assertion failed: makeboundhelper generated helpers not support use blocks" so i've tried using ember.htmlbars.helper , ember.htmlbars.registerhelper suggested here errors "typeerror: ember.default.htmlbars.helper not function" if don't reigster helper explicitly: export default function(value, options) { console.log("value: "+value); }; then can pass parameter, doesn't resolved , logs out literal text of passed. so tried solution outlined here doesn't seem work cli the result want component dynamically selected based on value of parameter send helper. htmlbars code looks like: {{#each foo in model}} {{is-foo parameter}}

html - $.plot is not a function Jquery -

i tried add chart webpage. after fixing few errors still can't work. error $.plot not function.. i hope can me out? the wegpage is: http://linuxproject.be/index2.html login: blank pass: projectuc you can see chart @ bottom of page at http://linuxproject.be/index2.html . using http://cdn.jsdelivr.net/jquery.flot/0.8.3/jquery.flot.min.js fixed problem. solved

javascript - Meteor places meta charset tag not on top of head (Windows!) -

i using meteor on windows machine , have problem, cannot use utf-8 symbols in templates (öäüÖÄÜ). i saw question on stackoverflow once, but solution did not work me. this have in head in template: <!doctype html> <head> <meta charset="utf-8"> and being generated , in head: <!doctype html> <head> **script 1** **script 2** ... **script n** <meta charset="utf-8"> why meteor (or whatever responsible) pushing scripts top? because of charset not kick in. how can force meta tags put right behind opening head? the view people dealing same problem seem manipulate in meteor boilerplate files, paths linux. can't find files on windows machine. meta tag not in first 1024 bytes can help? alot!

java - JAIN SIP Unauthorized response -

i developing sip client using jain sip library in eclipse environment. i having trouble getting authorization. have implemented md5 challenge , added authorization second register function. the authorization credentials correct checked them available sip application. able register , make calls it. this code initialization , registration string username = "username"; string server = "10.99.00.00"; string password = "password"; string realm = null ; private string nonce = null; // objects used communicate jain sip api. sipfactory sipfactory; // used access sip api. sipstack sipstack; // sip stack. sipprovider sipprovider; // used send sip messages. messagefactory messagefactory; // used create sip message factory. headerfactory headerfactory; // used create sip headers. addressfactory addressfactory; // used create sip uris. listeningpoint listeningpoint; // sip listening ip address/port. properties properties