Posts

Showing posts from February, 2010

How to deploy talend esb route on talend karaf? -

i have created route in talend open studio esb. inside route start cxf service. works great when route running inside studio need deploy on esb runtime. i've exported *.kar file ~/runtime_esbse/container/deploy folder, , in karaf console, after executing osgi:list command can see route: [ 244] [active ] [created ] [ ] [ 80] tmp (0.1) i don't have errors in console logs assume route installed correctly service isn't started (or whole route isn't started @ all). cannot access service should created route. after executing start 244 (244 id of route) nothing happens when execute stop 244 route status changes active resolved (and after start changes active). know how make works? should force route behave inside open studio? advance. edit: i've checked features , looks ok. tmp-feature installed have no idea why doesn't work.

VBA: Dictionary items to string array? -

what trying straightforward. want list of items (values) in dictionary , , save them in array of strings. i'd guess code work: sub printfilters(byval crit dictionary) dim i() string = crit.items() ' stuff end sub however, getting type mismatch on third line. guessing crit.items() 's return value kind of list, not array. msdn pages not mention method's return value's type is, though. is there proper way this? i think variant type try this: sub printfilters(byval crit dictionary) dim variant = crit.items() ' stuff end sub

Android screen sharing using WebRTC -

i have heard screen sharing on desktop using webrtc. android, seems not have information. my question is: is possible use webrtc screen sharing on android?. mean can cast current screen other phone's screen. if 1 yes, how can achieve this? thanks. i'm author of catvision.io - screen sharing software android displays screen of mobile device in browser. explored use of webrtc route turned dead end, because not able deliver latency. lag in communication - due compression - long interactive user actions. switched more traditional vnc-type protocol.

jquery - a javascript function called without arguments -

i trying understand javascript code. banana.reloaduser being called inside function without arguments: function(data) { if (!data.result.success) { alert(data.result.message) } else { /*do something*/ banana.testdata = data; banana.reloaduser(); } } banana.reloaduser defined this: banana.extend({ reloaduser: function(cb, data) { var = this, done = function(d) { $.extend(that.user, d); if ($.isfunction(cb)) { cb(d) } that.trigger("user.reloaded", [d]) }; if (data) { done.apply(banana, [data]) } else { /*do something*/ } } }) 'reloaduser' being called save userinfo data in localstorage. whenever

Failed to run the Spark example locally on a macbook with error "Lost task 1.0 in stage 0.0" -

i installed spark , run "run-example sparkpi 10", , error message is: "spark-submit examples/src/main/python/pi.py 10" has similar error. 14/11/19 17:08:04 info executor: running task 2.0 in stage 0.0 (tid 2) 14/11/19 17:08:04 info executor: running task 3.0 in stage 0.0 (tid 3) 14/11/19 17:08:04 info executor: running task 1.0 in stage 0.0 (tid 1) 14/11/19 17:08:04 info executor: running task 0.0 in stage 0.0 (tid 0) 14/11/19 17:08:04 info executor: running task 5.0 in stage 0.0 (tid 5) 14/11/19 17:08:04 info executor: running task 6.0 in stage 0.0 (tid 6) 14/11/19 17:08:04 info executor: running task 4.0 in stage 0.0 (tid 4) 14/11/19 17:08:04 info executor: running task 7.0 in stage 0.0 (tid 7) 14/11/19 17:08:04 info executor: fetching http://192.168.1.80:57278/jars/spark-examples-1.1.0-hadoop2.4.0.jar timestamp 1416388083980 14/11/19 17:08:04 info utils: fetching http://192.168.1.80:57278/jars/spark-examples-1.1.0-hadoop2.4.0.jar /var/folders/6k/nww6s1p52yg

asp.net - Download XML string to text file c# -

i have xml string , need download string .xml file. working on asp.net web application. following code. protected void btndownloadxml_click(object sender, eventargs e) { try { string xmltext = divlogresults.innertext; xmldocument doc = new xmldocument(); doc.loadxml(xmltext); doc.save("myfilename.xml"); system.web.httpresponse response = system.web.httpcontext.current.response; response.clearcontent(); response.clear(); response.contenttype = "text/xml"; response.addheader("content-disposition", "attachment; filename=" + doc.name + ";"); response.flush(); response.end(); } catch(exception ex) { throw ex; } } but getting empty xml text on download named #document.xml. doing wrong. think confusing code. following code d

How do I send XML data in a post request? -

