Posts

Showing posts from March, 2015

javascript - How to write jQuery-AJAX function to append the list items received from PHP and show the "Loading..." message until he response is recieved? -

i'm having 1 select control on form. want populate select control list values comes php file in form of ajax response. how should , how should show 'loading...' message until response received php file? <label class="col-sm-4 col-sm-offset-1 control-label">select store<span style="color:#ff0000">*</span> :</label> <input type="hidden" name="module_url" id="module_url" value="http://localhost/modules/stores/stores.php"> the necessary php code snippet follows : switch( $op ) { case "get_all_stores": // available stores. $ret_store = $objstore->getallstorebypage(''); if(!$ret) { $error_msg = $objstore->getallerrors(); $data = array(); $data['error_message'] = $error_msg; $data = json_encode($data); echo $data; die; } else { $data = array(); $data = $objst

java - How can i get Facebook post modified time -

this question has answer here: filtering facebook users profile feeds updated_time 1 answer currently working poller can fetch facebook post , facebook post comments. poller working in specific time interval.current problem if 1 post polled in not polling in next time have new comments. example :- poller starts 10 . fetch post , comments before 10 next time poller running after 30 minutes time pole fetch new post 10 -10:30 not fetching posts have new comments . is there solution finding post have update in between time interval. i got answer stack on flow post filtering facebook users profile feeds updated_time it's possible using fql. for example, modifying example on facebook developers site, can retrieve current user's posts wall/feed updated before december 30, 2009 @ 12am est so: select post_id, actor_id, target_id, message stream so

libjpeg - C++ error C2061: syntax error : identifier 'FILE' jpeglib issue? -

i'm following walk-through required jpeglib http://www.ijg.org/ . after installing files in jpegsr9a.zip , adding code utilizes files, following errors after compiling: 1> jpeg.cpp 1>c:\libraries\jpeg\jpegsr9a\jpeg\jpeglib.h(974): error c2061: syntax error : identifier 'file' 1>c:\libraries\jpeg\jpegsr9a\jpeg\jpeglib.h(975): error c2061: syntax error : identifier 'file' 1>c:\...\jpeg.h(5): error c2143: syntax error : missing ';' before '*' 1>c:\...\jpeg.h(5): error c4430: missing type specifier - int assumed. note: c++ not support default-int 1>c:\...\jpeg.cpp(11): error c2065: 'pbitmap' : undeclared identifier 1>c:\...\jpeg.cpp(16): error c2065: 'pbitmap' : undeclared identifier 1>c:\...\jpeg.cpp(16): error c2227: left of '->sizex' must point class/struct/union/generic type 1> type 'unknown-type' there lot more, think they're related c2061 errors. i've made mist

amazon web services - Reduce limit for ec2 instance in other region to zero -

by default limit of ec2 instance in region 30, want make zero, regions don't want deploy time. when worked on console, don't see way make limit zero, there option increase our limit. wasn't able use google too. how reduce limit of ec2 instance in region zero. you can't limit max ec2 instances region in way describe, setup policy particular iam user restricted regions allowed created instances in - wouldn't limit number can create, can prevent ec2 instances being created @ except in regions allow. http://docs.aws.amazon.com/awsec2/latest/userguide/iam-policies-for-amazon-ec2.html for example: { "statement":[{ "effect":"allow", "action":"runinstances", "resource":"*", "condition":{ "condition":{ "ec2:region":"us-east-1" } } } ] }

wpf - How to deal with a dependency Property that is already registered -

Image
i have dependencyproperty declared so; public readonly showhideaddbuttonproperty dependencyproperty = dependencyproperty.register("showhideaddbutton", gettype(boolean), gettype(datanavigator), new frameworkpropertymetadata(true, frameworkpropertymetadataoptions.affectsrender, new propertychangedcallback(addressof onshowhideaddbuttonchanged))) it forms part of standalone usercontrol i'm building (both because useful me in future , because it's way learn). when control first added project , project run works well, thereafter throws arguementexception message stating 'showhideaddbutton' property registered 'mycontrol'. so 1 started looking possibility of unregistering dependency property appear not idea. 2 questions arise this. to add further clarity, in light of answer below here full code relating dependency property. making method shared causes 'showhideaddbutton' , 'add' throw same error mentioned in comment answer.

