Posts

Showing posts from January, 2012

c# - Can I instantiate a type as 'dynamic' from another AppDomain? -

i'm trying load type different assembly (not known @ build time) 'dynamic' , execute method on type. goal disconnect 'plugin' parent application such there no requirement shared code or common interface type. interface implied way of expected method signature on loaded type. this works: dynamic myobj = assembly.load("myassembly").createinstance("mytype"); myobj.execute(); however load type current appdomain along dependent assemblies. want modify allow me same thing in separate appdomain. this works doesn't make use of dynamic keyword, need know explicit type instantiating able call execute method: var appdomain = appdomain.createdomain(domainname, evidence, setup); var myobj = appdomain.createinstanceandunwrap(assembly, type); typeof(imyinterface).invokemember("execute", bindingflags.invokemethod, null, myobj); this target case , have been trying working: dynamic myobj = ad.createinstanceandunwrap(assembly, type)...

lotus notes - NullPointerException in Java script library -

i making first step java- trying create simple java script library in domino designer 8.5.2 perform sftp file transfers using jsch 0.1.48. library called lotusscript agent via ls2j. here sftp class script library, based on this answer : import com.jcraft.jsch.*; public class sftp { public string getfile(string host, string user, string pass, string localpath, string remotepath) { jsch jsch = new jsch(); session session = null; try { session = jsch.getsession(user, host, 22); session.setconfig("stricthostkeychecking", "no"); session.setpassword(pass); session.connect(); channel channel = session.openchannel("sftp"); channel.connect(); channelsftp sftpchannel = (channelsftp) channel; sftpchannel.get(remotepath, localpath); sftpchannel.exit(); session.disconnect(); } catch...

Android onResume from Application -

my client wants app show "warning" screen when application starts or when awakens sleep. i've tried creating onresume() event in master activity (which every other activity inherits from), causes endless loop: activity called, onresume() fired warning screen fires, causing calling activity paused user clicks ok accept message, returning user prior screen activity woken up go 1 even if around endless loop, warning screen fire whenever new activity loads. call bad thing. is there way mimic onresume() event @ application level rather @ activity level, can avoid these scenarios still have warning pop on application wake? why not use sharedpreferences. http://android-er.blogspot.com/2011/01/example-of-using-sharedpreferencesedito.html store time popup brought up, , if within 5 mins, or something, don't pop up. this break loop , not annoy user.

ninject - Error when disposing a IActivationBlock and importing IKernel -

the problem started when trying use solution below use ninject 3 mvc 4 rc web api project: http://www.peterprovost.org/blog/2012/06/19/adding-ninject-to-web-api/ this solution uses iactivationblock (created beginblock method ikernel) implement scope of calls. regular ninject project, seems work fine, when project uses extension ninject.extensions.interception.dynamicproxy, following exception occurs when dispose method of activation block called: error loading ninject component iadviceregistry no such component has been registered in kernel's component container. and, in next time when new activationblock created , resolve method called, following exception occurs: error loading ninject component icache no such component has been registered in kernel's component container. it seems problem not directly related mvc update, incompatibility between dynamicproxy , iactivationblock. edit: the source of problem when 1 of types requires ikernel ...

iphone - How to add tokens inline within a UITextView -

i add tokens or buttons inline in uitextview. thinking of trying embed nstokenfields inside uitextview? don't know if optimal way go it. appreciation sort of direction on how accomplish this. lot. nstokenfield doesn't exist on ios. take @ https://github.com/jasarien/jstokenfield -- it's not perfect, it's fair simulation.

Am I dreaming or do carriage returns prevent PHP versions from seeing a code line? -

i discovered code lines "cr" instead of "crlf" or "lf" @ end of line causing php behave weirdly, namely seeing 2 lines one, ignoring cr or, more accurately, interpreting is: carriage return not linefeed. i had never had problem before but, lately, discovered notepad++ put cr when hit "enter" move new line... causes script behave badly. for example, hello world script works fine when lines eneded lf or crlf crashes crs (at least replicate problem on both peer1 , hostgator servers -- else have different experience?)... <?php header( "http/1.1 301 moved permanently" ); header( "location: http://www.cnn.com/" ); ?> and error: fatal error: call undefined function phpheader() in /home/bernatch/public_html/test-redir-cr.php on line 1 obviously, php seeing <?php code , header function being on same line... my question is: a) there way force php interpret single cr different line or b) there way force no...

ios - How to create an ipa and run application in iPhone -

