Posts

Showing posts from September, 2010

c# - Set focus inside DataGrid -

this question looks simple, cant find answer that. have datagrid data loaded. need set focus in first row of grid. i call method button onclick event. the mygrid.focus() not focuses rows inside grid. it 1 of hardest job in wpf, , reason because of virtualization , fact ui render thread different thread runs our code (you can not find when ui render finished). complete reference can have here http://social.technet.microsoft.com/wiki/contents/articles/21202.wpf-programmatically-selecting-and-focusing-a-row-or-cell-in-a-datagrid.aspx using dispatcher.invoke might works situations (believe me in wpf dispatcher.invoke best friend , biggest enemy) dggrid.itemssource = new list<object>() { new { = 10, j = 20 }, new { = 10, j = 20 }, new { = 10, j = 20 }, new { = 10, j = 20 }, new { = 10, j = 20 } }; dispatcher.invoke(new action(delegate() { grd.selectedindex = 0; grd.focus(); } ), system.windows.threading.dispatc

r - 'ignoring' missing data in condition for index -

i trying create index increases 1 if condition fulfilled. code seems work if there no missing data. however, if there missing data, index becomes "na". how can avoid (basically ignoring missing data)? i tried na.rm=true/false, far can tell refers functions. assume there rather straight forward solution this? many thanks. here code: iaep$psindex <- 0 iaep$psindex[iaep$lelecsystem==3] <- 1 iaep$psindex <- iaep$psindex + (iaep$govstruct==3) iaep$psindex <- iaep$psindex + (iaep$reservedseat==2) iaep$psindex <- iaep$psindex + (iaep$uppub==1) iaep$psindex <- iaep$psindex + (iaep$bankpol==1) iaep$psindex <- iaep$psindex + (iaep$execveto==1 & iaep$legveto==1) here sample data: iaep <- as.data.frame(structure(list(cowc = structure(c(18l, 18l, 18l, 18l, 18l, 18l, 18l, 18l, 18l, 18l), .label = c("afg", "alb", "alg", "ang", "arg", "arm", "aul", "aus", "

c# - Build number Mismatch - a form of dll hell? -

i've done usual searching etc , can't quite decide on how solve issue. i have internal company windows forms app (.net 3.5 / vs 2010) ship various users. 1 of references in project database driver data.client.dll. data.client.dll in turn references unmanaged dll (data.clientsuppp.dll) needs bundled distributable cannot add reference in project - put in bin dir. this had been fine years until app has released same driver older version of unmanaged dll. older version of unmanaged dll being picked app , presenting error: message: build number mismatch - data.clientsuppp.dll. expecting build number greater or equal '9000'. loaded build number 1022. i not sure how handle this, expected bin dir first location looked @ appears path being scanned first. tips on how solve great! thanks.

view - Disable checkout after "add to source" in clearcase -

i need add source element operations modified or checkout file prevented after element added. possible? how should permissions set achieve this? thanks! :) on file, try , lock (if owner): cleartool lock yourfile@@ (note @@ impact element, not version) see cleartool lock . that works if owner of object (if added yourself). so isn't "permission" issue (as in chmod ); rather lock issue. see more @ section " locks on vob objects " of article " vob , view access control ".

eclipse - C++ getArea() and cout not working -

this code, relatively new c++. other c++ program i've ever written atm app. project, i'm trying find area of box, suggestions n why isn't working? anyways heres code /* * c.cpp * * created on: jan 31, 2014 * author: university of denver. yeah, smoke weed. */ class box { public: // pure virtual function virtual double getvolume() = 0; private: double length; // length of box double breadth; // breadth of box double height; // height of box }; #include <iostream> using namespace std; // base class class shape { public: // pure virtual function providing interface framework. virtual int getarea() = 0; void setwidth(int w) { width = w; } void setheight(int h) { height = h; } protected: int width; int height; }; // derived classes class rectangle: public shape { public: int getarea() { return (width * height); } }; class triangle: public sha

asp.net - Create three columns layout, all dynamic -

i want create dynamic website in asp.net using mvc model visual studio 2013. all columns have dynamic content, each 1 changing it's content on different selections based on user actions or controllers. how can create 3 dynamic columns? i have layout in html , css need separate 3 columns , have possibility change content controllers. later edit: in case have 2 menus in website, 1 left , other 1 right. 3 other 1 top. when select top, menu left must showed depending on top selection. you can populate each column using viewbag or viewdata . in layout, use data pupulate columns, example: 1) calling action change content specify: public actionresult myview() { // can put in viewbag, // string, list of , use in view // dinamyc viewbag.column1 = "my content column 1"; viewbag.column2 = "my content column 2"; viewbag.column3 = new string[] {"product1", "product1", "product1"}; } 2) consume data in la

access vba - What's wrong with my VBA code (I'm getting runtime error 9) -

i've looked around , found "runtime error 9 subscript out of range" error has arrays. however, i'm not sure how interpret answers i've found best suite code. i have simple function wrote pull first , last names out of field, found field had few nulls in , tried compensate changing string variant decleration. i've gotten work without error similar code... not code. my code follows: function flastname(byval lnin variant) variant dim astrfullname() string if isnull(lnin) flastname = null else redim astrfullname(2) 'this new concept me... not sure if need astrfullname = split(lnin, ",") flastname = astrfullname(0) end if end function thanks in advance insights , assistance. edit: found issue array doesn't null value in of name fields... thought following line fix that: if isnull(lnin) flastname = null but apparently wrong. have advice on i've found far? y

Scala def in an object - naming convention upper case camel case? -

given conventions here: http://docs.scala-lang.org/style/naming-conventions.html blockquote constant names should in upper camel case. is, if member final, immutable , belongs package object or object, may considered constant (similar java’s static final members) does mean def should fall in category too? if functionally pure. example parse method: object parser{def parse(string: string): anyref = ??? } no, shouldn't. that explanation simplification of concept of stable value. stable value can trust have same value, , how scala introduces dependent types (aka, in scala, path-dependent types). there number of rules stable value, why simpler explanation resorted in style guide. 1 specific rule has be val -- var , def not acceptable. var not acceptable because value can change @ time, , def not acceptable because may return different values each time called (even if receives no parameters). also related fact can override def val , not vice

jquery ajax php results in unidentified index -

when try use ajax-method via jquery receive "unidentified index" message of targeted php file. the interesting stuff. "debugging" methods console.log() in jquery , firebug network window showing me data sent! seems data doesn't php file. well, when send data usualy way php (post) there no problem. find behaviour (!) strange. i asked developers know couldn't me problem. maybe (or we) overlooking something? the php/html form: <form method="post" action="configurator2.php"> <label>name der navigation</label> <br /> <input type="text" name="menuname" /> <br /> <input class="button" type="button" value="ajax it" /> <input class="button1" type="submit" value="php only" /> </form> <div class="result"></div> <script

c++ - Image thresholding with SSE -

Image
i'm trying code image segmentation code sse optimization. have strange result. this code : void binaire_sse(unsigned int * img, long h,long l, long seuil ,unsigned int * out) { __m128i vthreshold = _mm_set1_epi8(seuil); int i, j; (i = 0; < h; ++i) { const __m128i * p_in = (__m128i *)&img[i * l]; uint16_t * p_out = (uint16_t *)&out[i * l / char_bit]; (j = 0; j < l; j += 16) { __m128i v = _mm_load_si128(p_in); uint16_t b; v = _mm_add_epi8(v, vthreshold); b = _mm_movemask_epi8(v); *p_out = b; p_in++; p_out++; } } }

oop - .NET Best Practice or Framework Example: Function Overload vs. New Method? -

disclaimer: not wish become opinion-based question. looking an example in .net framework library or a .net best practice resolves question. i designing class , typically caller needs send single foo, on occasion caller need send multiple foos @ once: edit: there other parameters foo , foo[]. apologies - trying generic. i have methods (separate methods): int sendfoo(foo foo, int timeout) int sendfoos(foo[] foos, int timeout) but thought perhaps should go way (function overload): int sendfoo(foo foo, int timeout) int sendfoo(foo[] foos, int timeout) i'm leaning quite heavily toward function overload solution believe i've seen before, proof correct decision. i cannot recall of similar example in .net framework libraries or if there existing .net best practice scenario. thank time. edit in response using params : i cannot use params following reasons: sending multiple foo objects requires special processing can not bypass. i using other argumen

treeview - Source Control Explorer in Visual Studio 2013, keep last tree state open -

Image
i of new things in visual studio 2013. stuff annoying, guess try push or pull people toward different practices. but what's weird source control explorer when open vs2013 collapsed. in vs2010 open last state had in. becomes more , more annoying use vs2013. have click through. sure can open recent projects, come on. how can keep tree open :)? on right opens to, in vs2010 tree on left if that's how when closed it. had same problem. found option in tools -> options -> source control -> visual studio team foundation server: open source control explorer recent folder

Displaying an int variable in TextBox/Label in Visual C# -

i creating first c# project, can't find way display integer variable in textbox or label. using visual c# , visual studio 2013. i have been using c++ quite while , intuitively use 'cout', have no idea put fe: textbox4.text = cal (where cal variable). but have no idea put fe: textbox4.text = cal (where cal variable). you should put code inside of method .it can form_load event, or button click, example add button form designer (drag , drop toolbox),double click button , put code inside of button click event: textbox4.text = cal.tostring();

c# - Regex find string variable -

how can find fo32p_dasf[0] = (string)"random string here"; regex.match? have problem using (string) within regex string. because parentheses have special meaning in regex, need escape them backslash. however, backslashes have meaning in c# strings, need escape escape. square brackets have special meaning in regex, need escaping, , quotes need escaping, after that, end this: var pattern = "fo32p_dasf\\[0\\] = \\(string\\)\".*\";";

big o - Which algorithms have time complexity greater than O(n!)? -

i know problems such finding permutations of given set of symbols o(n!) algorithm. curious find instance of algorithm has greater time complexity this. there shall many such problems possible. for example, if there n objects , n destinations , each object can go destination (repetitions allowed), there shall o(n^n) possibilities.

html - Zoom error DOES NOT in occur in Internet Explorer, but DOES occur in every other browser I’ve tested -

while checking on else on college’s website, noticed zooming in , out of our website’s pages makes small gap appear between header , main content on zoom levels. test ie compatibility since that’s majority of our visitors use, , when zoom in , out in ie 9, gap never appears. in current versions of firefox, chrome, safari, , opera, same “moving ” error occurs. it’s not bad bug, doesn’t affect readability of site severely, it’s i’d eliminate if possible. what i’ve tried already: making appears moving, “content”, fixed width giving “content” fixed position giving inside “content”, “canvas”, fixed position changing z-indexes on “content” , “canvas” each not setting position header removing of class “clear” between s “ct100_header” , “content” (it makes error more extreme) the site: www.swic.edu "sw_home.css" /*============================================================*/ /*==================== left column ==========*/ /*================

Django: List of symbols for templates -

not direct coding question, still wasn't able find on own ... , related coding ;) is there list symbols/placeholders available in django template? e.g. {{user}} etc. there list of built-in filters , tags , in addition default template context processors add following: {{ user }} , {{ perms }} django.contrib.auth.context_processors.auth {{ debug }} , {{ sql_queries }} django.core.context_processors.debug {{ languages }} , {{ language_code }} django.core.context_processors.i18n {{ media_url }} django.core.context_processors.media {{ static_url }} django.core.context_processors.static {{ csrf_token }} django.core.context_processors.csrf {{ request }} django.core.context_processors.request {{ messages }} django.contrib.messages.context_processors.messages

getToken google+ login Android GoogleAuthException: Unknown -

this happens when call gettoken(param, param, param, param). i not doing wrong. here code leading , including gettoken: bundle bundle = new bundle(); bundle.putstring(googleauthutil.key_request_actions, "http://schemas.google.com/addactivity http://schemas.google.com/buyactivity"); bundle.putstring(googleauthutil.key_request_visible_activities, "http://schemas.google.com/addactivity http://schemas.google.com/buyactivity"); string clientid = "xxxxxxxxxxxxx.apps.googleusercontent.com"; if(myapplication.production){ clientid = "xxxxxxxxxxxxx.apps.googleusercontent.com"; } else { clientid = "xxxxxxxxxxxxx.apps.googleusercontent.com"; } string scopes = "oauth2:server:client_id:" + clientid + ":api_scope

version control - Does git have any built in repository management strategy? -

i'm trying come version control strategy moving our company’s code , document files centralized scm (perforce) git. content in perforce 1 large depot projects stored, want break multiple smaller git repositories number of reasons. the issue have how can index of these repositories can found. far can tell, git doesn't have built in tools managing multiple repositories. i did find git-submodule , sounds that's making repository content of other repositories, , don't want manage content of various repositories repositories themselves. originally thinking flat file system on our sever: /repos -repo1.git -repo2.git -... -repon.git and git command query directory repository names , comment content (sort of logging server, going /repos directory , running git log ). thinking make /repo git repository (a repository of repositories) , said, seems so... un-git-y. so questions are: am missing built git tools/features made manage multiple reposit

quartz.net - context.Trigger.JobDataMap values via xml configuration -

in quartz_jobs.xml, can set parameters job..... <job> <name>myjob</name> <group>myjob</group> <description>my job</description> <job-type>myassembly.myjob, myassembly</job-type> <durable>true</durable> <recover>false</recover> <job-data-map> <entry> <key>jobmapdatakeyone</key> <value>jobmapdatavalueone</value> </entry> <entry> <key>jobmapdatakeytwo</key> <value>jobmapdatavaluetwo</value> </entry> </job-data-map> </job> and here code: public class myjob: ijob { public virtual void execute(ijobexecutioncontext context) { jobkey key = context.jobdetail.key; jobdatamap jbdatamap = context.jobdetail.jobdatama

jquery - Keep div hidden on click - Cookies -

i have website webpage, , 2 boxes of texts can toggled off clicking "x" @ top of boxes. close boxes. when reload page, come back. wondering if there way make when user clicks them off first time, stay closed, when reloading. wouldn't need view information second time. here website url. can cookies, or there other way? have set 1 small box using same code using. rather use cookies, recommend along these lines localstorage http://caniuse.com/namevalue-storage : $(".closebtn img").click(function(){ localstorage.announced = true; $(this).closest(".announce").fadeout(); }); then on load: $(document).ready(function(){ if(typeof(storage)!=="undefined" && localstorage.announced){ $(".announce").hide(); } });

javascript - Store jQuery object into an Array for later use -

i trying make script creates buttons based on json pass attributes need, this: var opts = {}; opts.buttons = [{ type: "button", klass: "btn-default", text: "no" }, { type: "button", klass: "btn-primary", text: "yes" }]; var arr = []; var button = $("<button></button>"); _.each(opts.buttons, function (v, k) { button.prop("type", v.type) .prop("class", v.klass) .html(v.text); arr.push(button); }); and then, kind of stringify them, so: var str = arr.join(''); $('#someel').html(str); but not working thought would. return [object object] [object object] instead of button tags. how can that? nice. try instead: opts.buttons = [{ type: "button", klass: "btn-default", text: "no" }, { type: "button", klass: "btn-primary", tex

class - What is the best css selector for 'all children'? -

on page - in css have put: *{pointer-events:none;} .pev{pointer-events:auto} this because want strong ui , there draggable things don't want users accidentally selecting things, etc so taking away clicks,hovers etc , putting them on things need touched i have element (classed .play) holds youtube player (given it's parent prev class , jquery draggable). i know proper efficient way bypass .prev , * , add pointer-events auto player , inside via inheritance (i think correct) which of these better syntax? .play*{pointer-events:auto;} .play < *{pointer-events:auto;} update---------------------------- thanks pinal , have been able stabilize pointer-events (if cursor happens interfere video when dragging pointer events of video stop drag event eg mouse moves faster dragged element stall in dragging happen.. result === ui looks broken). so here simple fix (thanks again man)... css: *{outline:none;pointer-events:none;} .pev{pointer-events:auto!important;}

wordpress - Is it possible to send an order to your printer as soon as it's placed in any ecommerce platforms? -

i'm trying make website florist, important have orders being placed on website automatically print out on printer comes in, can deliver order on time day (as wont checking email every minute). how can done? general point in right direction super helpful, i'm not sure google. i know theyre using service right costs them hundreds of dollars month, , i'm looking @ trying cut down bills using free or lot cheaper. thank you! i never did how handle it. hope you the idea install simple bash script on florist local computer. the script should launched @ startup. the script check each x secondes values or files online print what's new.

python - How does PySide/PyQt QMainWindow close a QDockWidget? -

i need know how qdockwidget closed. have serial port/thread attached qdockwidget, , need make sure thread , serial port close properly. class serialdock(qdockwidget): ... def close(self): print("close") self.serialport.close() self.thread.close() def closeevent(self, event): print("closeevent") self.serialport.close() self.thread.close() the close , closeevents not called when click qmainwindow x button. have call close method qmainwindow close? way know solve use qapplication.abouttoquit signal, , don't want have remember set 1 specific widget. how qdockwidget destroyed or closed? you can use destroyed signal in qdockwidget : import pyqt4.qtgui ui import pyqt4.qtcore core app = ui.qapplication([]) mw = ui.qmainwindow() mw.setcentralwidget(ui.qtextedit()) dw = ui.qdockwidget("test",mw) dw.setwidget(ui.qlabel("content")) mw.adddockwidget(core.qt.rightdockwidg

css - Font awesome not loading icons - Rails 4 -

Image
i using twitter bootstrap in app , using ruby gem twitter-bootstrap-rails (2.2.8) . have upgraded rails version rails 4. i using following gems assets gem 'less-rails' gem 'coffee-rails' gem 'twitter-bootstrap-rails' gem 'execjs' gem 'therubyracer', :platforms => :ruby now problem icon of font awesome not loading. should load magnifier glass per html <button type="submit" class="btn"><i class="icon-search"></i></button> here bootstrap_and_overrides.css.less @import "twitter/bootstrap/bootstrap"; @import "twitter/bootstrap/responsive"; // set correct sprite paths @iconspritepath: asset-path("twitter/bootstrap/glyphicons-halflings"); @iconwhitespritepath: asset-path("twitter/bootstrap/glyphicons-halflings-white"); // set font awesome (font awesome default. can disable commenting below lines) // note: if use asset_path() here, compiled

java - How to negate a method reference predicate -

in java 8, can use method reference filter stream, example: stream<string> s = ...; int emptystrings = s.filter(string::isempty).count(); is there way create method reference negation of existing one, i.e. like: int nonemptystrings = s.filter(not(string::isempty)).count(); i create not method below wondering if jdk offered similar. static <t> predicate<t> not(predicate<t> p) { return o -> !p.test(o); } there way compose method reference opposite of current method reference. see @vlasec's answer below shows how explicitly casting method reference predicate , converting using negate function. 1 way among few other not troublesome ways it. the opposite of this: stream<string> s = ...; int emptystrings = s.filter(string::isempty).count(); is this: stream<string> s = ...; int notemptystrings = s.filter(((predicate<string>) string::isempty).negate()).count() or this: stream<string> s = ...; int notem

Vim plugin to toggle Python function/method arguments between single- and multi-line -

i'm looking vim plugin can take single-line statement this: foo = self.some_method(param1="hi", param2="there") and turn this: foo = self.some_method( param1="hi", param2="there" ) big bonus points if can append comma last argument, this: foo = self.some_method( param1="hi", param2="there", ) and i'd able turn multi-line version single line, handling single-to-multi-line scenario alone sufficient me. using j re-join line fast enough of time. i'm not looking solution formats this: foo = self.some_method(param1="hi", param2="there") with plugin: splitjoin.vim . using example can like: foo = self.some_method(param1="hi", param2="there", param3="again") with cursor between parenthesis, invoke using default maping gs : foo = self.some_method(param1="hi", param2="there"

SQL varbinary IP compare -

i have sql table stores ips varbinary(16) . '10.240.200.9' stored 0x0af0c809. i'm writing stored procedure has create dynamic sql due nature of input variables. 1 of input variables ip address. let's take mentioned ip , hex. when run query below, gives me following error the data types varchar , varbinary incompatible in add operator. i understand it's happening due @hex being concatenated nvarchar string. i'm trying make sql work set @sql = 'select * [table] ip = ' + [hexvalue] you can explicitely cast value compatible type such varchar . select cast(cast('test' varbinary(4)) varchar(4)) + 'test' with example: set @sql = 'select * [table] ip = ''' + cast([hexvalue] varchar(16)) + ''''

Low Level File Operations Handling on Linux and Windows c++ -

eventhough there similar questions here or here , have question different case. by using c/c++, want write bytes file. file has data. simply, update content of file : open, write , close. however, if fails during write , if unable handle failure (for example, application crash, interrupt, electricity shutdown etc.), guaranteed in output file between list below? situation can happen, cannot? file may empty (deleted existing values , couldn't write new ones) file stays locked file may contain both old values , new values (i.e. first 5 lines new values, last 5 lines old values) file may contain old value. anything other don't expect? if can give me os independent approaches, glad thanks write new data file same name, 'tmp' extension. flush , close tmp file. delete original file. rename tmp file original file name. on startup, scan folder files. delete tmp files name part matches existing 'source' file, (ie. system interrupted durin

javascript - Check if hasClass and show div -

i have slider , everytime 1 div on focus added class swiper-slide-visible . i'm trying show div depending on item on focus. problem jquery doesnt check when rotate , if use while browser stop work. <div class="swiper-slide pag1"> <h1>a</h1> </div> <div class="swiper-slide pag2"> <h1>b</h1> </div> <div class="swiper-slide pag3"> <h1>c</h1> </div> <div class="conteudo"> <p class="diva">conteudo div a</p> <p class="divb">conteudo div b</p> <p class="divc">conteudo div c</p> </div> if ($(".pag1").hasclass("swiper-slide-visible")) { $(".diva").show(); } if ($(".pag2").hasclass("swiper-slide-visible")) { $(".divb").show(); } if ($(".pag3").hasclass("swiper-slide-visible")) { $(".divc&

javascript - D3.js: Factoring zoom/scale into a multiselect box -

i have graph allows zooming in , out on different nodes. aid in selecting multiple nodes, have integrated drag-selection box shown here: http://bl.ocks.org/lgersman/5370827 . works when user has not zoomed out of graph, once do, becomes skewed. i know need take scale account, not sure factoring in. scale value goes 1 (no zoom) .1 (zoomed way out). below snippet scale adjustment should go. have tried multiplying it, adding both size of box , x/y, have not identified best spot. var d = { x : parseint(s.attr("x"), 10), y : parseint(s.attr("y"), 10), width : parseint(s.attr("width"), 10), height : parseint(s.attr("height"), 10) }, move = { x : p[0] - d.x, y : p[1] - d.y } ; if( move.x < 1 || (move.x*2<d.width)) { //dragging left d.x = p[0]; d.width -= move.x; } else { //dragging right d.width = move.x; } if( move.y < 1 || (move.y*2<d.height)) { //dragging d.y =

html - How to make radio buttons that show and hide inputs work within a jquery cloned div? -

i radio selection work within cloned div. div cloned indefinitely, each clone requires new selection. how radio selection buttons within each div point items within div? as stands now, selection clones when different items selected nothing happens. please let me know if more information needed. html: <form> <div id="clonedform_1" class="clonedform"> <div class="addsomejazz"> <label name="btn1">selection 1 <input type="radio" name="select" class="btn1" value="selection 1" /> </label> <label name="btn2">selection 2 <input type="radio" name="select" class="btn2" value="selection 2" /> </label> <label name="btn3">selection 3 <input type="radio" name="select" class="btn3" value="selection 3"

ios - My app was just rejected for using the Ad support framework. Which library is responsible? -

this update didn't change rejection reason. here response resolution center: reasons program license agreement pla 3.3.12 we found app uses ios advertising identifier not include ad functionality. not comply terms of ios developer program license agreement, required app store review guidelines. specifically, section 3.3.12 of ios developer program license agreement states: "you , applications (and third party whom have contracted serve advertising) may use advertising identifier, , information obtained through use of advertising identifier, purpose of serving advertising. if user resets advertising identifier, agree not combine, correlate, link or otherwise associate, either directly or indirectly, prior advertising identifier , derived information reset advertising identifier." please check code - including third-party libraries - remove instances of: class: asidentifiermanager selector: advertisingidentifier framework: ad

javascript - How can I get my tree data loaded in my ExtJS tree panel? -

i have extjs 4.2 treepanel, when call php code data, data not loaded tree. the data call success, , i'm getting response, tree data not loading tree. function ongetdata(data) { alert('ongetdata'); alert(data); }; ext.onready(function() { ext.create('ext.tree.panel', { title: 'tree refresh example', width: 300, height: 350, listeners: { afterrender: function() { this.store.getdata(ongetdata, this); } }, tbar: ['->', { xtype: 'button', text: 'add banana', value: 1, margin: '0 30 0 0', listeners: { click: function(comp) { senddata(comp.value); } } }, { xtype: 'button', text: 'add cabbage', value: 2, margin: '0 30 0 0'

ocaml - Retrieve a part of parsing by making separate .mly and .mll -

i writing front-end parse set of txt files, each file contains set of procedures , instance 1 txt file looks like: sub procedure1 ... end sub sub procedure2 ... end sub ... syntax.ml contains: type ev = procedure_declaration list type procedure_declaration = { procedure_name : string; procedure_body : procedure_body } type procedure_body = ... ... parser.mly looks like: %start main %type <syntax.ev> main %% main: procedure_declarations eof { list.rev $1 } procedure_declarations: /* empty */ { [] } | procedure_declarations procedure_declaration { $2 :: $1 } procedure_declaration: sub name = procedure_name eos body = procedure_body end sub eos { { procedure_name = name; procedure_body = body } } ... now, retrieve parsing of procedure_declaration (for purpose of exception handling). means, want create parser_pd.mly , lexer_pd.mll , , let parser.mly call parser_pd.main . therefore, parser_pd.mly looks like: %start main %type <syntax.procedure_decl

Upgrade Magento while keeping all order data, sales data, ect -

is there definitive way upgrade magento while keeping order data, sales data, ect? after setting staging environment , ensuring extensions, ect. working there inevitably orders placed, orders processed, ect. there proper way sync data production installation? an alternative way i've read set staging area , practice upgrade while taking notes on fixes need completed. put site maintenance mode , upgrade on in production environment. viable solution? any insight appreciated. dane with magento updates need ensure pointing same database in local.xml file. magento run updates needed on database speed automatically. yay! however. database before update runs. if have issues, want make sure have clean version. the update uses lot of memory if have many items/orders. make sure .htaccess file (which might have been overwritten update) still has amount of memory allocated.

ios - Google Analytics V3.03 not sending back data -

i have run example version supplied google , works , have used make tracking in app (the documentation on site references previous version pretty useless) cannot tracking send. it either says no pending hits or says has sent doesn't appear in analytics , yet google 1 , code identical. in app delegate there nsdictionary *appdefaults = @{kallowtracking: @(yes)}; [[nsuserdefaults standarduserdefaults] registerdefaults:appdefaults]; // user must able opt out of tracking [gai sharedinstance].optout = ![[nsuserdefaults standarduserdefaults] boolforkey:kallowtracking]; // initialize google analytics 120-second dispatch interval. there // tradeoff between battery usage , timely dispatch. [gai sharedinstance].dispatchinterval = 20; [gai sharedinstance].trackuncaughtexceptions = yes; self.tracker = [[gai sharedinstance] trackerwithname:@"my app." trackingid:@"ua-xxxxxxxx-x"]; which identical googles code , in view want