Posts

mysql - How to make multiple LEFT JOINs with OR fully use a composite index? (part 2) -

it system calculates how users scan fingerprints when enter/leave workplace. don't know how called in english. need determine if user late in morning, , if user leaves work early. this tb_scan table contains date , time user scans fingerprint. create table `tb_scan` ( `scpercode` varchar(6) default null, `scyear` varchar(4) default null, `scmonth` varchar(2) default null, `scday` varchar(2) default null, `scscantime` datetime, key `all` (`scyear`,`scmonth`,`scday`) ) engine=myisam default charset=latin1 it has 100,000+ rows, this scpercode scyear scmonth scday scdateandtime 000001 2010 10 10 2016-01-10 08:02:00 000001 2010 10 10 2016-01-02 17:33:00 000001 2010 10 11 2016-01-11 07:48:00 000001 2010 10 11 2016-01-11 17:29:00 000002 2010 10 10 2016-01-10 17:31:00 000002 2010 10 10 2016-01-02 17:28:00 000002 2010 10 11 2016-01-11 05:35:00 0...

python - multi_line hover in bokeh -

Image
as in question: bokeh multi_line , hovertool i found hovertool not implemented multi_line plots bit of setback. mentioned under 'warnings' here: http://bokeh.pydata.org/en/0.11.0/docs/reference/models/tools.html#bokeh.models.tools.hovertool is there work arounds this? also, if implement feature, place start , there specific aware of? also, feature in current bokeh roadmap? as of bokeh 0.12.4 (earlier, forget exact release) hover tool supports mutli_line : from collections import defaultdict import numpy np scipy.stats import norm bokeh.plotting import show, figure bokeh.models import columndatasource, hovertool bokeh.palettes import viridis6 rt_x = np.linspace(118, 123, num=50) mass_spec = defaultdict(list) scale, mz in [(1.0, 83), (0.9, 55), (0.6, 98), (0.4, 43), (0.2, 39), (0.12, 29)]: mass_spec["rt"].append(rt_x) mass_spec["rt_intensity"].append(norm(loc=120.4).pdf(rt_x) * scale) mass_spec['mz_tip'].append(mz)...

node.js - Return data from node service to angularjs controller -

i following mean machine book. 1 of examples connect mongo db , retrieve users. book seems little out dated( got 2-3 errors fixed). issue service not connect mongodb , return data. .from ui, service returns html current page.the table not being populated. but when invoke service through postman, data the code user retrieval this. user service: angular.module('userservice', []) .factory('user', function($http) { //create new object factory var userfactory = {}; //get single user userfactory.get = function(id) { return $http.get('/api/user/' + id); }; //get users userfactory.all = function() { return $http.get("/api/user/"); }; ... shown relevant parts above. controller: angular.module('userctrl', ['userservice']) .controller('usercontroller', function(user) { var vm = this; //processing control vm.processing = true; //grab users on ...

eclipse - m2e subclipse connector - deprecated? -

i want use m2e in connection subclipse in eclipse mars. unfortunately, subclipse connector eliminated discovery catalog of m2e. nevertheless, got running configuration using subclipse 1.8 (pretty old) update site http://subclipse.tigris.org/m2eclipse/1.0 on https://dev.eclipse.org/mhonarc/lists/m2e-users/msg05356.html one gets impression subclipse connector kind of "deprecated" , cannot used newer versions of subclipse. my question: there non-deprecated way use subclipse in connection m2e?

python - Query task state - Celery & redis -

okay have relatively simple problem think, , it's i'm hitting brick wall it. have flask app, , webpage allows run number of scripts on server side using celery & redis(broker). all want do, when start task give name/id (task portrayed button on client side) i.e. @app.route('/start_upgrade/<task_name>') def start_upgrade(task_name): example_task.delay(1, 2, task_name=task_name) then after task has kicked off want see if task running/waiting/finished in seperate request, preferably like; @app.route('/check_upgrade_status/<task_name>') def get_task_status(task_name): task = celery.get_task_by_name(task_name) task_state = task.state return task_state # pseudocode but can't find in docs. new celery though fyi assume know nothing. obvious, need able query task state python, no cli commands please. any alternative methods of achieving goal of querying queue welcome. when start task delay or apply_async ob...

javascript - this following code is working for removing the previous data from the modal -

this following code working removing previous data modal requirement have 2 hyperlinks in data table 1st won edit , 2nd won delete when click on delete link data deleting after click on edit link 404 error occured(both links concatinating) tried following code removing previous data modal $(document).on('hidden.bs.modal', function (e) { var target = $(e.target); target.removedata('bs.modal') .find(".modal-content").html(''); });

php - How to list all databases using yii2 in mongodb? -

i need list of databases on current server. using yii2 framework. how list of databases? yii2 v2.1 has functions list of databases, want use yii2 v2.0. $all = yii::$app->mongodb->createcommand()->listdatabases(); where mongodb configured mongo instance. response may like: $all:array = 0: array = name: string = local sizeondisk: double = 83886080 empty: bool = false 1: array = name: string = testdd sizeondisk: double = 19268632576 empty: bool = false 2: array = name: string = admin sizeondisk: double = 1 empty: bool = true