Posts

Showing posts from July, 2014

windows - how do you load more than a library in FreePascal? -

windows - how do you load more than a library in FreePascal? - i can load first dll, if seek load sec dll fails. info: os: windows vista fpc: 2.4.4 no matter if load sec dll exe or within first dll, sec fails. no matter if first dll loaded statically, sec fails. no matter sec dll loaded. i command source code of dlls. there no external dependencies. it happen simple dlls. getlasterror() returns 487 error (error_invalid_address). it happens dlls generated fpc. there i'm missing , can't figure out. thanks answer: ok found problem, had -wn command line switch in fp.cfg file i presume you're calling wrapper win32 loadlibrary(). you should able invoke multiple different .dll's without problem. suggestion: check getlasterror , see error code was also: maybe it's particular .dll, or way you're using it. run "depends" tool on .exe, .dll's, , .dll load dynamically. create sure dependencies resolved. windows d...

php - Popuplate variable using AJAX -

php - Popuplate variable using AJAX - say have page... <?php $variable1 = ''; echo "variable 1 = " . $variable1; ajax insert funciton ?> when page loads thre userw sick see "variable 1 =" variable undefined. if ajax function insert db gave variable1 value, right in thinking user still see "variable 1 =" until reloads page? im trying understand ajax sorry if bit confusing/amateur question thanks in advance a an ajax phone call alter page if write code in page update page after results of ajax call. if don't update page yourself, right page not alter until refresh. you can think of ajax phone call remote procedure phone call server , nil more that. affects contents of page if alter page yourself. php javascript ajax

php - CakePHP - How do you tell a controller's action to output a raw image header? -

php - CakePHP - How do you tell a controller's action to output a raw image header? - i'm recoding existing project using cakephp framework. now, in existing code have php file (just called thumb.php) takes file , size , yields resized raw image browser. can utilized in instance image tag or other purposes. "thumbs.php" file uses header('content-type: image/jpeg'); output raw image. anyway, here in action: http://www.dosspirit.net/php/thumb.php?file=268-transport-tycoon-deluxe-3.png&size=640 (you can alter size parameter 240 or 1240 , image resized you). now, want replicate behaviour in cakephp. so far, have setup: class screenshotcontroller extends appcontroller { public function view() { (some code handle image scaling) } } looking @ above code, urls screenshot this: http://www.domain/screenshot/view/268-transport-tycoon-deluxe-3.png/640 now, how can tell controller in cakephp output image header instead of going thr...

mesh - Dynamic Terrain Deformation -

mesh - Dynamic Terrain Deformation - i interested in designing simple game (just learning purposes have no grand plans). want have deformable terrain scheme (think minecraft) little more complex. i understand mine craft uses concept called voxels. not voxels aren't on cpu side can accomplished now-adays through gpu trickery (again no thought have read far). so far voxels seem way go, arent looking for. allow overhangs , caves, simple. i want big , expansive terrain can deform , manipulate freely overhangs. understand have implement sort of paging size of landscapes, maybe 3 dimensional paging type of terrain thinking of. i have looked little bit @ roam it's lot larn , not sure if right direction. have seen perchance way go layered heightmaps, , utilize geomipmapping meshes tunnels , such in between (if makes sense). basically looking algorithm , place start involves huge terrains deformable in way allows overhangs, cliffs, tunnels , caves. it doesn't ...

WCF + NHibernate + Web Service Software Factory 2010 - Feedback Requested -

WCF + NHibernate + Web Service Software Factory 2010 - Feedback Requested - i in process of developing web service used facade perforce server. in other words, instead of having clients straight contact perforce server, send , receive messages web service, in turn forwards them perforce server. separation done security reasons (i.e.: clients should never have direct access perforce server). another requirement web service connected sql server database. next research on orms, came across nhibernate. seems have features need in order develop efficient web service, such caching , lazy loading. i discovered web service software mill 2010, according microsoft "an integrated collection of resources designed help , consistently build web services adhere well-known architecture , design patterns" here questions: i noticed web service software mill 2010 has not been updated since 2010. i'm hesitant utilize if framework not kept up-to-date or deprecated. notic...

unable to set values of select tag in jquery mobile -

unable to set values of select tag in jquery mobile - i had created select tag in html(selecttest.html) values.what i'm trying after selecting value select tag, need page refreshed , pass selected alternative parameter url. then need set selected value 1 time page refreshed. i'm not sure whether problem related jquery mobile. <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script> <sc...

c# - Deploy Windows Application without installing Sqlite .net provider -

c# - Deploy Windows Application without installing Sqlite .net provider - i using subsonic 3 sqlite 3 windows application. installing .net provider sqlite (system.data.sqlite) mandatory me while programming application, requirement deploying application is, want create 1 installable , skip portion installing .net provider sqlite on client machine. i have added references of system.data.sqlite gac(in setup project) won't work because while running application says system.argumentexception: unable find requested .net framework info provider. may not installed. i sure there workaround this, shouldn't necessary install .net framework provider sqlite on client machine. -mmcmedic in add-on copying db driver .dll application, may need register dbproviderfactory. normally installer register info provider name in .net machine.config file, ado.net can translate provider name string actual assembly name. can add together straight app.config file instead. d...

javascript - Preventing jquery event triggering from sub elements -

javascript - Preventing jquery event triggering from sub elements - i have next code: <html> <head> <script src="http://code.jquery.com/jquery-1.6.2.min.js" type="text/javascript"> </script> </head> <body> <div id="a"> <div id="b"> <script type="text/javascript"> $('#b').bind('fuffle',function() {alert('b fuffled');}) </script> <div id="c"></div> </div> </div> </body> </html> when run $("#b").trigger('fuffle') i alert box expect. however, when run $("#c").trigger('fuffle') i alert box. guessing because c nested in b, however, there technique behavior avoided. in code, sub elements can trigger fuffle, bound different method. behavior literally causing js stackoverflow err...

