Posts

Showing posts from April, 2012

php - getting attributes in simplexml_load_string -

below function using convert xml array $xml = '<xml><codeshareinfo operatingcarrier="ey" operatingflightnumber="269">etihad airways</codeshareinfo></xml>'; $obj = simplexml_load_string($xml); // parse xml $obj->registerxpathnamespace("soap", "http://www.w3.org/2003/05/soap-envelope"); $array = json_decode(json_encode($obj), true); // convert array when try parent node "xml" <xml><codeshareinfo operatingcarrier="ey" operatingflightnumber="269">etihad airways</codeshareinfo></xml> i result array ( [codeshareinfo] => etihad airways ) but if try without parent node "xml" <codeshareinfo operatingcarrier="ey" operatingflightnumber="269">etihad airways</codeshareinfo> i can attributes , value array ( [@attributes] => array ( [operatingcarrier] =>...

javascript - JQuery DOM manipulation and event trigger -

i attempting build simple edit-in-place feature new rails app. need changes save data. how take div info top , enter in hidden form :content save edit-in-place changes? my current show.html page follows <p id="notice"><%= notice %></p> <div id="body_editable" class="editable"> <%= @article.content %> </div> <%= form_for(@article) |f| %> <%= f.label :content %><br> <%= f.hidden_field :content %> <div class="actions"> <%= f.submit %> </div> <% end %> <script> var editor = new mediumeditor('.editable'); </script> i assuming following needed: //on page load bring data div $('#body_editable').html($('#article_content').val()); //on save take div , put in form :content $('#article_content').val(editor.serialize().body_editable.value); but not sure how trigger save event using rails submit bu...

Css animation visible on hovering -

i've got circle image underneath. when hover on circle want circle bigger , mask of image. have done this: (works in webkit) .clip { position: absolute; -webkit-clip-path: circle(40px @ center); -webkit-transition: -webkit-clip-path 2s; /* safari */ transition: -webkit-clip-path 2s; } .clip:hover { -webkit-clip-path: circle(75px @ center); visibility: visible; } } <div class="clip-wrapper"> <div class="clip"> <p>workshops</p> <img name="workshops" alt="workshops" src="http://lorempixel.com/422/750" width="422" height="750" /> <div class="workshops-container"> <div class="workshop"> <img name="workshop1" alt="workshop1" src="_img/ws1.png" width="placeholder" height="placeholder" /> <header...

jenkins gerrit trigger different jenkins jobs -

i looking if there way when developer commit , push gerrit (with custom comments), trigger jobs example git commit -m "do_build do_test some_commit_comments", when pushed gerrit, launch jenkins jobs do_ build , jobs test or git commit -m "do_build some_commit_comments", when pushed gerrit, launch jenkins jobs do_ build , jobs test i sorry if has been asked somewhere, far cant find anywhere thank you i think gerrit topic can used this. because there build parameter in gerrit trigger based on topic. in do_ build case topic do_ build trigger build job, , do_build_test trigger test job has build job dependency. in way dont need spam commit message build instructions

c++ - Large vector "Segmentation fault" error -

i have gathered large amount of extremely useful information other peoples' questions , answers on so, , have searched duly answer 1 well. unfortunately have not found solution problem. the following function generate list of primes: void genprimes (std::vector<int>* primesptr, int upperbound = 10) { std::ofstream log; log.open("log.txt"); std::vector<int>& primesref = *primesptr; // populate primes non-neg reals (int = 2; <= upperbound; i++) primesref.push_back(i); log << "generated reals successfully." << std::endl; log << primesref.size() << std::endl; // eratosthenes sieve remove non-primes (int = 0; < primesref.size(); i++) { if (primesref[i] == 0) continue; int jumpstart = primesref[i]; (int jump = jumpstart; jump < primesref.size(); jump += jumpstart) { if (primesref[i+jump] == 0) continue; primesref[i+jump] = 0; } } log << "execute...

how to display an object in an array php? -