i'm using python , socket library see i'm sending. i know each line must end crlf. know length of body must sent in headers (with content-length). what don't know, if must send body string ended crlf, or several strings, each ended crlf. and, in last case, must include crlf in length of body ? the length of body should include characters, including cr , lf. if you're sending xml, don't agree each line must end crlf. sending pretty printed xml unnecessary. (that's humans; machines involved in transaction.) i'd remove of , send 1 long string. it's important encode if you're using http protocol. i'd wonder why if you're using raw sockets instead of http. xml on http understood.

jquery - Print Array in HighChart -

i facing problem printing array highcharts. var firstturnover =new array(); this array contains 100,345,212,444,121,111,65 values dynamically fetching server. have show them in series. series: [{ data: firstturnover }] this doesn't print on y axis. your array contains numbers of strings, need convert strings numbers firstturnover.map(function (el) { return +el }) // same little shorter // firstturnover.map(number) // or before push // firstturnover.push(+billerdetails1); example

angularjs - convert Javascript dot notated objects to array based style -

here's want: set value dependent on property key. key flat e.g. 'name' or object e.g. 'business.mobile' (nested). what's wrong: works fine flat keys, not nested properties. here's i've tried far: var prop = <a property>; var nestedkey; // e.g. business.mobile var value; // nested properties if ((prop.key).tostring().indexof('.') !== -1) { nestedkey = prop.key.split('.'); } else { // flat properties value = $scope.modalmodel[prop.key]; } $scope.formproperties.push({ name: prop.key, value: $scope.modalmodel[value || nestedkey[0]][nestedkey[1]], }); here have tiny conversion "array style". without conversion nested properties not accepted. use following process: create logic 1 level wrap logic in json.parse callback call json.stringify on data call json.parse on result of json.stringify

ios - How can I set alpha to the navbar but except children (Back button, title etc.)? -

i have set alpha navbar, , self.navigationcontroller.navigationbar.alpha = 0.2f; the problem buttons , title have alpha navbar. i understand problem don't know how fix it. could me? thanks you set navigation bar's background color [uicolor colorwithwhite:1 alpha:0.2]; or use [uicolor colorwithred:green:blue:alpha:]

asp.net - web.config variable declaration and use in javascript -

how define variable in web.config file , make use of same in javascript code? i made try assigning key value pair seems not working! you should pass variable web.config js file via code-behind. example, let's variable named my-variable . web.config should : <configuration> <appsettings> <add key="my-variable" value="my-value" /> </appsettings> </configuration> your aspx file can , send js : protected void page_load(object sender, eventargs e) { clientscriptmanager csm = page.clientscript; type cstype = this.gettype(); string myvariable = configurationmanager.appsettings["my-variable"].tostring(); // add script current page before end tag </form> csm.registerstartupscript(cstype, "initvariable", string.format("window.myvariable = '{0}';", myvariable, true); } and js, can use variable myvariable .

mysql - PHP Cannot redeclare function after file name changed -

i'm getting error fatal error: cannot redeclare getallstaff() (previously declared in /applications/xampp/xamppfiles/htdocs/stafftools/database/staffhandler.php:5) in /applications/xampp/xamppfiles/htdocs/stafftools/database/staffhandler.php on line 15 i'm building application in apatana studio 3 , renamed file staffhandler.php staffhandler.php (uppercase s) former no longer exists. i php files database directory using below php code foreach(glob("database/*.php") $filename) { include $filename; } and call method called getallstaff() here: <select name="staff"> <?php getallstaff(); ?> </select> obviously, method in staffhandler.php . working fine until changed filename of name. things i've tried clearing cache in firefox rebuilding & cleaning project in aptana changing filename staffhandler.php conditional function statemet if(!function_exists.... why on earth php thr

html - create a group of checkboxes with a click event associated Javascript -

i'm creating javascript function builds table checkboxes. want associate click event them. event must same all. this part of code: var = 0; (i = 0; < data.items.length; i++) { var tr = $(document.createelement('tr')); tr.addclass("mybookings_table_content"); $("#mybookings_table").append(tr); //create checkbox element var chkbox = document.createelement('input'); chkbox.type = "checkbox"; chkbox.id = "chk"+i.tostring(); chkbox.name = "chk" + i.tostring(); //event here } can me? since using jquery, can add event listener : $("#mybookings_table").on("click", "input[type=checkbox]", clickcb); function clickcb() { var $cbx = $(this); // code on checkbox } this code appended after loop, see fiddle : http://jsfiddle.net/6f79pd5y/

sonarqube - Sonar Ant task execution error -