php - How to change the css of the following line? -

there $message variable. in variable there string concatenation happening. want use css on variable anyhow , know possible. tried inline css no result. please in matter.thanks... $message = __( 'someone requested password reset following account:' ) . "\r\n\r\n"; $message .= network_home_url('/') . "\r\n\r\n"; $message .= sprintf(__('username: %s'), $user_login). "\r\n\r\n"; $message .= __('if mistake, ignore email , nothing happen.') . "\r\n\r\n"; $message .= __('to reset password, visit following address:') . "\r\n\r\n"; $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" .rawurlencode($user_login), 'login') . ">\r\n"; you can put inside html tag , provide style or class attribute $message = '<div class="themessage" style="font-family:helvetica;color:red;">something

php - encoding in doctrine or twig have problems -

i have project written symfony framework , use doctrine orm , twig dor template engine. project no have problem on system(local), on server: have problem in encoding. use utf8 encodin , utf8_general_ci collection charset. as say, no have problem in local , data right on server in phpmyadmin, no on website's pages(my symfony project), know pages have true encoding because static text in twig right , data read mysql have problem plz see site: http://iaubir.cloudsite.ir/blog/zeinali thank help edit: problem imported row phpmyadmin(import structure & data), if login admin panel , post new post, display correctly i update field value "دروس" , display correctly in site, in phpmyadmin have "دروس" value try detect encoding of "دروس" this site , detect: source encoding: utf-8 displayed as: windows-1258 probably problem imported data, wouldn't use phpadmin such task. try export database: mysqldump -uroot -p databas

java - Retrieving data from firebase returning NULL -

when call listpost(), return null. guess doesn't wait listener fetch post firebase. how can wait fetch post firebase before arraypost returned? public post[] listpost() { arraylist<post> list = new arraylist<post>(); // fetch post firebase postref.addvalueeventlistener(new valueeventlistener() { @override public void ondatachange(datasnapshot snapshot) { for(datasnapshot child : snapshot.getchildren()) { string id = child.getkey(); string title = child.child("title").getvalue().tostring(); string content = child.child("content").getvalue().tostring(); string date = child.child("date").getvalue().tostring(); string status = child.child("status").getvalue().tostring(); post post = new post(); post.setid(id); post.settitle(title); post.setconte

python - How to use latest openssl library with pyOpenSSL? -

i using pyopenssl , , uses openssl 1.0.1f installed system. install openssl 1.0.1j source, , set new version library path ld_library_path , @ time, when running py file, produce error: file "sslcert.py", line 5, in <module> openssl import ssl, _util, crypto ... file "/usr/local/lib/python2.7/dist-packages/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py", line 149, in load_library raise ffiplatform.verificationerror(error) cffi.ffiplatform.verificationerror: importing '/usr/local/lib/python2.7/dist-packages/cryptography-0.6.1-py2.7-linux-x86_64.egg/cryptography/_cryptography_cffi_36a40ff0x2bad1bae.so': /usr/local/lib/python2.7/dist-packages/cryptography-0.6.1-py2.7-linux-x86_64.egg/cryptography/_cryptography_cffi_36a40ff0x2bad1bae.so: symbol ec_gfp_nistp521_method, version openssl_1.0.1 not defined in file libcrypto.so.1.0.0 link time reference i wonder using latest openssl library pyopenssl, how can fix issue? you

networkonmainthread - How do I fix android.os.NetworkOnMainThreadException? -

