Posts

Showing posts from March, 2015

ios - Objective-C: Potential leak of an object stored into NSDictionary -

ios - Objective-C: Potential leak of an object stored into NSDictionary - i newbie objective-c. xcode highlights next code issue. _mycookies private variable of class store received cookies. @implementation messagesender { nsarray *_mycookies; } ... // socket open callback - (void) gotdata:(mysocket *) socket { nsdictionary *responseheaders = (__bridge nsdictionary*)cfhttpmessagecopyallheaderfields(socket.httpheaders); _mycookies = [nshttpcookie cookieswithresponseheaderfields:responseheaders forurl:[nsurl urlwithstring:@""]]; } the highlighted issues are: call function 'cfhttpmessagecopyallheaderfields' returns core foundation object +1 retain count object leaked: object allocated , stored 'responseheaders' not referenced later in execution path , has retain count of +1 how resolve one? using arc. want store cookies in class can later utilize them while sending request, want ...

semantics - Vocabulary term to model number of individuals of a class in RDF -

semantics - Vocabulary term to model number of individuals of a class in RDF - i want model dataset in rdf class name subject , number of individuals nowadays in class object. thinking of predicate model info i searched different vocabularies rdfs,skos etc , in http://lov.okfn.org/dataset/lov/ couldn't find apt one. any suggestions regarding vocabulary term model information semantics semantic-web owl rdfs vocabulary

python - an integer is required (got type tuple) Error -

python - an integer is required (got type tuple) Error - i recieving below error in python 3 idea? clientdtsocket.send(bytes(filename,"utf-8"),("localhost",8101)) typeerror: integer required (got type tuple) try calling clientdtsocket.sendto instead of clientdtsocket.send : clientdtsocket.sendto(bytes(filename,"utf-8"),("localhost",8101)) more info these methods: https://docs.python.org/3/library/socket.html python

android - SMS_SEND permission causes compile error and alert antivirus -

android - SMS_SEND permission causes compile error and alert antivirus - basically, searched through net , found big, fat 0 that. my app using sms sending service , need sms_send permission. when add together , run - eclipse says have errors in code , antivirus alert blocked android.trojan.sms_send.nr. don't care latter - because doesn't show without sms_send permission. all found in lint error checking: "looks permissions granted scheme apps permissions protection level signature or signatureorsystem granted scheme apps. if app regular non-system app, never able utilize these permissions." but matters - other app tha utilize permission fine. happened? need service in app. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mypackage.etc" android:versioncode="1" android:versionname="1.0"> <uses-sdk android:minsdkversion="16" android:targetsdkversion="19...

if statement - How I can fix this? I explain in program -

if statement - How I can fix this? I explain in program - // made 3 error in program. , want error show @ end. if there error, programme show error , close console , else, math class programme { static void main(string[] args) { string name; string color; string shipping; string error; int shirtcost; int shippingcost; int quantity; console.writeline("---------------------------------------------"); console.writeline(" welcome conestoga online shirts store"); console.writeline("---------------------------------------------"); console.writeline(" please add together name:" + environment.newline); name = console.readline(); console.writeline(environment.newline + "what colour purchase " + name + "?" + environment.newline); cons...

python - Why is this list comprehension giving me a syntax error? -