i wrote ant sonar task when executing in console getting following error e:\liferay\liferay 6.2\workspace\plugins\build.xml:305: org.sonar.batch.bootstrapper.bootstrapexception: java.io.ioexception: server returned http response code: 400 url: http://localhost:9000/sonar/batch/ even have tried in ways following ant target <target name="sonar"> <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml"> <!-- update following line, or put "sonar-ant-task-*.jar" file in "$home/.ant/lib" folder --> <classpath path="d:\sonar-ant-task-1.3.jar" /> </taskdef> <property name="sonar.host.url" value="http://localhost:9000/sonar" /> <property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3306/sonar?useunicode=true&amp;characterencoding=utf

vb.net - Handling AD Error When Not Connected -

i'm using below code logge don user's logon name. works fine when connected network/domain. when offline, error on 3rd line: principalserverdownexception unhandled the server not contacted. private sub form1_load(sender object, e eventargs) handles mybase.load dim currentaduser system.directoryservices.accountmanagement.userprincipal currentaduser = system.directoryservices.accountmanagement.userprincipal.current dim displayname string = currentaduser.givenname & " " & currentaduser.surname label5.text = displayname label4.text = getuserproperties() end sub how can check, , return userful error user, such "not on network" or "not connected domain", exit? i've tried below, gives same error: private sub form1_load(sender object, e eventargs) handles mybase.load dim currentaduser system.directoryservices.accountmanagement.userprincipal if system.directoryservices.accountmanagement.userprincipal.cur

java - DB2 ERRORCODE 4499 SQLSTATE=58009 -

on our production application become weird error db2: caused by: com.ibm.websphere.ce.cm.staleconnectionexception: [jcc][t4][2055][11259][4.13.80] database manager not able accept new requests, has terminated requests in progress, or has terminated particular request due error or force interrupt. errorcode=-4499, sqlstate=58009 this occurs when hibernate tries select data 1 big table(more 6 milions records , 320 columns). observed when resultset lower 10 elements, hibernate selects successfully. our architecture: spring 4.0.3 hibernate 4.3.5 db2 v10 z/os websphere 7.0.0.31(with jdbc v9.7fp5) this select works when tried executed in data studio or when app started localy tomcat(connected production data source). suppose data source on websphere not corectly configured, tried modifications , without results. tried update jdbc driver not helped. become errorcode = -1244. ok, i'm looking ;). can provide additional information when needed. maybe fighted earlier p

php - Phalcon - add OR criteria to find() -

hope can help. i using find() follows $query = criteria::frominput($this->di, 'models\templates', $this->request->getpost()); $this->persistent->searchparams = $query->getparams(); $parameters = $this->persistent->searchparams; $templates= templates::find( $parameters, ); this gives me resulting set of templates based on parameters posted. what want able add these parameters or somehow. i.e find templates have criteria per post, or ones have field "global" set y i going run second query global templates , concatenate results set, surely there must way add or criteria? any gratefully received! martin $query = criteria::frominput($this->di, 'models\templates', $this->request->getpost()); //added below add additional or query criteria builder $query->orwhere("global = 'y'"); $this->persistent->searchparams = $query->getparams(); parameters = $this->p

php - jQuery updated values not getting new value -

i want make table inline editable through jquery. when press edit button table row become editable previous values showed in text fields. when enter new values , press save button not updated values , database remain unchanged. code previous values show in editable table row is: var nam =$("#name_"+id).html(); code make table row editable is: $("#name_"+id).html("<input type='text' name='name' id='name_"+id+"' value='"+nam+"'>"); code updated values: var nm = $('#name_'+id+'').text(); ajax request update database: url: "inlineupdate.php?id="+id+"name="+nm, point #1:: id correction "name_"+id pointing 2 elements @ same time, <input> , table row contains <input> . input id, instead of using "name_"+id twice, must use other id. eg. "name_"+id+"_editable" , use update value. poi

android - Best way to bundle ~55MB of audio with app -

i have app developing needs include 55mb of audio (mp3s) these short files , 1000 in total. bundling these in apps assets makes compiled apkabout 60mb. i want upload app play store of cause big it. questions is, before start working on using apk expansion file system there anyway compress audio files apk fits in under 50mb limit? the audios current bit rate 128kbps i guess better if can make player stream audio internet youtube android application play video files on android phone. additionally can give option user select save audio next time play without internet download. i think question , +1 me

c# - Issue with serverside filtering datetime kendo ui -