i got error while running android project rssreader. code: url url = new url(urltorssfeed); saxparserfactory factory = saxparserfactory.newinstance(); saxparser parser = factory.newsaxparser(); xmlreader xmlreader = parser.getxmlreader(); rsshandler thersshandler = new rsshandler(); xmlreader.setcontenthandler(thersshandler); inputsource = new inputsource(url.openstream()); xmlreader.parse(is); return thersshandler.getfeed(); and shows below error: android.os.networkonmainthreadexception how can fix issue? this exception thrown when application attempts perform networking operation on main thread. run code in asynctask : class retrievefeedtask extends asynctask<string, void, rssfeed> { private exception exception; protected rssfeed doinbackground(string... urls) { try { url url = new url(urls[0]); saxparserfactory factory = saxparserfactory.newinstance(); saxparser parser = factory.newsaxparser();

Spring Security to Validate login RestAPI -

i know question asked many times did not answer required. i want link can me create spring security framework, in donot whant login form validation. it should done login restapi. hit url like- http://localhost:8080/login post request containing username , password , return json response sucess or failure status if sucess able hit secure api requests. i using spring , spring security since 1 , half year spring security develop rest api use below technique user authentication follow below steps allow access http:// localhost:8080/login user user pass username , password in body authenticate user database entry create access token , send response using access token user interact secure api. i provide source code if need.

jsp - errorPage for Servlet class -

ı want add errorpage project. when excaption ı want open errorpage. example; try { if ("plus".equals(op)) { v1 = getnumber(value1); v2 = getnumber(value2); result = string.valueof(v1 + v2); } else if ("minus".equals(op)){ v1 = getnumber(value1); v2 = getnumber(value2); result = string.valueof(v1 - v2); } else{ result = value1+value2;} } catch (numberformatexception oops) { exception e = new runtimeexception(oops); log("*-*-*-*** bad news - validation failed or has been bypassed*-*-*-*-*", e); oops.printstacktrace(); } request.setattribute("result", result); requestdispatcher dispatcher = request.getrequestdispatcher("requestdispatcher.jsp"); i use code in xml file doesnt work <error-page> <!--

postgresql - Grouping similar rows and counting other columns based on it in SQL -

i trying run sql query on result table this: name | property | col1 | col2 ___________________________________________ abc | temp.a | 1 | 0 abc | temp.b | 1 | 0 abc | perm.a | 1 | 1 abc | date | 0 | 0 abc | perm.b | 1 | 0 i want group similar rows , count col1 , col2 1 instead of taking sum, should this: name | propertyname | count_col1 | count_col2 ___________________________________________________________ abc | temp.% | 1 | 0 abc | perm.% | 1 | 1 abc | date | 0 | 0 i tried sql queries doesn't work. tried using common table expressions ( 'with' keyword) there better way of writing sql? select name, split_part(property, '.', 1) propertyname , bool_or(col1) col1 , bool_or(col2) col2 tbl group 1, 2; assuming col1 , col2 boole

video streaming - What does segmentrange in a mpd file mean? -

i got sample mpd file http://dash-mse-test.appspot.com/media.html , below snippet containing single representation. ... <representation bandwidth="4190760" codecs="avc1.640028" height="1080" id="1" mimetype="video/mp4" width="1920"> <baseurl>car_cenc-20120827-89.mp4</baseurl> <segmentbase indexrange="2755-3230"> <initialization range="0-2754" /> </segmentbase> </representation> ... what segmentbase mean? value of indexrange mean? initialization end range 1 less indexrange start value. ie., in above 2755-1 = 2754 (the value of initialization) can me understand significance of these number? edit 1: as per answer @sander below, understand segmentindex byte range. however, still confused how use value. for eg: <representation bandwidth="4190760" codecs="avc1.640028" height="1080" id="

android - error npm install -g ionic -

npm install -g ionic npm err! error: eacces, mkdir '/usr/lib/node_modules/ionic' npm err! { [error: eacces, mkdir '/usr/lib/node_modules/ionic'] npm err! errno: 3, npm err! code: 'eacces', npm err! path: '/usr/lib/node_modules/ionic', npm err! fstream_type: 'directory', npm err! fstream_path: '/usr/lib/node_modules/ionic', npm err! fstream_class: 'dirwriter', npm err! fstream_stack: npm err! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23', npm err! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53', npm err! 'object.oncomplete (fs.js:107:15)' ] } npm err! npm err! please try running command again root/administrator. npm err! system linux 3.2.0-72-generic npm err! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ionic" npm err! cwd /home/livemen npm err! node -v v0.10.33 npm err!

r - Is it possible to do in the loop ? Clustering/heatmaps -

i run whole code in loop because there more tables 1 in example. don't have experience in doing loops i'd grateful help. that's code run in loop: cluster1 <- tbl_cluster[tbl_cluster$fit.cluster == 1,] cluster1 <- cluster1[,-25] cluster1 <- as.matrix(cluster1[,2:24]) mode(cluster1)<-"numeric" heatmap.2(cluster1, colv = na, scale = "none", dendrogram = "row", col=rainbow(256, s = 1, v = 1, start = 0, end = 2/6, alpha = 1), density.info = "none", trace = "none", key = false, cexcol=0.5, cexrow=1) mtext(paste("cluster 1",""), side=3, line=-1, cex=2, col="black") mtext("size in kda", side=1, line=3.5, cex=1.3, col="black") i create pdf file , keep of heatmaps in same pdf, each heatmap on new page. in total there 50 clusters: cluster1, cluster2, cluster3 , on...

How to detach from a docker in a docker? -

detaching docker container works ctrl-p + ctrl-q . how detach docker in docker? in usecase i'm running ssh in docker , on server attach docker containers. able detach conatiner attached on server, ctrl-p + ctrl-q detach local container running ssh connection. is there way detach docker in docker? pressing ctrl p twice send single ctrl p container attached to. want ctrl p ctrl p ctrl q

java - Change fill color of JavaFX Charts -

Image
i have outputted line chart using javafx. know how can change fill color (the orange) make transparent dynamically (possibly without use of css). this code have till now; @override public void start(stage stage) { stage.settitle("ann"); //defining axes final numberaxis xaxis = new numberaxis(); final numberaxis yaxis = new numberaxis(); xaxis.setlabel("epochs"); yaxis.setlabel("% of bad facts"); //creating chart final linechart<number,number> linechart = new linechart<number,number>(xaxis,yaxis); linechart.settitle("bad facts vs epochs"); //defining series xychart.series series = new xychart.series(); series.setname("badfacts/epoch"); (int k=0; k<epochs.length; k++) { series.getdata().add(new xychart.data(epochs[k], badfacts[k])); } scene scene = new scene(linechart,1500,1100); linechart.getdata().add(series); stage.set

cloud - How to override action Email SalesOrder in SO30100 Screen -

i try customize action email in salesorder screen, use code not work. give me suggest code , customize send notification in acumatica. using acumatica 4.2. thank in advance. public cractivitylist<soorder> activity; public pxaction<soorder> notification; [pxuifield(displayname = "notifications", visible = false)] [pxbutton(imagekey = px.web.ui.sprite.main.dataentryf)] protected virtual ienumerable notification(pxadapter adapter, [pxstring] string notificationcd ) { foreach (soorder order in adapter.get<soorder>()) { if (order.ordertype == "cm") { ///my function emailnotification.send_atnpp(order, "so301000", "sendreturnso", "[[noidung]]", createemailcontent(order)); } yield return order; } yield return adapter.get(); } what error receive? have tr

ios - How to handle below schema, my requirement is split queries and then integrate queries to database related code? how can i do? -

i m getting string server, have split these queries , implement local db code, how can (handle string like, split , converting) sql://query=create%20table%20employee%20(empid%20int%2c%20empname%20text%2c%20age%20int%2c%20gender%20text%2c%20sync%20int)&sync=1&syncquery=select%20*%20from%20employee%20where%20sync%3e0%20limit%2010&onadded=update%20employee%20set%20sync%3d0%20where%20empid%3d%27%25empid%25%27&onmodified=update%20employee%20set%20sync%3d0%20where%20empid%3d%27%25empid%25%27&ondeleted=delete%20from%20employee%20where%20empid%3d%27%25empid%25%27&syncfrequency=300"]; here done decoding process,by using below code nsstring *decodedtext = [query stringbyreplacingpercentescapesusingencoding:nsutf8stringencoding]; nslog(@"original text: %@", decodedtext);` but want split queries using keys(query, sync,sync query....), how can do please me nsstring *query=[nsstring stringwithformat:@"%s","query=create%

Android SDK 4.2 won't generate activity class -

Image
when create android application projet , follow steps, check box create activity blank activity , when finished can't found class in src, normal ? try this: go help>(select)>install new software..>and paste url: https://dl-ssl.google.com/android/eclipse/ and update developer tools. works me

ruby on rails - Rails4 method: :patch at index page using jquery/ajax -

would ask, how make like, lets says have table post , have column status (which publish or unpublish).. @ posts#index, i've button mark publish or unpublish. <%= link_to 'publish', post, method: :patch, remote: true %> <%= link_to 'unpublish', post, method: :patch, remote: true %> so want update status field through ajax using method patch.. can give me idea how it? more 1 way this. here's simple , straight forward way. in view: <%= link_to 'publish', publish_post_path, method: :patch, remote: true %> <%= link_to 'unpublish', unpublish_post_path, method: :patch, remote: true %> and add them config/routes.rb. provide publish_post_path used in view , direct them publish action in posts_controller resources :posts member patch :publish patch :unpublish end end and finally, add 2 actions controller: def publish ... end def unpublish ... end

Wordpress: Calling custom Image Field in page -

i found great thread on how add multiple custom image fields in post: adding custom image fields , other fields @ same time on admin side, works perfectly. using function automatically show added images in post in standard theme-setup. however, calling posts directly, using this: <?php $post_id = 222; $queried_post = get_post($post_id); $content = $queried_post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]&gt;', $content); ?> <h2><?php echo $queried_post->post_title; ?></h2> <?php echo $content; ?> and after want manually add images put in custom field.... can't figure how these images stored , how call them. it's quite simple missing knowledge know wordpress commands... any appreciated! edit: i got working, it's not pretty. mevius showed me how use get_post_meta put values in array (thx that), p

Perl and SNMP - input options -

script uses net::snmp module perl. i'm trying run snmpget command options added e.g. ( -ir ) (here list of options), haven't found way that. in documentation module didn't found adding input options snmp command. if there other module supports this, bi nice wouldn't first pick require lot of changes in script (not mine script, doing minor changes). i run system (or backticks) command perl, e.g.: snmpget -v2c -c community -ir host oid and parse output avoid also. any advice or solution welcome since i'm still new perl. thx. you linked documentation of net::snmp i'm sure you've read before asking... right? there no "command", there script's calls api. [edit after below comments] net::snmp has no option check indexes before sending request. so, equivalent of -ir enabled default. in fact, net::snmp not load mib, has no way of checking validity of requested variables before sending request.

utf 8 - Marmalade. Read string from UTF-8 encoded text file and draw it with IwGxFont -

now use drawing this char str[10]; strcpy(str, "str"); ciwgxfontprepareddata data; data.clear(); iwgxfontpreparetext(data, str); iwgxfontsetrect(ciwrect(10, 10, iw2dgetsurfacewidth(), iw2dgetsurfacewidth())); iwgxfontdrawtext(data); data.clear(); iwgxfontpreparetext(data, "const literal"); iwgxfontsetrect(ciwrect(10, 200, iw2dgetsurfacewidth(), iw2dgetsurfacewidth())); iwgxfontdrawtext(data); data.clear(); but want render strings loaded utf-8 file. marmalade have possibility read string utf-8 encoded text file , draw iwgxfont? as far see in documentation s3efile api doesn't containt functionality reading utf8 strings file. can show me small example or give me right direction? thanks. i have used utf8 strings , there nothing it. utf8 iwgxfontpreparetext expects. read utf8 string char buffer , should work fine.

javascript - Why is $timeout is needed for watch to trigger -

i have directive watches height of element. element updated controller uses factory method data. unless have $timeout in factory watch never gets updated. curious! can shed light onto why? my controller: $scope.update = function () { apiservice.getlinks(function (response) { $scope.links = response; // if try $scope.$apply() here says in progress, you'd expect }); } quicklinksservices.factory('quicklinksapiservice', function ($http, $timeout) { quicklinksapi.getquicklinks = function (success) { //without watch in directive doesnt triggered $timeout(function () { }, 100); $http({ method: 'json', url: '/devices/getquicklinkcounts' }).success(function (response) { quicklinksapi.quicklinks = response; quicklinksapi.savequicklinks(); success(response); }); } the directive i'm using here basically angu

How to Fill and Stroke the SVG rectangle with corners with negative radius? -

Image
i need create block specific borders around it: i want have block scalable, why try doing svg. here i've done: <svg xmlns="http://www.w3.org/2000/svg" preserveaspectratio="none slice" viewbox="0 0 300 400"> <path stroke-width="1" stroke="#7dd37d" fill="red" d=" m20 0h260 m20 20v360 m-20 20h20 m-20 -20v20 m0 20a20 20 0 0 0 20 -20 m300 20a20 20 0 0 1 -20 -20 m300 380a20 20 0 0 0 -20 20 m0 380a20 20 0 0 1 20 20" id="path"/> </svg> demo on codepen the border created path lines , arcs. problem is, can't make svg fill area inside path. fills space inside arcs instead of rectangle. i'm doing wrong? when similar inkscape, resulting path combined lines , cubic bezier curves. can done simple arcs instead of bezier curves? each time use move ('m' or 'm') path command, creates new subpath. each subpath gets fille

sql server - Dynamic SELECT does not work using @param in GROUP BY -

i'm trying following: select case when @aggregation_zeit = 'day' day when @aggregation_zeit = 'month' month when @aggregation_zeit = 'year' year end time_field, ... group year, case when @aggregation_zeit = 'day' month when @aggregation_zeit = 'month' month end, case when @aggregation_zeit = 'day' day end but keeps saying month , day invalid in select-list because not contained in aggregate function. how can realize this? thanks, felix i'm assuming day, month, year numeric columns in table, if not let me know , i'll change answer. select case when @aggregation_zeit = 'day' cast(datefromparts([year], [month], [day]) varchar(12)) when @aggregation_zeit = 'month' str([year]) + '/' +

javascript - Get element from inside function -

good morning in timezone. i had code in html page <span id="x> <div onclick="$(this).applyfancybox({ trigger: !$.browser.msie, target: (event.srcelement || event.target) }); return false;"> and changing code <span id="x"> <div> </span> <script> ... $(document).ready (function () { $("#x div") .click(function(){ this.applyfancybox({ trigger: !$.browser.msie, target: (event.srcelement || event.target) }); return false; }); } ... </script> this not working because think not pointing div element, how can fix ? thanks in advance best regards try changing this $(this) this javascript object , $(this) jquery object so final code like $(document).ready (function () { $("#x div") .click(function(){ $(this).applyfancybox({ trigger:

xforms - Changing values dynamically in XsltForms controls -

i'm trying control input values javascript. need autocomplete "not-enabled inputs" depending on other variables. the first try manipulate dom getting reference control, auto-generated html code not formed, can not use regex, or query selectors or simple getelementbyid(). see example > http://jsfiddle.net/wmzyqqja/7/ the second try modify data model, failed trying specifying path (i think so). having model: <xf:model id="mod"> <xf:instance id="people"> <person name=""/> </xf:instance> <xf:instance id="tmpperson"> <person name=""/> </xf:instance> <xf:bind nodeset="instance('tmpperson')/@name" readonly="true()" /> </xf:model> i used functions no sucess: function changevalue(){ var ctx = xf_getinstance('mod', 'tmpperson'); console.log('ctx: ' + ctx); var reg

java - running WEKA on Linux -

i trying run weka on linux server. steps followed listed below: 1. download zipped archive containing weka given on http://www.cs.waikato.ac.nz/ml/weka/downloading.html i unzipped zip file. i next tried executing weka.jar using command: java -djava.awt.headless=true -jar weka.jar i tried: java -jar weka.jar gives me errors. i have set display variable using setenv display localhost:0.0. have tried other values such display 0 weka.jar has been added path variable. the error getting follows: exception in thread "main" java.lang.exceptionininitializererror caused by: java.awt.headlessexception @ java.awt.graphicsenvironment.checkheadless(graphicsenvironment.java:159) @ java.awt.window.<init>(window.java:433) @ java.awt.frame.<init>(frame.java:403) @ javax.swing.jframe.<init>(jframe.java:202) @ weka.gui.logwindow.<init>(logwindow.java:252) @ weka.gui.guichooser.<clinit>(guichooser.java:215) not find main clas

android - softkeyboard keeps hiding after expanding Searchview programmatically (w/ Search Button) -

i using searchview support library in appcombat actionbar. on emulator works intended. can open clicking menu item or using search button on device , keyboard shown. @override public boolean onkeydown(int keycode, keyevent event) { if(keycode == keyevent.keycode_search) { if(!menuitemcompat.isactionviewexpanded(searchitem)) { menuitemcompat.expandactionview(searchitem); } else menuitemcompat.collapseactionview(searchitem); } return super.onkeydown(keycode, event); } on expanding set saved text. menuitemcompat.setonactionexpandlistener(searchitem, new menuitemcompat.onactionexpandlistener(){ @override public boolean onmenuitemactioncollapse(menuitem item) { // todo auto-generated method stub return true; } @override public boolean onmenuitemactionexpand(menuitem item) { searchview.onactionviewexpanded(); // initialize searchview searchview.setquery

maven - plug-in org.eclipse.m2e.core.ui was unable to load class -

i had made maven project , worked fine. installed plugins eclemma java code coverage, php development tools (pdt), eclipse.orgsonarqube then worked on other project. when again wanted create maven project,it threw following error window said the selected wizard not started reason plug-in org.eclipse.m2e.core.ui unable load class org.eclipse.m2e.core.ui.internal wizards.mavenprojectwizard removed sonarqube plugin .this solved issue. works fine. there other solution problem since have use sonar.

json - Angular Unable to Display Image from OMDBAPI -

i learning angularjs. in application, want display movie posters http://www.omdbapi.com . html <div ng-app="moviesbrowserapp"> <div ng-controller="moviesctrl"> <strong>{{movie.title}}</strong> <div><img alt="{{movie.title}}" ng-src="movie.poster" /></div> </div> </div> javascript var moviesapp = angular.module('moviesbrowserapp', []); moviesapp.controller('moviesctrl', function ($scope, $http) { $http.get('http://www.omdbapi.com/?i=tt0112462&plot=short&r=json').success(function (data) { $scope.movie = data; }); }); the problem image unable display using url json result. when inspect traffic see 403 status of each image if images directly viewed via browser, display after page reload. seems can retrieve images browser's cache. permission restriction omdbapi.com or what? there way fix

Using scala.js to compile only (and not override run) in SBT -

i'm trying use scalajs compile scala sources javascript , not modify else sbt environment, don't want override default behavior of "run" sbt command. currently i've got build.sbt looks like: import scalajskeys._ scalajssettings name := "foo" organization := "com.example" scalaversion := "2.11.4" compile <<= (compile in compile) dependson (fastoptjs in compile) crosstarget in (fastoptjs in compile) := ((classdirectory in compile).value / "public" / "js") librarydependencies ++= { val sprayversion = "1.3.2" val akkaversion = "2.3.7" seq( "io.spray" %% "spray-can" % sprayversion, "io.spray" %% "spray-routing" % sprayversion, "io.spray" %% "spray-servlet" % sprayversion, "io.spray" %% "spray-testkit" % sprayversion % "test"

php - How can I loop through a two-dimensional array and display the values if another value is true? -

i have array like: 0 name => 'john', age => '99', istheone => boolean true 1 name => 'jeff', age => '88', istheone => boolean false what need is, each row in array, display contents if field istheone true . i thought i'd need use while loop this, i'm bit stuck. don't know how move forward this? this should work you: <?php $array = array( 0 => array( "name" => 'john', "age" => '99', "istheone" => true ), 1 => array( "name" => 'jeff', "age" => '88', "istheone" => false ) ); foreach($array $subarray) { foreach($subarray $k => $v) { if($k == "istheone"

java - Is there any memory leak in this Stack Implementation? -

in below stack implementation, uses simple linked object , doesn't use collection. see memory leak? below code: public class stack { private node nextnode = null; private class node { string data; node adjnode; } public void put(string data) { node node = new node(); node.data = data; node.adjnode = this.nextnode; this.nextnode = node; } public string pop() { string data = nextnode.data; this.nextnode = nextnode.adjnode; return data; } public static void main(string[] args) { stack mystack = new stack(); mystack.put("sp"); mystack.put("senthil"); mystack.put("arumugam"); system.out.println("mystack.pop():" + mystack.pop()); system.out.println("mystack.pop():" + mystack.pop()); system.out.println("mystack.pop():" + mystack.pop()); } } you

Is it possible to edit user's contact from app (Windows Phone 8 or 8.1)? -

i know if it's possible edit contact user's contact list app in windows phone 8 or windows phone 8.1, or open page on device. i know it's possible retrieve contacts or save new one, didn't find editing contact. thank you. you cant edit contact dont own. however apps still cannot manipulate existing contacts originate somewhere else. in sense, data belongs app isolated rest. concept described contact store – each app can have own, writable part of global contacts, can read rest. source (great article , read)

angularjs - Angular JS Display String Array From Json -

<li ng-repeat="address in search.result.addresses"> <a href ng-click="selectaddress(address)"> {{address.addresslines}} </a> </li> the problem {{address.addresslines}} this string array value on screen printed out like ["address1","address2","address3","address4"] but want printed like address1,address2,address3,address4 i thing somthing work... <li ng-repeat="address in search.result.addresses"> <a href ng-click="selectaddress(address)"> <span ng-repeat="a in address.addresslines"> {{a}},</span> </a> </li>

ios - UIScrollview not scrolling interface builder -

i adding uiscrollview interface builder xib file. scrollview child of viewcontroller's view , has other siblings on viewcontroller's view. now setting contentsize of scrollview in viewdidload method , tried set in viewdidlayoutsubviews method scrollview doesn't scroll. sure content area of scrollview bigger frame of scollview . every thing works fine when add scrollview in code using following line self.scrollview = [[uiscrollview alloc] initwithframe:cgrectmake(20.0, 58.0, 282.0, 200.0)] but didn't scroll @ when use iboutlet in code here code viewdidload scollview interface builder. - (void)viewdidload { [super viewdidload]; alog(); nsuinteger = 0; float margin = 0.0; uiimage *previewimg = nil; (i = 0; < [[_settingsdict objectforkey:@"fullscreenwidgetidsarray"] count]; i++) { previewimg = [uiimage imagenamed:[nsstring stringwithformat:@"image_%@", _dict[@"images"][i]]];

java - How to read console output from Grails -

this question has answer here: how read console ouput 2 answers my grails app has external java library developed. want grails app able display java library system.out statements (console output). how go doing that? i rather not have write out file read in grails. there must better way of doing this. **i want grails display these text box happen(in browser while running(so user can see)) afer trying several of own ways have settle way post here. @shaunak , understanding. **how solved it. in java library created global class system.outs wrote to writesouts(string sout){ //store here in global string , keep appending needs } then in grails call java library method. , using ajax write out browser window. hope helps in future encounters same problem. also not testing integral part of web app user of web app can java library doing in

css - Html element is not vertically centered with flex center -

thats fiddle: http://jsfiddle.net/atav8vzz/4/ why html element class "vertical-align" not vertically centered? <div class="container"> <div class="row"> <div style="background:green;" class="col-xs-4"> <h3 class="text-center">type 1</h3> </div> <div style="background:red;" class="col-xs-4"> <h3 class="text-center vertical-align">type 2</h3> </div> <div style="background:blue;" class="col-xs-4"> <h3 class="text-center">type 3</h3> </div> </div> </div> .vertical-align { display: ms-flex; display: flex; align-items: center; }

mysql - Linked a SQL to Access, Requery is displaying #Deleted -

i have sql server backend have linked access frontend. deleted table link in access , relinked view displays contents of deleted table on sql side. changed name in access of view name table had code work. the problem anytime requery called, references old table shows #deleted. i'm thinking code still somehow linked old table, inserting , deleting data through view work i'm not sure. appreciated thanks. i solved this. being stupid , didn't realize row level security wasn't being implemented till after requery, record getting lost.

c++ - Compiling OpenCV program and not requiring opencv Installed -

i have developed c++ program uses opencv. however, when compile , try running computer doesn't run unless install opencv in , set environment path it. there way tackle , how? i'm using visual studio ultimate 2013 , propgram runs in windows (since kinect sdk used it). thanks! with dynamic linking , make sure use dependency walker (or similar tool) identify opencv dlls need ship along executable (you don't need install entire opencv package). that's don't have deal static linking : using static libraries instead of dynamic libraries in opencv

Spring Security custom authentication filter using Java Config -

i'm trying configure spring security using java config in basic web application authenticate against external web service using encrypted token provided in url request parameter. i (i think) have security filter intercepts requests login portal (they go /authenticate), filter use authenticationprovider process bussiness logic of authentication process. login portal --> redirect '\authenticate' (+ token) --> authenticate token login portal (ws) --> if success roles , setup user. i have created filter.. @component public final class oewebtokenfilter extends genericfilterbean { @override public void dofilter(final servletrequest request, final servletresponse response, final filterchain chain) throws ioexception, servletexception { if (request instanceof httpservletrequest) { oetoken token = extracttoken(request); // dump token security context (for authentication-provider pick up) securitycontextholde