Posts

Showing posts from June, 2010

touch - Android: Background Service to Simulate Touches in Any App Underneath a Window -

i have service can draw canvas on top of applications using system_alert_window contains custom view . my service , custom view both implement view.ontouchlistener the ontouch(view v, motionevent ev){} method of service returns true while custom view returns false . allows me display custom view on top of apps , still interact underlying activity . part works. i want service simulate touch event in specified coordinates in current activity underneath system_alert_window . i hoping call view.dispatchtouchevent(...) on custom view , because ontouch(...) returns false , touch event passed on underlying activity . not work. how can simulate touch events in activity in situation? i have used code following sources... draw canvas on top of applications: http://www.piwai.info/chatheads-basics/ draw android canvas on top of applications? passing touches underlying app: how can interact elements behind translucent android app? simulating touches: how si

machine learning - Weka ARFF How to handle features/attributes that can have more then 1 value per data-item -

for recommendation engine trying convert movie data arff format, , though arff format clear me unsure best way solve following problem. my dataset going in following (or similar) format rating predicted classification variable: for each user list of: movieid-movie title-year of release-genre(s)-actor(s)-director-writer(s)-runtime-rating my problem here fact features genre, actor, writers, can have 1 or multiple entries , weka arff allows 1 value each attribute. solution though of is: have attributes such genre0, genre1, genre2. , leave empty if movie has example 1 genre. problem see this work great genre, mean actors example i'd have include actors in attribute declaration? @attribute actor1 {all actors} @attribute actor2 {all actors} @attribute actor3 {all actors} since they're possible values specific feature. approach make sense me, since there thousands of actors, directors , writers rather big attribute declarations. is there better, more efficient,

c# - WPF Webbrowser create html file from user input -

Image
i'm reading html using webbrowser component in wpf. should let user give there own text, upload image , save .html file . by way can tag value: string mytagvalue = (framewithingrid.document mshtml.htmldocument) .getelementsbytagname("div") .oftype<mshtml.ihtmlelement>() .first() .innertext; how can get value text box , save .html file including new image? need help. thank you. this html file: <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html lang="ja"> <head> <meta http-equiv="content-type" content="text/html; charset=shift_jis"> <title>welcome linguini party!</title> <style type="text/css"> * { margin: 0; } html, body { height: 100%; font-family: arial; background-color: #e1dfe3; color: #333333; background-rep

javascript - How to display dotted walkway on google maps -

Image
is there way show dotted route on website using google maps + javascript . i way able paint simple route using google directions api , directionsrenderer , looks this: but want one: this hard one, managed figure out.. it's not same, tweak bit yourself. can make custom "shape", can creating custom path. reference the way did using polyline custom icon, code: var linesymbol = { path: google.maps.symbolpath.circle, fillopacity: 1, scale: 3 }; polylineoptionsactual = new gm.polyline({ strokecolor: '#9f98ff', strokeopacity: 0, icons: [{ icon: linesymbol, offset: '0', repeat: '10px' }], }), fiddle

git - PHP create core code to spread between different projects -

i'm building relatively large project involved few servers running php. all servers have few shared classes need use. when design git , project structure, seams logical me write core (shared) classes, , wrap them somehow (maybe composer?) , let of specific server have them dispense. i've read bad reviews git submodules, wonder alternative have ? i'm trying achieve basic core part of code dispense each of servers. ok after doing further research decided go git subtree feature. allows me divid code modules inject remote modules part of code. like in git, there's learning curve, in case seems total worth it. i used 2 blog posts tutorial: https://medium.com/@v/git-subtrees-a-tutorial-6ff568381844 https://www.atlassian.com/git/articles/alternatives-to-git-submodule-git-subtree/

html - Jquery Jtable is not working for 2nd click -

i trying use jtable in project, when button clicked jtable need displayed , when click on button data need displaed , when again come click same jtable button , jtable not populating not sure why happending. code: <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>jquery jtable setup in java</title> <!-- include 1 of jtable styles. --> <link href="css/metro/blue/jtable.css" rel="stylesheet" type="text/css" /> <link href="css/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" /> <!-- include jtable script file. --> <script src="js/jquery-1.8.2.js" type="text/javascript"></script> <script src="js/jquery-ui-1.10.3.custom.js

