Posts

Showing posts from June, 2013

How to write a list of tuple in python with header mapping -

Image
i have process python list of tuples each tuple contains header name below- want tuple mapped respectives header in tuple. [[(u'index', u' broad market indices :')], [(u'index', u'cnx nifty'), (u'current', u'7,950.90'), (u'% change', u'0.03'), (u'open', u'7,992.05'), (u'high', u'8,008.25'), (u'low', u'7,930.65'), (u'prev. close', u'7,948.90'), (u'today', u''), (u'52w high', u'9,119.20'), (u'52w low', u'7,539.50')], [(u'index', u'cnx nifty junior'), (u'current', u'19,752.40'), (u'% change', u'0.73'), (u'open', u'19,765.10'), (u'high', u'19,808.25'), (u'low', u'19,629.50'), (u'prev. close', u'19,609.75'), (u'today', u''), (u'52w high', u'21,730.80'), (u...

opticalflow - How to use the extended kalman filter for IMU and Optical Flow sensor fusion? -

i building quadcopter , using pixhawk autopilot system px4flow sensor attached optical flow data. px4flow high speed smart camera (arm processor) integrated gyro , height sensor, , outputs linear velocities internal optical flow algorithm. now, improve on position , velocity estimates using extended kalman filter fuse imu , optical flow data. have derived state model function , state transition matrix prediction step. by problem lies within deriving measurement model/function optical flow velocities, used in update phase of extended kalman filter. believe have derive optical flow algorithm how, far have gotten. *edit: here article describing px4flow unit , how calculates velocities. (forgot add link, it's there) https://pixhawk.org/_media/modules/px4flow_paper.pdf i'll assume (since don't give details) state vector contains speed , position in world coordinates. optical flow returns xy speed in body coordinates, have rotate according yaw angle speed in ...

javascript - Error getting the index of a TR with jQuery -

i have problem index of table. index jquery index() method, returns 1. html table: <table id="tabla_materia" cellspacing="0" cellpadding="0" style="width:500px; margin-top:50px;"> <tbody> <tr> <th colspan="6"> lista de materia prima </th> </tr> <tr> <th class="pk"></th> <th>codigo</th> <th>codigo secundario</th> <th>producto</th> <th>cantidad requerida</th> <th>cantidad segun formula</th> <th>cantidad total</th> <th>costo unitario</th> <th>costo total</th> </tr> <tr class="ptype"> <td colspan="10"><strong>3.1.01.1 carnes - vacuna...

javascript - three.js r72 no longer supports THREE.LinePieces, how to merge multiple disconnected lines with THREE.LineSegments? -

i updated three.js r72 , getting following warning in console concerning three.linepieces ... three.line: parameter three.linepieces no longer supported. created three.linesegments instead. the lines appear disconnected dispite warnings, however, following example, if update three.linepieces three.linesegments disconnected lines become connected. var linematerial = new three.linebasicmaterial({color: 0x000000, linewidth: 1}); var linegeom = new three.geometry(); var xstrt = 0; (nn=0; nn<numlines; nn++) { linegeom.vertices.push(new three.vector3(xstrt, -5, 0)); linegeom.vertices.push(new three.vector3(xstrt, 5, 0)); xstrt += 5; } var line = new three.line(linegeom, linematerial, three.linepieces); // seperate lines, warnings //var line = new three.line(linegeom, linematerial, three.linesegments); // connected 1 line :( am expected create separate geometries (containing 2 vertices) each line segment or possible merge multiple line segments 1 geometry had lin...

objective c - Type "SwiftClass" cannot conform to protocol "ObjcProtocol" because it has requirements that cannot be satisfied -

i have objective-c protocol i'm trying implement in swift class. example: @class anobjcclass; @protocol objcprotocol <nsobject> - (void)somethingwithanargument:(anobjcclass *)arg; @end when try conform in swift class this: @objc class swiftclass: nsobject, objcprotocol { // ... } i following scary compiler error: type "swiftclass" cannot conform protocol "objcprotocol" because has requirements cannot satisfied. how resolve this? ensure classes referenced protocol included in bridging header. this error happens when 1 of types used in protocol (the protocol itself, return type, argument type) not included in swift bridging header. objective-c classes can happily implement protocol because of @class anobjcclass forward declaration, appears swift classes can't implement protocols use classes forward-declared.

html - Convert Fading Black Separator From "-webkit-gradient" To "linear-gradient" -

i have gradient using converted -webkit default linear-gradient. have tried using of css generating tools online import code in order see other browser specific variants, reason when import code gradient in results section becomes white. background: -webkit-gradient(linear, 0 0, 100% 0, from(white), to(white), color-stop(50%, black)); jsfiddle sample use .sexy_line { background: linear-gradient(to right, white, black, white); } see mdn article more info on linear gradients. demo .sexy_line { margin: 25px 0; height: 1px; background: black; background: linear-gradient(to right, white, black, white); } <div class="sexy_line"></div>

ios - To close NSStream objects before resigning active -

i have nsinputstream , nsoutputstream scheduled in non-main-thread run loop. i'm using cfstreamcreatepairwithsockettohost. remote endpoint external device communicates app tcp on wifi. when applicationwillresignactive called, want close these. want guaranteed close, because app may want communicate same device, , device accepts 1 tcp connection. additional information: it frequent occurrence in context of device multiple apps may need communicate device. i have tried using performselector:onthread:withobject:waituntildone: (with waituntildone:yes) in applicationwillresignactive. doesn't work, , in cases seems selector not called. my understanding can't close nsstream objects or destroy task queue main thread. i can not change how device receives connections. listens on 1 address/port tcp connections, , allows 1 connection (it doesn't multiplex connections source port). use dispatch_sync() background queue.

xml - How do I create an xsl template that can write the element's name and value as a KVP then process all sibling and child nodes recursively -

so need create transform can return name of element , value in kvp format tab delimeter. trick is, need node , child nodes returned in teh list. ordering not important xml sample: <holding id="holding_1"> <holdingtypecode tc="2">policytype</holdingtypecode> <holdingstatus tc="3">proposedstatus</holdingstatus> <policy id="policy_1"> <polnumber>0123456789</polnumber> <lineofbusiness tc="1">lifebusiness</lineofbusiness> </policy> </holding> in xslt have call template: <xsl:call-template name="list_siblings_and_children_recursive"> <xsl:with-param name="parent" select="//holding"></xsl:with-param> </xsl:call-template> and template itself: <xsl:template name="list_siblings_and_children_recursive"> <xsl:param name="parent"></xsl:param> <!-- tab...

ms access - Why doesn't my InStr Work? -

i using expression in calculated field instr(-1,"beejal larkin"," ") when submit it, each field filled #func!. don't understand why is. thanks in advance it should read: =instr(1,"beejal larkin"," ")

css - Align text inside SVG -

i have adobe illustrator. when export graphic svg, text part looks like: <style type="text/css"> .st6{fill:#ffffff;} </style> <text id="text2" transform="matrix(1 0 0 1 153.873 305.2743)" class="st6">default text</text> this text aligned center. change text inside browser javascript - so, replace "default text" "new text". text not aligned center more. if change text, how can achieve aligned center? have try adding "text-align:center" st6 class or adding property text element: text-anchor="middle" but doesn't work. idea? one interesting other example don't understand. here part of svg template have: <g id="text_4"> <g> <defs> <rect id="svgid_10_" x="9.96" y="273.53" width="170" height="15"/> </defs> <clippath id="svgid_11_"> ...

javascript - Passing values in forms -

the values input through dropdown menu arent getting reflected in variables event1 , event2 when tried global declarations. how store value both variables , pass javascript? lot. <!doctype html> <html> <head> <title> correlation not imply causation </title> <script type="text/javascript"> var event1,event2; function main(e11,e22) {event1=e11; event2=e22;} window.onload = function () { var crimerain=[{x:1780330,y:42053.0},{x:1716120,y:51667.5 },{x: 1832015 ,y: 47647.5 },{x: 1822602 ,y: 51539.5 },{x: 1878293 ,y: 49135.3 },{x: 1989673 ,y: 52750.1 },{x: 2093379 ,y: 48508.1 },{x: 2121345 ,y: 42877.4 },{x: 2224831 ,y: 53483.1 },{x: 2325575 ,y: 49935.8 },{x: 2387188 ,y: 45813.1 },{x: 2647722 ,y: 53521.8 }]; var crimeexport=[{x:1780330,y:49},{x:1716120,y:59 },{x: 1832015 ,y: 77 },{x: 1822602 ,y: 100 },{x: 1878293 ,y: 122},{x: 1989673 ,y: 150 },{x: 2093379 ,y: 195 },{x: 2121345 ,y: 165 },{x: 2224831 ,y: 226 },{x: 23255...

angularjs - Using the ui-select tagging with angular formly passing a function to attribute tagging -

i have created custom template angular-formly using ui-select tagging input: formlyconfig.settype({ name: 'ui-tagging', extends: 'select', template: '<ui-select multiple tagging="" tagging-label="(\'new\')" ng-model="model[options.key]" theme="bootstrap" ng-required="{{to.required}}" ng-disabled="{{to.disabled}}"> <ui-select-match placeholder="{{to.placeholder}}"> {{$select.selected[to.labelprop || \'name\']}} </ui-select-match> <ui-select-choices repeat="option in to.options | filter: $select.search"> <div ng-bind-html="option | highlight: $select.search"></div> </ui-select-choices> </ui-select>', }); here problem, want set function attribute tagging transform tags, example in ui-select docs. <ui-select tagging="tagtransform" ..... plunker ui-select example:...

javascript - How to force table width to equal to its child td width and allow table to extend beyond viewport width -

Image
i have table dynamic row + column. <table> <tr> <td>column 1</td> <td>column 2</td> <td>column 3</td> </tr> <tr> <td>11</td> <td>12</td> <td>13</td> </tr> <tr> <td>21</td> <td>22</td> <td>23</td> </tr> </table> i'd have td width equal content. @ moment, table width expands according td width. however, total table width constrained page width once number of column increases. i'm trying find way maintain auto td width allow table expand beyond page width. attached simple drawing of meant below: thanks in advance! add style: table { white-space: nowrap; //prevent wrapping } fiddle

javascript - Getting dynamic value from URL -

i tried multiple ways splits, substrings value of employeeid below, there effective regex way? /api/getvalue;id=12345;age:25;employeeid=4?test=true&othervalues=test i want employee id value 4 any appreciated you use simple regular expression match on employeeid : // extract employeeid regex var employeeid = url.match(/;employeeid=(\d+)/, url)[1]; console.log(employeeid); >>> 4 or if you'd function value can selected use following: function getvalue(url, name) { var m = new regexp(';' + name + '[=:](\\d+)', 'g').exec(url); if (m) { return m[1]; } return ''; } var age = getvalue( '/api/getvalue;id=12345;age:25;employeeid=4?test=true&othervalues=test', 'age' ); console.log(age); >>> 25

Java's behavior with int and other integer types -

this question has answer here: performance loop integer vs long index 2 answers i wrote following code test how long takes java perform simple task of counting 0 huge number: public static void main( string[] args ) { for( long k = 0 ; k <= 1000000000000000000l /* 18 zeros */ ; k++ ) ; system.out.println( "finished" ); } i ran program , waited hours. after waiting long had no way other referring calculations estimate running time, , simple calculation convinced can take more 100 years (depending on cpu) program print message "finished"! but after trying following code appears take time above code finish, unexpectedly saw message "finished" printed in fraction of second after ran program! public static void main( string[] args ) { int j; for( int = 0 ; <= 1000000000 /* 9 zeros */ ; i++ ) for( ...

java - Converting line of bytes to string -

i created program takes user input , converts char array. turns each char in array it's corresponding byte value, , prints of them in single line. i creating second program want able paste line of bytes user input, , have display original message in ascii (english) here code far: import java.util.scanner; public class messagedecoder { public static void main(string[] args) { system.out.println("please enter encrypted message , press enter: "); scanner reader = new scanner(system.in); byte b = reader.nextbyte(); } } i have tried concatenating line of bytes string, this system.out.println(b + ""); but (probably obviously) didn't work. what need do? just try system.out.println((char)b); however comments far can understand have "encrypted char" in numbers, hence has become 65 (2 bytes 6 , 5). problem of "decrypting" have...

c# - Could not load type 'SAS.LanguageServiceCarriageControl' from assembly -

in addition using integration components of sas enterprise edition, using parts of following project found on github connect sas server. goal here command server run programs on schedule. however, programs need modified each time, why attempting trigger them run in manner. however, keeps throwing error @ lang.flushloglines. https://github.com/cjdinger/sasharness sas.workspace ws = server.workspace; list<string> results = new list<string>(); array ccs; array linetypes; array loglines; int maxlines = 100; sas.languageservice lang = (sas.languageservice)ws.languageservice; array linesvar = (array)new string[] { program_text }; lang.submitlines(ref linesvar); //throws error here lang.flushloglines(maxlines, out ccs, out linetypes, out loglines); (int = 0; < loglines.length; i++) { results.add((string)loglines.getvalue(i)); } after bit of research found following thread recommended make sure required dlls referenced in project. mystery here have them reference...

html - CSS Inheritance and float:left issues -

i new css , have few questions based on code below: 1) why bottom-border , background color cut off when said width= 100%? 2) why second unordered list (with class "dropdown") within first not inherit elements declared parent unordered list (with class "tabs")? 3) why first unordered list (with class "tabs") not appear horizontally when run in browser? i've tried using 'float: left' , 'display: inline' lines neither work, or separately html: <!doctype html> <html> <head> <title> random web page </title> <link rel="stylesheet" type="text/css" href="basic styles test.cpp"> </head> <body> <div class="navbar"> <ul class="tabs"> <li>pancakes</li> <li>waffles</li> <li>bacon</li> ...

swift - Metal iOS gives compile error -

import uikit import metal import quartzcore class viewcontroller: uiviewcontroller { var device: mtldevice! = nil var metallayer: cametallayer! = nil override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. device = mtlcreatesystemdefaultdevice() metallayer = cametallayer() // 1 metallayer.device = device // 2 metallayer.pixelformat = .bgra8unorm // 3 metallayer.framebufferonly = true // 4 metallayer.frame = view.layer.frame // 5 view.layer.addsublayer(metallayer) // 6 } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } } when have in viewcontroller.swift, error "use of undeclared type cametallayer " though i've imported metal , quartzcore. how can code work? metal code doesn't compile on simulator. try compiling device.

android - Value in JSON Object not being accessed -

i have json object contacts looks {"email":"mark@hookahstationbcs.com","phone":"+19796918899"} in code grab phone key , able it's value, when print out email value says it's null, , in code below doesn't pass termination case. know why? if(nextactivityobject.getjsonobject("contacts") != null){ log.d("next activity object not empty", "not empty"); contacts = nextactivityobject.getjsonobject("contacts"); if(contacts.getstring("phone") != null){ phone = contacts.getstring("phone"); log.d("phone passed", phone.tostring()); intent.putextra("phone",phone); } else if(contacts.getstring("email") != null){ email = contacts.getstring("email"); log.d("this email pass", email.tostring()); intent.putextra("email", email); } } i think ...

c++ - QTimer setInterval without resetting remainingTime -

i have app written in qt uses qtimer. it's game , actions controlled timer. game includes ability increase\decrease game speed. code increasing speed is timervalue -= speedupvalue; if (timervalue < maxspeed) { timervalue = maxspeed; } timer -> setinterval(timervalue); speedupvalue and maxspeed constants. same code used decreasing speed. problem setinterval resets internal timer , therefore if keep rapidly increasing or decreasing speed game never proceeds because remainingtime being reset. there way set remainingtime manually or change interval without resetting it? you can omit timer object altogether, , instead use static method qtimer::singleshot(...) , , set new single shot on every timer event timervalue . no matter how timervalue modified, each timer cycle completed old value , scheduled current value. as ra mentioned, can achieve same thing keeping timer object, moving setinterval() timer event, same thing above, keepin...

java - How to retrieve a list/result from a QueryDSL -

i'm using query dsl version 4.0.4 here's dependencies; <dependency> <groupid>com.querydsl</groupid> <artifactid>querydsl-apt</artifactid> <version>4.0.4</version> <scope>provided</scope> </dependency> <dependency> <groupid>com.querydsl</groupid> <artifactid>querydsl-jpa</artifactid> <version>4.0.4</version> </dependency> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> <version>1.6.1</version> </dependency> and here's snippet of querydsl query. jpqlquery query = new jpaquery(em); qquotation quotation = qquotation.quotation; query.from(quotation).where(quotation.ticketnumber.like("this")) however query method doesn't have list() method when line .where(quotation.ticketnumber.like("this")) here's...

c - exec() is not throwing an error, but not running the other executable. Syntax error? -

i'm trying use fork() , exec() run program resides in same directery. compiler not complaining, program trying call using execl() not being run. tips? thank you! pid = fork(); if (pid == -1) { fprintf (stderr, "error\n"); exit(1); } else if (pid > 0) { wait(&status); } else { execl("./expo.c", "./expo", x, n, (char*) null); _exit(exit_failure); } i have tried few different versions of exec() , none have worked. edit: have changed execl("expo","expo",&x,&n,(char*)null); , though still unsure why works based on man pages. man page says first argument should path, not executable. also, why not need ./ second argument if need run executable in terminal? i have got working correctly, here changed. instead of casting arguments (x , n) ints passing them child, passed them chars , casted them ints in child process. if(pid==-1){ fprintf (stderr, "error\n"); ...

redis - Error: Waiting for group to become stable, current operations: creating: 4 -

in tutorial real-time data analysis kubernetes, redis, , bigquery on google cloud platform , when run: $ kubernetes/cluster/kube-up.sh , terminal shows "waiting group become stable, current operations: creating: 4". problem? have waited results half day , tried several times, does't work! https://github.com/kubernetes/kubernetes/issues/13407 appears relevant. sounds may need more cpu quote project. please feel free post details of setup in issue additional help.

php - Enable/ disable button when a div collapse -

i have code collapsing using bootstrap : <a href="javascript:void(0)" data-toggle="collapse" data-target="#foo">edit</a> <div id="foo" class="collapse"> text. </div> <button type="button" class="continue">continue</button> how make continue button enable when foo is collapse out, , dissable when foo collapse in? according official documentation , collapse plugin in bootstrap fires several events can hook onto. the ones interested in shown.bs.collapse , hidden.bs.collapse . fire when either foo collapsed out or collapsed in respectively. now have hook onto events. $('#foo').on('hidden.bs.collapse', function () { $('.continue').attr('disabled', 'disabled'); }); $('#foo').on('shown.bs.collapse', function () { $('.continue').removeattr('disabled'); });

mysql - get records from table starting from row 5 onwards -

i have mysql database , want records starting row 5 onwards. sing right select * categories status = 1 limit 5 18446744073709551615 order sortorder asc but throwing me error error executing database query. you have error in sql syntax; check manual corresponds mysql server version right syntax use near '18446744073709551615 order sortorder ' @ line 6 also not sure @ point if correct way of doing or not thanks you require offset example: select table limit $limit offset $offset; //or alternatively select table limit $offset,$limit; regarding error: remove number - in first place? your statement should be: select * categories status = 1 offset 5 order sortorder asc

xcode - Why Doesn't IOS Core BLuetooth Respect Communication Rate -

i writing core bluetooth app ios. connecting ti device custom firmware. firmware developer developed publish data 12 times second. using notify property data, seems grabbing data 30 times per second. causing power consumption, , specific reasons, can't pull @ own rate need pull @ rate of device publishing. the firmware developer created windows application doesn't have problem without having hard coded read rate. on me find issue. have recommendations? for describing, on system swift side receiving notifications, there no control on rate your device using update specific characteristic. but, devices may have command on own high level protocol set advertising interval. that's manufacturer. if think system advertising @ different rate windows app have mentioned, suggest take see if there initialization code app may doing when starts (thus setting rate). need windows app's source code, or @ least manufacturer's documentation device's protoc...

swift - Custom Controls for iOS are always offset -

i'm making few custom controls ios. each of these controls draws various layers in drawrect , every single 1 of layers seems offset reason. they're suppose centered in view. here's example of pie chart control: override public func drawrect(rect: cgrect) { super.drawrect(rect) _valuelayers.foreach { (sublayer : calayer) -> () in sublayer.removefromsuperlayer() } _valuelayers.removeall(keepcapacity: false) let mindim = min(rect.size.width, rect.size.height) let maxslicewidthscale : cgfloat = self.slicewidthscales.count > 0 ? min(self.slicewidthscales.sort(>).first!, cgfloat(1)) : kdefaultslicewidthscale let maxslicewidth = maxslicewidthscale * mindim * 0.5 let center = rect.center() let sum : float = self.values.reduce(0, combine: { $0.floatvalue + $1.floatvalue }).floatvalue let maxradius = (mindim - maxslicewidth) * 0.5 var currentstartangle = self.startangle var x = 0; x < self.values.count; x++...

java - Hibernate+Spring SessionFactory configuration -

what right way configure sessionfactory? if way: <tx:annotation-driven transaction-manager="transactionmanager" /> <bean id="sessionfactory" class="org.springframework.orm.hibernate5.localsessionfactorybean" p:datasource-ref="datasource" p:packagestoscan="ua.com.javer.flowerexpert"/> <bean id="transactionmanager" class="org.springframework.orm.hibernate5.hibernatetransactionmanager" p:sessionfactory-ref="sessionfactory" /> i error: nested exception org.hibernate.hibernateexception: not obtain transaction-synchronized session current thread and if change annotationsessionfactorybean : <bean id="sessionfactory" class="org.springframework.orm.hibernate3.annotation.annotationsessionfactorybean" p:datasource-ref="datasource" p:packagestoscan="ua.com.javer.flowerexpert...

liferay aui - AlloyUI selector for multiple ids -

i want call function on blur of 2 elements, can work single element. i used a.one() method select elements. here code: aui().use('aui-base','aui-io-request', function(a){ a.one('#<portlet:namespace/>hospitalname', '#<portlet:namespace/>date').on('blur', function(){ }); }); to select multiple elements id in alloyui (and yui), use node.all method , a css selector #id1, #id2, #id3 . for example, solution this: a.all('#<portlet:namespace/>hospitalname, #<portlet:namespace/>date').on('blur', function(event){ // event.target blurred element. /* code here... */ } ); see runnable example more details: yui().use('node', function(a) { a.all('#hospitalname, #date').on('blur', function(event) { var input = event.target; document.getelementbyid('output').innerhtml = input.get('id') + ...

qbxml - How can I get the list list of all Invoices,Estimates and Payments for a particular Customer in Quickbooks offline? -

i want provide customer listid through qbxml , list of invoices, estimates , payments under particular customer. qbxml request give me this? please help. you should refer quickbooks osr qbxml reference: https://developer-static.intuit.com/qbsdk-current/common/newosr/index.html there additional samples here: http://www.consolibyte.com/docs/index.php/example_qbxml_requests if refer quickbooks osr, you'll find unsurprising qbxml requests named: invoicequeryrq estimatequeryrq receivedpaymentqueryrq an invoicequeryrq give invoices, estimatequeryrq give estimates, , on , forth. may want check out transactionqueryrq queries types of transaction @ once (but aware give summary data, , not detailed data line items, etc. other more specific request types give you). the osr show you can filter these queries invoices, estimates, or payments specific entity (e.g. specific customer). <entityfilter> <listid >idtype</listid> <!-- or ...

r - How to use fread() as readLines() without auto column detection? -

i have 5gb .dat file (> 10million lines). format of each line aaaa bb cccc0123 xxx kkkkkkkkkkkkkk or aaaaabbbcccc01234xxxkkkkkkkkkkkkkk example. because readlines has poor performance while reading big file, choose fread() read this, error occurred: library("data.table") x <- fread("test.dat") error in fread("test.dat") : expecting 5 cols, line 5 contains text after processing cols. due 1 or more fields having embedded sep=' ' and/or (unescaped) '\n' characters within unbalanced unescaped quotes. fread cannot handle such ambiguous cases , lines may not have been read in expected. please read section on quotes in ?fread. in addition: warning message: in fread("test.dat") : unable find 5 lines expected number of columns (+ middle) how use fread() readlines() without auto column detecting? or there other way solve problem? here's trick. use sep value know not in file. doing forces fread() rea...

update gridview column values from another form in c# winform? -

Image
i have 2 winforms mainform , gridform in mainform.cs executing cmd rmdir command 1 one using foreach now want show list of directory name , status name wether process or not. foreach (var item in listbox1.items) { system.diagnostics.process.start("cmd.exe", "/c rmdir " + item); // want show inside gridview in gridform folder done - uodate status done var p = proc.exitcode; string status; if (p == 1){ status = "fail"} else {status = "success"} // how pass status text value gridform here? tried // grid view bind pass items , status ? gridform statusform = new gridform(listbox1.items); gridform.showdialog(); } problem i'm unable pass status value gridform gridform.cs private void gridform_load(object sender, eventargs e) { datatable dt = new datatable(); dt.columns.add("name"); foreach (string items in _itemlist) {...

rx java - Sequence of Retrofits' request where next request depends on result of previous request -

i have sequence of retrofit requests: observable.interval(0, integer.max_value - 1).concatmap(index -> index == 0 ? getrequesta() : getrequestb()).takeuntil(<condition>) request b has parameters must obtain result of request , etc a -> b(p a.result) -> b1(p b.result) -> bn(p b[n-1].result) how can that? because each event use previous ones, scan operator you're looking for. the accumulator combined observable "up current event". here's sample implementation: // dummy/sample getrequestb func1<integer, observable<integer>> getrequestb = -> observable.<integer>create(sub -> { sub.onnext(2*i+1);sub.oncompleted();}); observable.range(0, integer.max_value -1) .scan(observable.just(0), (acc, rangeidx) -> acc.concatmap(getrequestb::call)) .concatmap(o -> o) .takeuntil(i -> > 100000) .subscribe(system.err::println);

WordPress - No Background Images on Live Server -

i having tons of trouble issue. i'm taking wordpress course, , i'm on final part... moving localhost live server. after doing so, however, background images not appear. @ first, whole media library broken, able fix that. can't seem figure out issue background images though. i've been scouring multiple forums looking answer before posting here... can't seem find it, or understand it, thought i'd ask regarding specific situation. here link current, live wordpress site: http://176.32.230.251/znbootstraptowordpress.com/ and here link static site, can see background images missing: http://176.32.230.251/b2wzachnagatani.com/ thanks in advance help! check style.css on /themes/bootsrap2wordpress/style.css find /wp-content/themes/bootsrap2wordpress/assets/img/ there , replace ./assets/img/ your problem solved . full css

ms access - SQL. Combining two queries with aggregate functions and WHERE conditions -

i relatively new sql , ran problem can't seem solve. using access , tried work iif, doesn't or don't know how. i have got 2 queries work fine on own, how can combine them one? biggest problem seems to me have 2 statements cannot seem 1 query. select code, sum(costs)/sum(quantity) simple_cost_base shares event = 'buy' group code; select code, (sum(costs) + sum(drp_pay))/sum(quantity) normal_cost_base shares event <> 'sell' group code; my desired result table 3 columns. 1 code, 1 simple_cost_base , third normal_cost_base i think should work: select shares.code, sum(iif([event]<>"buy",[costs]/[quantity],0)) simple_cost_base, sum(iif([event]<>"sell",[drp_pay]/[quantity],0)) normal_cost_base shares group shares.code;

java - Spring web project failure -

Image
i have spring helloworld project developed me , library management used maven in project. intention see how spring handles url requests. i think developed correctly but, outcome not achieved. i have entered controller class, web.xml file , mvc-dispatcher-servlet.xml files here. controller class import org.springframework.stereotype.controller; import org.springframework.ui.modelmap; import org.springframework.web.bind.annotation.requestmapping; import org.springframework.web.bind.annotation.requestmethod; @controller @requestmapping("/welcome") public class accesscontroller { //@requestmapping(value = {"/welcome"}, method = requestmethod.get) @requestmapping(method=requestmethod.get) public string printwelcome(modelmap model){ system.out.println("there in access atempt"); model.addattribute("message","hello spring web mvc !!!"); return "hello"; } } web.xml <?x...