Posts

Showing posts from July, 2010

actionscript 3 - Robotlegs Logout -

i building robotlegs app have login in order use it. when loggin have numerous mediators,injectors,models,vos etc. should remove when 1 logs out? thanks in advance. this tough answer, since question kind of vague. more details inner structure helpful. depending on situation, may need remove navigation elements let user access content require them logged in. if user represented persistent object, use isloggedin flag check when user tries doing requires them logged in. again, tough answer because of question's vagueness, don't think there's specific robotlegs need do, it's more application design.

Memory allocation for Java Webstart Application -

i'm using java webstart application called blast2go i'm running problems memory allocation. needs load large data set memory, i've been trying allocate 3-6gb application. however, no matter set max heap size, uses 455mb (as indicated message bar: 'memory usage: xxmb of 455mb'). i've tried setting reasonable levels (1024 mb), still 455mb allocation. any ideas? btw, i'm using ubuntu 10.04 32-bit 24gb memory, 8 procs. update : here jnlp provide. same result when edit values of initial-heap-size , max-heap-size attributes. <jnlp spec="1.0+" codebase="http://bioinfo.cipf.es/blast2go/webstart" href="http://bioinfo.cipf.es/blast2go/webstart/makejnlp.php?mem=3072"> <information> <title>blast2go 3072m</title> <vendor>cipf - upv - ivia</vendor> <homepage href="http://www.blast2go.org"/> <description>blast2go 3072m</description> <description kind="short&

ruby on rails - Phusion Passanger, Apache 2, mysql and Linux -

ok here deal. i've got linux jbw server, , it's running apache2. i've installed phusion passanger on top of that, , when restart apache2 can see points default ror website. when click "about server", following error. internal server error the server encountered internal error or misconfiguration , unable complete request. please contact server administrator, webmaster@localhost , inform them of time error occurred, , might have done may have caused error. more information error may available in server error log. apache/2.2.9 (debian) phusion_passenger/3.0.0 php/5.2.6-1+lenny9 suhosin-patch mod_python/3.3.1 python/2.5.2 mod_perl/2.0.4 perl/v5.10.0 server @ www.(my website name).com port 80 i have no idea phusion , documentation isn't helpful - start begin debugging this? also can't gem work, seems phusion doesn't default install ruby gem - if case how install other gems application?? may feel soooo lost! there website can take me step st

xcode - Tab Bar Controller- switch UIView within one tab -

ok here applications setup: 2 xib's mainwindow.xib newsletterview.xib set follows: mainwindow.xib files owner first responder delegate window tab bar controller--setup load tabs .xib's 2 tabs -newsletter -map i'm not concerned map tab. within newsletterview.xib ( have .h , .m files setup) files owner set class newsletterviewcontroller via interface builder. first responder , 2 views: view- setup newssignupview via iboutlet - first view loads on selected tab. view - setup newsreaderview via iboutlet i want able click button (assigned via ibaction) on newssignupview flip horizontally reveal newsreaderview. this have far: -(ibaction) revealnewsreaderview {cgcontextref context = uigraphicsgetcurrentcontext(); [uiview beginanimations:nil context:context]; [uiview setanimationtransition: uiviewanimationtransitionflipfromleft forview:newssignupview cache:yes]; [uiview setanimationcurve:uiviewanimationcurveeaseinout]; [uiview setanimationduration

msbuild - How-to Transform Web.config Custom Sections With MSDeploy? -

is there way transform web.config custom sections values when using msdeploy ? <configsections> <sectiongroup name="mygroup"> <section name="data" type="myapp.dataconfigurationsection, myapp.data" /> </sectiongroup> </configsections> <mygroup> <data interval="3" usecache="true" /> </mygroup> according build configuration need exemple change "usecache" value. write transformation in config transformation file (web.config.release) <?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform"> <mygroup> <data usecache="false" xdt:transform="setattributes(usecache)" /> </mygroup> </configuration>

How do I access a Rails configuration value during runtime? -

i'm using rails 2.3.x. small section of code run if , if config.cache_classes true. default, that's true production , false development. how access value of config.cache_classes outside of environment.rb, development.rb, , production.rb files? it's easy tell if in production or development, rails.env give answer. there's no guarantee developer hasn't set config.cache_classes = true in development. i understand not want run separate code paths in development , production. in particular instance, not performing work on startup; if need perform later, so, both in development , production. for rails 2, can do: rails.configuration.cache_classes if ever switch rails 3, it'll different; can access same value with: rails.application.config.cache_classes

actionscript 3 - How to buffer stream when the video is paused with flash -

