Posts

Showing posts from March, 2012

github - Cloning the Git Repository on Eclipse (Transport Error) -

Image
i new in bluemix services. not find exact solution problem. i have web application on bluemix , git repository on devops. i'm working on eclipse (have git , bluemix plugins) , made changes on project. now, have last version of project in local , bluemix side , need update repository (which still starter code). as first step, trying clone git repository (on eclipse). after fill uri , authentication fields, getting error shown below. can pass on ssl error setting http.sslverify=false cannot solve others. thanks. error log: eclipse.buildid=4.4.2.m20150204-1700 java.version=1.8.0_45 java.vendor=oracle corporation bootloader constants: os=win32, arch=x86_64, ws=win32, nl=tr_tr framework arguments: -product org.eclipse.epp.package.jee.product command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product org.eclipse.egit.ui error thu apr 23 12:46:33 eest 2015 https://hub.jazz.net/git/***/***: authentication not supported

android - Custom EditText style with appcompat v7 -

i created custom view extending edittext , specified attribute style change background tint color. public class customedittext extends edittext { public customedittext (context context) { this(context, null); } public customedittext (context context, attributeset attrs) { this(context, attrs, r.attr.customedittextstyle); } public customedittext (context context, attributeset attrs, int defstyle) { super(context, attrs, r.attr.customedittextstyle); } // other code... } then added attribute style: <resources> <attr name="customedittextstyle" format="reference" /> <resources> i using theme.appcompat in app. overriding colorprimary, colorprimarydark , coloraccent. <style name="apptheme.base" parent="theme.appcompat.light.darkactionbar"> <item name="colorprimary">@color/blue</item> <item name="colorprimarydark"&g

servicenow - can workflow activity be used as a condition in business rules? -

when try use condition current.wf_activity.name.tostring() == "xxxx" it's not triggering business rule. when try displaying using gs.addinfomessage(current.wf_activity.name.tostring()); displays 'xxxx'. it's observed specific types of workflow businessrule triggers while others it's not. have tried without tostring() method not working. using getdisplayvalue() doesnt works can site example using workflow activity in business rule conditions? it's possible wf_activity isn't set @ time business rule runs. may try increasing order of business rule on 1000 (so runs after engines) or changing "before" "after" rule. if doesn't work, remove condition br , log current value , comparison result: gs.log("mydebug: current.wf_activity.name=[" + current.wf_activity.name + "]); gs.log("mydebug: comparison?=" + (current.wf_activity.name.tostring() == "xxxx"));

c# - MVC5 bundles not registering the proper AJAX files -

Image
the scripts needed ajax.actionlink call not registering on production server. ajax.action link works on development environment. not seeing jquery.unobtrusive file listed in scripts see jquery.validate.unobtrusive. tried adding bundle instead still no luck. can me these bundles setup correctly. have listed files in scripts folder below. bundleconfig.cs: public static void registerbundles(bundlecollection bundles) { bundles.add(new scriptbundle("~/bundles/jquery").include( "~/scripts/jquery-{version}.js")); bundles.add(new scriptbundle("~/bundles/jqueryajax").include( "~/scripts/jquery.unobtrusive*")); bundles.add(new scriptbundle("~/bundles/modernizr").include( "~/scripts/modernizr-*")); bundles.add(new scriptbundle("~/bundles/bootstrap").include( "~/scripts/bootstrap.js",

python 3.x - Error <Class> has not attribute <method> in Tkinter -

i trying link tkinter frame one, error attributeerror: 'mainscreen' object has no attribute 'nextscreen' my code below : what meaning of error? from tkinter import ttk tkinter import * import tkinter import imap class mainscreen(): def __init__(self,tkgui): global w,x self.tkgui =tkgui tkgui.configure(background='red') label(tkgui,text='please enter email',bg='red',fg='white').grid(row=0,column=2) e=entry(tkgui,width=20) e.grid(row=1,column=2) w=e.get() print(w) label(tkgui,text='please enter password',bg='red',fg='white').grid(row=2,column=2) p=entry(tkgui,width=20,show='*') p.grid(row=3,column=2,sticky=w) x=p.get() button(tkgui,text="sign on").grid(row=5,column=2) button.bind('<button>',self.nextscreen()) def nexscreen(self,event): inboxsc

vba - SQL Server transactions and parameterized queries from Access 2007 (DAO? ADO?) -

i being forced port sql load script vba in access 2007 read flatfiles , insert sql server (using odbc , parameterized query strings). can post full example of how use either dao querydef or ado inserts executed in single transaction on sql server? not need linked tables, file read , transforms done in vba prior insert , done using stored procs , triggers in sql server after load. need able rollback multiple-inserts if there odbc error. none of other stackoverflow posts i've found make sense me; know "odbcdirect workspaces" not supported in access 2007. using ado , begintrans make sense me?

c# - Delegate section doesn't run on client-side of MMO -

this code here fine, doesn't appear running delegate section. marked isn't working comments: using unityengine; using system.collections; using ogclient_framework; [packetopcode(1)] public class packet_01_login : packet { public override void decode() { bool success = bytebuffer.readboolean (); if (success) { int networkid = bytebuffer.readint(); debug.log ("successful login, network id:" + networkid); } else { debug.log ("not correct/server down"); int opcode = bytebuffer.readint(); debug.log ("test"); //below section not run, no errors shown, debug log 'test1' not printed debug log above is. gameclient.singleton.prepare(delegate{ interfacemanager.singleton.loginmessage(opcode); debug.log ("test1"); }); } } } why not

spring entity concurrency control while persisting into database -

i trying control concurrent access same object in spring+jpa configuration. example, have entity named a. multiple processes updating same object of a. using versioning field controlling here issue: example 2 processes reads same entity (a) having version=1. 1 process update entity , version gets incremented. when 2nd process tries persist object, optimistic lock exception thrown. using spring services , repository access objects. please me here? what's problem then? that's how it's supposed work. you can catch jpaoptimisticlockingfailureexception , decide there. this, example, give validation error message on spring mvc form: ... if(!bindingresult.haserrors()) { try { foorepository.save(foo); } catch (jpaoptimisticlockingfailureexception exp){ bindingresult.reject("", "this record modified user. try refreshing page."); } } ...

javascript - Google map API, add marker in ajax after initialize the map -

i know there have been questions related title, didn't find answer suit me. here issue : i trying print map, multiple marker in it, generated via database. have, below map, checkbox allow me filter marker on map. so, first time loading map, filtred (depending on checked default), don't understand how add / remove marker map once initialized. have reload map, or missing ? here relevant code : <form> <input class="test" type="checkbox" name="type" value="1" onclick="test()" checked/>1<br/> <input class="test"type="checkbox" name="type" value="2" onclick="test()" checked/>2<br/> <input class="test"type="checkbox" name="type" value="3" onclick="test()" checked/>3<br/> <input class="test"type="checkbox" name="type" value="4" onclick="

javascript - How to generate option values into jquery multiselect from js -

i trying generate dynamically option values in jquery multiselect using javascript. function prova(data){ var t = 0; var tmp = new array(); var keys = new array(); $("#select-1").multiselect({ multiple: true, header: true, noneselectedtext: "select option", selectedlist: 1 }); var stringa =""; $.each(data, function(key,value){ stringa +="<option value=\""+key+"\">"+key+"</option>"; if(t==0){ tmp[0] = key; } t++; }); $("#select-1").html(stringa); } my values generated in #select-1 that: <select id="select-1" size="5" name="example-basic" title="basic example" style="display: none;"> <option value="name1">name1</option> <option value="name2">name2</option> <option value="name3">name3<

objective c - NSString formatting -

i'm changing pre-written code , video timelabel formatted so: return [nsstring stringwithformat:@"%2d:%0.2d", minutes, seconds]; what's happening if minutes single digit, it's returning space before it, eg 4:49 has space before 4. how format there 2 characters in string if minutes arguments 2 digits, 1 character if minutes 1 digit? you want following: return [nsstring stringwithformat:@"%d:%02d", minutes, seconds]; simply using %d show number in many digits needs. , seconds shouldn't have decimal. %02d says show @ least 2 digits , left fill leading zeros ensure there 2 digits if needed.

ios - Where exactly is Xcode told to build i386 & x86_64 for the simulator? -

i cannot find in build settings related simulator. how architecture change i386 , x86_64 when building simulator? i'm trying understand build process can create fat binary cocoa touch framework ios 8 simulator , device contains every architecture.

How to combine associative arrays in bash? -

does know of elegant way combine 2 associative arrays in bash normal array? here's i'm talking about: in bash can combine 2 normal arrays follows: declare -ar array1=( 5 10 15 ) declare -ar array2=( 20 25 30 ) declare -ar array_both=( ${array1[@]} ${array2[@]} ) item in ${array_both[@]}; echo "item: ${item}" done i want same thing 2 associative arrays, following code not work: declare -ar array1=( [5]=true [10]=true [15]=true ) declare -ar array2=( [20]=true [25]=true [30]=true ) declare -ar array_both=( ${array1[@]} ${array2[@]} ) key in ${!array_both[@]}; echo "array_both[${key}]=${array_both[${key}]}" done it gives following error: ./associative_arrays.sh: line 3: array_both: true: must use subscript when assigning associative array the following work-around came with: declare -ar array1=( [5]=true [10]=true [15]=true ) declare -ar array2=( [20]=true [25]=true [30]=true ) declare -a array_both=() key in ${!array1[@]};

java - How to return "result" from one class to a defined class? -

i working viewpager i.e on top of mainactivity class , viewpager class extends fragment. the problem that, when need class return result while passing intent use startactivityforresult(intent,int) hence passes result captured in secondactivity class it's been called. but working viewpager on top of mainactivity , using floating action button , when click button open second activity returns result mainactivity not viewpager class. so question how can pass result taken secondactivity desired class? update:: mainactivity.java main class using intent receiving result second activity class activitytwo what have done here startactivityforresult(intent,1); public void onactivityresult(i,j,intent){myfragment fragment; fragment.onactivityreusult(i,j,intent);//here have passes values received class fragment class need values it's not working } you can use bundle. take @ topic : bundle bookdescfragment = new bookdescfragment(); bundle args = ne

jquery - Position absolute behaving like position fixed when adding dynamic HTML via javascript -

Image
here's code example i'm having problems with: http://jsfiddle.net/eejpjch3/ i'm trying add dynamic delete button above html elements when hovering. instance when have following html: <div class="row-fluid" object="columns-editable"> <div class="col-md-6" object="column-editable">column 1</div> <div class="col-md-6" object="column-editable">column 2</div> </div> <div class="row-fluid" object="columns-editable"> <div class="col-md-6" object="column-editable">column 1</div> <div class="col-md-6" object="column-editable">column 2</div> </div> for each row, when user hovers, icon pops above row allows them delete row. however, when i'm doing in code, position of delete button stays positioned @ top of first row though it's s

javascript - Set a Cookie based on url Parameter -

i need set cookie whenever user clicks through 1 of our affiliate links , lands on our site "src=uni" in url. urls this: http://www.myadmin.com?src=uni&utm_source=uni&utm_content=[publisher_id] function create cookie: function setcookie() { var url = window.location.href; if(url.indexof('?src' + uni) = 1) document.cookie="querycookie"; } can me telling going wrong in creating cookie based on query parameters? a few things here: function setcookie() { var url = window.location.search; if(url.indexof('?src=uni') !== -1) document.cookie="src=uni"; } 1) use location.search narrow down range, not necessary, less room error, 2) use !== -1 test indexof method. indexof returns "-1" if not find match. , "0" if finds match @ beginning of string. string "zero indexed" means first character in string in position "0&qu

python 2.7 - I'm having trouble installing wxPython on OS X 10.10.2 -

the wxpython installation instructions say: be sure download image matches version of python want use with. well, gee willickers. have system install of python2.7, , have own install of python2.7. how tell wxpython install in python2.7 , not system python2.7? next, tried install source. instructions in wxpython-src-3.0.2.0/docs/readme.txt say: for installation information, please see install.txt file in docs subdirectory appropriate platform use, e.g. docs/msw/install.txt. and, instructions in wxpython-src-3.0.2.0/docs/osx/install.txt say: in wxwidgets 3, cocoa recommended library. ... ... # build library cocoa (wxwidgets 2.9.0 , later) mkdir build-cocoa-debug cd build-cocoa-debug ../configure --enable-debug make # build samples , demos cd samples; make;cd .. cd demos; make;cd .. no $ make install ? in case, make ended these problems: ../src/osx/webview_webkit.mm:392:30: warning: incompatible pointer types sending 'webviewuidelegate

properties - What is the default value of "output" attribute for cfproperty getter/setter? -

i implementing <cfinterface> in component. 1 of purposes of interface make sure properties (cfproperty) defined within component. so, have explicitly created function prototypes getters/setters in interface , set accessors="true" in <cfcomponent> tag. now, want use output="false" these functions in interface gives me error: argument output value mismatch. the <functionname> function not specify same value output argument in <componentname> coldfusion component , <interfacename> coldfusion interface. how can make sure default getter/setter has output="false" ? you can't. you'll have write own getters , setters if interface happens have output="false" . omit new interfaces, or omit using interfaces altogether. the default value of output attribute not have output attribute defined @ (wrapped nothing). it's not true (wrapped cfoutput) or false (wrapped cfsilent).

How to More Efficiently Load Parquet Files in Spark (pySpark v1.2.0) -

i'm loading in high-dimensional parquet files need few columns. current code looks like: dat = sqc.parquetfile(path) \ .filter(lambda r: len(r.a)>0) \ .map(lambda r: (r.a, r.b, r.c)) my mental model of what's happening it's loading in data, throwing out columns don't want. i'd prefer not read in columns, , understand parquet seems possible. so there 2 questions: is mental model wrong? or spark compiler smart enough read in columns a, b, , c in example above? how can force sqc.parquetfile() read in data more efficiently? you should use spark dataframe api: https://spark.apache.org/docs/1.3.0/sql-programming-guide.html#dataframe-operations something dat.select("a", "b", "c").filter(lambda r: len(r.a)>0) or can use spark sql: dat.regisertemptable("dat") sqc.sql("select a, b, c dat length(a) > 0")

java - How to check another condition before set AtomicBoolean? -

i have atomicboolean , want set it, if condition true: for example have bankaccount active , saldo field. in method setinctive, have check if saldo field 0 , set active field false. this solution, i'm not sure if works! private final atomicboolean active = new atomicboolean(true); private final atomicreference<double> saldo = new atomicreference<>(0.0); @override public boolean setinctive() { //first: check if saldo 0.0 //second: set active false saldo.getandupdate(adouble -> { if(adouble == 0) active.set(false); return adouble; }); //return negated value of active field return !active.get(); } what correct solution atomics , possible without using locks? one possible way , check condition , set boolean, use atomicmarkablereference. im example of type double : private final atomicmarkablereference<double> saldo = new atomicmarkablereference<>(0.0, true); @override public

r - Removing duplicate columns in table when there are more than one duplicate set of columns -

i see how handle case of removing duplicate columns when there 2 blocks of duplicates, in real data have 3 or more. i've tried come toy example data sets there duplicate set of column names collapse. there straightforward way of untangling these messes dplyr , tidyr ? easier case: structure(list(x = c("a", "a", na, "a", "a", na, "a"), y = c(1, 5, na, 15, 19, na, 27), z = c(2, 6, na, 16, 20, na, 28), x.1 = c("b", "b", "b", "b", "b", "b", "b"), y.1 = c(3, 7, 11, 17, 21, 23, 29), z.1 = c(4, 8, 12, 18, 22, 24, 30), x.2 = c(na, na, "a", na, na, "a", na), y.2 = c(na, na, 13, na, na, 25, na), z.2 = c(na, na, 14, na, na, 26, na)), .names = c("x", "y", "z", "x.1", "y.1", "z.1", "x.2", "y.2", "z.2"), row.names = c(na, -7l), class = "data.frame&qu

Python Array, trying to place text file into an array -

i trying complete piece of coursework need place text file full of key words array when type error message saying: typeerror: 'in ' requires string left operand, not list what mean? here code: #!/usr/bin/python array = [] open("test.txt", "r") f: line in f: array.append(line) print array searchfile =open('test.txt','r') line in searchfile: if array in line: print line searchfile.close() edit: thank reply have changed line display this: searchfile =open('test.txt','r') line in searchfile: if line in array: print line searchfile.close() the search works except have keywords document containing simple words 'green, blue etc' (all on own line) have document text such 'my shirt green' when use code wont find if change sentence word find it. need search document keywords , display whole line in. it means you're attempting check whether list in string, line: if ar

r - ggplot2 position annotation_custom outside for multiple graphs on one page -

Image
i have plot doing bar plot categorical variable (e.g. group a, group b, ...). want have multiple graphs on 1 page (something this ). want create text outside plot using: ###### plot 3 graphs 1 legend , 1 text on right side ## function make 1 legend multiple graphs g_legend <- function(a.gplot){ tmp <- ggplot_gtable(ggplot_build(a.gplot)) leg <- which(sapply(tmp$grobs, function(x) x$name) == "guide-box") legend <- tmp$grobs[[leg]] return(legend)} mylegend <- g_legend(p3.legend) ### combine 3 graphs legend p <- grid.arrange(arrangegrob(p1 , p2 , p3, mylegend, ncol = 4, widths = c(20, 20, 20, 11))) ## vertical ### create text put outside multi-graph plot text1 = textgrob(paste("an example text")) p1 = p + annotation_custom(grob = text1, xmin = 1, xmax = 2, ymin = 20, ymax = 30) it gave me error "error in non-numeric argument binary operator". since x axis categorical variable, thought error caused xmax, xmin v

java - PageFactory. How to separate page elements and steps -

i'm trying use pagefactory methods , separate classes elements , methods. instance have class page elements: public class loginpageelements extends abstractpage { @findby(id = "rwoauthusername") public webelement login; @findby(id = "rwoauthpassword") public webelement password; @findby(id = "rwoauthlogin") public webelement submit; public loginpageelements (webdriver driver){ super(driver); } and class page methods: public class loginpagesteps { private loginpageelements elements; @step public void filllogin(string value){ elements.login.clear(); elements.login.sendkeys(value); } @step public void fillpassword(string value){ elements.password.clear(); elements.password.sendkeys(value); } @step public void submittheform(string value) { elements.submit.click(); } on previous page cause method visiting login page , initializing required elements: public loginpageelements clickloginbutton(){ logi

php - Guzzle give me weird json response -

i'm using guzzle make post request , send parameters. here's code: $client = new client(); $url = $this->my_url; $client->setsslverification(false,false,0); $request = $client->post($url,null,array( "param1" => $param1, 'param2' => $param2 )); $postbody = $request->getbody(); $response = $client->send($request); $body = $response->getbody(); echo $body; i return (json) when i'm doing echo: int 1 {"response":true} and of course, can't json_decode on it. don't understand why can't , why have "int 1" before it. any ideas issue?

sql - non-static variable role cannot be referenced from a static context- JDO Querydsl -

i building 1 maven project using jdo, querydsl. in daoimpl class 1 line showing error is: "non-static variable role cannot referenced static context" my pojo classes are: user.java @persistencecapable(table="user_login") public class user { @primarykey @column(name="user_id") private integer userid=0; @column(name="user_profile_name") private string userprofilename=null; @column(name="user_email") private string useremail=null; @column(name="user_contact") private string usercontact=null; @column(name="user_name") private string username=null; @column(name="user_password") private string userpassword=null; @column(name="user_role_id") private integer userroleid=0; private role userrole=null; role.java: @persistencecapable(table="user_role") public class role { @primarykey @column(name="id") private integer roleid=0; @column(name="role

Add JMeter plugin programmatically - non gui mode -

i trying use jmeter-plugins. have placed under /lib/ext folder? there way me refer plugin jar using properties? (like user.classpath property refer custom lib) if don't want put jmeter plugin jars in lib/ext directory, define property search_paths in jmeter.properties .

jena - How could I get all the informations of an OntClass? -

i working on ontologies issues. code in java , i'm using jena in order manipulate rdf/turtle files. collect informations of ontclass knowing name. example, have ontclass: @prefix isys: <http://myonto.installsys/rule#> . isys:rule rdf:type owl:class ; rdfs:comment "design principle rules used in sidp documents"^^xsd:string ; rdfs:label "rule"^^xsd:string ; rdfs:subclassof owl:thing ; owl:equivalentclass [ rdf:type owl:restriction ; owl:onproperty ata:ata_number ; owl:somevaluesfrom xsd:integer ; ] ; owl:equivalentclass [ rdf:type owl:restriction ; owl:onproperty isys:number ; owl:somevaluesfrom xsd:integer ; ] ; owl:equivalentclass [ rdf:type owl:restriction ; owl:onproperty isys:object_1_a ; owl:somevaluesfrom xsd:string ; ] ; . and suppose have prefix , rule can ontclass rule = onto.getontclass("http://myonto.installsys/rule#rule"); i aware can use

java - get ordered value of jtextfield -

with of oliver schmidt text dynamically added jtextfields . now have jpanel1 jtextfield1 generated netbeans: jtextfield1 = new javax.swing.jtextfield(); jpanel1.add(jtextfield1); jpanel1.setlayout(new org.jdesktop.swingx.verticallayout()); also addbutton adding dynamic jtextfields jpanel1 : jpanel1.add(new subpanel()); pack(); the problem stuck when push savebutton getting not ordered output text. for (component spchild : spchildren) { if (spchild instanceof jtextfield) { string text = ((jtextfield)spchild).gettext(); system.out.println(jtextfield1.gettext()); //i think code wrong system.out.println(text); for example, if value of: jtextfield1 : 1, dynamic jtextfields : 2, 3. output getting repeated jtextfield1 : 1 2 1 3 desired output is: 1 2 3 i don't know how avoid problem. you correct, need remove jtextfield1 loop , print above loop , loop through dynamic text boxes. // move

Has Facebook graph API stopped return expires when exchanging for long-lived tokens? -

i'm using facebook php sdk obtain user's access token. code copied here https://developers.facebook.com/docs/php/gettingstarted/4.0.0 should below: $helper = new facebookredirectloginhelper('your redirect url here'); $loginurl = $helper->getloginurl(); // use login url on link or button redirect facebook authentication and in redirect action: $helper = new facebookredirectloginhelper(); try { $session = $helper->getsessionfromredirect(); var_dump($session); } catch(facebookrequestexception $ex) { // when facebook returns error } catch(\exception $ex) { // when validation fails or other local issues } a couple of weeks ago, see expires value returned api. now, access_token returned. has facebook changed api output? the above code looks fine for, token expiration sol : facebook has changed endpoint redirect url long live tokens, now end point : https://graph.facebook.com/oauth/client_code?access_token=...&client_secret=...&r

apache - redirect url with mod_rewrite at .htaccess and keeping domain ending -

i try that: www.domain1.com/some-ending or domain1.com/some-ending www.domain2.com/some-ending if url called or without www, second domain should opened corresponding ending (/some-ending), variable. this code far, need ending in there: rewriteengine on rewritecond %{http_host} ^(www\.)?domain1\.com$ [nc] rewriterule ^(.*)$ http://www.domain2.com/$1 [r=301,l] your code looks ok , added optional "/" pattern can accept url ending "/" , "nc" flag case-insenstivity. rewriteengine on rewritecond %{http_host} ^(www\.)?domain1\.com$ [nc] rewriterule ^(.*)/?$ http://www.domain2.com/$1 [r=301,l,nc]

linux - Install Firefox on Tinycore (Docker) -

how install firefox on linux tinycore on docker container? normally on debian go ahead , write in dockerfile: run deb http://packages.linuxmint.com debian import run apt-get update run apt-get install firefox but since deb not available on tinycore, how in dockerfile? you might want ( for example ): crux x-chat -- aside differences in linux dsitribution you'll want use same ( if not similar ) concepts x/xorg apps running inside docker containers. the main points are: install firefox , x/xorg dependeninces part of run command in dockerfile run following and/or create shell script or function wrap nicely: export xsock=/tmp/.x11-unix export xauth=/tmp/.docker.xauth if [ ! -f $xauth ]; touch $xauth xauth nlist :0 | sed -e "s/^..../ffff/" | xauth -f $xauth nmerge - fi docker run -i -t -e display -e user -e xauthority=$xauth -v $xsock:$xsock -v $xauth:$xauth --net=host

c# - What blocks a .NET executable from creating a listening TCP port on localhost? -

i have application creates http server on random port (50000-59000) on "localhost". tries connect port afterwards determine if setup correctly , ready use. this seems work on machines well. written in c#.net 4.0 windows xp , higher. now have problem on 1 server @ 1 customer creation of server seems work can't connect it. sadly didn't information exception details not outputted software has happened. it works if file on local disk. if start specific windows network share stops working. think have special setting causes issue. don't know reason. my question: do know settings, system administrator make, prevents software, running normal user, connect listening port, program has opened moment ago? may group policy settings in active directory? i've written test program try again @ our customer.

angularjs scope - ionic angular controller statement block only runs once -

i have "coupons.html" , when click coupon item i'm taken "single-coupon.html" singlecouponctrl called: .controller('singlecouponctrl', function($scope, $state, userservice) { console.log("fire single coupon controller"); }) so when start on "coupons.html" , click item see fire single coupon controller in console if hit button , click item again don't repeat of "fire single coupon controller". shouldn't seeing again since i'm recalling page? if not, how can controller run again? i've tried using ng-init , $scope.init accomplishes same thing. ionic cache lot of things. personnaly following on routing js ( cache: false, ) .state('camera',{ url:"/camera", cache: false, controller:"cameractrl", templateurl:'app/views/loading/index.html' })

html - Bootstrap - input-group-btn wants to float right -

so i'm building navbar on website search bar included, along grouped button. works fine on desktop view, when shrink down mobile view , site produces collapsible menu, search bar stays left, button floats off right. not have issue when remove span input-group-btn class surrounds it. <form class="navbar-form navbar-left form-inline" role="search"> <div class="row"> <div class="input-group"> <input type="text" class="form-control" style="width: 250px;"/> <span class='input-group-btn'> <button type="button" class="btn btn-default" aria-label="search"> <span class="glyphicon glyphicon-search" aria-hidden="true"></span> </button> </span> </div> </div> </form> picture includ

html - I can't upload my background-image from my FTP to my website -

i stuck trying set background-image header on website. nothing loads. hosting has disabled linking images via external url, i've put image on filezilla, doesn't work. i have copied image path ftp , pasted in html file didn't work. have tried copy code found in tutorials, didn't work. whether it's code or ftp, can't figure out. let's make map in ftp account, name map test now. open map test , upload file index.html . upload image in map test . have map named test , in map 2 files, 1 index.html , image.jpg . when want use image in index.html file write simple code <img src="image.jpg"/> . should upload image. visit link: www.yourhosting/ftpname/test/index.html edit: note: should work online, not on local host. can see youre doing uploading on filezilla.

java - Multiplication in Calculator Android App throwing alphabeta in output -

below code calculator android app making: package com.example.calculator; import java.text.decimalformat; import java.text.numberformat; import java.util.iterator; import java.util.stack; import java.lang.math; import android.app.activity; import android.os.bundle; import android.widget.adapterview; import android.widget.button; import android.widget.textview; import android.widget.adapterview.onitemclicklistener; import android.widget.gridview; import android.view.view; import android.view.view.onclicklistener; public class main extends activity { gridview mkeypadgrid; textview userinputtext; textview memorystattext; stack<string> minputstack; stack<string> moperationstack; keypadadapter mkeypadadapter; textview mstacktext; boolean resetinput = false; boolean hasfinalresult = false; string mdecimalseperator; double memoryvalue = double.nan; /** called when activity first created. */ @override public void

cfbundledisplayname - iOS: Bundle Display Name -

Image
i have strange behavior bundle display name of app. if set bundledisplayname "foo.app" (my app must contain .app in name) app called: "foo.app.app". and if add blank space "foo.app " bundle display name looks ok on homescreen. workaround gets visible when app asks turn on access location "allow "sef.app " access..." can tell me additional ".app" comes from? i don't know why happen. found workaround: write "app" russian letter "А". can copy answer.

routes - How to know who called an action of controller in symfony -

i'm working in symfony2 project, , have action of controller called 2 different pages. how can know page called action, can return different response according made request : here's example of wanna do public function deleteaction(file $file) { // delete file if (// request made first page) { return $this->redirect($this->generateurl('route_of_first_page'); } elseif (// request made second page) { return $this->redirect($this->generateurl('route_of_second_page'); } } this way can stay in page made request you need action have request parameter: public function deleteaction(request $request, file $file) and referer request object: $previousurl = $request->headers->get('referer'); edit: route object: $router = $this->get('router'); $route = $router->match($previousurl);

xml - Better way to run selenium webdriver tests? -

we run large amount of tests java webdriver every day. use testng, , use bat files execute testng xmls, using classed compiled eclipse. i'm wondering, though, if there's better way this. since run hundreds (thousands?) of test cases daily, have resort creating testng xmls execute entire packages, otherwise we'd have manually create xml each test, , that's not practical. one problem executing such large tests containing hundreds of classes if there's 1 major issue (such webdriver stalling or hanging), entire test not run. also, have listener uploads server @ end of test, have wait hours results uploaded @ once (something more in "real time" better). problem if vms reboot whatever reason, "progress" lost , we'd have run tests beginning. i've seen ant builds mentioned around testng website, i'm not sure advantages of ant on using bat files execute xmls. can shed light on this? or offer solutions executing large number of tests mo

admob - Android App available on Google Play stolen and available other store with different App ID -

i received complain admob regarding specific app not belongs me, saying ads disabled on it. taking closer look, noticed related app have developed , available on google play, changed it's app id, , put on store called 1mobile.com/ ( store of illegal content ). here original app on google play and here app different id how can this? how can prevent happening? causes loose admob account. how can this? what mean, download app, change androidmanifest , resign it? well, it's that. download, change 1 file, resign. how can prevent happening? you can use obfuscator , app licensing note in application can changed, if there enough motivation it. personally, learned not care. this causes loose admob account. i don't see how. won't money stolen copies, that's sure. that't it.

c++ - Initialize the protected static member from the subclass -

i want know if it's possible initialize protected static member subclass. example, // head file class test { protected: static int i; }; class test2 : public test{}; //cpp file #include "headfile.h" int test2::i = 1; as see, when initialize static member (i), use subclass name (test2). surprise, tested code visual studio 2013 , worked without error. if tried netbeans(gcc11) under linux , got hint error: unable resolve identifier i compiled it, error message is: error: iso c++ not permit ‘test::i’ defined ‘test2::i’ [-fpermissive] now if change protected public static int i in class test, error disappear. i confused... first time found 2 different results gcc , vs. the definition violates c++14 [class.static.data] §9.4.2/2. emphasis mine: in definition @ namespace scope, name of static data member shall qualified its class name using :: operator. a more recent version of gcc (on coliru ) behaves same regardless of qualifier. ca

php - mysql select/delete using join over four tables -

i have 4 tables (in [] columns): users [id] products [id] productratings [id,value,user,product] comments [id,product,user] i select/and delete productratings there no associated comment same user product. is, if user has rated product did not comment, rating should deleted. i believe achieve using 2 queries, first: select user, product productratings and each row: select count(*) comments product=productratings.product , user=productratings.user and like if $queryabove==0 : delete productratings id=productratings.id i solve via join , learn more example rather dig through join tutorials. you need productratings , comments table - following works: delete pr productratings pr left join comments c on pr.userid = c.userid , pr.productid = c.productid c.productid null and there's demo here: http://sqlfiddle.com/#!9/89575/1

c# How can i use class name in another class string -

given 2 following method definitions: public int sumclass(int a, int b) { return + b; } public int multclass(int a, int b) { return * b; } i able call either of methods using name of method string public int process(string classname, int a, int b) { // classname="sumclass" or classname="multclass" return classname(a,b); } i show reflection approach want. won't because there better approach. why want that? because have different methods addition , multiplication. 1 better way to use enum : public enum processtype { multiplication, addition, division, subtraction } public int process(processtype processtype, int a, int b) { switch (processtype) { case processtype.addition: return sumclass(a, b); case processtype.multiplication: return multclass(a, b); // ... } } so if want sum 2 + 3: int result = process(processtype.addition, 2, 3);

c# - ASP.NET don't work onserverclick of anchor -

my project worked yesterday.but isn't anymore.what think why onserverclick of anchor not working <a class="media-link" href="#" runat="server" onserverclick="sy15"> <div class="overlay"> <div class="descr"><div> <asp:label id="label15" runat="server" text="label"></asp:label> <asp:label id="label155" runat="server" text="label"></asp:label></div></div> </div> <asp:panel id="panel15" runat="server" width="654" height="240"> <asp:image id="image15" runat="server" imageurl="img/urunler/indir.jpg" /> </asp:panel> </a> c# public void sy15(object sender, eventargs e) { if (session["kad"] != null) response.redirect("blogsingle.

cycle - Shopify closing cyle-tag -

i'm trying achieve close cycle-tag after iteration on collection has finished. <div class="row products"> {% product in collection.products limit: settings.pagination_limit %} {% cycle '<div class="row">', '', '', '' %} {% include 'product-loop' collection.handle %} {% cycle '', '', '', '</div>' %} {% endfor %} </div> i know using cycling groups, don't know how use here. after iterating on collection new cycling group should used. i tried using isn't working: {% cycle [collection.handle]: '<div class="row">', '', '', '' %} do have ideas? it should work without square brackets. try this: {% cycle collection.handle: '<div class="row">', '', '', '' %}

javascript - required attribute not working when submitting forms using submit() -

so have input fields in form this: <input name="blotter_entry_nr" type="text" class="form-control" id="arrest" placeholder="enter blotter no." required> i submitted form using following code: //handle toolbar event $('#toolbarbutton').on('toolbaritemclick', function (event, buttonclicked) { var targetblock = $(event.target).parents('.article') // article var buttonclickedid = buttonclicked.id // id of button click switch (buttonclickedid) { case 'savebutton': $( "#case-report-form" ).submit(); break; case 'menu-remove': removearticle(targetblock) break; } }); //handle form submission $("#case-report-form").on('submit',(function(e){ e.preventdefaul

qt - Solved - Qt5 QTreeView with custom model and large data very slow scrolling -

i have custom data need display in qtreeview. have derived model qabstracttablemodel, , made own implementations of rowcount(), columncount(), data(), , headerdata(). model has local qlist> support it, , data() function defined read values out of list of lists directly corresponding row , column received in qmodelindex parameter. there 2 issues i'm running into. the first load of large file quite slow, understandable. second scroll action painfully slow, not understanding. turns out if pull scroll handle down, gui hangs 20 seconds, , pops back. if pull handle greater distance down, hang time increases accordingly. if pull handle way bottom of scroll bar, after waiting application become responsive again, can pull handle , down , better response. it seems me qtreeview asking small chunk of available data, when have pulled scroll handle way bottom of scroll bar, once application becomes responsive again, has point read data. is there way program more responsive ex