Posts

Showing posts from September, 2010

visual studio 2010 - InstallShield LE "Another version of this product is already registered" -

i'm running roadblock using installshield le in vs2010. second time running resulting setup.exe (with incremented version numbers), error another version of product registered by "incremented version numbers", mean changed minor version, build number , revision larger numbers in assemblyversion , assemblyfileversion of .exe (the dll's set "1.0.*") [assembly: assemblyversion("0.2.103.005")] [assembly: assemblyfileversion("0.2.103.005")] [assembly: assemblyinformationalversion("alpha 0.1 - 2/8/2011")] and updated product version in general information tab of installshield le setup project 0.10.0000 0.11.0000. i did come across instances of error message in other postings , on manufacturer's community support forum, did not find solution applies me. it turns out answer create entry on upgrade paths tab. when that, installshield le present file selection dialog. if have old installer, presumably c

Trouble getting a serial connection communicating between C# and C -

i have microprocessor running c code , computer running c# code. trying them communicate through serial connection (system.io.ports.serialport). have no problems connecting, rather problems communicating. in c# have code send string "rr\n": myseiralport.writeline("rr"); in c (on microcontroller), have code such receive string: gets(str); note stdin stream serialport stream. here's things interesting. test, have bit of code causes led light if str equal "rr". allows observe whether or not microcontroller has received expected. when using hyperterminal, can type "r", type "r", press enter -> , led lights up, signaling has indeed read "rr" serial stream. however, when use above writeline function c#, no such result. i believe boils down functionality of hyperterminal sending character-by-character, , gets() function reads character-by-character until encounters newline. can shed light on how c#

iphone - Under iOS, is there a way to determine which architecture was being executed in a crash report? -

given crash report (non-symbolicated) on ios, there way determine architecture (armv6 or armv7) being executed device? why ask? have received crash reports not associated archived dsym/executable. such, unable symbolicate them automated tools. wanting experiment changing recorded uuid in crash files release dsym preserved (the changes between 2 releases resource file changes[images], compiled code should identical). may allow me use automated tools symbolicate reports , extract meaningful crash data. dwarfdump reveals executable , dsym have match expected, shows there 2 architectures in each (fat binary) armv6 , armv7. able substitute uuids crash reports, need know architecture used device prior crash. to answer original question more directly (i hope), in crash log there "binary images" section. explicitly states architecture running, in: " binary images: 0x1000 - 0x167fff +appname armv7 <8195d6729b973c6190ab00f36dfb1dd6> /var/mobile/applic

join .wav files in android -

i wondering if knew of library or code join .wav files in android os. thanks join 2 wav files java? refer above

python - Choosing a development stack for web based data vis/mining -

