Posts

Should I create an Index for a large insert operation in mysql? -

lets have following table 8 billion columns: subject text, predicate text, object text , want create table count different text values this: create table nodes (id bigint unsigned primary key auto increment, val text, count bigint unsigned); insert nodes(val,count) select subject, count(*) count triples group subject would index on subject predicate , object increase or decrease speed of insertion? a general rule of thumb: indices typically decrease write speeds, while increasing read speeds.

swift - Failable convenience initializer with optional parameters -

i'm looking best way structure class failable convenience initializer optional parameters. current code: class member: nsobject { var uid: string let avatarurl: nsurl let created: nsdate let email: string let name: string let provider: string var posts = [post]() var comments = [comment]() // initialize member raw data init(uid: string, avatarurl: nsurl, created: nsdate, email: string, name: string, provider: string){ self.uid = uid self.avatarurl = avatarurl self.created = created self.email = email self.name = name self.provider = provider super.init() } convenience init?(snapshot: fdatasnapshot){ if let uid = snapshot.key { if let avatarurlstring = snapshot.value["avatarurl"] as? string { if let avatarurl = nsurl(string: avatarurlstring) { if let membercreated = snapshot.value["created"] as? ...

javascript - loasJSONArray is not defined in Processing.Js -

i've made processing program wich work nice. wanted put on website processing.js. i've used code in demo load pde file script(src='/javascripts/lib/processing.min.js') canvas(data-processing-sources="processing/paris_tree_viz.pde") but when launch page, got following error: uncaught referenceerror: loadjsonarray not defined here setup void in processing pde file, wich contain loadjsonarray method: void setup() { size(1000, 1000); background(255, 255, 255, 1); colormode(rgb); data = loadjsonarray("http://opendata.paris.fr/explore/dataset/les-arbres/download/?format=json&timezone=europe/berlin"); trees = filterbyspecie(data); } how can make program work ? googling error got me duplicate: how access json data in processing.js according duplicate, processing.js not have loadjsonarray function. , processing.js reference seems confirm this: http://processingjs.org/reference/ that suggest you're running sket...

How can I remove a single overlay in Openlayers 3.3.0? -

i creating overlays in mapping application need refresh every 5 seconds. having difficulties removing stale overlay map using code below. map.removeoverlay method not seem working correctly. stacking of overlays visibly apparent after few iterations. using map.getoverlays().clear() removes stale overlay, however, removes overlays not desired. assistance appreciated. window.setinterval(function() { $.ajaxsetup({ mimetype: "text/plain" }); $.getjson('json/data.json', function(data) { $.each(data.item, function(key, val) { var storename = this.name; var storelocation = this.location; var storelatitude = this.latitude; var storelongitude = this.longitude; $.each(val.tasks, function(i, j){ var taskname = this.name; var taskstate = this.state; if (taskstate == "open") { var taskgeometry = ol.proj.transform([storelongitude,storelatitude], ...

string - How to add empty space using batch script? -

is there way loop text file add empty space in front of each line? commit.txt commit c9bee merge: 7db author: tom date: fri mar 13 author: tim output.txt commit c9bee merge: 7db author: tom date: fri mar 13 author: tim here's 1 solution: for /f "delims=" %i in (file) @echo %i note must double percents if use in script (as opposed interactive usage).

.net - ClickOnce Install Error: Unable to install this application because an application with the same identity is already installed -

i seeing following error message when trying install application using clickonce. unable install application because application same identity installed. install application, either modify manifest version application or uninstall preexisting application. i error when trying install production version , have qa version installed same version number. use different product name 2 environments, not see why there conflict. now, weird part. if take copy of iis directory hosting application, , run exact same set of mage commands, except time use "qa2" name parameter, can install second copy of application. 1 called qa , other qa2. else them identical, yet, still cannot install production version has different name. need avoid error?

system center - SCOM: How to display custom perf counters from Services -

i have number of windows services written in .net/c# , each of these have custom performance counters added via system.diagnostics.countercreationdata , system.diagnostics.countercreationdatacollection classes. in system center 2012 have dashboard each of these services in want display/graph values custom counters. however, see standard performance counters same services , can not find custom counters anywhere. counters visible via perfmon scom not see them. possible want, , how? thanks have tried starting console via command prompt? use /clearcache when calling exe allow perf data reload.