Posts

Showing posts from June, 2012

project management - Should we fix that bug? -

when triaging bugs release, criteria typically used determine whether bug fixed release? the cannonical article on my life code economist , eric sink. it's worth reading article, if want summed in checklist: when bug happens, how bad impact? - severity how bug happen? - frequency how effort required fix bug? - cost what risk of fixing bug? - risk

vba - it about sorting algorithm -

what happens identical items in sort? (sorting algorithm) example following list after has been sorted in ascending order: (f, g, a, r, s, g, a, x) it depends on sorting algorithm use. some algorithms stable means equal distinct items stay in same order started. others unstable means order may change. in example, you'd end (a, a, f, g, g, r, s, x) can't tell difference between equal elements. suppose instead start (f1, g1, a1, r1, s1, g2, a2, x1) , sort first letters. stable sort guarantee ended (a1, a2, f1, g1, g2, r1, s1, x1) - whereas unstable sort end (a2, a1, f1, g1, g2, r1, s1, x1) or similar. see wikipedia sorting entry more information, , details stability of various algorithms.

java - Load a file that's been bundled within the .jar? -

i'm building project ant , during build i'd bundle number of property/config files directly .jar make distribution simpler. i've been successful in adding these files .jar , i'm unable load them in program. what procedure open/read file that's been bundled .jar file? use getresourceasstream method on class : properties p = new properties(); p.load(myclass.class.getresourceasstream("/myprops.properties"));

sql - How to generate this query in sqlalchemy? -

i want generate query in sqlalchemy. table 'demande' exists in database. there subquery generates timesteps generate_series function. select timesteps.timestep timestep, d.count count (select date_trunc('hour',date_demande) timestep, count(id) count demande group timestep ) d right outer join (select timestep generate_series('2010-01-01 00:00:00'::timestamp, '2010-01-01 23:59:59'::timestamp, '1 hour'::interval) timestep ) timesteps on d.timestep = timesteps.timestep order timestep; i've tried : stmt = session.query( func. generate_series( datetime.datetime(2010,1,1,0,0,0), datetime.datetime(2010,1,1,23,59,59), cast('1 hour',interval())). label('timestep') ).subquery() print stmt q = session.query(...

command - In Emacs, how can I add a website like 'Stackoverflow' to my webjump hotlist? -

by default webjump hotlist has following use quite often: m-x webjump ret google m-x webjump ret wikipedia how can add 'stackoverflow' list? here's example code in a webjump.el file on site run apple: ;; (require 'webjump) ;; (global-set-key "\c-cj" 'webjump) ;; (setq webjump-sites ;; (append '( ;; ("my home page" . "www.someisp.net/users/joebobjr/") ;; ("pop's site" . "www.joebob-and-son.com/") ;; ) ;; webjump-sample-sites))

android - Taking screenshot of device's current screen -

when 1 wants publish app on play store (previously known android market), can upload screenshots of app. take these screenshots current device (motorola droid) i'm using test application. there apps on play store allow take screenshots, have root phone, don't want to. there related topics within stack overflow people want take screenshots out of there code ( here ). want take screenshots of running app current device, connected via usb computer; i'm developing via eclipse, there should way tell running device should take screenshot via sdk, right? some website (e.g. lifehacker ) mention way this, to take screenshot, you'll required enable usb debugging under settings, install android software development kit, , connect phone debug tool but don't explain need step-by-step. i appreciate if can me out. since developer, have sdk , working eclipse running android applications. plug in phone, , make sure enabled on phone usb debugging, device ne...

debugging - Unwanted breakpoints in Visual Studio debugger -

i check out projects svn , have couple of projects in solution while debugging . when set breakpoints in program debug it, program breaks @ other points have not set break point in there @ ! there break point in there? how happening? vs keep breakpoints location in .sln file of each project , when check out svn, causes break on breakpoint other people have set on project? or else causing it? it sounds have more sln file in source control. if blindly add entire folder structure source control, unwanted behavior.

c++ - How to replace WinAPI functions calls in the MS VC++ project with my own implementation (name and parameters set are the same)? -

i need replace winapi calls of the createfile, readfile, setfilepointer, closehandle with own implementation (which use low-level file reading via bluetooth). code, functions replaced, video file player , works regular hdd files. needed, video player still can play files hdd, if file in videoplayer input regular hdd file. what best practice such task? i suggest follow these steps: write set of wrapper functions, e.g mycreatefile, myreadfile, etc, call corresponding api , pass same arguments along, unmodified. use text editor search calls original apis, , replace these calls new wrapper functions. test application still functions correctly. modify wrapper functions suit own purposes. note createfile macro expands either createfilew or createfilea, depending on whether unicode defined. consider using lpctstr , tchar functions application can built either ansi or unicode. please don't use #define, suggested in other responses here, lead maintenance...

command line - Is there a better Windows Console Window? -

i find working on command line in windows frustrating, because console window wretched use compared terminal applications on linux , os x such "rxvt", "xterm", or "terminal". major complaints: no standard copy/paste. have turn on "mark" mode , it's available multi-level popup triggered (small) left hand corner button. copy , paste need invoked same menu you can't arbitrarily resize window dragging, need set preference (back multi-level popup) each time want resize window you can make window big before horizontal scroll bars enter picture. horizontal scroll bars suck. with cmd.exe shell, can't navigate folders \\netpath notation (unc?), need map network drive. sucks when working on multiple machines going have different drives mapped are there tricks or applications, (paid or otherwise), address these issue? sorry self-promotion, i'm author of console emulator, not mentioned here. conemu opensource cons...

