Posts

Showing posts from February, 2011

hadoop - Spark-shell with 'yarn-client' tries to load config from wrong location -

i'm trying launch bin/spark-shell , bin/pyspark laptop, connecting yarn cluster in yarn-client mode, , same error warn scriptbasedmapping: exception running /etc/hadoop/conf.cloudera.yarn1/topology.py 10.0.240.71 java.io.ioexception: cannot run program "/etc/hadoop/conf.cloudera.yarn1/topology.py" (in directory "/users/eugenezhulenev/projects/cloudera/spark"): error=2, no such file or directory spark trying run /etc/hadoop/conf.cloudera.yarn1/topology.py on laptop, not on worker node in yarn. this problem appeared after update spark 1.2.0 1.3.0 (cdh 5.4.2) the following steps temporarily work-around issue on cdh 5.4.4 cd ~ mkdir -p test-spark/ cd test-spark/ then copy files /etc/hadoop/conf.clouder.yarn1 1 worker node above (local) directory. , run spark-shell ~/test-spark/

SQL Regex for an Address -

i have address field populated like: flat 1 flat 2 flat 2a flat 3 as can see, entries numbers , others contain numbers , letters. sort them via numbers, letters - is, i'd ordered above. currently this: func1(regexp_substr(demiseunit, '^[0-9]+')) func2(regexp_substr(demiseunit, '[0-9]+$')) however, unfortunately causes flat 2a go bottom of list. appreciated. if have "flat ##aa" can order val(replace(demiseunit,"flat ","")), demiseunit

javascript - how to invalidate session on browser close button? -

