Posts

Showing posts from July, 2010

flash - Application timeout feature -

flash - Application timeout feature - i developing air 2.0 application, , set inactivity timeout feature it. (i.e: if user doesn't press key 5 minutes application logs user out. have implemented native timeout features available in flash.utils library, , hear mouse or keyboard events clear / reset timeout in main mxml. problem application uses titlewindows , keyboard events don't appear bubble (or back) main mxml i'm listening them. hence app thinks there inactivity when keys , mouse events firing in title windows. is there way can inherently hear keyboard , mouse events globally? prospect of adding listeners every titlewindow (and checking see if open or not) seems quite daunting. many help. from anywhere in uicomponent (probably main ui class): private function oncreationcomplete():void { stage.addeventlistener(keyboardevent.down, onkeyboard); } private function onkeyboard(e:keyboardevent):void { // } flash flex air

jquery - unable to open view in model popup mvc 3 -

jquery - unable to open view in model popup mvc 3 - i want render view when user clicks on "add new" button on index page. have action in controller handles create post. problem here not able load view. when click "add new" button, nil happens. can please point out missing here? this how index view looks like: <script type="text/javascript"> $(function () { $('#dialog').dialog({ autoopen: false, width: 400, resizable: false, title: 'add new item', modal: true, open: function (event, ui) { $(this).load('@url.action("country/create")'); }, buttons: { "close": function () { $(this).dialog("close"); } } }); $('#addnew').click(function () { alert('hello'); ...

jquery access to my server host var? -

jquery access to my server host var? - is possible use $.post("/home/acount_name/acount_domain/script.php") to access php file outside main domain on same webserver? with php can that, wich since need utilize same file in many domains. now need have access same file using jquery, browser doesn't go there, uses domain/home/acount_name/acount_domain/script.php any sugestion? thanks in advance javascript cannot access server files. you can seek post php file in domain read server file , output user. jquery

java - GAE Development datastore not there -

java - GAE Development datastore not there - indigo on windows 7 pro 64bit just bringing app first time; datastore code close re-create of various examples out there, , trying save single simple object. the pm.makepersistent(o) apparently succeeds (i.e. doesn't throw exception), datastore viewer shows no objects, , local_db.bin file not appear (although datastore-indexes-auto.xml generated in directory). a subsequent query object (using known field value) returns nil (unsurprising given viewer shows nothing.) i suspect workspace configuration problem, have thought sort of error have appeared... java gae-datastore gae-eclipse-plugin

Bit of css help please ( ol li stuff ) -

Bit of css help please ( ol li stuff ) - so doing custom ol li list, , confused shortcuts css wise ol , ul , li stuff. if tell want, , provide sample code help please. ok after numbered list so... <ol> <li>dave jones<span class="searchtotals">189 searches</span></li> <li>debs<span class="searchtotals">34 searches</span></li> <li>tarbutt<span class="searchtotals">211 searches</span></li> </ol> what want not repeat span class within li element, perhaps help. also wanted number style each li. in far set circle around each number.. here css numbers. background: none repeat scroll 0 0 #ec008c; border-radius: 1em 1em 1em 1em; color: #ffffff; display: inline-block; float: right; font-family: inherit; font-size: 10px; font-weight: bold; line-height: 1em; margin-left: 0.5em; padding: 0.35em 0.5em; text-align: center; text-decoration: none; her...

html - Facebook javascript: display more posts on the wall -

html - Facebook javascript: display more posts on the wall - i creating chrome extension has javascript modifying facebook page layout, how can create wall displaying older posts? i've tried injecting script page , calling function uiintentionalstream.instance.loadolderposts() but it's not working since script doesn't called (my script runs after entire page has been loaded). i can't figure out how expand wall display older posts programatically javascript, can help please? calling dom "previous post" element solved thing javascript html facebook javascript-events

c# - Need help implementing interfaces -

c# - Need help implementing interfaces - in application wanting create interfaces more generic. stands have 2 models, campaignmodel , stringmodel, these both utilize same methods different arguments in them i.e. campaignmodel: void getall(eventhandler<getallcampaignscompletedeventargs> eh); void getallbyname(string name, eventhandler<getcampaigncompletedeventargs> eh); void getallbyid(long id, eventhandler<getallcampaignsbyidcompletedeventargs> eh); void add(campaign entity, eventhandler<createcampaigncompletedeventargs> eh); void update(campaign entity, eventhandler<updatecampaigncompletedeventargs> eh); void delete(campaign entity, eventhandler<deletecampaigncompletedeventargs> eh); stringsmodel: void getall(eventhandler<getallcampaignstringscompletedeventargs> eh); void getallbyname(string name, eventhandler<getcampaignstringbyidentifiercompletedeventargs> eh); void getallbyid(long id, eventhandler<eventargs> e...

can we use cassandra / couchdb / mongodb with google app engine infrastructure? -

can we use cassandra / couchdb / mongodb with google app engine infrastructure? - is there anyway can utilize google app engine not utilize google's bigtable? like storing data, prefer utilize cassandra , have ability plug , unplug additional database servers. and if utilize couchdb/mongodb instead supported in gae's infrastructure? short answer: no. longer answer: depends how want/need utilize database systems. there no way run scheme straight on appengine. if low-latency not prerequisite (as case infrequent/periodical fetches of data) set them on host kind of http api, , query services appengine using urlfetch . google-app-engine mongodb couchdb cassandra

c++ - Problem with QSignalMapper and QAction never triger the Slot -

c++ - Problem with QSignalMapper and QAction never triger the Slot - hi seek bind slot argument qaction triggered signal have code ,the context menu working great . openpublishwin never triggered . void myapp::showcontextmenu(const qpoint& pos) // slot { qstring groupid; qpoint globalpos = ui.treeview_mainwindow->maptoglobal(pos); qmodelindex modelindx = ui.treeview_mainwindow->indexat(pos); groupid = modelindx.model()->index(modelindx.row(),0,modelindx.parent()).data(qt::userrole).tostring(); qmenu mymenu; openpublishaction = new qaction(tr("send"), this); mymenu.addaction(openpublishaction); connect(openpublishaction, signal(triggered()),m_signalmapper, slot(map()) ); m_signalmapper->setmapping(openpublishaction,groupid); connect(m_signalmapper, signal(mapped(qstring)), this, slot(openpublishwin(qstring))); qaction* selecteditem = mymenu.exec(globalpos); } void myapp::openpublishwin(qstring gid) { writelog(gid) } ...

javascript - google maps infowindow like google's original -

javascript - google maps infowindow like google's original - is there complete solutions create such infowindows, or should myself? faq: in google map api can render template content. api reference your question vague, can create google map when signed in google account, , style iframe css rules. created map embed selection of dropped pins. http://plugins.jquery.com/plugin-tags/google-maps javascript html css google-maps google-api

git - unable to launch kitchen sink app in titanium studio -

git - unable to launch kitchen sink app in titanium studio - im attempting take @ kitchen sink app illustration through titanium studio , everytime effort open , run project tells me git.exe has stopped working , shuts down, theres few methods launching app every way have tried same error ideas? running windows vista , using android sdk if helps git titanium appcelerator appcelerator-mobile

c# - Capture email sent with outlook from browser -

c# - Capture email sent with outlook from browser - i want able capture email gets sent via outlook , initiated browser mailto link can save re-create web application. i can purchase c#, building web application using c# ideally possible php application without needing rely on specific web browser. so far seems best alternative build add-in outlook can observe relevant flag , save re-create of email 1 time sent application via webservice connection. i don't have great deal of experience dealing office add-ins , interested know if can pass custom info through mailto link , read using add-in when new message started. i seem have issue don't have access info while email beingness composed , don't have reliable way match particular in-composition email email gets saved in outbox moved inbox. i working visual studio 2010 , office 2010 @ moment. you can't because when supply mailto link you're requesting default mail service programme on u...

Poor performance of Android Canvas.drawBitmap - switch to OpenGL? -

Poor performance of Android Canvas.drawBitmap - switch to OpenGL? - i'm porting 2d action game windows phone 7 (developed in xna 4.0) on android. i'm using lot of canvas.drawbitmap() calls - around 200-300 per frame update - different paints each phone call handle varying transparency , colourisation @ draw-time. managing particle systems , various other overlays , in-game effects tiled background , in-game sprites. i'm not doing on-demand resizing or rotating, it's simple src->dest rectangles of same size. on wp7 runs @ 30+fps i'm struggling 12fps on test 'droid hardware (samsung galaxy s). making game unplayable. having profiled code, i've confirmed time beingness lost in canvas.drawbitmap() i seem next usual performance advice - using surfaceview, mindful of gc not creating loads of throwaway objects, , avoiding drawables. am right in understanding canvas.drawbitmap() cpu-bound, , if want improve performance have switch opengl utilize gp...

How to add comma between array items PHP - Drupal -

How to add comma between array items PHP - Drupal - i'm trying add together comma between these array items, if utilize implode returning array, array. function boron_taxonomy_links($node, $vid, $type, $cat) { if (count($node->taxonomy)){ $tags = array(); foreach ($node->taxonomy $term) { if ($term->vid == $vid){ $tags[] = array('title' => $term->name . ',', 'href' => $type . '/' . $cat . '/' . $term->tid, 'attributes' => array('rel' => 'tag')); } } if ($tags){ homecoming theme_links($tags, array('class'=>'links inline')); } } } when phone call implode on $tags , set comma inbetween string representations of objects in array. in case, objects arrays php doesn't know how turn string, uses string 'array' . you'll want create sure $tags populated string formatted way want. since don...

c# - Creating a text file on click of a button -

c# - Creating a text file on click of a button - i want create text file have contents fetched 1 of tables in database. contents should display follows:- item1 id1 item2 id2 item3 id3 item4 id4 item5 id5 i want contents this. names of items , ids diff ofcourse way of them appearing in th etext file should this. how go this? please give me ideas. tried create file using next code:- using (var sw = new streamwriter(file.open(@"d:\myfile.txt", filemode.createnew), encoding.getencoding("iso-8859-1"))) { sw.writeline("my text..."); } and got created fine. but, when tried create file in c: drive, said access path denied. want create map file in helicon installed in c: 1 time file has been created, 1 time again when click "create file" button in c# code, should either delete file , create 1 time again or overwrite contents fresh info items table. should do? please help...

GIT - Force Override of remote repository -

GIT - Force Override of remote repository - my server provider somehow deleted remote repository , need override local copy. when git force origin master says date - it's not. how can forcefulness git force files regardless of remote state? do when creating git repository on server, can convert bare repository? then re-create bare version server. git

java - how do i send data from a webpage to port in web server? -

java - how do i send data from a webpage to port in web server? - which best method send numerical value info javscript webpage web server port.. have server socket programme running on server , listening port 5000. need send info webpage port? best method? the scene this. i have c socket programme running @ web server hosted in laptop using xampp. listeing port 5000 , have ip address. in web page, running javascript , when user presses of arrow keys need value sent port.. -1 , downwards -2 etc ... there isn't way in portable fashion. browsers back upwards the websocket standard, gives limited access sockets, isn't available in mutual browsers other chrome , safari. flash player supports separate xmlsocket protocol, can utilize if flash plugin available. however, neither of these protocols supports raw access sockets -- both require initial negotiation , packet framing. java javascript c sockets

django - How to redirect user after he logs in based on his profile -

django - How to redirect user after he logs in based on his profile - after user logs in, redirected transfer.html. if user has not created bank account, d redirect him createbankaccount.html instead. how do that? here code #login.html <form action="." method="post" class="login_form">{% csrf_token %} {{ form.as_p }} <p class="submit"><button type="submit" name="submit" value="login">log in</button></p> {% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %} </form> #settings.py login_redirect_url = '/main/' #urls.py url(r'^main/$',main_home,name='main_home'), #views.py #this homepage def main_home(request): url = '/%s/trans/create' % request.user.username homecoming httpresponseredirect(url) #i want homepage if user has no bank business relationship def m...

xcode - Uitouch moved animation -

xcode - Uitouch moved animation - in app draw line in touch moved action..and if stop @ point..so want animation origin end....how can that..... thanks in advance.. you seek sample image on screen see if same painted image. stackoverflow.com/questions/6488732/ hope helps. xcode cocoa-touch ios4

Convert Ruby string to *nix filename-compatible string -

Convert Ruby string to *nix filename-compatible string - in ruby have arbitrary string, , i'd convert valid unix/linux filename. doesn't matter looks in final form, long visually recognizable string started as. possible examples: "here's string!" => "heres_my_string" "* asterisk, see" => "is_an_asterisk_you_see" is there built-in (maybe in file libraries) accomplish (or close this)? by specifications, accomplish regex replacement. regex match characters other basic letters , digits: s/[^\w\s_-]+//g this remove whitespace in between words, shown in examples: s/(^|\b\s)\s+($|\s?\b)/\\1\\2/g and lastly, replace remaining spaces underscores: s/\s+/_/g here in ruby: def friendly_filename(filename) filename.gsub(/[^\w\s_-]+/, '') .gsub(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2') .gsub(/\s+/, '_') end ruby string filenames

.net - Mapping TPT in EF Code First 4.1 w/ Different Primary Keys -

.net - Mapping TPT in EF Code First 4.1 w/ Different Primary Keys - i trying map tpt inheritance hierarchy on legacy database (i can't alter column names). of examples have primary keys of parent , children tables same name. unfortunately, mine doesn't behave way. as simplified example: vehicle ---------------- vehicleid create model ---------------- auto ---------------- carid someotherfield ---------------- carid , vehicleid same id , values should used associate tables. there back upwards creating tpt relationship in code first? here statement issue ef team: unfortunately isn't possible @ stage. realize isn't great reply 1 alternative create view renames pk/fk column , map that. it's feb 2011. related before ctp version of ef code-first. believe scenario still not supported in ef 4.1. also similar question here not satisfying result regarding ef 4.1 code-first: how can utilize tpt inheritance models when primar...

javascript - Django/AJAX/JQuery - Simple POST troubles -

javascript - Django/AJAX/JQuery - Simple POST troubles - i'm trying implement simplest ajax post can think of because i'm new ajax , jquery. thought this: have button, , when clicked want submit basic post info same page (the page is: http://{{ ip address }}/django/ajax/ ). in .html file have: <script type="text/javascript"> function pythonizer(){ $("#msgid").append("it should post after appended"); $.ajax({ url: '/django/ajax/', type: 'post', data: {'obj': "test string"}, datatype: 'json', contenttype: "application/json; charset=utf-8", success: function(response) { alert(response); } }); } </script> <div id="msgid"> </div> <input type="button" id="mybutton" value="click me" onclick="pyth...

# ifdef type conditional compilation in T-SQL sql server 2008 2005 -

# ifdef type conditional compilation in T-SQL sql server 2008 2005 - for sake of backwards compatibility need have stored proc run on both sql server 2005 , sql server 2008. due commands beingness deprecated in sql server 2008 script compiles on 2005 fails on 2008. looking c++, c# equivalent of #define, #ifdef can compile same script on 2005 & 2008. standard practice on ? attached screenshot explains in detail. give thanks you use dynamic sql: if (@returnval = 1) exec ('backup log mydb truncate_only'); sql-server sql-server-2005 tsql sql-server-2008

c++ - BSD Sockets Invalid Argument at connection -

c++ - BSD Sockets Invalid Argument at connection - i maintain getting invalid argument error when seek connect client server. couple threads online said can happen when addrlen not right, tried changing literal value after counting length , did not work. tried strlen() no luck. anyways, relevant code - server - struct sockaddr name; int main(int agrc, char** argv) { int sock, new_sd, adrlen; //sock socket, new_sd connection socket name.sa_family = af_inet; strcpy(name.sa_data, "127.0.0.1"); adrlen = strlen(name.sa_data) + sizeof(name.sa_family); //make socket sock = socket(af_inet, sock_stream, 0); if (sock < 0) { printf("\nbind error %m", errno); exit(1); } //unlink , bind unlink("127.0.0.1"); if(bind (sock, &name, adrlen) < 0) printf("\nbind error %m", errno); //listen if(listen(sock, 5) < 0) printf("\nlisten error %m...

Amazon EC2 How Do I Host My Own Content on a Bitnami-Wordpress Instance -

Amazon EC2 How Do I Host My Own Content on a Bitnami-Wordpress Instance - i created instance host wordpress blog. made keypair, converted using putty gen work winscp. my security grouping associated instance has: icmp allow tcp 0-65535 tcp 22 (ssh) tcp 80 (http) tcp 443 (https) udp 0-65535 i running bitnami-wordpress 3.2.1-0 ubuntu ami my question is: how host simple file on instance? update: able login using sftp filling in instance public dns host, , putty gen key private key, username had utilize bitnami. have access server, how or set file come out www.mywebsite.com/myfile.file??? i assuming need ssh server using putty, , add together www directoroy? what have tried: i tried logging in using winscp host name beingness instance's public dns, , private key file converted putty gen file key pair instance. using sftp, pressing login asks me user name, entering "user" or "ec2-user" error saying: "disco...

javascript - jQuery check if two values is blank -

javascript - jQuery check if two values is blank - i have 3 values: var tbb = $("#total1 span").text(); var tmb = $("#total2 span").text(); var tab = $("#total3 span").text(); each of them blank. what improve way in javascript/jquery check if 2 of these values blank? update here mean, bit ugly , "lot of lines" solution var = 0; if (tab != "") { i++; } if (tmb != "") { i++; } if (tbb != "") { i++; } if (i >= 2) { //do } any improve thoughts? if(tbb == null || tbb == ''){...} and same rest. javascript jquery

How do I coordinate settings between my ASP.NET MVC 3 app and SpecFlow? -

How do I coordinate settings between my ASP.NET MVC 3 app and SpecFlow? - so have vs 2010 solution containing 1 asp.net mvc 3 project , 1 specflow project (with nunit test runner) test former. when testing under specflow (by running specflow project), i'd alter parameter in mvc application's configurationmanager.appsettings dictionary, create connect test database. alter not seem impact running app however, guess test , app not share state. how can share application setting between mvc app project , specflow project, utilize same database? edit: found problem wasn't 1 of sharing settings between projects (mvc , specflow), rather between 2 processes. reason test mvc via watin, means development server, running in process of own, beingness exercised tests. such premise of original question wrong onset, , consider jason's reply valid given original premise. in test project (specflow) create new app.config (unless it's there) , add together appse...

php - htaccess rules not routing properly on server (real file check) -

php - htaccess rules not routing properly on server (real file check) - man.. i'm @ loss. have basic rewrite flow can't seem working. want check if real-file exists. if does, serve it, if doesn't, reroute php file. here's .htaccess file: rewriteengine on rewritecond %{document_root}/application%{request_uri} !-f rewriterule ^(.*)$ core/index.php?f=%{document_root}/application%{request_uri} [qsa,l] rewriterule (.*) application/$1 [l] my directory construction follows: . ├── [drwxr-xr-x] application │   └── [-rw-r--r--] test.html ├── [drwxr-xr-x] core │   ├── [-rw-r--r--] index.php │   └── [drwxr-xr-x] tmp │   ├── [-rw-r--r--] httpd-access.log │   ├── [-rw-r--r--] httpd-error.log │   └── [-rw-r--r--] rewrite.log └── [-rw-r--r--] .htaccess 3 directories, 6 files here permission appreciate help. thanks. are sure apache has mod rewrite turned on? php apache .htaccess routing

Queuing Biztalk Subscriptions -

Queuing Biztalk Subscriptions - we have scheme sending hl7 messages biztalk using mllp hl7 accelerator. have several destination systems, need own format of hl7 message, utilize orchestrations each destination, each involving different transform. each orchestrationi uses filter subscribe receive port. subscription model works well, if need stop or undeploy 1 of orchestrations. drawback of subscription model, on force model there no queuing built in, if orchestration removed, messages picked receive port not queue system. or concern? how handle upgrades orchestration, etc. there improve design pattern? a improve design in sentiment place transformations (maps) straight on send ports. can have filters on different send ports route destinations systems. this design create updates bit easier there isn't orchestration first needs removed deploy new version of map. have stop port ( leaves subscription active , messages queued subscribing ports). after port s...

string - Playframework: Can I reference previously defined property in the messages file? -

string - Playframework: Can I reference previously defined property in the messages file? - i'd next (only because elegant here in java/javascript code) messages file ------------- greeting=hello message= ?greeting? world! according play framework code (play.i18n.messagesplugin , play.i18n.messages) not supported. string playframework messages

php - Like/Dislike system like FB -

php - Like/Dislike system like FB - i have tables set , design wanted...the thing in way of creating sexy like/dislike scheme site actual php take (dont worry wrote bunmch of code, not sending) my problem code isnt sending of tables, question how send db? here's code have in place far (along button) button <form action="up.php"> <input type="image" value="upbtn" name="upbtn" id="upbtn" src="images/add.png"> </form> actual code (up.php) <?php require 'connect2.php'; if (isset($_post['upbtn'])) { mysql_query("insert votes (id, user, upvote, downvote) values ('', '$username', '+ 1', '+ 0')"); mysql_query("update searchengine set rel = rel '+ 1' id = '$id'"); } ?> $user name def (on top of page of code on) if (isset($_session['id'...

java - LogHandler flush vs direct output in publish -

java - LogHandler flush vs direct output in publish - i'm writing own java.util.logging.handler , , dont understand concept there... have publish method here contains logic see if logrecord should shown, formatter (or simpleformatter if .getformatter() == null ) , set formatted string cache. now wrote flush() method , i'm getting in problem here: flush() method never called java, when error occured, not shown. set phone call of flush() publish() method , can see log messages... dont see conecept here? when should flush() called , whom? or have create now, , phone call flush() own in publish() method? if take example: http://www.java2s.com/code/java/language-basics/howtowritecustomloghandler.htm dont flush() method probably bit late benefit of others... im seeing similar, , assumed similar behaviour you i had @ usages of , seems way flush in standard way, , seems guarantee flushed on close more anything. some people "flush themselves...

actionscript 3 - Draw a Hand Signature in Flex 4 -

actionscript 3 - Draw a Hand Signature in Flex 4 - i creating application requires user draw hand signature on tablet. best way on flex mobile 4.5? draw on to, sprite, canvas? also, need save signature .jpg, done? have on following: http://www.jamesward.com/2010/03/22/flex-paint-updated-to-flex-4/ it may give hints. flex actionscript-3 actionscript blackberry-playbook

Android, Java, Creating a thumbnail keeping aspect ratio -

Android, Java, Creating a thumbnail keeping aspect ratio - i'm trying create thumbnail of height maintain aspect ratio. i'm using code below problem arises when if image little image generated not fill thumbnail area. imageuri path image. bitmapfactory.options o = new bitmapfactory.options(); o.injustdecodebounds = true; bitmapfactory.decodefile(imageuri, o); final int required_size=70; int width_tmp=o.outwidth, height_tmp=o.outheight; int scale=4; while(true){ if(width_tmp/2<required_size || height_tmp/2<required_size) break; width_tmp/=2; height_tmp/=2; scale++; } bitmapfactory.options o2 = new bitmapfactory.options(); o2.insamplesize=scale; bitmap bitmap = bitmapfactory.decodefile(imageuri, o2); your code scaling bitmap have @ to the ...

Android: Uploading number of images causing Heap size to grow big - how to solve that? -

Android: Uploading number of images causing Heap size to grow big - how to solve that? - i'm writing app user can take bunch of pictures (up 20) , upload server. images need uploaded together. here logic: take each picture, display thumb on screen , resize image on sd 800x600 90 quality create object, populate properties (images) base64 string serialize object using gson upload string while testing getting errors "out of memory" when processing images. thought , stackoverflow complains - it's bug bitmapfactory. yes, error shows while resizing image not related operation. while take pictures , process them (resize, etc) - heap size stays below 7-8mb. it's 2-3mb more usual app state. when submit images server , gson + base64 encoder comes play - "explodes" , this: well - see - after process completed allocated memory get's downwards expected heap size stays. now, when take more pictures or app - start out of memory errors. here ...

javascript - How can I force Jquery animations to occur when the window is not focused -

javascript - How can I force Jquery animations to occur when the window is not focused - okay, building ajax based game. anyway multiplayer, connects server. polls server, getting updates time. anyway game has different game states, , must animate gui based on game state. the problem is, however; when window not focused, jquery animations queue , not render. means user walks away 5 mins , comes back, huge queue of obsolete animations start run through 1 one. so wondering if there way forcefulness jquery animations run when called , not wait focused window? for farther info on why happens, read additional notes, in jquery documentation here http://api.jquery.com/fadein/ cheers, josh depending on animations, add together onfocus event on body element gets animation queue calling .queue() , if it's longer 1 element, phone call .clearqueue() . of course of study you'd have careful not mess layout, since removes animations. also seek doing jquery.fx.off...

jquery - elrte : dialog is not a function error -

jquery - elrte : dialog is not a function error - when click add together image or add together flash or add together table button, when click buttons open dialog box, i'm getting error. what problem think? in firefox error: jquery("<div />").addclass(this.opts.class).dialog not function source file: elrte/js/elrte.min.js line: 3 in chrome uncaught typeerror: object [object object] has no method 'dialog' elrte/js/elrte.min.js:3 i think problem error messages explain. jquery object doesn't have method named dialog . jquery doesn't have dialog method default, , apparently 1 hasn't been provided. jqueryui have one, you'd need load if that's 1 you're intending use. here's demo page jqueryui dialogs. jquery wysiwyg rich-text-editor

iphone - Application failed codesign verification -

iphone - Application failed codesign verification - i installed xcode 4.2 , i'm trying archive sec app. didn't have problem first (xcode 4.0.2) i'm getting next error: warning: application failed codesign verification. signature invalid, or not signed apple submission certificate. (-19011) i've tried different things nil works. suggestion? thanks i've had issue couple times , has been have wrong code signing identity set in build settings. check you've got right certificates selected right profiles? (developer profile developer build , distribution/release profile release build) also check code signing identity certificates project build settings , code signing identities active target. set right certificates 1 other has different set. has tripped me couple times too once find issue, clean , build ensure flushed out. just note, isn't solely xcode 4.0.2 issue. iphone code-signing

c# - chaining a table of object with Linq -

c# - chaining a table of object with Linq - i have 2 tables players table (object) ------------- playerid name birthday list<matches> matches and matches table -------------- matchid playerid teamid how can list of players , every row of player object contains list of matches has played ? sincerly you seek normal bring together in linq: from p in players bring together m in matches on p.playerid equals m.playerid select new { p, m } c# linq

winapi - NtWaitForKeyedEvent alertable? -

winapi - NtWaitForKeyedEvent alertable? - i'm using windows keyed events custom synchronization primitives, inspired http://locklessinc.com/articles/keyed_events/ back upwards thread interruption, i've changed places blocking calls sleep or waitforsingleobject used alertable versions sleepex , waitforsingleobjectex. can interrupt wait queueing apc queueuserapc , if returns wait_io_completion throw special exception causes destructors called , thread exit. similar linux version of pthread_cancel() causes stack unwind , stuff cleaned when thread exits. see ntwaitforkeyedevent() has alertable parameter well, i'm wondering if can same thing case, or there caveats? if apc wake up, don't know homecoming value for, since ntstatus not straight correspond win32 homecoming codes. there status_user_apc , status_alerted , don't know if either of two. if user apc function not sufficient alert keyed event wait, is? ntwaitforkeyedevent altertable = true wa...

mysql - Easier way of making this SQL query nicer -

mysql - Easier way of making this SQL query nicer - i've got mysql query here.. /*** * ugly self joining sql. * want parent's name have bring together same table * joining on child_row.parent_id = parent_row.id * don't remove limit this... might bad. */ $sql = 'select cnode.*, pnode.name parent_name '; $sql.= ' t_nodes cnode left bring together t_nodes pnode '; $sql.= ' on cnode.parent_id = pnode.id '; $sql.=' cnode.id = '.$id.' limit 1'; is there way of making more elegant? nothing sql improve legibility in php source: $sql = " select cnode.*, pnode.name parent_name t_nodes cnode left bring together t_nodes pnode on cnode.parent_id = pnode.id cnode.id = $id limit 1 "; mysql sql database

android - What does this Java return statement mean? -

android - What does this Java return statement mean? - am looking on snippets of code , have come across homecoming statement i've never seen before. mean? return checkdb != null ? true : false; here's whole method code, reference: private boolean checkdatabase(){ sqlitedatabase checkdb = null; try{ string pathtodb = dbpath + dbname; checkdb = sqlitedatabase.opendatabase(pathtodb, null, sqlitedatabase.open_readonly); }catch(sqliteexception e){ //database does't exist yet. } if(checkdb != null){ checkdb.close(); } homecoming checkdb != null ? true : false; } the same return checkdb != null ?: "ternary operator" which. example: a ? b : c same method body: { if(a) { homecoming b; } else { homecoming c; } } java android

delimiter - Regex for multiple MAC addresses separated by comma? -

delimiter - Regex for multiple MAC addresses separated by comma? - i know right regex matching multiple mac addresses separated delimiter, such comma. the regex single mac address be: ^([0-9a-fa-f]{2}[:-]){5}[0-9a-fa-f]{2}$ . so multiple mac addresses delimited comma, figured ^(([0-9a-fa-f]{2}[:-]){5}[0-9a-fa-f]{2},?)){+}$ trick. where going wrong? help appreciated, thanks. edit: people have asked went wrong. well, put, regex not work. allow come in single (valid) mac address, flagged invalid mac address. same goes multiple mac addresses delimited comma. the regex needed validator textbox on asp .net page. if more details needed, allow me know. ^([0-9a-fa-f]{2}[:-]){5}[0-9a-fa-f]{2}(,([0-9a-fa-f]{2}[:-]){5}[0-9a-fa-f]{2})*$ see regex comma delimited list details making regex match delimited list. need set regex mac address followed grouping containing comma , regex mac address matched 0 or more times. in attempted solution comma optional. regex deli...

c - Reading memory in correct order Need some help -

c - Reading memory in correct order Need some help - we storing sort of records in memory location follows ---------------------------------------------- |eventid | timestamp | variable info | length | ---------------------------------------------- lengths of these fields follows eventid+ timestamp 12 bytes length fields 4 bytes , indicates length of info field. millions of such records placed 1 after other & have pointer pointing current index, if want read records go read 4 bytes right left & fetch particular record & doing iteratively read finish memory space. problem method reads records in reverse order compared order in entered. i need device method allow me read memory records in same order entered minimal space complexity. as variable length info section comes before length, impossible read info starting origin memory address. assuming no changes can made architecture or storage, 1 possible alternative utilize current scheme bu...

Using Dropbox's python API to detect changes -

Using Dropbox's python API to detect changes - how go detecting if file changed, using dropbox's python api? can't check file on disk because won't updated if it's in use. the best way utilize files hash metadata phone call of api. should store hash locally. the metadata api phone call can take metadata parameter create homecoming 304 (not modified) status if file has not changed. (more info: https://www.dropbox.com/developers/reference/api#metadata) but method still requires poll api constantly. python dropbox

wpf - binding to a radio button -

wpf - binding to a radio button - i have next radio button bound variable isallowed <radiobutton name="yesradiobutton" margin="5,5,0,0" ischecked="{binding path=isallowed, mode=twoway}">yes</radiobutton> how can create no button take opposite value using xaml ? there no xaml-only solution. bind no using reverse bool converter though. <local:notconverter x:key="notconverter"/> {binding isallowed, mode=twoway, converter=notconverter} public class notconverter : ivalueconverter { public object convert(object value, type targettype, object parameter, system.globalization.cultureinfo culture) { boolean result = false; if (value boolean) result = !((boolean)value); homecoming result; } public object convertback(object value, type targettype, object parameter, system.globalization.cultureinfo culture) { boolean result = false; if (value...

jsf - java.lang.OutOfMemoryError: Java heap space - how to save memory? -

jsf - java.lang.OutOfMemoryError: Java heap space - how to save memory? - i'm trying tune jsf application memory consuption setting jvm arguments because i'm getting out of memory error. i'm able increment memory heap , restart server twice day, it's not solution... jvm arguments: -xx:+useconcmarksweepgc -xx:+useparnewgc -xx:+cmsclassunloadingenabled -xx:+cmsparallelremarkenabled -xx:cmsinitiatingoccupancyfraction=30 -xx:+cmsincrementalmode -xx:+cmsincrementalpacing -xx:parallelcmsthreads=2 -xx:+usecmscompactatfullcollection -xx:+disableexplicitgc -xx:maxheapfreeratio=70 -xx:minheapfreeratio=40 -xx:maxtenuringthreshold=30 -xx:newsize=512m -xx:maxnewsize=512m -xx:survivorratio=2 -xx:permsize=150m -xms1024m -xmx1024m everything seems work fine, tenured space @ 0 mb, eden space continuosly cleared survivor space still growing , when reach limit, object moved tenured space , never been released. , after half day of running application out of memory error. h...

How can I start my Eclipse? -

How can I start my Eclipse? - i using eclipse develop android application . but, can't open eclipse. error info "jvm terminated. exit code = -1" . should open eclipse? now ok editing eclipse.ini . out of memory exception in eclipse. before editing, eclipse.ini -showsplash org.eclipse.platform –launcher.xxmaxpermsize 64m -framework plugins\org.eclipse.osgi_3.4.0.v20080605-1900.jar -vmargs -dosgi.requiredjavaversion=1.5 -xms40m -xmx512m then changed -showsplash org.eclipse.platform --launcher.xxmaxpermsize 64m -framework plugins\org.eclipse.osgi_3.4.2.r34x_v20080826-1230.jar -vmargs -dosgi.requiredjavaversion=1.5 -xms40m -xmx256m eclipse default memory settings (at to the lowest degree eclipse 3.2) run next memory settings specified in eclipse.ini file: -vmargs -xms40m -xmx256m eclipse

unit testing - Running Actionscript Test from CommandLine -

unit testing - Running Actionscript Test from CommandLine - i have .as class has tests. now wondering there way can run tests using command line tools (provided flex sdk)? you can create flexunit ant task this. http://docs.flexunit.org/index.php?title=ant_task http://www.unitedmindset.com/jonbcampos/2010/02/02/run-flex-unit-tests-from-ant cheers unit-testing testing actionscript

How to revert initial git commit? -

How to revert initial git commit? - i commit git repository @ first time, regret commit , want revert it. try # git reset --hard head~1 i message: fatal: ambiguous argument 'head~1': unknown revision or path not in working tree. this commit first commit of repository, thought how undo git initial commit? you need delete branch on. can't utilize git branch -d has safety check against doing this. can utilize update-ref this. git update-ref -d head do not utilize rm -rf .git or this wipe entire repository including other branches branch trying reset. git

statistics - How to extract longitudinal time-series data from a dataframe in R for time-series analysis and imputation -

statistics - How to extract longitudinal time-series data from a dataframe in R for time-series analysis and imputation - thanks joran helping me grouping info in previous question wanted create info frame in r smaller can time-series analysis on data. now farther extract info dataframe. dataframe made of 6 columns. columns 1 5 each have discrete names/values, such district, gender, year, month , age group. 6th column number of death counts specific combination. extract looks this: district gender year month agegroup totaldeaths northern male 2006 11 01-4 0 northern male 2006 11 05-14 1 northern male 2006 11 15+ 83 northern male 2006 12 0 3 northern male 2006 12 01-4 0 northern male 2006 12 05-14 0 northern male 2006 ...

css - Styling options in bold in Internet Explorer -

css - Styling options in bold in Internet Explorer - i getting styling problem options. need options appear in bold style, net explorer doesn't want render it. i'm setting using css: font-weight: bold; which not working. illustration can seen in page: example which shows bold fonts in firefox not in net explorer. i have tried in net explorer 7 , 8. has has alternative? edit: sample: html: <select> <option class="special">special</option> </select> css: .special { font-weight: bold; } ie doesn't allow styling of <option> elements independently. because ie uses windows form command render select box, doesn't back upwards feature. (as aside, same reason ie's select boxes can have issues layering when set them behind other objects; form command beingness rendered windows os, not browser, browser has less command on other elements on page) other modern browsers allow...

javascript - Access property of a parent object in a nested property -

javascript - Access property of a parent object in a nested property - i have this: var somenamespace = { model: backbone.model.extend(), view: backbone.view.extend({ model: new this.model, //<-- how create new object parent here? mymethod: function() { alert(this.model.myname); } }) } where added comment, model not defined, understand why, want know is, how access model property of parent? var somenamespace = { model: backbone.model.extend(), view: backbone.view.extend({ model: null, //<-- how create new object parent here? mymethod: function() { alert(this.model.myname); }, init: function(){//runs when creating instance of somenamespace.view this.model = new somenamespace.model(); } }) } because model not defined yet, opposed other languages, can not in js. need initialize var model in constructor of class...

ios - The best way to handle different orientations in an iPad -

ios - The best way to handle different orientations in an iPad - i hoping folks on forum help me struggling with. writing ipad application has different layouts depending on orientation of device. device going show bunch of tiles on layout (think of checker board), each going have content related application. while in portrait more tiles few bits of information. in landscape want cut down number of tiles , show more info each tile. my question improve way accomplish layout perspective? prefer remain in 1 xib, having had time getting auto resizing work correctly. know load separate xib files depending on orientation, , 1 time again when orientation changes, sounds clunky me. what doing handle type of thing? you can implement 2 views in 1 xib , alter visible in rotation, results in requiring twice many iboutlet s 1 each property each view. if hard layout changes alter xib, simple stuff (where autosizing resizing isn't working great) set frame new position ...

flash - function override, returning Vector with specialized type -

flash - function override, returning Vector with specialized type - is possible implement subclass, overrides function, returns vector specialized instances? example: class classa{ protected _vector:vector.<displayobject>; public function vector():vector.<displayobject>{ homecoming _vector; } } class classb extends classa{ public override function vector():vector.<sprite>{ homecoming vector.<sprite>(_vector); } } when seek to this, "illegal override" error @ compile time. think that's because functions signatures aren't identical. how can solve otherwise? this main problem vector class in actionscript3. prevents form of polymorphism. need somehow remember kind of objects class returns. easiest way isn't overriding function, leaving , casting each element appropriate form. flash actionscript

Java idiom to define a call patttern matching a CFG -

Java idiom to define a call patttern matching a CFG - assume trivial xml-like document format 2 terminal elements , , 1 recursively nestable element .... assume objective build strings using java type scheme allow new (syntactically valid) documents defined cleanly possible using java. i'm envisioning base of operations class can hidden away in class library - definition of individual documents intuitive , neat possible. ignoring, moment, recursively nestable element - code represents 1 potentially viable approach:- public class staticdocument { private stringbuilder doc; protected staticdocument() {} protected void nonnesteda() { doc.append("<a/>"); } protected void nonnestedb() { doc.append("<b/>"); } public string tostring() { homecoming doc.tostring(); } } using staticdocument base of operations class, possible define documents using java describe abstract structure. illustration document sequential composition of ...

Python or WPF reporting application -

Python or WPF reporting application - i have existing vs-2008 windows application back-end mysql server 5.5. existing application uses crystal reports reporting. want rid of crystal reports , want utilize tool seamlessly integrates vs-2010 express. want remove reporting options existing application , want write new wpf reporting application using vs-2010 express. want free tool using mysql, tools ssrs not useful me. what options? planning other way round writing python reporting application powered open-source python reporting tool. for wpf can utilize http://wpfreports.codeplex.com/ simple reports or follow article instructions create own: http://janrep.blog.codeplant.net/post/wpf-multipage-reports-part-i.aspx i've used ssrs, rdlc part (you can utilize datasource), not happy results , wpf not have native rdlc reportviewer. also check related question what's best approach printing/reporting wpf? python wpf visual-studio-2010 visual-studio-2008

Android attaching multiple files from sdcard to email -

Android attaching multiple files from sdcard to email - how attach multiple files in email in android? there permission required multiple files attachment intent? trying putparcelablearraylistextra(intent.extra_stream, arraylist urilist) method still in uncertainty whether uri class <? extends parcelable> or not. i not able attach file email. this code :: intent sendintent = new intent(intent.action_send_multiple); sendintent.settype("plain/text"); sendintent.putextra(intent.extra_email, new string[] {"soubhabpathak2010@gmail.com"}); sendintent.putextra(intent.extra_subject, "accident capture"); sendintent.putextra(intent.extra_text, emailbody); arraylist<uri> urilist = geturilistforimages(); sendintent.putparcelablearraylistextra(intent.extra_stream, urilist); log.d(tag, "size of arraylist :: " +urilist.size()); formholderactivity.this.startactivity(intent.createchooser(sendintent, "email:")); and geturilist...

javascript - send a variable to php with AJAX -

javascript - send a variable to php with AJAX - how can send rownumber variable datasource php file in code ? function getdata(datasource, divid,rownumber) { if(xmlhttprequestobject) { var obj = document.getelementbyid(divid); xmlhttprequestobject.open("get", datasource); xmlhttprequestobject.onreadystatechange = function() { if (xmlhttprequestobject.readystate == 4 && xmlhttprequestobject.status == 200) { obj.value = xmlhttprequestobject.responsetext; } } xmlhttprequestobject.send(null); } } php file (datasource): <?php //mysql connection $result = mysql_query( 'call view_polls(`rownumber`);' ); $row=mysql_fetch_array($result); echo $row['title']; ?> function getdata(datasource, divid,rownumber) { if(xmlhttprequestobject) { var obj = document.getelementbyid(divid); xmlhttprequestobj...

php - How can I add all the values in an array? -

php - How can I add all the values in an array? - i have array (or object?) looks this: array ( [0] => 5 [1] => 4 [2] => 3 [3] => 4 [4] => 4 [5] => 4 [6] => 4 [7] => 3 [8] => 4 [9] => 5 [10] => 3 [11] => 4 [12] => 4 [13] => 4 [14] => 3 [15] => 4 [16] => 4 [17] => 5 ) how add together values within it. ie. 5 + 4 + 3 etc... ideas? what have array, not object. you can iterate on array using loop (like foreach ), , add together values variable. $total = 0; foreach($array $val) $total += $val; or utilize core function array_sum() . array_sum($array); careful sec one, because if there float value in array, , expect integer value returned, function homecoming float . php arrays sum

algorithm - gis polygon map overlay intersection operation -

algorithm - gis polygon map overlay intersection operation - there many algorithms binary map overlay operation in vector info format take 2 layers of map , produce resultant layer i.e overlaid layer output. wondering whether there algorithms take more 2 layers 3 layers simultaneously , produce overlay result? there variety of geographic computational overlay procedures available multiple layers. these fall grouping of multiple criteria decision analysis, whereby multiple criteria (map)layers standardized , combined (overlayed) produce resulting (map)layer. however, many of these raster info inputs! if in fact want combine vector info produce intersection, procedural model work best @thomas has commented. can done vis vis python (standalone) or model builder within arcgis. alas, there other methods can used script procedural overlay process. i think you're aiming do. let's think next scenarios: you have vector polygon of city, , goal overlay industri...

c# - asp.net sqldatasource vs doing it in code behind -

c# - asp.net sqldatasource vs doing it in code behind - this going boil downwards philosophical question more anything, there major difference between using <asp:sqldatasource> in aspx file versus doing of work in code behind? if , why? know have preferences, curious others think. edit: i purposely didn't set preference in set much possible in code behind or dao. curious others thought since going have update bunch of code has sqldatasource calls on of apsx files. thank responded. appreciate input. embedding sqldatasource within asp.net page coupling presentation layer info access layer resulting in reduced testability , flexibility. suggest moving info connections own classes , created info access layer code behind pages draw from. ideally you'd seperate farther n-tier solution. link c# asp.net code-behind

Changed vhost and rewrite in CouchDB and can't access the internal API -

Changed vhost and rewrite in CouchDB and can't access the internal API - i wanted map custom domain design document _rewrite. // configuration vhosts www.myapp.com /myapp/_design/user/_rewrite // rewrites [{ "from": "", "to": "static/browser/index.html" }, { "from": "*", "to": "*" }] the first route works fine. can access index.html www.myapp.com. however, can't access www.myapp.com/_utils. says _all_dbs can't found in browser console. other apis stop working well. i guess because path converted /myapp/_design/user/_utils. how can prepare this? _utils , other "special" paths not cooperate vhosts well. lastly checked (version 1.0.2 think), _utils display futon ui ajax calls _all_dbs , others fail , total mess. i suggest strict separation between app , internal management. utilize vhost application, always avoid vhosts when accessing futon o...

Coldfusion-Best way to hide urls on pages by using CFSWITCH? -

Coldfusion-Best way to hide urls on pages by using CFSWITCH? - i want build framework hides url's , learning cfswitch. navigation links queried in datatable. have tried query around cfswitch , maintain getting error example: ?category=5&page=21 ( category=page_category , 5= page_categoryid , page page_id 21 in datatable ) <cfoutput query="pagecategories" group="page_categoryid"> <cfswitch expression="#url.category#"> <cfcase value="21"> <cfinclude template="../templates/index_welcome.cfm"> </cfcase> <cfcase value="#page_categoryid#"> <cfinclude template="../templates/page_bycategory.cfm?page_categoryid=#page_categoryid#"> </cfcase> <cfcase value="22"> <cfinclude template="/modules/blog/"> </cfcase> </cfswitch> </cfoutput> f...

java - Add comboBox in a JTable for a DB foreign keys -

java - Add comboBox in a JTable for a DB foreign keys - i doing databasemanager proyect display info of db table in jtable. want insert feature foreign keys of table displayed combobox values of foreign table. wondering optimal way it, know column represent foreing key going filled comboboxes exact same values, every each of them have specific default starting value. here code have right fill info without comboboxes: private collection<map<string, string>> alldata; object[] rowtoadd = new object[manager.get((string) databasejlist.getinstance().getselectedobject()).getdatamanager().getcolumnnumber()]; (map<string, string> rowz: alldata) { rowx = rowz.values(); int = 0; (string str : rowx) { rowtoadd[i] = str; i++; } tablemodel.addrow(rowtoadd); } so since rowtoadd array of objects, can create c...

iphone - how to zoom a cell in a tableview -

iphone - how to zoom a cell in a tableview - i developing app in have taken tableview display images in cells. have given size of cell size of ipad screen,and taken care when scroll tableview,it scrolls next cell.now want zoom each , every cell have requirement. accomplish have taken scrollview , placed on content view of cell,and placed images on scrollview. issue: issue facing zoom not beingness performed on cell.the gesture delegate method not beingness invoked. surprised , started searching in web " whether can zoom cell in table view".but not find many results. can suggest me if there way zoom cell in tableview? can't place scrollview in tableview cell? any approach appreciated. tnq i facing issue. solve issue next way: have added pinch gesture recognizer cell of tableview , applied next code : (void)scalepiece:(uipinchgesturerecognizer *)gesturerecognizer { if ([gesturerecognizer state] == uigesturerecognizerstatebegan || [gesturereco...

What's wrong with this Apache rewrite rule? -

What's wrong with this Apache rewrite rule? - here's .htaccess : rewriteengine on rewriterule ^([^/]+)$ /index.php?id=$1 [l] and requests maintain causing 500. you entering rewrite loop. alter this: rewriteengine on rewritecond %{request_uri} !^/index\.php [nc] rewriterule ^([^/]+)$ /index.php?id=$1 [qsa,l] or (should have same effect behind): rewriteengine on rewritecond %{request_filename} !-f rewriterule ^([^/]+)$ /index.php?id=$1 [qsa,l] apache mod-rewrite

.net - C# client library for subscribing/publishing MQTT (Really Small Message Broker) -

.net - C# client library for subscribing/publishing MQTT (Really Small Message Broker) - i need implement force notification android there not net access , intranet access available. think cannot utilize c2dm , 3rd party api urbanairship. thinking of using mqtt rsmb(really little message broker), c# .net publisher broker , wmqtt.jar android subcriber broker. i have downloaded rsmb , found followings exe: -broker.exe -stdinpub.exe -stdoutsub.exe i have subscribed android , published messages using stdinpub.exe topic. i advice guys on followings : 1).is rsmb free? there other alternatives suit case? 2).how able connect rsmb broker using c# (for publishing , subscribing). there c# client library rsmb? 3).how performance , reliability of mqtt ? might need force few hundreds of messages @ same time. 4).if there no other ways thinking of executing stdinpub.exe within c# application.(it might sound bad). i find there little info mqtt on web , should go way or ther...

javascript - How do I submit a poMMo mailing list form using Ajax without refresh? -

javascript - How do I submit a poMMo mailing list form using Ajax without refresh? - i have searched on here ways this, simple ajax submission forms have been asked about. if not familiar pommo, mailing list management software allows developers implement custom forms onto websites sole purpose of collecting emails mailing lists. possible merge ajax , pommo forms together? the code have been using is: test.php <form action='_test.php' method='post' class='ajaxform'> <input type='text' name='txt' value='enter e-mail address'> <input type='submit' value='submit'> </form> </head> <div id='testdiv'></div> _test.php <?php $arr = array( 'testdiv' => $_post['txt'] ); echo json_encode( $arr ); ?> jsfile.js jquery(document).ready(function(){ jquery('.ajaxform').submit( function() { $.ajax({ url ...