sql server - What steps should be necessary to optimize a poorly performing query? -

i know broad question, i've inherited several poor performers , need optimize them badly. wondering common steps involved optimize. so, steps of guys take when faced same situation? related question: what generic techniques can applied optimize sql queries? look @ execution plan in query analyzer see step costs most optimize step! return step 1 [thx vinko ]

.htaccess - RewriteRule that preserves GET parameters -

what wrong rewrite rule? rewriterule ^api/(.+)$ api/index.php?url=$1 [l] i want "index.php?url=" added after api/ , before rest of parameters. api/image/upload&arg1=1&text=lorem+ipsum to api/index.php?url=image/upload&arg1=1&text=lorem+ipsum what wrong (.+) after api/? the regex on rewriterule run against path part of url, not query parameters. fortunately there [qsa] flag preserve existing query parameters.

language agnostic - api documentation and "value limits": do they match? -

do see in api documentation (as in 'javadoc of public functions' example) description of "value limits" classic documentation ? note: not talking comments within code by "value limits", mean: does parameter can support null value (or empty string, or...) ? does 'return value' can null or guaranteed never null (or can "empty", or...) ? sample: what see (without having access source code) is: /** * readers name current report. <br /> * <b>warning</b>the report must have been published first. * @param areadernameregexp filter in order return reader matching regexp * @return array of reader names */ string[] getreadernames(final string areadernameregexp); what like see be: /** * readers name current report. <br /> * <b>warning</b>the report must have been published first. * @param areadernameregexp filter in order return reader matching regexp * (can null or empty) * @retu...

Where can I read a clear explanation of POE (Perl Object Environment)? -

i searching week , clear tutorial poe relevant 2010 , didn't find one. i found tutorials in stack overflow question where can find books or tutorials perl’s poe? under poe tag of materials old , not clear. could provide clear link/lecture/tutorials poe if there any? if not, awesome if writes poe tutorials beginners , advanced users; perl community lot. i must admit question make sense. find poe powerful not having documentation deserves. if i'd rather start main documentation on cpan: http://search.cpan.org/dist/poe/lib/poe.pm then i'll give try 1 of examples in poe cookbook: http://poe.perl.org/?poe_cookbook imo great have poe same kind of core documentation available example python twisted.

Java <-> Python localhost stream, Java does not continue -

problem summary i've got application combines both java , python, 2 languages communicating across localhost socket. (i cannot use jython, can't throw out java pygame, , can't throw out python pure java.) the application opens socket between python , java , socket java central server. input java ui or server passed on python, program logic taken care of. python sends messages java either passed on server, or interpreted use on client (eg, python tells java draw screen). code snippets client.java:main pyconnect python = new pyconnect(); thread th = new thread(python); th.start(); while(!python.isinitialized()); client game = new client(); pythonmessagedecoder.setgame(game); th = new thread(game); th.start(); pyconnect.java:run system.out.println("starting..."); // ...initialize serversocket instance python... try { // ...accept connection python... system.out.println("connected!!!"); } // ...catch... try { // ...get in...

png - jquery tabbed interface breaks when using images -

using jquery create tabbed interface. coding quite typical: html: <div id="tabbed-interface"> <ul> <li><a href="#option1">option1</a></li> <li><a href="#option2">option2</a></li> <li><a href="#option3">option3</a></li> </ul> </div> jquery: $(document).ready(function(){ $('#tabbed-interface li:first').addclass('active'); $('#tabbed-interface div').not(':first').hide(); $('#tabbed-interface>ul>li>a').click(function(event){ $('#tabbed-interface>ul>li').removeclass('active'); $(event.target).parent().addclass('active'); $('#tabbed-interface>div').fadeout().filter(this.hash).fadein(250); return false;});}); css: ul li {background: #232323; list-style: none; border: 1px solid #616161; } ul li.active {background: none; list-style: none; border: 1px solid:...

objective c - Xcode: Linked Frameworks vs Other Frameworks -

coming c background, "linked frameworks" , "other frameworks" mean? having @ build target, see linked frameworks in fact linked (dynamically, presume - how static linking work?) what "other frameworks" then? to test, used nsstring class defined foundation in file. foundation in other frameworks , not being linked target. alas, compilation finished without warnings , executable ran. they're groups in groups & files hierarchy. don't have more meaning that. the frameworks referenced in other frameworks there can twist them down see headers easily, because (for example) cocoa.framework doesn't contain physical foundation.framework, appkit.framework , coredata.framework directories. acts if when linking, developer convenience.

Guides/Tutorials on unobtrusive javascript/ajax -

google hasn't yielded satisfactory results. i'd appreciate if people can provide suggestions. thanks. decent basic: http://www.lostechies.com/blogs/johnteague/archive/2008/11/03/unobtrusive-javascript-part-2-separating-content-style-and-behavior.aspx more in-depth mvc specific: http://blogs.msdn.com/b/simonince/archive/2010/04/20/jquery-mvc-progressive-enhancement.aspx

visual studio - Classis ASP debugging global.asa in VS2005 -

i trying set breakpoint in global.asa in old classic asp project iis 6 in visual studio 2005. somehow context menu setting breakpoint somewhere in global.asa disabled (greyed). how can set breakpoint then? breakpoints in .asp pages no problem though , work fine. try this: how to: debug global.asa files . short version place vbscript stop statement or jscript debugger @ beginning of procedure, before statements want step through.

.net - Error consuming Web Service from Winform App - "Cannot execute a program..." -

i have winform app calls web service check updates. works in dev , works everywhere else i've tried it, not on installed copy on machine (which happens same in dev). the error is: cannot execute program. command being executed "c:\windows\microsoft.net\framework\v2.0.50727\csc.exe" /noconfig /fullpaths @"c:\documents , settings\giovanni.double-afssz043\local settings\temp\squ8oock.cmdline". the firewall disabled , i've looked "c:\documents , settings\giovanni.double-afssz043\local settings\temp\squ8oock.cmdline" , not there. note every time try use web service ".cmdline" file different, example second time ran it "dae8rgen.cmdline." no matter name has, can never find file. any suggestions? the ".cmdline" file autogenerated file produced .net framework. application attempting real-time compile xml serializer used parse data web service. have verified can execute "csc.exe" command-line...

asp.net - What's a liquid layout? -

my designer keeps throwing out term "liquid" layout. mean? thanks clarification, have called percentage layout, , thought saying pieces moved around, , liquid a "liquid" layout site layout expands fill entire available area browser window resized. typically done using css. liquid layouts can quite helpful types of sites, tend more effort fixed width layouts, , usefulness depends on site content , how implemented are.

Java.lang.Runtime -

i have piece of code invokes instance of bash terminal through use of following -- proc = runtime.getruntime().exec("/bin/bash", null, working-dir); and run unix commands on invoked instance of bash i'm using printwriter object -- printwriter out = new printwriter(new bufferedwriter(new outputstreamwriter(proc.getoutputstream())), true); i'm using printwriter object execute commands in following fashion-- out.println("pwd"); out.println("ls >a.txt"); while both of commands seem work fine, have issue in case wherein construct command based on user input. being specific, i'm constructing command send files printer on network , i'm doing -- while ((strline = br.readline()) != null) { cmd= blah +blah +blah;//construction of command out.println(cmd); } what happening in above piece of code br reading file contains files need printed , string having file name goes command , write onto printwriter object. the issue im fa...

SMTP problem with PHP form in Godaddy hosting! -

i testing (nice) simple form css tricks. in website hosted in godaddy. and got following warning: warning: mail() [function.mail]: smtp server response: 451 see http://pobox.com/~djb/docs/smtplf.html in d:\hosting\4923367\html\test\contactengine on line 32. (i checked page didn't see useful) contactengine.php <?php $emailfrom = "chriscoyier@gmail.com"; $emailto = "janoochen@gmail.com"; $subject = "nice & simple contact form css-tricks"; $name = trim(stripslashes($_post['name'])); $tel = trim(stripslashes($_post['tel'])); $email = trim(stripslashes($_post['email'])); $message = trim(stripslashes($_post['message'])); // validation $validationok=true; if (!$validationok) { print "<meta http-equiv=\"refresh\" content=\"0;url=error.htm\">"; exit; } // prepare email body text $body = ""; $body .= "name: "; $body .= $name; $body ...

Problem with C++ templates -

i trying build small logger library. facig problem c++ templates. here class structure looks like. class abstract_logger_t { public: typedef abstract_logger_t logger_type; template<typename data_t> abstract_logger_t& log(const data_t& data) { return *this; } }; class stdout_logger_t : public abstract_logger_t { public: typedef stdout_logger_t logger_type; template<typename data_t> stdout_logger_t& log(const data_t& data) { cout << data << endl; return *this; } }; template<typename logger_t, typename data_t> void output(logger_t& logger, const data_t& data) { static_cast<typename logger_t::logger_type&>(logger).log(data); cout << data; } template<typename data_t> abstract_logger_t& operator<< (abstract_logger_t& logger, const data_t& data) { output(logger, data); return logger; } stdout_logger_t logger; logger << "hi " <...

sql server - What could be good ways to deploy ASP.Net Web Applications? -

we deploy web applications creating database , running sql scripts through query analyzer. copy output "publish website" , set website in iis. we have seen websetup in visual studio, part seems thinly documented. example, not clear how ask user ip , password of sql server. tend websites deployed way coming under folders http://example.com/project , instead of http://example.com . then there issues ajax.net not being installed or or other patch not applied. so far, have physical access servers. pretty though going shipping cdroms. practical tradeoff between manual intervention , automation? avoid visual studio deployment, , automate as possible. web deployment projects , nant can friends! briefly, our deployment setup: we use redgate sql script differences between dev , live database. an nant build file calls msbuild build web deployment project (.wdproj), zips resulting compiled web app (along sql change script) , uploads zip file server. on ser...

Smarter Vim recovery? -

when previous vim session crashed, greeted "swap file ... exists!" each , every file open in previous session. can make vim recovery prompt smarter? (without switching off recovery!) specifically, i'm thinking of: if swapped version not contain unsaved changes , editing process no longer running, can make vim automatically delete swap file? can automate suggested process of saving recovered file under new name, merging file on disk , deleting old swap file, minimal interaction required? when swap version , disk version same, should automatic. i discovered swapexists autocommand don't know if can these tasks. i have vim store swap files in single local directory, having in .vimrc: set directory=~/.vim/swap,. among other benefits, makes swap files easy find @ once. when laptop loses power or whatever , start bunch of swap files laying around, run cleanswap script: tmpdir=$(mktemp -d) || exit 1 rectxt="$tmpdir/vim.recovery.$user.txt...

objective c - Example of using Audio Queue Services -

i seeking example of using audio queue services. i create sound using mathematical equation , hear it. here's code generating sound function. i'm assuming know how use audioqueue services, set audiosession, , start , stop audio output queue. here's snippet setting , starting output audioqueue: // preferred sample rate (8,000 hz on iphone, 44,100 hz on ipod touch) size = sizeof(samplerate); err = audiosessiongetproperty (kaudiosessionproperty_currenthardwaresamplerate, &size, &samplerate); if (err != noerr) nslog(@"audiosessiongetproperty(kaudiosessionproperty_currenthardwaresamplerate) error: %d", err); //nslog (@"current hardware sample rate: %1.0f", samplerate); bool ishighsamplerate = (samplerate > 16000); int bufferbytesize; audioqueuebufferref buffer; // set stream format fields audiostreambasicdescription streamformat; streamformat.msamplerate = samplerate; streamformat.mformatid = kaudioformatlinearpcm; streamforma...

I have an issue with inline vs included Javascript -

i relatively new javascript , trying understand how use correctly. if wrap javascript code in anonymous function avoid making variables public functions within javascript not available within html includes javascript. on loading page javascript loads , executed on subsequent reloads of page javascript code not go through execution process again. there ajax call using httprequest php file , passes returned data callback function in onsuccess processes data, if call function httprequest within html in <script type="text/javascript" ></script> block on each page load i'd set - have inject entire javascript code block work on page load, hoping can educate me. if aren't using javascript framework, suggest it. use mootools, there many others solid (prototype, yui, jquery, etc). these include methods attaching functionality domready event. problem with: window.onload = function(){...}; is can ever have 1 function attached event (subse...

c# - Get enum name when value is known -

i have enum has different colors in it. pass function int , have return color name in enum in position. what's way this? return ((myenumclass)n).tostring();

javascript - Switching from JQuery to RightJS -

i using jquery , heard rightjs . rightjs seems faster, lighter & more object oriented. wondering if rightjs has somethings missing compared jquery (other huge plugin base). update: tried rightjs in small web project & decided use on few more projects. still stick jquery till confidant rightjs. far rightjs seems doing things jquery (mostly ajax & selectors). nahar, nikolay, author of rightjs here. couple of notes. 1) mentioned above jquery size incorrect because 24k size of gzipped version. gzipped rightjs weights 14k. 2) believe the_drow don't know he's talking about. rightjs has same jquery, moo, dojo or prototype. more of in rightjs have things classes, advanced form-features , cookies packed 14k when jquery has things plugins. then rightjs has custom builds http://rightjs.org/build as dojo, tried on 2 projects before, , if ask me, spare time, jquery better. the problem rightjs it's still underground , still growing critical mass o...

javascript - set background image of a css element -

i use following to set text content of css element var cell = document.createelement('li'); cell.textcontent = this.labelforindex(index); now want set back-ground image , color.....how it?? $(cell).css("background-image","url('mybg.png)");

.net - How to access the HttpServerUtility.MapPath method in a Thread or Timer? -

i use system.timers.timer in asp.net application , need use httpserverutility.mappath method seems available via httpcontext.current.server.mappath . problem httpcontext.current null when timer.elapsed event fires. is there way reference httpserverutility object ? inject in class' constructor. safe ? how can sure won't garbage collected @ end of current request? thanks! it's possible use hostingenvironment.mappath() instead of httpcontext.current.server.mappath() i haven't tried yet in thread or timer event though. some (non viable) solutions considered; the method care on httpserverutility mappath . alternative use appdomain.currentdomain.basedirectory , build paths this. but fail if app uses virtual directories (mine does). another approach: add paths need the global class. resolve these paths in application_start .

validation - How to check whether a file is valid UTF-8? -

i'm processing data files supposed valid utf-8 aren't, causes parser (not under control) fail. i'd add stage of pre-validating data utf-8 well-formedness, i've not yet found utility this. there's web service @ w3c appears dead, , i've found windows-only validation tool reports invalid utf-8 files doesn't report lines/characters fix. i'd happy either tool can drop in , use (ideally cross-platform), or ruby/perl script can make part of data loading process. you can use gnu iconv: $ iconv -f utf-8 your_file -o /dev/null or older versions of iconv, such on macos: $ iconv -f utf-8 your_file > /dev/null; echo $? the command return 0 if file converted successfully, , 1 if not. additionally, print out byte offset invalid byte sequence occurred. edit : output encoding doesn't have specified, assumed utf-8.

python - How to modify a text file? -

i'm using python, , insert string text file without deleting or copying file. how can that? unfortunately there no way insert middle of file without re-writing it. previous posters have indicated, can append file or overwrite part of using seek if want add stuff @ beginning or middle, you'll have rewrite it. this operating system thing, not python thing. same in languages. what read file, make modifications , write out new file called myfile.txt.tmp or that. better reading whole file memory because file may large that. once temporary file completed, rename same original file. this good, safe way because if file write crashes or aborts reason, still have untouched original file.

svn - Should I store all projects in one repository or multiple? -

i using tortoisesvn manage couple of projects have on go @ moment. when first moved source control wasn't sure how should laid out ended putting each project own repository. i wondering idea me move them 1 big repository , have them split project folders? else do? at moment none of them share common code may in future. make easier manage if together. thanks. depends extent mean "project". i have general local repository containing random bits of stuff write (including website, since it's small). single-user local svn repository not going suffer noticeable performance issues until you've spent lot of years typing. time svn faster anyway. i've yet regret having thrown in 1 repository, though of stuff in there unrelated other wrote all. if "project" means "an assignment class", or "the scripts use drive tivo", or "my progress in learning new language", creating repos per project seems bit unnecess...

c# - How do I determine program interupt in Windows Mobile -

i have game application have written windows mobile , want have timer associated puzzle. if program loses focus reason (call comes in, user switches programs, user hits windows button) want pop dialog box cover puzzle , timer stop. when user closes pop dialog timer can start again. does know how this? thanks take @ article on @ opennetcf's community site on determining when form or process changes .

When to use ' (or quote) in Lisp? -

after making through major parts of introductory lisp book, still couldn't understand special operator (quote) (or equivalent ' ) function does, yet has been on lisp code i've seen. what do? short answer bypass default evaluation rules , not evaluate expression (symbol or s-exp), passing along function typed. long answer: default evaluation rule when regular (i'll come later) function invoked, arguments passed evaluated. means can write this: (* (+ 2) 3) which in turn evaluates (+ 2) , evaluating a , 2. value of symbol a looked in current variable binding set, , replaced. a bound value 3: (let ((a 3)) (* (+ 2) 3)) we'd (+ 3 2) , + invoked on 3 , 2 yielding 5. our original form (* 5 3) yielding 15. explain quote already! alright. seen above, arguments function evaluated, if pass symbol a , not value, don't want evaluate it. lisp symbols can double both values, , markers in other languages have used strings, s...

What books should I read to have an undergraduate education in Computer Science? -

i've been largely independent learner gleaning can wikipedia , various books. however, fear may have biased self-education inadvertent omission of topics , concepts. goal teach myself equivalent of undergraduate degree in computer science top university (doesn't matter one). to end, i've purchased , started reading few academic textbooks: structure , interpretation of computer programs introduction algorithms artificial intelligence: modern approach as few textbooks have left on classes i've taken @ mediocre-at-best state university: an introduction computer simulation methods calculus: concepts , connections computer organization , architecture operating system concepts a first course in database systems formal languages , automata my questions are: what topics aren't covered collection? are there books more rigorous or thorough (or easier read) book listed here? are there books waste of time? in order should read books? what mit or ...

java.util.scanner - Scanner to TextIO question -

i need add value , input directly array using textio. know if using scanner use in.nextdouble() function, how using textio? textio.put("enter credit hours:"); credithour[sem][grd]+=in.nextdouble(); //i have use textio here. thanks in advance, found it. array [i][r] = textio.getlndouble();

wordpress - Changing Permalinks -

i want change permalinks /%year%/%monthnum%/%day%/%postname%/ /%postname%/ but when added following .htaccess file, posts didn't redirect way thought would: redirectmatch 301 /dddd/dd/dd/(.*) /$1 what need put .htaccess file make work? my site http://sweatingthebigstuff.com i think missing point here - think @daniel has changed permalinks, , wants redirect old permalinks . the problem redirectmatch regex matching literal 'd', not digits. personally use instead; redirectmatch 301 ^/[0-9]{4}/[0-9]{2}/[0-9]{2}/(.+)$ /$1 however , @markratledge right in saying there issues using postname.

How to delete a file in ruby which is still being used? -

i using spreadsheet gem generate excel file. problem when modify existing file wont allow save same name http://spreadsheet.rubyforge.org/guide_txt.html , in running script cant delete , recreate file beacause still being used. doing throws permission denied error. any suggeestion overcome this? follow example provided in documentation linked. use scheme creating 'output' version of document, wrap replacing original 'output' version. book = spreadsheet.open '/path/to/an/excel-file.xls' sheet = book.worksheet 0 sheet.each |row| row[0] *= 2 end book.write '/path/to/output/excel-file.xls'

How to resolve merge conflicts in Git? -

is there way explain how resolve merge conflicts in git? try: git mergetool it opens gui steps through each conflict, , choose how merge. requires bit of hand editing afterwards, it's enough itself. better doing whole thing hand certainly. as per @joshglover comment: the command doesn't open gui unless install one. running git mergetool me resulted in vimdiff being used. can install 1 of following tools use instead: meld , opendiff , kdiff3 , tkdiff , xxdiff , tortoisemerge , gvimdiff , diffuse , ecmerge , p4merge , araxis , vimdiff , emerge .

ecm - Has anyone here worked on KOFAX-SharePoint 2007 integration? -

we want able advance our business utilizing both of power of kofax , sharepoint 2007. pointers development-wise? we looked doing couple of years ago. thinking of having printed documents scanned in, converted ocr, , organized digitally in type of repository. we did analysis of ocr tools , repository / collaboration tools , easiest integrate. checked out kofax, ocr anydoc, , couple of others on ocr side, , sharepoint wss, sharepoint moss, hyland onbase, sap collaboration manager, , documentum on repository / collaboration side. your idea good, , there variants of in use in banking , other industries. integration, in experience if you're using sharepoint, should pretty easy kofax if leverage api's on both sides , creative simple web parts , iframes. ka

iphone - Why am I seeing the error "Format is not a string literal and no format arguments"? -

i creating music application in iphone integrating twitter in iphone user can listen particular song click on twitter tab ,log in twitter , post comment in twitter.and need username , password should saved when click on save username , password button remain logged in when in application. i have done code of saving username , password error indicating ""format not string literal , no format arguments"" here code: -(ibaction)saveall:(id)sender{ usernamestring =[[nsstring alloc]initwithformat:text1.text]; "format not string literal , no format arguments" [text1 settext:usernamestring]; nsuserdefaults *usernamedefault =[nsuserdefaults standarduserdefaults]; [usernamedefault setobject:usernamestring forkey:@"stringkey"]; passwordstring =[[nsstring alloc]initwithformat:text2.text]; "format not string literal , no format arguments" [text2 settext:passwordstring]; nsuserdefaults *passworddefault =[...

Is a static IP address permitted on the Amazon Elastic Cloud Computing (EC2) service? -

we planning have application run on amazon's cloud requires static ip address work. appears amazon's documentation static ip addresses not allowed... http://aws.amazon.com/ec2/#features --> elastic ip addresses http://developer.amazonwebservices.com/connect/message.jspa?messageid=65389 allen / posted: aug 3, 2007 7:30 pdt in response to: steve isaacson ... the machine's external ip address static address. have until instance terminated or until amazon needs renumber network. months or years now, in day , age, static gets. http://docs.amazonwebservices.com/amazonec2/dg/2006-06-26/technicalfaq.html#d0e7741 8.12. can use static ip address in instances? no. image must configured dhcp client , assigned ip address. this confused me little bit: http://developer.amazonwebservices.com/connect/entry.jspa?externalid=1346 --> introduction elastic ip addresses static ip addresses designed dynamic cloud comput...

Delphi - Minimize & Restore frees up memory? -

i have been dabbling delphi off , on years , have wondered why minimizing , restoring application cause use less memory ? as example using delphi 7 , create new project nothing on blank form projects start out , press f9 run application , @ memory usage app , it's sitting @ around 3.5mb minimize app , memory usage goes down around 760kb , restore app , memory usage goes around 1.5mb 1/2 of when first loaded , has confused me making happen , more point there anyway start application directive makes use 1.5mb of memory instead of 3.5mb uses. cheers, dave probably windows memory management. try same thing windows calculator , behavior same :)) here answer: http://support.microsoft.com/?kbid=293215 , folks have same question: http://digital.ni.com/public.nsf/allkb/9ea3d4258e037b8a8625763300434d4d best regards,

.net - System.IO.Directory.Exists is giving an intermittent false negative -

i’m getting intermittent false negative on following line of code in asp.net 2 web site : if (!system.io.directory.exists(folder)) the folder exists, , contains log file written when clr doesn’t lie folder’s existence. appreciated. exists() returns false, rather throwing error, if sort of io error occurs. 1 thing watch out security errors. exists not perform network authentication, requires being pre-authenticated if accessing network share, @ least according docs. haven't tried myself.

How to manipulate images at the pixel level in C# -

how manipulate images @ pixel level in c#? i need able read/modify each bitmap pixel rgb values separately. a code sample appreciated. if want speed, lockbits . see here walkthrough bob powell . if want edit few, getpixel / setpixel should want.

What is the best CSS Framework and are they worth the effort? -

reading on forum i've came across world of css frameworks. 1 i've been looking @ blueprint . wondering if else had come across css frameworks, suggest best , if worth effort? css 'frameworks' missing point. css not javascript, can include base library/framework , call functions , objects higher-level work. css framework can give declarative rules: default browser-rule-reset stuff, class styles forced author page to, , layout rules using 'float' , 'clear'. can write in few lines of css rather pulling in bloat of hundred framework rules. the 'grid layout' stuff in particular goes bad old days of mixing presentation markup. 'div class="span-24"' no better table, you'll have go in there , change markup affect layout. , frameworks i've seen based around fixed-pixel floated boxes, making impossible create liquid layout accessible on wide range of window sizes. it's backwards authoring, of use scared writ...

ASP.NET or PHP? Soft for Real Estate Agencies -

soon begin create crm real estate agencies sphere. in backround 2 years of php-programming & 5 years of asp.net (intranet applications). & think maybe asp.net (i write code on c#) have ide (vs 2010), monster :) my application multiplayer webapplication different real estate agencies (it fashionable talk saas). interaction on ssl via web browser. what situation developing of web applications now? what language prefer start new project? pluses & minuses of each? or maybe choose language? maybe exist standarts of data structure & exchange in real estate @ moment? work in language comfortable with. modern programming languages have pros , cons. it's more important build product language used build it.

Protected Mode Keyboard Access on x86 Assembly -

i'm working on keyboard input basic kernel i'm developing , i'm stuck. can't seem find information online can show me information need know. my kernel running in protected mode right now, can't use real mode keyboard routines without jumping real mode , back, i'm trying avoid. want able access keyboard protected mode. know how this? thing have found far involves talking controller directly using in/out ports, beyond i'm stumped. is, of course, not comes often. normally, assembly tutorials assume you're running operating system underneath. i'm new x86 assembly, i'm looking resources working standard hardware protected mode. i'm compiling assembly source code nasm , linking c source code compiled djgpp. suggestions? the mit operating systems class has lots of references. in particular, check out adam chapweske's resources on keyboard , mouse programming. in short, yes, using raw in/out ports, requires either running i...

C# HTML Font Tag Parsing -

i need parse large amount of text uses html font tags formatting, for example: <font face="fontname" ...>some text</font> specifically, need determine characters rendered using each font used in text. need able handle stuff font tags inside font tag. i need use c# this. there sort of c# parser class make easier? or have write myself? thanks! i have not used it, have seen html agility pack mentioned type of thing.

javascript - How can I use getElementById for a control created in code behind? -

i trying use onmouseover , onmouseout event on table td created on client side, when user mouses on table cell, panel becomes visible, , when mouse out, panel becomes invisible. <table> <tr> <td onmouseover="togglevisibility('fileheader', true);" onmouseout="togglevisibility('fileheader', false);"> content goes here. </td> </tr> </table> the onmouseover , onmouseout call following javascript function, defined on client side. <script language="javascript" type="text/javascript"> function togglevisibility(id, visible) { var content = document.getelementbyid(id); if (content != null) { if (visible) { content.style.display = "block"; } else { content.style.display = "none"; } } } </script> the ...

asp.net mvc 2 - Model binding issue in LINQ to SQL -

i starting work linq, , pretty familiar mvc. have typed view updating record. have done creation: this works fine, , creates record in database: public actionresult create(tablemodel tablemodel) { dbdatacontext db = new dbdatacontext(); if (modelstate.isvalid) { db.tablemodel.insertonsubmit(tablemodel); db.submitchanges(); } } but when trying update: public actionresult manage(tablemodel tablemodel) { dbdatacontext db = new dbdatacontext(); if (modelstate.isvalid) { db.submitchanges(); } } this fails, in sense not update record in database. no actual error/exception occurs, , can step through fine. i sure missing something, cannot find what. appreciate on matter. update did notice if record using datacontext: dbdatacontext db = new dbdatacontext(); var m = db.tablemodels.single(m => m.id == 1); m.name = "updatedname"; db.submitchanges(); this update, assume somehow not binding model linq context...

Vertical spring spacer CSS -

i'm new here @ stack overflow . :-) how can create div automatically change it's height space filled? i've tried with height:"auto" doesn't work... :( for example: <div style="height:300px"> <div style="height:50px">...</div> <div>the height of div varies page page...</div> <div style="height:???">sproing!!</div> <div style="height:50px">...</div> </div> edited example match better needings. thanks. unfortunately there isn't pure css way since you're trying is: spring height = parent height - n children's height you can pretty jquery though: markup <div id="parent"> <div id="top">...</div> <div id="spring">sproing!!</div> <div id="bottom">...</div> </div> jquery var leftover = $('#parent').h...

Writing my first VB.NET Class -

i trying make 2 variables available throughout site. parsing url in order retreive both of them. this code on page works fine. dim countrylanguage string countrylanguage = (request.servervariables("url")) dim langvar = (mid(countrylanguage, 2, 2)) dim countryvar = (mid(countrylanguage, 5, 2)) i have created class file code below. complilation error (bc30451: name 'request' not declared.). public class url_parser public shared function urlvars(byval langvar, byval countryvar) string dim countrylanguage string countrylanguage = (request.servervariables("url")) dim langvar = (mid(countrylanguage, 2, 2)) dim countryvar = (mid(countrylanguage, 5, 2)) end function end class thanks you can use system.web.httpcontext.current.request request object current thread. a better way country , language folders use request.url.segments . public class url_parser public shared function urllanguage() stri...

f# - Proper way to define a large immutable type with pieces that get updated? -

i'm designing game object in f#. in c++, make classes represent graphical aspect, physical etc each dynamic values, , add instances of classes gameobject. use same design in f# mutable types, i'm trying keep immutable. if used same design recreating thousands of large objects each frame, , spend cpu time allocating. is there way can define type link object's values , supply new ones, cut down on allocations? eg change colour of box, want use old box's memory new graphics piece, , use old graphics piece's memory new colour: let box = ... ... let changedbox = {box graphics = { box.graphics colour = blue} } yes, exactly. assuming "the big object" in fact reference graph of many smaller objects, typical "update of immutable" creates 1 or 2 new small objects , references same old ones rest. for example, if person has name , address, , address has street , city , state , zip, , need update zip of person, need cr...

dom - How can I determine the type of an HTML element in JavaScript? -

i need way determine type of html element in javascript. has id, element div, form field, fieldset, etc. how can achieve this? nodename attribute looking for. example: var elt = document.getelementbyid('foo'); console.log(elt.nodename); note nodename returns element name capitalized , without angle brackets, means if want check if element <div> element follows: elt.nodename == "div" while not give expected results: elt.nodename == "<div>"

arrays - PHP array_intersect() - how does it handle different types? -

if i've got array of values zerofilled string representations of various numbers , array of integers, array_intersect() still match elements of different types? for example, work: $arrayone = array('0003', '0004', '0005'); $arraytwo = array(4, 5, 6); $intersect = array_intersect($arrayone, $arraytwo); // $intersect = "array(4, 5)" ... , if not, efficient way accomplish this? loop through , compare, or loop through , convert integers , run array_intersect() after, or ... $ cat > test.php <?php $arrayone = array('0003', '0004', '0005'); $arraytwo = array(4, 5, 6); $intersect = array_intersect($arrayone, $arraytwo); print_r($intersect ); ?> $ php test.php array ( ) $ so no, not. if add foreach($arrayone $key => $value) { $arrayone[$key] = intval($value); } you $ php test.php array ( [1] => 4 [2] => 5 )

iphone - Hi-Res @2x image not being picked up for tab bar item -

i have tabbarcontroller sets image tab so, in -init method: self.tabbaritem.image = [uiimage imagenamed:@"tabimage.png"]; i have tabimage@2x.png file in resource. in iphone 4 simulator or phone, hi-res image isn't being picked - low res version being scaled up. any ideas why might be? edit: more info: if try , explicitly use tabimage@2x.png (or tabimage@2x ) tab image see extremely large , blown beyond bounds of tab, if it's being scaled 60px 120px. looks whatever name supply being treated scale=1.0 image. note simulator not case-sensitive, device is. make sure case matches exactly. if you've changed case of filename @ point, you'll need clean , rebuild. sometimes, simulator, i've had blow away folder in library/application support/iphone simulator/4.3/applications/ rebuild pick renamed image. always use [uiimage imagenamed:@"foo.png"] this work on 3.x , 4.x devices, , on 4.x simulator. devices retina displays (and 4...

ios4 - Device with OS3.0 not being detected after Xcode upgrade to 3.2.3 with OS4.0 SDK -

i have upgraded xcode 3.2.3 0s4.0 sdk. now, after upgrading setup, 1 of device not being detected xcode. in organizer window, device displayed yellow status , xcode complains of "the version of iphone os on “” old use version of iphone sdk. please restore device version of os listed below." os installed on device : 3.0 (7a341) xcode supported iphone os versions: 4.0.1, 4.0, 3.2.1(7b405), 3.2, 3.1.3, 3.1.2, 3.1.1, 3.1, 3.0.1, 3.0. my question if xcode supports 3.0 version, why device not being detected ide. try restarting mac os , power off , on iphone

c# - Need an XNA framework equivalent, that WORKS with system.windows.forms (it doesn't have to work with XBox 360) -

next semester taking "software practive ii" class. in class, professor wants learn xna. have been playing around xna quite sometime, , enjoy functionality , simplicity. however, xna not take advantage of system.windows.forms. using cegui# able xna work system.windows.forms, has limited functionality (for example, while mouse has has "left-click" , "double-left-click" doesn't have "drag"). and so, ditching xna new framework. here's question --> there c# framework has of functionality , simplicity xna, compatible system.windows.forms (or @ least, compatible system.windows.forms if use 3rd party tool)? framework not have work xbox360 - has work windows xp , windows vista. have similar syntax xna (in other words, have similar methods loadcontent, draw, , update). thank time, ~benshums i recommend slimdx

How we can Download a HTML Page using JAVA? -

how can download html page using java?? here code: public static string savepage(final string url) throws ioexception { string line = "", = ""; url myurl = null; bufferedreader in = null; try { myurl = new url(url); in = new bufferedreader(new inputstreamreader(myurl.openstream())); while ((line = in.readline()) != null) { += line; } } { if (in != null) { in.close(); } } return all; } now can process 1 line after 1 other in while loop.

c# - Difference between string.Empty and "" -

possible duplicate: in c#, should use string.empty or string.empty or “” ? is there difference in c# between following declarations... private string m_port = string.empty; or... private string m_port = ""; is coding standard makes neater? just coding standard... http://msdn.microsoft.com/en-us/library/system.string.empty%28vs.80%29.aspx

postgresql - JDBC: Can I share a connection in a multithreading app, and enjoy nice transactions? -

it seems classical way handle transactions jdbc set auto-commit false. creates new transaction, , each call commit marks beginning next transactions. on multithreading app, understand common practice open new connection each thread. i writing rmi based multi-client server application, server seamlessly spawning 1 thread each new connection. handle transactions correctly should go , create new connection each of thread ? isn't cost of such architecture prohibitive? yes, in general need create new connection each thread. don't have control on how operating system timeslices execution of threads (notwithstanding defining own critical sections), inadvertently have multiple threads trying send data down 1 pipe. note same applies network communications. if had 2 threads trying share 1 socket http connection, instance. thread 1 makes request thread 2 makes request thread 1 reads bytes socket, unwittingly reading response thread 2's request if wrapped t...

vim linebreak after hyphen with gq -

is there way configure vim's gq function allows line breaking after hyphen (in compound word)? e.g. twentieth- century and way, i'm not on own laptop, on 1 of lab, runs windows, solution not using programs par or fmt bonus points :-) (though i'm interested in solutions using these tools if not possible using vim -- @ least able on laptop). thanks in advance. for ascii hyphen (0x2d), isn't possible. if you're able use unicode, can use identically-looking unicode variant (u+2010, cp. http://en.wikipedia.org/wiki/dash ) instead. can inserted via ctrl-v (ctrl-q on windows installations of vim), followed u2010 . or define digraph it: :digraph -- 8208 " hyphen, u+2010 with :set formatoptions+=m vim will also break @ multi-byte character above 255. voila! if need persist text ascii, write mappings / wrapper around gq :substitute s hyphens , forth.

asp.net mvc - URL Design for SSL-Secured SaaS Application -

i developing application using asp.net mvc platform, exposed service on web (the saas model). trying determine best way partition url namespace each user account. application need accessed securely via ssl, main concerns have been around coming url design works ssl certificates. here options have come with. in each example bob , jane 2 example user accounts: option a: each account has unique subdomain under common domain name e.g. https://bob.example.com https://jane.example.com this require wildcard ssl certificate (e.g. mapped *.example.com) each user can seamlessly access account via ssl. seamless mean without web browser warning user ssl certificate problems. drawback can think of wildcard certs seem considerably more expensive normal fixed domain certs. cost difference negligible in grand scheme of things, keeping in mind if else proves equal. option b: each account has unique domain name e.g. https://bobs-domain.com https://domain-of-jane.com in ca...