Posts

Showing posts from February, 2013

html - Openweathermaps parse json jquery forecast -

i'd display weather forecast. far managed display 1 day. html & jquery code: http://pastebin.com/cpz0pe7g the json displayed in format. { "cod":"200", "message":0.0152, "city":{ "id":524901, "name":"moscow", "coord":{ "lon":37.615555, "lat":55.75222 }, "country":"ru", "population":1000000 }, "cnt":4, "list":[ { "dt":1375866000, "temp":{ "day":26.19, "min":21.82, "max":26.19, "night":21.82, "eve":25.22, "morn":26.19 }, "pressure":1010.53, "humidity":77, "weather":[ { "id":80

"fatal: ref HEAD is not a symbolic ref" during interactive git rebase -

got 3 commits - 1 proper, , 2 silly cleanup ones, typos etc. want squash them. fire away: git rebase -i head~3 sounds simple, , should work - i've tried after running problem, in brand new repo, , works expected. editor shows 3 commits, pick top, squash other two, save , quit, done. if run in verbose mode, see more details - git enters detached head state checking out 1st commit 'picked', 'rebasing 2/3' , 'rebasing 3/3', apparently creating temp commits along way -- , success message; editor pops again @ point, offering me change commit message. all's good. but same command dies in work repo! 3 commits in editor, pick-squash-squash.. time, don't see 'rebasing 2/3', instead first line after 'head @ my-sha-1', runs fatal! head @ 48a6c3d... <commit message> fatal: ref head not symbolic ref but why would git expect head symbolic ref? rebase process detach head - same see in exploratory example - why fatal in second ex

jQuery, CSS, -webkit-transform: NO animation -

i using code change -webkit-transform property of element. however, want without transition animation playing: e.g. want go transformx(-300px) transformx(0) without slide in-between. code have far, ineffective. have have "list-style-type" set none otherwise step function not run. $("#slider > ul").animate({"list-style-type": "none"}, {step: function(now, fx) { $(this).css('-webkit-transform', 'translatex(0)') } }); any ideas? just do $("#slider > ul").css('-webkit-transform', 'translatex(0)');

javascript - jQuery .on("click") - alternative to .live() -

in project appending several buttons div: $(".tab-content").append("<div class='landing_content'><button class='off-screen-nav-button btn btn-info btn_edit' data-effeckt='effeckt-off-screen-nav-right-overlay'>edit</button></div>"); and listen click following code: $(".tab-content").on("click",".btn-edit",function(){ console.log('edit'); }); why not working? used use .live() has been deprecated. thanks. in markup have btn_edit , in jquery have btn-edit . change markup class match jquery selector, this: $(".tab-content").append("<div class='landing_content'><button class='off-screen-nav-button btn btn-info btn-edit' data-effeckt='effeckt-off-screen-nav-right-overlay'>edit</button></div>");

c++ - What are the differences between those two approaches of threading? -

i going implement job based threading architecture. means on 1 hand, there queue main thread can append jobs to. on other hand there worker threads, dependent on number of available cpu cores, consuming jobs , removing them queue. now, there 2 approaches implement in c++ coming mind. first 1 template based. there task template representing 1 job. holds function, might lamda , provides access data. to use this, we'd have store in work function object, lambda expression. moreover, need point data pointer our data object , set empty false after that. of course object must attached job queue. worker thread fetching job lock access , , main thread can check lock free every time work result then. template <class t> class task { public: task() { empty.store(true); data = nullptr; } std::mutex access; std::atomic<bool> empty; std::function<void(t*)> work; t *data; }; the second approach inheritance based. empty f

php - Run console command background after login Symfony2 -