i have problem serverside filtering of datetimes datasourcerequest.. i have grid in showprocesses.cshtml. construct kendo ui grid through javascript. turned serverfiltering , serversorting on. looks (i kicked don't need see/know): $("#processgrid").kendogrid({ sortable: true, pageable: true, selectable: true, filterable: { extra: false }, datasource: { type: "aspnetmvc-ajax", transport: { read: { url: "/home/getprocesses", cache: false, type: "post", datatype: "json" }, parametermap: function (data) { return $.extend({}, data, { sort: data.sort, filter: data.filter }); } },

vb.net - LinqToSql: ExecuteQuery an ExecuteQuery-result? -

i use code customers database... dim customerresult = db.executequery(of view_customers)("select * topl_customers").tolist now have customers fetched database, want run "filter" query against customerresult - how do that? was hoping this... dim filterresult = customerresult.executequery(of view_customers)("select * active=1").tolist any suggestions? don't want query database twice. i need use string search query because it's dynamic. thanks try this: var filteredresult = in customerresult //add suitable filter condition based on column values a.active == 1 select a;

xslt - Store XML fragment into attribute as string using XSL -

i store fragment of xml attribute using xsl. example have following xml <a> <b> <c>test1</c> <c>test2</c> </b> </a> and have result (of cours xml in attribute should escaped properly): <a attr="<b><c>test1</c><c>test2</c></b>"/> is possible using xsl? with xslt 3.0 there function serialize-xml , in earlier versions can import module http://lenzconsulting.com/xml-to-string/ , code <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> <xsl:import href="xml-to-string.xsl"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="a"> <xsl:copy> <xsl:attribute name="attr"> <xsl:apply-templates mode="xml-to-string"/> </xsl:attribute> </xsl:copy>

sql - Hive: substract one table from another? -

in hive have 2 tables: 'old_books' title string, author string, year int, outofprint boolean; and 'new_books' title string, author string, year int; by mistake created these tables have put new titles 'old_books' table. is possible substract records exist in both tables 'old-books' table means of hive only? so far have manged select books exist in both tables hive request: select old_books.* old_books join new_books on (old_books.title=new_books.title); how substruct result of request 'old_books' ? assuming have hive 01.3 version or later, can use not exists clause: select * old_books not exists ( select 1 old_books b join new_books c on (b.title=c.title) a.book_id = b.book_id); here reference: https://cwiki.apache.org/confluence/display/hive/languagemanual+subqueries

java - Separating a char from a String? -

i trying separate char following examples of inputs: c450.00 c30 p100 i have char such "c" or "p" separated can work them alone, "450.00", "30", , "100" separated ints. easiest way this? you can split string whitespace delimiter. afterwards use substring on every part of string. have c , 450.0 stings. cast second part of substring integer , done. to split: string[] parts = string.split(" "); to substring: string first = parts[0].substring(0, 1); string second = parts[0].substring(1);

format - Python - convert to string with formatter as parameter -

i trying write function takes 2 arguments: an object a formatter string (as specified in docs) which returns formatted string: tried sort of: def my_formatter(x, form): return str(x).format(form) what expecting is: s = my_formatter(5, "%2f") # s = 05 t = my_formatter(5, "%.2") # t = 5.00 etc... the format function unfortunately not work that. ideas? for style of formatting you'd have use string % values string formatting operation : def my_formatter(x, form): return form % x you'd have alter format; 05 you'd have use "%02d" , not "%2f" . you getting confused str.format() method , uses different formatting syntax, and got arguments swapped; you'd use form.format(x) instead. you want built-in format() function here; syntax different, offers more features: >>> format(5, '02d') '05' >>> format(5, '.2f') '5.00' that's pretty c

android - Can't publish on Google Play Store -

i have finished , signed apk through android studio, have did signed apk. when trying upload apk play store got error " uploaded apk not zip aligned. need run zip align tool on apk , upload again. try cross check didn't uploaded debug version cross check following link. http://developer.android.com/tools/publishing/app-signing.html#releasecompile

api - Should I make a service for shared Docker dependencies? -

i have 3 different services uses graphicsmagick dependency , i'm starting docker. i'm wondering, should make separate light api graphicsmagick (maybe using php) , put in separate docker container? since graphicsmagick executable. or slow , best way install graphicsmagick dependency each service container? thanks! as mentioned in comments , original question, there 2 approaches here. 1 install graphicsmagick in base image or in individual service images. other build separate service (a sort of worker or image manipulation api of sorts) specific graphicsmagick. guess answer depend on pros , cons important right now. graphicsmagick in base image has advantages easy implement. don't have build extra. graphicsmagick binary shouldn't hassle install , adds couple mb size end resulting images. building separate api service image graphicsmagick has overhead of development time , service complexity. you'd need implement sort of service discovery model oth

html - Applying CSS to img-tag-embedded SVG images -

on page i'm using img tag embed svg images. wanted apply css onto them. works long copypaste svg source code directly page. however, if embed them using img src attribute, doesn't. is there way make work? <style type="text/css"> path:hover { fill:white; } </style> <img src="my.svg" /> thanks in advance! well can achieved through jquery ( work around ) , jquery function convert <img> tag hold current svg image <svg> inline tags, can view in browser debugger.in short mimic if directly inserted svg image. <script type="text/javascript"> $(document).ready(function() { $('#img').each(function(){ var img = $(this); var image_uri = img.attr('src'); $.get(image_uri, function(data) { var svg = $(data).find('svg'); svg.removeattr('xmlns:a'); img.replacewit

android - Button Background Image change on click -

i have button begins life "unticked" text going label says "no". when push button changes image "ticked" , displays text in label "yes". works perfectly. can't or find how change "unticked" , "no" if push again? here code button: view.onclicklistener imgbuttonhandler9 = new view.onclicklistener() { public void onclick(view v) { button9.setbackgroundresource(r.drawable.androidnearmisson); textview text = (textview) findviewbyid(r.id.textview2); text.settext("yes"); } }; any appreciated. many thanks you can textview's current text , make comparison. if yes, change no, else vice verse: view.onclicklistener imgbuttonhandler9 = new view.onclicklistener() { public void onclick(view v) { textview text = (textview) findviewbyid(r.id.textview2); if(text.gettext().tostring().equals("no")){ butto

c# - could not load file or assembly 'microsoft.windowsazure.storage.emulator.controller -

(i'm working azure sdk 2.2) when open server explorer - azure - storage - development gives me following error "could not load file or assembly 'microsoft.windowsazure.storage.emulator.controller...'" everything else works perfectly. what's wrong? how can fix it?

uri - Apache Camel SFTP file download from specific directory -

i used ftp component of camel not download files want. <camel:endpoint id="ftpnotificationdownload" uri="sftp:/11.1.1.1://app/as?username=aa&amp;password=1111&amp;fastexistscheck=true&amp;localworkdirectory=c:\\asd&amp;download=true&amp;throwexceptiononconnectfailed=true&amp;delay=4000&amp;usefixeddelay=true"/> i want files , folders downloaded under local folder did not put filename option. when give host name 11.1.1.1 , works when set directory after host name 11.1.1.1:/app/directory , not work. i have checked sftp server , up. there should not colon ( : ) after host name in uri . , not 1 of 2 slashes. on other hand, missing 1 slash after sftp: . see apache camels uris syntax . sftp://[username@]hostname[:port]/directoryname[?options] try sftp://11.1.1.1/app/as?... note true uri, not camel.

C# winforms listbox can't get the right value -

with listbox called lbcustomers, have following: datatable customers = getallcustomers(); lbcustomers.datasource = customers; lbcustomers.displaymember = "lastname"; lbcustomers.valuemember = "cell"; the last names displayed. using following during event, getting second list box filled "system.data.datarowview" if (lbcustomers.selecteditems.count > 0) { (int = 0; < lbcustomers.selecteditems.count; i++) { if (!listbox2.items.contains(lbcustomers.selecteditems[i])) { listbox2.items.add(lbcustomers.selecteditems[i]); } } } i have multiple sources of data coming listbox2, want "cell" value selected lbcustomer items.

jquery - Sorting elements based on condition -

html: <div class="album"> <div class="listing"> <a href="#" class="btn hidden">button</a> </div> <div class="listing"> <a href="#" class="btn">button</a> </div> </div> pseudo code: in each album each listing hidden = find ('.btn.hidden') remove , append (move) hidden bottom i'm not sure how remove elements , append? can try like: $('.album').each(function(){ $(this).append( $(this).find('.listing').has('.btn.hidden') ); }); append() automatically remove demo

ios - Stopping an UIView animation that was started but being delayed -

this question has answer here: how cancel uiview block-based animation? 3 answers [uiview animatewithduration:1 delay:4 options:(uiviewanimationoptionallowuserinteraction | uiviewanimationoptioncurveeasein) animations:^ { // here (irrelevant) } completion:nil ]; how stop animation within time of delay? example, want stop animation after execute before delay timer ends. i've tried [self.view.layer removeallanimations]; no avail. edit: i've stated. i've tried [self.view.layer removeallanimations]; no avail. i didn't try can stop animations [view.layer removeallanimations]; should work.

c# - Select from array only the best items -

i strugling come linq statement want select items in array have highest version. given array of apps, example: [{name="adobe", version=1}, {name="adobe", version=2}, {name="adobe", version=3}, {name="vlc", version=1}, {name="vlc", version=2}, {name="vlc", version=3}] i need linq select 1 adobe app, 1 highest version, , 1 vlc app. result should like: [{name="adobe", version=3}, {name="vlc", version=3}] the best got far is: var names = apps.select((n => n.name)).distinct(); foreach (var name in names) { var latest = apps.where(n => n.name == name).orderbydescending(n => n.version).firstordefault(); //add latest new applist } i keep on thinking whether there simpler, linq way this. suggestions? thank you. here simpler approach: var latest = apps.groupby(i => i.name) .select(i => i.orderbydescending(j => j.version).first());

Xpages: Code a new page button so that I can repopulate some fields in new Xpage -

this seems should easy cannot done. i have xpage called location. there 2 general types, , b. have series of views , b. same except value of 1 field. in views want "new location" button automatically populate type or b, depending on whether user in 1 of views or b views. seems set scoped variable , check on document creation, doesn't seem work. best practice this? jesse gallagher's frostillicus framework on openntf (xpages scaffolding - http://openntf.org/main.nsf/project.xsp?r=project/xpages%20scaffolding&sessionid=dn6qbbfgeb ) includes flashscopes, give facility pass information 1 page , cleared when page loaded.

sql server - SQL Azure Friendly Database Versioning Idea -

i have number of identical sql azure databases clients need have versions tracked. sql azure in november of 2014 not support extended properties far know, if did extended properties tracking versioning changes done here: http://wateroxconsulting.com/archives/versioning-in-your-sql-database# i thinking of adapting concept making ddl trigger altered stored procedure held nothing versioning comments. so question strategy - stored procedure best place keep kind of info, or there better place store textual versioning info in sql azure container? not want add table each database because dilute purpose of db , leaves room antics , need own care , feeding of table structure , etc. and follow-up question tactics - best way alter procedure in tsql doing string manipulation append comment text? thanks. you seem asking how store some data in stored procedure, odd, because sql server fantastic tool storing data, not in stored procedures. i'd better strategy create simp

Eclipse: Java was started but returned error code=13 -

Image
this question has answer here: cannot run eclipse; jvm terminated. exit code=13 31 answers i updated java 1.8 u25, , message every time try open eclipse i have no clue i'm doing wrong, when comes eclipse. have re-downloaded number of times still cannot work. how fix this? this eclipse.ini file -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326 -product org.eclipse.epp.package.standard.product --launcher.defaultaction openfile --launcher.xxmaxpermsize 256m -showsplash org.eclipse.platform --launcher.xxmaxpermsize 256m --launcher.defaultaction openfile -vm c:\program files (x86)\java\jdk1.8.0_25\jre\bin --launcher.appendvmargs -vmargs -dosgi.requiredjavaversion=1.8 -xms40m -xmx512m this error occurs because eclipse version 64-bit. s

java - Interact with bundle in Apache Felix -

i made program offers cli can type number , calculate square root of number typed. built bundle starting simple application , installed on apache felix. problem can't interact (insert number in gogo shell) when launched in felix. has idea on how solve or work-around works? thanks! you can create listener on port. client interact application using telnet.

ios - Implement button dragging with momentum? -

i've managed implement draggable button in objective-c iphone app using code shown @ link: http://www.cocoanetics.com/2010/11/draggable-buttons-labels/ i wondering if library exists implement dragging momentum? if user moved button , let go, continue move little while, depending on drag coefficient. i searched library, googled "ios button momentum" came empty... if have support ios 6 you can animate change button's center when pan gesture ends: if(pangesturerecognizer.state == uigesturerecognizerstatedended) { finalvelocty.x = velocity.x; finalyvelocity.y = velocity.y; nstimeinterval animationtime = 0.25; //adjust time needs [uiview animatewithduration:0.25 animations:^{ button.center = ... // calculate button's 'final' center (depending on velocity?) } completion:nil]; } for ios 7 or newer apple's introduced uikit dynamics framework (consisting of uidynamicanimator , uidynamicitembehavior subclasse

Converting PHP function to C# -

i've finished converting php script c# 1 use in asp.net. i've converted match the correct result far:- function sign_url($url, $key, $secret) { if (strpos($url,'?') !== false) { $url .= "&"; } else { $url .= "?"; } $url .= "applicationkey=" . $key; $signature = hash_hmac("sha1", urldecode($url), $secret); $url .= "&signature=" . hex_to_base64($signature); return $url; } here part i'm struggling with:- function hex_to_base64($hex){ $return = ''; foreach(str_split($hex, 2) $pair){ $return .= chr(hexdec($pair)); } return base64_encode($return); } from can gather splits input string ($hex) sets of 2 characters. converts these hexadecimal strings decimal numbers before getting chr() value of number. storing these conversions in $return string. base 64 conversion. i'm struggling find best way in c#, particularly spl

Android start external intent action then reopen your app -

i start partner (external) app (with custom intent action) : intent = new intent("com.myapp.action.my_action"); i.putextra("param1", "value1"); ... startactivity(i); the partner app launched , action performed. problem when re-opening app (after pressing home button example), view displayed partner app , have press device button go app. there way stay in app when re-opening it? thanks of course. launch partner app new task. if user returns application (via home key press or list of recent tasks), app appear, not partner app: intent = new intent("com.myapp.action.my_action"); i.addflags(intent.flag_activity_new_task); i.putextra("param1", "value1"); ... startactivity(i);

objective c - How can I access a table view delegate methods of one controller from another ios -

here issue. we have pageview controller creates view view controller has tableview in it. after view created click on cell of tableview run function. note tableview:didselectrowatindex not working. i have put delegate table view second 1 need create header , footer table. tried putting tableview:didselectrowatindex in view controller didn't work. then thought of including tapgesture each of cell need show details based on parameter both controllers. hope in this did conform table protocols of uitableviewdelegate , uitableviewdatasource ?

java - Spring OAuth2 Generate Access Token per request to the Token Endpoint -

is possible generate multiple valid access tokens using client_credentials or password grant type per request? generating token using above grant types gives new token when current 1 expires per request. i can use password grant type generate refresh token , generate multiple access tokens, doing invalidate previous access tokens. any idea how change allow access token generated per request /oauth/token endpoint , insure previous tokens not invalidated? below xml configuration of oauth server. <!-- oauth2 config start--> <sec:http pattern="/test/oauth/token" create-session="never" authentication-manager-ref="authenticationmanager" > <sec:intercept-url pattern="/test/oauth/token" access="is_authenticated_fully" /> <sec:anonymous enabled="false" /> <sec:http-basic entry-point-ref="clientauthenticationentrypoint"/> <sec:cust

asp.net - Where do I put WHERE command on complex sql command -

database admin sent me sql command asp.net project. it's hard understand me. command: select to_char(firstdate, 'yyyymmdd') expr1, sum(single) singlefile, sum(sum) allfiles round(sum(singlesize) / (1024 * 1024 * 1024), 2) singlesize, round(sum(sumsize)/(1024 * 1024 * 1024), 2) sumsize (select file, min(date) firstdate, 1 single, count(*) sum, max(size) singlesize, sum(size) sumsize inetisle.xferlog group file) derivedtbl_1 group char(firstdate,'yyyymmdd') order 1 output this: expr1 singlefile sumfile singlesize sumsize 19.11.2014 123123 13423 12312423 23424132 i need link expr1(date) calendar. asp.net calendar control added this: where ([expr1] = ?) where put on complex sql command? i need select 1 day select on calendar. select to_char(ilktarih, 'yyyymmdd') expr1, sum(toplam) toplamdosya, round(sum(tekilboyut) / (1024 * 1024 * 1024), 2) te

linux - Command to list word completions -

i once found built-in command take prefix argument , return words complete word. example, >> command cali california calibrate calibration ........ of course list lot more words, in alphanumerical order. useful, , optionally took file other default in. i'm not trying produce behavior: there million ways use grep , sed , awk , perl , or insert turing-complete language here this. i'm looking command. unfortunately it's hard google when don't remember name, while might not have been posix standard common linux utility, know called? found it: it's called look , , seems have been around unix since v7. (the man page dated 1993!) it binary search on optional second argument find matches, defaulting /usr/share/dict/words .

solution - After installing/upgrading to Kentico 8.1, why are certain built-in files excluded from the project? -

the kentico 8.1 installer plops out proprietary kentico solution structure 11,700+ files , 1,900+ folders, , 3 .csproj projects files overlap in same directory structure. noticed few files aren't included in of 3 projects: \app_themes\default\bootstrap\close.less \app_themes\default\cmscomponents\mass-actions.less \cmsadmincontrols\ckeditor\plugins\cmsplugins\images\insertimageattachment.png \cmsadmincontrols\ckeditor\plugins\enterkey\samples\enterkey.html \cmsadmincontrols\ckeditor\plugins\htmlwriter\samples\assets\outputforflash.html \cmsadmincontrols\ckeditor\plugins\htmlwriter\samples\assets\outputforhtml.html \cmsadmincontrols\ckeditor\plugins\htmlwriter\samples\assets\outputforflash\outputforflash.fla \cmsadmincontrols\ckeditor\plugins\htmlwriter\samples\assets\outputforflash\outputforflash.swf \cmsadmincontrols\ckeditor\plugins\htmlwriter\samples\assets\outputforflash\swfobject.js \cmsadmincontrols\ckeditor\plugins\sharedspace\samples\sharedspace.html \cmsa

adding variables in netcdf4 fortran 77 -

i'm trying save outputs of model (written in fortran 77) in netcdf4 format. i'm using gfortran. since i'm fresher in fortran, wrote simple code in create dummy variables , add test netcdf file emulating dimensions,variables , attributes of model. works perfectly. i proceeded next step knowing code works. well, thing same code not work , cannot find out why. model code old , "organized" in 1 single .for file. interestingly enough, main code written subroutine. basic structure of program is: implicit real*8(a-h,o-z) character dummy*80 ... call main(delt,npl) end subroutine main(delt, npl) *variable declarations* ... end my approach create netcdf file outside "main" subroutine. works , netcdf file created. inside "main" define dimensions , variable (since they're based on data generated inside subroutine). code works charm when add dimensions: setting dimensions nc_status = nf_def_dim(ncid,'par

Using multiple types or indexes in Elasticsearch php API -

i want query multiple types , indices using elasticsearch php api . don't know how. should pass array of types , indices $params ? : $params['index'] = $index;//array of indices $params['type'] = $types;//array of types $params['body'] = $q;//query body //request elasticsearch matched documents $results = $client->search($params); you add them string $params : $params['index'] = "index1,index2";//array of indices $params['type'] = "type1,type2";//array of types $params['body'] = $q;//query body //request elasticsearch matched documents $results = $client->search($params);

Adding and getting another new textbox if select dropdown in HTML PHP -

current code snippets html <form action="" method="post"> <select name="particulars"> <option value="username">username</option> <option value="email">email</option> <option value="address">address</option> </select> <input type="submit" name="submit" value="get selected values" /> </form> php <?php if(isset($_post['submit'])){ $selected_val = $_post['particulars']; // storing selected value in variable echo $selected_val; // displaying selected value } so example, if select username, want new text box come out can type in value inside , submit, there way can it? able echo out value, not brand new text box. sorry, english not first language, thank much! :) i keep updating , showing i've done here. i suggest use js. in html <form action="test.php" method="post&qu

python - Why is my Conway's Game of Life program not working properly? -

i came across john conway's game of life , decided code in python. did, doesn't work should. for example, have 3 live cells in row horizontally. if working correctly, oscillate 3 live cells in row 3 live cells in column, not that. my current code this: # ("o" == dead cell, "x" == live cell) # generation 1: ooo xxx ooo # generation 2: ooo ooo ooo what should this: # (o == dead cell, x == live cell) # generation 1: ooo xxx ooo # generation 2: oxo oxo oxo i not know in area code gremlin lives posted whole code below. import os import time # rules of life # 1. live cell less 2 live neighbours dies, if caused under-population. # 2. live cell 2 or 3 live neighbours lives on next generation. # 3. live cell more 3 live neighbours dies, if overcrowding. # 4. dead cell 3 live neighbours becomes live cell, if reproduction. def seed(): board[12][11] = "x" board[12][12] = "x" board[12][13] = "x"

datetime - Should a time within the end of DST hour be considered Winter or Summer time? -

as know, when ever our clocks go 1h (as did on 29oct @ 2:00 in countries) ending dst period, every timestamp between 1:00 , 2:00 'occurs' twice. how should application working future events handle this? for example user creates future event , specifies take place on 29oct @ 1:35. , let's assume standard local time utc+3 , dst utc+4 how should application convert time utc? should time considered first instance (before end of dst, makes 21:35 utc) or second instance (after end of dst, i.e. 22:35 utc)? only can decide that. largely based on context. in many cases, right thing choose first of 2 occurrences - daylight time. in example, run @ 1:35 in utc+4. you need consider spring-forward transition. recurring task falls gap should usually displaced amount equal dst bias (which 1 hour). example, if clock jumps 1:59:59.999 3:00, task scheduled run @ 2:30 run @ 3:30 on day. again, can decide right behavior application. applications may need fall e

read textfile in Matlab -

i quite stuck matlab problem here.. have *.txt file looks this: 1 2 2 x50 2 2 2 x79 which means @ coordinates (1,2,2) f(x)-value 50 , @ coordinates (2,2,2) f(x)-value 79. trying read matlab have vector (or using repmat meshgrid-like matrix) x , 1 y. not need z since not change on process. want read in f(x)-value can plot whole thing using surf(). if use [a] = textread('test.txt','%s') it gives me whole thing... can give me idea please? thinking putting thing in loop, pseudocode i=1 50 xpos = read first line ypos =read next line zpos = read next line (or ignore.. however..) functionvalue= read next line end any hints? thanks assuming data setup in text file lines 1,2,3 xyz coordinate points , next line (fourth line) function value. 5,6,7 next set of xyz coordinate points followed function value on 8th line set , on such repeating format, see if works - %// read data text file text_data = textread(inputfile