Posts

Showing posts from March, 2012

elisp - regexp-opt function missing in Emacs? -

elisp - regexp-opt function missing in Emacs? - i've started playing around elisp create font-locks (syntax highlighting) in emacs. of tutorials out there mention using elisp function "regexp-opt" optimize regular expressions, version of emacs (23.2) doesn't seem have function. furthermore, googling reply doesn't seem turn useful results. ideas? as can find out via c-h f regexp-opt : regexp-opt compiled lisp function. (regexp-opt strings &optional paren) return regexp match string in list strings. each string should unique in strings , should not contain regexps, quoted or not. if optional paren non-nil, ensure returned regexp enclosed @ to the lowest degree 1 regexp grouping construct. returned regexp typically more efficient equivalent regexp: (let ((open (if paren "\(" "")) (close (if paren "\)" ""))) (concat open (mapconcat 'regexp-quote strings ...

How to pass parameter value to webservice in android -

How to pass parameter value to webservice in android - hi friends using ksoap2 in android can tell how pass parameter value webservice in android thanks public class androidclientservice extends activity { private static final string soap_action = "http://10.120.10.87:8080/testservice/services/testservice/saveservices"; private static final string operation_name = "saveservices"; private static final string wsdl_target_namespace = "http://10.120.10.87:8080/testservice/services/testservice?wsdl"; private static final string soap_address = "http://10.120.10.87:8080/testservice/services/testservice"; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); textview textview = new textview(this); setcontentview(textview); soapobject request = new soapobject(wsdl_target_namespace, operation_name); /* * propertyinfo pi = new propertyinfo(); pi.setname("celcius"); pi...

check button using actionscript 2 -

check button using actionscript 2 - how create check button multiple object? want create check button alphabet puzzle game. my game arrange alphabet puzzle confused because there many button. i can create 2 answer, when create 26 answer, check button can't work. here code 2 answer on (release) { if ((_root.hurufa.hittest(_root.targeta)) && (_root.hurufb.hittest(_root.targetb))) { gotoandstop(2); } else { gotoandstop(3); }} actionscript-2

java - How to throw exception when i have open two or three windows -

java - How to throw exception when i have open two or three windows - i have 2 or 3 open (in different cases) windows , trying throw exception start next test. when write: throw new runtimeexception("anything"); the new popup window show text: "the webpage viewing trying close window. want close window" , script stop. browser: net explorer 8 know, window shows when seek close window. ok, add together code: //my methods public static boolean switchtowindowabouttitle(webdriver driver, string title){ string currentwindow = driver.getwindowhandle(); set<string> availablewindows = driver.getwindowhandles(); try{ if(!availablewindows.isempty()){ for(string windowid : availablewindows){ string switchedtitle = driver.switchto().window(windowid).gettitle(); if(switchedtitle.equals(title) || switchedtitle.contains(title)) homecoming true; ...

php - How do I change security redirect behavior in Silex? -

php - How do I change security redirect behavior in Silex? - if create ajax request secured area, sends 302 header , redirects login page in request. there way configure firewall give different header , not redirect? need handle in ->before call? or improve way override authentication entry point, suggested in symfony security homecoming 401 response instead of redirect? symfony not sure if silex has improve sugar. tried , other things: $app->register(new securityserviceprovider(), array( 'security.firewalls' => array( 'default' => array( 'pattern' => '^/', 'anonymous' => true, 'oauth' => array( 'failure_path' => '/login', 'with_csrf' => true ), 'logout' => array( 'logout_path' => '/logout', 'with_csrf'...

mysql - Nested foreach from 2 different tables -

mysql - Nested foreach from 2 different tables - titletable texttable ------------------- --------------- id(int) id (int) title(string) titletableid (int) text (string) titleoftext(int) so here seek do: have 1 table holds title (titletable) , 1 more table holds text(text table), 1 title have several text that's why utilize 2 tables. , can list table 1 here code view: @foreach (var item in model.titletable) { @item.title } and not need foreach bring text of titles tried ; @foreach (var item in model.titletable) { @item.title foreach (var itemdesc in model.text.orderby(o => o.id).where(o => o.id == item.id)) { @itemdesc.text } } and returns null because dont give id homecoming takes view model not controller how can reach text , should @ end ; title 1 text 1of title 1...

php - Echo a string in a class from a page in another page? -

php - Echo a string in a class from a page in another page? - i have 2 page login.php , user.php(where message = wrong combination 1 echo his) trying display message in login.php user.php base of operations on wrong combination of email , password please how can display message in login.php below code the user.php page below class users { function login($find='') { if(($rows["email"] == $email)&&($rows["password"] == $password)){ $_session['email'] = $email; $_session['password'] = $password; if (isset($_post['remember'])){ setcookie("cookname", $_session['email'], time()+60*60*24*100, "/"); setcookie("cookpass", $_session['password'], time()+60*60*24*100, "/"); } $_session['user_id'] = $user_id; homecoming true; } ...

mercurial - Use "hg unshelve" like unstashing with Git -

mercurial - Use "hg unshelve" like unstashing with Git - when invoking hg unshelve --keep , conflict, need resolve conflict , invoke hg unshelve --continue --keep again. why lastly step necessary? , why can't invoke hg unshelve --continue --keep straight without resolving commit - out of unshelving state? c:\temp\hg test>hg st m new.txt c:\temp\hg test>hg commit -m "fjdjkfs" c:\temp\hg test>hg unshelve --keep unshelving alter 'shelve' adding changesets adding manifests adding file changes added 1 changesets 1 changes 1 files (+1 heads) merging new.txt warning: conflicts during merge. merging new.txt incomplete! (edit conflicts, utilize 'hg resolve --mark') unresolved conflicts (see 'hg resolve', 'hg unshelve --continue') c:\temp\hg test>hg st m new.txt ? new.txt.orig c:\temp\hg test>hg unshelve --keep --continue abort: unresolved conflicts, can't go on (see 'hg resolve', 'hg unshe...

javascript - Add dataLabel to Area chart in Highcharts.js -

javascript - Add dataLabel to Area chart in Highcharts.js - i want add together info label specific point in 'area' chart. i'm using 'highchart' making graph. want info label in chart design next image. should seek ? tried datalabel defined in 'line' chart applies datalabel each point in chart. want applied specific point. also, should not show value of point datalabel should show series.name on point. for relevant point in info utilize object notation , enabled info labels. can utilize format , formatter display desired information. example of series be: series: [{ name: 'my series name', data: [5, 10, 30, 100, 200, 300, 600, { y: 900, datalabels: { enabled: true, format: '{series.name}' } }, 700, 400, 100] }] or see this more elaborate jsfiddle example. javascript charts highcharts

c# - How to host VS IDE during integration test via MSTest? -

c# - How to host VS IDE during integration test via MSTest? - i have created integration test project test vs extension. if run tests visual studio ide, tests running fine , every method spawns new vs ide. test methods marked next attributes: [hosttype("vs ide")] [testmethod] public void testwhatevermethod() { ... } however if seek automate tests, , run them commandline via mstest (or vstest) got next error message, tests hosted within vs ide: the host type 'vs ide' cannot loaded next reason: key 'vs ide' cannot found. create sure appropriate host adapter installed on machine. therefore tried find solution at: msdn - how to: install host adapter. documented vs2005 , 2008. i inquire directions regarding vs 2013, can found out more? or missing? proper way run integration tests outside vs ide? how 1 can host ide programmatically? thank in advance! i realized how it, without using hosttype attribute. next code snippet can ...

rfid - Impinj Speedway reader does not enable antenna -

rfid - Impinj Speedway reader does not enable antenna - i testing speedway reader 420 guard minirail antenna connected port 1. the problem cannot work. when telnet speedway reader, , issue "show rfid stat" command, status: > show rfid stat status='0,success' laststatisticreset='4024' readeroperationalstatus='enabled' readeradministrativestatus='enabled' antenna1administrativestatus='enabled' antenna2administrativestatus='enabled' antenna3administrativestatus='enabled' antenna4administrativestatus='enabled' antenna1operationalstatus='disabled' antenna2operationalstatus='disabled' antenna3operationalstatus='disabled' antenna4operationalstatus='disabled' i think problem. antenna1operationalstatus appears disabled. any help this, please? thanks jaime rfid

mysql - Looping through a table in php to find best spot to fit my data -

mysql - Looping through a table in php to find best spot to fit my data - after running mysql query list containing info in next form: $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "<br> id: ". $row["event_id"]. " - timestamp: ". $row["event_start"]. " " . $row["event_duration"] . "<br>"; } } basically each row has 3 fields: event_id | event_start | event_duration now, want accomplish iterate in php through returned rows , find place can set new event event_start timestamp , event_duration. place i'm looking has free , ready filled event_id through whole event_duration. quick example: let's in database i've got 4 events: e1 starts @ 1:00:10 , lasts 30 seconds e2 starts @ 1:00:40 , lasts 20 seconds e3 starts @ 1:01:30 , lasts 40 seconds e4 starts @ 1:02:50 , lasts 20 se...

python - Django Form doesn't validate when I add a prefix -

python - Django Form doesn't validate when I add a prefix - i have form needed add together prefix run javascript. problem form won't validate. have set fields required = false , tried saving form, still doesn't validate. any thought why happening? as illustration form 1) validates, form 2) not: 1) addclassform() 2) addclassform(prefix="add") python django forms

Copyright information in minified javascript and css files -

Copyright information in minified javascript and css files - i think may need revisit this, out of curiousity if nil else. is allowed remove license info minified js , css files if files generated sourcemap points unminified source , files (that have licenses) available? i inquire because when minify several files, find of size cannot cut down comes carrying on license information. can see that, browser function , download, may possible away smallest minified source, file used browser render. if console opened, sourcemap downloaded point inquiring user unminified source , preserve requirement of having original license intact , available upon request. specifically, apache license 2.0 (http://www.apache.org/licenses/license-2.0), mit license (http://en.wikipedia.org/wiki/mit_license), , gplv2 (https://www.gnu.org/licenses/gpl-2.0.html) start. as far know, file should contain or refer it’s license. either way, i wouldn’t risk it. wouldn’t worry comment though. they’...

assembly - MIPS: Print contents of array using stack pointer -

assembly - MIPS: Print contents of array using stack pointer - i'm learning mips, , having problem understanding how utilize stack pointer printing contents of array while next c calling conventions, i.e. passing parameters using stack, local variables on stack, saving registers on stack. homework assignment appreciate clarifications , hints. thanks. question 1: understand it, we're set parameters using stack making room in main subroutine: subi $sp, $sp, 12 sw $t2, 8($sp) # base of operations address of array sw $t1, 4($sp) # end index sw $t0, 0($sp) # start index then phone call subroutine @ end of main using jal , , load parameters in @ origin of subroutine. @ end of subroutine should pop stack , homecoming using jr $ra . issue arises because subroutine i've implemented loop 1 time completed, branches subroutine i'm not clear should popping stack , doing return. clarifications great. this how i've implemented far, i...

c# - MVC Filename property mapped to tag so Filename property = selected filename -

c# - MVC Filename property mapped to <input> tag so Filename property = selected filename - mvc5 ef6 c# i have create view image class. image class contains string property "imagepathlocal". i have next on view, allow user select file upload: <div class="form-group"> @html.label("select image", htmlattributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> <input type="file" name="photo" id="photo" class="btn btn-default" /> @html.validationmessagefor(model => model.imagepathlocal, "", new { @class = "text-danger" }) </div> </div> i have utilize <input type="file" name="photo" id="photo" class="btn btn-default" /> as there isn't equivalent @html.inputfor(model => model.imagepat...

Gcm Registration AsyncTask crasch android 2.3.7 -

Gcm Registration AsyncTask crasch android 2.3.7 - run android 2.3.7 crash android 4.2.2 run ok sorry english class="snippet-code-js lang-js prettyprint-override"> package com.lemieapp.gcmclient; import android.content.context; import android.os.asynctask; import android.widget.toast; import com.google.android.gms.gcm.googlecloudmessaging; import com.google.api.client.extensions.android.http.androidhttp; import com.google.api.client.extensions.android.json.androidjsonfactory; import com.google.api.client.googleapis.services.abstractgoogleclientrequest; import com.google.api.client.googleapis.services.googleclientrequestinitializer; import com.lemieapp.backend.registration.registration; import java.io.ioexception; import java.util.logging.level; import java.util.logging.logger; /** * created dead or live on 07/04/2015. */ class gcmregistrationasynctask extends asynctask<void, void, string> { private static registration regse...

ajax - Trying to incorporate crossdomain XML feed into jQuery app with proxy.php results in 406 error -

ajax - Trying to incorporate crossdomain XML feed into jQuery app with proxy.php results in 406 error - even simple <?php readfile($_get['url']) ?> results in not acceptable error. any thoughts? this won't work because ajax restricted same origin policy. unless site hosted in isbndb.com, never work. from w3c documentation 3.6.1.13 if origin of url not same origin xmlhttprequest origin raise security_err exception , terminate these steps. you have parse info isbndb.com on server , homecoming it, can't cross-domain phone call ajax. jquery ajax isbn

symbols - Edit item in all frames of a timeline layer in Flash CS5 -

symbols - Edit item in all frames of a timeline layer in Flash CS5 - i'm confused how flash cs5 treats symbol instances across different frames in given layer; if add together object layer, , add together keyframe existing frame set, there 2 instances of object, 1 each frame? when alter color of instance in first key frame, sec keyframes instance stays same. there anyway edit across frames? paste across frames? thanks in next object same instance. object instance of symbol or class. if add together object layer, , add together keyframe existing frame set, there 2 instances of object, 1 each frame? you @ key frames separately. in both frames there 1 instance each. if both instances have same instance name, can identical, although actual instance parameters of them can differ (like size, position, color, effects etc.). when alter color of instance in first key frame, sec keyframes instance stays same. there anyway edit across frames? paste acro...

javascript - Am I stuck with forcing fixed image size for image tags? -

javascript - Am I stuck with forcing fixed image size for image tags? - i have website contains side bar , image of big size (about 800 pixels wide) scripted code if screen resolution small, image shrinks , scales little space according multiple browsers tested site on. tested site demo version of sortsite powermapper at: http://try.powermapper.com/demo/ it goes on complain "omitting img width or height attributes means page text jumps images load. usability.gov 14:3" i understand , seek include attributes, image not scale correctly. this css utilize on image scale if had monitor max screen width of 800 pixels: @media screen , (max-width: 600px){#x img{width: 100%}} i specify 600px because reserved 200 pixels sidebar. i don't think javascript reply because during page load, image placeholder jump new size, , if placed code near beginning, delay the rest of page loading somewhat. i thinking using div tags , setting background image, problem ...

r - How to create a dyraph with multiple x-axis labels? -

r - How to create a dyraph with multiple x-axis labels? - i'm working lot of rank info benefit way simultaneously display respective year on x-axis. example, want create next graph adapted dygraph gallery: note how rank info (red arrow) particular weekend (green arrow) both displayed on x axis. i know might not possible dygraphs now, @ to the lowest degree wasn't available in these demos, guess follow question there plans create possible (how in [r] {dygraph} package)? apparently plotter called flot can this. update 1 if indeed feature not exist yet, following, although potentially obvious dygraph developers, thought accomplishing task easily (perhaps i'm wrong). @ first thought necessary provide input info of form shown in table a however such input major deviation existing dygraph parser model expects 1 abscissa. such suggests modification parser take "dual label" option, requiring both labels contained in single abscissa element in t...

php - I need to fix my URL Rewriting -

php - I need to fix my URL Rewriting - i making user profiles redirect /username . i have other directories /about , /chat , /poll , etc. when went to: /about , made to: /about/?member=about . this have in .htaccess redirect profile: rewriteengine on rewriterule ^([a-za-z0-9]+)$ profile.php?member=$1 [l] i don't want page /about/?member=about because about not fellow member , it's explaining community is. i can /user/username , don't know how , don't know if still impact other directories. fixed myself, may want future reference: i made rewrite different directory disturb /about, etc. made rewrite /u, /user, , /member if people don't remember 1 utilize can give guess. options +followsymlinks rewriteengine on rewriterule u/(.*)/ profile.php?member=$1 rewriterule u/(.*) profile.php?member=$1 rewriterule user/(.*)/ profile.php?member=$1 rewriterule user/(.*) profile.php?member=$1 rewriterule member/(.*)/ profile.php?member=$1 rewr...

clip-path not working in SVG sprite -

clip-path not working in SVG sprite - (live illustration @ http://codepen.io/rwwl/pen/xbnljp) i'm including svgs in app using <symbol> element (see https://css-tricks.com/svg-symbol-good-choice-icons/ total details why), , icons — ones include clip-path — not rendering when include icons in pages <use> element. <svg style="display: none"> <symbol id="icon-pin" viewbox="0 0 24 24" enable-background="new 0 0 24 24"> <path fill="none" stroke="#2f3137" stroke-width="2" stroke-miterlimit="10" d="m12 2c8.3 2 5.3 5 5.3 8.7c0 1.2.3 2.3.9 3.3l5.4 9.9c.1.1.2.2.4.2.1 0 .3-.1.4-.2l5.4-9.9c.5-.9.9-2.1.9-3.3c18.7 5 15.7 2 12 2zm0 0" /> <clippath id="pin-clip"> <path d="m12 11.2c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zm0 0" /> </clippath> <path clip-path="url(#pi...

c# - DevExpress and missed reference -

c# - DevExpress and missed reference - when trying alter references in project devexpress 9.2 devexpress 11.2 of them, getting follow exceptions in 1 of classes: <...> type or namespace name 'devexpress' not found (are missing using directive or assembly reference?) <...> <...>the type or namespace name 'layoutcontrol' not found (are missing using directive or assembly reference?) <...> i using next references: devexpress.data devexpress.utils devexpress.xtrabars devexpress.xtraeditors devexpress.xtragrid devexpress.xtralayout devexpress.xtranavbar when using v9.2 – ok, when changing references – getting next underlining: using devexpress.xtralayout; public static string getlayout(layoutcontrol layoutcontrol) so, how can alter references properly? i think found: devexpress 11.2 not working .net 2.0. if have such problem, need alter project's target framework @ to the lowest ...

python - How to mock calls to function that receives mutable object as parameter? -

python - How to mock calls to function that receives mutable object as parameter? - consider example: def func_b(a): print def func_a(): = [-1] in xrange(0, 2): a[0] = func_b(a) and test function tries test func_a , mocks func_b: import mock mock import phone call def test_a(): datatransform.test import func_a mock.patch('datatransform.test.func_b', autospec=true) func_b_mock: func_a() func_b_mock.assert_has_calls([call(0), call(1)]) after func_a has executed seek test if func_a made right calls func_b, since in loop mutating list in end get: assertionerror: calls not found. expected: [call(0), call(1)] actual: [call([1]), call([1])] the next works (the importing mock unittest python 3 thing, , module func_a , func_b are): import mock mock import phone call import re-create class modifiedmagicmock(mock.magicmock): def _mock_call(_mock_self, *args, **kwargs): homecoming ...

datetime - JavaScript Date - Months changing across timezones? -

datetime - JavaScript Date - Months changing across timezones? - i'm doing calculation comparing current time against set of dates available. using getmonth() gives me months jan 0, in gmt +530 (ist). if alter timezone gmt -600 (mdt), jan appears 11. how normalize this? javascript datetime web time timezone

nosql - Cassandra time series modeling -

nosql - Cassandra time series modeling - i have table this. > create table docyard.documents ( > document_id text, > namespace text, > version_id text, > created_at timestamp, > path text, > attributes map<text, text> > primary key (document_id, namespace, version_id, created_at) ) clustering order (namespace asc, version_id asc, created_at > asc) > , bloom_filter_fp_chance = 0.01 > , caching = '{"keys":"all", "rows_per_partition":"none"}' > , comment = '' > , compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.sizetieredcompactionstrategy', > 'max_threshold': '32'} > , compression = {'sstable_compression': 'org.apache.cassandra.io.compress.lz4compressor'} > , dclocal_read_repair_chance = 0.1 > , default_time_to_live = 0...

javascript - Drop down menu is Glitchy at the edge of menu button -

javascript - Drop down menu is Glitchy at the edge of menu button - i have odd issue. created standard dropdown menu having issue menu dissapearing when right between menu , drop down. cant find css stop hover state maybe eyes improve mine. here gif of happening: http://imgur.com/axf6skk my js code: //------- nav menu --------// $('nav li').hover( function () { $('ul', this).stop(true,true).fadein({ duration: 300, queue: false }).slidedown(300); }, function () { $('ul', this).stop(true,true).fadeout({ duration: 300, queue: false }).slideup(300); }); relevant html: <nav> <ul class="center"> <li class="menu"> <a href="#home">home</a> </li> <li class="menu"> <a class="inactive">get started</a> <ul class="dropdown hidden" id="drop1"> <li class="dropitem"...

java - How to unit test an Spring @Bean CommandLineRunner? -

java - How to unit test an Spring @Bean CommandLineRunner? - i'm using spring boot in little poc, , i'm trying test @bean implementation. have code: @springbootapplication public class application { public static void main(string[] args) { springapplication.run(application.class, args); } @bean commandlinerunner init(@value("${db.resetandloadonstartup:true}") boolean resetandloadonstartup, sequenceidrepository sequencerepository, useraccountrepository useraccountrepository, bookrepository bookrepository) { homecoming args -> { log.info("init application..."); if (resetandloadonstartup) { filldbdata(sequencerepository, useraccountrepository, bookrepository); } log.info("aplication initiated!"); }; } private void filldbdata(sequenceidrepository s...

indexing - Solr tlog extremely large, not merging with index after commits -

indexing - Solr tlog extremely large, not merging with index after commits - i in process of mass indexing operation solr 5.0 collection approx 200m documents now. noticing tlog building , not beingness deleted, additionally, indexing performance has gotten slow. wondering why tlog not beingness removed. info directory looks like: du -sh * 4.0k info 69g index 109g tlog i've tried multiple variations of: update?commit=true&expungedeletes=true&opensearcher=true i see in log file solr picking up, there no changes. the commit settings in solrconfig are: <autocommit> <maxtime>15000</maxtime> <maxdocs>1500000</maxdocs> <opensearcher>false</opensearcher> </autocommit> <autosoftcommit> <maxtime>900000</maxtime> <maxdocs>2000000</maxdocs> </autosoftcommit> one thing maintain in mind had soft commit commented out during indexing proce...

php - inserting android data in mysql -

php - inserting android data in mysql - php code: when insert info sql database itc come this. can tell me why info not inserting in database. in database insert 0000-00-00 (for date) , 00:00:00.0000 (for time). can please help me out <?php session_start(); $btnselectdate=$_post['btnselectdate']; $btnselecttime=$_post['btnselecttime']; $db = 'event'; $conn=mysql_connect("localhost", "root", "") or die("not connected"); mysql_select_db($db, $conn) or die("could not find database"); $query = "insert date_time(btnselecttime, btnselectdate) values('$btnselecttime', '$btnselectdate')"; $result = mysql_query($query) or die("unable verify user because : " . mysql_error()); if(mysql_num_rows($result)) echo 1; // right login response else echo 0; // wrong login response ?> here android code: public class mainactivity extends activity { ...

pthreads - Mutex::unlock exiting program in php 5.5.12 with php_pthreads-2.0.9-5.5-ts-vc11-x64 on Windows -

pthreads - Mutex::unlock exiting program in php 5.5.12 with php_pthreads-2.0.9-5.5-ts-vc11-x64 on Windows - i seem having weird issue when attempting run pthreads in php. i'm attempting utilize threads manage additional calling of other php scripts, programme exiting prematurely, whenever effort utilize mutex::unlock . i've tried re-installing different versions of 64 bit pthreads tested examples (of which, mutex here works ). think may problem popen. has nail error before or know of way debug it? the code i'm using follows: <?php class lockedthread extends thread { public function __construct($func, $megalog, $mutex){ $numargs = func_num_args(); $this->megalog = $megalog; $this->func = $func; if ($numargs == 3) { $this->mutex = array($mutex); } else { $arg_list = func_get_args(); $this->mutex = array_slice($arg_list, 2); } } public function...

php - Magento Fatal Error - Call to a member function getId() on a non-object -

php - Magento Fatal Error - Call to a member function getId() on a non-object - when connecting magento zapier response error code: authorization failed: junk after document element: line 2, column 0 further searching shows cause iwd sales rep extension in magento. fatal error: phone call fellow member function getid() on non-object in /home/moove/public_html/app/code/community/iwd/salesrepresentative/model/observer.php on line 452 below line 449 - 459 } public function getusersettings(){ $userid = mage::getmodel('admin/session')->getuser()->getid(); $item = mage::getmodel('salesrep/users')->load($userid,'user_id'); if ($item->getid()){ homecoming $item; } homecoming false; } appreciate anyone's help resolving issue. try $userid =mage::getsingleton('admin/session')->getuser()->getid(); php magento zapier

How to create a new line by tapping the return key in UITextView ios -

How to create a new line by tapping the return key in UITextView ios - i newly iphone. have added 1 uitextview using xib in application, after tapping on done key it's resigning keyboard. but, want create new line tapping it, means should go next paragraph. please help me accomplish output. here code : - (void)textviewdidendediting:(uitextview *)textview1 { if (![textview1 hastext]) { [textview1 addsubview:placeholderlabel]; } else{ nslog(@"done button clicked!!"); } cgrect rect; if(screenbounds.size.height == 568)//iphone5 { rect = cgrectmake(5, 76, 310, 491); } else{ if(_kisios7){ rect = cgrectmake(5, 76, 310, 404); } else{ rect = cgrectmake(0, 44, 320, 436); } } [uiview beginanimations:nil context:null]; [uiview setanimationduration:0.3]; txtview.frame = rect; [uiview commitanimations]; } - (bool)textview:(uitextview *)...

Python Flask, Handling Popen poll / wait / communicate without halting multi-threaded Python -

Python Flask, Handling Popen poll / wait / communicate without halting multi-threaded Python - the code below executed on url (/new...) , assigns variables session cookie, used build display. illustration calls command using subprocess.popen. the problem popen command called below typically takes 3 minutes - , subprocess.communicate waits output - during time other flask calls (e.g. user connecting) halted. have commented lines related other things i've tried without success - 1 using threading module , using subprocess.poll. from app import app flask import render_template, redirect, session subprocess import popen, pipe import threading @app.route('/new/<number>') def new_session(number): get_list(number) #t = threading.thread(target=get_list, args=(number)) #t.start() #t.join() homecoming redirect('/') def get_list(number): #1 phone call jar string command = 'java -jar fetch.jar' + str(number) print ...

iphone - Why is my Objective-C object being deallocated? -

iphone - Why is my Objective-C object being deallocated? - i have problem objective-c object (in ios game app) beingness mysteriously deallocated. the object gamecharacter instance instantiated so: for (int c = 0; c < knrofguards; c++) { gamecharacter* guard = [[gamecharacter alloc] initguard:self sprite:guardsprite]; [characterarray addobject:guard]; [guard release]; } i have convenience method finding gamecharacter: - (gamecharacter*)findcharacterwithindex:(int)index { homecoming [characterarray objectatindex:index]; } and code generates error looks like: for (int c = 0; c < [self charactercount]; c++) { gamecharacter* tempcharacter = [self findcharacterwithindex:c]; if (tempcharacter.playerid == playerindex]) { ... } } running code for time (never immediately) generates error in console: [gamecharacter playerid]: message sent deallocated instance 0x4e47560 with nszombieenabled trick i've managed track down...

android - adb push command failing permission denied, Read only -

android - adb push command failing permission denied, Read only - hello android developers, i working on project extract pictures taken android photographic camera , display. let me little descriptive: have 2 points clarified: 1> whether concept next correct? and 2> if yes, problem in subtask related adb needs solved. let me write steps , following: using android 2.2 emulator understanding android photographic camera pictures saved dcim folder of the sd card. a> since , emulator doesn't have sd card, need create 1 did using mksdcard b> after, step a> , had re-create of image files sd card image, tried using adb push, got access denied, read only. after thorough searching, , spending few hours, find solution create sd card image writeable, mount , remount command, not usage of command, , there no finish description , usage of command. c> , utilize mediastore extract images , thereon display. my questions : is sequence next ap...

r - Simulation data using a dataframe -

r - Simulation data using a dataframe - i want simulate existing dataset best model.considering next dataset , want create 100 or 1000 sample using info in r. help? x<-data.frame( a=c("a","b","m","n","p"), b=c("g","n","p","r","i"), c=c("t","f","l","u","u"), d=c(9,12,13,13,12), e=c(14,17,10,19,10), f=c(10,12,19,17,15), g=c(7,12,10,14,15), h=c(18,19,19,12,12), i=c("k","l","m","f","d"), j=c("c","v","o","n","f"), k=c("g","n","p","p","i")) if want 1000 info sets, seek putting them list this. lapply(1:1000, function(i, x) x[sample(nrow(x), size=1000, replace=true), ], x) although i'm not sure value of using simulated info sets of size 1000 sample of fewer obs...

java - Real time area chart application -

java - Real time area chart application - i have take next code stackoverflow, when application started running, dynamically area chart updating, after few seconds application hanging (i.e minimize, maximize, close buttons window not working after increasing window size). area chart updating. package areachartsample; import java.util.concurrent.concurrentlinkedqueue; import java.util.concurrent.executorservice; import java.util.concurrent.executors; import java.util.concurrent.threadfactory; import java.util.logging.level; import java.util.logging.logger; import javafx.animation.animationtimer; import javafx.animation.timeline; import javafx.application.application; import javafx.scene.scene; import javafx.scene.chart.areachart; import javafx.scene.chart.numberaxis; import javafx.scene.chart.xychart.data; import javafx.scene.chart.xychart.series; import javafx.stage.stage; public class areachartsample extends application { private static final int max_data_points = 50; priv...

javascript - How to sort data in multiple groups using Sequelize? -

javascript - How to sort data in multiple groups using Sequelize? - i'm having problem want maintain much logic , computation on database server , know if possible table sorted in sub groups based on attribute illustration : { "category1" : [{object1},{object2}...], "category2" : [{object1},{object2}...], "category3" : [{object1},{object2}...] } where category particular field table. currently i'm using instead : models.product.findall({ include: [ {model: models.productprice, as: 'prices', required: true, where: {price_active: true}}, {model: models.productcategory, as: 'category'}, {model: models.productstore, as: 'store'} ] }).then(function (products) { var productsbycategory = {}; for(var =0; i< products.length; i++){ if(productsbycategory[products[i].category.category_name]){ productsbycategory[products[i].category.category_name].push(prod...

assembly - Check if number is in range on 8051 -

assembly - Check if number is in range on 8051 - i have received character on uart, , need validate if it's number character. normally i'd do if (char >= '0' && char <= '9') { /* valid */ } however, have in assembly. i haven't found compare instruction (so assume there none). how can this? mov a, sbuf ; load number ; -- pseudocode -- cmp a, #'0' ; in avr, i'd way brlt fail ; i'm new 8051 cmp a, #'9' brge fail ; -- pseudocode -- ; number fail: edit: ok here's have doesn't work ;====================================================== ; check if r1 number char -> r0 = 1 or 0 ;------------------------------------------------------ fn_isnum: force acc force 1 mov r1,a subb a,#'0' jc isnum_bad mov a,r1 subb a,#'9'+1 jc isnum_bad pop 1 pop acc mov r0,#1 ret isnum_bad: ...

CSS Pseudo Lag with jQuery slideToggle -

CSS Pseudo Lag with jQuery slideToggle - i using css pseudo :before create arrow in navigation bar have , using jquery slidetoggle() display ul in way. however, when hover on it, transition still happen arrow have slight delay , appear. see illustration much easier can see happen, see http://applefanatic.co.uk , hover on "ipad" example. i new jquery might missing something. know jquery code works, it's delay having. thanks. edit: changed navigation bar , removed css arrow, no longer relevant leave question here in case others need help. this happens because jquery slidetoggle() apply overflow:hidden element beingness animated , removes 1 time animation completed. to prepare add together overflow:visible !important ul in stylesheet. jquery css slidetoggle

R Missing Data by Variable -

R Missing Data by Variable - is there efficient method of deriving total number of missing values each variable in info frame using r? can see how evaluate each variable, seems quite inefficient if info frame has numerous variables. thanks. you try colsums(is.na(df1)) data set.seed(24) df1 <- as.data.frame(matrix( sample(c(na,1:5), 100*20, replace=true), ncol=20)) r missing-data

spring - How to config @EnableConfigurationProperties, @ConfigurationProperties with WebApplicationInitializer? -

spring - How to config @EnableConfigurationProperties, @ConfigurationProperties with WebApplicationInitializer? - i want read application.properties using @enableconfigurationproperties , @configurationproperties. i able next codes: application.java @springbootapplication @enableconfigurationproperties(applicationconfiguration.class) public class application { public static void main(string[] args) { springapplication.run(application.class, args); } } applicationconfiguration.java @configurationproperties(prefix = "server") public class applicationconfiguration { private string port; public string getport() { homecoming port; } public void setport(string port) { this.port = port; } } testcontroller.java @controller public class testcontroller { @autowired applicationconfiguration applicationconfiguration; @requestmapping("/test") @responsebody public string test() { ...

asp.net - how to send one email to multiple recipents in sendgrid email in c# using smtp api -

asp.net - how to send one email to multiple recipents in sendgrid email in c# using smtp api - scenario have thousands of email want send email help of ( using asp.net c#) https://sendgrid.com/docs/integrate/code_examples/csharp.html can iterate emails , send emails them (body of html same , recipients different) taking much time. things done have tried add together multiple recipent in "to" , send shows emails every 1 have tired add together multiple recipents in bcc , shows undiscolsed i have read sendgrid manage take values , send 1 1 from documentation @ https://sendgrid.com/docs/api_reference/web_api/mail.html command this can passed in array, send multiple locations. example: to[]=a@mail.com[]=b@mail.com. note recipients passed in parameter visible part of message. if wish hide recipients, utilize parameter in x-smtpapi header. and next link gives illustration x-smtpapi header { "to": [ "<ben@example.com>...

python - define a const char* in cython -

python - define a const char* in cython - i want phone call next function dll in python ctypes: int pi_enumerateusb (char* szbuffer, int ibuffersize, const char* szfilter) which variable have define const char* szfilter ? tried following: ch_szfilter = c_char_p("c-863") p_ch_szfilter = address(ch_szfilter) here p_ch_stfilter should const char* szfilter doesn't work. next error message: valueerror: procedure called not plenty arguments (12 bytes missing) or wrong calling convention i don't have much experience python it's first project ctypes. python c++ pointers ctypes

html - How to adjust the properties of the 'large' image size in ACF plugin for wordpress -

html - How to adjust the properties of the 'large' image size in ACF plugin for wordpress - for acf (advanced custom fields) plugin wordpress, in wysiwyg editor field, want able alter default image size of big image property create responsive instead of having set defined height , width in pixels. there way adjust this? either css or adjusting core files of acf? want html code wrapping image along lines of <img src"url/path/to/image" width="100%" height="auto"> instead of <img src"url/path/to/image" width="1024px" height="576px"> this css utilize create wordpress wysiwyg images responsive: .entry-content img, .comment-content img, .widget img, .entry-summary img, .wp-caption { max-width: 100%; } img[class*="align"], img[class*="wp-image-"], .comment-content img[height], .entry-content img, .entry-summary img, img[class*="attachment-"] { height: au...

CSS is not applied properly to AngularJS dynamically loaded elements -

CSS is not applied properly to AngularJS dynamically loaded elements - i'm using script codyhouse set filterable portfolio: http://codyhouse.co/demo/content-filter/ i'm using angularjs parse info via json , fine, except fact css not applied dynamically loaded elements. you can see differences in image: as can see, first row, loaded via angular, has no css applied @ all. sec row, placed in html, working fine. how possible? elements in both rows have same css selectors , same css rules applied. here can find plunker: http://plnkr.co/edit/mftmpm5cjoipcu3trvoj?p=preview this generated markup angular: <li class="mix color-1 check1 radio2 option3 ng-scope" style="display: inline-block;" ng-repeat="drawing in drawings"><img src="img/img-1.jpg" alt="image 1"></li> and html static markup: <li class="mix color-1 check1 radio2 option3" style="display: inline-block;"...