Posts

Showing posts from July, 2010

xml - Where to put copyright information in an XSD? -

when placing copyright information in xml schema definition (xsd), there official (or semi-official, universally accepted) location doing so? based on where add version xsd schema? , there's official version attribute in xs:schema element - there similar copyright information? i have seen people using annotation/documentation elements (e.g. here ) - accepted way of doing this? <xsd:annotation> <xsd:documentation xml:lang="en"> copyright 2015 example.com. rights reserved. </xsd:documentation> </xsd:annotation> xsd has no specific, direct support copyright information. 3 methods used in practice: xml-level comments: <!-- copyright 2015 example.com. rights reserved. --> this ok may run afoul of policies preferring see documentation in proper xsd annotations. also, sure not add such line above xml declaration ( <?xml version="1.0" encoding="utf-8" ?> ) present in xsd keep xsd well-f

node.js - Facebook Canvas App on Heroku with Meteor.js - Incomplete Chunked Encoding -

i have meteor.js app on heroku i'm trying load facebook canvas app. page works great in browsers chrome, i'm getting error in web inspector console: err_incomplete_chunked_encoding , , page never loads. happens around 80% of time, load correctly (upon multiple refreshes). for simplicity, i've put sample meteor app replicates same issues i'm having. here website on heroku: https://fbmeteor.herokuapp.com , here facebook canvas: https://apps.facebook.com/mymeteortestheroku/ i've searched through , found many similar cases people have run incomplete chunked encoding error in chrome, , solutions have ranged disabling anti-virus claiming fixed in future chrome versions . i've tried of these , more , still running same issues. on heroku, following error in logs: heroku[router]: sock=backend at=error code=h18 desc="server request interrupted" method=post path="/" the reason why unique heroku is, tried running same app hosted on me

python - How to fix floating point decimal to two places even if number is 2.00000 -

this have: x = 2.00001 this need: x = 2.00 i using: float("%.2f" % x) but is: 2 how can limit decimal places 2 , make sure there 2 decimal places if zero? note: not want final output string. this works: '%.2f" % float(x) previously answered this: how this? def fmt2decimals(x): s = str(int(x*100)) return s[0:-2] + '.' + s[-2:] afaik can't trailing zeros format specification %.2f .

angularjs - Accessing parameter from Angular route -

