Posts

Showing posts from March, 2012

javascript - ng-repeat not working until after submit button is hit twice -

i messing google maps api , using angular, , having issue binding data api variable , displaying correctly ng-repeat. ng-repeat supposed list name property of place objects, not unless enter same zipcode twice. here html: <!doctype html> <html ng-app = "openapp"> <head> <meta charset="utf-8"> <title>open sesame</title> <script src = "http://maps.googleapis.com/maps/api/js? key=aizasyaro1n-5w8xxpblr_adxv6ul1vlik3_pry&libraries=places"></script> <script src = "vendors/angular/angular.min.js"></script> <script src = "assets/scripts/composite.all.min.js"></script> <link rel = "stylesheet" href = "assets/styles/style.css" /> </head> <body ng-controller = "maincontroller main"> <h1>is open?</h1> <!-- <button ng-click = ""></button> --&

How to implement batch update using Spring Data Jpa? -

how implement batch update using spring data jpa? have goods entity, , diff user level there diff price,e.g. goodsid level price 1 1 10 1 2 9 1 3 8 when update goods want batch update these prices, below: @query(value = "update goodsprice set price = :price goodsid=:goodsid , level=:level") void batchupdate(list<goodsprice> goodspricelist); but throws exception, caused by: java.lang.illegalargumentexception: name parameter binding must not null or empty! named parameters need use @param query method parameters on java versions < 8. so how implement batch update using spring data jpa correctly? i think not possible spring data jpa according docs . have @ plain jdbc, there few methods regarding batch insert/updates . there nice ebook covering topic.

CakeDC Users plugin: Use email field as a username -

is possible configure cakedc's users plugin use email field username? by default there both username , email fields in users plugin , work great! use email username authentication, user registration can simplified. i have tried overriding usersauthcomponent loading auth component in appcontroller , login stops working , says " wrong username or password ". public function initialize() { parent::initialize(); $this->loadcomponent('flash'); $this->loadcomponent('auth', [ 'loginaction' => [ 'plugin' => 'cakedc/users', 'controller' => 'users', 'action' => 'login', ], 'authenticate' => [ 'all' => [ 'scope' => ['active' => 1] ], 'cakedc/users.rememberme', 'form' => [

laravel - Have a queue job always running -

i have queue job need have running. that means when job finished processing, should start job on again. how can this? here's job: <?php namespace app\jobs; use app\user; use app\post; use app\jobs\job; use illuminate\contracts\mail\mailer; use illuminate\queue\serializesmodels; use illuminate\queue\interactswithqueue; use illuminate\contracts\queue\shouldqueue; class postjob extends job implements shouldqueue { use interactswithqueue, serializesmodels; protected $user; public function __construct(user $user) { $this->user = $user; } public function handle() { $posts = post::where('user_id', $this->user->id) ->get(); foreach ($posts $post) { // perform actions } } } here's job controller: <?php namespace app\http\controllers; use app\user; use illuminate\http\request; use app\jobs\sendreminderemail; use app\http\controllers\controller; cla

javascript - Codefights: Correct solution but system does not accept it -