i'm trying display object stored in array can't work here have (that's var_dump shows me) array(5) { [0]=> string(10) "04/06/2015" [1]=> string(1) "2" [2]=> string(1) "7" [3]=> string(1) "2" [4]=> object(stdclass)#64 (1) { ["esp_name"]=> string(11) "something" } } array(5) { [0]=> string(10) "03/06/2015" [1]=> string(1) "1" [2]=> string(1) "7" [3]=> string(1) "3" [4]=> object(stdclass)#64 (1) { ["esp_name"]=> string(11) "something else" }} and i've managed display first 4 items can't display 1 in object <?php foreach ($resulba $i => $valor) { echo $valor[$i][0]; echo $valor[$i][1]; echo $valor[$i][2]; echo $valor[$i][3]; echo $valor???; } ?> using json_decode($jsonstring, true) last parameter set true not add stdclass objects data, arrays textual keys. should make accessing data ...

llvm - lli Instruction not interpretable yet -

can explain me why lli on instruction "%broadcast.splatinsert.i = insertelement <4 x i32> undef, i32 %reverse.idx.i, i32 0" prints "instruction not interpretable yet! ? lli ver 3.3 full source https://www.sendspace.com/file/e9kgng block of code: vector.body.i: ; preds = %vector.body.i, %for.body.lr.ph.i %index.i = phi i64 [ %index.next.i, %vector.body.i ], [ 0, %for.body.lr.ph.i ] %vec.phi.i = phi <4 x i32> [ %86, %vector.body.i ], [ <i32 1, i32 1, i32 1, i32 1>, %for.body.lr.ph.i ] %vec.phi11.i = phi <4 x i32> [ %87, %vector.body.i ], [ <i32 1, i32 1, i32 1, i32 1>, %for.body.lr.ph.i ] %resize.norm.idx.i = trunc i64 %index.i i32 %reverse.idx.i = sub i32 %.x.i113, %resize.norm.idx.i %broadcast.splatinsert.i = insertelement <4 x i32> undef, i32 %reverse.idx.i, i32 0 %broadcast.splat.i = shufflevector <4 x i32> %broadcast.splatinsert.i, <4 x i32> undef, <4 x i3...

Best way to analyze MS Server 2008 R2 Task Manager? -

looking keep metrics on ms server 2008 r2 - specific items in task manager. have several processes appearing stay open , consuming lots of memory. what's best way measure memory used these processes , report them? thanks in advance! m

web services - USBHIDDRIVER works in Visual Studio debug mode but not when deployed to IIS -

i'm using usbhiddriver access scale connected our local workstation. works fine when run wcf in visual studio 2012 debug. once attempt run service in iis doesn't seem recognize usbhiddriver. have test service in wcf works fine wcf working. any information on how troubleshoot extremely helpful. problem wcf compiled when deploy iis server i'm having hard time trying troubleshoot. here additional information regarding usbhiddriver: http://www.florian-leitner.de/index.php/projects/usb-hid-driver-library/ namespace usbdevices { public class service1 : iservice1 { public string getweight(string id) { usbhiddriver.usbinterface usb = new usbhiddriver.usbinterface("vid_0922","pid_8007"); //string[] list = usb.getdevicelist(); string result; string resultdesc; byte itemweight; byte itemuom; result = ""; resultdesc = ...

linux - Passing IPC(Instructions/Cycles) continuously to other function or variable -

i trying read performance counters , ipc. need use ipc control few machine specific parameters. using shell script same. please see code below: while true retval=./perf periodic -e instructions -e cycles -s 50 -d -m td & some_pid=$! kill some_pid if ["$retval" -gt "0.5"] ***something*** fi sleep 1 done i getting following error: algorithm.sh[27]: kill: some_pid: arguments must jobs or process ids algorithm.sh[27]: periodic: not found algorithm.sh[27]: [: missing ] algorithm.sh[27]: kill: some_pid: arguments must jobs or process ids algorithm.sh[27]: [: missing ] algorithm.sh[27]: periodic: not found algorithm.sh[27]: kill: some_pid: arguments must jobs or process ids algorithm.sh[27]: [: missing ] can give me pointers on how get/return value perf instruction. tried using function , returning value, failed. --------- updated ---------- now running following, , 1 of problem got solved , 1 remaining. ....

android - Populate ListView with SQLite, Images and Text from local resources -

i have listview able show 2 textviews , imageview per listviewitem. have sqlite database has following fields, _id , name , description , image . an example record follows: 1 , r.string.name1 , r.string.description1 , r.drawable.image1 the strings name , description in strings.xml file, , images needed in res/drawable folders, referenced r.drawable.image_name i using sqliteassethelper library manage database. i able cursor containing information needed, , able populate listview text, when run app, textviews show r.string.name1 , r.string.description1 , etc. have not yet been able image work @ all. how text show (so can have different languages in future) , how images show? here code far: database helper public class database extends sqliteassethelper { private static final string database_name = "database.sqlite"; private static final int database_version = 1; public database(context context) { super(context, dat...

python - Assign a Range of Numbers to a Single Key with Dictionaries -

i working on dictionary, came issue. , issue is, want able use more 1 number in order reference key in dictionary. for example, want range of numbers between 1 , 5 assigned to, let's say, "apple". came this: my_dict['apple'] = range(1,5) at program's current state, far being able run, testing issue, not receive issues editor. wondering, correct way go this? or there better way? thanks. edit: a little more info: want make random integer randint function. then, after python has generated number, want use call key assigned value of random integer. thing is, want make things more common others, want make range of numbers can call larger chance of key coming becomes likelier. sorry if doesn't make sense, @ current state, don't have code show i'm trying accomplish. you have dictionary backwards. if want able recall, e.g., 'apple' of numbers 1-5, you'd need numbers keys , not values . for in range(1,6): # range(a,...

c# - Cascading delete with Entity Framework -

Image
i have comments table contains amongst other things columns id - id of comment, commenter_id id of user posted it, , parentcomment_id self referencing foreign key. there 2 levels commenting, parents , sub comments. if comment record has parentcomment_id of null, parent comment. i'm trying write expression delete comments user, causing problems because of self reference mentioned earlier. take records sample example of problem: user id 2 posted comment, id of 3. because parent comment has parentcomment_id value of null. later on, user id 1 responds comment sub-comment, creating comment 7 (there other comments/subcomments between these 2 hence id increment jump). i'm not able delete comment id 3 because sub comment, comment id 7, has foreign key it. currently entity framework statement trying delete comments follows: context.comments.where(x => x.commenter.id == user.id).delete(); but gives me exception because of described problem. i fix using few f...

objective c - Adding a detail text labels to an existing array of strings, UITableView -

i have array in uitableviewcontroller.m self.movies = [nsarray arraywithobjects: @"zardoz", @"dark city", @"inland empire", @"gangs of new york", @"enemy", @"they live", @"lost highway", nil]; i initwithstyle:uitableviewcellstylevalue2. trying add detailtextlabel each corresponding each movies idbm rating(double). create array values? thanks. easiest thing create new class, literally like: @interface movieobject @property (copy) nsstring *name; @property (copy) nsstring *moviedescription; @end and can add objects of type mutable array of movies: newmovie = [[movieobject alloc] init]; newmovie.title = @"zardoz" newmovie.moviedescription = @"oscar winner" [self.movies addobject: newmovie]; and when fetch objects, you'll have both title , detail ...

java - Visual Studio Wrong output for float/single operation -

Image
i'm trying understand how floating point operations give different output. tests performed below result 1; vb.net , c# give different output, whereas java gives different output. has compiler , read what every computer scientist should know floating-point arithmetic confusing, can explain in simple language? vb.net dim x single = 1.000001 dim y single = 0.000001 dim result = x - y output: 0.9999999 click here see output same goes c# also, while watching variable in visual studio, value of result different outputs, trimmed while printing , 7 9's printed(which understood), dont understand how actual result them 0.99999994 update: alright, i'm more interested in how calculation done(removed java stuff) numbers in visual basic single (or c# float) stored ieee 754-2008. number stored in 32 bits. first bit sign next 8 bits store exponent , next 23 bits store fraction. first integer part of number converted base 2. fraction converted base 2 , number ...

c++ - Count the number of paths in DAG with length K -

i have dag 2^n nodes, values 0 2^n-1. there edge x y if x < y , x (xor) y = 2^p, x , y being node values , p non-negative integer. since n can large 100000, generating graph , proceeding counting take computational time. there way count paths length k (k being number of edges between 2 nodes), differently stated, there equation of sort kind of counting? in advance michael's got insights, i'm not sure follow entire argument. here's solution. let's n=4, k=2. nodes range 0 (0000 2 ) 15 (1111 2 ). now let's consider node 2 (0010 2 ). there's edge 2 3 (0011 2 ) because 2 < 3 , xor(2,3) = 1 = 2 0 . there's edge 2 6 because 2 < 6 , xor(2,6) = 4 = 2 2 . , there's edge 2 10 because 2 < 10 , xor(2,10) = 8 = 2 3 . to generalize: x, consider of 0 bits in x. flipping of 0 bits 1, number y that's larger x , differs x 1 bit. there's edge x y. the number of 1 bits in x typically called population count of x. i'll use pop(x) ...

scala - Play Framework not refreshing page when javascript posts a change -

so issue have have 2 combo boxes, comboone , combotwo. combotwo's population dependent on selection of comboone ... i.e. when comboone selected want hit server , pass in relevant values combotwo. everything seems joinning , call returns controller gets called .. weirdly not refresh page ... true if send entirely different page. so code ... scala template looks ... @(adminaccess: boolean, thelocationclasstimes: list[string]) <!doctype html> : : <script> function populateclasstimeselect(classlocation) { var req = new xmlhttprequest() ; req.open("post", "/locationclasstimes/" + classlocation); req.onload = function ( e ) { if ( req.status = 200 ) { document.reload(true); } }; req.send(); } </script> : // , use "thelocationclasstimes" list down here the routes file has ... get /contacts.html ...

android - How to create a custom, clickable text view layout for ListViews? -

i'm wondering how create custom textview behaves identically simple_list_item_1 does? there can tweak how want. have created custom layout follows: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <textview android:layout_width="match_parent" android:layout_height="match_parent" android:textcolor="#3104b4" android:id="@+id/customlistviewfield" android:clickable="true" android:padding="10dp" android:textsize="30dp" android:enabled="true" android:textisselectable="true" /> </linearlayout> but onclicklistener doesn't receive events. thought marking cl...

r - Only show last four labels on bar graph -

Image
my code here produces bar graph labels on each bar of y value. show last 4 data points labels. best way it? library(data.table) library(ggplot2) df <- data.table(x= c(1,2,3,4,5,6,7,8,9,10), y=c(4,1,-3,-5,4,1,2,4,2,-3)) ggplot(df, aes(x=x, y=y)) + geom_bar(stat="identity") + geom_text(aes(y=y, ymax=y, label=y), position= position_dodge(width=0.9), vjust=-.5, color="red") thank much. thanks @user20650 quick response. subsetting gem_text did trick. thank much! here updated code: library(data.table) library(ggplot2) df <- data.table(x= c(1, 2, 3, 4, 5,6,7,8,9,10), y=c(4, 1,-3,-5,4,1,2,4,2,-3)) ggplot(df, aes(x=x, y=y)) + geom_bar(stat="identity") + geom_text(data=subset(df, x>6), aes(y=y, ymax=y, label=y), position= position_dodge(width=0.9), vjust=-.5, color="red")

C# WPF - editable column in a datagrid -

problem description i have datagrid named data_grid_1 , has 2 columns header1 , header2 , filled someclass -object's inside data_grid_1 loaded-event-handler. xaml-code: <window x:class="wpfapplication1.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525"> <grid> <datagrid x:name="data_grid_1" horizontalalignment="left" margin="10,10,0,0" verticalalignment="top" height="303" width="497" loaded="data_grid_1_loaded"> <datagrid.columns> <datagridtextcolumn header="header1" binding="{binding s...

python regular expression to check if string contains substring -

i want create code return true if string contains word "post". when give code string "postgre", "postgres", "sqlpost" - return true. how can it? you don't need regex this. use in operator: >>> word = 'post' >>> word in 'postgres' true >>> word in 'sqlpost' true >>> word in 'fish' false

delphi - Error when I try EnumProcessModules in windows 8 64bit -

i'm trying pick modules of process, according msdn not possible handle modules th32cs_snapmodule function in 32bit applications , using enumprocessmodules function can not list modules of defined process , go infinite loop. i had success compiling application windows 64bit. here code error ! procedure getmodule(processid: cardinal); var modules: array of hmodule; cbneeded, i: cardinal; moduleinfo: tmoduleinfo; modulename: array[0..max_path] of char; phandle: thandle; item: tlistitem; begin setlength(modules, 1024); phandle := openprocess(process_query_information + process_vm_read, false, processid); if (phandle <> 0) begin enumprocessmodules(phandle, @modules[0], 1024 * sizeof(hmodule), cbneeded); //getting enumeration of modules setlength(modules, cbneeded div sizeof(hmodule)); //setting number of modules := 0 length(modules) - 1 //start loop begin item := form1.listview2.items.add; item.caption := inttostr(i); // te...

How to support new ambient mode in android wear? -

since last update android wear has new feature - always-on mode. means android wear device doesn’t turn off screen; changes ambient mode save battery , keeps apps running in background. how should implement this? p.s. i'm developing sport application, not watchface. what you're looking how support "ambient mode" in wear app's activity. there entire doc dedicated this: http://developer.android.com/training/wearables/apps/always-on.html as code sample: https://github.com/googlesamples/android-alwayson/

asp.net mvc - Is it possible to copy build files to multiple drop folders on TFS? -

i have 2 web servers testing mvc applications. when create build definition in visual studio utilize 2 drop folders (one on each server) doesn't seem possible. know there lot of ways around manually copying files, setting data replication or creating multiple build definitions looking simplest way. ideas? add post-build script copy files second web server.

javascript - Speed of jQuery selector seems to be wrong my code -

i working on optimizing code need disable first option in dropdown select menus. there 3 methods comparing find fastest one, can found here jquery-fastest-method-find-descendents they are: 1. scope: $(".child", $("#parent")); 2. find: $("#parent").find(".child"); 3. 'normal': $("#parent .child"); (i call 'normal' because that's 1 use everything) according linked article other posts have seen both 1 , 2 should same, 3 should slowest. however, rigged little timing fiddle , appears showing exact opposite. fiddle here for each of 3 tests fiddle create 1000 select menus, gives them 10 options each, , gives random select menus disable me class (i wanted variety see if changed results). timer begins, jquery selector goes in , finds .disableme , disables first option. so can tell me why seeing opposite results of expecting? did mess in timing part of tests or maybe high level logic got confused? code don...

dictionary - Python: eval() inside a lambda function as argument to map() changes map()'s input sequence to global() in place -

i creating new variables applying lambda functions inside of map() using python 3.4. the input sequence map list of dicts. lambda functions defined in separate config file. minimize typing, wanted use eval() inside lambda, so: dat = [{'a':1, 'b':2}, {'a':2,'b':1}] a_transformation = 'a > 1' temp = map(lambda x: eval(a_transformation,x), dat) the result expected, appears each item in input sequence changed output of global().... i can similar pandas without issues: import pandas dat = [{'a':1, 'b':2}, {'a':2,'b':1}] dat_pandas = pandas.dataframe(a) a_transformation = 'a > 1' temp = dat_pandas.eval(a_transformation, engine='python') but i'd prefer not have use pandas. any ideas? thanks!

mysql - Doctrine migrations:diff ignores cascade -

i have manytoone relation between 2 entities , use db (mysql) level cascade on delete. when use doctrine:migrations:diff foreign key created without on delete cascade. so added cascade myself on next migrations:diff statement has been removed. there way how can use db level cascade on delete along doctrine:migrations? class system { /** * @var arraycollection * * @orm\onetomany(targetentity="cost", mappedby="system", cascade={"remove"}) */ private $costs; } class cost { /** * @var system * * @orm\manytoone(targetentity="system", inversedby="costs", cascade={"remove"}) * @orm\joincolumn(name="system_id", referencedcolumnname="id") */ private $system; } you want instead in joincolumn annotation: * @orm\joincolumn(name="system_id", referencedcolumnname="id", ondelete="cascade") for more infor...

jquery - Javascript - how to tell the video element to stop playing the video at xyz duration? -

i have content in french, nederland, english (on same topic example: "global warming" ) but in 1 large file, how can tell video element please play duration 00:00:00 till 00:05:00 not play whole 02:00:00 ? function video_play_onetime_withcut(input) { $('#mediaplayer').prop('loop', false); $('#mediaplayer').attr('src', filename).show(); mediaplay_video= document.getelementbyid('mediaplayer'); mediaplay_video.play(); mediaplay_video.onended = function(e) { console.log('>>> playing finished: ', e); }; } use timeupdate event. mediaplay_video.ontimeupdate = function(event) { if( mediaplay_video.currenttime === 5 * 60 ) { mediaplay_video.pause(); // don't stop player multiple times if user // wants see whole thing... mediaplay_video.ontimeupdate = false; // whatever want. } }; if plan hide player afterwards, can use this: mediaplay_video.ontimeupda...

android - AAR class library stored in bintray doesn't link to the extended class -

i created android library made class named wordutils2 extends java class wordutils. entire project can found in github here: https://github.com/dequadelisonz/wordutils2 i published generated aar file bintray able use through gradle in other android projects. project builds fine , there seems no problems. but when include in other android projects adding row in gradle.build file of module: compile(group: 'it.code.martin', name: 'wordutils2', version: '1.0.0', ext: 'aar') following error in gradle messages: error:(56, 36) error: cannot access wordutils class file org.apache.commons.lang3.text.wordutils not found it looks original wordutils class extended class cannot reached. here below report activity code: package code.martin.it.wordutilstest; import android.app.activity; import android.os.bundle; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.button; import android.widget.ed...

kendo observable with variable -

why work (putting json directly observable function) <ul data-template="ul-template" data-bind="source: orders"> </ul> <script id="ul-template" type="text/x-kendo-template"> <li> orderno: <span data-bind="text: orderno"></span> name: <span data-bind="text: custname"></span> </li> </script> <script> var viewmodel = kendo.observable({orders:[ {"orderid":"437","orderno":"1211","custcode":"1022","custname":"kingmen"},{"orderid":"438","orderno":"1212","custcode":"1023","custname":"fredrick"} ]}); kendo.bind($("ul"), viewmodel); </script> but code not work (with json data in variable). no output. <ul data-template="ul-template" data-bind=...

How can I stop nginx from responding to non-local requests? -

here's nginx file looks like. when browse server using ip, still the "welcome nginx!" page server { listen 127.0.0.1:9070; root /var/www/[redacted]/public/; index index.php index.html index.htm; server_name [redacted]; location / { try_files $uri $uri/ /index.php$is_args$args; allow 127.0.0.1; deny all; } # pass php scripts fastcgi server listening on /var/run/php5-fpm.sock location ~ \.php$ { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } } i believe you'll find moving allow/deny server clause clear up: server { listen 127.0.0.1:9070; root /var/www/[redacted]/public/; index index.php index.html index.htm; server_name [redacted]; location / { try_files $uri $uri/ /index.php$is_args$args; allow ...

php - Using SQL to COUNT the most recent rows only -

i'm trying build analytic page, , i've encountered problem; users visit pages based on session, if session expires provided new one. i'm trying determine way count number of users last session on page using query: select distinct (select max(session) analytics b a.session=b.session) session,(select max(distinct location) analytics c c.session=a.session) locale analytics that query return results follows: session | location ------------------------------------------ 1 | http://random-page.io/index.html -- same session, first entry 1 | http://random-page.io/index.html -- same session, second entry 1 | http://random-page.io/index.html -- same session, last entry <- we're trying count 2 | http://random-page.io/index.html -- same session, first entry 2 | http://random-page.io/index.html -- same session, last entry <- we're trying count 3 | http://rand...

intellij idea - Properly create Java JAR -

Image
i using intellij create variant of java worldwind application. when build jar artifact in intellij can see dlls , sos in top-level directory of jar. however, when try execute it, complains can't see these libraries inside jar (tried both windows , linux, being why include sos , dlls). what need see these libraries? this first time creating executable jar, sorry vagueness, i'm not quite sure information important. please ask me questions necessary better understand problem, , answer them. edit: catched filenotfoundexception: d:\code\animator\animator\out\artifacts\animator_jar\animator-natives-windows-i586.jar (the system cannot find file specified), while addnativejarlibsimpl( classfromjavajar class com.jogamp.common.os.platform, classjaruri jar:file:/d:/code/animator/animator/out/artifacts/animator_jar/animator.jar!/com/jogamp/common/os/platform.class, nativejarbasename animator-natives-windows-i586.jar): [ file:/d:/code/animator/animator/out/...

shell - make and ">" redirector not working as expected in gnome-terminal -

for operating systems class taking @ university, required work on large teaching operating system. code i'm working on has been provided bunch of makefiles , compiled cmake , make . since there bunch of warnings (which i'd rid of) in code , build tree quite big, i'm trying redirect build log file make > output.txt . however, writes output make file: output.txt looks this: [ 63%] building cxx object common/source/kernel/cmakefiles/common_kernel.dir/syscall.cpp.o [ 63%] building cxx object common/source/kernel/cmakefiles/common_kernel.dir/thread.cpp.o [ 64%] building cxx object common/source/kernel/cmakefiles/common_kernel.dir/timemanager.cpp.o [ 64%] building cxx object common/source/kernel/cmakefiles/common_kernel.dir/userprocess.cpp.o [ 65%] building cxx object common/source/kernel/cmakefiles/common_kernel.dir/userthread.cpp.o linking cxx static library ../../../lib/libcommon_kernel.a output gcc or g++ still printed shell this: in file included /home/...

java - Subflow popup does not allow render fragments when returning to parent flow view-state -

i have sub-flow being shown in popup. when popup closed, due clicking submit or cancel button, transitioning view-state of main flow causes full page reload. problem underlying parent-flow page contains file chooser control loses user selection when page refreshed. in order retain inputted data, update fragment of parent-flow's page way can when transitioning between view-states of same flow. here flow xml: main flow: <view-state id="main"> <transition on="start" to="child-flow"/> <transition on="finish" to="finished"/> </view-state> <subflow-state id="child-flow" subflow="main/childflow"> <transition on="submitted" to="main"> <render fragments="popupclosed" /> </transition> </subflow-state> <end-state id="finished" /> child flow: <view-state id="childflow" view...

ios - Cocoapods downgrades dependencies -

Image
somehow every time run pod install or pod update, project dependencies downgraded. , if explicitly write project version, pod install not work. running same pod file on computer works fine. here pod file , command line screen. the solution use. $ pod setup

html - AngularJS validation input diffrent than zero -

starting i'm realy new in progrraming especialy angular. want validate input not allow number 0 . here code: <form ng-app="linearequation" ng-controller="calcctrl" name="calculator" ng-init="notvalid=true" novalidate> <div> <h3 class="field">kalkulator oblicza wartość równania <var>ax = b</var>.</h3> <div class="field"> <p> podaj wartość a:<br/> <input type="number" name="fielda" ng-model="a" required integer /> <span class="error" ng-show="calculator.fielda.$invalid"/> <span ng-show="calculator.fielda.$error.number"> proszę podać liczbę</span><br/> </p> <p...

web services - magento netsuite integration using SuitTalk crushes my page -

i trying retrieve data netsuite magento website. trying use suitetalk. documentation in these link. http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml . fetches desired result in lunix terminal. when tried load page, page crushed. first time tried include in block. , second used observer. both ways not successful. have idea? the error log follows a:5:{i:0;s:33:"webservice host must specified";i:1;s:3914:"#0 /dir/magento_1.9/app/code/local/etech/customersupport/block/phptoolkit/netsuiteservice.php(132596): nsphpclient->__construct(null, array) #1 /dir/magento_1.9/app/code/local/etech/customersupport/block/myclass.php(12): netsuiteservice->__construct() #2 /mydir//magento_1.9/app/code/local/etech/customersupport/block/myblock.php(14): myclass->get_customer() #3 /mydir//magento_1.9/app/design/frontend/shopper/default/template/etech/index.phtml(9): etech_customersupport_block_myblock->getcustomer() #4 ...

python cassandra : concurrency Insertion and json format -

i new cassandra, use python-driver cassandra. does know better way insert concurrently? i have graph model, built networkx, there way store/load graph model ( node , edges json format) cassandra. how performance/ thanks in advance. cassandra python driver supports async queries : the driver supports asynchronous query execution through execute_async(). instead of waiting query complete , returning rows directly, method returns responsefuture object. there 2 ways of getting final result object. the first calling result() on it. if query has not yet completed, block until has , return result or raise exception if error occurred. alternatively, instead of calling result(), can attach callback , errback functions through add_callback(), add_errback(), , add_callbacks(), methods. as performance of graph operations, have more specific. don't see possible performance problems graph storage in c* if use correct db schema that.

c++ - SIGSEGV (Segmentation fault) when link boost-thread and boost-regex via cmake -

i try compile , run example of mongo-cxx-driver. requires linking boost-system, boost-thread , boost-regex. when compile commad line: g++ simple_client_demo.cpp -i/home/ssi/mongo-client-install/include -l/home/ssi/mongo-client-install/lib -lmongoclient -lboost_system -lboost_thread -lboost_regex all well. when try compile cmake, signal: sigsegv (segmentation fault) in /usr/include/c++/4.8/functional(2030 line _m_manager(_m_functor, _m_functor, __destroy_functor); if matter). part of cmakelist.txt, link boost: cmake_minimum_required(version 3.2) project(test_mongo_c_driver) set(cmake_cxx_flags "${cmake_cxx_flags} -std=c++11") include_directories("/home/ssi/mongo-client-install/include") link_directories("/home/ssi/mongo-client-install/lib") #link_directories("/usr/lib/x86_64-linux-gnu/") #add_library(mongoclient) set(boost_use_static_libs off) set(boost_use_multithreaded off) set(boost_use_static_runtime off) find_package(boost 1...

Meteor mobile app. Custom site authentication and Access-Control-Allow-Origin -

i need develop mobile app , allow authenticate via corporate site via soap. tried send get/post requests different sites (from client code) , observing same error, like i20150602-18:54:17.186(3) (android:http://meteor.local/:0) xmlhttprequest cannot load http://google.com/. origin http://meteor.local not allowed access-control-allow-origin. i tried create mobile-config.js file following content app.accessrule("*"); but didn't help. i don't know why setting doesn't trick , i'm not sure should authenticate client or server code? i'm using meteor 1.1.0.2 this has been issue meteor cordova apps. according response on https://github.com/meteor/meteor/issues/4132 can use browser policy package solve issue: meteor add browser-policy add bit of code in: server side code: browserpolicy.content.alloworiginforall("http://meteor.local");

javascript - Jquery excel type dynamic formulas calculation -

i generating financial analysis , generate dynamic formula chart of accounts. example cash -- input able field short term investments -- input able field liquid assets -- formula field , generate formula @1~cº + @2~cº notes receivable -- input able field accounts receivable -- input able field provision debts -- input able field net accounts receivable -- formula field , generate formula @4~cº + @5~cº+@6~cº and on... i calculating on text box focusout calculate_year . function calculate_year(thisobj) { var obj; //intiate vaiables var year_formulatxt = "",resultexp ="",lastpos ="",sequencetypeposc="",sequencetypeposp="",sequencetypeposf="",coacode="",coavalue="",ratio_formulatxt = ""; var ratio_formulatxt = "",coacode_p="",coavalue_pyear_formula = "",ratio_...