i know various folks in community think tool/language choices small team (3-5) developers working build simple data driven applications. want data munging/analysis/datavis. we have hadoop on data crunching end , have javascript on front end. ideally want level of r integration too. my best thought @ moment django, python, using r rpy (http://rpy.sourceforge.net/) , boto (http://code.google.com/p/boto/). are there other alternatives? there significant down/up sides trying go jvm route instead? tools use , why? instead of jvm check rapache , rserve also. well, have no idea though instead of using rpy.

c# - Algorithm to iterate TreeView nodes in reverese from the last leaf to root -

what best algorithm iterate winforms treeview control last leafs roots in reverse? c# the code below visit each node , traverse completely, depth-first, until comes leaf. then, unwinds stack, call dosomethingwithnode each node. depth parameter there show nodes returned in reverse order. void reversetraverse(treenodecollection nodes, int depth) { if (nodes == null) return; foreach (treenode child in nodes) { reversetraverse(child.nodes, depth+1); dosomethingwithnode(child, depth); } } to call it, assuming mytreeview treeview instance: reversetraverse(mytreeview.nodes, 1); note doesn't give deepest leaf nodes first, rather makes sure leaf node output before parent node. if tree looks this: node 1 node 1.1 node 1.2 node 1.2.1 node 2 node 2.1 node 2.1.1 node 2.1.1.1 node 2.1.2 the output order be: node 1.1 node 1.2.1 node 1.2 node 1 node 2.1.1.1 node 2.1.1 node 2.1.2 node 2.1 node 2 if want deep

javascript - JQuery script conflict -

i using jquery lightbox gallery on page jquery slideshow , menu bar, whilst menu bar , slideshow work ok, lightbox not. conflict lightbox see http://concertorestaurant.creativeconnect.com.au/functions_gallery.html working example - menu slideshow http://concertorestaurant.creativeconnect.com.au/home.html appreciate help! i think 1 of javascript files , several of other files in wrong place, errors chrome: style-projects-jquery.css : failed load resource: server responded status of 404 (error: file requested not found.) sprymenubarhorizontal.css : failed load resource: server responded status of 404 (error: file requested not found.) plhim1.js : failed load resource: server responded status of 404 (error: file requested not found.) functions_gallery.html:16 : uncaught typeerror: object # has no method 'lightbox' thumb_image2.jpg : failed load resource: server responded status of 404 (error: file requested not found.) check out third , fourth lines in parti

multithreading - Synchronization of Nested Data Structures between Threads in Java -

i have cache implementation this: class x { private final map<string, concurrentmap<string, string>> structure = new hashmap...(); public string getvalue(string context, string id) { // assume example there innner map final concurrentmap<string, string> innerstructure = structure.get(context); string value = innerstructure.get(id); if(value == null) { synchronized(structure) { // can sure, inner map represent last updated // state thread? value = innerstructure.get(id); if(value == null) { value = getvaluefromsomeslowsource(id); innerstructure.put(id, value); } } } return value; } } is implementation thread-safe? can sure last updated state thread inside synchronized block? behaviour change if use java.util.concurrent.reentrantlock instead of synchronized block, this: ... if(lock.trylock(3, seconds)) {

php - Use compenents from symfony 2.0 in symfony 1.4 -

is possible use compenents symfony 2.0 in symfony 1.4 project. if so, explain how right? i want use new routing in project. i doubt s2 work in s1.x. symfony2 work php 5.3 , greater , uses totally different architecture 1.4. routing key component of architecture chances of working in totally different architecture vanishingly small. use s2 if want it's routing.

java - j2me sms receive works in emulator but does not work in nokia n91? -

i have made j2me sms receive app.when tried in in sun wtk works fine. receives sms in emulator, when tried in nokia n91, not receive it. if want access default sms inbox (port 0 of sms protocol), can't usual virtual machine. can listen specific port , receive sms's sent port. if want that, messages send have destined custom port. here it's topic "discussing" @ nokia forum. regards.

sql server - SQL Error Turkish_CI_AS and SQL_Latin1_General_CP1_CI_AS -

first, sorry long queries :) i have query in sql server 2008 this. , working. select c.hesap_no, b.teklif_no1 + '/' + b.teklif_no2 'teklif', c.mus_k_isim,convert(varchar(10),b.isl_tar,103) 'tarih', sum( isnull(cast(b.odenen_anapara float),0)+isnull(cast(b.faiz float),0)+ isnull(cast(b.bsmv float),0)+isnull(cast(b.gecikme_faiz float),0)+ isnull(cast(b.gecikme_bsmv float),0)) 'yatan', (case when c.doviz_kod = 21 'eur' when c.doviz_kod = 2 'usd' when c.doviz_kod = 1 'tl' end) 'kur', d.t_sr_ack takip a, yaz..mardata.bir_tahsil b, yaz..mardata.s_teklif c,p_takip_sr d b.teklif_no1 = c.teklif_no1 , b.teklif_no2 = c.teklif_no2 , a.t_hesap_no = c.hesap_no , a.t_srm = d.t_sr_id , a.t_statu = 2 , a.t_srm <> 6 group c.hesap_no, b.teklif_no1 + '/' + b.teklif_no2, c.mus_k_isim,b.isl_tar,c.doviz_kod, d.t_sr_ack but, when made little changing on query

android - how to send text message or phone call just like the eclipse emulator does -

i'm making program based on sending many notifications phone. have come across problem making phone act actual call or message know other way achieve this? i need text message/call come program when appears on phone act it's real sms message/call . emulator control in eclipse. i have tried telephonymanager on , on , closest have come trying fake notification manager. ok let me explain better need make activity program sends real text message , phone call phone. ideas? (like else sending phone)

mysql - Symfony/Doctrine: How to iterate through table fields for hydration? -

after making sql query table post wish hydrate $result array doctrine object. right in order use set command each field, below: $post = new post(); $post->setcategory($result['category']); $post->setname($result['name']); $post->setrating($result['rating']); my question is there better way this, such iterating through table fields? thanks. you can use fromarray() : $post = new post(); $post->fromarray($results);

.net - Unit of work pattern -

i'm looking advices unit of work pattern. is commit on unit of work called multiple times or 1 time , leaving object garbage collection? is idea inject unit of work play or should pass around in method call when asking objects perform work? instances of types implement unit of work pattern have single owner needs control lifetime. methods commit , open , close , , dispose strong signals type should controlled explicitly (or placed behind abstraction if appropriate). for reason better not inject unit of work instance itself, inject type knows how create such unit of work: factory. the unit of work in case functions context , when other objects need perform operations in same context (to keep operation atomic instance) need pass it. might this: public class mycommand { private readonly iunitofworkfactory factory; public mycommand(iunitofworkfactory factory) { this.factory = factory; } public void execute() { using (va

vb.net - the parent dialog can move -

i want prevent parent dialog, not move. when dialog process data (17s) can move parent dialog anywhere. you can remove title bar of window removing title text , setting controlbox , maxmimizebox , minimizebox properties false . i think twice before doing this; there very few things annoy me as user, windows position topmost @ center of screen, no option move them away keep on working on else.

php - Automatic INLINE Document Generation -

first off, i'm not asking how generate documentation php source. that's easy enough libraries doxygen or phpdocumentor. i'm looking way automatically generate inline phpdoc-based comment stubs classes, methods, properties, etc. there pre-existing libraries out there can this? i've done bit of searching , have come nothing. i'm asking because have itch wanna scratch writing own. tend spend hours @ time churning out code, saving documentation last step (i know, should go). problem is, while realizing importance of inline documentation, after 8 straight hours of coding , writing dozen classes dozens of methods , properties, it's bit off-putting have screech halt , start writing stuff. obviously, can't create complete documentation automatically. things verbose descriptions of classes, properties , methods have hand-typed. but, using reflection, can derive enough information create comment stubs fill-in-the-blank placeholders. if can assist me in searc

java - When escaping a string with HTML entities, can I safely skip encoding chars above Unicode 127 if I use UTF-8? -

when outputting string in html, 1 must escape special characters html entities ("&<>" etc.) understandable reasons. i've examined 2 java implementations of this: org.apache.commons.lang.stringescapeutils.escapehtml(string) net.htmlparser.jericho.characterreference.encode(charsequence) both escape characters above unicode code point 127 (0x7f), non-english characters. this behavior fine, strings produces non-human-readable when characters non-english (for example, in hebrew or arabic). i've seen when chars above unicode 127 aren't escaped this, still render correctly in browsers - believe because html page utf-8 encoded , these characters understandable browser. my question: can safely disable escaping unicode characters above code point 127 when escaping html entities, provided web page utf-8 encoded? you need use html entities under 2 circumstances: to escape character has special meaning in html (e.g. < ) to display characte

Android post file and text -

i have 2 methods @ moment 1 post file, , post text, below post data... public void postdata() { // create new httpclient , post header arraylist<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(); edittext et = (edittext) findviewbyid(r.id.entry); string enteredname = et.gettext().tostring(); gender(); category(); namevaluepairs.add(new basicnamevaluepair("name",enteredname)); namevaluepairs.add(new basicnamevaluepair("gender",radio)); namevaluepairs.add(new basicnamevaluepair("cat",radio2)); //http post try{ httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://10.0.2.2:90/upload.php"); httppost.setentity(new urlencodedformentity(namevaluepairs)); httpresponse response = httpclient.execute(httppost); } catch (clientprotocolexception e) { // todo auto-generated catch b

c# - How to XML serialize child class with its base class -

i able serialize single type/class there way can serialize base class too? for example: class b:a here able serialize class b how can serialize class ? a must know in advance, i.e. [xmlinclude(typeof(b))] public class {...} public class b {...} now new xmlserializer(typeof(a)) can serialize a or b . can without attributes passing in extratypes parameter overloaded xmlserializer constructor, again - root should a ; i.e. new xmlseralializer(typeof(a), new[] {typeof(b)})

java - JSP Subdirectory problem -- Unable to compile the jsp -

i have created website , hosted on windows , tomcat 6 . the application not detect class files in web-inf->classes folder when access jsp file subdirectory. i created jsp file access class file. jsp working fine when access root folder. if put same jsp file in subdirectory, throwing errors saying http status 500 - type exception report message description server encountered internal error () prevented fulfilling request. exception org.apache.jasper.jasperexception: /test.jsp(8,0) value usebean class attribute utils.logwriter invalid. org.apache.jasper.compiler.defaulterrorhandler.jsperror(defaulterrorhandler.java:40) org.apache.jasper.compiler.errordispatcher.dispatch(errordispatcher.java:407) org.apache.jasper.compiler.errordispatcher.jsperror(errordispatcher.java:148) org.apache.jasper.compiler.generator$generatevisitor.visit(generator.java:1229) org.apache.jasper.compiler.node$usebean.accept(node.java:1178)

xml - XSD: reuse sub-elements of complexType? -

i have defined following 2 types in xsd-file: <complextype name="primitive"> <attribute name="seq_num" type="int"/> <element name="prim_to" type="int"/> </complextype> <complextype name="configdata"> <sequence> <element name="enable" type="boolean"/> <element name="type" default="int"/> </sequence> </complextype> both types used in number of definitions, i.e. rather not change these them. define new element set extends primitive , contains sub-elements of configdata . xml-file element (please note, enable , type @ same level prim_to ): <set seq_num="1234"> <prim_to>22</prim_to> <enable>true<enable> <type>42</type> </set> i declare set following way: <element name="set"> <complextype> <complexconten

c++ - Vector of custom objects : Assign compilation failure -

i creating vector of custom objects , calling assign follows: class myclass { public: myclass() { cout<<"myclass def const"<<endl; } myclass(const myclass &mclass) {cout<<"default const"<<endl;} myclass& operator=(myclass &mclass) { cout<<"called overloaded = operator"<<endl; return mclass; } }; int main() { myclass m; cout<<"orginal object:"<<endl; vector<myclass> vec1,vec2,vec3; vec1.assign(10,m); return 0; } relevant compilation errors: /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/stl_vector.h:344: instantiated ‘void std::vector<_tp, _alloc>::assign(size_t, const _tp&) [with _tp = myclass, _alloc = std::allocator<myclass>]’ test.cpp:52: instantiated here /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/s

php - Initialize class objects problem -

i initialize class objects , works. $obj = new model_person_dbtable(); but when this: $classname = 'model_person_dbtable()'; $obj = new $classname; then show following fatal error: model_person_dbtable() class not found. how can achieve in php/zend try without brackets (they not part of class name) $classname = 'model_person_dbtable'; if doesnt help, make sure autoloader , include path set correctly.

plsql - Check if a column has a certain entry in a PL/SQL function -

i've table 2 columns. second column foreign key column. want check if there record foreign key x in column. i'm using (rather learning) pl/sql on oracle 11g. edit: use sql select * how use in pl/sql return boolean in function? function my_func () return boolean l_contains_x number; l_contains_x_bool boolean := false; begin select 1 l_contains_x dual exists ( select 1 table col = x ); if l_contains_x = 1 l_contains_x_bool := true; end if; return l_contains_x_bool; end; note key here keyword returns values variables. these positionally matched select 4 columns 4 variables (or * rowtype). expects 1 value why have moved check exists, outer select selects 1 value. note sql has no concept of boolean type function usable in pl/sql context. if want true / false coming in sql context should use varchar2 'true' , 'false'.

biginteger - C /C++ long long to Java long -

i have file on disk i'm reading has been written c/c++ code. know have 2 64-bit unsigned integers read, java doesn't support unsigned integers, value when datainputstream.readlong() incorrect. (ignore byte-order i'm using derivative of dis called ledatainputstream downloaded web) a lot of posts on here talk using biginteger javadoc reading bytearray talks loading bytearray respresentation, , questions seem centered on fact people going outside positive bounds of java long type, near data i'm reading. i have matlab/octave script reads these long long values 2 32-bit integers each, multiplying , adding answer wants too. i suppose question - how read 64-bit unsigned integer either using biginteger, or using [le]datainputstream.xxx? thanks in advance i suggest using bytebuffer , using code such this want.

php - valid memory limit test -

i´m having trouble crashing ion-cube module. module imports csv data our database, if csv file large (15+m) result internal server error. the support told me server not have enough ram run module. server has 1gb ram built in wrote simple test script check if ini_set works. <pre> <?php function tryalloc($megabyte){ echo "try allocating {$megabyte} megabyte..."; $dummy = str_repeat("-",1048576*$megabyte); echo "pass."; echo "usage: " . memory_get_usage(true)/1048576; echo " peak: " . memory_get_peak_usage(true)/1048576; echo "\n"; } for($i=10;$i<1000;$i+=50){ $limit = $i.'m'; ini_set('memory_limit', $limit); echo "set memory_limit {$limit}\n"; echo "memory limit ". ini_get("memory_limit")."\n"; tryalloc($i-10); } ?> </pre> this runs without problems. there major flaws in test? having lots o

nosql - How to structure a database design for a simple photo album in couchdb? -

i want try couchdb developping little photoalbum application different users can have many albums many photos in them. doing right if create document each users, contains array of albums, contains photos attachments? { user: "dominik", albums: [ { name: "usa trip", photos: [ { title: "golden gate bridge", _attachments: [ photo ] }, { photo } ] }, { ...} ] } or there way this? or better store users, albums , photos each in different documents? require foreign keys in mysql? { type: "user", name: "dominik", albums: [ "a1", "a2", "a3" ] } { type: "album", _id: "a1", title: "usa trip", photos: [ "p1", "p2" ... ] } { type: "photo", _id: "p1", _attachments: {...}, title: "golden gate bridge" } ... or other way around?: { ty

interface of dll -

i heard people talking changing interface of dll. change in interface of dll, , how that? changing dll's interface mean change how dll , calling code interacts. mean changing signatures of dll's exporting functions, or changing different set of functions entirely, or mean passing different data calling code. dll's interface it's exported , imported items (both functions , data), or in other words, parts of dll have access when use it. often want change behaviour of dll without changing interface. because changing interface break code uses it. imagine dll exporting function foo : void foo(int i) { // thing integer } changing interface mean changing foo 's signature into void foo(int, float); now, code used foo has rewritten use new signature, bad thing.

sql server 2008 - Return values from a pass-through query via VBA -

Image
i have vba code run query in sql-server 2008. runs fine , displays table need. code here: set db = currentdb set qdf = db.querydefs("mystoredprocedure") qdf.sql = "exec [wcns_ops].[dbo].mystoredprocedure [plus bunch of parameters]" docmd.openquery "mystoredprocedure" which displays table: my question this: how programmatically return these values vba code without displaying table? the following code untested, should pointed in right direction: set db = currentdb set qdf = db.querydefs("mystoredprocedure") qdf.returnsrecords = true qdf.sql = "exec [wcns_ops].[dbo].mystoredprocedure [plus bunch of parameters]" qdf.openrecordset(dbopensnapshot) 'could dbopendynaset, etc. ' until .eof debug.print !firstid debug.print !lastid .movenext loop end

c++ - Help Displaying a Vector In int main() -

the program i've written creates deck of card can shuffled , player takes 4 cards , puts them corresponding columns. i can display single card doing this: int main() { card card; cout << card << endl; } the problem is, want display player class, made of vector of cards , should display 4 cards , put them 4 separate columns. using this: int main() { deck deck; deck.shuffle(); player player; cout << player; } does not display anything, in fact, gives me error. how can display 4 cards in corresponding 4 columns? also, here entire code have far, in case want go through yourself: #include <iostream> #include <algorithm> #include <vector> #include <cstdlib> #include <ctime> using namespace std; enum suits { diamond, club, heart, spade }; class card { private: int rank; suits suit; public: card(); card(suits, int); int getrank() { return rank; } suits getsuit() { re

objective c - NSTimeinterval problem for date in iphone sdk -

i converting date nstimeinterval code below: nsdate *currentdate = [nsdate date]; nstimeinterval currentyinterval = [appdelegate settimeinterval:currentdate]; nsdate *expirydate = [appdelegate setreversedate:warrobj.expiredon]; nstimeinterval expiryinterval = [appdelegate settimeinterval:expirydate]; //here getting nil value , exception generated. //it happens in 3.1 -(nstimeinterval )settimeinterval:(nsdate *)selecteddate { nsdateformatter *dateformatter = [[nsdateformatter alloc]init] ; [dateformatter setdateformat:@"dd-mmm-yyyy 00:00:00"]; nsstring *currstr = [dateformatter stringfromdate:selecteddate]; nsdate *newcurrentdate = [dateformatter datefromstring:currstr]; nstimeinterval timeinterval = [newcurrentdate timeintervalsincereferencedate]; [dateformatter release]; return timeinterval; } can suggest me how rid of this. thanks all, madan. nstimeinterval typedef double , not object: getting time interval: nsti

What is the point of developing Visual C++ and C#? -

i've been tinkering visual c++. have heard isn't used in industry. c# seems more popular. makes me wonder why ms bothered keep both platforms in development? there special visual c++ used c# can't handle? to learn main differences between 2 languages, should take @ this article.

Facebook API Javascript Client (no server side) -

is possible use javascript sdk facebook without server? kinda @anywhere platform twitter. i've solve problem: can use without server, however, have set site correctly. if can't sure url (it can start file, don't know middle), hosting online solution, if no callback needed.

vim moving with hjkl in long lines (screen lines) -

Image
the highlighted text array in want move. have press g before pressing j move line down. there mapping .vimrc can use hjkl move in screen lines without pressing g every time. thanks matthias i use following snippet helps forms of navigating, including things $ end of line , such. " mapping make movements operate on 1 screen line in wrap mode function! screenmovement(movement) if &wrap return "g" . a:movement else return a:movement endif endfunction onoremap <silent> <expr> j screenmovement("j") onoremap <silent> <expr> k screenmovement("k") onoremap <silent> <expr> 0 screenmovement("0") onoremap <silent> <expr> ^ screenmovement("^") onoremap <silent> <expr> $ screenmovement("$") nnoremap <silent> <expr> j screenmovement("j") nnoremap <silent> <expr> k screenmovement("k") nnorem

Install Jobboarder v1.6.1, Joomla extention. Missing XML file -

i've downloaded jobboarder v1.6.1 , when try install it gives message "missing xml file". any help??? you need extract zip file, contains component , module files need installed separately.

r - In ggplot2, what do the end of the boxplot lines represent? -

Image
i can't find description of end points of lines of boxplot represent. for example, here point values above , below lines end. (i realize top , bottom of box 25th , 75th percentile, , centerline 50th). assume, there points above , below lines not represent max/min values. the "dots" @ end of boxplot represent outliers. there number of different rules determining if point outlier, method r , ggplot use "1.5 rule". if data point is: less q1 - 1.5*iqr greater q3 + 1.5*iqr then point classed "outlier". line goes first data point before "1.5" cut-off. note: iqr = q3 - q1 additional information see wikipedia boxplot page alternative outlier rules. there variety of ways of calculating quantiles. have @ `?quantile description of nine different methods. example consider following example > set.seed(1) > x = rlnorm(20, 1/2)#skewed data > par(mfrow=c(1,3)) > boxplot(x, range=1.7, main="range=1.7&quo

GWT Frame not working in Mozilla Firefox or in Google chrome, but working fine in IE -

i trying download file server. normal gwt rpc call doesnot allow me that, , hence wrote servlet job me. client side, creating frame object, , set servlet url in it, , add frame object in root panel. when execute in ie, window pops asking save/open file. when execute same in firefox or google chrome browser, nothing happing. not getting request on servlet/server side. here slice of code :- string servleturl = "http://localhost:13080/browser/ui/dataexportservlet?level=zero"; frame frame = new frame(servleturl); frame.setvisible(false); rootpanel.get().add(frame); so, can please me out. this might related same origin policy. both servlet , webapp running on port 13080? if differ, sop might fail this. if understand correctly, ie has more relaxed policy might work there not in chrome. see http://en.wikipedia.org/wiki/same_origin_policy , can disable sop (same origin policy) on browser development?

javascript - How do I add jQuery progress bar to slideshow gallery? -

i have basic jquery slideshow , friend , trying figure out how add progress bar indicate when gallery switch next image. here slideshow code friend , wrote. thanks, appreciated. /* javascript */ $('.ppt li:gt(0)').hide(); $('.ppt li:last').addclass('last'); $('.ppt li:first').addclass('first'); $('#play').hide(); var cur = $('.ppt li:first'); var interval; $('#fwd').click( function() { gofwd(); showpause(); } ); $('#back').click( function() { goback(); showpause(); } ); $('#stop').click( function() { stop(); showplay(); } ); $('#play').click( function() { start(); showpause(); } ); function gofwd() { stop(); forward(); start(); } function goback() { stop(); back(); start(); } function back() { cur.fadeout( 1000 ); if ( cur.attr('class') == 'first' ) cur = $('.ppt li:last'); else

android - Open a pdf file inside a webview. -

i have app i've button on webpage rendered inside webview. now on click of button , pdf file gets downloaded , , same need opened inside same webview. attach download listener web view , change url follows.. "http://docs.google.com/gview?embedded=true&url=http://www.abc.com/xxxxxyyyyyxz.pdf" it's link used open pdf without downloading it... i hope solves problem..

PYTHON:Tkinter.OptionMenu Question : option menu does not execute the command function to user selection -

i trying create python program below. reads file bus time table , in tkinter, displays departure list , arrival bus stops corresponding time. here using following code update time each departure or arrival stops. when select stops not call functions. not understand why. tkinter.optionmenu(self.root,self.departure,*self.busstops,command=self.update_departure()).pack() tkinter.optionmenu(self.root,self.arrival,*self.busstops,command=self.update_arrival()).pac can throw light on it? the same works if not use class structure. i running on windows xp 2002 service pack 2 python 2.6 version import tkinter import time class app(): def __init__(self): self.root = tkinter.tk() self.debug_enable = 1 self.timetable_file_name = "200_timetable.txt" self.busstops = list() self.arrivaltime = list() self.update_timetable() self.departure = tkinter.stringvar() self.arrival = tkinter.stringvar() self.starttime = tkint

actionscript 3 - Force PHP download script pops up a blank page, is there a way to close it? -

the php file ran headers force download (from flash/as3 project), pops blank page. there way close after? i don't think users want blank page popups springing up. what thought work, apparently not: echo ("<script>window.close();</script>") you can't echo since that's part of output of script producing file they're downloading. wrote javascript file. there no separate webpage can put code that. you take care of on code that's starting download (tricky stuff javascript writing 1x1 pixel iframe pointing download url) or accept don't control browser behavior this.

asp.net - IIS 7 URL Redirection -

well, having small problem. a 3rd party connecting our api, using wrong url , url no longer exists on our system. said had revert backup code. problem have no developer knows how fix code point right url. so, question how can take nonexistant url in iis 7 , have redirect correct url? url trying use (which not exist): http://www.mysite.com/page1212.aspx the url need hit is: http://www.mysite.com/page1919.aspx how can cause redirection happen server side using iis 7.0 this? want nothing change functionally website other simple redirection. check out iis url rewriting .

javascript - Why does jQuery.ready run when the page isnt ready? -

so put jquery document ready functions @ bottom of html, have run before elements of page loaded. i'm tired of functions not working because resources arent finished loading on page, jquery.ready keeps saying elements done loading when arent! wants set 300ms timeout functions wait little after jquery.ready? use .ready() perform actions when dom ready scripting. $(document).ready(function(){ }); use .load() perform actions when "page" (resources including files , images) loaded. $(window).load(function(){ });

android - Broadcast Send/Receive between Activities -

new android , trying implement broadcast communication between 2 activities. i've looked @ many examples in books, web sites, , have followed several threads here, still missing something. samples have activity extends broadcastactivity, believe not needed app. put straight forward sample test. what missing?? entire code below. thanks help. package com.dialogtest.dt; import android.app.activity; import android.app.alertdialog; import android.app.dialog; import android.content.dialoginterface; import android.os.bundle; import android.text.editable; import android.util.log; import android.view.layoutinflater; import android.view.view; import android.widget.edittext; import android.widget.textview; public class dialogactivity extends activity { public static final string dtag = "adebug"; public static string strdia = "declr"; public static string broadmess = "com.dialogtest.dt.restart"; public static textv

activerecord - Rails - group_by -

my application has few reports , i'm trying make helper method group_by these collections. example: def group_collection(collection, options = {}) column = options[:column] group_count = collection.group_by{ |item| item.column.strftime('%b %y')} end this how plan use it @user_groups = group_collection(@users, :column => "created_at") unfortunately, not work. undefined method `column' for... [collectionobject] any clues on how make "column" variable actual column type @ runtime considers activerecord column , not instance method? ignoring of other problems in code, trying column can done so: collection.group_by { |item| item.send(column).strftime('%b %y') } this works because in ruby way access instance variables through accessor methods, named after variable you're trying access, @item.foobar calls foobar method on @item . now, "other problems". it's great you're trying move

select - Cakephp: passing multiple selectbox options in the url -

i'm stuck again. need pass search form variable in url (get). if make dropdown in form multiple select dropdown, cant seem pass array of selections. when paas argument url looks this: http://localhost/cakephp/applicants/index/search.experiences:array and in controller, try access this: $keywords = $this->passedargs['search.experiences']; i'm not convinced actual array id being passed url, looks it's word 'array' gets passed. is there way can this? thanks, vauneen one way implode search.experiences on comma , then, in controller explode on comma access data.

ADO.Net entity data model does not support SQL Server 2000 -

i trying add ado.net entity data model (edmx) vs2010 project. target database sql server 2000. error message " this server version not supported. must have sql server 2005 or later what alternatives around constraint? thanks in advance suggestion.

c# - Object property databinding to a collection item based on a Name of an object -

is possible implement following wpf (silverlight) databinding scenario? there number of customcontrols on page: <grid x:name="grid1"> ... <my:custcntr x:name="name1" property1="{binding property1}" /> <my:custcntr x:name="name2" property1="{binding property1}" /> <my:custcntr x:name="name3" property1="{binding property1}" /> ... </grid> the grid's datacontext observablecollection: grid1.datacontext = mycollection; ... observablecollection<myentity> mycollection= new observablecollection<myentity>(); ... the myentity class has properties name , property1 . myentity me1 = new myentity { name = "name1", property1 = "5" }; myentity me2 = new myentity { name = "name2", property1 = "6" }; myentity me3 = new myentity { name = "name3", property1 = "7" }; ... mycollection.add(me1)

CakePHP label option on input select form not working as expected -

my select form working perfectly, label not display no matter variation or arrangement of arguments. here code: <?php echo $this->form->input('plan_detail_id', $plans_list, array( 'type' => 'select', 'label' => 'select plan detail', 'empty' => '-- select plan detail --' )); ?> as can see have second argument $plan_list place label tag. example, of other labels such ok: <td><?php echo $this->form->input('age_id', array( 'label' => 'select age range', 'empty' => '-- select age range --' )); ?></td> note: there no second $argument first example. doing totally wrong? or not possible or bug? the api doesn't show 3 parameters formhelper::input method; there $fieldname , $options . meant use formhelper::select method instead. $this->form->select('plan_detail_id', $plans_list, null

asp.net - UpdatePanel Conditional updatemode not working -

i found this thread while trying resolve issue unfortunately can't seem figure out problem since have way should be. i've got 3 updatepanels each call function on .js file setup this: <asp:updatepanel id="uppnlgeneralinfo" runat="server" updatemode="conditional" childrenastriggers="true"> <contenttemplate> <script type="text/javascript"> sys.application.add_load(bindpageload); </script> each have different id of course. whenever control calls postback within update panel works, in js file added console.log("running js file") , can see it's being called 3 times meaning it's 3 updatepanels being refreshed instead of one. all triggers inside each of respective updatepanels shouldn't need add triggers (i did make sure , makes no difference). shouldn't updatemode=conditional resolve this? also worthy mention, none of code behind ever

About "static" in C, how is it implemented by the compiler? -

about "static" in c, how implemented compiler ? this bloomberg interview question. thoughts ? [[i'm assuming we're talking static in context of variables here, because static functions compile/link-time thing, no run-time implications.]] in short, it's implementation-specific. compiler free chooses. typically (but no means exclusively), statics stored in .bss or .data sections of executable image @ fixed locations. has performance advantages, can accessed literal addresses, rather pointer dereferences (as case stack-based variables). part of binary, means initial values automatically mapped memory when executable first loaded; no intialisation routines required.

date - convert string to System.DateTime in F# -

if string command line , looks this: '1-1-2011' how can convert string datetime object in f#? you this: let datetime = system.datetime.parse "1-1-2011"

ruby on rails - Need Help with update_attributes -

i hoping @ , give advice on how can make action better. works how it, seems unnecessary create 2 model instances. i felt had because, though update_attributes won't update database if validation fails, still wanted have @user instance available show original @user.photo in view. i'm using paperclip. thanks in advance. def edit_avatar @user = user.find(@username_id) if params['post_data'].present? @user.update_attributes(params[:post_data]) @errors = @user.errors if @user.errors.count == 0 @start_jcrop = true else @user = user.find(@username_id) end end end instead of reloading model, can use dirty changes feature. or can use @user.reload instead of creating new instance. @user = user.find(@username_id) ... else @user.reload end end you can simplify view follows @user = user.find(@username_id) if params['post_data'].present? if @user.update_a

asp.net - AJAX updatepanel giving error -

i trying use ajax updateprogress display loading image when zip file being created following error: microsoft jscript runtime error: sys.webforms.pagerequestmanagerparsererrorexception: message received server not parsed. common causes error when response modified calls response.write(), response filters, httpmodules, or server trace enabled. detals: error parsing near 'pk'. below code .aspx page <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> #progressbackgroundfilter { position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; overflow: hidden; padding: 0; margin: 0; background-color: #000; filter: alpha(opacity=50); opacity: 0.5; z-index: 1000; } #processmessage

c++ - Registering user-provided derived types with Boost Serialization -

i writing library handle storing , serializing user-defined types. user-defined types required serializable. however library uses templates create containers of user types. don't know how export container types boost::serialization through templates. way can force user of library boost_class_export_guid() every container type. i've tried unpacking macro looking @ boost/serialization/export.hpp, complex... there way export class part of template instantiation? or way write library serialize containers of user-defined types? #include <iostream> #include <vector> #include <boost/foreach.hpp> #include <boost/serialization/access.hpp> #include <boost/serialization/vector.hpp> #include <boost/serialization/base_object.hpp> #include <boost/serialization/export.hpp> #include <boost/archive/text_oarchive.hpp> ////////////////////////////////////////////////////////////////////////////// // example code reside in library //////