experienced codefighters, have started using codefight website learn javascript. have solved task system not accept it. task sum integers (inidividual digit) in number. example sumdigit(111) = 3. wrong code? please me. code function digitsum(n) { var emptyarray = []; var total = 0; var number = n.tostring(); var res = number.split(""); (var i=0; i<res.length; i++) { var numberind = number(res[i]); emptyarray.push(numberind); } var finalsum = emptyarray.reduce(add,total); function add(a,b) { return + b; } console.log(finalsum); //console.log(emptyarray); //console.log(res); } here's faster trick summing individual digits of number using arithmetic: var digitsum = function(n) { var sum = 0; while (n > 0) { sum += n % 10; n = math.floor(n / 10); } return sum; }; n % 10 remainder when divide n 10 . effectively, retrieves ones-digit of number. math.floor(n

javascript - Bootstrap dropdown as select option -

how make bootstrap dropdown act html select option? had problem. partially think bootstrap missing feature in core library, team must have reason not including in library. this first time posting q&a question . if doesn't question, i'm sorry. here extended methods: $.fn.extend({ dropdownconvert: function(b) { b = b || true; console.log(b); this.each(function(){ var $this = $(this); if ($this.prop("tagname") == "select" && typeof $this.attr("id") == "string" && $this.find("option").length > 0) { var temp = '<div class="dropdown" id="' + $this.attr("id") + '"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><span class="selected">

java - Use Http POST and GET to navigate a website -

i want android app establish connection website , through code navigate website in background. understand, first step html source code of site wish navigate managed through code: public class httptest extends activity { private textview tvcode; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.http_layout); tvcode = (textview)findviewbyid(r.id.tvhtmlcode); string s = null; try { gethtmlsourcecode html = new gethtmlsourcecode(); html.execute("http://www.youtube.com"); s = html.get(); } catch (exception e) { e.printstacktrace(); tvcode.settext("error"); } if (s != null) tvcode.settext(s); } private class gethtmlsourcecode extends asynctask<string, integer, string> { @override protected string doinbackground(string... params) { url url = null; httpurlconnection conn = null

matplotlib - Python: Making one legend that spans two subplots -

Image
the basic design i'm looking have 2 scatterplots side side each other, , wanted create 1 legend underneath both subplots spans both of them. rough sketch: i'm able make plots no problem, i'm having hard time getting legend want. here's sample of code have makes 2 scatter plots (i have more data points this, space, i'm including few): import numpy np numpy import array import matplotlib.pyplot plt x = [5,10,20,30] med1 = [9.35,15.525,26.1,48.275] med2 = [8.75,14.025,23.95,41.025] iqr1 = [13.5125,19.95,38.175,69.9] iqr2 = [12.05,19.075,35.075,62.875] plt.subplot(121) plt.scatter(x, med1, color='red', alpha=0.5, label='red stuff') plt.scatter(x, med2, color='blue', alpha=0.5, label='blue stuff') plt.xlim([0,35]) plt.ylim([0,75]) plt.xlabel('channel area') plt.ylabel('median') plt.subplot(122) plt.scatter(x, iqr1, color='red', alpha=0.5, label='more red stuff') plt.scatter(x, iqr2, color=&#

windows - looping through a directory in bat, going up a directory using bat file -

i have bat file part of looks like: set test=test /d %%x in (..\*.%test%) xcopy "%%x" c:\path\%test%\%%x\ /s /e /f xcopy ..\dir c:\path\%test%\dir\ /s /e /f the loop not work, xcopy does. if move contents of directory above current directory , change code remove "..\": for /d %%x in (*.%test%) xcopy "%%x" c:\path\%test%\%%x\ /s /e /f it works. can please tell me why bat script in loop cannot directory? approaching wrong? edit : have changed command after seeing ths answer still not work: for /d %%~nxx in (..\*.%mui%) xcopy "%%~nxx" c:\temp\%test%\%%~nxx\ /s /e /f i receive error: %~nxx unexpected @ time edit #2: still cannot work, commands have looked like for /d %%x in (..\*.%test%) xcopy "%%~nxx" c:\temp\%test%\%%~nxx\ /s /e /f /d %%x in (..\*.%test%) xcopy "%%x" c:\temp\%test%\%%~nxx\ /s /e /f it can. %%x contain ..\xyz.test , not xyz.test , not want in xcopy target. replace %%~nxx

clojure - Suppress namespace when printing ::keyword -

when write (println '(:keyword1 :keyword2)) i following output: (:keyword1 :keyword2) and it's ok. but when write (println '(::keyword1 ::keyword2)) i this (:namespace/keyword1 :namespace/keyword2) and want (::keyword1 ::keyword2) is possible? make symbolic computations lots of keywords , need print them. i tried this: https://clojuredocs.org/clojure.pprint/*print-suppress-namespaces* did not help. thank advise. the printing machinery in clojure based on multimethods. possible take advantage of in order change how namespaced keywords printed. altering way keywords printed may not wise in general though. the multimethod used produce output human consumption called print-method . takes 2 arguments - object print , output writer. dispatch performed on type of object being printed, speaking. possible re-define print-method clojure.lang.keyword type. default implementation of method can used reference. it necessary find

How to replace alphanumeric values in string in iOS? -

i want replace alphanumeric characters except white spaces in string in ios. compact solution? this recent approach: var strin = "apple banana mushroom" let = (strin).componentsseparatedbystring(" ") var strreturn: nsstring str in { let str3 = "".stringbypaddingtolength((str nsstring).length, withstring: "*", startingatindex: 0) strreturn = strreturn.stringbyappendingstring(str3) } expected result is: "****** ****** ********" a simple version that: let strin = "apple banana mushroom" let words = strin.componentsseparatedbystring(" ") var starred: [string] = [] word in words { let stars = array(count: word.characters.count, repeatedvalue: "*").joinwithseparator("") starred.append(stars) } let result = starred.joinwithseparator(" ") result: "***** ****** ********" you can make extension easier usage: extension string { var

jags - Cannot insert node into ...[]. Dimension mismatch -

i'm trying replicate simulations piece of jags code mark ballot, jags sending me error message.. if understood correctly, should have problem indexing house effects each party somewhere, i'm unable find because node seems indexed. have idea error like? model <- jags.model(textconnection(model), data = data, n.chains=4, n.adapt=10000 compiling model graph resolving undeclared variables allocating nodes deleting model error in jags.model(textconnection(model2), data = data, n.chains = 4, : runtime error: cannot insert node houseeffect[1...4,2]. dimension mismatch for replication model <- ' model { for(poll in 1:numpolls) { adjusted_poll[poll, 1:parties] <- walk[pollday[poll], 1:parties] + houseeffect[house[poll], 1:parties] primaryvotes[poll, 1:parties] ~ dmulti(adjusted_poll[poll, 1:parties], n[poll]) } tightness <-

wordpress - How get custom post with taxanomy? -

i know, have use class wp_query , loop, can't custom post database taxonomy, example, category documents. reading, had use template 'taxonomy-{slug}', dont know, how can posts of taxonomy. for example, clicking link http://mysite/categorydocuments/private ' , getting post post_type 'documents' , taxonomy categorydocuments''. how can taxonomy private , put taxonomy in $args wp_query ? please, don`t offer me variable parse link. change value of $post_type custom post type name if using custom post type $post_type = 'post'; // taxonomies post type $taxonomies = get_object_taxonomies( (object) array( 'post_type' => $post_type ) ); foreach( $taxonomies $taxonomy ) : // gets every "category" (term) in taxonomy respective posts $terms = get_terms( $taxonomy ); foreach( $terms $term ) : $posts = new wp_query( "taxonomy=$taxonomy&term=$term->slug&posts_per_page=2" ); if(

python - Creating Grouped bars in Matplotlib -

Image
i have started learning python , using titanic data set practice i not able create grouped bar chart , it giving me error 'incompatible sizes: argument 'height' must length 2 or scalar' import numpy np import pandas pd import matplotlib.pyplot plt df = pd.read_csv("titanic/train.csv") top_five = df.head(5) print(top_five) column_no = df.columns print(column_no) female_count = len([p p in df["sex"] if p == 'female']) male_count = len([i in df["sex"] if == 'male']) have_survived= len([m m in df["survived"] if m == 1]) not_survived = len([n n in df["survived"] if n == 0]) plt.bar([0],female_count, color ='b') plt.bar([1],male_count,color = 'y') plt.xticks([0+0.2,1+0.2],['females','males']) plt.show() plt.bar([0],not_survived, color ='r') plt.bar([1],have_survived, color ='g') plt.xticks([0+0.2,1+0.2],['not_survived','have_survived'

Is it possilbe in Git to simutaneously create a local branch that tracks a currently non-existing remote branch AND switch to it all at the same time? -

i want yes or no answer 1 guys! i've tried command official git documentation says should work, respect question asking: git checkout --track origin/my_branch_name when though, following error: fatal: cannot update paths , switch branch 'my_branch_name' @ same >time. did intend checkout 'origin/my_branch_name' can not resolved >commit? frustrated beyond belief how hard straight forward answers basic git questions. just simple yes or no please!! no complex explanations or, "oh know, if jump through these 50 hoops , ladders can accomplish ask!!" i asking if possible. if answer yes, please share command this. thank you...and sorry being upset. reason why mad though...is because seems me should default behavior branches created locally created on remote repo can push seamlessly without bs overhead. doesn't else feel same or kind of alien on planet using git?? [end rant] no not possible of these operations simul

Python: Check if any file exists in a given directory -

given directory string, how can find if file exists in it? os.path.isfile() # accepts specific file path os.listdir(dir) == [] # accepts sub-directories my objective check if path devoid of files (not sub-directories too). to check 1 specific directory, solution suffice: from os import listdir os.path import isfile, join def does_file_exist_in_dir(path): return any(isfile(join(path, i)) in listdir(path)) to dissect happening: the method does_file_exist_in_dir take path. using any return true if file found iterating through contents of path calling listdir on it. note use of join path in order provide qualified filepath name check. as option, if want traverse through sub-directories of given path , check files, can use os.walk , check see if level in contains files this: for dir, sub_dirs, files in os.walk(path): if not files: print("no files @ level")

java - NullPointerException during writeObject() while using Nimbus Look and Feel -

i have 4 classes: testgui , mainmenubar , mainframe , projecttoadd . mainframe , projecttoadd implements serializable. when click on new>project in mainmenubar want create new project, new dir , in dir write serializable object. when object has been writen nullpointerexception (see stacktrace @ end). if remove , feel part of code in main method not error more... i'm using netbeans ide 8.0.2. testgui code: package testgui; import javax.swing.uimanager; import javax.swing.uimanager.lookandfeelinfo; public class riskmanagergui { public static void main(string[] args) { java.awt.eventqueue.invokelater(new runnable() { public void run() { try { (lookandfeelinfo info : uimanager.getinstalledlookandfeels()) { if ("nimbus".equals(info.getname())) { uimanager.setlookandfeel(info.getclassname()); break;

php - How to use google oauth on a plugin on wordpress -

i want develop plugin wordpress, plugin used in lot of websites buy , install it. on plugin want use google oauth datas analytics, have define callbackurl in console , in code, can't know website install plugin. please if have ideas how me done.

python - get modificated dates of files in a path -

i path names input file. want return modification dates files in paths input file.however, error this: traceback (most recent call last): file "c:/users/ozann/desktop/odev334-2bdeneme.py", line 13, in <module> print ("last modified: %s" % time.ctime(os.path.getmtime(e))) file "c:\program files (x86)\python 3.5\lib\genericpath.py", line 55, in getmtime return os.stat(filename).st_mtime oserror: [winerror 123] filename, directory name, or volume label syntax incorrect: 'c:\\users\\ozann\\workspace2\n' code: import os, os.path, time, re open("soru2btest.txt", "r") ins: array = [] line in ins: array.append(line) e in array: m = re.match("^(.*/)?(?:$|(.+?)(?:(\.[^.]*$)|$))",e) if m : print(e) print("true") print ("last modified: %s" % time.ctime(os.path.getmtime(e))) the error you're getting because 'c:\\users\\ozann\\workspace2\

java - Server location in linux machine? -

where in linux machine install servers(jboss fuse, data virtualization, jboss , all) in root directory or in home directory ? there's no universally accepted standard, /opt common place install software packages aren't part of distribution's package repositories.

R Programming Time Series Decompose Failing -

i trying decompose stock data downloaded yahoo finance see various components seasonality, trend... getting error time series has no or less 2 periods below code using, please help: require(quantmod) getsymbols("ibm", from="2013-01-02", to="2014-12-31") ibm = subset(ibm,select=c("ibm.adjusted")) write.table(ibm,"ibm.txt",row.names=f,sep="\t") ibm2<-read.table("ibm.txt",header=t,sep="\t") ibmtimeseries <- ts(ibm2, frequency=365, start=c(2013,1)) ibmtimeseriescomponents <- decompose(ibmtimeseries) ibmtimeseriescomponents <- decompose(ibmtimeseries) error in decompose(googtimeseries) : time series has no or less 2 periods

Redux Todo List example - how todos state get updated depends on visibility filter -

first of patient i'm new @ redux stuff. i'm reading http://rackt.org/redux/docs/basics/exampletodolist.html and in i've got gist don't understand how todos state updated depends on visibility filter. i mean, if click on ie show_completed, the spa shows todo completed: true why ? , logic ? don't see :( usually in normal script should sort of if state.visibiltyfilter === show_completed filter state ... thanks in advance. if check under smart components, @ bottom of containers/app.js you'll see: // filtering happens function selecttodos(todos, filter) { switch (filter) { case visibilityfilters.show_all: return todos case visibilityfilters.show_completed: return todos.filter(todo => todo.completed) case visibilityfilters.show_active: return todos.filter(todo => !todo.completed) } } // props want inject, given global state? // note: use https://github.com/faassen/reselect better performance. func

Spring MVC Form Validation Custom Error with Parameters/Tokens/Arguments -

my spring mvc form validation working, how expand parameters or "tokens" in .properties file? e.g.: messages.properties error.field.required=<b><a>{0}</a></b> required spring mvc validator class adds error/code: @component public class mymodelvalidator implements validator { @override public boolean supports(class<?> clazz) { return mymodel.class.equals(clazz); } @override public void validate(object target, errors errors) { mymodel mymodel = (mymodel)target; validationutils.rejectifempty(errors, "address.addressline1", "error.field.required"); } } i need pass in custom string, such " address line 1 " replace {0} token description. you can pass values message placeholders using errorargs parameter of rejectifempty method. validationutils.rejectifempty(errors, "address.addressline1", "error.field.required&qu

How to run batch script for 2 hours -

i have multiple batch files: master1.bat master2.bat master3.bat master4.bat each of when execute runs continuously in loop until interrupted user. how can make master.bat runs master1.bat 1st 3 hrs->stops , start master2.bat , on. i.e master.bat should following start master1.bat after 3 hrs stop master1.bat start master2.bat after 3 hrs stop master2.bat start master 3.bat after 3 hrs stop master3.bat with taskkill can selectively kill process title.and there's lot of ways delay in batch file so: ::start bat master1 title start "master1" master1.bat ::wait 3 hrs typeperf "\system\processor queue length" -sc 1 -si 18000 >nul :: kill window title master1 taskkill /f /fi "windowtitle eq master1*" and can repeat rest of scripts.

Issues with Bootstrap Grid Alignment -

Image
i need layout (see picture), tried lot nothing works.. here code: <div class="row content-container"> <div class="col-md-9" id="map-content"> <h1>#map</h1> </div> <!-- map --> <div class="col-md-3" id="route"> <h1>#route</h1> </div> <!-- route --> <div class="col-md-9" id="breadcrumbs"> </div> <!-- breadcrumbs --> </div> <!--row content--> check out this fiddle . <div class="container"> <div class="row "> <div class="col-xs-6"> <div class="col-xs-12" style="background: green; height: 60px;">aaa</div> <div class="col-xs-12" style="background: red; height: 60px;">bbb</div> </div>

javascript - How to color specific character(s) in textarea -

i making program search characters in desired <textarea> . need color specific character found in text area. how can color character(s) in <textarea> ? example, if enter 'a' in input field 'a's in <textarea> should colored red..... html <form method="post" name="searching" onsubmit="return check(this)"> <table border="0" cellpadding="10px" align="center"> <tr><td width="114"> <label><b>text</b></label></td> <td width="287"> <textarea name="para" cols="30" rows="10"></textarea> </td> </tr> <tr> <td> <label><b>alphabet</b></label> </td> <td><input type="text"

xcode - Swift Compiler Error Command failed due to signal: Segmentation fault: 11 -

clubcomments.removeallobjects() let findclubcommentdata:pfquery = pfquery(classname: "testobject") findclubcommentdata.findobjectsinbackgroundwithblock { (objects:[pfobject]?, error:nserror?) -> void in if (error == nil && objects != nil) { object:pfobject! in objects!{ self.clubcomments.addobject(object) } let array: nsarray = self.clubcomments.reverseobjectenumerator().allobjects self.clubcomments = array as! nsmutablearray self.tableview.reloaddata() getting error code... suggestions on how fix it? im stuck... in swift use native collection types, avoids errors. example swift array has function reverse() more efficient reverseobjectenumerator().allobjects declare clubcomments var clubcomments = [pfobject]() and try clubcomments.removeall() let findclubcommentdata = pfquery(classname: "testobject") findclubcommentdata.findobjectsinbackgroundwithblock { (

ajax - MVC cascading dropdown -

i have 2 tables manufacturer table , manufacturermodel table. trying populate 2 dropdown lists. list of manufacturers , based off of manufacturer selected bring list of models. implemented doesn't work. doesn't anything. i created new viewmodel incorporating 2 models public class manufacturermodeldd { public dbset<manufacturer> manufacturers { get; set; } public dbset<manufacturermodel> manufacturermodels { get; set; } } and have created 2 functions in controller want them in. manufacturermodeldd mm = new manufacturermodeldd(); public jsonresult getmanufacturers() { return json(mm.manufacturers.tolist(), jsonrequestbehavior.allowget); } public jsonresult getmodelsbymanufacturerid(string manufacuterid) { int id = convert.toint32(manufacuterid); var models = in mm.manufacturermodels a.manufacturerid == id select a; return json(models); } in view have <script> $(function(){ $.ajax

Java - Libgdx set the cursor to the hand pointer -

i have been doing research on libgdx , can't find relating this, can set pointer image isn't i'm wanting, tried set cursor j frame , stuff wouldn't work, want default hand cursor set when called there no way in default lwjgl backend. may have luck using swing/awt, embedding libgdx via lwjglcanvas , setting cursor via swing. converting hand cursor bitmap , using standard gdx.graphics.setcursor() easier.

windows - how to access google datastore from an installed application on PC written in Python? -

i have entities added on datastore - made little web app (in python) read , write datastore through endpoints. able use webapp through endpoints javascript. want access web app installed application on pc. there way access endpoints installed applications written in python? how? is there other way access datastore pc installed applications written in python? that's 1 of beauties of appengine's endpoints. should use python client library google's apis communicate endpoints pip install --upgrade google-api-python-client then you'll construct resource object communicate api using apiclient.discovery.build function. eg: from apiclient.discovery import build api_root = 'https://<app_id>.appspot.com/_ah/api' api = 'api_name' version = 'api_version' discovery_url = '%s/discovery/v1/apis/%s/%s/rest' % (api_root, api, version) service = build(api, version, discoveryserviceurl=discovery_url) you can perform operatio

character encoding - CSV Files are open with incorrect charset -

the application generates csv file characters such "ä", "ë", "ï", "ö" or "ü" , when it's open, characters incorrectly shown. example expected value show is: test-vfde - hidden edition - gebühr pro benutzer leistungszeit 07/07/16 bis 08/05/16 the value shown is: test-vfde - hidden edition - gebǟ’?Ç?¶Â¬hr pro benutzer leistungszeit 07/07/16 bis 08/05/16 the possibility reproduce selecting different utf8 charset when try open. believe issue... how let user open file charset default without asking ?. under ubuntu 14 libreoffice calc...

node.js - How does Google Cloud Datastore run locally? -

while experimenting node.js , google cloud datastore (for backend of application), noticed without datastore emulator, able run , test application locally using datastore api. note : did not deploy app cloud. more specifically, saw when cloned "nodes-getting-started" github repository, created config.json file, ran npm install , ran npm start. add , delete books using api. data being stored? i found quite interesting , did not know how works. appreciate this. eating brains out. thanks! where data being stored? in cloud, if accessing cloud. because your application isn't in cloud doesn't mean can't access services in cloud. try running application without internet connection , fail. on other hand, if @ datastore console should able see data app working with. (whereas if had run app against emulator, data wouldn't visible in console, present locally.)

ruby on rails - How to change the default port of an EC2 instance -

i've got rails application running on port 3000 (or port want matter) , can access browsing public ip so: 1.2.3.4:3000 reach same page omitting port number, since domain registrar allows public ip, , no port number. there setting somewhere direct incoming traffic site specific port? there number of ways this: tell rails use port 80 natively (see here ) use iptables forward port 80 traffic 3000 (see here ) front instances elb, , port map 80 3000 (see here )

xml - XSLT For Namespaces -

i know there lot of posts using xslt 1.0 change namespaces haven't gotten of them work. perhaps it's processor i'm using? i've tried both http://www.freeformatter.com/xsl-transformer.html , http://www.online-toolz.com/tools/xslt-transformation.php test out xslt. anyhow, have xml: <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soapenv:body> <ns1:getactivesuppliersresponse soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://webservice"> <getactivesuppliersreturn soapenc:arraytype="ns2:asl.webservice.supplierdto[3]" xsi:type="soapenc:array" xmlns:ns2="http://rpc.xml.coldfusion" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <getactivesuppliersret

css - how can i do a responsive grid with unknown height? -

i need grid grid using css. i found libraries these libraries use jq. how can this, without js? well don`t know if open use library.but if consider bootstrap css library.i not uses js , written using css media queries creating grids. look @ - bootstrap otherwise if want on own css . dive deep media queries. here links started : css media queries w3schools css media queries also chris coyer - css tricks website.it`s has vast collection of css magic.for specific responsive design article: css tricks media queries snippet hope helps.

How to remove from and Entity Framework -> WCF -> WPF solution -

i'm implementing client server (non web) application have inherited , want remove wcf aspects from. i told need management has greater understanding of needs doing. wpf gui app somehow uses wcf bound controls in wpf client gui application wcf communication between client , server. i've heard using wcf we're bound use microsoft technology @ client side, , can't replace "anything" - @ least default soap implementation of wpf . i found answers these questions question / answer 6 years ago , asking again since 6 years long time change , else not know here might relevant. i know want have wpf based controls directly connected entity framework . in meantime, educating myself not such newbie of this. thanks in advance.

.net - What exhaustively causes an assembly to depend upon another? -

what, @ il level, causes assembly depend on another? know there table of assemblies depended upon in metadata of assembly, not talking that. know can forge assembly not have right depended-upon dependencies regards il code contains. i build exhaustive list of premises fill in blanks in following sentence: if premise , assembly should have .assembly directive assembly b. for instance: class ca defined in assembly derived class cb defined in assembly b. method ma defined in assembly calls method mb assembly b. just looking @ .assembly directives tells me assembly depends on assembly b, not why should. i saying "at il level", because not interested in c#, vb, or c++/cli. in clr terms, exhaustive list of cases assembly shall depend on assembly b in order world spin right?

r - Creating "spaghetti" longitudinal plot with smooting / jitter -

Image
i trying create spaghetti plots out of data consisting of numbers 0 4, obtained @ 15 different time points. large data, cannot paste here, when trying matplot(x,y,type="l",lty=1,col="#00000020") this plot ideally, looks how can "smooth" lines , make them less overlapping, in lower plot? if @ possible, without using ggplot2. just smooth data in number of ways, some examples nr <- 200 mm <- t(matrix(sample(0:4, nr * 15, replace = true), nr)) set.seed(1) mm[sample(length(mm), nr * 15 / 20)] <- na x <- 1:15 par(mfrow = c(1,2)) matplot(mm, type = 'l', lty = 1, xlim = c(0,15), ylim = c(-5,10), col = adjustcolor('black', alpha.f = .1)) plot('mm', xlim = c(0,15), ylim = c(-5,10), panel.last = grid(), bty = 'l') (ii in 1:ncol(mm)) { dd <- data.frame(y = mm[, ii], x = x) lo <- loess(y ~ x, data = dd, na.action = 'na.omit') # lo <- loess(mm[, ii] ~ x) xl <- seq(mi

arraylist - Java BufferedReader Switch case same line stored in array -

i'm trying loop through file read "accounts" file arraylist called accounts . file: c 1111 1234 703.92 x 2222 1234 100.00 s 3333 1234 200.08 i know it's looping next line since print id , goes 1111 2222 3333, @ bottom when print account's tostring, they're same 1 (the "s" line in file). why happening? bank.main: private static arraylist<account> accounts = new arraylist<account>(); public static void main(string[] args) { //if incorrect # or bankfile can't opened, print system error //usage: java bank bankfile [batchfile] if(args.length > 2 || args.length == 0){ system.err.println("usage: java bank bankfile [batchfile]"); } else{ if(args.length == 2){ //batch mode processaccounts(args[0]); //bankbatch.processbatch(args); close(args[0]); } else if(args.length == 1){ // gui mode } } } bank.processaccounts:

java - How to pass single List Items from one Activity to another and how to adapt them to the Layout -

in mainactivity have got recyclerview inflated arraylist<> have in mainactivity . when tap on item in recyclerview open activity inflated same strings , images using in recyclerview plus more images have put in pagerview. the questions following: how can pass single listitem activity? how create adapter inflate both pagerview , textviews? is 1 i'm suggesting enough way achieve i'm trying achieve, or there simplier, more efficient way it? i appreciate give me, know isn't easy understand please if not clear, don't hesitate ask. edit: this how arraylist looks like: chords = new arraylist<accordo>(); chords.add(new accordo(r.drawable.do_maggiore, r.drawable.do_maggiore2, r.drawable.do_maggiore3, "do maggiore", "do, mi, sol")); chords.add(new accordo(r.drawable.do5, r.drawable.do5_2, r.drawable.do5_3, "do 5", "na, na, na")); chords.add(new accordo(r.drawable.do6, r.drawable.do6_2, r.drawable.do

ios - making a profile page, with tableView and textField -

Image
im new in ios development , want create profile page uitableview tried google, didn't find :( assuming have 1 field (name) on uitableview, when click on "edit" button, want tabviewcell became uitextfields let me edit data. , when click "done" button uitextview became tabviewcell again new value, can found tutorial, how delete, add or move cell. does apple have api making editable forms in ios? no, there's no api creating editable forms, uikit provides tools you'd need create editable content of kinds. instead of relying on tutorials show solution every problem need learn how use api that's there construct user experience imagine. until that, won't able implement original ideas. using table reasonable way create form want. consider using different type of cell when user hits edit button. so, when edit tapped, reload table content using editable cell types instead of normal ones. when hit done, record changes , reload again u

c - What is wrong in the if statement which checks a value from shared memory? -

in code value of flag determined value in shared memory. when print says value 1, because prints '1'. why program not proceed code in 'if (flag == "1")'? char * shm_addr = (char *) map_failed; char * shm_name = "print"; int size = -1; int rtnval; char * flag; int numbertoprint = 0; size = 32; while (shm_addr == (char *) map_failed) { shm_addr = my_shm_open (shm_name); } sscanf (shm_addr, "%s", flag); printf ("\ndata (@ %#x): '%s'\n", (unsigned int)(intptr_t) shm_addr, flag); while (numbertoprint != 6) { if (flag == "1") { numbertoprint += 2; printf("%i ", numbertoprint + 2); flag = "0"; sscanf (flag, "%s", shm_addr); } } you code wrong in several places (you should compile warning activated): first, flag string not have space allocated char *flag should

static cast - C typecasting uint32 to uint16 -

typedef struct a{ uint32 val1; }a; typedef struct b{ uint16 copy_val1; }b; void function1(a input) { b my_input; my_input.copy_val1 = (uint16) input.val1; <-- clean? } inititally when struct designed, thought val1 contain 2 16 bit values. chose use 1 16 bit. now changing copy_val1's type uint32 uint16 save memory. how should typecast in clean way , make sure 16 bit value val1 get's copied copy_val1? the os vxworks in mips architecture. simply assigning uint32 value uint16 variable, without cast, sufficient. however, run risk of truncation . should consider checking see if val1 > uint16_max before assignment. also note structures larger 1 or 2 machine registers, should pass pointers structures. otherwise incurr potentially large copy. note change in semantics, however.

spring data jpa for multiple joined table -

i have 2 tables: productusage , learner. productusage have field learner, learner has fields id , guid. need create query pull out productusage learner guid in specified user ids: sql: select * product_usage inner join learner on product_usage.learner_id = learner.id learner.guid in ("1234", "2345") domain class: @data @noargsconstructor @entity @table(name = "core_product_usage_increments") public class productusage { @id @generatedvalue(strategy = generationtype.auto) private integer id; @manytoone @joincolumn(name = "learner_id", nullable = false) private learner learner; @manytoone @joincolumn(name = "learning_language_id", nullable = false) private language language; } @data @noargsconstructor @entity @table(name = "learners") public class learner { @id @generatedvalue(strategy = generationtype.auto) private integer id; @column(name = "user_guid&qu