angularjs - How to detect url in Angular JS? -

i have chat in angular js. need open dialog window if user put url as: /chat/dialog/12 how can it? use $location . $location.path() returns current url var url = $location.path(); if(url==='/chat/dialog/12'){ //do code here }

asp.net - SSL Certificate issue to the end user -

i have web site developed in asp.net , hosted in cloud. site running on https protocol , certificate issued domain (e.g. example.com ) , subdomain (*.example.com). works if user types example.com or app.example.com. user types url incorrectly. type www.app.example.com. in case browser displays warning certificate. states “this server not prove www.app.example.com; security certificate *.example.com. may caused misconfiguration or attacker intercepting connection” this fine since subject name (or issued to) not matching since involves 2 subdomains i.e. first subdomain www , subdomain app. many user scare , leave web site. googling found, problem can fixed regenerating certificate additional subject alt names such *.example.com , . .example.com. staff not want regenerate certificate reason. there alternative fix problem without regenerating certificate. expectation error message should not displayed , action should not required end user. i have tried redirect rules in iis. not wo

Is the concept of the integral Images implemented in opencv with java API? -

i doing intensive computation on frames retrieved web cam, , these computations makes programm slow. after making research, found there called integral images , , learned this tutorial . now question is, concept of integral images implemented in opencv or other library or have develop concept of integral images myself? please advise. yes exists in opencv please refer question below: has link documentation explanations of how , why implemented why integral-image contains row , column of zeros?

How to send id to controller in codeigniter -

i'm using below code site, displayed me 404: page not found. routes $route['class_name/function_name/(:num)'] = 'class_name/function_name/$1'; controller . public function function_name($id) { print_r($id); exit; } use uri extract id url: following link in docs : http://www.codeigniter.com/userguide2/libraries/uri.html example- how url using uri_string() codeigniter?

php - Using Laravel 5, How to detect carriage returns and insert line break -

i'm following excellent laravel guide on laracasts , have gotten point we're outputting song titles mysql database in video 7. i wanted go ahead , add lyrics i've done fine. now i'd format little better, add new lines required. i've attempted use str_replace in view in manner; <p>{{str_replace("\r","\n", $song->lyrics)}}</p> but nothing appears happen. if use instead of \n, can see carriage return detected in correct places, output appears this; looking oh pretty,<br> i've got find way.<br> where < br>'s output normal text. can tell me if i'm approaching in right way? i've tried double , triple curly braces , think may forgetting mentioned exclamation mark, can't seem find mentioned again. any appreciated. in laravel 5 should use {!! !!} output variable without escaping: {!! str_replace("\r","\n", $song->lyrics) !!} read more: http

node.js - Sequelize.js - how to properly use get methods from associations (no sql query on each call)? -

i'm using sequelize.js orm , have few associations (which doesn't matter now). models get , set methods associations. (from docs): var user = sequelize.define('user', {/* ... */}) var project = sequelize.define('project', {/* ... */}) // one-way associations project.hasone(user) /* ... furthermore, project.prototype gain methods getuser , setuser according first parameter passed define. */ so now, have project.getuser() , returns promise. if call twice on same object, sql query executed twice. my question - missing out, or expected behavior? don't want make additional queries each time call same method on object. if expected - should use custom getters member variables manually populate , return if present? or there more clever? :) update debugger's answer - understand can use includes when making query in order eager load everything, don't need it, , can't time. it's waste of resources , big overhead if load entire db @ b

java - JPA Application based on Multiple Databases can not resolve DB of the related Entity -

my app uses 3 other databases (mysql) , 3 pus on glassfish 3.1. while retrieving data database 'a' relation (for example @onetoone) model database 'b' error occurs: select command denied user .. table 'related_table' this error not occur when name each entity way: @table(name="db_name.table_name") , not option, because use h2 database tests , h2 can not resolve such naming. [edit] important thing: app worked without 'special table naming' in @table, before reinstalled glassfish - same version , have nothing changed in glassfish settings purpose before..

