Posts

Showing posts from June, 2014

java - Tomcat + Grails cluster doesnt work -

i have tomcat cluster on debian jessie, tomcat 8.0.29 2 instances , postgresql 9.5 ,apache 2.4 , mod_jk. when try run project in environment eerror. tested examples project , works fine. log iis this 01-feb-2016 19:07:39.474 severe [main] org.apache.catalina.ha.deploy.farmwardeployer.start farmwardeployer can work host cluster subelement! 01-feb-2016 19:07:39.537 info [localhost-startstop-1] org.apache.catalina.startup.hostconfig.deploywar despliegue del archivo /opt/tomcat8_nodo1/webapps/clusterjsp.war de la aplicaciĆ³n web 01-feb-2016 19:07:40.886 info [messagedispatch15interceptor.messagedispatchthread1] org.apache.catalina.tribes.group.interceptors.throughputinterceptor.report throughputinterceptor report[ tx msg:1 messages sent:0.00 mb (total) sent:0.00 mb (application) time:0.01 seconds tx speed:0.06 mb/sec (total) txspeed:0.06 mb/sec (application) error msg:0 rx msg:2 messages rx speed:0.00 mb/sec (sinc

sql - mysql what is the right syntax for this conditional update statement -

mysql, want like update tablename case fielda when value1 set fieldx0=xxx,fieldx1=bbb,fieldx2=ccc ... when value2 set fieldy0=yyy,fieldy1=eee,fieldy2=fff ... end what right , simple syntax it? thank much. it should written way: update tablename set fieldx = case when fielda = 'value1' 'xxx' else fieldx end, fieldy = case when fielda = 'value2' 'yyy' else fieldy end fielda in ('value1', 'value2'); note that: wrote else part way, because default else null if condition of case expression not valid, set original value not null value.

iphone - Switch directly to the Game Center app -

i have method checks if player signed in game center or not. if not bring alert view button directly takes them game center app sign in. possible in way? just open gamecenter url on button tap. [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:@"gamecenter:"]]; also put handle url in app delegate: - (bool)application:(uiapplication *)application handleopenurl:(nsurl *)url { return yes; } - (bool)application:(uiapplication *)application openurl:(nsurl *)url sourceapplication:(nsstring *)sourceapplication annotation:(id)annotation { return yes; }

math - Solving Recurrences in Loops -

i understand how solve recurrence relations when not involve additional looping i.e.: int recursive_method(int n){ if(n == 1){ return 1; } constant statement; recursive_method(n-1); return n; } my problem comes when trying solve recurrences inside of loops following: int recursive_method(int n){ if(n == 1){ return 1; } for(int = 1; i<n; i++){ constant statement; recursive_method(n-1); } return n; } when trying set recursive relation problem above t(n) = 1 if n<2; sum(from i=1 n){t(n-1) + c} if n>=2 so in other words sum of costs 1 n? if not, how go thinking problem this? the expression have t(n) in recursive case right, can simplified. in particular, notice work done in sum independent of summation index, can rewrite sum i=1 n { t(n-1) + c } as nt(n - 1) + cn so you'll end with t(n) = 1 (if n ≤ 1) t(n) = nt(n - 1)

c# - What can I use instead of Where clause in Asyn method? -

i have project in c# , entity framework. need convert of methods of repository async. have problem converting method, not sure can use instead of clause. public async task<ienumerable<product>> getproductbyyearidasync(int yearid) { return await applicationscontext.product.where(product=> product.yearid == yearid); } when use gave me error cannot await iqueryable. when use firstordefaultasync lot know how convert ienumerable. where not execute query, there nothing "asynchronous" invoking where . need invoke tolistasync executes query asynchronously. public async task<ienumerable<product>> getproductbyyearidasync(int yearid) { return await applicationscontext.product .where(product=> product.yearid == yearid).tolistasync(); }

spring,jsp,hibernate -

i have jsp form contain 20 input fields.i want pass input fields value spring controller.my problem first 5 input field table1 , next table2 etc join tables.my question how can these value in single object using method @modelattribute or other method. note:-i'm using hibernate spring mapping. please provide me link.

Facebook Ads API conversion pixel custom variables reporting -

i trying access custom parameters i've set within facebook pixel purchase event. developer documentation doesn't address question i'm looking help. has been successful @ accessing these custom(dynamic) variables through marketing api can report on purchase amount, time/date, product purchased, purchase(order) id? thanks, matthew <!-- facebook pixel code --> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callmethod? n.callmethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createelement(e);t.async=!0; t.src=v;s=b.getelementsbytagname(e)[0];s.parentnode.insertbefore(t,s)}(window, document,'script','//connect.facebook.net/en_us/fbevents.js'); fbq('init', 'xxxxxxxxxxxxxxxx'); fbq('track', 'pageview'); fbq('track', 'purchase', { content_name: {{prodname}}, content_ca

Using Tomcat manager in tomcat 7.0 + spring MVC, Webapp reload gives apachelifecycle exception -

using tomcat manager in tomcat 7.0 + sping mvc, webapp reload gives apachelifecycle exception. starts fine , works fine when started normally. after startup reloading webapp, use tomcat manager. in tomcat manager, upon clicking reload button says reload successful ( enables start button). upon clicking start button in tomcat throws apachelifecyle exception. please help... 2013-03-27 01:13:39,153 [http-bio-443-exec-24] error standardcontext - exception stopping context name [/webtest] org.apache.catalina.lifecycleexception: failed stop component [standardengine[catalina].standardhost[localhost].standardcontext[/webtest]] @ org.apache.catalina.util.lifecyclebase.stop(lifecyclebase.java:236) @ org.apache.catalina.core.standardcontext.reload(standardcontext.java:3913) @ org.apache.catalina.manager.managerservlet.reload(managerservlet.java:953) @ org.apache.catalina.manager.managerservlet.doget(managerservlet.java:364) @ javax.servlet.http.httpserv

angularjs - Clear rootscope ionic framework -

hi i'm doing login ionic app.....and i'm using rootscope global variable use in controller (loginctrl,salirctrl) when user log-in save info in rootscope variable , show info in salirctrl. but when user log-out , other user log-in info not present in salirctrl. someone knows that. loginctrl if($scope.datos=='true') {//if token true. user log-in $rootscope.pnombre=data.persona.primernombre; $rootscope.snombre=data.persona.segundonombre; $rootscope.papellido=data.persona.primerapellido; $rootscope.sapellido=data.persona.segundoapellido; $state.go('tabs.perfil'); } salirctrl .controller('salirctrl', function($scope, $state, $ionicpopup, servusuario,$rootscope,$ionichistory) { //para bloquear el boton atras $ionichistory.nextviewoptions({ disableanimate: true, disableback: true }); //fin para bloquear el boton atras $scope.pnombre = $rootscope.pnombre;//save in scope variable rootscope $scope.snombre = $r

c++ - failed to move contents with std::move -

i'm trying understand how std::move simple example (below). i'm trying move contents of p1 p2, p1 empty after that, doesn't happen though. i guess i'm not using std::move properly. appreciate lot if explain me. #include <iostream> #include <utility> int main() { int * p1 = new int[10]; for(int = 0; < 10; ++i) p1[i]=i; // moving contents of p1 p2 int * p2 = std::move(p1); // expeting p1 empty it's not... if(p1 != null) std::cout << "i'm not empty\n"; // prints i'm not empty } the move function not guaranteed clear contents of source object. is, however, guaranteed left in such state can safely destroy or assign new value it.

python - Is there a pythonic way to skip decoration on a subclass' method? -

i have class decorates methods using decorator library. specifically, class subclasses flask-restful resources, decorates http methods httpauth.httpbasicauth().login_required() , , sensible defaults on model service. on subclasses want decorator applied; therefore i'd rather remove add in subclasses. my thought have private method operations , public method decorated. effects of decoration can avoided overriding public method call private 1 , not decorating override. mocked example below. i curious know if there's better way this. there shortcut 'cancelling decorators' in python gives effect? or can recommend better approach? some other questions have suitable answers this, e.g. is there way function decorator has wrapped? . question broader design - interested in any pythonic way run operations in decorated methods without effects of decoration. e.g. example 1 such way there may others. def auth_required(fn): def new_fn(*args, **kwargs): pr

javascript - Relay Error when deleting: RelayMutationQuery: Invalid field name on fat query -

i'm running issue when attempt commit deletion mutation. when commit, error uncaught invariant violation: relaymutationquery: invalid field name on fat query, `company`. . viewing, creating , updating nodes work. reason can't delete. mentions company field in fatquery, field have in fat query deleteduserid server. in advance! component: import react, {component} 'react'; import relay 'react-relay'; import {link} 'react-router'; import deleteusermutation 'mutations/deleteusermutation'; import styles './employeeitem.css'; class employeeitem extends component { render() { const {user} = this.props; return ( <div classname={styles.employee}> <p><strong>id:</strong> {user.id}</p> <p><strong>first name:</strong> {user.firstname}</p> <p><strong>last name:</strong> {user.lastname}</p> <p><strong>email:

osx - aspell not working on mac - mountain lion, needed as guiguts plugin -

when typing aspell in command line normal user, following error message. aspell dyld: library not loaded: /usr/local/lib/libaspell.15.dylib referenced from: /usr/local/bin/aspell reason: no suitable image found. did find: /usr/local/lib/libaspell.15.dylib: stat() failed errno=13 /usr/local/lib/libaspell.15.dylib: stat() failed errno=13 trace/bpt trap: 5 however, root, not error. when using guiguts command line normal user, not error message, root following: guiguts 1.0.23: if have problems, please include error messages appear here bug report. error: no word lists can found language "en_us". error: no word lists can found language "en_us". what do aspell work? i tried navigate /usr/local/lib unable normal user. however, root can see libaspell.15.dylib file there.

java - DeflatorInputStream and DeflatorOutputStream do not reconstruct the original data -

i want compress data, came across deflatorinputstream & deflatoroutputstream classes. however, following example shows can't seem reconstruct original data when using these classes. when switch zipinputstream , zipoutputstream work, since don't need zip files per se, thought generic compression better. i'm interested in understanding why example doesn't work. //create "random" data int byteslength = 1024; byte[] bytes = new byte[byteslength]; for(int = 0; < byteslength; i++) { bytes[i] = (byte) (i % 10); } //compress data, , write somewhere (a byte array example) bytearrayoutputstream arrayoutputstream = new bytearrayoutputstream(); deflateroutputstream outputstream = new deflateroutputstream(arrayoutputstream); outputstream.write(bytes); //read , decompress data byte[] readbuffer = new byte[5000]; bytearrayinputstream arrayinputstream = new bytearrayinputstream(arrayoutputstream.tobytearray()); deflaterinputstream inputstream = new defla

java - Can interface methods be overloaded? -

i'm trying achieve overloaded interface method. know not work in java, how rewrite following have implementation type in action() methods, , not base type? class base; class foo extends base; class bar extends base; interface iservice { void action(base base); } class fooservice implements iservice { void action(foo foo) { //executes specific foo action } } class barservice implements iservice { void action(bar bar) { //executes specific bar action } } usage: base base; //may foo or bar anyservice.action(bar); you idea. how this? define interface both foo , bar should implement, can like: interface actionable{ public void action; } class base; class foo extends base implements actionable; class bar extends base implements actionable; interface iservice { void action(actionable a); } class fooservice implements iservice { void action(actionable a) { ... } } class barservice implements iservice { void acti

silverlight - ASP.NET identity vs FormsAuthetication -

we have asp.net ( silverlight) lob web application developed using .net 4. have rid of current authentication mechanism , implement new one. think have 2 options here: 1> forms authentication using membership provider ( available in .net 4) 2> asp.net identity ( not available in .net 4. have update target framework 4.5 or latter) i have gone through article here describes difference between these 2 , based on understanding 2 major differences are: 1> can configured identity framework use social credentials. 2> identity framework code can unit tested. we have lob application. likelihood of allowing users use social credential login our application very less. looking suggestion whether worthwhile spend time , implement identity framework authentication. (note identity framework have convert target framework of projects 4.5). advantage see here unit testing. updating later framework not problem. going way causes problem, won't have code change

javascript - How to invoke a JS function from several controls -

i have several controls in table, ids , functions generated in each row of table this: <select id="data_01" onclick="open_details_01()">... <select id="data_02" onclick="open_details_02()">... <select id="data_03" onclick="open_details_03()">... i need 1 function like: function open_details_ + *index* () { } when name of function starting "data_" you can 1 of 2 ways: use eval : `eval( functionname + num + "();" ) you can make function part of object , call member: myobject[ functionname + num ]() to second one: var obj = { open_details_01: function() { alert( "1" ); }, open_details_02: function() { alert( "2" ); }, open_details_03: function() { alert( "3" ); } }; var num = "01"; obj[ "open_details_" + num ](); num

c++ - wsprintfW printing only tens? -

i have trackbar , @ point it's value supposed change text: case wm_hscroll: { lresult pos = sendmessage(trackbar, tbm_getpos, 0, 0); wchar buf[3]; wsprintfw(buf, l"%ld", pos); setwindowtext(trackbarvalue, (lpcstr)buf); } break; the trackbar's range goes 15 35. reason, tens gets printed text (as trackbar's value between 15 , 19, text 1, when trackbar's value between 20 , 29, text 2, , becomes 3 trackbar's value between 30 , 35. of course, want text show absolute value of trackbar, not tens! what should do? edit : after running debugger, know buf become trackbar's value. problem seems setwindowtext line. edit: 1 solution to change setwindowtext setwindowtextw , remove (lpcstr) cast. people. you casting wide char string simple string, wrong. have use widechartomultibyte , this: size_t size = widechartomultibyte(cp_acp, 0, buf, -1, null, 0, null, null); char *szto = new char[size]; w

How to save web page as text file [Python] -

i save web page (all content) text file. (as if did right click on webpage -> "save page as" -> "save text file" , not html file) i have tried using following code: import urllib2 url='' page = urllib2.urlopen(url) page_content = page.read() file = open('file_text.txt', 'w') f.write(page_content) f.close() my goal able save whole text without html code. (for example read "ĆØ" instead "&eacute") have @ html2text mentioned elsewhere import urllib2 import html2text url='' page = urllib2.urlopen(url) html_content = page.read() rendered_content = html2text.html2text(html_content) file = open('file_text.txt', 'w') f.write(rendered_content) f.close()

php - DOMPDF not working with boostrap -

ciao, have create pdf file dompdf, if use bootstrap.min.css dompdf not working. if remove files works... <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" href="../css/bootstrap.css"> <link rel="stylesheet" href="../css/main.css"> <link rel="stylesheet" href="../css/cms.css"> <link rel="stylesheet" href="../css/pagine.css"> </head> <body> <?php require_once './fattura.ph

key - Input.GetKeyUp works wrong after Inputfield user input in Unity3D -

the problem explained in title. after inputfield user input, other character(such keycode.a, keycode.b, ... keycode.z) input seems not working getkeydown(), getkeyup(), getkey() , while special keys works such keycode.leftarrow, keycode.delete, etc. void update(){ // search shortcut enter key if (input.getkeydown(keycode.return)) { if (searchfield.text.trim() != "") { // } searchfield.deactivateinputfield(); } } after search, found deactivateinputfield() function , executed in end of if statement prevent it. seems helpful not. mean, after insert searchfield.deactivateinputfield(); problem doesn't occur, occurs. lost.. i guessing inputfield event system eating keys character keys.. can't use input.eatkeypressontextfieldfocus because i'm using unity5 , deprecated. any help?

php - Get how much users have referred other users in a specific date -

i have had problems quite time now! have "ref" in database shows users have being referred , "varvade_antal" shows how many have recruited. want out users have recruited more 0 given date, long code this: <?php $sql = "select * users date >= '2013-03-01' , date < '2013-04-29' + interval 1 day"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)){ if($row['ref'] == '0') { } else { $sd = "select * users id = '{$row['ref']}'"; $df = mysql_query($sd) or die(mysql_error()); while($dfs = mysql_fetch_array($df)){ echo "{$dfs['firstname']}: {$dfs['varvade_antal']} st<br>"; }}} ?> now gets out how many instance have recruited shows duplicates of it, this: johan have recruited 6 person johan have recruited 6 person johan have recruited 6 person johan have recruite

python - tkinter - Weighted Canvas not Filling Empty Space -

Image
canvas takes whole screen can seen green. canvasframe has 2 rows, second of scrolledtext widgets on. second row has been weighted not filling screeen green area should yellow. how the second row fill empty space , scrolled text widgets expand vertically. p.s. innerframe looks unecessary in example it's there because i've removed other widgets in frame simplicity's sake. code: import tkinter tk tkinter import ttk import tkinter.scrolledtext tks class program(tk.tk): def __init__(self, *args, **kwargs): tk.tk.__init__(self, *args, **kwargs) tk.tk.iconbitmap(self, default = "") tk.tk.wm_title(self, "") container = tk.frame(self) container.pack(side="top", fill="both", expand=true) container.grid_rowconfigure(0, weight=1) container.grid_columnconfigure(0, weight=1) self.frames = {} f in (page, other): frame = f(container, self)

java - understanding of spring bean scopes in a web application -

as per springsource documentation singleton scoped bean instantiated once per container. example have singleton scoped userdetails bean contains information user. in main() method: applicationcontext context = new classpathxmlapplicationcontext(new string[] {"spring-customer.xml"}); userdetails ud1 = (userdetails)context.getbean("userdetails"); custa.setaddress("address set ud1"); system.out.println("address : " + ud1.getaddress()); userdetails ud2 = (userdetails)context.getbean("userdetails"); system.out.println("address : " + ud2.getaddress()); the output address set ud1 address set ud1 because of userdetails singleton bean, second retrieval ud2 give same result of ud1. now here problem: web application have following userdetails bean in dispatcher-servlet.xml. <bean id="userdetails" class="com.mukund.dto.userdetails" /> first question: singleton scop

how to use cookies and postfields with libcurl in C? -

when curl --get --cookie-jar mycookie.cookie http://mypage/page/ it store cookie mycookie.cookie and when curl --cookie mycookie.cookie --data "field1=field1" --data "field2=field2" --data csrfmiddlewaretoken=(csrf token) http://mypage/page/register/ the csrf token through cat mycookie.cookie , fill manually in. this works. want. so want use libcurl c this. following doc have this: curl *curl; curlcode res; curl_global_init(curl_global_all); curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, curlopt_url, http://mypage/page/); curl_easy_setopt(curl, curlopt_verbose, 1l); curl_easy_setopt(curl, curlopt_cookiefile, ""); res = curl_easy_perform(curl); res = curl_easy_getinfo(curl, curlinfo_cookielist, &cookies); curl_easy_setopt(curl, curlopt_url, http://mypage/page/register/); curl_easy_setopt(curl, curlopt_cookiefile, cookies); curl_easy_setopt(curl, curlopt_postfields, "

php - mysqli_multi_query(); numerous submissions -

i have php script prepares 3 different sql submissions. sql valid of them. if swap order of if statements below, work. if $ratessql first both 1) , 2) work. if either of other 2 first, 1) works. the sql: $sqlrates = " load xml local infile '/xx/yy/zz/example.xml' replace table rates rows identified '<row>'"; both $vixsql , $aaasql lot of replace into statements. example: replace aaa (date,value) values ('2016-01-29','4.05'); replace aaa (date,value) values ('2016-01-28','4.07'); the if statements: 1) successful submission below. $ratessql approximately 300 rows of data. if (mysqli_multi_query($dbc, $ratessql)) { echo "<h3>rates load successful</h3><br>"; } else { echo "<h3>rates load error</h3><br>"; } 2) successful submission. ~8000 rows of data. if (mysqli_multi_query($dbc, $vixsql)) { echo "<h3>vix load successful<

analytics - Kontagent API - per session statistics -

we tasked integrate our project kontagent. our requirements include tracking length of user's sessions. user activity, kontagent support specific request type - page request (a.k.a. pgr, per documentation ). type of request needed identifying user visits , accumulate them appropriate user id, can used obtaining geolocation info ip address. however, there no analogous method tracking sessions session id. so, need know how kontagent calculate session length? automatically done depending on user activity frequency, or should send request identify session? can think of 2 options, dislike both of them: use additional page request session id. along standard request acknowledges user activity, might send additional one, time passing session id. if kontagent using algorithms calculate session length based on user activity frequency (which known page request s user id sending), unnecessary, , meaningless in terms of statistics, question answered. use data parameter in default pa

html - Vertical-Align - how does it works? -

so there code on jsfidle , can't make h1 inside of section ine middle of field... vertical align doesnt work! , margin auto same. any1 has idea? #welcome{ vertical-align: middle; height: 100px; } #welcome h1{ color: gray; font-size: 2.1em; font-family:"proxima-nova","sans-serif"; text-align: center; font-weight: bold; } set line-height on #welcome h1 height in want center text, typical way center align text. jsfiddle #welcome h1 { line-height: 100px; }

php - Display multiple images from database using PDO mysql -

the situation: show 1 image @ time. problem: show images database web page. you don't have id selected, should way: while($row = $statement->fetch()) { ?> <img src="image.php?id_inter=<?= $row['id']; ?>" /> ... <?php } ... if use id method seems stated in ( try { $requestedid = (int)$_get['id_inter']; }) then ..."id_inter=<?= $reuqestedid; ?>"

linux - How to copy the file description when forking instead of sharing? -

when process forks, child share parent file description open before forking. is there way make child have own copy of file description (that includes offset , file status flag)? i need since don't want both parent , child share same offset of file; if 1 process has done read, don't want offset of file second process changed. there's both 'open file descriptor' , 'open file description'. when file opened open() , both file descriptor , file description created. when file descriptor duplicated ( dup() or dup2() ), 2 descriptors refer same open file description. on fork() , file descriptors in parent copied (duplicated) in child; descriptor in parent , child both point same open file description. the child process shall have own copy of parent's file descriptors. each of child's file descriptors shall refer same open file description corresponding file descriptor of parent. there's no way have work otherwise — you'd

python - Google app engine - Bugs in the code -

my code this: import webapp2 import re form = """<html> <form method=post> <input name="username"><div id=div>%s</div><br> <input name="password"><div id=div>%s</div><br> <input name="verify"><div id=div>%s</div><br> <input name="email"><div id=div>%s</div> <input type="submit"> </form> </html>""" class mainpage(webapp2.requesthandler): def get(self): self.response.headers['content-type'] = 'text/html' self.response.write(form % ('','','','')) def reply(self,user,password,verify,email): if not user , password , verify , email: self.redirect('/broski') else: self.response.write(form % (user,password,verify,email)) def post(self): self.usererror = '' if not re.com

javascript - The onclick function is not working in safari -

kindly me on because code works in chrome onclick function ok when run in safari in won't go in #download id , won't reload page. here code: <a href="#download" onclick='window.location.reload(true);'> <div class="download"> <p class="download_text">downloaded</p> </a> can try function: function reload() { if (window.location.href != "download.html#") { window.location.href="download.html#" } } reload()

javascript - how to use select2 jquery plugin with Ajax? -

i'm using laravel5 jquery plugin select2 in cause used ajax retrieve data db , display when using type word. here ajax. $(".js-data-example-ajax").select2({ ajax: { url: "https://api.github.com/search/repositories", datatype: 'json', delay: 250, data: function (params) { return { q: params.term, // search term page: params.page }; }, processresults: function (data, params) { // parse results format expected select2 // since using custom formatting functions not need // alter remote json data, except indicate infinite // scrolling can used params.page = params.page || 1; return { results: data.items, pagination: { more: (params.page * 30) < data.total_count } }; }, cache: true }, escapemarkup: function (markup) { return markup; }, // let our custom formatter work minimuminputlength: 1, templateresult

java - how many instances of the class UserHandler will be created in this case? -

in our application using spring rmi concept . i have question follows there 1 interface named userhandleri , implementation class userhandler shown below interface public interface userhandleri extends remote { public boolean add_user(string message) throws exception; } and implementation class (userhandler) public class userhandler implements userhandleri { public abstract boolean add_user(string message) throws exception { // business logic goes here return true ; } } related above class , interface above , these mentioned in xml file <bean id="streamer-core" class="com.user.userhandler" scope="singleton" /> <bean id="streamer" class="org.springframework.remoting.rmi.rmiproxyfactorybean"> <property name="serviceurl" value="rmi://${${appl-host}}:${${appl-port}}/app" /> <property name="serviceinterface" value="com.at.userhandler"/

What information do I use to test credit card transactions with PayPal Payments Pro -

i've spent hour trying figure out information use test credit card transactions in paypal sandbox environment. no matter try "invalid data transaction cannot processed." error. i'm using classic api. i created personal verified account visa credit card in developer account credit card information generated system yield same error. here's screen of account: https://www.evernote.com/shard/s141/sh/e2a7147c-9cfb-4587-814d-13fdd97d1c29/a1e3d97e505071d6f927a71195f06f2f after searching found post https://www.x.com/developers/paypal/forums/paypal-sandbox/how-test-sandbox-paypal-using-pay-credit-card logged sandbox account, went profile > credit/debit cards > add card, chose visa credit card number wasn't pre-populate had hoped. here's screen: https://www.evernote.com/shard/s141/sh/5cfce2b8-da2f-4147-abf5-5d742995b3ca/6d6e1541cbb5809e0e14972d2d81f4bb i'm @ loss now. appreciated :) p.s. i've tried cliche test numbers 4444333322221111 noth

ios - Dismissing ViewController Scenario -

i new swift programming. stuck in 1 scenario. when app loads, first screen gets in viewcontroller1 user's latitude , longitude , gets data backend api , loads data in table view controller. code of getting user's location , loading table view controller in viewdidload method. in viewcontroller1, have button when tapped, presenting view controller (which embedded in navigation controller) modally. following lines of code using present new viewcontroller (viewcontroller2). let vc2 = self.storyboard?.instantiateviewcontrollerwithidentifier("newvc2") as! newvc2 let navcontroller = uinavigationcontroller(rootviewcontroller: vc2) vc2.delegate = self self.presentviewcontroller(navcontroller, animated: true, completion: nil) when close viewcontroller2 saying self.dismissviewcontroller, closes , when control comes viewcontroller1, viewdidload executed again , code of invoking backend api , getting user's location getting invoked.

actionscript 3 - How to arrange images with coordinates given from xml? -

good day, have question. need use loop arrange loaded images xml. how should load in function loaddata images it's coordinates(x,y) , description textfields ?? here code: var xmllist:xmllist; var urlloader:urlloader; function main():void { urlloader = new urlloader(); urlloader.load(new urlrequest("images.xml")); urlloader.addeventlistener(event.complete, loaddata); } function loaddata(e:event):void { xml = new xml(urlloader.data); xmllist = xml.image; (var i:uint = 0; < xmllist.length(); ++ ) { }} here xml: <images> <image> <title>first picture</title> <file>images/pic1.jpg</file> <x>180</x> <url></url> <y>50</y> </image> <image> <title>second picture</title> <file>images/pic2.jpg</file> <x>100</x> <y>100</y> <url></url>

Display animated gif in ImageIcon proxy with java swing -

i used write this jlabel label=new jlable(url); frame.getcontentpane().add(label); and works animated gif image however , when want use imageproxy load gif form internet doesn't work. my imageproxy this public class imageproxy implements icon{ imageicon imageicon; url imageurl; thread retrievalthread; boolean retrieving =false; public imageproxy(url url){ imageurl = url; } public int geticonheight() {skip} public int geticonwidth() {skip} @override public void painticon(final component c, graphics g, int x, int y) { system.out.println("paint"); if(imageicon !=null){ imageicon.painticon(c, g, x, y); }else{ g.drawstring("loading image", x+10, y+80); if(!retrieving){ retrieving =true; retrievalthread = new thread(new runnable(){ public void run(){ try{ imageicon = new imageicon(imageurl); c.repaint();

google chrome - what is `::content` in a css? -

Image
this question has answer here: what ::content/::slotted pseudo-element , how work? 2 answers i wonder ::content in css rule ? the thing when use adblock plus( for chrome ), seems add css rule websites, below: it make dom hidden ( display: none ), , try reset css make seen using settimeout , failed, both csses (the abp adds , add) work, dom still not seen. i check css abp adds, finding ::content , wonder it's reason why cannot reset css rules, after google, find nothing useful. so come here see if there me! great thanks! i'm having trouble finding official documentation on pseudo-element selector, it's selector shadow dom elements. see following excerpts adblock plus chrome extensions source code: include.preload.js convertselectorsforshadowdom function convertselectorsforshadowdom(selectors) { var result = []; var prefix = &qu

xcode - how to create a uml class diagram from code -

i building calculator app , stuck on creating uml class diagram it. if have following class in project called calculatorbrain, how make uml class diagram out of code? appreciated. #import "calculatorbrain.h" @implementation calculatorbrain -(void)updatecurrentnumber:(double)number { currentnumber = number; } -(void)updatecurrentoperation:(int)op { currentoperation = op; } -(double)performoperation:(int)operation { if (currentoperation == 0) { result = currentnumber; } else{ switch (currentoperation) { case 1: result = result * currentnumber; break; case 2: result = result / currentnumber; break; } } currentnumber = 0; if (operation == 0) result = 0; currentoperation = operation; return result; } -(double)otherfunctions:(int)number { double facreturn = 0; switch (number) { case 1: facretu

jenkins - Rancher Performance (Docker in Docker?) -

looking @ rancher, performance like? guess main question, deployed in rancher docker in docker? after reading http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ trying stay away idea. looks rancher ci pipeline docker/jenkins docker in docker, rest? if setup docker-compose or deploy catalog, docker in docker? i've read through documentation , simple question has still flown on head. guidance appreciated. thank you rancher not deployed docker in docker (dind). main components of rancher, rancher/server , rancher/agent both normal containers. server, in normal deployment, runs orchestration piece , few other key services catalog, docker machine provisioning, websocket-proxy , mysql. of these can broken out if desired, simplicity of getting started, in one. use s6 manage orchestration , database processes. the rancher/agent container privileged , requires user bind mount hosts docker socket. package docker binary in container , use communic