Posts

parallel processing - MPI_TEST: invalid mpi_request -

i want test if mpi_isend , mpi_irecv have run fine. i have 2 request(argument) vectors: 1 vector mpi_isend, other mpi_irecv. the point program runs fine until started run cycle mpi_test. have tried 2 numbers (do i=1,2), still same error. fatal error in pmpi_test: invalid mpi_request, error stack: pmpi_test(166): mpi_test(request=0x7fff93fd2220, flag=0x7fff93fd1ffc, status=0x7fff93fd2890) failed pmpi_test(121): invalid mpi_request integer :: ierr, myid, istatus(mpi_status_size), num, i, n integer,parameter :: seed = 86456, numbers=200 integer :: req1(numbers), req2(numbers) logical :: flag call mpi_comm_rank(mpi_comm_world, myid, ierr) if (myid==0) n=1, numbers req1(n)=0 req2(n)=0 num=irand() call mpi_isend(num,1,mpi_integer,1,1,mpi_comm_world,req1(n),ierr) call mpi_irecv(best_prime,1,mpi_integer,1,0,mpi_comm_world,req2(n),ierr) end else if (myid==1) i=1, numbers call mpi_test(req2(i),flag,istatus,ie...

Breeze - not return changes introduced in BeforeSaveEntities to client? -

i struggling find solution conceptual problem re beforesaveentities. in short, want avoid server informing client entity deletions introduce in savemap in beforesaveentities. the longer story follows below :-) data structure: have entity called primarydata, has parallel loosely coupled entities called secondarydata. each primarydata, there exists number of secondarydata's. business logic: whenever user deletes primarydata on client, server should delete related secondarydata. security requirement: client should not informed secondarydata's have been deleted. implementation: have implemented beforesaveentities function, catch deletion of primarydata, , add additional entityinfo's secondarydata's want delete savemap. things work expected. both primarydata , secondarydata's deleted. problem: unfortunately, xhr shows return package client includes secondarydata's have been deleted. violates security requirement above, client should not told ...

javascript - Send request on unload and/or beforeunload doesn't work on mobile? -

i know issue has been answered on cannot make work on mobile browsers. i need send request server when web page closed (tab or window closed). here do: window.addeventlistener("unload",function(e) { var pl = "bla=blabla"; var req = new xmlhttprequest(); req.open("post","http://myapi/myendpoint",false); req.setrequestheader("content-type","application/x-www-form-urlencoded"); req.send(pl); },false); window.addeventlistener("beforeunload",function(e) { var pl = "bla=blabla"; var req = new xmlhttprequest(); req.open("post","http://myapi/myendpoint",false); req.setrequestheader("content-type","application/x-www-form-urlencoded"); req.send(pl); },false); this works fine on desktop (chrome , firefox) if page either refreshed or tab/window closed. on mobile, works w...

maven - Artifactory: Deploying Snapshots with Ant -

Image
i deploying artifacts ant build artifactory using these targets: <project name="myapp" default="main" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant"> . . . <path id="maven-ant-tasks.classpath"> <fileset refid="maven-ant-tasks.fileset" /> </path> <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" /> <target name="define-artifact-properties"> <property name="artifact.group" value="my.org" /> <property name="artifact.name" value="myapp" /> <property name="artifact.version" value="1.9.0-devel.snapshot" /> <property name="artifact.type" value="jar" /> <property name="artifact.dir" value="${build....

android - Dynamically put values to a text view in a Layout and put that layout inside another layout. -

i tried , getting java:null pointer exception @ line try put 1 layout another. this mainactivity.java: import java.util.arraylist; import java.util.set; import android.os.bundle; import android.app.activity; import android.content.context; import android.content.sharedpreferences; import android.content.sharedpreferences.editor; import android.view.layoutinflater; import android.view.menu; import android.view.view; import android.widget.spinner; import android.widget.tablelayout; import android.widget.textview; public class mainactivity extends activity { private sharedpreferences sp; private tablelayout enterstocktablelayout; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); arraylist<itemdata> list= new arraylist<itemdata>(); list.add(new itemdata("indian rupee",r.drawable.india)); list.add(new itemdata("us dollar",r.drawable...

Spring integration DSL creating Sftp OutBound Adapter in java 1.7 -

i have created sftp outbound flow in spring dsl have created 1 more file inbound flow on top of sftp outbound flow files local directory , send message channel responsible copying file remote directory when running code no file getting copied in remote directory. getting stuck in point, can 1 please provide pointer not able proceed. this session factory... @autowired private defaultsftpsessionfactory sftpsessionfactory; @bean public defaultsftpsessionfactory sftpsessionfactory() { defaultsftpsessionfactory factory = new defaultsftpsessionfactory( true); factory.sethost("111.11.12.143"); factory.setport(22); factory.setuser("sftp"); factory.setpassword("*******"); return factory; } this sftp outbound flow.. @bean public integrationflow sftpoutboundflow() { return integrationflows .from("tosftpchannel") ...

javascript - d3 - drag node groups in radial tree layout without jumping to new position on click -

following on this question , i'm trying drag nodes (containing groups of circles , text) combined units without them first jumping new position when click. i've tried implementing suggested technique radial tree layout ( jsfiddle ) hitting wall. suspect because radial layout using different x,y system usual x,y system. i've been trying work rotate var drag can't quite seem crack it. should focusing? thanks. var drag = d3.behavior.drag() .on("drag", function(d,i) { d.x += d3.event.dx d.y += d3.event.dy d3.select(this) .attr("transform", function(d,i){ return "translate(" + d.x + "," + d.y + ")" }) }); it because of different x,y transforms used in radial view. changed drag function normal x,y coordinates var drag = d3.behavior.drag() .on("drag", function(d,i) { var translatecoords = d3.transform(d3.select(this)...