this question has answer here: how clear httpsession, if user close browser in java 5 answers i using java web application jsp/servlet. if user closes browser without logging out specific page, session not invalidated automatically: login application go specific page , copy page url close browser open again browser , paste url have copied in 2nd step. result: user can access same url expected: user must not access url once browser closed. $(document).ready(function() { $(window).bind("beforeunload", function() { //post server , close sessions }); });

RDLC table issue -

Image
i using rdlc report, have 2 column , single row in table. both columns inside table header tag.on first page design looks perfect table extends next page first column content shifted left , portion got hide if further extend table next pages whole content shifted left , area looks blank there. refer picture: i unable reson behind plz me.

vba - DLL "'-t" gives Run-time error 424: Object Required -

i using simple timer tells me time elapsed between performing same calculation different data types. when run error: run-time error '424': object required the troublesome line: target_sheet.range("a2").value = -t here of code: public declare function gettickcount lib "kernel32.dll" () long sub function1_var_randnumcounter() dim var_randnum_x, var_randnum_y, count variant count = 1 count = 1000000 var_randnum_x = rnd(now) ' rnd vals based on now, built-in vba property var_randnum_y = rnd(now) next count target_sheet.range("a2").value = -t ' msgbox gettickcount - t, , "milliseconds" call function1_dec_randnumcounter end sub sub function1_dec_randnumcounter() dim count, var_randnum_x, dec_randnum_x, var_randnum_y, dec_randnum_y dec_randnum_x = cdec(var_randnum_x) dec_randnum_y = cdec(var_randnum_y) ' convert these vals decimals count = 1 count = 1000000 dec_randnum_x = rnd(now) '

c# - Convert Func<DerivedType, Object> to Func<BaseType, Object> -

what best way convert delegate takes first parameter of derived type 1 receives base type? mean is: func<derivedtype, object> original = ...; func<basetype, object> converted = something(original); casts, of course, not work, since these 2 different types. since want pass base type method takes derived type, need add cast. if know calls converted passing derivedtype , make straightforward wrapper, this: func<basetype,object> converted = b => original((derivedtype)b); demo.

javascript - Concurrency transitions in D3 (circle following filling path) -

i trying create simple animated gauge charts, red points on end of each circle. whole example in here https://jsfiddle.net/yhlch8fc/3/ (please not solve text position, it's not problem). tried search on stack overflow, tutorials change starting point of alongpath animation not helping me, because path translated x,y , rotated. thing key part of code is: circle.transition().duration(_duration) .attrtween('cx', arccirclex(_mypath.node())) .attrtween('cy', arccircley(_mypath.node())); you can easy switch similar version (code stack overflow above): circle.transition().duration(_duration) .attrtween('transformation', circletween(_mypath.node())); i don't know why, seems red circle goes left side. maybe it's because original path translated , rotated. (the original version was, when try follow filling path, not work either.) instead of rotating hover path , rotate g element contains both path , circle : enter.appen

c++ - Perfectly capturing a perfect forwarder (universal reference) in a lambda -

so have perfect forwarder, , want appropriately capture in lambda, such r-values copied in, , l-values captured reference. using std::forward doesn't job, evidenced code: #include<iostream> class testclass { public: testclass() = default; testclass( const testclass & other ) { std::cout << "copy c" << std::endl; } testclass & operator=(const testclass & other ) { std::cout << "copy a" << std::endl; } }; template< class t> void testfunc(t && t) { [test = std::forward<t>(t)](){}(); } int main() { testclass x; std::cout << "please no copy" << std::endl; testfunc(x); std::cout << "done" << std::endl; std::cout << "copy here" << std::endl; testfunc(testclass()); std::cout << "done" << std::endl; } compiling g++ -std=c++14 main.cpp produces output please no copy copy c

android - Custom Adapter:Row Inflated:findViewById returning null -

i making simple app reads json data , displays in listview. i've created custom adapter class named myadapter.java. inflate row findviewbyid returning null (pointed out in comment).i plan add more wigets row.xml testing have added textview. help? row.xml <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="6dp"> <textview android:id="@+id/tvnew_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textstyle="italic"/> </linearlayout> myadapter.java package com.test.rajat.contacts; import android.content.context; import android.util.log; import android.view.layoutinflater; import android.view.

JSP scriptlet expression not evaluated in AUI tag attribute -

this simple, i'm unable simple variable display task. i getting 1 dynamic value i'm assigning 1 variable. if try print variable value printing shown below, <%=columnname%> but when try assign same value in tag attribute, value not updated tag name. code shared below. <aui:input name="preferences--<%=columnname%>--" type="checkbox"/> issue:assume variable value 'screenname'. if print value <%=columnname%> printing value "screenname" on ui. bhen use same variable in name attribute showing value <%=columnname%> instead "screenname". note: preferable format name attribute prefix "preferences--" , suffix "--". please correct syntax , suggest me print variable value in tag attribute it seems cannot use mixed strings having string , scriptlet inside aui tags. http://www.liferay.com/community/forums/-/message_boards/message/16694386 can try below <% stri

c# - Is it possible to create a GUI control that can be accessed from two Threads? -

in order create little 2d game scratch, i'd create panel on winform , draw using graphics-object (btw, have use panel or draw form directly? know can this, disadvantages?). now want continously run 2 loops in different threads. 1 thread should primary assigned calculations , other 1 should primary draw panel. in cases however, both threads should able draw panel , problem occurs. know, error occurs if try access gui control not created specific thread. don't want use code if (control1.invokerequired) { control1.invoke(new methodinvoker(delegate { control1.text = string1; })); } because i'm not familiar option. there way create panel in way both threads can access or impossible? is there way create panel in way both threads can access or impossible? no. don't want that. there lot of history behind why in windows, short answer is, gui thread should doing of drawing , accessing of controls. btw, have use panel or draw form directly? know can t

php - Unable to get actual html in JSON result when accessing import.io API via cURL -

when access import api manually in browser copying api-url proper json result html fields have html results. however, when access same api url via curl php in following json result: {"name":"my_html","type":"html"} ..so without actual html. i use following function curl api in php: public function queryio($connectorguid,$url,$input,$userguid,$apikey) { $io_url = "https://api.import.io/store/data/".$connectorguid."/_query?input/webpage/url=".urlencode($url)."&_user=" . urlencode($userguid) . "&_apikey=".$apikey; $ch = curl_init(); $timeout = 5; curl_setopt($ch,curlopt_url,$io_url); curl_setopt($ch,curlopt_returntransfer,1); curl_setopt($ch,curlopt_connecttimeout,$timeout); $data = curl_exec($ch); curl_close($ch); return $data; } my question how can actual html? btw, works fine other fields text, date/time, etc. try removing curl_setopt($ch,

mysql - BIRT - org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot get the result set metadata -

Image
in birt, when try fetch records localhost, working fine. when try work remote connection getting error specified below: error : org.eclipse.birt.data.engine.odaconsumer.odadataexception: cannot result set metadata. org.eclipse.birt.report.data.oda.jdbc.jdbcexception: sql statement not return resultset object. sql error #1:table 'test.tblusers' doesn't exist ... 63 more caused by: com.mysql.jdbc.exceptions.mysqlsyntaxerrorexception: table 'testbms.tblusers' doesn't exist @ com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:936) @ com.mysql.jdbc.mysqlio.checkerrorpacket(mysqlio.java:2985) note: tablenames automatically changing capital letters , because of it. because client server linux , acting case sensitive. displays column names not records. click on finish, error specified in below images. reference image: as can see in above image, has populated table columns in second row is special configurations

google compute engine - kubernetes installation on coreOS -

i setting kubernetes on coreos, on gce. however, not going through due sdk dependency on python. downloaded python , tried installing it, looking c compiler. unfortunately couldn't one. this? below link following set https://github.com/rimusz/coreos-multi-node-k8s-gce/blob/master/readme.md you're better off using cloud-init file curls, installs , runs each binary kubernetes systemd unit. each like: - name: kube-apiserver.service command: start content: | [unit] description=kubernetes api server documentation=https://github.com/googlecloudplatform/kubernetes requires=etcd2.service setup-network-environment.service after=etcd2.service setup-network-environment.service [service] environmentfile=/etc/network-environment execstartpre=-/usr/bin/mkdir -p /opt/bin execstartpre=/usr/bin/curl -l -o /opt/bin/kube-apiserver -z /opt/bin/kube-apiserver https://storage.googleapis.com/kubernetes-release/release/v0.18.2/bin/linux/amd64/kube

javascript - Redirect to main page when comming from outside url angularJS -

i have angularjs routing: angular.module('diam8app', ['ngroute']) .config(['$routeprovider','$locationprovider', function($routeprovider,$locationprovider) { $routeprovider. when('/', { templateurl: 'main.html' }). when('/calculator/', { templateurl: 'calculator.html', controller: 'calculatorctrl' }). when('/contact/', { templateurl: 'contact.html', controller: 'contactctrl' }). otherwise({ redirectto: '/' }); $locationprovider.html5mode(true); }]) everything works fine, when i'm trying subpage directly url, example mydomain.com/contact , i'm recieving http 502 . think routing doesn't work, when accessing outside. so question is: there way redirect user main page, when comes different page (routing main must work works now)? perhaps .htaccess or other an

Android market api session login -

i got exception caused by: com.gc.android.market.api.loginexception: login request used username or password not recognized. marketsession market = new marketsession(); market.login(email,pwd); market.getcontext().setandroidid(androidid); string query = "maps"; appsrequest appsrequest = appsrequest.newbuilder().setquery(query) .setstartindex(0).setentriescount(10).setwithextendedinfo(true) .build(); market.append(appsrequest, new callback<appsresponse>() { @override public void onresult(responsecontext context, appsresponse response) { // code here // response.getapp(0).getcreator() ... // see appsresponse class definition more infos string crstring = response.getapp(0).getcreator(); log.i("tag", crstring); } }); i'm not sure, looks google deprecated logi

java - Compare two List<E> regardless of order -

i have 2 e type lists list list1, list list2. e object pojo class contains row of following data. both of lists contain same data. example @ last column if change false true cannot detect. | statusid | statusname | statusstate | isrequire | | 3 | approved | approved | false | | 201 | attributed | rejected | true | | 202 | denied | rejected | false | | 204 | fraud | rejected | false | | 205 | insufficient | rejected | false | | 206 | invalid | rejected | false | | 207 | cancelled | rejected | false | | 208 | cannot traced

html - Asp.Net application not supporting Non-Ascii characters correctly -

my .net application unable process of non ascii characters '§' etc when reading html page question mark comes in place of that.i have mentioned <globalization requestencoding="utf-8" responseencoding="utf-8"/> in web.config , saved files in utf-8 encoding still doesn't work. what reason?please help my guess you're missing tag in views: <meta http-equiv="content-type" content="text/html; charset=utf-8"> it doesn't matter if save html pages correctly utf-8, need specify within html client browser needs render text content utf-8.

ios - MBProgressHud.h file not found -

Image
i have download mbprogresshud.m , mbprogresshud.h file github , placed under folder classes->mbprogresshub->then both files now have include file under share extension import "mbprogresshud.h". when trying build app. giving me error. mbprogresshud.h not found. any idea how resolve this. i using ionic framwork , new ios , mac. error screenshot thanks do suggested pravin tate. if problem not solved, in addition : set target membership mbprogresshud bibliohiveshare you found target membership in mbprogresshud files remove files project. when add find window. select targets if added new target manually can change target file inspector @ right panel hope you.

java - Can I apply a Swing look and feel to AWT widgets? -

i'm developing on legacy java desktop application mixing swing , awt controls. can apply system , feel swing controls of course, can same awt ones? if not, can implement bridge in way? the basic answer "no". awt components backed native os components, either directly (via os supplied libraries) or indirectly (via awt based native components). it's possible awt linked "older" component libraries of components won't match current os "look , feel", using newer component libraries. in either case, can't effect how these components (and not through swing's , feel api). ok, might little hear say, the story of awt says "java's guitoolkit had use native widgets provided host window system, whether windows, motif, or mac. mimicking look-and-feel in java wasn't enough; had real native components."

powershell - Register-ObjectEvent Event Subscription Uptime -

we have data dump come external entity on daily basis. once receive file, object event listener triggers, moves file 2 separate locations (one live, 1 backup) , calls ms sql stored procedure import file database. the process , script seem function fine. file moves, , sql executed. however, every morning when check see if triggered, nothing triggered. check event-subscribers calling get-eventsubscriber , there no listeners registered. once register listeners , move file input location, runs fine. i understand event subscriptions not persist through reboots, how long stay open? possible closing them? or time out? $watchfolder = "\\server\c$\path\to\inbound\" $filter = "*.txt" $fsw = new-object io.filesystemwatcher $watchfolder, $filter -property @{ includesubdirectories = $false notifyfilter = [io.notifyfilters]'filename, lastwrite' } $oncreated = register-objectevent $fsw created -sourceidentifier filemonitor -action { $filepath = $ev

Laravel Allow Only registered users to read a html generated magazine (pdf) from FlippingBook -

in laravel want let registered user access , read html generated magazine in flipping book (it generates html/flash magazine ui), generates index.html . done route filter if view. since have generated code there way without rewriting code flipping book generated (maybe .htaccess) let registered users read magazines? , redirect not logged in main page? flipping book example magazine (also flipping book generates whole page not modal) any hint or appriciated thank you. on route, add middleware option auth. redirect people when tries access route hasn't logged in. route::get('magazine', ['uses' => 'somecontroller@somemethod', 'middleware' => 'auth']);

html - MultipleLines text Box -

Image
i need implement functionality shown in diagram(text area formatting capability). can point me in correct direction? note-as click on text area,this formatting tool comes automatically above. i trying below code: <asp:textbox id="textarea1" textmode="multiline" columns="50" rows="5" runat="server" /></div> or <textarea id="textarea2" runat="server" name="s1" columns="50"></textarea></p> any suggestion? the 2 wysiwyg rich text editors have stood test of time ckeditor , tinymce . for of projects, the difference between 2 should care editor offers feature set , appearance similar have in mind . the discussion 1 better other won't fruitful because both in own ways.

java - Hibernate why is creating n query instead of 1? -

hy want load jobseekers jobseeker table single query , criteria, , hibernate instead of writing 1 query write n query n jobseeker, , dont have idea why please help. jobseeker class: @entity @table(name="job_seeker") public class jobseeker extends baseentity{ @column(name = "name", length = 128, nullable = false) @expose private string name; @onetoone @joincolumn(name = "user_id") private user user; . . . this user class: @entity @table(name="user_auth") public class user extends baseentity { @column(name = "username", nullable = false, length = 64, unique = true) @size(max=64) @expose @notempty private string username; @column(name = "password", nullable = false, length = 64) @size(min=6,max=64) private string password; @onetoone(mappedby = "user", cascade=cascadetype.all) private usersettings usersettings; @onetoone(mappedby = "user", fetch = fetchtype.lazy, cascade=cascad

python - Plot ConvexHull in basemap -

i making convexhull in python, set of latitude , longitudinal positions. want plot points, alongside convexhull in basemap. works fine if plot them in normal plot without map,as follow instructions http://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.convexhull.html#scipy.spatial.convexhull . when try plot them basemap, regular plot. do wrong? import matplotlib.pyplot plt import numpy np mpl_toolkits.basemap import basemap map = basemap(projection='merc', resolution = 'c', area_thresh = 40, llcrnrlon=27.72, llcrnrlat=69.41, urcrnrlon=28.416, urcrnrlat=70.95) con = lite.connect(databasepath) con: cur = con.execute("select distinct latitude, longitude messagetype1 latitude>= 70.55 , latitude<= 70.7 , longitude >= 27.72 , longitude <= 28.416 limit 100 ") points = [[float(x[1]), float(x[0])] x in cur] points = np.array(points) hull = convexhull(points) x,y = map(points[:,0],

unit testing - PHPUnit mock concatenated function -

i writing test , wondering how mock next concatenated funciton call: $validator->errors()->all() i not need errors collection, want emmpty $this->logerror isn't called. is possible mock $validator->errors()->all() in 1 call ? something like validator::shouldreceive('errors()->all()') ->once() ->andreturn(array()); code: // class $validator = validator::make( ['participant' => $participant'], $programvalidator->getrules() ); if($validator->fails()) { foreach($validator->errors()->all() $error) { $this->logerror($record, $error); } // test validator::shouldreceive('make') ->once() ->andreturn(mockery::mock(array('fails' => true))); have tried: validator::shouldreceive('errors->all') ->once() ->andreturn(array()); this answer might rel

ios - Getting a string in textfield before a specific string in the textfield -

so textfield has following text. @"a big tomato red." i want word before "is". when type nsstring *somestring = [[textfield componentsseparatedbystring:@"is"]objectatindex:0]; i "a big tomato" instead of "tomato" . in app people type things before "is" need string before "is" . appreciate can get. *warning, this difficult problem. try this nsstring *str = @"a big tomato red"; nsarray *arr = [str componentsseparatedbystring:@" "]; int index = [arr indexofobject:@"is"]; if(index > 1) nsstring *str_tomato = arr[index-1]; else //"is" first word of sentence as per yvesleborg 's comment

sql server - Different ErrorCount in Windows xp and windows 7 -

i working delphi 7,bde components, , sql server. i have customer table columns no , name , age . not supposed update name in trigger have added check: if customer name has changed raise error. if try update name within sql server trigger throws error: msg ******, level 16, state 1, procedure showerror, line 1456 customer name can not changed. if want change please contact associate manager or whoever has authority. please not consider if not want change. msg 3609, level 16, state 1, line 1 transaction ended in trigger. batch has been aborted. now in delphi if try update name in customer table error handling code below. issue: when running under xp errorcount 3, under windows 7 4. showmessage() output: windows xp: 1) general sql error. 2) customer name can not changed. if want change please contact associate manager or whoever has autho. <-- autho displaying in second line here 3) the transaction ended in trigger. batch has been aborted. windows 7:

ajax - how to send value of a php variable in java script -

i getting post data docusign .to catch post data using file contents. after parsing want send backend ajax. how send value of php variable in java script. php code <?php //$postedxml = file_get_contents('php://input'); //$xml = simplexml_load_string($postedxml); //$xml[0]->envelopestatus->status; $foo = "completed"; echo " <script language='javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script> <script> jquery.ajax({type : 'post', url : 'xxxx.xx.xxxx', data:{content:'<?php print $foo; ?>'}, success : function(data,textstatus, jqxhr) { alert('you have succesfully sent agreement to'); }, error : function(errjqxhr, errtextstatus, errthrown) { } }); </script>" if send data getting this. want send

C++ - access variables on static void functions -

this callback-function (alog debugging) static void playereventcallbacka(void *clientdata, superpoweredadvancedaudioplayerevent event, void *value) { alog("###################### callback player a.... "); if (event == superpoweredadvancedaudioplayerevent_loadsuccess) { alog("###################### callback player a.... loaded"); superpoweredadvancedaudioplayer *playera = *((superpoweredadvancedaudioplayer **)clientdata); playera->setbpm(126.0f); playera->setfirstbeatms(353); playera->setposition(playera->firstbeatms, false, false); }; } i need set bpm here, have detected on other function in class. how can manage this? you cannot, since static function has no this parameter. can access static members, or send object of needed type static function.

jquery - Multi-level tab Panel with Bootstrap - adding class .active 2 first-subpanel -

i making multi-level panel page, based on bootstrap. structure fine, sub-panels active when parent panel active too. my code looks : <!-- nav tabs n1--> <div class="row"> <div class="col......."> <ul class="nav nav-tabs"> <li class="active"><a href="#1a" data-toggle="tab">a</a></li> <li><a href="#1b" data-toggle="tab">b</a></li> </ul> </div> </div> <!-- /.nav tabs n1--> <!-- content n1 --> <div class="tab-content"> <!-- tab content n1a --> <div class="tab-pane fade active in" id="1a"> <div class="row"> <div class="col...."> <!-- nav tabs n2 -->

php - Error Magento search module -

i have error after write text in searching string in magento frontend 1.9.0.1 mod_fcgid: stderr: php fatal error: require_once(): failed opening required '/var/www/vhosts/site.com/httpdocsapp/code/core/mage/catalogsearch/controllers/resultcontroller.php' (include_path='/var/www/vhosts/site.com/httpdocs/app/code/local:/var/www/vhosts/site.com/httpdocs/app/code/community:/var/www/vhosts/site.com/httpdocs/app/code/core:/var/www/vhosts/site.com/httpdocs/lib:.:') in /var/www/vhosts/site.com/httpdocs/app/code/local/smartwave/ajaxcatalog/controllers/catalogsearch/resultcontroller.php on line 5, referer: http ://site.com/search/ have know it? page /search have 404 error advanced search working good /site.com/httpdocsapp/code/ have /site.com/httpdocs/app/code/ check /var/www/vhosts/site.com/httpdocs/app/code/local/smartwave/ajaxcatalog/controllers/catalogsearch/resultcontroller.php on line 5 know defined path , add slash

asp.net - "SoapHttpRouter" editing the SoapRequest dynamically -

i stuck developing asp.net application. problem using soaphttprouter class , , method protected override uri processrequestmessage(soapenvelope message) has been overriden.but , want edit soapenvelope variable before sended destination, stuff editing headers or body in requests. know new values after querying information in sql once original soapenvelope received. want know if there way that, maybe using type of router or workaround. thanks in advance, awesome.

java - H2: getArray returns only one element -

i have following table: create table "mytable" ( ... "columns" array not null, ... ); i inserted elements in array manually via h2 web console: insert "mytable"(..."columns"...) values (...,'{''col1:uuid'',''col2:id'',''col3:firstname'',''col4:middlename'',''col5:lastname''}',...); now try array of elements java object[] colarray=(object[]) rs.getarray("columns").getarray(); system.out.println("test:"+colarray.length);//returns 1. columns in 1 string. what mistake? to insert column type array use following syntax: insert "mytable"("columns") values ( ( 'col1:uuid', 'col2:id', 'col3:firstname', 'col4:middlename', 'col5:lastname'

ruby - gitlab: invocation of gitlab-shell -

i have been going through code of gitlab-shell . unable understand how invoked. if made pull server(on gitlab-shell installed), how gitlab-shell knows it? bin/gitlab-shell has line comment: gitlab shell, invoked ~/.ssh/authorized_keys is there line in authorized_keys invokes gitlab-shell? (sounds unlikely).

java - How to break line after every record in 2D araylist? -

hello have input file like- item1;item2;item3 element1;emement2;element3 field1;field2;field3 i want add elements input file 2d araylist not able break record after every row. i coded like. public class reader{ list<list<string>> file_column = new arraylist<list<string>>(); list<string> file_row = new arraylist<string>(); string cust_inputfile = "c:/inputfile.txt"; bufferedreader cust_br = new bufferedreader(new filereader(cust_inputfile)); while ((cust_line = cust_br.readline()) != null){ file_row.addall(cust_line); file_column.add(cust_row); } system.out.println(file_column); } it gives following output- [[item1;item2;item3, element1;emement2;element3,field1;field2;field3]] and want output like- [[item1;item2;item3] [element1;emement2;element3] [field1;field2;field3]] please suggest necessary changes, in advance you need move declaration: list<string> file_row = new arraylist<strin

jquery - How can i access to object elements in javascript? -

i'am using jquery gantt api, , want access elements, don't know how. $(function() { "use strict"; //var obj = json.parse($(".gantt").gantt); $(".gantt").gantt({ source: [{ name: "sprint 0", desc: "analysis", values: [{ from: "/date(1320192000000)/", to: "/date(1322401600000)/", label: "requirement gathering", customclass: "ganttred" }] }], navigate: "scroll", scale: "weeks", maxscale: "months", minscale: "days", itemsperpage: 10, onitemclick: function(data) { alert("item clicked - show details"); }, onaddclick: function(dt, rowid) {

ios - Foundation - 5 iPhone 6 website being shown in desktop version -

i building website using foundation 5, when viewed on iphone 6 or 6+ shows desktop version , that's easy understand. however best way/best practice stick mobile view if (iphone 4 or 5)? if using foundation sass, go settings file , uncomment line in media query section reads: // $small-range: (0em, 40em) the iphone 6 screen 23.4383em x 41.688em, , iphone 6 plus screen 25.875em x 46.125em. if change $small-range go higher 46.125em should keep @ mobile view on iphones.

github - git delete remote branch not working: branch not found -

i trying delete remote branch in git, did: git branch -r ... origin/master origin/dev origin/branch_to_delete now try delete origin/branch_to_delete : git branch -d origin/branch_to_delete error: branch 'origin/branch_to_delete' not found i did: git fetch --all and tried again, same error. tried -d same error. but branch there, can see in github.com. do? according this post : deleting pretty simple task (despite feeling bit kludgy): git push origin :newfeature that delete newfeature branch on origin remote, you’ll still need delete branch locally git branch -d newfeature. so error got means don't have local copy of branch, can ignore it. delete remote copy: git push origin :branch_to_delete

Unable to start rails server after installing pg gem -

i having problem after installed pg gem postgresql using this: subst x: "c:\program files (x86)\postgresql\9.4" gem install pg -- --with-pg-dir=x: subst x: /d after when try 'rails s' command this $ rails s c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg- 0.18.2/lib/pg.rb:14:in ` require': cannot load such file -- 2.1/pg_ext (loaderror) c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.18.2/lib/ pg.rb:14:in `rescue in <top (required)>' c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.18.2/lib/ pg.rb:3:in `<top (required)>' c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:76:in `require' c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:76:in `block (2 levels) in require' c:/railsinstaller/ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.10.5 /lib/bundler/runtime.rb:72:in `eac

android - Take picture fails in dual camera mode -

i'm having issues when i'm in dual shot mode. i've got far: back camera mode - works perfectly front camera mode - works perfectly parallel camera mode (full preview + small window front preview) - works on devices support accessing both cameras @ same time (like samsung s4). the problem is: while having both previews display, call takepicture() method on both cameras. works on devices samsung s4 , htc m8, on lg g3 takepicture() on camera doesn't work. doesn't enter of callbacks. front picture taken correctly, camera isn't, , freezes , camera error 100, while front camera keeps working fine. i mention all above devices (s4, m8, , g3) support parallel cameras . problem @ g3 when want takepicture. i've tested on nexus 5 not support , i've implemented different approach works great (basically, take pictures 1 @ time).

Forcing Java lambda expressions to capture non-final variables in Java -

is possible have lambda expression capture variable not final? i know code work if capture them, have create new variable copies non-final variable want pass lambda expression. final someclass otherobj; for(int = 0; < 10; i++) { int = i; someobject.method(() -> otherobj.process(a, a+1)) } i'd pass in 'i' instead of having create new temporary variable. you can try java8, intstream.range(0, 10).foreach(i ->{ someobject.method(() -> otherobj.process(i, i+1)) });

javascript - Add "more results..." text to ui bootstrap typeahead -

i know possible set own template each row in ui bootstrap typeahead. cannot find way add "more results..." text @ end if available options more example 5. when there 5 or less options text shouldn't visible. is possible or have check lib? i had problem when using bootstrap tagsinput , typehead.js. , modified in bootstrap tagsinput js file in line 41. this.placeholdertext = element.hasattribute('placeholder') ? this.$element.attr('placeholder') : "more results...";

c - Stop execution of previous code STM32F4Discovery -

i have tried simple blinking led program on stm32f4 discovery board following this tutorial. however, not sure how stop running, i.e., when unplug device pc , plug in, expect reset (i might wrong too, please correct me if not case). the board keeps blinking led on connecting again. how reset original state? pointers references embedded programming helpful. if "original state" means program shipped board, can download @ st's website. you'll need program chip's flash stock binary. note programming board you're programming flash memory retain contents through power cycles.

java - How to use Spring + Hibernate query for join table -

i using spring mvc + hibernate + mysql running on tomcat intellij editor i want query hql mysql this select * customer c left join person p on p.idperson = c.idcustomer it's not working it's return error this http status 500 - request processing failed; nested exception org.hibernate.hql.internal.ast.querysyntaxexception: path expected join! [from com.springapp.mvc.model.customer c left join person p on p.idperson = c.idcustomer] here's database create table `customer` ( `idcustomer` int(11) not null auto_increment, `name` varchar(45) default null, primary key (`idcustomer`), constraint `customer person` foreign key (`idcustomer`) references `person` (`idperson`) on delete no action on update no action ) engine=innodb default charset=utf8; create table `person` ( `idperson` int(11) not null auto_increment, `country` varchar(45) default null, primary key (`idperson`) ) engine=innodb default charset=utf8; relationship onetoone customer

dependencies - Don't use later library version from transitive dependency in Gradle -

in android project use compile 'com.squareup.okhttp:okhttp:2.2.0' i need okhttp in version 2.2.0 code work properly. have problem when add compile('io.intercom.android:intercom-sdk:1.1.2@aar') { transitive = true } because inside intercom-sdk there okhttp dependency again later version: compile 'com.squareup.okhttp:okhttp:2.4.0' which results code uses later version 2.4.0 instead of 2.2.0 want. there please way how in module can use 2.2.0 specified , let intercom use 2.4.0? you can use this: compile('io.intercom.android:intercom-sdk:1.1.2@aar') { exclude group: 'com.squareup.okhttp', module: 'okhttp' } however pay attention. if library uses methods not present in 2.2.0 release, fail.