i working on first production angular application. know can set routing can grab parameter , use to, instance, data database. for instance, in application have list of cases. each case has case number. have partial displays documents related case. here routing: jbenchapp.config(['$routeprovider', '$locationprovider', function($routeprovider, $locationprovider) { $routeprovider. when('/dashboard', { templateurl: 'partials/dashboard.html', controller: 'jbenchctrl' }). when('/calendar', { templateurl: 'partials/calendar.html', controller: 'jbenchctrl' }). when('/', { templateurl: 'partials/calendar.html', controller: 'jbenchctrl' }). when('/case/:number', { templateurl: 'partials/case.html', controller: 'casedetailct

javascript - Limit number of characters in input field with PHP -

i'm creating database of people using this wordpress plugin . on signup form, want limit number of characters users can input in fields, don't know how, i'm not programmer , have limited knowledge of php , javascript. can't edit html directly since i'm using plugin, can't use maxlength html attribute. signup page based on following php template plugin, guess that's need edit, how? <?php /* * bootstrap template signup form * * outputs twitter bootstrap-compatible form * http://twitter.github.com/bootstrap/index.html * */ ?> <div class="wrap <?php echo $this->wrap_class ?>" > <?php // how html wrapper error messages can customized $this->print_errors( '<div class="alert %1$s">%2$s</div>','<p>%s</p>' ); ?> <?php $this->print_form_head(); // must included before fields output ?> <div class="form-horizontal pdb-signup">

java - To upload a file using rich:fileUpload -

i'm facing problem while uploading file server, in code below can context. view.xhtml <h:outputtext value="subir archivo tráfico:" styleclass="label" /> <h:panelgrid > <rich:fileupload disabled="#{not administrarformtraficobean.edicionhabilitada}" fileuploadlistener="#{fileuploadbean.listener}" listheight="60px" id="upload" acceptedtypes="txt" ontyperejected="alert('Únicamente se pueden cargar archivos en formato .txt');" autoclear="true" maxfilesquantity="1" lang="es" donelabel="listo" deletelabel="eliminar" servererrorlabel="se produjo un error al subir el archivo" sizeexceededlabel="el tamaño de archivo supera el tamaño permitido!" clearlabel="limpiar" clearalllabel=&q

java - Idea doesn't recognise persistence.xml -

Image
i faced weird behavior: ide can't recognize xml document if named "persistence.xml" , features syntax coloring & code completion doesn't work file. but when rename it, idea start support xml document. so, can reason of behavior? (debian, idea 14) updated persistence.xml: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" version="2.1" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="ex01" transaction-type="jta"> <jta-data-source>java:global/jdbc/ch08</jta-data-source> <properties> <property name="javax.persistence.schema-generation.database.action" value="create"/&

python - How can a unique Rserve connection be stored per session? -

i'm writing small flask application , having connect rserve using pyrserve. want every session initiate , maintain own rserve connection. something this: session['my_connection'] = pyrserve.connect() doesn't work because connection object not json serializable. on other hand, this: flask.g.my_connection = pyrserve.connect() doesn't work because not persist between requests. add difficulty, doesn't seem though pyrserve provides identifier connection, can't store connection id in session , use retrieve right connection before each request. is there way accomplish having unique connection per session? we need common location create rserve connection each user. simplest way run multiprocessing.manager separate process. import atexit multiprocessing import lock multiprocessing.managers import basemanager import pyrserve connections = {} lock = lock() def get_connection(user_id): lock: if user_id not in connections:

android - Java synchronized method -

consider code: public synchronized void onsignalstimeout(list<signalspec> specs) { if (specs != null && specs.size() > 0) { (signalspec spec : specs) { parsedcansignal timeoutedsignal = new parsedcansignal(); signalsprovider.getinstance().setsignal(spec.name, spec.parent.parent.channel, timeoutedsignal); } } } i've got simple question: when thread 1 calls onsignalstimeout method, can thread 2 access objects accessed in method? can't find anywhere if 'synchronized' locks access method or access objects used in method. first of all, forget synchronized methods . so-called synchronized method... synchronized anytype foobar(...) { dosomething(); } is nothing shortcut way of writing this: anytype foobar(...) { synchronized(this) { dosomething(); } } there nothing special method in either case. special synchronized block , , synchronized block simple. when jvm e

android - ShowcaseView's details text won't go to the new line -

that's problem, tried using setpadding, setright , other stupid methods, won't help. i need text go new lines when display limits has reached, so, please me. it seems have place if use target, target.none, other times, when use button , etc, lines go down should , ok, need intro text show first time without specific elements selected. i solved problem through adding child view showcaseview . upd , i've been asked share solution, i'll share code use. here's complete code using showcaseview : use fragment show it, therefore don't need copy code in every time, made improvements make life easier using it: frshowcase.java: /** * created movsar bekaev on 02/09/2015. */ public class frshowcase extends fragment { static boolean is_sc_done; static arraylist<xschowcasetarget> elements; static showcaseview sv; int svstep = 0; relativelayout.layoutparams svbuttonparams; textview tvsvtitle, tvsvdetail; view add

Is there any function to search for string in string in C? -

is there function in c searches string in string , returns 0 or 1. let's string 1 "i love whole world" , want search "love" there function appropriately returns 0 if not found , returns 1 if found. strchr() searches character within given string. however, want find love in i love whole world , you're searching string in another. take strstr() this. while both functions don't return 0 or 1, trust able wrap them in way do.

javascript - custom blur not working correctly [AngularJS] -

i trying create notifications this: http://plnkr.co/edit/gbfiofdnb2oc4zjarqtp?p=preview but unsuccesful integrade in script, because when click outside notification box nothing happend. here script: 'use strict'; var app = angular.module('notifications',['ngroute'], function($interpolateprovider) { $interpolateprovider.startsymbol('<%'); $interpolateprovider.endsymbol('%>'); }) .controller('notificationcontroller', function($scope, $http) { $http.get("/api/notification") .success(function (response) { $scope.notys = response; }); $scope.notifications = { visible: false }; $scope.shownotifications = function(flag) { $scope.notifications.visible = flag; }; }) .directive('customblur', function(){ return {

r - how to display dynamic values in gvisBarChart hAxes and vAxes -

need in displaying dynamic values/strings in haxes , vaxes part of gvisbarchart sample tried below: haxes=paste("[{title:", input$ddllgraphmeasure, "}]") input$ddllgraphmeasure - dynamic input value but not working. please suggest way this.

sql - Duplicate Results with LISTAGG Function -

Image
i see there solutions similar question unable them work in scenario. returning duplicate codes while using listagg function. returning now: select ,cd.claim ,cd.claimln ,cd.prov_invoice_unts ,cd.appr_unts ,cd.prov_invoice_amt ,cd.prov_cntrct_amt ,cd.plan_cntrct_amt plan_amt ,listagg(dx.diag_cd,', ') within group (order dx.lvl_cd) dx_codes claim_detail cd inner join patient_intake_plan pip on cd.pat_nbr = pip.pat_nbr , cd.itk_id = pip.itk_id inner join health_plan hp on hp.plan_id = pip.plan_id inner join provider_ccxportal pr on pr.prov_id = cd.prov_id inner join provider_parent prp on pr.prov_prnt_id = prp.prov_prnt_id inner join patient_ccxportal ptp on ptp.pat_nbr = cd.pat_nbr inner join claim c on c.clm_id = cd.clm_id left join claim_diagnosis dx on cd.clm_id = dx.clm_id c.rcpt_dt >= '01-jul-2014' i need return: use regex rid of duplicates ....as plan_amt, rtrim( regexp_replace( (listagg(dx.diag_cd,',') with

Scilab multiple functons -

i working scilab 5.4.1. there way define , invoke more 1 function in .sci file. have read in theory there possibility. know how? this possible, define multiple functions in 1 file. //first function function x=myfct(a, b) x=a+b endfunction //second function function y=myfct2(a, b) y=a/b endfunction //third function function y=myfct3(a, b, c) y = myfct(a,b) y = myfct2(y,c) disp(y) endfunction see the scilab pages more information functions. after defining above functions in file , running file once, files defined. can call them console: >> myfct3(3,4)

c# - Why am I able to access a non-static method in a static context when using dynamic -

the following code: class program { static void main(string[] args) { dynamic d = 0; int x = test.testdynamic(d); int y = test.testint(0); } } public class test { public int testdynamic(dynamic data) { return 0; } public int testint(int data) { return 0; } } when run in visual studio 2013 (update 5), raises compile time error on line test.testint "an object reference required non-static field, method, or property." but not raise same error on test.testdynamic line. fail, expectedly, runtime error. the same code raises compile time error on both lines in visual studio 2015. why same compile time error not raised in visual studio 2013? you can't access properties / method without creating instance of object. class program { static void main(string[] args) { dynamic d = 0; test test = new test(); int x = test.testdynamic(d);

Does it make sense to proxy multiple tornado-based processes with nginx, where both of them are non-blocking I/O based? -

i found several online articles explains how proxy multiple tornado processes (using supervisord or something) nginx, can't understand reason why they're using tornado back-end server framework. according understanding, both tornado , nginx non-blocking i/o based, if want benefits of non-blocking i/o, isn't 1 of them enough? there reasons choose non-blocking i/o based server both front-end , back-end? yes, makes sense run multiple tornado processes , proxy of them. reason gil: each python process can make use of 1 core, make use of cores on machine must run multiple processes. there number of ways run , manage multiple tornado processes, , not of them require load balancer nginx, recommended configuration because allows each process restarted independently zero-downtime updates. the benefits of non-blocking i/o apply @ every level. using nginx load balancer reduce benefit see using tornado on backend, benefits still there, sites using long polling or webs

android - Will a short time period for SyncAdapter's periodic sync, necessarily drain the battery? -

in case, "short time period" can 30 seconds 5 minutes. onperformsync method nothing of times, i'm concerned short sync period might prevent phone sleeping, , have drastic effect on battery life. public void onperformsync(account account, bundle extras, string authority, contentproviderclient provider, syncresult syncresult) { if (!internetconnectiondetector.isconnectedtointernet()) return; if (/*we have received push server indicating update available*/) syncwithserver(); else return; }

java - Configure log4j to send email -

in log4j.properties have log4j.appender.console=org.apache.log4j.consoleappender log4j.appender.console.layout=org.apache.log4j.enhancedpatternlayout log4j.appender.console.layout.conversionpattern=%d{iso8601} %-5p [correlation-ids:%x{x-caap-correlation-id},user:%x{x-caap-user}] [%t] (%c:%l) %x{camel.routeid}- %m%n log4j.logger.com.lacapitale=info log4j.logger.org.apache.cxf=info log4j.logger.org.apache.camel=debug log4j.logger.org.springframework=info log4j.appender.smtp=org.apache.log4j.net.smtpappender log4j.appender.smtp.buffersize=1 log4j.appender.smtp.from=noreply@mycompany.com log4j.appender.smtp.smtphost=localhost log4j.appender.smtp.subject=[{{appid}}] - erreur technique log4j.appender.smtp.threshold=info log4j.appender.smtp.to=me@mycompany.com log4j.appender.smtp.layout=org.apache.log4j.patternlayout log4j.appender.smtp.layout.conversionpattern=%d{iso8601} %-5p %m%n log4j.rootlogger=info, console log4j.logger.email=info, smtp but, never email when log info. is

Swift iOS take in a input and use it for function name -

func callfunctionname(parameters: string) -> returntype { var somevalue = parameters var returnvalue = somevalue() return returnvalue } is there way take in input , use function name? example: let input green, want call function green. if input red call function red etc... or have huge if statement check each input call different functions this not possible in swift. have store functions want call in your own dictionary, , use functions name. a "huge statement" might feasible small number of functions, , perform faster, ideal approach store them in dictionary. however, if dealing objects: if exampleobject.respondstoselector("examplefunction") { exampleobject.performselector("examplefunction") } this approach works classes, objective-c or swift.

javascript - Converting a 3D object create with vertexes to Faces -

so have object created drawing vertexes on 3d canvas using three.js. trying add faces to can not seem correct method this. you can find project here: https://github.com/thebillkidy/webgl-superformula (basically applying superformula in webgl) i tried point clouds, lines , convexgeometries none seem work. knows how this? p.s. can find current render method here: https://github.com/thebillkidy/webgl-superformula/blob/master/app/scripts/main.js added other methods tried.

c++ - How to convert integers to pointers and vice versa -

suppose there std::multiset<some_data_type> s , how can save address of this std::multiset in integer , use integer assign other pointers location? mean possible this: std::multiset<int> myset; //insert data in myset int = address_of(myset); std::multiset<int>* otherset = location(a); this c++11's intptr_t type gives <cstdint> , if system supports (which standard not mandate). if it's available, it's guaranteed large enough hold pointer value (unlike int ), , defined such converting , intptr_t , the same pointer type safe. you'll need reinterpret_cast each conversion. you don't want this if can avoid it. use original pointer type possible. types good!

ibm - Mobilefirst target run time error -

trying run hybrid application , receive following error: target run times http preview not defined any advice? you needn't touch project properties > target runtimes. i suggest either: start new workspace, or delete your-workspace\mobilefirstconfigserver folder. this should resolve error you're facing, restoring project default settings.

tabs - javascript failing in HTA -

i trying life of me make tabs work in hta. if can spot error here awesome. says im getting undefined variable when launch. below code hta. im not sure error coming from. believe has "panels" in javascript.. <html> <head> <hta:application id="accessportal" applicationname="accessportal" border = "thin" borderstyle = "normal" caption = "yes" innerborder="no" maximizebutton = "no" minimizebutton = "yes" navigable="yes" scroll="yes" selection="yes" showintaskbar = "yes" singleinstance = "yes" sysmenu = "yes" version = "1.0" /> <title>access portal</title> <link rel="stylesheet" type="text/css" href="css/style.css"> <!-- window resize vbs --> <script language="vbscript"> sub window_

How to convert the MongoDB ISO date to Normal date-Mongodb with PHP , and MongoDb driver -

how retrive date stored in below format in mongodb "updated_date_time" : isodate("2015-05-28t05:01:10.966z") while trying retrive isodate mongodb returns result "0.03000000 1431921367" how retrive timestamp , date mongodb? could me fetch data.. it depens in language you're working. in javascript should use moment.js save , retrieve information. it's easy use.

python - Virtualenv failing when creating an enviroment -

i don't know reason, function mkvirtualenv ending in following error: lep:~ lep$ mkvirtualenv myenvironment new python executable in myenvironment/bin/python installing setuptools, pip, wheel... complete output command /users/lep/.virtuale...vironment /bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel: traceback (most recent call last): file "<string>", line 1, in <module> file "/users/lep/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.0-py2.py3-none-any.whl/pip/__init__.py", line 13, in <module> file "/users/lep/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-7.1.0-py2.py3-none-any.whl/pip/utils/__init__.py", line 15, in <module> file "/users/lep/anaconda/lib/python2.7/zipfile.py", line 6, in <module> import io file "/users/lep/anaconda/lib/python2.7/io.py", line 51, in <module> import _io import

coordinates - I don't understand why my image map is not working -

what wrong code below? feel have set make image map work. <img class="europe_map" src="images/europe_finalmap.jpg" width="601" height="574" alt="europe" usemap="#europe"> <map name="europe"> <area shape="polygon" href="#" alt="iceland" coords="724,1490,725,1489,727,1490,726,1489,727,1489,727,1489,728,1489,727,1490,729,1490,728,1490,729,1490,729,1490,729,1491,729,1492,729,1493,729,1494,729,1494,730,1494,730,1494,731,1494,731,1494,732,1494,734,1494,735,1494,736,1493,736,1491,736,1491,737,1491,738,1490,739,1490,740,1491,741,1491,743,1492,747,1492,744,1492,743,1491,743,1491,743,1490,741,1490,741,1488,744,1488,745,1488,744,1486,742,1485,743,1485,743,1485,746,1485,747,1485,747,1485,747,1484,748,1484,745,1482,746,1483,747,1484,748,1483,748,1484,750,1483,751,1483,752,1482,752,1482,753,1482,753,1481,753,1481,751,1480,751,1480,749,1479,753,1479,749,1478,751,1478,

javascript - Drag two images together, but limit one's movement to vertical axis -

i'd move 2 images on page.the layout of following: |1.1|--2.1--| |1.2|--2.2--| |1.3|--2.3--| |1.4|--2.4--| so images next each other, cells start '1' belong first image, start '2' belong second image. when drag of images expected behaviour both images move, image 1 on vertical axis. (so remains on left, might move or down as image 2. image used sort of header, , needs visible on left time, needs vertically in sync image 2.), image 2 can move along both axes. in example means 1.1 part of first image in line 2.1 part of second image. is there js framework might support this? i've tried using fabric js, when cap coordinates in event handler becomes unbelievably slow. this code i've tried, doesn't i've described, restricts movement rectangle, theory behind same. canvas.on("object:moving", function() { var top = movingbox.top; var bottom = top + movingbox.height; var left = movingbox.left; var right = left + movingbox.w

javascript - Keep point when converting to float -

i sending numerical data server ajax call, 0.77 , 100 , on. when server receives data, interprets 0.77 double , 100 int lacks decimals. number use var nbr = parsefloat(stringvariable, 10); and if try input 100.0 remove decimals parsefloat removes them. is there way keep decimal places server can distinguish data types? there no numeric types other number in javascript. in order preserve decimals you're asking, you'd have send them string.

Change representation of Python object -

in python, data types (like int, float) both represent value, have built-in attributes/functions/etc: in [1]: = 1.2 in [2]: out[2]: 1.2 in [3]: a.is_integer() out[3]: false is possible reproduce behavior within python, e.g. define class: class scalar: def __init__(self, value) self.value = value # other code .... s = scalar(1.2) where have s return 1.2 (instead of typing s.value ), , things a = s -> a = 1.2 ? closest can behavior adding like: def __getitem__(self, key=none): return self.value and using a = s[()] , doesn't good. where have s return 1.2 (instead of typing s.value) in console? implement __repr__ method. a = s -> = 1.2 to avoid having use a = s.value , can implement __call__ , call object: >>> class scalar: ... def __init__(self, value): ... self.value = value ... def __repr__(self): ... return str(self.value) ... def __call__(self): ... return self.v

xml - Selecting value of child element -

why <xsl:value-of select="p"/> not resulting in output of xml source’s p element? also, how can prevent xmlns="" appearing on result’s trans-unit elements? thanks. source xml <?xml version="1.0" encoding="utf-8"?> <!doctype svg public "-//w3c//dtd svg 20001102//en" "http://www.w3.org/tr/2000/cr-svg-20001102/dtd/svg-20001102.dtd" [ <!entity ns_graphs "http://ns.adobe.com/graphs/1.0/"> <!entity ns_vars "http://ns.adobe.com/variables/1.0/"> <!entity ns_imrep "http://ns.adobe.com/imagereplacement/1.0/"> <!entity ns_custom "http://ns.adobe.com/genericcustomnamespace/1.0/"> <!entity ns_flows "http://ns.adobe.com/flows/1.0/"> <!entity ns_extend "http://ns.adobe.com/extensibility/1.0/"> ]> <svg> <variablesets xmlns="&ns_vars;"> <variableset varsetnam

powershell - How to force Azure Storage Account as classic -

we built infrastructure , application deployment framework using azure resource manager , templates. in order deploy cloud service, required first setup azure storage account. of recently, accomplished running: switch-azuremode azureresourcemanager new-azurestorageaccount -resourcegroupname $resourcegroupname -storageaccountname $storageaccountname -location $locationname -type standard_lrs this create storage account new-azuredeployment cmdlet use deployment. far can remember, storage account created 1 labeled "classic" in ui. however, recent changes, storage account created using script above non-classic (v2). v2 storage account not recognized new-azuredeployment, , throws in powershell script: new-azuredeployment : resourcenotfound: storage account 'teststorage' not found. if manually create classic storage account in ui, can use deployment, , works fine. so possible 1 of following: force storage account created classic via powershell? inst

R Version 3.2.1 devtools Package Installation -

i new r , have tried follow tutorial install devtools package. seems install package (as can seen below), when try load library(devtools) , receive following error: "error in loadnamespace(j <- i[[1l]], c(lib.loc, .libpaths()), versioncheck = vi[[j]]) : there no package called ‘rversions’ error: package or namespace load failed ‘devtools’" i have tried remove in re-install, error keeps occurring. > install.packages("devtools", dependencies=true) warning in install.packages : dependencies ‘rcurl’, ‘whisker’, ‘rstudioapi’, ‘roxygen2’, ‘rversions’, ‘testthat’, ‘biocinstaller’, ‘rcpp’, ‘rmarkdown’, ‘lintr (>= 0.2.1)’ not available installing dependency ‘git2r’ trying url 'https://cran.rstudio.com/bin/windows/contrib/3.2/git2r_0.10.1.zip' content type 'application/zip' length 1554276 bytes (1.5 mb) downloaded 1.5 mb trying url 'https://cran.rstudio.com/bin/windows/contrib/3.2/devtools_1.8.0.zip' content type 'appli

calling matlab from perl using a script -

i know how 1 call matlab perl script? exact, want run *.m file a = zeros(10) from perl. way, using eclipse ide perl. i searched while, not find clear answer. please help! one write here *.m file matlab without using matlab text editor or comment following lines till line eof . start write 'call_mfile.m' lines after print $matlab <<eof; open(my $matlab, '>', 'call_mfile.m'); print $matlab <<eof; close all; clear all; clc; % write here matlab code = zeros(10) %-------------------------------------------------------------------------- eof ########################################################################### # use command when want update toolbox #system('matlab rehash toolboxcache') # use when want use java interface! # notice!! # not open files called in call_mfile.m # file. otherwise use next command! #system('matlab -nojvm -r call_mfile'); system('matlab -r call_mfile');

zend framework2 - elfinder - data is not json -

to application in zend framework 2 added ckeditor , elfinder. when want add image gives me error: invalid backend response. data not json. in console have this: <br /> <b>strict standards</b>: variables should passed reference in <b>***/elfinder/php/elfindervolumedriver.class.php</b> on line <b>645</b><br /> {"cwd":{"mime":"directory","ts":1438003401,"read":1,"write":1,"size":0,"hash":"l1_lw","volumeid":"l1_","name":"files","date":"today 15:23","locked":1,"dirs":1},"options":{"path":"files","url":"\/assets\/dev\/plugins\/elfinder\/php\/..\/files\/","tmburl":"\/assets\/dev\/plugins\/elfinder\/php\/..\/files\/.tmb\/","disabled":[],"separator":"\/","copyoverwr

mysql - PDO table locking on a table not specified? -

words hard today, , i'm trying write can me. overkill exists below, ymmv. i'm migrating 48m records out of table1 table2, both innodb. i'm able identify records culled table1 via user_id ("any record entered user_id=3 moves out of table1 , table2"). i've got first pass @ working code in single instance setup need extend able run migration process via amqp server can run job via multiple consumers (ie i'm running consumers/jobs in parallel in 2 instances of same job @ same time) in round robin setup consumers running @ same time. i'd able scale 10ish consumers knock job out quickly, else 15 days single instance complete job. the code selects oldest 2000 records match query criteria per run. problem if have 2 instances of code running , selecting records instance1 going grab id's 1-2000 , instance2 started @ same time going grab 1-2000 since instance1 hasn't finished moving 0-2000 out of table1 , id's still present in table1.