c# 4.0 - Is directshow.net video input device filter enumeration broken (in newer environments)? -

c# 4.0 - Is directshow.net video input device filter enumeration broken (in newer environments)? - every illustration in directshow.net samples folder (marked "2010-february") compiles fine, , play videos files work great. however, every illustration tries enumerate filtercategory.videoinputdevices fails find of filters, dsdevice.getdevicesofcat(filtercategory.videoinputdevice); returns have no devices. same problem occurs me in every other programme uses directshow.net, touchless , various examples on codeplex. i've got 4 video input filters installed (1 webcam , 3 screen-capturing filters) , they're found/usable graph editor comes windows sdk , rl filter manager. both programs list 4 filters under "video capture sources" , each moniker starts right guid directshow.net's filtercategory.videoinputdevices points ("860bb310-5d01-11d0-bd3b-00a0c911ce86"). i've tried compiling , using latest directshow.net dll myself, nil change...

EasyPHP with PEAR installation -

EasyPHP with PEAR installation - i trying install pear easyphp. batch file asks file layout. not sure set. set public web files directory lost on other ones. please help? installation base of operations ($prefix) : c:\easyphp\php temporary directory processing : c:\easyphp\php\tmp temporary directory downloads : c:\easyphp\php\tmp binaries directory : c:\easyphp\php php code directory ($php_dir) : c:\easyphp\php\pear documentation directory : c:\easyphp\php\docs data directory : c:\easyphp\php\data user-modifiable configuration files directory : c:\easyphp\php\cfg public web files directory : c:\easyphp\php\www tests directory : c:\easyphp\php\tests name of configuration file : c:\windows\pear.ini path cli php.exe : . php under easyphp\php ...

iphone - Strange resetting of NSMutableDictionary -