i want run custom symfony2 console command background after login. make listener , try use process run command @ background function not work well. here code class loginlistener { protected $doctrine; private $recommendjobservice; public function __construct(doctrine $doctrine) { $this->doctrine = $doctrine; } public function onlogin(interactiveloginevent $event) { $user = $event->getauthenticationtoken()->getuser(); if($user) { $process = new process('ls -lsa'); $process->start(function ($type, $buffer) { $command = $this->recommendjobservice; $input = new argvinput(); $output = new consoleoutput(); $command->execute($input, $output); echo "1"; }); } } public function setrecommendjobservice($recommendjobservice) { $this->recommendjobservice = $recommendjo

javascript - jQuery - checkboxes selecting all on a row or with similar names & ID's -

Image
using jquery 1.9.1 & getting xml returned query needs displayed in web page shown in picture below. had asked similar question several days ago on place in asking. hope ask better questions time. for items in picture, xml input be: <classrooms> <room number="3"> <machine>310</machine> <machine>320</machine> <machine>340</machine> <machine>350</machine> </room> <room number="8"> <machine>810</machine> <machine>820</machine> <machine>840</machine> </room> <room number="10"> <machine>1010</machine> <machine>1020</machine> </room> </classrooms> the code below function called upon successful ajax get , builds checkboxes in table on web page. var $roomlist = $( items ); var roomliststring = j

How to handle file upload windows in selenium webdriver + python? -

i have come across solutions handle file upload windows unfortunately none of them talk apis have python. hence thought ask question. i have web page button named upload open file upload window. when click on it, opens file upload window. hope not trivial question because have not found solutions on internet specific python. just emulate click on "upload" button , supply path file sendkeys. answer on stackoverflow

mySQL count occurrences with JOIN (with date parameters) -

i asked question here: mysql count occurrences join this question, asked how count occurrences of tag after joining etc. i'd know how this, checking event publish_date want include tags within past 6 months or year. **events** | id | publish_date | +-------------------------+ + 1 | 1377612000 | + 2 | 1377612000 | + 3 | 1377612000 | **event_categories** (stores tags / categories) | id | name | +-----------------+ + 1 | sport | + 2 | charity | + 3 | other_tag | **events_categories** (linking table) | event_id | event_category_id | +-------------------------------+ + 1 | 1 | + 2 | 2 | + 3 | 1 | + 3 | 2 | sql returns count of tags (not taking account publish dates)select c.name tag_name, count(ec.event_id) occurrences event_categories c inner join events_categories ec on c.id = ec.event_category_id group c

Jenkins email-ext plugin not sending mail -

Image
i have jenkins version 1.480.3 installed on machine , email-extention plugin 2.30.2. test mail "manage jenkins" section works fine. when add editable email notification jobs, not receiving it. also tried configuring "triggers" in editable email notification advanced section. didn work. console logs of build shows email has been triggered. can me on how debug this? at first have create template http://url-to-jenkins/emailexttemplates/ . in field "project recipient list" can add emails (comma separated). can insert global variables ( manage jenkins > configure system > global properties ) with: ${env, var="path"} the "advanced settings..." option provides trigger management, add "recipient list" , should emails jenkins.

c# - Need SlimDX to display images quickly -

Image
i need display images (about 60 fps). picturebox/panel doesn't job @ higher resolutions, turning slimdx, hope right move. as slimdx uses directx, , directx uses gpu, should able quickly. understanding, gpu works images lot faster cpu. i doing this: messagepump.run(form, () => { device.beginscene(); sprite.begin(slimdx.direct3d9.spriteflags.none); tx = slimdx.direct3d9.texture.fromstream(device, (new memorystream(reader.readbytes(reader.readint32()))), slimdx.direct3d9.usage.none, slimdx.direct3d9.pool.managed); sprite.draw(tx, color.transparent); sprite.end(); device.endscene(); device.present(); }); and initializing everything: var form = new renderform("test"); form.width = 1280; form.height = 720; slimdx.direct3d9.presentparameters presentparams = new slimdx.direct3d9.presentparameters { backbufferwidth = form.width, backbufferheight = form.height, devicewindowhandle = form.handle, presentflags = slimdx.direct3d9.pres

Excel copy paste value different worksheets -

in sheet1 want copy values of columns a,c,d,g , paste bottom of sheet2 in columns a,b,c,d i've been having difficultly because columns of a,c,d,g contain formulas when use copy/destination method ends breaking macro. i can think of 3 methods, , use copy/paste use method rwtwm suggested. example code be sheets("sheet1").range("a1:a10").copy sheets("sheet2").range("a1").pastespecial paste:=xlpastevalues, _ operation:=xlnone, skipblanks:=false, transpose:=false copy values sheets("sheet2").range("a1:a10").value = _ sheets("sheet1").range("a1:a10").value copy data array, , use copy array other sheet dim mydata mydata = sheets("sheet1").range("a1:a10") sheets("sheet2").range("a1:a10") = mydata

cannot add a report to CMC (Central Management Console) Business Objects -

hi trying add report cmc getting following error. adding crystal report "customer details.rpt" failed. server kind rptappserver returned error result. failed copy report file report object. refreshing report object properties might have failed. failed read data report file d:\business objects\businessobjects enterprise 12.0\data\crystalreportsrasserver\temp\{e95ca1ef-e3a5-4590-93c0-0739194564ae}.rpt. reason: unable launch d:\business objects\businessobjects enterprise 12.0\win32_x86\reportadd program add report system. the person in charge of before joined has left , have no 1 ask. never used cmc before check below servers whether working or not: 1.adaptive processing server 2.crystal reports processing server 3.inputfile repository server 4.it can issue of rights. user using should have rights add report. if possible restart ccm , check servers started , try add report.

bash - Execute linux command from a variable -

here trying execute linux command variable in file.sh. test.sh out= "date"; echo $out; output: working perfectly. but when try execute command pgrep vpnc out= "pgrep vpnc"; echo $out; output test.sh: 1: test.sh: pgrep vpnc: not found my expectation when above file executed,it returns pid. i did tried eval. out= "pgrep vpnc"; $ eval $out; output: test.sh: 1: test.sh: pgrep vpnc: not found test.sh: 2: test.sh: $: not found can 1 me how run command , store value in variable. any highly appreciated. it shoud ` instead of " out=`pgrep process`; echo $out; display pid of process.

c - Receive UDP datagram and parse source port -

i'm trying send commands using udp. receiver supposed receive udp datagram , reply. however, reply sent sender's source port. know how parse the port (struct header , move pointer right position...), however, i'm looking function returns whole received frame including headers , not datagram/data. what recvfrom() function? allows grab data , fills sockaddr struct can find source port of sender.

android - What are the pros and cons of using a PropertyChangeListener vs. using LocalBroadcastReceivers? -

it seems property change listeners better sending broadcasts because can pass objects property listeners whereas when broadcast intent, can contain primitives or parcelable objects. however, i'm not sure how objects passed in property change listeners garbage collected, etc. provide insight best practices regarding use of both?

jekyll changing pre to p and adding th/td to tables -

i'm trying regenerate site jekyll it's changing pre p , adding th/td tables. here's example diff of pre p problem. - indicates line replaced + line. code in markdown hasn't changed. diff -<pre><code>-dhttps.proxyhost=proxy -dhttps.proxyport=3128 -</code></pre> +<p><code> +-dhttps.proxyhost=proxy -dhttps.proxyport=3128 +</code></p> markdown ``` runscriptonnode.factory .runscript → create submit → submit ``` here's example diff of th/td problem. + indicates new column wasn't generated before , isn't in markdown file. diff <table> <thead> <tr> + <th></th> <th> column 1 </th> <th> column 2 </th> </tr> </thead> <tbody> <tr> + <td></td> <td> value 1.1 </td> <td> value 1.2</td> </tr> <tr> + <td></td>

github - phone gap download failing -

i tried downloading phonegap version 2.9.0 http://phonegap.com/install/ links https://github.com/phonegap/phonegap/archive/2.9.0.zip fail every single time. download few mb, , return network error. tried downloading using chrome , firefox fail. tried using download manager in firefox (orbit), still fail same message, network error. i can download files every other place in internet, files larger phonegap file. have tried download file past 3 days , failed. (about month ago) have no problem downloading phonegap library. can shed light me why happening?

r - Conditional selection of variables -

suppose i've following table: var iter_1 iter_2 iter_3 iter_4 var1 6 8 5 7 var2 5 1 7 8 var3 3 8 8 4 var4 8 7 2 5 var5 8 7 9 2 var6 8 7 3 6 var7 4 7 4 5 i want select combinations of columns each row such there combinations equal specific sum. e.g. in case, suppose want each var combination of iter 15. in case want select var1 , iter_2 & iter_4 . var2 , iter_3 & iter_4 . i wanted develop code such code can tell me column values select each var. can plz suggest method? 1 don't need write code, logic can use. thank you. this works if sum taken columns: data = data.frame(x = 1:3, y = 2:4, z = 5:7) sums = apply(data, 1, sum) target.val = 11 which(sums == target.val) otherwise looks exact cover problem. http://en.wikipedia.org/wiki/exact_cover or you use stoch

c# - WPF Adding a custom property in a control -

ok have wpf application in have resource dictionary. in dictionary have new style button looks : <style x:key="menubuttonstyle" targettype="button"> <setter property="template"> <setter.value> <controltemplate targettype="{x:type button}"> <grid> <image x:name="imager" renderoptions.bitmapscalingmode="highquality" width="{templatebinding width}" height="{templatebinding height}" source="{binding relativesource={relativesource templatedparent}, path=tag}" verticalalignment="center" horizontalalignment="center" stretch="uniformtofill"/> </grid> <controltemplate.triggers> <trigger property="ismouseover" value="true"> <setter targetname="imag

Reading c++ window in C# using handler -

i implementing plugin product called amibroker in c#. amibroker trading software has exposed few functions can used 3rd party vendors pass stock data solution. so, can create plugin in c# can recognized amibroker. in scenario getting handler of main window of amibroker [note : amibroker written in c++] in c# can retrieve handler of main window, using handle can read data of window e.g. child windows, panels showing stock lists or things visible user, , if so, how go doing this? you can, it's messy. literally worked on similar. pinvoke.net great stuff, i'll show examples of how i'd find controls. if amibroker has documentation control names or accessiblenames or allows find exact controls you're looking for, that'd killer. because if they're ambiguously named, you're gonna have helluva time finding ones you're looking for. basically, you'll want enumchildwindows on handle have, iterate through them , unique property allow find control

c++ - What does this naming convention for headers refer to? -

i studying include guards in c++ , came across naming convention wikipedia : creatorsname_yyyymmdd_hhmmss i timestamp say #ifndef creatorsname_yyyymmdd_hhmmss #define creatorsname_yyyymmdd_hhmmss #endif then how compiler know headername.h ? it's convenient way store documentation person wrote module , when, guarantees uniquness of guard(through date), , provides additional information others referencing module. particularly if believe there problem it's corresponding implementation, have write to. otherwise, creator of module can forget add in documentation are. #ifndef chris_20140807_011555 #define chris_20140807_011555 struct foo { int member; }; #endif /* chris_20140807_011555 */ alternatively, this, doesn't provide additional information , adding documentation @ top easy forget.(though honest, should become habbit, , should not forgotten). but, still motivation such practices, despite option below being more used. /* * author: ch

html - Jquery mobile button and textbox issue when focus on Android -

im running on android 4.2.2 , facing display issues when tap on button or typing in textbox. button move when tap ( see here ) text overflow when typing ( see here ) the content seems drop , leave transparent spaces. did not overwrite jquery mobile default css , not have other js running on them! pure html , css. for input <input type="text"> you can use css avoid overwrite input {-webkit-user-modify: read-write-plaintext-only;}

magento : show image before xml elements -

Image
i creating magento admin module. want show image(icon) before title of module. i want achieve i have tried following code no luck :( <title><![cdata[<img src="media/icon.png"/>]]>title</title> which outputs ----------edit ----- i tried rewrite adminhtml_block_page_menu no success public function getmenulevel($menu, $level = 0) { $html = '<ul ' . (!$level ? 'id="nav"' : '') . '>' . php_eol; foreach ($menu $index => $item) { $html .= '<li ' . (!empty($item['children']) ? 'onmouseover="element.addclassname(this,\'over\')" ' . 'onmouseout="element.removeclassname(this,\'over\')"' : '') . ' class="' . (!$level && !empty($item['active']) ? ' active' : '') . ' ' . (!empty($item['

libtcod - C++: How To Use %i in Function? -

i have little question, possible use %i in function? here need do. have function callback: engine.gui->menu.additem(menu::agility,"agility (+1 defense)"); and want use in way: engine.gui->menu.additem(menu::agility,"agility (%i defense)",engine.level); how need implement that, or might not possible? tried best something, didn't managed it. :( reason want player avenges next level, engine.level counts gets ++, player level ups can more agility in different levels, , leveling can informed how many agility get. most boost::format ( http://www.boost.org/doc/libs/1_54_0/libs/format/ ) should want. won't exact syntax should close.

android - What am I doing wrong in this alarmClock method? -

when call method first time, sets alarm @ right time(current time +2 minutes). when call method second time, doesn't set alarm @ current time +2 minutes. sets alarm @ exact same time first time. doing wrong? code: private void setalarmnow() { vibrator v = (vibrator) getsystemservice(context.vibrator_service); // vibrate 500 milliseconds v.vibrate(1000); gregoriancalendar cal = new gregoriancalendar(); int minute = cal.get(calendar.minute)+2; int hour = cal.get(calendar.hour_of_day); if(minute>59){minute-=59; hour++;} if(hour>23){hour-=23;} intent intent = new intent(alarmclock.action_set_alarm); intent.putextra(alarmclock.extra_hour, hour); intent.putextra(alarmclock.extra_minutes, minute); intent.putextra(alarmclock.extra_skip_ui, true); pendingintent pendingintent = pendingintent.getactivity(this, 0, intent, 0); alarmmanager alarmmanager = (alarmmanager)getsystemservice(alarm_service); calen

php - Inventory system multiple tables and recipes -

Image
i'm novice in php , extremely new databases, forgive me if stupid question: i've built inventory system in php/mysql allows (among other things) add raw materials table, has "price_per_pound_in_dollars" , "pounds_in_stock" columns. stands, updating "pounds-in-stock" column raw material must done manually, one-at-a-time via form. i'm wanting add database recipes contains steps needed making product, "pounds_in_stock" column can updated multiple raws @ once. please see image below. basically go form, pick product drop down menu (populated recipe names doing mysqli_query ), enter number of gallons want make , press submit. the rows in recipe table have figures needed making gallon of product, of numbers in table multiplied number entered form. so, if choose "recipe name 1" , entered "2" gallons input box. multiply "pounds_needed_per_gallon" 2 , put info mysqli_query remove correct raw &quo

ruby on rails - RoR Using break in a YML language file, .html_safe not working -

hi im trying app working on multilenguage, of them need <br> inside lines ... have achieved using like <%= f.label :email_confirmation, t('generales.email_confirmation').html_safe %> this works great in yml can have this: email_confirmation: 'confirmer courriel <br> électronique' but found problem.. dont know how use html_safe <%= rate @player, :area_domination %> i tried : <%= rate @player, :area_domination, t('generales.rateplayer').html_safe %> and <%= rate @player.html_safe, :area_domination %> or <%= raw rate @player, :area_domination %> but <br> not printing html.

c# - Get AND of two Expression<Predicate<string>> objects -

i need build expression> dynamically conjunction of expression> objects, e.g. expression<predicate<string>> expression1 = c => c.contains("aaa"); expression<predicate<string>> expression2 = c => c.contains("bbb"); how can combine these expressions , operator obtain expression<predicate<string>> object? thanks! var par = expression.parameter(typeof(string)); expression<predicate<string>> expression3 = expression.lambda<predicate<string>>( expression.andalso( expression.invoke(expression1, par), expression.invoke(expression2, par)), par); predicate<string> method1 = expression3.compile(); console.writeline(method1("aaa")); console.writeline(method1("bbb")); console.writeline(method1("aaabbb")); we have create new expression. par parameter. use expression.invoke invoke "old" expr

php - Trying to order results of wp_query by the membership and sort order in wp_nav_menu -

my goal provide easy use interface non-technical site admins "drag , drop" order of slideshow on homepage of wordpress site. i using wp_query build "featured slideshow" highlights other pages on homepage of site. in order provide easy way web site admins manage order/appearance of these slides, wanted provide them custom wp_nav_menu item use "drag , drop" set order of slides on homepage. i have since found out syntax 'orderby' in wp_query not referring wp_nav_menu order , has page_meta value sort order. my question is, how can pass values wp_nav_menu wp_query can use orderby? or how can create "drag , drop" interface web admins manage order of slideshow without having go edit each pages sort order? if 'featured' post type post or page, can specify orderby => menu_order within $args this. .e.g $args = array( 'post_type' => 'my-post-type', 'orderby' => 'menu

javascript - How to transition element when changing its relative top? -

in jquery change elements position (which has relative positioning) $(elem).css("top",x); . how can , animate or transition it, moves new location fast not instantly. thanks. two ways : 1 . can use jquery animate() : demo : http://jsfiddle.net/5pvww/ learn more jquery animate() function here . 2 . can use css transition : demo : http://jsfiddle.net/eebdh/ learn more transition in tutorial .

.net - Windows USB Device Location -

i looking proper wmi win32 or cim class property find location of usb device. in device manager, shown below, location known "port_#0002.hub_#0009". ideas on class , property in windows api or if arbitrary value device manager gives property more cryptic. if latter, "more cryptic" class , property? image: http://i.stack.imgur.com/7miwp.png you might cross-reference port_#x.hub_#y output of usbview. i've used tool numerous times information existing usb tree. the usbview sample available in wdk. if unfamiliar this, run - tool walks entire usb tree on system , prints out information , descriptor listings each device, locations on host controllers , hubs. start @ refreshtree() function in sample, can follow code see how enumerates host controllers, hubs , devices. the easiest way source sample install 7.1.0 wdk available here: http://www.microsoft.com/en-us/download/details.aspx?id=11800

html - Select option not displaying in Internet explorer -

the following select options display fine in firefox/chrome not in ie8. please help. <select id = "vehicle" name = "vehicle" class = "vehicleselect"> <option value = "-1" selected>&nbsp;</option> <option value = "15">car</option> <option value = "16">bike</option> <option value = "17">train</option> </select> css: .vehicleselect { width: 100%; height: 100%; font: 10px/1.45em "lucida grande",verdana,arial,helvetica,sans-serif; padding: 3; border: 0; } you're removing standard border in select box, naturally strange in various browsers. consider removing height: 100% , border:0 . you shouldn't add spacing in html tag properties. cause various issues depending on browser, plus it's practice. <select id = "vehicle" name = "vehicle" class = "vehicleselect">

jquery - Styling multiple Countdown dates -

Image
i want create page countdowns multiple events, somehow not format correctly ids number 12 , 13. how looks: code: <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>countdown</title> <link rel="stylesheet" href="jquery.countdown.css"> <style type="text/css"> #defaultcountdown { width: 240px; height: 45px; } </style> <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.countdown.js"></script> <script type="text/javascript"> $(function () { $('#defaultcountdown').countdown({since: new date(2010, 12-1, 25)}); $('#12').countdown({since: new date(2011, 12-1, 25)}); $(&

spring mvc - Could not open Hibernate Session for transaction / Cannot open connection -

in application, have module designed search database users , display information in table inside jsp. setup spring security inside application. able make connection database login page, though reason none of dao's crud operations (in case, search) working. thanks, , please let me know if can provide more information. here of stack trace. org.springframework.web.util.nestedservletexception: request processing failed; nested exception org.springframework.transaction.cannotcreatetransactionexception: not open hibernate session transaction; nested exception org.hibernate.exception.genericjdbcexception: cannot open connection org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:656) org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:560) javax.servlet.http.httpservlet.service(httpservlet.java:637) javax.servlet.http.httpservlet.service(httpservlet.java:717) ... org.springframework

workflow foundation 4 - trackingProfile configuration for specific activityDefinitionId (dynamic) -

i want ability enable , disable custom tracking in specific workflows using trackingprofile. so, create entries ones want track, this: <trackingprofile name="mytracking"> <workflow activitydefinitionid="myworkflow1"> <customtrackingqueries> <customtrackingquery name="*" activityname="*"/> </customtrackingqueries> </workflow> <workflow activitydefinitionid="myworkflow2"> <customtrackingqueries> <customtrackingquery name="*" activityname="*"/> </customtrackingqueries> </workflow> </trackingprofile> we load workflow dinamically disk using activityxamlservices.load. so, know activitydefinitionid in case? used path , didn't work... thanks in advance! activity definition id id of activity obtained loading xaml file using activityxamlservices.load. activity msdn .

PHP-CLI not found -

Image
after tried hours find path php-cli, found it. proud gone again. still got following error: the following requirements not met. result video uploads have been disabled. unable locate path php-cli i have tried different paths bin/php usr/local/lib usr/local/lib/php usr/local/bin/php (this 1 thought). still getting same error above. whats happening? server not running in safe mode , exec() enabled via php.ini file. please me.. edit: paul q: have tried "fully qualified paths", e.g. "/bin/php" (not "bin/php")? a: have tried both solutions, no result. q: sure php-cli installed on system (it's typically seperate package apache php plug-in)? example: apt-get install php5-common libapache2-mod-php5 php5-cli. a: tried in ssh of server, centos server didn't found comment @peter: if installed php through os package manager, path /usr/bin/php, appears 1 didn't try i tried 1 now, didn't h

Is there an android library which will parse/display an SMPTE Timed Text (captions) xml file? -

i retrieving smpte timed text xml files remotely need parse , draw surface captions. the full file format defined here: https://www.smpte.org/sites/default/files/st2052-1-2010.pdf the xml looks this: <tt xmlns="http://www.w3.org/ns/ttml"> <head> ... </head> <body> <p begin="00:00:33:03" end="00:00:37:24" region="pop1" style="basic" tts:origin="20% 79.33%" tts:extent="60% 5.33%">it on little world,</p> <p begin="00:01:29:23" end="00:01:31:10" region="pop2" style="basic" tts:origin="30% 84.67%" tts:extent="50% 5.33%">giving instructions)</p> ... </body> </tt> basically each p tag defined time , position , text draw. haven't been able find native or third party libraries on android. i'm looking library read xml file organized

python - Celery + RabbitMQ Results Backend + WebSockets? -

i have flask web app , there tasks long running (> 1 minute). offload these flask (blocking web server, etc) , move them external tasks. got celery setup , able run these tasks flask. good. to notify users when task done , return results, wanted use web sockets. gets hard. i have gevent websocket server running client connects to. when launch celery task pass in session id of client when results know belong to. now need websocket server know when these tasks done, @ results, , send them appropriate connection. how? lost. can listen celery events celery.events.eventlistener.capture , blocks websocket server can't have multiple connections! how can listen celery events without blocking? one idea make request on web socket , launch celery task websocket server. solve notification issue (just used celery events), i'm still curious original question request made standard flask server. you need flask app not block on capture call. 1 solution run fl

xcode - Double Tap Segue to move to next storyboard -

Image
i making app user has double tap segue move next storyboard, cannot find anywhere tells how this. know how can achieve this? if in interface builder storyboard: drag tap gesture recognizer object library onto view. make sure view dragged has "user interaction enabled" checked. select tap gesture added scene (which can find in document outline on left side of interface builder's main panel; document outline can collapsed can't see ... if don't see it, select "show document outline" "edit" menu). change number of taps 1 2. control -drag tap gesture in document outline next scene , choose type of segue want. frequently, people create gesture recognizers in code, if you're interested in how works, let me know.

dictionary - How to add to dictionaries, but not dictionaries - Python -

i need dictionary, can edit to. not add entire new value, add 'class'??? inside of dictionary. example character stats. if race == 'orc': if class == 'worrier': stats = ['strength': 6, 'intelligence': 2]' how can add strength? (i know can't add dictionaries, why need similar). i know can't add dictionaries actually, can: >>> characters = {} >>> characters['warrior'] = {} >>> characters['warrior']['orc'] = {} >>> characters['warrior']['orc']['strength'] = 5 >>> characters['warrior']['orc']['intelligence'] = 2 >>> characters {'warrior': {'orc': {'intelligence': 2, 'strength': 5}}} >>> characters['warrior']['orc']['strength'] += 3 >>> characters {'warrior': {'orc': {'intelligence':