Converting Byte Array to Int Array to send over java socket -

hi new java development , have following problem. i construct char array values {130,56,0,0,2,0,0,0}. pass values string using string.valueof(), once done convert sting byte array using getbytes() function. i use dataoutputstream writer write data socket. problem lies in fact on tcp level using wireshark trace data actuality sending c2 82 38 00 00 02 00 00 00 on wire , not original 130 56 0 0 2 0 0 0 . code snippet below public void run() { system.out.println("got client !"); try { // accept loop while connected while (true) { byte[] arroutut = new byte[4096]; int count = clientsocket.getinputstream().read(arroutut, 0, 4096); string clientrequest = ""; system.out.println("packet size " + count + "\n"); if (count != -1) { (int outputcount = 0; outputcount < count; outputcount++) {

java - JUnit - fields that are one time initiated in @Before are null in tests -

like title says keep getting fields null down in test cases though i've initiated them in @before method one-time set-up. exception first test runs, works. i able replicate behaviour following code: public class networktest extends testcase{ private static boolean onetimesetupdone = false; private client client; @before public void setup(){ if(!onetimesetupdone){ client = new client(); onetimesetupdone = true; } } @test public void testconnection(){ system.out.println(client); assertfalse(true); } @test public void testmulticonnection(){ system.out.println(client); assertfalse(true); } am missing here or why fields cleared after first test run? @before run before each test - should think of every @test running in new instance of test class, , @before sets instance (pro tip: @ class' .hashcode() - it's different in each test meth

Export Google Cloud Datastore and import to BigQuery programmatically -

i'm looking method export cloud datastore , import bigquery daily. manual way described @ google page . not find clean way automate it. there isn't simple way this, can separate out 2 parts: creating appengine backups , loading them bigquery. you can use scheduled backups create datastore backups periodically ( https://cloud.google.com/appengine/articles/scheduled_backups ). you can use apps script automate bigquery portion ( https://developers.google.com/apps-script/advanced/bigquery#load_csv_data ) or use appengine cron same thing.

javascript - Is there a way to trigger callback function just once in $watchGroup | Angularjs? -

i'm watching 2 values in angular project that: $scope.$watchgroup( ['currentpage', 'newstatus'], $scope.setpage ) . and when both values changing function $scope.setpage executes 2 times accordingly, should once. how implement this? my code: js app.controller('categorylistctrl', ['$scope', '$http', '$location', '$route', function($scope, $http, $location, $route) { $scope.numperpage = 5; $scope.currentpage = 1; $scope.newstatus = -1; var currentpagechanged = false; var newstatuschanged = false; function setpage() { // function's code based on requests db }; setpage(); // pagination based on db requests $scope.$watchgroup( ['currentpage', 'newstatus'], function(newvalues, oldvalues) { if ((newvalues[0] != oldvalues[0]) && !newstatuschanged) { console.log(1); // currentpage has changed setpage();

angularjs - Monaca + barcode scanner callback issue -

i trying monaca develop hybrid app using cordova barcode scanner plugin. for reason, scan callback started behave not properly. immediatly after scanning, syncing message dialog ("checking sync target files..."), "downloading files" dialog , then, finally, result dialog asked for. after closing result dialog, app goes index page, not want. here code (i use onsen ui): js/app.js var app = angular.module('hello', ['onsen']); app.controller('testcontroller', ['$scope',function($scope) { $scope.scan = function() { window.plugins.barcodescanner.scan(function(result) { alert( result.text); }, function(error) { alert('scan error'); }); } }]); index.html <!doctype html> <html ng-app="hello"> <head> <title>barcode</title> <meta charset="utf-8"> <meta name="viewport" content="width=d

jquery - Changing table values using php input -

i making calendar using html tables , filling input using jquery. it's not working , nothing gets populated in table. empty table displayed after pressing button. here code, plz point out wrong: <?php date_default_timezone_set('asia/kolkata'); $inputmonth = date('y-m-d'); $totalday = date("t", strtotime($inputmonth)); $month = date("m" , strtotime($inputmonth)); $year = date("y" , strtotime($inputmonth)); $getdate = getdate(mktime(null, null, null, $month, 1, $year)); $first_day = $getdate["weekday"]; $day_of_week = date('n', strtotime($first_day)); ?> <html> <head> <title>calendar test</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function() { $("button").click(function() { var

python 2.7 - Pandas Multi-indexing from a Flatten DataFrame -

i want resample flatten dataframe multi-indexed columns. dataframe looks : goods category month stock c1 1 5 c1 2 0 c1 3 0 c2 1 0 c2 2 10 c2 3 0 b c1 1 30 b c1 2 0 b c1 3 10 b c2 1 0 b c2 2 40 b c2 3 0 and set him : stock goods b category c1 c2 c1 c2 month 1 5 0 30 0 2 5 10 30 40 3 5 10 10 40 i try somethings groupby or stack don't find way...does know how ? with unstack (to use first have set multi-index): in [48]: df.set_index(['goods', 'category', 'month']).unstack([0,1]) out[48]: stock goods b category c1 c2 c1 c2 month 1 5 0 30 0 2 0 10 0 40 3 0 0 10 0 alternative pivot_table (but aware, if ha

c# - ExternalException when saving the result of ScreenCapture.CaptureActiveWindow -

Image
recently i'm trying save active window using c# language. problem shown below the code capture is: var image = screencapture.captureactivewindow(); image.save(@"c:\temp\snippetsource.jpg", imageformat.jpeg);

How to read Custom Property value and term description from NavigationTerm in sharepoint 2013? -

in publishing sharepoint 2013 site, using managed navigation. need read value of custom property defined in term store , need read value of description field. possible read access site? i can obtain taxonomynavigationcontext.current.navigationterm , read basic info. read custom property , description, need taxonomy term , cannot use read-only cached navigation term. taxonomysession session = new taxonomysession(site); navigationterm navterm = taxonomynavigationcontext.current.navigationterm; term term = navterm.gettaxonomyterm(session); // cannot due permission level - user read user! string val = term.customproperties["..."]; // need - read value of custom property - without need access term class. is there way how read custom property read-only navigation term user assigned read permissions? this work me seo properties, if debugging can see properties, can customproperties or localcustomproperties collection. spsite site = new spsite(siteguid); spweb

multithreading - C# threading - resetThread is a 'variable' but is used like a 'method' -

i'm trying create thread reset button colours in application i'm writing, whenever try create thread object, error 'resetthread 'variable' used 'method'. code i'm using create thread object: system.threading.thread resetthread = new system.threading.thread(new system.threading.threadstart(resetthread)); and code thread: public void resetthread() { while (true) { optionone.backcolor = default(color); optiontwo.backcolor = default(color); optionthree.backcolor = default(color); system.threading.thread.sleep(1000); } } how go fixing this? in advance. have googled no avail. call thread different method - call method reset() instance. can't have method , field same name @ class scope.

Google tracking code not counting -

i installed google analytics code in new web site. site has single page. put unmodified code wight before tag: http://visualbioinformatics.com i uploaded page analytics won't track visitors (me). looking in real-time section. pressed control+u in firefox see source code of page , tracking js code there. <script> (function(i,s,o,g,r,a,m){i['googleanalyticsobject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o), m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'ua-3648000-11', 'auto'); ga('send', 'pageview'); </script> </head> also tracking code generator page (in google analytics) says: "last checked: may 12, 2015 1:58:57 pdt [!now!] google analytics tracking code has not been detected on we

objective c - UITextField causing app to freeze on iOS 8 -

i working on application supports ios 7 , 8. application works fine on ios 7 when run on ios 8, freezes when press 1 of uitextfields . i have read other answers talk not having uitextfield it's own delegate. here 1 of answers: application freezes after editing custom uitextfield however test out have dragged new uitextfield application , not set delegate. have dragged out uibutton . when click uibutton fine. when click uitextfield (the 1 no delegate set) application still freezes. any appreciated. firstly again leo helpful comment. seems whenever press uitextfield viewwilllayoutsubviews gets called. here code application: - (void)viewwilllayoutsubviews { [super viewwilllayoutsubviews]; self.view.superview.bounds = cgrectmake(0.0, 0.0, 616.0, 703.0); } it seems in ios 8 can't call self.view.superview.bounds because causes infinite loop. see following answer details: https://stackoverflow.com/a/25934574/2126233

c++ - Literal constant suffixes when initializing variables -

is practice use suffixes when initializing variables? these cases? float foo = 0.0f; unsigned int bar = 0u; or use literal suffixes when there might conversion problem? this cpp faq you should use these suffixes when need force compiler treat numeric literal if specified type there's example: if x of type float, expression x + 5.7 of type double : first promotes value of x double , performs arithmetic using double-precision instructions. if want, fine; if wanted arithmetic using single-precision instructions, can change code x + 5.7f . there readability reasons if end using unsigned variables, idea force numeric literals unsigned. makes easier see compiler generate “unsigned arithmetic” instructions.

python - How can I exit a Python3 script after 5 minutes -

i have script copying data sd card. due huge amount of files/filesize, might take longer period of time expected. exit script after 5 minutes. how can so? it's hard verify work without example code, try this, using signal module : at beginning of code, define handler alarm signal. import signal def handler(signum, frame): print 'times up! exiting..." exit(0) before start long process, add line code: #install signal handler signal.signal(signal.sigalrm, handler) #set alarm 5 minutes signal.alarm(300) in 5 minutes, program receive alarm signal, call handler, exit. can other things in handler if want.

php - How to convert this tree data structure into an array -

i used tree data structure. https://github.com/nicmart/tree and created tree object following xml code both shown below: <xgameapp version="1.0"> <states> <state id="1" color="red"></state> <state id="2" color="blue"> hello state </state> </states> <actions> <transitions> <transition from="1" to="2"> demo transition </transition> <transition from="2" to="1"></transition> </transitions> <orientations> <x1> <y1> <cw> <orientation fronangle="120" toangle="45"></orientation> <orientation fronangle="270" toangle="120"&

c# - Is it possible to have a generic delegate? -

i have base generic usercontrol defined as: public partial class baseusercontrol<t> : usercontrol t : class { public event itemsselectedeventhandler itemsselected; } and delegate: public class itemsselectedeventargs<t> : eventargs { public ienumerable<t> items { get; private set; } internal itemsselectedeventargs(ienumerable<t> items) { this.items = items; } } public delegate void itemsselectedeventhandler(object sender, itemsselectedeventargs<t> e); a method of usercontrol load multiple records @ once , return them ienumerable<t> . inheriting controls of concrete type, , in turn raise event subscriber (ie. form). however, above doesn't compile , following error: the type or namespace name 't' not found (are missing using directive or assembly reference?) is possible achieve want need in other way? of course can. error in last line - haven't declared "t" generic.

regex - Match multiple lines of a file and replace if content does not match -

i have particular file(sample.txt) content : doc=true add=123.566.33.8 #is sample file use #for specific functions domain=443.59.43.23 upon performing operation, content of file changes : doc=true add=123.566.33.8 eshfsjfn sldfhsehfoewjwefn lsjdnfnfd now need make sure content remains in first case. i'm trying grep initial pattern(sample.txt) using grep command required lines , if in case lines not match, should append these lines in file sample.txt . content in sample.txt should limited shown initially. don't want create file same content , match them. want use grep, sed or perhaps awk. i post answer assuming want sample.txt checked against standar awk file entrance hope can you awk'begin { while (getline < "sample.txt") { a[$0] } } { if( $0 in a) { located=true; } if(!located) { print "line changed ->"nr" ->"$0 print $0 >> "sa

How to update a set of pods running in kubernetes? -

what preferred way of updating set of pods (e.g. after making code changes & pushing underlying docker image docker hub) controlled replication controller in kubernetes cluster? i can see 2 ways: deleting & re-creating replication controller manually using kubectl rolling-update with rolling-update have change replication controller name. since i'm storing replication controller definition in yaml file , not generating manually, having change file push out code update seems bring bad habits alternating between 2 names replication controller (e.g. controllera , controllerb) avoid name conflict. what better way? you should use kubectl rolling-update . added feature "simple rolling update" update image in replication controller without renaming it. it's last example shown in kubectl rolling-update output: // update pods of frontend changing image, , keeping old name $ kubectl rolling-update frontend --image=image:v2 this command supp

c# - After Post Back my jQuery code not working -

i have server side button. first time jquery working fine next time jquery not wroking. using jquery inside update panel. below jquery code. <script type="text/javascript" src="../../js/jquery-ui-1.11.4.min.js"></script> <script type="text/javascript"> (function ($) { $('.mv-spinner').spinner(), $('.mv-action').button(), $('.table-mv-vouchers').tooltip(), $('.table-mv-vouchers select').selectmenu() })(jquery) </script> also have used code in page load function not working. protected void page_load(object sender, eventargs e) { page.clientscript.registerstartupscript(typeof(updatepanel), "scrg", "<script type='text/javascript' src='../../js/jquery-ui-1.11.4.min.js'></script>"); page.clientscript.registerstartupscript(typeof(updatepanel), "scr", "<script type='text/javascript&

video - Debugging an MP4 opened by VLC but not by ffplay -

i'm writing code creates mp4 files. check i've created mp4 file. the file played correctly vlc , firefox, not ffplay or chrome. guess file contains error vlc can cope more aggressive mp4 reader cannot. i've thought repairing file , check differences fix code. tried programs repair mp4 files, without success until now. can reccommend way debug problem, or tool fix mp4 files? file fragmented mp4 contains both init section (ftyp, moov boxes) , 1 fragment section (moof , empty sidx). here video file: https://www.dropbox.com/s/rojxzvkfxfj31u8/400k00001-3_serialized.mp4?dl=0 edit: doesn't work in firefox, when using media source extensions in example: http://people.mozilla.org/~jyavenard/tests/mse_mp4/paper.html (don't forget enable mse on firefox, explained here: http://www.linuxveda.com/2015/04/02/enable-mse-native-html5-support-firefox-linux/ ) edit2: in chrome://media-internals, see following error above example: append: stream parsing failed. data

java - How to filter DBpedia results in SPARQL -

i have little problem... if have simple sparql query select ?abstract { <http://dbpedia.org/resource/mitsubishi> <http://dbpedia.org/ontology/abstract> ?abstract. filter langmatches( lang(?abstract), 'en')} i have result: sparql result , has non-english character... there idea how remove them , retrieve english words? you'll need define characters want , don't want in result, can use replace replace characters outside of range with, e.g., empty strings. if wanted exclude basic latin, latin-1 supplement, latin extended-a, , latin extended-b ranges, (which ends being \u0000–\u024f) following: select ?abstract ?cleanabstract { dbpedia:mitsubishi dbpedia-owl:abstract ?abstract filter langmatches( lang(?abstract), 'en') bind(replace(?abstract,"[^\\x{0000}-\\x{024f}]","") ?cleanabstract) } sparql results or simpler: select (replace(?abstract_,"[^\\x{0000}-\\x{024f}]","") ?abstrac

Android socket connection loses after app being idle for some time -

my application listens socket. application connected socket using following method. public void connect() { this.connectionstatus = connect_status_connecting; log.v(appconstants.debug_tag, userid + " : connecting server"); if (mthread != null && mthread.isalive()) { return; } mthread = new thread(new runnable() { @override public void run() { try { log.v(appconstants.debug_tag, userid + " : thread action started"); string secret = createsecret(); int port = (muri.getport() != -1) ? muri.getport() : (muri.getscheme().equals("wss") ? 443 : 80); string path = textutils.isempty(muri.getpath()) ? "/" : muri.getpath(); if (!textutils.isempty(muri.getquery())) { path += "?" + muri.getquery(); } string originscheme = muri.getscheme().equals(&qu

Disable password in WIx Installer -

i have installer project developed in wix. have below code util:xmlconfig <util:xmlconfig id="xml.setmypassword" action="create" elementpath="/configuration/datareport/password" node="value" value="[my_password]" file="[#myservice]" on="install" preservemodifieddate="yes" sequence="1" /> now issue is, when installing package password shown "mypassword" instead of ******. how can change above code such password should not displayed. if trying stop my_password property appearing in log should set hidden attribute yes in declaration. <property id="my_password" hidden="yes" secure="yes" /> note util:xmlconfig custom action may still display in own internal logging

How to use APScheduler without installing it? -

i know normal way use apscheduler "python setup.py install". want embed program directly, user don't need install when using program. class basescheduler(six.with_metaclass(abcmeta)): _trigger_plugins = dict((ep.name, ep) ep in iter_entry_points('apscheduler.triggers')) # print(_trigger_plugins, 'ddd') _trigger_classes = {} _executor_plugins = dict((ep.name, ep) ep in iter_entry_points('apscheduler.executors')) _executor_classes = {} _jobstore_plugins = dict((ep.name, ep) ep in iter_entry_points('apscheduler.jobstores')) _jobstore_classes = {} _stopped = true thks. you can instantiate triggers directly, without going through aliases. eliminates need install apscheduler or setuptools. answer question?

plot - Reset ColorOrder index for plotting in Matlab / Octave -

i have matrices x1, x2, ... containing variable number of row vectors. successive plots figure hold % or hold on plot(x1') plot(x2') plot(x3') matlab or octave iterates through colororder , plot each line in different color. but want each plot command start again first color in colororder , in default case first vector matrix should blue, second in green, third in red etc. unfortunately cannot find property related color index niether method reset it. you can shift original colororder in current axes new plot starts same color: h=plot(x1'); set(gca, 'colororder', circshift(get(gca, 'colororder'), numel(h))) plot(x2'); you can wrap in function: function h=plotc(x, varargin) h=plot(x, varargin{:}); set(gca, 'colororder', circshift(get(gca, 'colororder'), numel(h))); if nargout==0, clear h end end and call hold plotc(x1') plotc(x2') plotc(x3')

lucene - Sorting on multivalued field in Solr -

i know multivalued field sorting not supported in solr . there way can sort multivalued field in solr. have 2 documents field custom_code , values below, doc 1 : 11, 78, 45, 22 doc 2 : 56, 74, 62, 10 when sort in ascending order order should , doc 2 : 56, 74, 62, 10 doc 1 : 11, 78, 45, 22 here doc 2 come first because has smallest element 10 (which greater 11 of doc 1). how can achieve in solr. easiest way? create copyfield copy content of multivalued data sorted concatenated single value without commas , use sorting. for ex : doc 1 : multivalueddata : 11, 78, 45, 22 sortedconcatenatedsinglevalue : 11224578 doc 2 : multivalueddata : 56, 74, 62, 10 sortedconcatenatedsinglevalue : 10566274 if cannot create singlvalue field @ time of generating data source can use script transformer ( https://wiki.apache.org/solr/dataimporthandler#scripttransformer ) during index time create sortedconcatenatedsinglevalue field using javascript function.

Auto update for android application -

i updating application incrementing version code , version name. don't auto update option or notification application. auto update option in google play store in enabled , notifications appear other apps. missing ? the google play console takes time application indexed , updated..some times may take upto 24 hours.

ios - Track user new downloads and updated on App Store -

i know can check sales & trends using itunes connect. figure there new downloads or users updates app ? how know users new users (new download) or existing user (update app) ? go sales , trends @ itunesconnect. at top, there's add filters. filters drop down, see "transaction type". when click it, show categories, free, paid, updates, redownload etc.

R - Unable to store large binary values -

i have large binary value: longbinary<-10110101110000111 but value getting stored in longbinary 10110101110000112. how can correct value without changes in end. tried using int64 package not available version 3.1.2 or 3.2. is there way out ? thanks though i'm starting play around r, suspect when doing longbinary<-10110101110000111 you effective saving decimal number worth 10e+17. near maximum resolution of numeric() in r, , surely above integer(). think should save it's decimal value, , convert print in binary if necessary. 10110101110000111 binary = 93063 decimal = strtoi("10110101110000111", 2) the inverse (integer binary string) in r.utils: inttobin inttobin(93063) gives string "10110101110000111": > library(r.utils) > inttobin(93063) [1] "10110101110000111"