iphone - Strange resetting of NSMutableDictionary - i have functions: - (nsmutabledictionary *) getuserdatadictionary { [userdatadicionary removeallobjects]; userdatadicionary = [[nsmutabledictionary alloc] initwithcontentsoffile:[self getuserdatadictionarypath]]; homecoming userdatadicionary; } - (int) getindexoflastvehicle { myappdelegate *app = (myappdelegate*)[[uiapplication sharedapplication] delegate]; nsmutabledictionary *tmpuserdata = [app getuserdatadictionary]; int lasthighestindex = -1; for(id item in [tmpuserdata allkeys]){ nsstring *keyinarray = (nsstring *)item; if ([keyinarray rangeofstring:@"vehicle-"].location != nsnotfound) { //f.e. "vehicle", "1", "type"...or "vehicle", "1", "spz"...or "vehicle", "2", "type" etc nsarray * separatedcomponents = [keyinarray componentsseparatedbystring:@"-"]; int index...

javascript - is Mobilizer capable of emulating perfectly the behavior of scripts as well? -

javascript - is Mobilizer capable of emulating perfectly the behavior of scripts as well? - i took @ mobilizer http://www.springbox.com/mobilizer/ it's pretty amazing, beingness able simulate interfaces of iphones , stuff. however, question is capable of rendering exact same behavior not layout javascript scripts? i mean pretty wound find out script ran correctly in emulator fail in real scenario... this programme not emulate actual phone os. far can tell, loading page in internal (desktop based) browser , displaying within phone right dimensions etc. sending user agent string belongs device well. so, useful testing layout on different screen sizes, testing mobile redirect scripts , saving out mockups of website on device clients. it definitely not used test if website work on device. to accurately test without physical device on: ios, check out ios simulator comes x code. android, check out android emulator comes android sdk. webos, check out webos ...

actionscript 3 - loading external movie as2 wrapper -

actionscript 3 - loading external movie as2 wrapper - load as2 swf as3 swf , pass vars in url i'm trying load in as3 file external as2 swf file (of dont have access fla file). according explanation given in link above, solution utilize as2 wrapper original as2 file (and found localconnection between the as3 , as2 files). i've tried that, although film seems load in as3 file, doesnt start, doesnt play , gets stuck in first frame. how play film (as load it)? help. my as3 file is: import com.gskinner.utils.swfbridgeas3; var loader = new loader() loader.load(new urlrequest("as2_test.swf")); addchild(loader); var sb1:swfbridgeas3 = new swfbridgeas3("test",this); my as2 file is: import com.gskinner.utils.swfbridgeas2; var sb1 = new swfbridgeas2("test",this); sb1.addeventlistener("connect",this); var loader:moviecliploader = new moviecliploader(); loader.addlistener(this); loader.loadclip("digestive.swf", m...

asp.net - C#|Working with process help -

asp.net - C#|Working with process help - a few days ago started working process, did few things.. , wanted inquire question. lets got process : process = process.start("d:\\server1\\orangebox\\srcds.exe", "srcds.exe -console -game cstrike +maxplayers 16 -port 27017 +map de_dust2"); process.enableraisingevents = true; process.exited += new eventhandler(process_exited); } void process_exited(object sender, eventargs e) { process = process.start("d:\\server1\\orangebox\\srcds.exe", "srcds.exe -console -game cstrike +maxplayers 16 -port 27017 +map de_dust2"); process.enableraisingevents = true; process.exited += new eventhandler(process_exited); so, works perfect. but, how can new process? but. added them button , info of them comes textbox. lets got button1 , 3 textbox . 1 of textboxs give me process name, 1 args, , 1 if run ot not. so how ca...

perl - Understanding code: Hash, grep for duplicates (modified to check for multiple elements) -

perl - Understanding code: Hash, grep for duplicates (modified to check for multiple elements) - code: @all_matches = grep { ! ( $seensentence { $_->[0] .'-'. $_->[1] .'-'. $_->[5] } ++ ) } @all_matches; purpose: code removes duplicates of elements array @all_matches aoa. my effort @ total breakdown ( ??..?? around i'm unsure ): grep returns elements of @all_matches homecoming true. the key of hash %seensentence ??the 3 elements?? of @all_matches . since hash can have unique keys, first time through it's value incremented undef(0) 1. next time through, defined value, ! means grep returns if it's undef (unique value associated element). my questions: (1) how can turn {$_->[0] .'-'. $_->[1] .'-'. $_->[5]}++ hoh? i told (idiomatic) way accomplish it. stab in dark be: ( {$_->[0] => 0, $_->[1] => 0, $_->[5] => 0} )++ (1b) because i don't understa...

git - How to delete all files from repo that doesn't exist on my computer? -

git - How to delete all files from repo that doesn't exist on my computer? - i'm new git (github me) , hope help me. i work on 1 project , alter names of files. situation on computer have files want, in github - files: need , deleted (renamed files). is there way automatically delete files doesn't exist on machine github? you need create commit deletes files local repository , force commit github. that, do git commit -a commit changes tracked files, including deletions git push force changes github git version-control github

Adding postgresql function in Devart Entity Model -

Adding postgresql function in Devart Entity Model - i'm trying import postgresql function in devart entity model, want homecoming "custom" table, can't working i define function this: create or replace function "getjournalentriesbyvoucherid"(bigint) returns setof record $body$ select je."journalentryid" je."amount", je."entrytext", "journalentries" je je."fk_voucher"=$1 $body$ language sql volatile strict cost 100 rows 1000; alter function getjournalentriesbyvoucherid(bigint) owner sqluser; and used steps in post #2 in http://www.devart.com/forums/viewtopic.php?p=71252 error message the info reader incompatible specified model.entity1. fellow member of type, journalentryid, not have corresponding column in info reader same name" i've had improve luck using out variables set-returning stored procedures. don't know if help in case, migh...

tfs sdk - Richtext in TFS2010 Testcase Teststeps' texts? -

tfs sdk - Richtext in TFS2010 Testcase Teststeps' texts? - i evaluating possible solutions limitations in microsoft's test manager 2010 teststep editor command , wondering whether knows if , if so, how can write richtext action , expected result fields of step? far saw takes 'parameterizedstring' input, not sure parameters msdn refers (or mtm testrunner can handle) when saying "[...]represents string has embedded parameters.[...]". the expected results string list of string namees delimited spaces, semi-colons or commas. can come in like: @test, @cart, @book or @test @cart @book. you can't add together html expected result parameters or action; however, not sure describe limitation. action thinking need able this. actions typically "click this" or "go here" did want stronger visual queue parts of action? here article describes intent expected results section: the real powerfulness of test case though, comes ...

How jquery script file gets the ID value of Asp.Net MVC 3's route data? -

How jquery script file gets the ID value of Asp.Net MVC 3's route data? - the url http://localhost:52974/app/detail/23432 . know next code can id (23432) , can used in javascript code embedded in cshtml file. @viewcontext.routedata.values["id"] however, have external jquery script file handle document.ready function. next approach not work because it's not cshtml file. what's best approach mvc route id value besides using javascript parse url? $(document).ready(function () { var id = @viewcontext.routedata.values["id"]; i view render out script tag invoke phone call init function in external js passing id param. view: <script> app.init('@viewcontext.routedata.values["id"]'); </script> external js: var app = {}; (function(app){ var _id; app.init = function(id){ _id = id; } })(app); jquery asp.net-mvc-3

opengl es - creating iphone application with UIViewController and Cocos2D -

opengl es - creating iphone application with UIViewController and Cocos2D - i need create application in user can select background image gallery , draw (like pencil drawing) on it. code or hint. check link. can set image using method initwithimage. , can image using getimage method setting uiimage view equal uiimage view. iphone opengl-es cocos2d-iphone

jsf - java.lang.NoClassDefFoundError: javax/faces/FacesException -

jsf - java.lang.NoClassDefFoundError: javax/faces/FacesException - i'm trying deploy web application have imported eclipse workspace netbeans. it's not getting deployed, instead it's giving me below exception. 15 jul, 2011 5:59:04 org.apache.catalina.core.standardcontext listenerstart severe: exception sending context initialized event listener instance of class org.apache.myfaces.component.html.util.streamingdestroyerlistener java.lang.noclassdeffounderror: javax/faces/facesexception @ org.apache.myfaces.shared_tomahawk.config.myfacesconfig.<clinit>(myfacesconfig.java:80) @ org.apache.myfaces.component.html.util.streamingdestroyerlistener.contextinitialized(streamingdestroyerlistener.java:32) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:3972) @ org.apache.catalina.core.standardcontext.start(standardcontext.java:4467) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase...

web services - Large Volume Excel Data Pulls - Avoiding ODBC -

web services - Large Volume Excel Data Pulls - Avoiding ODBC - we have requirement provide ad-hoc access big subsets of system's info users analyse in excel. not want grant direct odbc access. curb our ability create db layout changes without our users' processes breaking. web services seem sick suited volume of info @ stake, in part of 100's of thousands of records. what suggest alternative direct odbc access? there database concept of "view" need - allows expose big set of info , gives freedom of db schema changes long take care of exposing same info user. i agree regarding web services - not volume of data, fact getting web services work excel (2007 , above) far trivial. lock db schema much view. for really, huge number of records can consider info warehousing - separate db, provide read access reporting purposes , feeding info read/write database. feed can , done via ssis. hth web-services excel odbc

java - How to submit text via forms using JSoup -

java - How to submit text via forms using JSoup - i'd submit text form using jsoup. how go doing this? <form id="quickpostform" action="" method="post" style="display: block; text-align: center; "> <input type="hidden" name="action" value="reply"/> <input type="hidden" name="auth" value="54a9871a63a1c285879a5327faf3d8d2"/> <input type="hidden" name="thread" value="135454"/> <div id="quickreplytext"> <textarea id="quickpost" style="width: 95%; " tabindex="1" onkeyup="resize('quickpost');" name="body" cols="90" rows="8"/> <br/> </div> take @ jsoup.connect method , connection interface. once have text want submit ready go, can post url form submission. e.g.: document doc = jsoup.connect(url) .data...

java - Determining when to use which Android components? -

java - Determining when to use which Android components? - firstly, i'm new android (so apologize if question ignorant) have experience in java. have been reading book on android , remain confused basic components (activities, intent, content providers, , broadcast receivers). i have few java classes i'm wanting convert on android i'm not sure type of components should be. if class simple conversions, should intent? or, if class draws, should activity? i'm looking can explain components bit improve references @ android , perhaps give examples of each component. i think you're confused of terminology. activity user interacts (displays content, contains listeners buttons, etc.) when launch app , see on screen, activity draws buttons/components on screen , contains code user interaction. intent kind of way tell activity launch else. example, if on main activity, , wanted alter activity when user clicked something, create , start intent specifying th...

objective c - Selecting text programatically in menu view -

objective c - Selecting text programatically in menu view - i write "agent" cocoa app have textfield in status icon's menu, looks this: and in couple of places select contents programatically (e.g. in -(bool)becomefirstresponder of nstextfield subclass) and doesn't work. certainly has fact it's in menu, not in window. how prepare that? thanks a lot in advance. why don't utilize window instead? menus implemented windows under hood: can same thing, position , style window appropriately. edit: reply largely rewritten objective-c cocoa nstextfield

javascript - How to accomplish page open/close effect from center? (like ipad) -

javascript - How to accomplish page open/close effect from center? (like ipad) - im designing wordpress based site client , wondering if possible have pages load open/close center ipad? the site ipad icons within of lead other wordpress pages. effect possible? thanks i advise using css transitions otherwise incredibly slow. include css , toggle class. .app{ width:100%;height:100%;position:absolute; -webkit-transform: scale(.0); -webkit-transition-timing-function: ease-out; -webkit-transition-duration: 500ms; } .app.opened{ -webkit-transform: scale(1); } example: http://jsfiddle.net/z4bp7/ javascript jquery wordpress

objective c - Searching for a dictionary value in an array of dictionaries -

objective c - Searching for a dictionary value in an array of dictionaries - i'm trying search array of dictionaries. each dictionary has different keys , values name, age , joindate. i searching based on tutorial next code: - (void) searchtableview { nsstring *searchtext = searchbar.text; nsmutablearray *searcharray = [[nsmutablearray alloc] init]; (nsdictionary *dictionary in listofitems) { nsarray *array = [dictionary valueforkey:@"name"]; [searcharray addobjectsfromarray:array]; } (nsstring *stemp in searcharray) { nsrange titleresultsrange = [stemp rangeofstring:searchtext options:nscaseinsensitivesearch]; if (titleresultsrange.length != 0) [copylistofitems addobject:stemp]; } [searcharray release]; searcharray = nil; } the searching goes , info displayed correctly. the problem when take 1 of results point wrong location. here how selected row directed detail view: - (void)tableview:(uitableview *)tableview didsele...

memory - How to get a page from a userspace process for a given task in Linux? -

memory - How to get a page from a userspace process for a given task in Linux? - what virt_to_page function return, homecoming page given address in kernel space or homecoming page given address in user space? far can tell seems takes kernel address , returns page that. if can utilize page user space process given task or mm_struct , virtual address? virt_to_page() indeed work direct-mapped kernel addresses. find page userspace mapping, need utilize get_user_pages() (and put_page when you're done release reference on page). memory linux-kernel kernel virtual-memory

implement tint color and translucent toolbar properties android -

implement tint color and translucent toolbar properties android - the tint color , translucent properties ios centric. trying implement these properties android platform. have scoured web while , not getting anywhere. have ideas? i'm not familiar "tint color , translucent properties", might worth taking @ colorfilter. here illustration of utilize of lightingcolorfilter in greendroid. scroll downwards myquickaction class , utilize of black_cf. android android-layout android-widget

video - Can iOS APP play downloaded MP4 files in custom window? -

video - Can iOS APP play downloaded MP4 files in custom window? - we have ios app project play video in our custom window , play downloaded video files. according such kind of demand, possible that? this possible. please check documents mpmovieplayercontroller . allows play video , managing own view hierarchy/custom views. play video inline, need utilize view property of mpmovieplayercontroller instance set view hierarchy. features of mpmovieplayercontroller have changed ios 3.2, while using it, sure utilize features deployment target. ios video playback

mysql - InnoDB SELECT ... FOR UPDATE statement locking all rows in a table -

mysql - InnoDB SELECT ... FOR UPDATE statement locking all rows in a table - mysql server version 5.1.41 innodb plugin enabled. have next 3 tables invoices: invoices, invoice_components , invoice_expenses. table invoices has invoice_id primary key. both invoice_components , invoice_expenses linked table invoices invoice_id non-unique foreign_key (each invoice can have more 1 component , more 1 expense). both tables have btree index foreign key. i have next transactions: transaction 1 start transaction; select * invoices invoice_id = 18 update; select * invoice_components invoice = 18 update; select * invoice_expenses invoice = 18 update; everything works ok first transaction , rows selected , locked. transaction 2 start transaction; select * invoices invoice_id = 19 update; select * invoice_components invoice = 19 update; select * invoice_expenses invoice = 19 update; the sec transaction returns error 1205 (hy000): lock wait timeout exceeded; seek res...

symfony2 - Routing in Silex/Symfony. Providing a default route -

symfony2 - Routing in Silex/Symfony. Providing a default route - i'm attempting using silex (which uses symfony routing component - reply may applicable symfony well) i adding silex legacy application provide routing need respect existing applications default implementation loading files (which load file file scheme form url specified). edit: clarification: existing file loaded file system, include within parent template, after series of bootstrapping calls have been made. what i'm finding in absence of defined route match legacy pages, silex throwing exception. i need way provide default (fallback) mechanism handling legacy pages - pattern has match entire url (not 1 fragment). is possible? // include silex routing require_once(class_path . 'silex/silex.phar'); // init silex $app = new silex\application(); // route new code // matches new restful interface (like /category/add/mynewcategory) $app->match('/category/{action}/{...

sql - What's the best way to dynamically generate a where clause? -

sql - What's the best way to dynamically generate a where clause? - i writing stored procedure works heavy select statement. stored procedure takes in 15 parameters deed filter, of nullable. there 2 things parameters - check if x between high , low or check if column value in y. my main concern how write clause. example: dynamic sql notoriously slow, don't want write clause , pass exec. i don't want if high = null high = max because i'll still have between statement takes processing powerfulness , has no use. i don't want (if high = null or x <= high) because null check still processed every row , heard rumors mess indexes. in short, i'm looking guidance in best practice takes performance account. dynamic sql used slow because execution plans dynamically generated sql weren't cached. no longer case , execution plans dynamic sql queries cached long query text identical. means should: use parameters avoid parameter values al...

c - Creating a DLL in GCC or Cygwin? -

c - Creating a DLL in GCC or Cygwin? - i need help compile script ("iterator.c") dll. can't utilize vs2010 since not back upwards features added c in c99 standard (i'm using "complex.h" vb doesn't back upwards it). i've been looking substitute i've found gcc don't know how install/use (really, i've spent half hr reading through documentation , don't understand how supposed install it), , cygwin, i've installed don't know how utilize either. also, i've installed mingw think it's same cygwin more or less, , still don't know how create dll. it's not i've been lazy , haven't tried it, it's these compilers aren't nil i've ever used before (mostly python idle , visual studio, create things pretty easy you). i'm kind of lost. could give me advice on how utilize tools create dll can access script? important. thank in advance. you must place __declspec(dllexport) i...

Java Webapp: strange memory statistics -

Java Webapp: strange memory statistics - i'm running java web application(j2ee+tomcat6+struts2+hibernate) on linux centos machine. problem "top" command says java using 14% of memory(out of 8g) in summary info section, says overall free memory 300m! (just mem, not swap) pid user pr ni virt res shr s %cpu %mem time+ swap time code info nflt command 666 root 20 0 1352m 1.2g 10m s 7.6 14.7 663:00.37 158m 663:00 36 1.3g 65 java 3170 mysql 18 0 145m 33m 5044 s 0.7 0.4 753:51.96 111m 753:51 6496 132m 100 mysqld 17340 root 15 0 2332 1080 800 r 0.3 0.0 0:00.05 1252 0:00 56 468 0 top ...

push - Handling the C2DM error ACCOUNT_MISSING in Android -

push - Handling the C2DM error ACCOUNT_MISSING in Android - the registration c2dm may result in error account_missing. error must handled, according documentation, in way "the application should inquire user open business relationship manager , add together google account." i offer user possibility application. have seen 2 ways show screen: //intent context.startactivity(newintent(settings.action_add_account).putextra(settings.extra_authorities, new string[] {?})); the problem solution have tried several extra_authorities ("com.google", "com.google.android.gsf, etc) , none of them show , if parameter extra_authorities omitted phone business relationship shown. //account manager accountmanager.get(context).addaccount("com.google", null, null, null, this, new accountmanagercallback<bundle>() { public void run(accountmanagerfuture<bundle> accountmanagerhandle) { //todo handle response. } }, null...

Mysql Memory Storage Engine biggest text size possible -

Mysql Memory Storage Engine biggest text size possible - i have chat scheme using storage engine [memory] varchar 255 way short, field type should use? dont plan on indexing field. you can't utilize blob or text in memory table, may able utilize longer varchar depending on version of mysql: values in varchar columns variable-length strings. length can specified value 0 255 before mysql 5.0.3, , 0 65,535 in 5.0.3 , later versions. effective maximum length of varchar in mysql 5.0.3 , later subject maximum row size (65,535 bytes, shared among columns) , character set used. http://dev.mysql.com/doc/refman/5.0/en/char.html mysql memory

printing - Prescription writing from an HTML page using jsp -

printing - Prescription writing from an HTML page using jsp - i building doctor's application in can build online prescription. provided textboxes , select lists , when clicks on print, prescription prints out letter head of hospital. want know whether there preexisting applications this. if not can u please tell me how can print html page letter head of hospital. thanking in anticipation. you need activex command handle printing properly. jsp printing

c# - Preventing ComExceptions when querying via WMI -

c# - Preventing ComExceptions when querying via WMI - i've got code uses wmi scour windows domain computers matching criteria. i comexception if i'm unable communicate computer i'm trying query. when testing on big domain, can result in thousands of exceptions beingness thrown, expensive performance-wise. is there way me check valid connection, before querying, can prevent these errors happening? simplified example: foreach(var computer in domain) { var scope = new managementscope(computerpath, options), query); seek { using (var searcher = new managementobjectsearcher(scope)) { if (searcher.get().count == 0) { // stuff } } } catch(comexception e) { // log , go on } } this bit of code in vbscript (vbs) via wmi: initialize wmi connection, , perform error handling authentication or connection issues. imagine take 30 seconds knows both "transcribe" c#. :) ' verify computer exists , business r...

jquery - sending jsonreader parameters with ajax -

jquery - sending jsonreader parameters with ajax - how can send jqgrid (jsonreader) parameters ajax??? $.ajax({ url:'admin/report_table.php', datatype: "json", async: false, success: function (data) { if(!data) data=0; // alert(data); my_data = data; } }); jquery("#report_data").jqgrid({ data: my_data, datatype: 'local', mtype: 'get', height: "auto", width: 'auto', rownum: 20, rownumbers: true, rowlist: [10,20,30], colnames:['name','date'], colmodel :[ {name:'name', index:'name', width:100}, {name:'date', index:'date', width:150,align:"center"}], pager: "#p_report_data", viewrecords: true, toolbar: [true, 'both'], caption: ...

c# - What happens when I add item to Cache with TimeSpan.Zero as Expiration? -

c# - What happens when I add item to Cache with TimeSpan.Zero as Expiration? - in web services app, found code adds item cache: system.web.caching.cache.insert(cachekey, item, null, cache.noabsoluteexpiration, timespan.zero, cacheitempriority.normal, callback); in case, seems there no absolute expiration , slidingexpiration beingness set timespan.zero, me means items should expire immediately. at same time, i've never seen expire, also, not patient plenty sit down there , wait. so happens in case? there default kicks in when slidingexpiration zero? or never expire this equal passing cache.noslidingexpiration , yes, item never expire (except due low amount of available memory). the static fellow member cache.noslidingexpiration initialized timespan.zero . cache.noabsoluteexpiration initialized timespan.maxvalue . c# asp.net web-services caching

tfs2010 - TFS utility or direct SQL -

tfs2010 - TFS utility or direct SQL - i count of tfs files checked in given date range. info include count(of check ins) , grouping [tfs file name] , [tfs work item type]. have seen direct querys tfs database, don't seem work tfs 2010. any tfs 2010 gurus out there can provide sql, or point me preferbly open source utility this? the sec time today came across question related powerful query of versioncontrolserver: queryhistory :) public ienumerable queryhistory( string path, versionspec version, int deletionid, recursiontype recursion, string user, versionspec versionfrom, versionspec versionto, int maxcount, bool includechanges, bool slotmode, bool includedownloadinfo, bool sortascending ) i'm not sure if there's such utility, can write quick code perform want using above query. for specific path, directory , under if recursive flag true, query give list of changesets occurred between 2 versions (the...

Perl Access Global arrays -

Perl Access Global arrays - i have classa , define global array in classa our @myarray = {"1","2","3","4"} i have classb in have object of classa. tried accessing myarray follows. $my_obj_of_classa->{'myarray'} $my_obj_of_classa->{'\@myarray'} $my_obj_of_classa->{\@myarray} none of these work. error saying: global symbol "@my_array" requires explicit bundle name this question contains deep misunderstanding of how global variables , objects work in perl. looks you're expecting @myarray deed class variable in ruby in can access on given object of class. not how globals in perl work @ all. i reply question, you'll run afoul of misunderstanding. think best if backed , @ to the lowest degree skimmed perl start. reviewing modern perl idea. perl

apache - mod rewrite convert to lowercase and repace + with - -

apache - mod rewrite convert to lowercase and repace + with - - i have simple news site gets news rss feeds. urls this: http://domain.com/news/this+and+that+happened+there/ i alter to http://domain.com/news/this-and-that-happened-there/ (looks more clean) help appreciated i'm sorry, uncertainty it's possible in case. based on you're saying, it's this+and+that+happened+there part unique id of news item , mean has remain unchanged in order work on website (be recognised on backend/database). if, on other hand, have other id in url. http://domain.com/news/this+and+that+happened+there/123/ 123 id, should doable, whatever's before shouldn't matter. you'd need have cms (or whatever backend you're using) have urls formatted way. you did add together seo tag question, understand that's want improve. i'd in case won't matter (but i'm not expert in field). apache mod-rewrite seo

java - AsyncTask cancelling issue -

java - AsyncTask cancelling issue - i have asynctask , doinbackground method implementing takes more time in general. doing 2 async tasks , when sec 1 starts, want stop first one. thus, if have @override protected bitmap doinbackground(integer... params) { books.download(13); } and heavy part happens in download(int) method actually. now, when cancel(true) on task, want downloading stop. want books.download(13) method interrupted. any way that? android not interrupt method, have that. cancel(bool) invokes method oncancelled(bool). if don't implement method, nil happens. java android multithreading android-asynctask

python - jQuery.ajax success callback not called although Pyramid did return response -

python - jQuery.ajax success callback not called although Pyramid did return response - i have simple jquery ajax post pyramid webapp. ajax call: $.ajax({ type: 'post', url: 'http://localhost:6543/test', datatype: 'json', data: json.stringify({"username":"demo","email":"demo@something.com","password":"1234"}), success: function (response) { alert(response); }, error: function (msg) { alert("error"); } }); pyramid route: config.add_route('test', 'test') config.add_view('tagzu.views.test', route_name='test', renderer='json') pyramid view: def test(request): homecoming {'content':'hello!'} now when phone call service, sending this request: post /test http/1.1 host: localhost:6543 user-agent: mozilla/5.0 (macintosh; intel mac os x 10.6; rv:5.0) gecko/...

Android,How to start a new Activity from a dialog? -

Android,How to start a new Activity from a dialog? - i start new activity custom dialog, have simple button , want when press button new activity start. i seek start: intent intent=new intent(arg0.getcontext(),idresult.class); startactivityforresult(intent, 0); but doesn't work; how can create work? use public class customdialog extends dialog implements onclicklistener { button okbutton, cancelbutton; activity mactivity; public customdialog(activity activity) { super(activity); mactivity = activity; setcontentview(r.layout.custom_dialog); okbutton = (button) findviewbyid(r.id.button_ok); okbutton.setonclicklistener(this); cancelbutton = (button) findviewbyid(r.id.button_cancel); cancelbutton.setonclicklistener(this); } @override public void onclick(view v) { if (v == cancelbutton) dismiss(); else { intent ...

Trouble with JQuery Ajax reading JSON -

Trouble with JQuery Ajax reading JSON - i'm using jquery seek read json , maintain ending in error handler. when inspect dom see "error" under statustext no more details. i've tried saving local file , have added beforesend section address potential mime problems based on post. when open url in browser generate valid json. $.ajax({ type : "get", url : "http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true", beforesend : function(x) { if (x && x.overridemimetype) {x.overridemimetype("application/j-son;charset=utf-8");}}, datatype : "application/json", success : function(data) { alert("success" + data)}, error : function(y) {alert("failure" + y.statustext);} }); there nil wrong code. problem occurring because trying perform cross-domain ajax request. however, not lost because google provides google maps javascript api v3 services - ...

How can I populate more than one Silverlight Image from Bing Maps asynchronous calls? -

How can I populate more than one Silverlight Image from Bing Maps asynchronous calls? - i have next code, works fine if want populate 1 image response bing maps. if seek 2 variable _currentimage ends beingness "image1" because calls asynchronous. how can pass image variable along imageryservicegetmapuricompleted method? using system; using system.windows.controls; using system.windows.media.imaging; using basicbingmapsimagerysvc.imageryservice; namespace basicbingmapsimagerysvc { public partial class mainpage : usercontrol { private const string bingmapskey = "my key"; private image _currentimage; public mainpage() { initializecomponent(); getmap(42.573377, -101.032251, image0, mapstyle.aerialwithlabels); getmap(42.573377, -101.032251, image1, mapstyle.road_v1); } private void getmap(double lat, double lon, image image, mapstyle mapstyle) { ...

asp.net - MVC 3 Route resolution question -

asp.net - MVC 3 Route resolution question - i have next 3 routes student/available/classes/{id} student/available/classes/{studentid}/{classtypeid} student/available/classes/query/{q} this how register routes in global.asax.cs file //student checkin routes.maproute("studentavailableclasses_getallforstudent", "student/available/classes/{id}", new {controller = "studentcheckin", action = "getbyid"}); routes.maproute("studentavailableclasses_getclassforstudent", "student/available/classes/{studentid}/{classtypeid}", new { controller = "studentcheckin", action = "getbystudentandclasstype" }); routes.maproute("studentavailableclasses_query", "student/available/classes/query/{q}", new { controller = "studentcheckin", action = "query" }); when execute url student/available/classes/q...

css - CSS3 non-linear Animation paths -

css - CSS3 non-linear Animation paths - how do non-linear animation css3? basically, if need bring box in out of view port, , straight downwards path, easy plenty next code: *{ transition: transform 0.5s ease-in; } -- , js trigger animation transform: translate3d(0,300px,0); but happens when element rotated? 25 deg? animation natural, it'll need progress in 25 deg offset line, , cannot top-down, or left-right animations... i hope i'm making sense here... @ demo here http://jsfiddle.net/ymht4/8/ i'm trying bluish box animate in on slanted path... i'm not sure if i'm understanding correctly, if you're trying i'm thinking, reply quite simple: function ani() { if (!state) { $('#otherbox').css('-webkit-transform', 'translate3d(100px,150px,0) rotate(25deg)'); state=true; } else { $('#otherbox').css('-webkit-transform', 'translate3d(0,0,0) ro...

java - Partial search in HashMap -

java - Partial search in HashMap - i need create phone book kind of thing. contains name & number. when type letters matching list should returned. illustration given below, when type h, list containing harmer, harris, hawken, hosler should returned. when type ha list containing harmer, harris, hawken should returned. map<string, string> namenum = new hashmap<string, string>(); namenum.put("brown", "+1236389023"); namenum.put("bob", "+1236389023"); namenum.put("harmer", "+1236389023"); namenum.put("harris", "+1236389023"); namenum.put("hawken", "+1236389023"); namenum.put("hosler", "+1236389023"); any thought how accomplish it? in advance. yeah, hashmap not right info construction this. bozho said, trie right one. with java's on-board tools, treemap (or sortedmap, actually) used: public <v> sortedma...

MapPoint lags with C# -

MapPoint lags with C# - i have included mappoint command object c# form. 1 time seek close programme mappoint seems free bit , causes lag. i tried setting _mpmap.saved = true; no luck mappoint can pause during startup , shutdown due cache issues, garbage collection, etc. make sure of mappoint references clean. you've finished object, clear reference. measure run garbage collection @ suitable point if possible (eg. after object intensive batch job). are working mappoint application or control? question ambiguous in regard. either way, should consider using statement. c# mappoint

objective c - How do I track NSError objects across threads? -

objective c - How do I track NSError objects across threads? - i have set of asynchronous calls beingness spawned using nsinvocationoperation : - (void)listrequestqueue:(storedatalistrequest *)request { [openlistrequests addobject:request]; nsinvocationoperation *requestop = [[nsinvocationoperation alloc] initwithtarget:self selector:@selector(listrequeststart:) object:request]; [opqueue addoperation:requestop]; [requestop release]; } - (void)listrequeststart:(storedatalistrequest *)request { if(self.resourcedata == nil) { //todo fail appropriately... return; } storedatalistresponse *response = [self newlistresponseforproductid:request.productid]; [self performselectoronmainthread:@selector(listrequestfinish:) withobject:response waituntildone:no]; [response release]; [sel...

objective c - iPhone App - NSArray Issue -

objective c - iPhone App - NSArray Issue - hi learning how code in objective-c. want store values of textfields in view in array: nsarray* answers = [nsarray arraywithobjects:fluidintake.text, sleepquality.text, sleepquantity.text, mentalrecovery.text, physicalrecovery.text, pretrainingenergy.text, musclesoreness.text, generalfatigue.text, nil]; is possible? if not there cleaner way store multiple textfield values without having assign them nsstring variable.. update: here function in view controller: -(ibaction)postdata:(id)sender{ diary = [[personaldiary alloc]init]; nsarray* answers = [nsarray arraywithobjects:fluidintake.text, sleepquality.text, sleepquantity.text, mentalrecovery.text, physicalrecovery.text, pretrainingenergy.text, musclesoreness.text, generalfatigue.text, nil]; [diary post:answers to: @"http://www.abcdefg.com/test.php"]; } it triggered upon button press. should...

asp.net mvc 3 - MVC3, Ninject and Ninject.MVC3 problem -

asp.net mvc 3 - MVC3, Ninject and Ninject.MVC3 problem - i start using ninject mvc3 here problem: - installed ninject 2.2.1.4 , ninject.mvc3 2.2.2.0 nuget - in webui (mvc3 project): global.asax.cs public class mvcapplication : ninjecthttpapplication { public static void registerglobalfilters(globalfiltercollection filters) { filters.add(new handleerrorattribute()); } public static void registerroutes(routecollection routes) { routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.maproute( "default", // route name "{controller}/{action}/{id}", // url parameters new { controller = "home", action = "index", id = urlparameter.optional } // parameter defaults ); } protected override void onapplicationstarted() { base.onapplicationstarted(); arearegistration.registerallareas(); registerglobalfilters(glo...

ruby on rails - How to ignore rescue_from in ApplicationController in rspec tests? -

ruby on rails - How to ignore rescue_from in ApplicationController in rspec tests? - by default, cucumber ignores rescue_from in applicationcontroller , reports exceptions directly. accomplished next line in cucumber env.rb file # in features/support/env.rb actioncontroller::base.allow_rescue = false is there way rspec ignore rescue_from well? (specifically, i'm wishing rspec ignore rescue_from cancan::accessdenied .) can not set same line spec_helper? why not setup have logged in user nowadays when testing? improve test. can set hook spec_helper before tests set sign in in 1 place specs. ruby-on-rails ruby-on-rails-3 rspec2 cancan rspec-rails

character encoding - DB2 not saving stylized apostrophe (’) -

character encoding - DB2 not saving stylized apostrophe (’) - i trying insert stylized apostrophe (’) table in db2 luw 9.7. every method have tried has resulted in beingness square () when selected back. the methods have tried insert it: modifying , committing row in command center (gui) updating row via sql command in command editor loading file (both utf-8 encoded , ansi encoded) through ibm info studio 2.2 is there way character database? if not, there list of characters cannot used? what encoding of database/tablespace? suspect needs set utf-8. may need create new tablespace or recreate database encoding explicitly set utf-8. to determine encoding, run next command , "code set" information: db2 db cfg <database name> character-encoding db2 db2-luw

.htaccess - redirect old pages to new seo targets -

.htaccess - redirect old pages to new seo targets - i have litte problem :( on site created mod_rewrite rules... rewriterule ^([^/]+)/([^/]+)/([^/]+)/([0-9][0-9][0-9][0-9][0-9][0-9][^/]+)$ /index.php?lang=$1&i=$2&cat=$3&item=$4 [l] with rule recieve next link /en/article/category/item/021205 with code above ok.. problem changed site seo. link looks /en/article/category/item/021205-seo-link-is-here my problem pages in google , co.. is there way create rule can redirect: /en/article/category/item/021205 >> >> /en/article/category/item/021205-seo-link-is-here my site multilangual /en /es /fr if of import rule best regards bernte if want redirect each page on own, order of rewriterules important. better solution ignore seo-link in index.php unless articleid unique .htaccess mod-rewrite redirect

ajax - Cannot use autorefresh(a4j:poll) in Richfaces 4 -

ajax - Cannot use autorefresh(a4j:poll) in Richfaces 4 - i implement a4j:poll auto-refresh result. implement source code next below code not fine. ================================================================================ <a4j:region> <h:form> <a4j:poll id="poll" interval="500" enabled="#{pollbean.pollenabled}" render="poll,grid" /> </h:form> </a4j:region> <h:form> <h:panelgrid columns="2" width="80%" id="grid"> <h:panelgrid columns="1"> <h:outputtext value="polling inactive" rendered="#{not pollbean.pollenabled}"></h:outputtext> <h:outputtext value="polling active" rendered="#{pollbean.pollenabled}"></h:outputtext> <a4j:commandbutton style="width:120px" id="control" value="#{pollbean.pollenabled?...