python - Why is this list comprehension giving me a syntax error? - this question has reply here: if else in list comprehension 8 answers i have next list comprehension. return [tower tower in state if tower != space else []] but when run it, python spits error: return [tower tower in state if tower != space else []] ^ syntaxerror: invalid syntax if remove else statement, runs fine. writing else statement wrong somehow? list comprehensions back upwards if not else ; if wanted utilize conditional look build iterable, utilize parentheses: return [tower tower in (state if tower != space else [])] but suspect wanted alter value of look in element expression instead: return [tower if tower != space else [] tower in state] or omit else if filtering: return [tower tower i...

Check Javascript Condition Every Frame -

Check Javascript Condition Every Frame - pretty much, question simple, , did search similar question before posting this. know how create javascript code repeatedly execute while page open, rather code running 1 time , beingness done or responding event handlers. pretty much want javascript equivilant of: $(document).ready(function() { }); but not want utilize jquery because less efficient. want check === status every single frame. use setinterval .. within window.onload function window.onload = function() { function test() { alert("test"); } setinterval(test, time_miliseconds); } javascript

java - Comparison Logic Error with Economic data - Comparison method violates its general contract -

java - Comparison Logic Error with Economic data - Comparison method violates its general contract - i know have problem in compareto method, not sure where.. here's info i'm trying sort: i'm looking @ many .txt files (each around 20,000 lines) each line has single point of data. extracting financial year (formatted yyyyqx, x 1-4 financial quarter) , storing string. extracting industry code (six-digit integer) , cost index (stored double). stored in datapoint object. i want output 3 columns, 1 of financial year, 1 of industry code, , 1 of cost index. want info formatted financial years in order (1991q1, 1991q2,..., 1992q1, etc.), industry codes ordered in to the lowest degree greatest value. so, financial year column have many 1991q1 entries each industry code cost index @ quarter. then, when industry codes 1991q1 have been exhausted, industry codes 1991q2 listed, etc. to accomplish this, build datapoint compareto method follows: public int comp...

iphone - iOS - how to receive bug reports via email from a device without mail client set up? -

iphone - iOS - how to receive bug reports via email from a device without mail client set up? - i have app deployed business ipads given customers , typically not have mail service client set up. collect debug info app , have user able send it, can receive via email. how can receive email bug reports app not have native mail service client set up? cannot nowadays mail service composer, because not configured , cannot send mail. one way i'm thinking of create own web service process info packet , email it, other options have? i recommend 2 different services. crashlytics service started using recently. tracks usage in app automatically, , allows view online (monthly users, device, os, etc.). however, useful feature imo sends email if , when app crashes, along crash study , exact line crashed on. sendgrid alternative if you're looking send customized debug data. basically, can send emails in background of app without user knowing. if you're looki...

objective c - Always appending file extensions in NSDocument -

objective c - Always appending file extensions in NSDocument - what best way ensure file saved disk (or icloud) contains default file extension our document format in nsdocument based cocoa app? background: users can load legacy files app still utilize type-creator-codes. with auto-saving enabled in our app need create sure file has file extension added it's written disk (following kind of changes) our cocoa app - or app won't able open (with neither type-creator-code nor file extension). if got right i'd overwrite nsdocumentcontroller's open method - (void)opendocumentwithcontentsofurl:(nsurl *)url display:(bool)displaydocument completionhandler:(void (^)(nsdocument *document, bool documentwasalreadyopen, nserror *error))completionhandler { if(!url.pathextension isequaltostring:@"xyz"...

c++ - Why is generating pdb file causing static linked library to increase largely in size? -

c++ - Why is generating pdb file causing static linked library to increase largely in size? - while building little application (lzo) noticed release build did not produce pdb file. tend generated (but not necessary deploy) pdb files along libs itself. now used /zi switch turn on pdb file , notice 1 oddity. pdb file generated fine ~100kb static linker lib grew 259 kb 622 kb , not understand why. here related thread give-and-take growth of executables not build final executable there no code not beingness optimized away ( /opt:noref switch). i expected pdb file contain addresses of part of code belongs source etc , of course of study expected lib file contain compiled path of pdb location reading bigger lib hex editor revealed big amount of visual studio paths, own include paths, etc beingness compiled it. plus non text binary data. why in lib , not in pdb causing lib grow? c++ visual-c++

umbraco - The current httpContext can only be set once during a request Error -

umbraco - The current httpContext can only be set once during a request Error - i error the current httpcontext can set 1 time during request. 1 time in while on umbraco site (version 6.0.3). not sure how resolve this. i believe fixed in 6.1, if upgrade installation version, should resolve issue you! details can seen on issue tracker umbraco umbraco6

javascript - My kingdom for a selectable textbox -

javascript - My kingdom for a selectable textbox - the challenge: creating cross browser textbox/input field can select contents on click/tap. a problem has eluded many years. the issue: when using touch device tap event fires when mouse uses click event. on apple devices tap event not fire onclick or onfocus . not safari specific bug because google chrome has same issue on apple devices not on android devices. there bug. the standard way select text use: $('input').focus(function () { $(this).select(); }); another selected work around mentioned on stack overflow is: $('input').focus(function () { this.select(); //no jquery wrapper }).mouseup(function (e) { e.preventdefault(); }); both work nicely neither work on apple devices. the working solution have found create selection range per post pure javascript , works great mean rewriting code every input field on site needed 'select effect' due beingness attached unique id. ...

c# - Web API won't return JSON using stored procedure -

c# - Web API won't return JSON using stored procedure - i'm new coding web apis (using vs 2013) , have tried stored procedure homecoming results in json. have found examples using html display, can't send json. i'm working illustration , error i'm seeing "the name 'view' not exist in current context". work though problems pretty using message boards (and sense i'm close) can't seem succeed. info there sproc don't know how homecoming it. first post forgive me if reply turns out obvious. using system; using system.collections.generic; using system.linq; using system.net; using system.net.http; using system.web.http; using tryit.models; namespace tryit.controllers { public class tryitcontroller : apicontroller { tryitentities _db = new tryitentities(); public ienumerable<infomodel> get() { var studentercord = _db.student_sp().tolist(); infomodel objmodel = new...

Injecting a Transactional Grails Service into a Quartz Plugin Job gives BeanCreationExecption -

Injecting a Transactional Grails Service into a Quartz Plugin Job gives BeanCreationExecption - grails version: 2.3.5 quartz plugin version: 1.0.2 i creating internal grails plugin. plugin has dependency on grails quartz plugin. i have grails service: orchestratorjobexecutorservice public class orchestratorjobexecutorservice { def grailsapplication def jobmanagerservice public void execute() { //do bunch of stuff using here //using grailsapplication find bunch of artifacts i've created in plugin //using jobmanagerservice check if trigger exists, re/schedule job needed } } i have quartz job: orchestratorjob public class orchestratorjob { def orchestratorjobexecutorservice static triggers = {cron cronexpression: "0 0 15 * * ? *"} def grouping = "orchestrator" public execute(jobexecutioncontext jobexecutioncontext) throws jobexecutionexception { orchestratorjobexecutorservice.execu...

asp.net mvc - Is it ok to have database context in my domain model -

asp.net mvc - Is it ok to have database context in my domain model - i developing web based application using asp.net mvc. trying have rich domain models rather thin/anemic models. i have modelled solution along lines of onion architecture. different projects below : {}.domain.core - contains domain objects , interfaces idbcontext implemented in infrastructure layer {}.database - database prject {].infrastructure - contains implementation logging, info access etc. {}.web - view , controllers **** info access done using dapper , idbcontext wrapper around 2 simple command, query interfaces. have isolated each of queries separate class. for sake of give-and-take taking little part of application. i have versioned document library contains documents along other metadata tags, permissions etc a simplified model of document object shown below i want operations defined within domain object, since there business logic involved in each of these operations. allow m...

c - I need to produce 144 unique numbers for array subscript with a formula that takes 2 numbers -

c - I need to produce 144 unique numbers for array subscript with a formula that takes 2 numbers - i'm trying find formula function can take 2 numbers, x , y, each go 1-12 (144 combinations) , produce unique result. the thought i'm making array, combotab[144] formula produced x , y produces unique number used array subscript, element hold state yes or no . the sides in x , y appear important, x y combo cannot equal y x combo. here code create combos: int combotab[size_needed]; int create_combos() { int x, y, j, z; y = x = 1; (j = 0; j < 144; j++) (x = 1; x <= 12; x++) (y = 1; y <= 12; y++){ if (combotab[formula in x , y here] == yes){ printf("possible duplicate, find improve formula\n"); homecoming 0; } else combotab[formula in x , y here] = yes; } homecoming 1; } just restate i'm asking, need able go through every combination of x , y , y goes 1...

sas - Data step merge PROC SQL equivalent flagging which table record was found in -

sas - Data step merge PROC SQL equivalent flagging which table record was found in - i merge 2 info sets follows: data ds3; merge ds1(in=in1) ds2(in=in2); mrgvar; if in1; if in2 flag=1; run; if proc sql step instead, how can set "flag" variable above? proc sql; create table ds3 select a.* ,b.* ,??? ds1 left bring together ds2 b on a.mrgvar=b.mrgvar; quit; a mutual way utilize table alias bring together variable. proc sql; create table ds3 select a.* ,b.* ,case when b.mrgvar null 0 else 1 end flag ds1 left bring together ds2 b on a.mrgvar=b.mrgvar; quit; something effect - if b.mrgvar null/missing it's coming table a. (yes, can separately reference 2 though they're same , combined in result table.) sas

Javascript loop through array keys containing comma seperated values -

Javascript loop through array keys containing comma seperated values - i trying figure out best way split object has many key value pairs on 800 points ( x , y coordinates) i split x own array , y separate array can access x lone , y alone. here construction of points , have attempted var path = { 0: [41, -73], 1: [41, -74], 2: [42, -75], 3: [43, -76] }; (var key in path) { console.log("key " + key + " has value " + path[key]); } this log key 0 has value 41,-73 key 1 has value 42,-74 key 2 has value 43,-75 key 3 has value 44,-76 i need first value stored in own array , sec value array. for illustration access of x , y such, var x = [41, 42, 43, 44] var y = [-73,-74,-75,-76] js fiddle here http://jsfiddle.net/b3j4w9bv/14/ thanks! you along these lines: var path = { 0: [41, -73], 1: [41, -74], 2: [42, -75], 3: [43, -76] }; var x_path = []; var y_path = []; for(var key in path) { //co...

.net - Dice Roller for any sided dice in VB.Net -

.net - Dice Roller for any sided dice in VB.Net - i wanting create dice roller user can take number of sides on dice , randomise response, current code chucks out same number of time. sub rolldie(byval sides integer) dim rand single = rnd() cnt integer = 1 sides if rand < cnt / sides diceroll = cnt exit end if next console.writeline("you rolled {0} sided die landed on {1}", sides, diceroll) end sub i think improve putting of die logic class , using system.random class generate random numbers this: public class die private _sides integer private shared _generator new system.random '<<<one prng no matter how many dice public readonly property sides integer homecoming _sides end end property public sub new(sides integer) _sides = sides end sub ''' <summary> ''' returns random number bet...

delphi xe - How to increase Indy idFTP buffer? -

delphi xe - How to increase Indy idFTP buffer? - the onftpwork event fires idftp. if writes disk waste of time. there way increment buffer write disk not 1 time per second? you can set tidftp.iohandler.sendbuffersize , tidftp.iohandler.recvbuffersize properties before performing transfer. copied iohandler used transfer connection. or can utilize tidftp.ondatachannelcreate event set adatachannel.iohandler.sendbuffersize , adatachannel.iohandler.recvbuffersize properties. or can implement tfilestream derived class uses buffered file i/o internally, don't have mess tidftp 's buffers. delphi-xe indy

objective c - How to disable items from NSMenu for certain views? -

objective c - How to disable items from NSMenu for certain views? - i've app 3 views presented in same window. when user enters view 1 want items of main menu enabled, when enters view 2 other items , when come in view 3 want items disabled. how can this? read docs informal protocol nsmenuvalidation : says: this informal protocol allows application update enabled or disabled status of nsmenuitem object. declares 1 method, validatemenuitem : in target object of menuitem have implement: - (bool)validatemenuitem:(nsmenuitem *)menuitem { // item? nslog( @"validate %@", [menuitem title] ); // useful testing // homecoming this: if( [ [menuitem title] isequaltostring:@"show something"] ){ homecoming ! [view3 userishere]; } homecoming yes; } in documentation method find example. objective-c xcode osx

java ee - EJBAccessException within @Schedule method in JBoss 6 -

java ee - EJBAccessException within @Schedule method in JBoss 6 - we filling map using remote method ejb client. application using timer work on info map. when security-domain activated using ldap, client able phone call remote method using ldap authentication javax.ejb.ejbaccessexception: invalid user thrown timer timeout. method annotated @javax.ejb.schedule effort phone call local ejb method, , authentication failed. i have read lots of threads configuration: revelant seems giving security priviliege scheduler in java ee 6, annotation @runas on timer seems have no impact. i have tried different mix between jboss-app/security-domain , @org.jboss.ejb3.annotation.securitydomain annotation without success. does have experience using timer ldap authentication ? this problem occurs when principal not propagate when utilize @runas/@runasprincipal. to resolve issue must alter configuration in $ jboss_home/server/<instance>/deploy/ejb3-interceptors-aop....

javascript - Can I make a browser session publicly accessible? -

javascript - Can I make a browser session publicly accessible? - is possible utilize webrtc water ice or stun server find address browser session, has address can access it? u1's browser logs on example.com u1's browser session pings ice/stun/??? server public address u1's browser session address published example.com u2 gets u1's address example.com u2 accesses u1's browser session either through browser, or curl/etc or set way: run node-like server within browser, , create publicly available? i'm not asking legwork here, want know if it's possible before waste much time. yes, possible, check out +peerserver. uses webrtc's info channels, arguably more elegant approach step #5 in question. javascript node.js browser webrtc tunneling

Chrome extension warning: 'input' is not allowed for specified platform -

Chrome extension warning: 'input' is not allowed for specified platform - i want able read focused text input when hotkey pressed , commit text after replacing characters. here manifest.json: { "manifest_version": 2, "name": "easyfa", "description": "this extension convert mistyped english language sentences keyboard in english language mode or vice versa.", "version": "1.0", "icons": { "48": "48.png" }, "background": { "scripts": ["main.js"], "persistent": false }, "commands": { "convert-text": { "suggested_key": { "default": "ctrl+shift+0", "windows": "ctrl+shift+0" }, "description": "convert text" } }, "permissions": [ "input" ]} and here warn...

Jquery - adding element above form to another div on button click -

Jquery - adding element above form to another div on button click - i trying remove div (.item_desc) above form sidebar when button.additem clicked. of processing of form php/ajax, need visual representation of whats going in cart page wont refreshing. form , divs <div class="item"> <div class="item_desc"> item 1<br> item 1 desc </div> <form method="post"> <button type="submit" name="submit" class="additem">add cart</button> <input type="hidden" name="id" value=""> <input type="hidden" name="name" value=""> <input type="hidden" name="qty" value=""> <input type="hidden" name="desc" value=""> <input type=...

html - Div disappearing under another div -

html - Div disappearing under another div - sorry vague title, have issue i've been unable find prepare to. i'm trying create 2 column website equal length columns. i've been next this tutorial , working 1 part breaks. content of right hand column disappearing under background. apologies beforehand, i'm new this. container below contains entire page; header, nav, content , footer. if need rest of code, allow me know. webpage in operation can viewed here; class="snippet-code-css lang-css prettyprint-override"> #container { float: left; margin-left: 5px; width: 1023px; height: 100%; } #containerleft { float: left; background: #fff; width: 100%; position: relative; overflow: hidden; right: 24%; height: 100%; } #containerright { float: left; background: #e7e1d7; width: 100%; position: relative; overflow: hidden; height: 100%; } #rightcontent { float: left; width: 24%; overflow: ...

ios - Handling UIActionSheet -

ios - Handling UIActionSheet - in application should have mutual uinavigationbar hold 3 uibarbutton items actions. so, instead of writting code in every viewcontrollers, have decided create on baseviewcontroller can subclass application viewcontrollers, baseviewcontroller.h baseviewcontroller.m after, implementing uinavigationbar showing items fine. in 1 of bar button item in basevc nowadays uiactionsheet , when select this, need selected index basevc mainvc. so, have created custom protocol method pass selected action sheet index mainvc basevc. mainvc == firstviewcontroller firstviewcontroller.h firstviewcontroller.m this scenario getting works. but, if add together 1 or more uiactionsheet in firstvc getting called , works fine. but, disables basevc's actionsheet delegate call. means, not allowing phone call delegate on basevc, - (void)actionsheet:(uiactionsheet *)actionsheet clickedbuttonatindex:(nsinteger)buttonindex; above delegate not fired in b...

c# - Keyhandler cannot detect key -

c# - Keyhandler cannot detect key - hello got problem keyhandler. pretty much want function observe if key pressed. public bool keyhandler(keys key) { if(key != null) { if (keyboard.getstate().getpressedkeys() == key) { homecoming true; } else { homecoming false; } } else { homecoming false; } } the problem lies if (keyboard.getstate().getpressedkeys() == key) i don't know how how check if key pressed , how pass key in function. the error get: "operator '==' cannot applied oparands of type microsoft xna.framework.input.keys[] , microsoft.xna.framework.input.keys" using c# , xna i don't why doesn't work.. can 1 help me? keyboardstate.getpressedkeys() returns array of keys( keys[] ). gets pressed keys, handy if have sort of keymanager or textbox or something. what need this(like sebastian l said): keyboardstate ks ...

excel - combobox1.value does not read Numbers -

excel - combobox1.value does not read Numbers - i have script works when info text, not work when number. please help private sub combobox1_change() dim irow long irow = 1 20 if userform1.combobox1.value = thisworkbook.sheets("article").cells(irow, 1).value userform1.label3.caption = thisworkbook.sheets("article").cells(irow, 2).value userform1.label4.caption = thisworkbook.sheets("article").cells(irow, 4).value end if if userform1.combobox1.value = thisworkbook.sheets("crc's").cells(irow, 1).value userform1.label6.caption = thisworkbook.sheets("crc's").cells(irow, 3).value end if next end sub userform1.combobox1.value coming sheet did properties alter in row source. if info on sheet(article) cell a1 text works fine. not work numbers. can please help. using office 2010 @ work. (let me know add together in issue) thank you .caption = directcast(thisworkbook.sheets("article").cells...

performance - Optimize pygtk/gtk TreeView interactive-search in a sorted column? -

performance - Optimize pygtk/gtk TreeView interactive-search in a sorted column? - i have gtk.treeview custom model (inheriting gtk.treemodel) , show ~150k rows. i'm using pygtk, should not matter much. the gui interaction ok, when activating interactive-search, takes forever (~10sec per char). understood searching liststore , tested, interactive-search checks each row of liststore (internally stored linked-list) find value. since searching sorted column, want binary search. how can ? need re-program interactive-search scratch ? can treemodelsort useful ? (i not how internals managed) if roll own search ui, i'm not sure how start. sketch looks : disable built-in interactive search create search ui, , connect right keypress manually binary search in custom representation of info (or in sorted shown rows if random access possible) select right match. for 3. seems gtktreemodel have random access rows: a gtk.treemodel object supports of python mapping pr...

How can I hook into Visual Studio's debugging infrastructure? -

How can I hook into Visual Studio's debugging infrastructure? - on build side, have assembly extends msbuild tasks back upwards compilation , linking external tools (gcc, et al., happens). press f7 , msbuild tasks invoked. now want same thing debugging. ultimately, when press f5, want gcc (local) run , connect gdbserver (on computer) using properties set debugging (the ip or name of remote, etc.) wingdb , visualgdb (or it) know possible have limitations and/or eccentricities create them hard me utilize replacement existing build support. , using them debugging awkward, (extra, redundant properties set, etc.). so, how can invoke programme of selection when press f5? found fairly old article talks setting external programme debugger can't seem create work in vs2010. in vs2010 find configuration properties -> debugging -> debugger launch list doesn't seem extensible. there plugin architecture add together list? update: vspackage may answer. ms...

printing string to HTML page in python -

printing string to HTML page in python - i wrote python code returns stringio consists of several lines extracted runlog. writes string in .txt file , html page. the format of lines in .txt file shows every line of runlog seperately, how want format be. however, in html page, lines merged instead of beingness separate... how can solve problem in html page? this html whitespace / newline formatting question. easiest solution wrap around output <pre> tag, like <pre> line1 line2 line3 ... </pre> alternatively, can wrap each line <p> tag, or add together <br> tag after each line. read more topic here. python html stringio

css - Compass font-face mixin not properly compiling -

css - Compass font-face mixin not properly compiling - i'm using compass , it's built-in @include font-face mixin. however, fonts not loading. think may due series of numbers beingness added end of file path when compiles. compiled css: @font-face { font-family: "helvetical-neue"; src: url('/css/fonts/2c7f11_0_0.eot?1415225657'); src: url('/css/fonts/2c7f11_0_0.eot?&1415225657#iefix') format('embedded-opentype'), url('/css/fonts/2c7f11_0_0.ttf?1415225657') format('truetype'), url('/css/fonts/2c7f11_0_0.woff?1415225657') format('woff'); } @font-face { font-family: "helvetical-neue-condensed"; src: url('/css/fonts/2c7f17_0_0.eot?1415225657'); src: url('/css/fonts/2c7f17_0_0.eot?&1415225657#iefix') format('embedded-opentype'), url('/css/fonts/2c7f17_0_0.ttf?1415225657') format('truetype'), url('/css/fonts/2c7f17_0_0.woff?1415225657') format...

dynamic - How to reduce drawcall for object with animation in Unity3D -

dynamic - How to reduce drawcall for object with animation in Unity3D - i have pretty simple scene,but has 80 character,each of them has animation(the character can play 5 action(run,walk,stand,dance,hit),every character has 300 vertex, , character share same material,no lightmaped object,no multipass shaders),according unity official document,the unity engine dynamic batching these objects,but drawcall 150,is there solution cut down drawcall? currently, mesh renderers , particle systems batched. means skinned meshes, cloth, trail renderers , other types of rendering components not batched , think character got skinned mesh renderer wont batch. animation dynamic unity3d batching

xcode - How to prevent launch screen from loading automatically? -

xcode - How to prevent launch screen from loading automatically? - i wondering if show me how prevent launch screen going next screen automatically, unless give permission clicking button add together launch screen. anyone thoughts? the launch screen non-interactive , disappears app has launched. either have plain black one, , create initial view controller have launch content instead, or duplicate content. note pointless button press initial user action bad user experience , may frowned on review team, though knows nowadays. xcode swift

What are the Lexing Errors in Cucumber? -

What are the Lexing Errors in Cucumber? - i trying run simple feature file getting exception : exception in thread "main" cucumber.runtime.cucumberexception: error parsing feature file. which caused by: gherkin.lexer.lexingerror: lexing error i trying parametrized when statement , got exception: scenario: login gmail given user on gmail login page when user enters <username> , <pwd> , clicks on login button user should redirect home page scenario outline(tried examples didn't worked): |username | pwd | |ravivani10 | abc | the right syntax scenario outline start keyword scenario outline: , list examples examples: keyword. scenario outline: login gmail given user on gmail login page when user enters <username> , <pwd> , clicks on login button user should redirect home page examples: | username | pwd | | ravivani10 | abc | cucumber

c++ - Add multiple values to a vector -

c++ - Add multiple values to a vector - i have vector of ints want add together multiple values too many values add together using lot of push_backs . there method of adding multiple values @ end of vector. along lines of this: std::vector<int> values values += {3, 9, 2, 5, 8, etc}; i found boost has this, not having include boost. #include <boost/assign/std/vector.hpp> using namespace boost::assign; { std::vector<int> myelements; myelements += 1,2,3,4,5; } which seems declared this: template <class v, class a, class v2> inline list_inserter<assign_detail::call_push_back<std::vector<v,a> >, v> operator+=( std::vector<v, a>& c, v2 v ) { homecoming push_back( c )( v ); } is there c++/c++11 way or, if not, how implemented? you can create operator: class="lang-c++ prettyprint-override"> template <class t> std::vector<t>& operator+=(std::vector<t>...

java - Tomcat application deployment using eclipse? -

java - Tomcat application deployment using eclipse? - when tried deploy application on tomcat server using eclipse ide, application not going webapps folder. tried changing vm arguments in run configurations,,but argument values maintain on changing default value/. vm argument valued tried alter -dwtp.deploy..even after changing deplotment path still not going webapps folder. ' please help me in regard thanks , regards, abhi java eclipse tomcat

Excel - Treat Greater Than or Less Than Symbol as part of Text Criteria -

Excel - Treat Greater Than or Less Than Symbol as part of Text Criteria - i have next table info in ms excel: doctor patient age grouping doctor_name 1 > 12 yrs old doctor_name 2 < 06 yrs old doctor_name 3 > 12 yrs old when formula =countif(b2:b4,"> 12 yrs old") executed using data, homecoming 3 when in fact should homecoming 2. i don't know documented, function interpreting > (greater than) character operator , not part of string. try: =countif($b$1:$b$8,"=" &"> 12 yrs old") if operator first character(s) in text string, interpreted operator , not character. excel

php - Better close Pdo connection on no persistent connection? & Pdo Connection Performance -

php - Better close Pdo connection on no persistent connection? & Pdo Connection Performance - i more used mysql_query command pdo ones, i'm going utilize them in new project. i'd know if not persistent connection it's improve close connection or if doesn't create problem leave (like on mysql_query). the sec question is: there difference on performance between finish pdo connector $dbh = new pdo('mysql:host=localhost;dbname=test', $user, $pass); and dbless one? $dbh = new pdo('mysql:host=localhost', $user, $pass); i need web application utilize more 1 db, i'd take set on each query dbname.dbtable , not open 2 or more connection each 1 on different db. there other ways eventually? the connection automatically closed @ end of script (or when $dbh gets unset or falls out of scope). that's same ext/mysql , virtually other database connectors. close connection manually when know you're done free minim...

python subprocess running unoconv throwing CalledProcessError exit code 8 -

python subprocess running unoconv throwing CalledProcessError exit code 8 - i trying run unoconv convert set of documents in folder so: import subprocess try: subprocess.check_call(['unoconv', "/home/foo/ve/pdf/pdf/pdf_media/" + <filename parameter>) except subprocess.calledprocesserror e: print "conversion error: ", e now, run above code within django view - , runs expects time i.e converts document pdf, but, sometimes, above code throws me next exception: command '['unoconv', u'/home/foo/ve/pdf/pdf/pdf_media/wgyozm7.doc']' returned non-zero exit status -8 however, when go folder, see conversion has happened , pdf generated expected. i fail understand exit code means (i searched docs of unoconv couldnt find exit code 8). it looks me subprocess has negative exit-code. not application code, caused os terminating program. negative number signal-number process received. on mac, -8 stands sigfpe. ...

c - How do I turn the Perl stack into an AV? -

c - How do I turn the Perl stack into an AV? - note: question perl internals, c code itself. i want pass contents of perl stack (ie. sp) array perl function. is there existing way re-create stack av? if not, how 1 accomplish it? array can read-only. how 1 turn av reference? found crib looking in pp_anonlist in pp.c dvar; dsp; dmark; const i32 items = sp - mark; sv * const args = mutable_sv(av_make(items, mark+1)); spagain; mxpushs(newrv_noinc(args)); it took me great number of tries before settled on this: #define numargs (sp - (pl_stack_base + topmark)) av * perl_get_args(pthx) { dsp; av * args; args = av_make(numargs, sp - numargs + 1); homecoming args; } this similar pp_anonlist, not quite. dmark expands sv **mark = pl_stack_base + (*pl_markstack_ptr--) . mark used extensively sick defined in documentation. because dmark modifies state of stack, unusable in function should have no side effects. topmark *pl_markstack_pt...

google chrome - Stuck on Meteor example “todos” loading screen when running on an android device -

google chrome - Stuck on Meteor example “todos” loading screen when running on an android device - issue(s) the meteor “todos” illustration stuck on loading screen forever when seek run on android device. can seen in screenshot below, next error message shown: failed load resource: net::err_address_unreachable http://10.0.2.15:3000/sockjs/info?cb=... also app indicates having problem connecting. possible due bug in cordova meteor 1.0 release? or missing of import configuration/setup step? setup / configuration system setup meteor 1.0 ubuntu 14.04 vm virtualbox 4.3.18 motorola droid turbo (android 4.4.4) developer mode , usb debugging enabled chrome 38 run these commands in linux terminal meteor create --example todos cd todos ifconfig <------- gives inet addr:10.0.2.15 meteor run android-device –p 10.0.2.15:3000 open chrome devtools wait until “todos” app launches on android device (it launch doesn’t move past loading screen). then open google chrome , ...

import java.util.Scanner sc error -

import java.util.Scanner sc error - can 1 help me error java code? import java.util.scanner sc = new java.util.scanner(system.in); this gives error import java.util.scanner sc = new ^ what's wrong sc ? remove import in import java.util.scanner sc = new java.util.scanner(system.in); java

Registering a user through Rails API and returning validation errors -

Registering a user through Rails API and returning validation errors - i'm trying build controller action create new user in application. want effort create user , if succeeds, homecoming user model , if fails show validation errors. far i've got , running: # app/controllers/v1/users_controller.rb def create @user = user.create(user_params) end private def user_params params.require(:user).permit(:email, :password) if params[:user] end and i'm using jbuilder in view so: # app/views/v1/users/create.json.jbuilder if @user.errors json.errors @user.errors else json.user @user end this looks it'd work me, when create new user doesn't have validation errors output rather user got created: {"errors":{}} how come it's printing out empty errors when user has no validation errors? in ruby, nil , false evaluate false in if statement. in illustration above, @user.errors activemodel::errors class , hence evaluate...

Mailchimp single user view -

Mailchimp single user view - is possible view of user's activity (opens, clicks etc) via mailchimp api? looking through docs, seems possible @ campaign level, see info across campaigns given user. i think member-activity closed want, not aware of other direct method how this. check api mailchimp api - lists section mailchimp

java - Drawing and storing objects by clicking the mouse button -

java - Drawing and storing objects by clicking the mouse button - i trying draw circle objects each click , store every circle object arraylist, don't know why programme not working! if removed arraylist , line create new circle object, programme work. how create programme store circuit objects arraylist ? import javax.swing.jpanel; import java.awt.color; import java.awt.graphics; import java.awt.event.mouseadapter; import java.awt.event.mouseevent; import java.util.arraylist; import java.util.random; public class circleobj extends jpanel { private int rcolor; private int gcolor; private int bcolor; private int radius; private random rand = new random(); private int xstart; private int ystart; arraylist <circle> xxx ; public circleobj () { xxx = new arraylist<circle>(); addmouselistener(new mouseadapter() { public void mousecl...

Setting custom User Agent in Selenium Webdriver for PhantomJS with Ruby -

Setting custom User Agent in Selenium Webdriver for PhantomJS with Ruby - i've been on net tonight, 3-4 hours now. i've tried every suggestion i've come across. i've checked "capabilities" object on selenium driver object ensure set there, , indeed, is: #<selenium::webdriver::remote::capabilities:0x00000007475cf0 @capabilities= {:browser_name=>"phantomjs", :version=>"1.9.7", :platform=>:"linux-unknown-64bit", :javascript_enabled=>true, :css_selectors_enabled=>true, :takes_screenshot=>true, :native_events=>true, :rotatable=>false, :firefox_profile=>nil, :proxy=>#<selenium::webdriver::proxy:0x00000007475908 @type=:direct>, "drivername"=>"ghostdriver", "driverversion"=>"1.1.0", "handlesalerts"=>false, "databaseenabled"=>false, "locationcontextenabled"=>false, ...