i need feature of allowing buffering video when it's paused, cannot find how directly... i notice that, when pause video, event "netstream.buffer.flush" triggered. , according language reference: "data has finished streaming, , remaining buffer emptied.", have re-buffer it, right? however, according reference, shouldn't stop buffering: starting flash player 9.0.115.0, flash player no longer clears buffer when netstream.pause() called. behavior called "smart pause". before flash player 9.0.115.0, flash player waited buffer fill before resuming playback, caused delay. i'm using flash professional debugging, , traced version number is: mac 10,0,22,91; , streaming server, use red5. , if you're interested code, here is: http://pastebin.com/kwtfieh9 i'm totally confused. push appreciated much! here's example on wondefl.net based on code

mysqli - MySQL: Adding a row with a certain value if it isn't in the table -

i have table setup unique column called, example, test . want insert row column test if there isn't row in table test . know insert query , throw error if existed (and wouldn't cause harm afaik), there way using mysql? i'm pretty sure can done functions i've never used before , think there's easier way. thanks help, appreciate it! sounds job insert ignore : if use ignore keyword, errors occur while executing insert statement treated warnings instead. example, without ignore, row duplicates existing unique index or primary key value in table causes duplicate-key error , statement aborted. ignore, row still not inserted, no error issued.

android - How to add tabs dynamically that can be linked to a users choice of webpage -