i have new macbook air. have created 1 test application. want create ipa file application. archive button in product menu not enable. how create ipa this? , thing want run application in iphone instead of simulator. how can so?? please help. thanks in advance. to make .ipa file read creating .ipa file . you need have apple's developer account, cost 99$. able make certificates , use them check app on mobile. how make certificates, read here this alot ....

Cross Domain Writing to a JSON File via Ajax/JSONP calling an external PHP file -

updated , solved thanks @christofer eliasson hint. adding: header("access-control-allow-origin: *"); to php file solved issue. perhaps not beautiful way of dealing problem works. to make bit better/safer: $http_origin = $_server['http_origin']; if ($http_origin == "http://domain1.com") { header('access-control-allow-origin: *'); } here cross-domain related question. i have simple html form on domain1.com user can add his/her email mailing list, here simple json file, "mails.json", hosted on second domain (domain2.com). when user submits his/her email, js script called aim check email , send data of form (here user's email) mails.json file hosted on domain2.com via ajax , jsonp. ajax calls php script hosted on domain2.com should user's email , write mails.json. moreover, should send domain1.com messages regarding success or errors, given user has entered email before. currently, email sent , saved ma...

'this' object in jQuery -

can let me know difference between this , jquery(this) ? found code works if use ' this ' , if use jquery(this) not work. jquery(this ) not query current object , return it? i want know index of image being clicked ( have index() method, still want through below logic) here full code:(edited per request) for(i=0;i<5;i++) { jquery("#div1").append("<img src='slider.jpg'>"); } imgarr=jquery("#div1>img"); jquery("#div1>img").click(display); function display() { for(i=0;i<imgarr.length;i++) { if(this==imgarr[i]) { alert(i); } } } here if replace this jquery(this) not work. i suppose "this" reference dom element in first example? jquery(this) jquery wrapper around 1 or more dom elements. when compare dom element, never equal. if want dom element jquery wrapper, use indexer first element: jquery(this)[0] ===

serverside javascript - server side Mongodb GridFS file copying -

per business requirements need provide possibility copy content of file on gridfs. of course can done on domain-specific layer. in case can see overhead: take stream mongo-server allocate memory on business-layer read place mongo-server obvious solution write mongo-side javascript perform copying in bound of single server. questions: where description of api manage gridfs on javascript? is there issues if gridfs sharded? is there issues if gridfs replicated? thank in advance you never need copy gridfs file within single server, because gridfs files immutable: can create, read, or delete them, not modify them. there's no reason make copy. copying 1 server should done via driver; there's no built-in support copying directly mongodb server another.

c++ - Conversion of IPv6 to IPv4 gives 0.0.0.1 only -

i writing java interposer (using ld_preload method) modifies recipient information in network communication system calls (connect/sendto). whenever java tries connect socket, modify intended recipient ip , port. java uses ipv4-mapped-ipv6 addresses. so, need extract ipv4 part of it. achieve using method prescribed nicolas bachschmidt @ link . the problem facing every ipv4-mapped-ipv6 address, result string (ipv4 part) obtain 0.0.0.1 . instead should 10.0.0.1 (for ::ffff:10.0.0.1 ). have tried different ip addresses. result same. two things mention think may related: when tested same program month ago on local network (that has 192.168.1.xxx ip addresses), program worked correctly. point being (i don't think) there problem code. verify this, asked question on stackoverflow convert ipv4-mapped-ipv6 addresses ipv4, link of mentioned earlier). i trying test program on university network (that has 10.xxx.xxx.xxx ip addresses) , virtualbox (nat mode gives 10.xxx.xxx.xxx ...

javascript - How to remove AJAX from jQuery validation plugin function -

this going stupid question have spent inordinate amount of time trying remove ajax part jquery validation plugin function below still have validation work. suffice haven't succeeded. $(document).ready(function(){ $("#myform").validate({ debug: false, rules: { group: {required: true}, }, messages: { group: {required: " choose group."}, }, submithandler: function(form) { $('#results').html('loading...'); $.post('', $("#myform").serialize(), function(data) { $('#results').html(data); }); } }); }); so yeah, i'm dumb. can me out? when send object back, send json object. here's example we're going use serialized elements, conditionalize data, , send our new page. <?php $name = $_post['name']; $email = $_post['email']; $phone = $_post['phone']; if(isset($name) && isset($em...

ASP.net MVC Logging Page Views -

is there easy way log every page hit user. thinking sit within global.asax.cs file, can write db table url of page being hit. i've found way complete problem seems fit purpose. i use postauthenticaterequesthandler method, called every page hit. ignore empty path , "/" these not actual pages hit. //in global.asax.cs file private void postauthenticaterequesthandler(object sender, eventargs e) { ///.../// string extension = this.context.request.currentexecutionfilepathextension; string path = this.context.request.currentexecutionfilepath; if (extension == string.empty && path != "/") { pagevisitedlogmodel pagevisitedlogmodel = new pagevisitedlogmodel { datevisited = datetime.now, ipaddress = this.context.request.userhostaddress, pageurl = this.context.request.rawurl, username = this.context.user.identity.name }; //then writes log datahelper.updatepagevisitedlog(pagevisitedlogmodel)...

how to define-fun in z3 fixedpoint by using C# API -

i want define functions can used in fixedpoint rule. example: (declare-var int1 int) (declare-var int2 int) (declare-rel phi( int int)) (define-fun init((a int)(b int)) bool (and (= 0) (= b 0) ) ) (rule ( => (init int1 int2) (phi int1 int2)) ) (query (and (phi int1 int2) (= int1 0))) it said there no api "define-fun", should translated quantifier in api. try use c# api implement it. however, wrong answer. ( result should satisfiable, however, unsatisfiable) code: using (context ctx = new context()) { var s = ctx.mkfixedpoint(); solver slover = ctx.mksolver(); intsort b = ctx.intsort; realsort r = ctx.realsort; boolsort t = ctx.boolsort; intexpr int1 = (intexpr) ctx.mkbound(0, b); intexpr int2 = (intexpr) ctx.mkbound(1, b); funcdecl phi = ctx.mkfuncdecl("phi", new sort[] {b, b }, t); funcdecl init = ctx.mkfuncdecl("init", new sort[] {b, b}, t); s.registerrelation(phi)...

web services - php webservice print value -

i have webservice snippet , want print actual value returned. $client = new soapclient("http://www.webservicex.net/currencyconvertor.asmx?wsdl");// gets webservice $converte = $client->conversionrate (array("fromcurrency"=>"usd","tocurrency"=>"ils")); //calls converter now want value (when in webservice itself, xml , value of 3.94 ~, when try lets print_r($converte) get stdclass object ( [conversionrateresult] => 3.94 ) the print_r printing out properties of object being returned web service. looks like, there 1 property in response, conversionrateresult a stdclass object properties can accessed object operator -> echo $converte->conversionrateresult;

visual studio 2010 - How to include wildcard match in the replace portion of a find / replace operation? -

i'm using find , replace dialog in visual studio 2010. don't have problem getting results match find criteria. problem is, result after find / replace operation concludes * in string. visual studio treating asterisk literal character , places * in result. not need , not useful. i'm using find criteria: @html.textboxfor(*) i'm using replace criteria: @html.textboxfor(*, new { @class = "classname" }) if starting string, @html.textboxfor( x => x.price) i want result @html.textboxfor( x => x.price, new { @class = "classname" }) not this @html.textboxfor(*, new { @class = "classname" }) how perform find wildcard (*) not replace match literal * ? select "use regular expressions". find \@html\.textboxfor\({.*}\) replace @html.textboxfor(\1, new { @class = "classname" })

google app engine - Compatibility of ndb models with WTForms -

tech stack: ndb models , wtforms , webapp2 experimenting wtforms extension appengine db models. i had simple db schema: class autho(ndb.models): name = db.stringproperty() class notes(ndb.model): title = db.stringproperty() author = db.keyproperty() and simple form definition form wtforms, in handlers per documentation: from wtforms.ext.appengine.db import model_form def get(self, slug): form = model_form(author)() self.render_template('form.html', {'form': form}) this raises attribute error line 411 here props = model.properties() please let me know, if can fixed. i've never used wtforms, seems incompatible ndb -- "model.properties()" old db idiom. maybe wtforms author consider adding support nbd?

matlab - Error in Ordinary Differential Equation representation -

update trying find lyapunov exponents given in link le . trying figure out , understand taking following eqs case. these set of ordinary differential equations (these testing how work cos , sin ode) f(1)=alpha*(y-x); f(2)=x*(r-z)-y; f(3) = 10*cos(x); and x=x(1); y=x(2); cos(y)=x(3); f1 means dx/dt ;f2 dy/dt , f3 in case -10sinx . however,when expressing x=x(1);y=x(2);i unsure how express cos.this trial example doing know how work equations have cos,sin etc terms function of variable. when using ode45 solve these eqs [t,res]=sol(3,@test_eq,@ode45,0,0.01,20,[7 2 100 ],10); it throws following error ??? attempted access (2); index must positive integer or logical. error in ==> eq @ 19 x=x(1); y=x(2); cos(x)=x(3); is representation x=x(1); y=x(2); cos(y)=x(3); alright? how resolve error? thank you no representation wrong. can't possibly set values in way! start, trying assign value x(3) function . first not sure understand difference between ...

xml - How do I package my joomla 2.5 component with a plugin? -

Image
i'm still learning joomla , wondering how install plugin component in pkg_youcomponent.xml installation file . i've noticed joomla or higher possible use folder="packages" attribute on files . i'm trying package rocket theme rokbox plugin component. i'm not having luck. here zip preview of pkg_autobase . zip preview of pkg_autobase http://iforce.co.nz/i/df43tkzb.2ib.png and here package script based off this . <?xml version="1.0" encoding="utf-8" ?> <extension type="package" version="1.6"> <name>autobase</name> <author>michael jones</author> <creationdate>may 2012</creationdate> <packagename>autobase</packagename> <version>1.0.0</version> <url>http://www.triotech.co.nz/</url> <packager>michael jones</packager> <packagerurl>http://www.triotech.co.nz/</packagerurl> <description>package installe...

NSString containing sql query in objective-c -

i have sql query looks - nsstring *createsql = @"select ingredients, recipe drinktable title '%_drinkname%'"; also _drinkname variable. correct syntax of writing in objective-c ? assuming _drinkname nsstring, try: nsstring *createsql = [nsstring stringwithformat:@"select ingredients, recipe drinktable title '%%%@%%'", _drinkname]; (note each of %'s needs doubled. , %@ string format parameter.)

c++ - Game Engine Runtime Decompression -

i have been trying find out how game engines deal asset compression. compress assets when building game. how decompress them during runtime. thing think of decompressing memory, must memory intensive. if decompressed onto hdd folder filling while game playing? doesn't sound efficient. using library zlib (or other) c++, how runtime decompression done? david it's kinda this, have game data won't fit in reasonable amount of memory, can't load of them @ once in memory, define buffers data use caches. now memory in order of speed lowest highest such: dvd hard drive ram ideally won't have stream data dvd, it's take account if have make console game instance. each of these available storage spaces define buffer used cache. when game engine decides might need asset, should first in fastest cache see if asset loaded. if you're in luck, can send drawn. if it's not in fastest cache, have go down level hard drive cache. file keep assets...

Using Backbone.js for a static-content, JavaScript-heavy site? -

i'm building site client comprised of static content, meaning it's not web app in sense won't involve user interaction , manipulation of data on site itself. with being said, ui quite complex , end being javascript-heavy, wanted utilize js framework. i've done bunch of research , found plenty of examples of backbone.js being used highly-interactive web apps, extensive ui, wondering if choice situation well. appears still be, given ui requirements, i'm wondering i'd other people have had success using in instances similar mine. and if isn't fit, there other recommendations? i have written 1 page web app no server side functionality using great backbone boilerplate . regardless of having explicit models server manage sync, can still apply methodology ui. example app have been working on had complex functionality/interactions images. extremely useful model images (with meta data such dimensions, captions etc etc) backbone, save them in coll...

C: region-based memory management -

i'm looking detailed description of memory management mechanisms c applications, region-based memory management. can't find in-depth articles/books/tutorials :( could please point me right direction? good reference original doom source code (zone memory allocator, see here http://doom.wikia.com/wiki/zone_memory ) further development quake1 source code (hunk/zone malloc). not tutorial, nice implementation.

How to git revert a commit using a SHA -

how can revert commit given sha? want remove changes given sha? want keep commits made before & after give sha. want remove changes of specified sha. i have read revert commit sha hash in git? , understanding reset commits made after sha want revert. not way want. you can use git revert <commit hash> try revert changes made commit. not remove commit history, make changes undo new commit. in other words have first commit still in history, , additional commit on head of branch effective inverse of original commit. if have not yet shared changes else, possible remove original offending commit history altogether using git rebase . there details in this post .

serialization - What is better approach for saving configuration data in php? -

i interested little bit fin drupal , saw saves many configuration options db blob (i think serialized php variables array). why drupal don't use saving conf. options php file , simple include it? what think better approach saving conf. data: db or file , simple include? maybe filesystem faster socket , db? storing configuration information in central location database allows load balancing on front end. if using conf files , had 2 load balanced web servers, need make sure conf files on each server stay in sync. database easy way centralize configuration, , replicate if needed.

simperium - SPManagedObject creating "duplicate symbol" error -

simperium giving me following error: ld: duplicate symbol [redacted]/simperium.framework/simperium(spmanagedobject.o) , [other-redacted]/build/intermediates/myapp.build/debug-iphonesimulator/myapp.build/objects-normal/i386/spmanagedobject.o any idea causes duplicate symbol bug? (i put redacted in there it's not specific app) you'll see error if accidentally auto-generate .h , .m files spmanagedobject entity in model editor. should auto-generate files own entities, since simperium.framework provides spmanagedobject class you.

javascript - Uploadify v3.1 passing POST Data -

iam getting crazy jquery uploadify v3.1. // setup fileuploader $("#file_upload").uploadify({ 'swf': 'flash/uploadify.swf', 'uploader' : 'upload/do-upload', 'debug' : false, 'buttontext': 'files auswählen', 'multi': true, 'method': 'post', 'auto': false, 'width': 250, 'queuesizelimit' : 10, 'filesizelimit' : '100mb', 'cancelimg': 'img/uploadify-cancel.png', 'removecompleted' : true, 'onuploadsuccess' : function(file, data, response) { $('#message').append(data); }, 'onuploaderror' : function() { $('#message').html('<h2>fehler beim upload</h2>'); } }); to start download onclick // handle event stuff $("#event_start_upload").on({ click: function(){ var key = $('#key')....

javascript - Smooth content loading, how to do it? -

i'm unsure how refer (so can't search myself), how 1 achieve smooth page loading (similar content prefetching) when click on code page link in github or when click on element of google plus sidebar? i mean: think it's javascript , ajax can't figure out, page loads smoothly without "refreshing" feeling, , it's surely not flash. i'm sorry if i'm being unclear, i'll try explain better if doesn't work simple actually. make ajax request , show loader. put response in hidden element , fade in using jquery. $("#id").fadein(); it feel smooth!!

android - Is using LocalBroadcastManager the most appropriate way to send app-wide events? -

i'm wondering if localbroadcastmanager better method calls objects subscribed event publisher, , if overhead (if any) worth it. i'm working on chat app, , sample process includes passing newly-received raw message sqlite database archive, alerting activity database has been updated can new collection of messages. right now, happens once messagereceiver gets new message, has databaseinterface add message database, alerts activity via method call. far know, couples messagereceiver , activity , and, if recall correctly, that's bad. liked idea of using guava eventbus , currently, recent android api 8-compatible release (11.2) has beta version. thought of implementing own using handlers , remembered broadcastreceiver , stuff. yes, think use case localbroadcastmanager , use in case.

ios - responder chain goes subview to superview, what about scrollview? -

from apple doc subview(near screen) gets handle touch event first superviews. on other hand, views added scroll view subview scroll view handles touch detect swipes first. can treat scrollview case special case? don't forget part: if hit-test view cannot handle event, event travels responder chain described in “responder objects , responder chain” until system finds view can handle it. if sub-view can't handle it, passed uiscrollview .

How to read complex JSON object from jQuery in Servlet request.getParameter -

i creating , sending json object jquery, cannot figure out how parse in ajax servlet using org.json.simple library. my jquery code follows : var jsonrooms = {"rooms":[]}; $('div#rooms span.group-item').each(function(index) { var $substr = $(this).text().split('('); var $name = $substr[0]; var $capacity = $substr[1].split(')')[0]; jsonrooms.rooms.push({"name":$name,"capacity":$capacity}); }); $.ajax({ type: "post", url: "parsesecondwizardasync", data: jsonrooms, success: function() { alert("entered success function"); window.location = "ctt-wizard-3.jsp"; } }); in servlet, when use request.getparameternames() , print out console parameter names rooms[0][key] etcetera, cannot parse json array r...

java - Wrapping ExecutorService to provide custom execution -

i want write reusable piece of code allow waiting conditions while submitting tasks executor service. there alot of implementaions neat ways of blocking if many tasks queue, e.g. here i need executor evaluates waiting threads, every time on task finished. deciding if task allowed submitted atm, current state of active tasks must considered. came following solution, doesn't have scale multiple submitters or high grade of simultaneous executed tasks. question: following code safe use, or there flaw i'm missing? person implementing aquireaccess method of conditionevaluator<t> must ensure way state of threads in queried thread safe, implementer needn't safeguard iteration on activetasks collection. here code: public class blockingexecutor<t extends runnable> { private final executor executor; private final conditionevaluator<t> evaluator; final reentrantlock lock = new reentrantlock(); final condition condition = this.lock.newc...

Conceptual confusion about parsing of HTML by browsers and HTML's form (syntactical) -

someone trying harass , demean me today challenging knowledge of html in general never claimed have have begun learning it. asked me following 2 questions: question 1. if create html page string in without writing html markups in (no body, no html, no doctype), why browser still render , display string if it's paragraph? to this, used best guess browser still manages display paragraph because that's best guess , makes missing tags assuming that's author had wanted , "put" tags if never manually wrote it. question 2. in above example, if write several strings in different lines in html's source code, browser still displays them single line of text. again, used best guess , concluded html free form language , won't care how many spaces or indentations there in source code. however, didn't seem pleased. answers wrong? if yes, wrong or partially , correct answers these questions? thanks reading , being patient description. quest...

php - html5 file uploader/ move_uploaded_file issue -

i found plugin html5 file uploader liked (resumable) , have working except on server (php) end when file saved hard disk. maybe can have , give me suggestions? because keep getting log error message, suspect have problem @move_uploaded_file , permissions? alternatively, if let me know php errors, useful too. i'm beginner. $temp_dir = '/public_html/uploads/'.$_post['resumableidentifier']; $dest_file = '/public_html/uploads/'.$_post['resumablefilename'].'.part'.$_post['res umablechunknumber' // create temporary directory @mkdir($dir, 0777, true); // move temporary file if (!@move_uploaded_file($file['tmp_name'], $dest_file)) { _log('error saving (move_uploaded_file)'; why suppress error messages @mkdir & @move_uploaded_file? remove @'s, write ini_set('display_errors', 1); error_reporting(e_all); @ begin of script if don't see php-errors , messages appear. also che...

javascript - Payments dialog USD vs Credits -

following newly released api pass dev_purchase_params: {'oscif': true} along other normal params fb.ui payments dialog results in inconsistent behaviour. wondering if doing wrong. if have enough credits balance pay item, payments dialog show item price in credits (ie. purchase xyz - price:10 credits). if don't have enough credits, shows in usd (or whatever currency user has set default). example, if item costs 10 dollars (100 credits) , have 50 credits balance, show "purchase xyz - price:$10 usd" along payment options , such. is there way show usd(or local currency)? otherwise, our in game storefront little inconsistent payment dialog. if price local currency prices payment dialog pops asking credits, confuse end user.

javascript - Not Using an Anonymous Function w/ Jquery Events -

in program, have click event same thing many buttons, except class in small part of event handler function different each one. right now, i'm using anonymous function this. function attached event pretty long, , anticipate there being many buttons ( maybe 60 or so? ). copy , paste working function have 60 times, make javascript file huge. what do, define event handler function outside of on() function, can $('#some_button').on('click', my_event_handler("my_arg") ); simplify code. i made js fiddle kind of gives small example of i'm trying do: http://jsfiddle.net/asmmf/ the problem, can't work! i'm going go see ted, , try out solutions problem when back. thanks can provide me! $('#some_button').on('click', my_event_handler("my_arg") ) should be: $('#some_button').on('click', null, "my_arg", my_event_handler); live demo

c++ - error c2056: undeclared identifier -

so isn't real error, have no idea actual error because symptom vague. i'll include files here , guys tell me , think might causing undeclared identifier error. system.h(66): error c2065: 'entitymanager' : undeclared identifier system.h /******************************************************************************* filename: system.h author: date: november 13, 2010 ********************************************************************************/ #ifndef system_h #define system_h #include <string> #include <memory> //the interfaces framework elements. #include "i_os.h" #include "i_graphics.h" //the derived interface elements tailored platform. #include "windows_module.h" #include "d3d11_module.h" #include "entitymanager.h" // ** author note ** temporary until ini file reading implemented #define full_screen false /****************************************************************************...

flash builder - Flex mobile SWFLoader not loading -

i'm trying load swf file flex mobile application swfloader whenever run app thing appears little square file icon. i've tried 2 swf files, both built in flash cs professionall 1 in as2 , 1 in as3 , same problem. i've tried setting autoload true , doesnt help. complete event never runs, i'm assuming result of issue. here how tried make swfloaders both cases of swf load. <s:swfloader id="myswfloader" bottom="10" left="10" source="/_flash/fftalksimpleswf.swf" complete="setswfmc()" /> <s:swfloader id="loader" width="75%" height="75%" source="/module tester/itpm2/common/shell1/controller.swf" autoload="true" creationcomplete="done()"/> i've tried embeding source , works second swf, don't want source embeded because swf needs communicate other files because controller file of application trying load. ...

python - Using setCursorPosition in PYQT -

i have hidden qwidget, contains qlineedit upon showing hidden qwidget, want cursor on qlineedit. implementation? this class shown when button clicked in earlier class class showinfo(qtgui.qwidget): def __init__(self, parent=none): super(showinfo, self).__init__(parent) showname = qtgui.qlabel("name of show:") self.shownameedit = qtgui.qlineedit() self.shownameedit.setcursorposition(0) #this should work self.mainlayout = qtgui.qgridlayout() self.mainlayout.addwidget(self.shownameedit) self.setlayout(self.mainlayout) try calling self.shownameedit.setfocus()

In JavaScript what is the right way to kill a DOM element? -

i know can set it's style "display: none" however, hides it. i want kill dom element , of it's children. the context i'm building desktop-like gui system (for learning purposes) inside of dom, , when "window" closed, want div , it's children removed. thus, in javascript, how tell gc "hey, rid of dom element, it's no longer needed"? thanks! what removechild ? see http://dustindiaz.com/add-and-remove-html-elements-dynamically-with-javascript/ more information

css - Does the Twitter widget inject some weird code in that affects everything in the DOM? Notably :hover in iOS -

i have come across weird css quirk goes far beyond understanding , appreciate help: i trying build fancy pure css dropdown solution using clickable event method ryan collins proposed: http://www.ryancollins.me/?p=1041 with :active , :hover , nested divs may make trigger spans (or divs or whatever) cause sister element in same container appear upon mouse click. example on ryans page worked on ipad assumed ios smart enough handle touch event triggering :active state - , if trigger contains hyperlink works, there no way deactivate active state of hyperlink, safe clicking on hyperlink. this sucks, because plan have elegant navigation (and other stuff) pop , hide view css foiled, menu never collapses - why example on ryan's page work? did testing , narrowed key element down twitter widget has embedded on page. javascript styles embedded tweet , in doing so, affects :active , : hover solution of sudden works via touch on ios, without hyperlinks. can tell me causes behavior , ...

c# - log4net BufferingForwardingAppender performance issue -

edit 2 : have solved problem (see answer below) please note problem potentially affects appenders decorated bufferingforwardingappender appenders inheriting bufferingappenderskeleton (respectively : adonetappender, remotingappender, smtpappender , smtppickupdirappender) * i doing basic benchs of log4net , tried decorate rollingfileappender bufferingforwardingappender. i experience terrible performance going through bufferingforwardingappender instead of directly through rollingfileappender , don't reason. here configuration: <appender name="rollinglogfileappender" type="log4net.appender.rollingfileappender"> <file value="c:\" /> <appendtofile value="false" /> <rollingstyle value="composite" /> <datepattern value="'.'mmdd-hh'.log'" /> <maxsizerollbackups value="168" /> <staticlogfilename value="false" /> <layout type=...

robotframework - How to connect to mysql using ride -

using ride,i want connect mysql database. i have downloaded database library , mysql db .i need execute queries mysql validating.how connect mysql using ride. here simplified rf test setup using mysql database on localhost: *** settings *** library databaselibrary library pymysql suite setup connect database @{database} *** variables *** @{database} pymysql dbname user password localhost 3306

How to review those emails we are in TO address bar in outlook software -

i receiving tons of email everyday, want know there way filter emails in address bar? not in cc address bar? can write code in outlook it? there answer question dont know why deleted. btw, doing need create rule. simple go rule in menu , chose : move message folder can specify if name in move mail somewhere else.

UITableView issue (iOS) -

i wonder why cellforrowatindexpath function called when scrolling uitableview. mean on every scrolling cell configuration code runs again? have slowness problem when scrolling table. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"countrycell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier] autorelease]; } // configure cell... nsstring *continent = [self tableview:tableview titleforheaderinsection:indexpath.section]; nsstring *country = [[self.countries valueforkey:continent] objectatindex:indexpath.row]; cell.textlabel.text = country; cell.accessorytype = uitableviewcellaccessorydisclosureindicator; return cell; } as others have said, yes, when each new cell scroll onto screen, cellforrowatin...

DB2 LoginUser creation trough query -

can tell me query create login user in db2_9.5, want create it firing query command editor? db2 uses operating system users (or ldap, etc) login. here quote information center : authentication of user completed using security facility outside of db2® database system. security facility can part of operating system or separate product. in db2, database not handle user accounts (i.e., there's no equivalent sql server's "sql server authentication mode" ).

jsf - How do I pass a parameter to Primefaces menuitem that shows a dialog? -

i have p:menubutton contains several p:menuitems. each of these items has calls method parameter on session scoped backing bean , open modal dialog depends on backing bean. p:menuitem looks this: <p:menuitem value="..." oncomplete="dialog.show()" update=":dialog" actionlistener="#{mycontroller.createnewitem}"> </p:menuitem> the parameter passed mycontroller.createnewitem thing depends on menuitem clicked , tried pass in 3 ways: 1) <f:setpropertyactionlistener target="#{mycontroller.newitem.property}" value="..." /> this doesn't work because modal dialog seems block f:setpropertyactionlistener. setter mycontroller.newitem.property gets called after close dialog, not enough. works if dialog not modal, need modal. 2) <f:attribute name="param" value="..." /> event.getcomponent().getattributes() returns map single element, looks some_namespace.mark_id => number, not ...

get the value from Intent of android -

thanks in advance. when print log.d("me",getintent().tostring()); i getting: intent { act=android.intent.action.call_privileged dat=tel:888 flg=0x13800000 cmp=com.ninetology.freecall.two/.callfinalactivity } i trying fetch value associated "dat" getting nullpointer exception. //the code using getintent().getstringextra("dat"); // no use //i tried getintent().getextras("dat").tostring(); // nullpointer exception i tried "tel" key in above code still no use. it seems you're doing wrong. the getextras() function returns bundle can extract data , not function returns specific string. dat not string value can see data printed. it's uri , try parsing should , i'm sure you'll able data. public void oncreate(bundle b) { //mistyped super.oncreate(b); uri data = getintent().getdata(); // or use string data = getintent().getdatastring(); // stuff }

ios - Where should an absolute beginner start? -

i new writing code , confused different languages. main goal build websites , apps ios/osx. which coding languages should start with? here asked question may of use you. if find bit on head, start learning basics of html/css/javascript @ w3schools or learning broadly applicable programming skills @ codecademy .

asp.net mvc - ViewBag empty in ActionFilter OnActionExecuted -

i have requirement log user's journey through asp.net mvc application. using global actionfilter , log4net. need able read values (specifically viewbag.title ) viewbag have been set in view. @ moment viewbag coming empty. public class useractivityfilter : iactionfilter { public void onactionexecuted(actionexecutedcontext filtercontext) { var properties = new dictionary<string, string>(); if (filtercontext.result viewresult) { var action = filtercontext.result viewresult; properties.add("page.title", action.viewbag.title); } // log4net stuff goes here } } my views of following form: @model foo.barviewmodel @{ viewbag.title = "application: " + model.name; } @html.displayformodel() is possible read values in viewbag set in view?

ruby - Sinatra error when handling .php routes -

i'm creating sinatra app replace legacy php based app. get '/page.php' # ... end i'm trying define route "sinatra doesn't know ditty." error page. at top of page, have this configure mime_type :php, 'text/html' end any idea how tell sinatra use whole path including file extension part of it?

java - Dynamic to(URI) in Camel -

i'd configure camel route to(uri) can specified @ runtime. i tried following: public class foo extends routebuilder { @override public void configure() { // uri can point different hosts from("direct:start").to(${someuri}"); } } and then producertemplate pt = camelcontext.createproducertemplate(); pt.requestbodyandheader("direct:start", "someuri", "http://example.com"); however above doesn't work (camel complains not having default endpoint). what's best way go this? see these links reference: http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html http://camel.apache.org/recipient-list.html for example, see unit test https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/recipientlisttest.java

python - How to use wxreactor with twisted Perspective Broker [PB] to write a chat client -

i learning wxpython , twisted's perspective broker. i've been assigned use them produce chat client (i've written server, , console based client.) this what's stumping me: pb has it's own 'flow' callbacks , such, doesn't intuitively mesh event driven flow of wxpython. kind of program structure should using 2 cooperating? i've tried using twisted pb client part of program , store info server in local methods wxpython gui can call in response events, , use @ start set list of online users , groups. think i'm running issues sequence--not storing necessary variables before wx code calls them, because both started @ same time. perhaps inserting time delay frame creation , such help, feels clumsy solution, if solution @ all. another approach pass server reference directly wxpython frame (and sub-panels/notebooks). here i'm running issues because callbacks need different class, , wx needs info in same class...and perhaps there's way fo...

iphone - Setting maximum date as current date in uidatepicker -

possible duplicate: uidatepicker, setting maximum , minimum dates based on todays date i have tried allot not able give range uidatepicker, maximum range current date. no matter picker shows values. thanks in advance here's possible answer setting datepicker 30 years before , 30 years after. you can change values that.. nscalendar *calendar = [[[nscalendar alloc] initwithcalendaridentifier:nsgregoriancalendar] autorelease]; nsdate *currentdate = [nsdate date]; nsdatecomponents *comps = [[[nsdatecomponents alloc] init] autorelease]; [comps setyear:30]; nsdate *maxdate = [calendar datebyaddingcomponents:comps todate:currentdate options:0]; [comps setyear:-30]; nsdate *mindate = [calendar datebyaddingcomponents:comps todate:currentdate options:0]; [datepicker setmaximumdate:maxdate]; [datepicker setminimumdate:mindate]; hope helps..