i developing application uses tabs each tab being linked webpage user able see , interact using webview. having trouble implementing add command user able use add tab url of choice works others below code here main java file other files use public class universityofcolorado extends tabactivity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); tabhost host=gettabhost(); host.addtab(host.newtabspec("one") .setindicator("google") .setcontent(new intent(this, hello.class))); host.addtab(host.newtabspec("two") .setindicator("colorado main site") .setcontent(new intent(this, coloradomainsitebrowser.class))); host.addtab(host.newtabspec("three") .setindicator("culearn") .setcontent(new intent(this, culearnbrowser.class))); host.addtab(host.new

javascript - copy contents of div to clipboard -

possible duplicate: how copy clipboard in javascript? is there way copy contents of div clipboard using javascript/jquery without using external plugin? basically can ie, browsers need flash p.s best solution http://code.google.com/p/zeroclipboard/ , not answer in question couple of people have linked already

python - How to order descending by a field in a different model in django models? -

here example how order descending: entry.objects.filter(pub_date__year=2005).order_by('-pub_date', 'headline') so can use: '-pub_date' . , example how order field in model: entry.objects.order_by('blog__name', 'headline') so can use: 'blog__name' . how can both in 1 query? 'blog__-name' doesn't work. you want '-blog__name' .

synthesis - Is $readmem synthesizable in Verilog? -

i trying implement microcontroller on fpga, , need give rom program. if use $readmemb, correctly synthesized rom? if not, standard way this? i amend george's answer depends on synthesis tool whether or not $readmemb synthesizable. altera's recommended hdl coding styles guide includes example 10-31 (page 10-38), demonstrates rom inferred $readmemb (reproduced below): module dual_port_rom ( input [(addr_width-1):0] addr_a, addr_b, input clk, output reg [(data_width-1):0] q_a, q_b ); parameter data_width = 8; parameter addr_width = 8; reg [data_width-1:0] rom[2**addr_width-1:0]; initial // read memory contents in file // dual_port_rom_init.txt. begin $readmemb("dual_port_rom_init.txt", rom); end @ (posedge clk) begin q_a <= rom[addr_a]; q_b <= rom[addr_b]; end endmodule similarly, xilinx's xst user guide states that: the $readmemb , $readmemh system tasks can used

Regarding JavaScript new Date() and Date.parse() -

this code : var exampledate='23-12-2010 23:12:00'; var date=new date(exampledate);//returns invalid date var date1=date.parse(exampledate);//returns nan i want convert above string date. have written code have seen above. this code running fine in ie , opera , date variable returning me invalid date , date1 returning nan in mozilla firefox , should do? above format supported in ie , chrome. so try formats. following formats , there supporting browsers. <script type="text/javascript"> //var datestring = "03/20/2008"; // mm/dd/yyyy [ie, ff] var datestring = "2008/03/20"; // yyyy/mm/dd [ie, ff] // var datestring = "03-20-2008"; // mm-dd-yyyy [ie, chrome] // var datestring = "march 20, 2008"; // mmmm dd, yyyy [ie, ff] // var datestring = "mar 20, 2008"; // mmm dd, yyyy [ie, ff] // initalize date object passing date string variable var mydate = new date(datestring); alert(my

javascript - Move Rows up and down in html table -

possible duplicate: swapping rows in jquery how move rows , down in table on button click? try using jquery. can like: <table id="mytable"> <tr> <td>row 1</td> <td><input type="button" value="move up" class="move up" /></td> <td><input type="button" value="move down" class="move down" /></td> </tr> ... </table> $('#mytable input.move').click(function() { var row = $(this).closest('tr'); if ($(this).hasclass('up')) row.prev().before(row); else row.next().after(row); }); look @ working here . you can try jquery's sortable , much easier .

How to send "Ctrl + C" event to a Qt widget? -

i want "ctrl+c" event qt widget, qlineedit when person presses copy icon of application. how should ? make qlineedit when user presses "ctrl + c" (i.e. copy) ? just clarification : widget may not qlineedit. in 1 of cases, qwebview. now, displays web page, in there may text fields of own. want paste on text fields. possible if text fields embedded inside web page feel user has presses "ctrl+v". qcoreapplication::postevent 2 qkeyevent s (qevent::keypress , qevent::keyrelease)

Suggestions about Lightweight Open Source Web Servers which can support Web Services written in Java -

i looking lightweight open source web servers can support web services written in java. my basic requirement should occupy less ram possible @ runtime , should support web services written in java. the target number of concurrent users around 100-150. any highly appreciated. thanking in advance. jetty open-source application server embeddable (i.e. has low memory footprint runs on mobile phones, etc.).

ruby on rails - Paperclip.interpolates randomly not returning a value -

i have following paperclip setup in model: #paperclip photo has_attached_file :photo, :styles => { :large => '1024x758>', :medium => "200x150#", :small => "50x50>" }, :default_style => :original, :default_url => '/images/:attachment/default_:style.png', :path => ":instance_id/:attachment/:id/:version/:style/:basename.:extension", :storage => :s3, :s3_credentials => file.join(rails.root, 'config', 's3.yml'), :s3_protocol => 'https' for instance_id have following: paperclip.interpolates :instance_id |attachment, style| def instance_id(attachment, style) attachment.instance.instance_id end end what's happening when first fire server,

html - How to change background color of readonly textbox in css -

how change background color of readonly textbox in css there many unkowns in question. browser want support? if textbox seem use asp.net, there no tag @ question. generally said, behaviour between browsers different. consider following html <html> <head> </head> <body> <input type="text" disabled="disabled" value="this test" style="background-color:black; color:lime;" /> </body> </html> ie8 renders background color properly, disabled controls have gray text shadows. mozille firefox beside renders control correct , sure there difference on different browsers , between browser versions (ie6 interprete color values correctly too). if want have html regardless browser use, have use span or other inline element, format border , colors want, instead of using input element.

java - writing to a message router through a socket -

i trying write program can write messages messagerouter through socket.how can accomplished ? have written socket program connect client server through socket.but need..? making messagerouter run on server side ,can accomplish goal....? hope have understood requirement is..? please share information have regarding this.? thanks. start reading tutorials, e.g. http://download.oracle.com/javase/tutorial/networking/sockets http://www.oracle.com/technetwork/java/socket-140484.html when finish reading , still have questions come , ask. guys happy you. enjoy!

Xcode - many windows -

i have confusing problem in xcode. the problem occures in single project , started few days ago (don't know caused it). i need see many parts of code in different files code something, double click file xcode's sidebar , opens in new xcode window (a little bit simplified main window). when same next file, next window shown (so should have 3 windows now), in project it's not. previous window replaced title , content on new file. it's annoying - can't see @ once localization file, , both .h , .m file of class i'm working on. does knows solution? repeat - it's in project - in other project works fine. i have 3.2.5 version, present in previous well. once open new window click on group/ungroup button @ right hand top. solve problem.

c# - Web service call - underlying connection closed -

we have asp.net web service, framework 2.0 running under iis 7 + windows 2008. after working fine in integration , qc service has moved production , calls service bomb out. added test method returns string- works others take complex types don't. here stack trace: the underlying connection closed: unexpected error occurred on receive. system.web.services @ system.web.services.protocols.webclientprotocol.getwebresponse(webrequest request) @ system.web.services.protocols.httpwebclientprotocol.getwebresponse(webrequest request) @ system.web.services.protocols.soaphttpclientprotocol.invoke(string methodname, object[] parameters) at httpett.log says: connection_abandoned_by_reqqueue we've tried switching classic mode, re-registering asp.net , considering rolling out in prod on w2003. any ideas anyone?

c++ - How will be a reference treated in these cases? -

i know when reference parameter of function , function inlined, possible reference referent , not pointer it, when reference not parameter local function or global, or output of function inlined: //global scope void somefunc(sometype & ref){//when function inline, it's possible ref referent //function body } int num=7; int & ref=num;//what ref here? void somefunc1(){ int num=6; int & ref=num;//what ref here? //rest of function body } int & somefunc2(){//what output reference here when function inlined, num or pointer ? int num=8; return num; } david rodríguez - dribeas pointed out in comment standard gives compilers quite bit of latitude, when comes references. may or may not take space; they're not proper objects themselves, etc. the behavior describe function arguments of reference type (eliminated during inlining) typical freedom compilers have when comes references. it's freedom, not obligation them. may not possible either: when

Is the {% csrf_token %} CSRF protection tag still necessary in Django 1.2? -

i testing csrf protection on site , have noticed unexpected. i removed {% csrf_token %} form , submission still works. couldn't work out why. looked @ source , realised token still there right next <form> element. changed id of form make sure updating source , hidden input still there. i using django 1.2. {% csrf_token %} still necessary? cheers rich after more investigation appears {% csrf_token %} inserted if form has method post , not if doesn't. clever auto protection django.

sql - Alter Table Alter Column failing for resizing columns -

alter table table_name alter column column_name is failing while changing column int bigint on sql server 2005 sp1 (32-bit). the same is, however, passing on sql server 2005 sp1 (64-bit) , sql server 2008. has experienced before? can point me bug raised ms or article pointing this? edit: error message is: possible schema corruption. run dbcc checkcatalog. msg 0, level 20, state 0, line 0 severe error occurred on current command. results, if any, should discarded. upgrading sql server 2005 sp2 fixes issue. apparently there no bug ever raised this. thanks

do jquery.jeditable plugin works on mouse click? -

i working in mvc & using jquery.jeditable plugin inplace editing in grid.it working fine when make changes & click on enter button. can please let me know how can same editing when click mouse outside grid somewhere else on page. please let me know asap. thanks add onblur: 'submit' initialization options. $('#element').editable('url', { onblur : 'submit' });

Select the ids from an array of jquery elements -

with following jquery statement select array of elements: selectedsupplierids = $('.supplierlistcheckbox:checked'); i need select ids these elements. can without creating array , pushing ids in loop? you can use .map() array of based on object selection...in case want .id property each, this: var arr = $('.supplierlistcheckbox:checked').map(function() { return this.id; }).get();

Internet explorer problem opening same url -

i have quite serious problem internet explorer. i developing flex application (though irrelevant have verified problem ie). in application, need perform http service request submitting data. works fine no problem... first time! when submitting same url second time (for request), seems ie recognises same page , doesn't bother doing it. i checked submitting url (without flex application calling it) , same problem there. checked in firefox and, lo , behold, working no problem! you can see behaviour if go google.com , highlight address bar url , hit enter again. there noticeable difference between doing , pressing f5 (to refresh). does know way force ie url each time (like it's supposed to). i've looked in advanced settings couldn't find anything. easy, don't worry ;) what take url , add ?x=rand , rand random number add string. make url different without affecting it, avoids problem :)

asp.net - vbscript how to read the url a visitor has entered from? -

a page have visited users 2 domains. lets call them x.com , y.com i want of code display when user visits y.com- how do in same vbscript file? or have have separate files? i thinking if request.something.contains("x") etc try request.servervariables("http_referer"). you'll notice referer misspelled; that's because http_referer set in stone in rfc 1945 before caught spelling error. more info

BlackBerry maps location document with multiple points -

when implement blackberry maps in application using code rim in how - invoke blackberry maps , map works fine ontario points, when use latitude 13.083333 , longitude: 80.283333, not work. what dot? on skipping dot, shows incorrect position. string document = "<lbs> <location lon='-8030000' lat='4326000' label='kitchener, on' description='kitchener, ontario, canada' /> <location lon='-7569792' lat='4542349' label='ottawa, on' description='ottawa, ontario, canada' /> "; the right way multiply lat & long 100,000 , cast integer value, this: // lat & long times 100,000, converted integer int lon = (int) (80.283333 * 100000); int lat = (int) (13.083333 * 100000); string label = "label of point on map"; string desc = "description of point when clicked"; // create location element stringbuffer sb = new stringbuffer(); sb

block - Erlang bittorrent pieces request -

i'm working on bittorrent client in erlang. i'm trying request blocks , build , verify piece downloaded blocks. works long not last piece (which of different size other pieces). seems if last piece downloaded can't seem match hash of against hash retrieved torrent-file. guess i'm not asking solution here, rather if there's in particular should keep in mind when comes hash of last piece. there? no, there not. last piece sha1-hashed others, albeit smaller. my guess have bug around handling last block , or piece correctly. 1 way, if glancing @ code fails, test known torrent , compare received pieces should have received. start printing out last block when , compare file.

How to import a .cer certificate into a java keystore? -

during development of java webservice client ran problem. authentication webservice using client certificate, username , password. client certificate received company behind webservice in .cer format. when inspect file using text editor, has following contents: -----begin certificate----- [some base64 encoded data] -----end certificate----- i can import file certificate in internet explorer (without having enter password!) , use authenticate webservice. i able import certificate keystore first stripping first , last line, converting unix newlines , running base64-decode. resulting file can imported keystore (using keytool command). when list entries in keystore, entry of type trustedcertentry . because of entry type (?) cannot use certificate authenticate webservice. i'm beginning think provided certificate public certificate being used authentication... a workaround have found import certificate in ie , export .pfx file. file can loaded keystore , can used authentic

actionscript 3 - getting value from a list -

i have xml looks this: <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/atom" version="1.0" xml:lang="en"> <title type="text">google hot trends</title> <subtitle type="text">what people searching on google today?</subtitle> <id>http://www.google.com/trends/hottrends/atom/hourly,2007-08</id> <link href="http://www.google.com/trends/hottrends/atom/hourly" rel="self"/> <updated>2010-12-01t14:03:30z</updated> <entry xmlns="http://www.w3.org/2005/atom"> <id>2010-12-01t14:03:30z</id> <title type="text"><![cdata[rosa parks, adam levine girlfriend, meet famous, ...]]></title> <content type="html"><![cdata[<ol> <li><span class="mild up2"><a href="http://www.google.com/trends/hottrends?q=rosa+par

cocoa - Application crashing due to unicode characters in string -

i making application in have store data remote db local sqlite3 db. problem - when string inserted contains unicode character such as: \u00a0 or \u2022 or \u2019, crashes. the part of code crashes this- nsstring *insertquery = @"insert xyz(field1,field2) values (@"1",[recorddict objectforkey:@"field2"]); // recorddict contains value: @"\u00a0 \u00a0 \u00a0 \u00a0the cadfsdfsdfptain\u2019s" key: @"field2" sqlite3_stmt *insertstmnt; const char *sql = [insertquery cstringusingencoding:1]; printf("insertquery - %s",sql); // showing insertquery - (null) , crashing @ next line if(sqlite3_prepare_v2(database, sql, -1, &insertstmnt, null) != sqlite_ok){ nslog(@"error while creating insert statement. '%s'",sqlite3_errmsg(database)); } can suggest me how resolve problem? thanks, miraaj cstringusingencoding: returns null when string cannot losslessly converted specified encodin

c# - Strange 'sidebar effects' associated with hiding sidebar from a button event -

i have 2 step wizard control button on each step , detailview on second step hooked objectdatasource select , insert methods defined. button on first step of wizard hides wizard side bar using displaysidebar=false , programatically navigates second step. button on second step unhides side bar using displaysidebar=true , navigates first step. i have discovered when use button on first step navigate second step sidebar hidden , attempt insert record detail view detail view disappears after clicking 'insert' yet if restart wizard , navigate second step using sidebar insert operation goes thru correctly. any ideas cause this? microsoft bug? if there 1 step want hide sidebar on, can set complete step in xhtml. <asp:wizardstep steptype="complete" ...

disable macro when opening word documents using office interop apis -

hi how disable macros when opening documents using office interop apis. using office 2007. thanks in advance if you're automating using vb.net, it's quite easy - see thread example of disableautomacros : how open document contains autoopen macro powershell? . never able figure out how in c# though.

java - Android Resource - Array of Arrays -

i trying implement resource data structure includes array of arrays, strings. issue run how sub-array objects , specific values. here resource file looks like.... <resources> <array name="array0"> <item> <string-array name="array01"> <item name="id">1</item> <item name="title">item one</item> </string-array> </item> <item> <string-array name="array02"> <item name="id">2</item> <item name="title">item two</item> </string-array> </item> <item> <string-array name="array03"> <item name="id">3</item> <item name="title">item three</item> </string-array> </item> </array> </resources> then,

C++ file container (e.g. zip) for easy access -

i have lot of small files need ship application build , want put files archive make copying , redistributing more easy. idea of having them in 1 place need compare md5 of 1 file in case goes wrong. i'm thinking class can load archive , return list of files within archive , load file memory if need access it. i searched internet different methods of achieving want , found out zlib , lzma sdk. both didn't appeal me because don't found out how portable zlib , didn't lzma sdk , don't want blow application because of problem. downside zlib don't have c/c++ experience (i'm new c++) explained in manual. i have add time critical problem. though time implementing simple format tar in way can easy access files within application didn't find time yet. so i'm searching library allows me access files within archive. i'd glad if point me in right direction here. thanks in advance, robin. edit: need archive accessed under linux , windows. sorry

python - sqlalchemy mysql server has gone away -

i've read through number of similar problems, none seem fix issue. i'm running pylons app , using sqlalchemy connect 2 databases. primary, configured through config file works without issue. i'm trying connect second database initializing class defined in model so: class db2(object): def __init__(self): self.engine = sa.create_engine('mysql://someaddress:3306/database', echo=false, pool_recycle=1800) self.meta = sa.metadata(self.engine) <define tables> <define mappings> session = orm.sessionmaker(bind=self.engine, autoflush=false, autocommit=false) self.session = session() i thought defining pool_recycle there (with time matches working database) enough prevent this, it's not. can recommend solution? thanks. i've had same problem recently, , solved ensuring closes transaction, after selects. add db2.session.commit() each place it, , should start cycling connections.

Set breakpoint in C or C++ code programmatically for gdb on Linux -

how can set breakpoint in c or c++ code programatically work gdb on linux? i.e.: int main(int argc, char** argv) { /* set breakpoint here! */ int = 3; a++; /* in gdb> print a; expect result 3 */ return 0; } one way signal interrupt: #include <csignal> // generate interrupt std::raise(sigint); in c: #include <signal.h> raise(sigint); update : msdn states windows doesn't support sigint , if portability concern, you're better off using sigabrt .

javascript - Why do we not just use Minified JS? -

i see word alot "minified" , never seem pick script (ie. jquery plugins) "minified" suppose should. if i'm right minified means remove unecessary stuff source code without changing functionality, why dont have minified source , why bother full blown version? why give people option? yolo when you're debugging, it's lot easier have full source code. it's pretty difficult debug when says on line 1 (since condensed 1 long line), , unreadable line 1 matter. i test using full blown version, , minify deployment.

language agnostic - Get File Creation Date Over HTTP -

given file on webserver (e.g., http://foo.com/bar.zip -> accessible through http), there way date attributes (e.g., date [created, modified]) without downloading entire archive in first place? right now, download archive , read attributes programmatically. trouble archive dozens of mib seems waste of resources download entire thing , end reading off couple of bytes of information. i realize bandwidth practically free, don't wasteful in case. try read last-modified header

visual studio 2008 - Help creating a remoteapp installer(msi) in VS2008 -

hi guys have coded application need support remote install, can guide me on how create msi? thanks that's broad question , answer going depend on application , it's deployment needs are. maybe book started: wix: developer's guide windows installer xml

JavaScript help needed (YQL and JavaScript) -

i have "adapted" javascript code display funfacts (in case movies and/or history) however, built display 1 fact @ time, user needs press button display funfact. my question is, there way display facts @ once , not 1 @ time? function funfacts(o){ var facts = document.getelementbyid('funfacts'); facts.classname = 'js'; if(facts){ var data = o.query.results.p; var link = facts.getelementsbytagname('a')[0]; link.innerhtml = '(see facts)'; var out = document.createelement('p'); out.classname = 'fact'; facts.insertbefore(out,link.parentnode); function seed(){ var ran = parseint(math.random()*data.length); out.innerhtml = data[ran]; } var b = document.createelement('button'); b.innerhtml = 'get fact'; b.onclick = seed; link.parentnode.insertbefore(b,link); seed(); } } <script src="http://query.yahooapis.com/v1/public/yql?q=se

windows - Exclude certain URL's from ISAPI Rewrite 3's URL Rewrite -

i'm building drupal cms website on iis 6 , using isapi rewrite 3 make url's more readable. problem have virtual directory located within drupal site points local directory outside of drupal website folder. not want isapi rewrite rewrite urls pertaining virtual folder. example: www.domain.com - rewrite everything www.domain.com/pdf/ - exclude url rewrites is possible? other info: drupal version 6.19 -- isapi rewrite 3 -- iis 6 -- windows server 2003 r2 edit #1: folder excluded contains pdf documents. when try open pdf via url (e.g. www.domain.com/pdf/thisdocument.pdf) gives me 404 page not found error - handled isapi rewrite. i'm pretty sure can use rewritecond (http://www.helicontech.com/isapi_rewrite/doc/rewritecond.htm): rewritecond %{request_filename} !(^/pdf/) rewriterule (your rule here) you can use rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule (your rule here) to exclude existing files or direct

How to translate custom post type content in Wordpress 3? -

i using wpml in wordpress site, , noticed cannot translate custom post types. does know workaround, or alternative wpml, let me this? if you're using latest version of wpml need install 'translation management' add-on , on admin page have activate wpml custom post type. hope helps

silverlight 4.0 - Problem loading a referenced assembly in Visual Studio 2010 -

Image
here's official problem reported compiler. could not load assembly file:///q:\libraries\v2.0\v4.0.30319\silverlight.dll. assembly may have been downloaded web. if assembly has been downloaded web, flagged windows being web file, if resides on local computer. may prevent being used in project. can change designation changing file properties. unblock assemblies trust. see http://go.microsoft.com/fwlink/?linkid=179545 more information. now i've been programmer , did research fix this. here's i've tried far. copy assembly fat32 drive (flash drive) , back. unblock assembly hitting unblock button in file properties. (actually never have been able work since button isn't there begin with) use type command in command prompt short of disabling feature, i'm not sure how fix problem. happens, doesn't. should mention q: drive network drive on separate server. machine running windows 7. assembly silverlight.dll library cre

Restrict the min/max zoom on a Bing Map with v7 of the AJAX control? -

i'm working on site makes use of v7 of bing maps ajax control. 1 of things need restrict zoom level prevent users zoom in past level, or zoom out past level. i found "getzoomrange" method on map object, after inspecting it, returns object literal "min" , "max" properties. so, figured overloading trick: // "map" our bing maps object map.getzoomrange = function () { return { max: 14 min: 5 }; }; ...but no. has no effect (it has appearance of zoom slider when using default dashboard). hijacking event , preventing proceeding seems have no effect. according bing maps support, way (which isn't particularly elegant, , results in unwelcome jitter on map) follows: // "map" our bing maps object, overload built-in getzoomrange function // set our own min/max zoom map.getzoomrange = function () { return { max: 14, min: 5 }; }; // attach handler event gets fired whenever map

Coldfusion session management and locking varables -

i've been reading locking various persistent variables, application, session, etc. , understand race conditions exists reading application variables updated often. i'm not sure session variables , application variables don't change. on single server , cf9. i'm locking session variables when set them, necessary lock them when reading them. doesn't each user have own set of session variables. how changing values 1 user effect different user viewing same page @ same time. also, set application variables in application.cfc file , not change. locks needed every time read application.dsn variable? thanks, gary you don't need lock session variables unless have part of app going modifying user's session directly (which part of undocumented feature in cf, it's not you're doing anyway). as application variables, shouldn't need lock either if you're setting them once , never messing them again.

Split testing transactional emails -

i'm trying figure out solution manage our transaction emails (such welcome email, you've got bid, etc...) we able allow marketing manage content of emails, , create split tests test content / subject lines / etc... ideally invent our own success metrics report email management system (such user completed registration, accepted bid, etc...). right have our emails in templates using stringtemplate. code replaces tokens correct content email. strongmail potential solution, pricey - have experience alternatives? have taken @ postageapp ? currently, it's layer between web app , smtp server has additional features transactional emails. with postageapp, able create 2 different templates , have them triggered alternately different content , subject lines. however, metrics want use a/b testing aren't built system yet, i'm not sure if fit you. full disclosure: work working group, company created postageapp. but if have questions can , can't,

PHP return error when using fgetcsv -

possible duplicate: mysql_fetch_array() expects parameter 1 resource, boolean given in select hi i'm trying process csv fgetcsv i'm going infinite loop of errors warning: fopen("tile","user"...) in testcsv.php on line 5 warning: fgetcsv() expects parameter 1 resource, boolean given in /home/ratena/public_html/proc_files/testcsv.php on line 6 <?php $uploadcsv = "/home/ratena/public_html/temp/files/batchloadpm15.csv"; $filecsv = file_get_contents($uploadcsv); //$batchid = $_post['batchid']; $handle = fopen("$filecsv", "r"); while (($data = fgetcsv($handle, 100000, ",")) !== false) { print_r($data); } ?> this part having problem /* un-necessary */ $filecsv = file_get_contents($uploadcsv); /* expecting file in */ $handle = fopen("$filecsv", "r"); try replace 3 lines $handle = fopen($uploadcsv, 'r'

Printing PDF files -

i have pdf file (generated scanning) , want set mechanism prior print, prompt enter field (control number) , field printed in evey page of document. how can this? you can use itextsharp add text pdf , can use ghostscript send pdf printer.

Javascript popup window (minimum) height -

i creating simple popup window , window height not resize 30 pixels. defaults 100 pixels. behavior appears in browsers. missing something? var mywindow; function openwindow(url) { var windowfeatures = "width=530,height=30,status,resizable=no,scrollbars=0"; mywindow = window.open(url, "welcome", windowfeatures); } here link <a href='javascript:void(0)' onclick=openwindow('http://www.stackoverflow.com')> open window </a> no, way works. "features" pass in window.open requests, , browser free ignore or of them. browsers and/or underlying os impose minimum width , height windows -- there nothing can alter via javascript.

simple use of jquery .css, .height, .width breaking in asp.net -

i trying use jquery resize div containing 100% height/width image in asp.net page. have code works fine simple html page. here is: <html> <head> <title>image resize example</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#sizeselect").change(function() { var newdim = $(this).val(); $("div.pillcontainer").height(newdim); $("div.pillcontainer").width(newdim); }); }); </script> <style type="text/css"> div.pillcontainer { width: 70px; height: 70px; display: block; margin: 20px; } div.pillcontainer img { width: 100%; height: 100%; } </style> </head> <body> <div class="pillcontainer"><img src=&q

c# - Programmatically read from library -

i have document library named "xsl library" bunch of xsl's... , need read file (anyone one) there can use transform xml renders webpart... layout out of webpart determined xsl... how can it? notes: enviroment -> sharepoint 2007 so looks need server side code: spfile xslfile = spcontext.current.web.getfile("/myweb/myxlslibrary/myxsl.xsl"); stream xslstream = xslfile.openbinarystream(); then code similar 1 provided vlad above make transformation. see msdn more info on functions used - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getfile.aspx , http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.openbinarystream.aspx .

Android NDK incremental build -

i'm working on large android app using massive amount of c++ code. compiles , runs, far good. unfortunately, every time modify in structure of native source (add/delete/rename/move file), happens pretty often, ndk-build rebuilds whole source, untouched files. does know how can set android ndk build incrementally somehow? thanks in advance i got fed ndk build system, studied bit, , wrote own makefiles. not hard. however, pointed out me doing this, have take responsibility tracking future changes platform, example if becomes necessary ship binaries additional processor types, i'd have modify homegrown build solution too. in other contexts, i've had projects 2 build systems - 1 quick experiments, deployable builds. time spent updating both , saved many times in speed gain daily work. provided had real build @ least every week or two, things never got far out of consistency (and both build scripts in revision control system, there history examine). d

iphone - Fastest way to load arrays of vertices and face indices into OpenGL-ES? -

i'm trying load .obj files i've formatted into: vertexx vertexy vertexz normalx normaly normalz and: index1 index2 index3 format vector , vector arrays, directly render in opengl-es. problem is, when try load model arrays, takes 40 seconds load them in. i'm not sure why it's going slow, i've seen others code load same model in few seconds. suggestions? code loading file below: -(void)loadmodel:(nsstring*)filepath { try { ifstream objfile([filepath utf8string]); objfile >> numvertices; objfile.ignore(128, '\n'); vertices.resize(numvertices*6); vertexnormal* vertex = (vertexnormal*) &vertices[0]; svec3* facedef; while (objfile) { char c = objfile.get(); switch (c) { case 'v': { objfile >> vertex->vertices.x >> vertex->vertices.y >> vertex->vertices.z >> vertex->normals.x >> vertex-&

Azure + Windows phone 7 -

i planning on photo app, , want know how upload/ download images windows phone 7 blob storage access table storage. don't mind placing access key on application, since app planned distributed internally only. since azure api not available can tell me how can same ? you can: use azure blob api directly (including key on phone) abstract blob operations behind server-side web service i recommend check out article steve marx on accessing azure blob silverlight . covers wide range of topics including shared access signatures , how work azure blob api.

jquery tabs not working using BBQ plugin -

i have question... , problem. i'm using bens hashchange.js make links www.site.com/abc.php#123.php tract history between tabs. that works great, have tab plug-in inside of 123.php works great if access page via www.site.com/123.php, if try access page hashchange links tabs become broken. this tab code: $(".tab_content").hide(); //hide content $("#files_left_pane > ul.tabs li:first").addclass("active").show(); //activate first tab $("#files_right_pane > .tab_content:first").show(); //show first tab content //on click event $("#files_left_pane > ul.tabs li").click(function() { $("#files_left_pane > ul.tabs li").removeclass("active"); //remove "active" class $(this).addclass("active"); //add "active" class selected tab $("#files_right_pane > .tab_content").hide(); //hide tab content var activetab = $(this).find("a").attr(&q

problem on setting up ruby on rails -

i started learning ruby on rails "lynda ruby on rails 3 essential training". i finished installation, , created rails application writing- "rails new app". after when wrote - "rails server", that's saw: c:\users\oded\sites\simple_cms>rails server c:/ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.r b:2:in `require': 193: %1 not valid win32 application. - c:/ruby192/lib/r uby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (loaderror ) c:/ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my sql2/mysql2.rb:2:in `<top (required)>' c:/ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my sql2.rb:7:in `require' c:/ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my sql2.rb:7:in `<top (required)>' c:/ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti me.rb:64:in `require' c:/ruby1

mysql - understanding join -

im looking @ code: select customers.name customers, orders, order_items, books customers.customerid = orders.customerid , orders.orderid = order_items.orderid , order_items.isbn = books.isbn , books.title '%java%'; and find difficult understand it. first have 4 tables, , code making dynamic table, should @ different order understand better? first, im selecting customer.name, after last code run , have dynamic table, right? should try , line each 2 tables line line using dynamic table made line earlier? and while table being made, data table written or ask in where? ill appreciate help. as far theory goes, when query multiple tables in attempt join table, temporary cross-product of tables involved calculated. imply total number of rows multiplication of number of rows of each table. in practice however, implementation of sql (mysql in case) take care efficiently compute query. query execution path computed, based on various parameters, , used obta