text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Does anyone know of free tools (languages, environments) that would support development of GUI applications on the Windows platform? I am looking to be able to create a single executable file that has no dependencies on any external runtime or library. I would like to be able to then run this EXE in a very similar m...
[ 0.328307181596756, 0.21002739667892456, 0.39968153834342957, 0.15695376694202423, -0.011212233453989029, -0.2183019369840622, 0.10599160194396973, 0.30306029319763184, -0.24375852942466736, -0.8175029754638672, -0.06578192859888077, 0.7570796608924866, -0.2555154263973236, 0.11219346523284...
for an environment/language that provides more specific and faster support for GUI development. Also, Delphi costs money. For quick prototyping, [**Autoit**](http://www.autoitscript.com/autoit3/index.shtml) is a viable option (but it is a scripting language though). ![http://www.autoitscript.com/images/gui_eg1.png](ht...
[ -0.23632681369781494, -0.07546676695346832, 0.394605815410614, -0.012075967155396938, -0.11927000433206558, 0.12411170452833176, 0.21884970366954803, -0.09055459499359131, -0.25677260756492615, -0.7533712387084961, -0.1003037840127945, 0.8694953322410583, -0.517112135887146, -0.21081702411...
the "AutoEditDebugger" might not be supported: > EDIT October 2009: NB This script has not been maintained since some time in 2008. Due to some problem with the editor it crashes in Vista.
[ -0.12708783149719238, 0.01743040792644024, 0.4983278214931488, -0.060860320925712585, -0.1289680004119873, -0.10276197642087936, 0.8744019865989685, 0.2865102291107178, 0.0019762057345360518, -0.6887683272361755, 0.02308495342731476, 0.5989298224449158, -0.44150272011756897, 0.232517659664...
I want to open a file which is periodically written to by another application. This application cannot be modified. I'd therefore like to only open the file when I know it is not been written to by an other application. Is there a pythonic way to do this? Otherwise, how do I achieve this in Unix and Windows? **edit**...
[ 0.4607531726360321, 0.2598418891429901, 0.19689689576625824, -0.035377874970436096, -0.031170645728707314, -0.2489037811756134, 0.3442171812057495, 0.3082197308540344, -0.38785406947135925, -0.6445550322532654, -0.1372889131307602, 0.6163028478622437, -0.170927956700325, 0.0763130411505699...
may not really be python related right now. Will your python script desire to open the file for writing or for reading? Is the legacy application opening and closing the file between writes, or does it keep it open? It is extremely important that we understand what the legacy application is doing, and what your python...
[ 0.36048978567123413, 0.1984848976135254, -0.05521216616034508, 0.2488155961036682, 0.08336130529642105, -0.37156200408935547, 0.24975119531154633, 0.26584580540657043, -0.36301276087760925, -0.4456765651702881, -0.2685181200504303, 0.700611412525177, -0.15718373656272888, 0.163540303707122...
concerns - the hard question will be whether what you are trying to achieve will be possible at all. --- **UPDATE** OK, so knowing (from your comment) that: > the legacy application is opening and > closing the file every X minutes, but > I do not want to assume that at t = > t\_0 + n\*X + eps it already closed ...
[ 0.1676243543624878, 0.06899294257164001, 0.403646856546402, 0.12000575661659241, 0.43636390566825867, -0.25792181491851807, 0.33643245697021484, -0.21880225837230682, -0.48835644125938416, -0.5411584377288818, -0.19738730788230896, 0.7579764723777771, -0.2090246081352234, 0.036365281790494...
legacy application keeps the file open for at most some known quantity of time, say `T` seconds (e.g. opens the file, performs one write, then closes the file), and re-opens it more or less every `X` seconds, where `X` is larger than 2\*`T`. * `stat` the file * subtract file's modification time from `now()`, yielding...
[ 0.2514825463294983, -0.1738438904285431, 0.5587713718414307, 0.06975691765546799, 0.6591033935546875, -0.2221410572528839, 0.23556266725063324, -0.30993908643722534, -0.41215160489082336, -0.6101763248443604, -0.5803705453872681, 0.5022724866867065, 0.21704189479351044, 0.08390253037214279...
tinker). For Windows see [MSDN](http://support.microsoft.com/kb/223184) 2. **Windows**: in addition (or in-lieu) of the OS-independent method above, you may attempt to use either: * sharing (locking): this assumes that the legacy program also opens the file in shared mode (usually the default in Windows apps); moreove...
[ 0.38668352365493774, 0.13184484839439392, -0.04887406527996063, 0.07788386940956116, 0.13728737831115723, -0.12401393800973892, 0.5736970901489258, -0.2155565619468689, -0.3132264018058777, -0.20636644959449768, -0.04622513800859451, 0.663791298866272, -0.11636608839035034, 0.2317920476198...
legacy application being denied opening of the file, do not use this method. * attempting to find out what files are open in the legacy application, using the same techniques as [ProcessExplorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) (the equivalent of \*nix's `lsof`) + you are even more vul...
[ 0.10179416090250015, 0.048136595636606216, 0.132579043507576, 0.07349792122840881, 0.31927695870399475, -0.30368202924728394, 0.13262152671813965, -0.150399312376976, -0.3684021532535553, -0.7052177786827087, -0.6189725399017334, 0.48887142539024353, -0.08647464215755463, 0.249290540814399...
legacy application uses locking, but if it is, locking is not a real option unless the legacy application can handle a locked file gracefully (by blocking, not by failing - and if your own application can guarantee that the file will not remain locked, blocking the legacy application for extender periods of time.) ---...
[ 0.2809048593044281, 0.09615612030029297, 0.3680607080459595, 0.0647440254688263, 0.2814856767654419, -0.35360413789749146, 0.32721519470214844, -0.3652021586894989, -0.34306132793426514, -0.30455270409584045, -0.5906352996826172, 0.4467266798019409, -0.3765251934528351, 0.4423614740371704,...
the check in step 1 to confirm that the legacy application did not open the file between steps 1 and 2; delay and restart at step 1 if so, otherwise proceed to step 4 4. doing your business on the file -- ideally simply renaming it for subsequent, independent processing in order to keep the legacy application suspended...
[ 0.4881756603717804, -0.19921261072158813, 0.5100274682044983, 0.15504103899002075, 0.20007148385047913, -0.5068390369415283, 0.5215260982513428, -0.31244713068008423, -0.21485692262649536, -0.25769463181495667, -0.5926117300987244, 0.5500956773757935, -0.12866011261940002, 0.22586815059185...
I am developing a web application, in which I have the following type of search functionality; * **Normal search**: where user will enter the search keyword to search the records. * **Popular:** this is no a kind of search, it will display the popular records on the website, something as digg and other social bookmark...
[ 0.600837767124176, -0.2339322865009308, 0.27366551756858826, 0.3100011646747589, -0.06174157187342644, -0.11612415313720703, -0.23154348134994507, 0.35364043712615967, -0.6311586499214172, -0.6349509954452515, -0.17863181233406067, 0.05999644100666046, -0.03446890413761139, 0.5151373744010...
Same as city search I have tag links, when user will click on a tag then all records marked with that tag will be displayed to the user. * **Alphabet Search:** Same as city and tag this functionality also has links of letters like "A", "B", .... etc and when user clicks on any letter link then all records starting with...
[ 0.30251291394233704, -0.16753962635993958, 0.7171380519866943, 0.024393554776906967, -0.40560388565063477, -0.2191784679889679, 0.3072896897792816, -0.12151136249303818, -0.37049615383148193, -0.8922473192214966, 0.138055682182312, 0.4659985303878784, -0.3023359775543213, 0.129402503371238...
the searches records, and I'll figure using query string that which search is user is using and what data I have to display to the user. Such as, lets say I am searching for city, delhi and tag delhi-hotels then the urls for both will be as : **For City:** www.example.com/result.aspx?search\_type=city&city\_name=delhi...
[ 0.006506177131086588, 0.005806122440844774, 0.8412116765975952, 0.2331383377313614, -0.144248828291893, 0.04563937708735466, 0.07932039350271225, -0.32650357484817505, -0.31989389657974243, -0.6326446533203125, -0.016407085582613945, 0.22638879716396332, -0.04958934336900711, 0.32835856080...
new idea is cleaner and it tells specifically everything to the user that which page is for what, it also gives him idea that where he is now, what records he's seeing now. But the new idea has one problem, In case I have to change anything in my search result display then I have to make changes in all pages one by one...
[ 0.19657543301582336, -0.10330107063055038, 0.6827627420425415, 0.2481512874364853, -0.0662994235754013, -0.18601757287979126, 0.014263415709137917, -0.1584966778755188, -0.6942613124847412, -0.7591376900672913, 0.31653550267219543, 0.31743305921554565, -0.3098531663417816, 0.56496036052703...
But I am still no able to decide that with which I dea I have to go for, Can anyone tell me your thoughts on this problem. I want to implement an idea which will be easy to maintain, SEO friendly (give good ranking to my website), user-friendly(easy to use and understand for the users) Thanks. One thing to mention o...
[ 0.5602881908416748, 0.003079131478443742, 0.3888484239578247, 0.17307840287685394, -0.4319800138473511, -0.30452966690063477, 0.24078720808029175, 0.04158381000161171, -0.03627362847328186, -0.5881624221801758, 0.2566603720188141, 0.535007894039154, -0.16449040174484253, -0.017307354137301...
have duplicate content on the site, or if there's the possiblity for almost infinite lists. 2. Analysing traffic flow. So for point 1, as an example, you'll notice that SO has numberous ways of finding questions, including: 1. On the home page 2. Through /questions 3. Through /tags 4. Through /unanswered 5. Through /...
[ 0.46586182713508606, -0.03651010990142822, 0.1866062730550766, 0.4239148199558258, -0.1595262587070465, -0.23618806898593903, 0.4106566309928894, 0.05035749077796936, -0.9705921411514282, -0.8047517538070679, 0.05956624075770378, 0.3023469150066376, -0.5913301110267639, 0.1077636331319809,...
you to filter like this. Ideally you want the search engine to index the list of Cities and Tags, but you only need it to index the actual details once - say from the A to Z list. For point 2, when analysing your site traffic, it will be a lot easier to see how people are using your site if the URLs are meaningful, an...
[ 0.4500407874584198, -0.4030085504055023, 0.15364564955234528, 0.43186452984809875, -0.2720091938972473, -0.3789277672767639, 0.09884727001190186, 0.06886310130357742, -0.25059783458709717, -0.8397677540779114, 0.10459674149751663, 0.2151070386171341, -0.3101448118686676, -0.148297175765037...
information will also make selling advertising easier if that's what's you're interested in. Finally, as I mentioned in the comments to other responses, users may well want to bookmark a particular search - having the query baked into the URL one way or another (query strings or rewritten url) is the simiplist way to ...
[ 0.5115562081336975, 0.0044114720076322556, 0.44839271903038025, 0.29502204060554504, -0.07192191481590271, -0.12290139496326447, 0.008028975687921047, 0.4176650941371918, -0.19990387558937073, -0.5145029425621033, 0.07831574231386185, 0.48729461431503296, 0.1643114537000656, 0.157906591892...
My page is 2x the height of the screen (size varies depending on other item on the page). I want to show an absolutely positioned SPAN in the middle of the screen regardless of scroll position. I apply the following style on button click, however if I scroll all the way down, the element shows up at the very top of th...
[ 0.08692295849323273, 0.07759563624858856, 0.9493774175643921, -0.08369775116443634, -0.08383765071630478, -0.0001800036698114127, 0.06346840411424637, -0.38341382145881653, 0.11921687424182892, -0.5909073948860168, -0.07571960240602493, 0.47359585762023926, 0.13399939239025116, -0.10154130...
in the middle of the page based on the scroll potion at the time of a button click? Thank you. Are you sure you don't want [fixed positioning](http://www.w3schools.com/Css/pr_class_position.asp)? Absolute positioning positions an item within the context of a page, so it will scroll up and down with the page. Fixed po...
[ -0.2839306592941284, -0.29658445715904236, 0.8395700454711914, 0.03424731269478798, 0.08208492398262024, 0.11626933515071869, -0.31441783905029297, 0.07756135612726212, -0.3282186686992645, -0.7371441125869751, -0.1975153684616089, 0.4822920262813568, -0.21086418628692627, -0.1055576279759...
I use the following code to call a wcf service. If i call a (test) method that takes no parameters, but returns a string it works fine. If i add a parameter to my method i get a wierd error: > {"ExceptionDetail":{"HelpLink":null,"InnerException":null,"Message":"The token '\"' was expected but found '''.","StackTrace":...
[ 0.17651571333408356, 0.02069428376853466, 0.5409017205238342, -0.2102949172258377, -0.11005645990371704, 0.20855505764484406, 0.5370123982429504, -0.8872197866439819, 0.025881245732307434, -0.8729650974273682, -0.038682643324136734, 0.6371353268623352, -0.2250671535730362, 0.13071936368942...
Object[] parameters)\u000d\u000a at System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message message, Object[] parameters)\u000d\u000a at System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters)\u000d\u000a at System.Ser...
[ -0.2088981717824936, -0.08141662180423737, 0.48201221227645874, -0.11160077899694443, -0.015445662662386894, 0.6444820165634155, 0.07997291535139084, -0.6496202349662781, -0.47345098853111267, -0.6460404396057129, -0.06466639786958694, 0.3213977515697479, -0.4078991711139679, 0.34804162383...
Object[] parameters)\u000d\u000a at System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message message, Object[] parameters)\u000d\u000a at System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters)\u000d\u000a at System.Ser...
[ -0.28284940123558044, 0.027139488607645035, 0.4506605267524719, -0.2453286498785019, -0.18885265290737152, 0.6611113548278809, 0.11811899393796921, -0.3362739682197571, -0.4775351881980896, -0.8583536148071289, 0.20815309882164001, 0.2832610607147217, -0.4671667218208313, 0.541870594024658...
'2'}", timeout: 10000, success: function(obj) { updateStatistics(obj.d); }, error: function(xhr) { if (xhr.responseText) $("body").html(xhr.responseText); else alert('unknown error'); return; } }); ``` The wcf service looks like this: ``` ...
[ 0.01971851848065853, -0.19666604697704315, 0.7164523005485535, -0.19822309911251068, 0.09181603789329529, -0.12130898982286453, 0.5307697057723999, -0.5002110004425049, -0.11663227528333664, -0.5578533411026001, -0.4059463143348694, 0.6551241874694824, -0.15615662932395935, -0.018025120720...
Get7DaysStatistics(string customerId) { Debug.WriteLine(customerId); return "Test done"; } ``` It's placed in a a class with the following attributes: ``` [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] ``` ...
[ 0.14119642972946167, -0.19597983360290527, 0.6634817719459534, -0.099967822432518, 0.19615010917186737, -0.019693685695528984, 0.4990965723991394, 0.05480778589844704, -0.014303918927907944, -0.5684311985969543, -0.27948400378227234, 0.5596962571144104, -0.11065221577882767, -0.10788238793...
data to the wcf service. Use double quotes instead of single quotes in the JSON you are sending to the service. That is, change: ``` data: "{'customerId': '2'}", ``` to ``` data: '{"customerId": "2"}', ``` I've tested this locally and this fixes the problem. Incidentally, I debugged this using a method I've of...
[ 0.3970268964767456, 0.030847901478409767, 0.631214439868927, -0.09432585537433624, -0.2017296403646469, -0.034707456827163696, 0.013434967957437038, -0.48070642352104187, 0.07045251876115799, -0.5980361700057983, -0.11962070316076279, 0.44623684883117676, -0.2937473654747009, 0.03577420860...
by [jQuery](http://jquery.com/). Then you can usually quickly see what is different (and so probably wrong) with the request. In this case, it was clear that there was a difference in the POST data being sent.
[ 0.7508623003959656, -0.12796418368816376, 0.4146865904331207, 0.1986900120973587, -0.3915461599826813, -0.22361870110034943, 0.031377244740724564, 0.35759857296943665, -0.3825986385345459, -0.28229618072509766, -0.1322851926088333, -0.2211805135011673, 0.18073156476020813, 0.50164556503295...
What's the code to subscribe to an event like applicationWillResignActive in any place in your iphone application? [UPDATE] Let me rephrase my question. I don't want to respond to this in my application delegate, but rather listen to this event from another class. Is that possible or I need to pass the event from the...
[ 0.13468526303768158, -0.03187168762087822, 0.5080716013908386, -0.20363785326480865, 0.13280439376831055, -0.4203554689884186, 0.7969700694084167, 0.1578163355588913, -0.15933874249458313, -0.5709413886070251, -0.1760125607252121, 0.7567477226257324, -0.39745286107063293, -0.18017990887165...
selector:@selector(applicationWillResign) name:UIApplicationWillResignActiveNotification object:NULL]; } ```
[ -0.22360259294509888, -0.03517082706093788, 0.1715461164712906, -0.15585404634475708, -0.23600900173187256, 0.1886979192495346, 0.40647685527801514, -0.02361089549958706, -0.13563552498817444, -0.5976520776748657, -0.2539660334587097, 0.45753389596939087, -0.3088870048522949, 0.54907035827...
Is there a PHP function that would 'pop' first element of array? `array_pop()` pops last element, but I'd like to pop the first. You are looking for array\_shift(). [PHP Array Shift](http://www.php.net/manual/en/function.array-shift.php)
[ 0.23364616930484772, -0.21585148572921753, 0.2239798605442047, -0.152326300740242, -0.09803042560815811, 0.01877664215862751, 0.11869651079177856, -0.15483000874519348, -0.37678512930870056, 0.045644257217645645, -0.12196367233991623, 0.549985408782959, -0.5892605185508728, -0.417481034994...
Right my junit tests look like a long story: * I create 4 users * I delete 1 user * I try to login with the deleted user and make sure it fails * I login with one of the 3 remaining user and verify I can login * I send a message from one user to the other and verify that it appears in the outbox of the sender and in t...
[ 0.3147362768650055, 0.13791872560977936, 0.3308151662349701, -0.029360519722104073, -0.12553776800632477, -0.007406577933579683, 0.3025537133216858, -0.18462499976158142, 0.2750224173069, -0.8843979835510254, 0.16450542211532593, 0.6379143595695496, 0.07674248516559601, -0.3540461361408233...
refactor the code then the tests are refactored too. As I don't use "dirty tricks" such as saving and reloading the db in a given state, my tests are oblivious to schema changes and implementation changes. **Disadvantages**: The tests are getting difficult to maintain, any change in a test affects other tests. The tes...
[ 0.5030144453048706, 0.10300744324922562, 0.10924866795539856, 0.26663488149642944, -0.12379016727209091, -0.14462590217590332, 0.6711241602897644, -0.3346156179904938, 0.07248973101377487, -0.49302831292152405, -0.05251876264810562, 0.6154980659484863, -0.08804836124181747, 0.0476550161838...
come before. How would you go about improving my tests? unit tests should - ideally - be independent, and able to run in any order. So, I would suggest that you: * break up your tests to be independent * consider using an in-memory database as the backend for your tests * consider wrapping each test or suite in a tra...
[ 0.7271332740783691, -0.06774087995290756, -0.12209650874137878, 0.21763819456100464, 0.003946395590901375, 0.0806327760219574, 0.0938708633184433, -0.16191312670707703, -0.020845459774136543, -0.789068341255188, 0.16972050070762634, 0.5067219138145447, 0.041536152362823486, -0.046059906482...
tests, rather this may be a symptom of performance problems with the system itself - only your profiler knows for sure! [caveat: i do NOT consider these kinds of tests to be 'integration tests', though i may be in the minority; i consider these kinds of tests to be *unit tests of features*, a la TDD]
[ 0.44949668645858765, -0.03565385937690735, -0.32615926861763, 0.41371068358421326, 0.28781142830848694, -0.07626612484455109, 0.388825923204422, 0.04492154344916344, -0.004599870182573795, -0.5655192136764526, -0.2255616933107376, 0.639050304889679, 0.07670114189386368, -0.285026878118515,...
I'm using a query which generally executes in under a second, but sometimes takes between 10-40 seconds to finish. I'm actually not totally clear on how the subquery works, I just know that it works, in that it gives me 15 rows for each faverprofileid. I'm logging slow queries and it's telling me 5823244 rows were exa...
[ 0.11288467049598694, 0.128604456782341, 0.5550427436828613, 0.19381199777126312, -0.16915415227413177, 0.16062164306640625, 0.4299708902835846, -0.001286815502680838, -0.3754411041736603, -0.7727034687995911, 0.012712492607533932, 0.05049656704068184, 0.06435603648424149, 0.115786030888557...
Running explain shows that the users table is not using an index (even though id is the primary key). Under extra it says: Using temporary; Using filesort. ``` SELECT F.id,F.created,U.username,U.fullname,U.id,I.* FROM favorites AS F INNER JOIN users AS U ON F.faver_profile_id = U.id INNER JOIN items AS I ON F.n...
[ 0.18912795186042786, -0.15540266036987305, 0.37742549180984497, -0.048621028661727905, 0.17865324020385742, 0.3430236577987671, 0.252087265253067, -0.20971764624118805, -0.17308714985847473, -0.503438413143158, -0.19824254512786865, 0.36369001865386963, -0.4117628037929535, 0.1654593497514...
AND collection_id is null) < 15 ORDER BY F.faver_profile_id, F.created DESC; ``` I think with `GROUP BY` and `HAVING` it should be faster. Is that what you want? ``` SELECT F.id,F.created,U.username,U.fullname,U.id, I.field1, I.field2, count(*) as CNT FROM favorites AS F INNER JOIN users AS U ON F.faver_profile_i...
[ 0.07189366966485977, -0.10419007390737534, 0.5202736854553223, 0.21675950288772583, 0.030957086011767387, 0.4653438627719879, 0.03398462012410164, -0.5092602372169495, -0.5162661075592041, -0.5544028878211975, -0.22410865128040314, 0.46967604756355286, -0.33360767364501953, 0.0439292937517...
need, so I've put placeholders.
[ 0.4036005437374115, 0.3413340151309967, 0.09998472034931183, 0.09904110431671143, 0.4015936553478241, 0.44271519780158997, -0.32125556468963623, -0.11311830580234528, 0.0618622750043869, -0.3957376480102539, 0.3185257613658905, 0.564716100692749, 0.25191530585289, 0.21328650414943695, -0...
Environment: Windows XP/Vista, VS2008, C#/.NET 2.0, [VideoGrabber](http://www.datastead.com). Hi All, I'm writing an app which captures cameras input and encodes them into a movie file (including sound). My client suggests I encode the movie using the DivX codec. But it's not installed by default and it's not redist...
[ 0.6132640242576599, 0.18281321227550507, 0.5814312696456909, 0.08855665475130081, 0.2822217345237732, -0.3985496461391449, 0.10524843633174896, -0.297522634267807, -0.09694003313779831, -0.5575765371322632, -0.1521274447441101, 0.890094518661499, -0.3015177249908447, -0.13175222277641296, ...
Codec available in default Windows (XP+) installations that I could use to encode video and sound? About the best you can hope for is WMV2 (WMV v8). You may be able to encode it [using qasf.dll](http://msdn.microsoft.com/en-us/library/aa384809(VS.85).aspx). The codecs you get for AVI in XP are all woeful efforts from...
[ 0.4197205901145935, 0.3853828012943268, 0.48722410202026367, 0.21585051715373993, -0.2805192768573761, -0.27140259742736816, 0.012083534151315689, -0.15843752026557922, -0.25120532512664795, -0.5130938291549683, 0.004821818321943283, 0.6987622380256653, -0.2658144235610962, 0.0514547936618...
installed by default and it's not redistributable: Users would have to download, install and configure it themselves. That's best anyway. Silently installing codecs onto a system is rather antisocial as there are often clashes between them and you could end up messing up other DirectShow applications. For example ther...
[ 0.3712328374385834, 0.005748738534748554, 0.540260910987854, 0.3242790699005127, -0.1485304981470108, -0.327899694442749, 0.08614455163478851, 0.15695475041866302, -0.23597604036331177, -0.6649666428565979, -0.1620239019393921, 0.7238868474960327, -0.583659291267395, 0.16206498444080353, ...
In Vim the \* key in normal mode searches for the word under the cursor. In GNU Emacs the closest native equivalent would be: ``` C-s C-w ``` But that isn't quite the same. It opens up the incremental search mini buffer and copies from the cursor in the current buffer to the end of the word. In Vim you'd search for ...
[ -0.00037777310353703797, -0.20219628512859344, 0.7742125988006592, -0.247321218252182, -0.1646447479724884, -0.07963565737009048, 0.45808717608451843, -0.25446876883506775, -0.10777167230844498, -0.7398203015327454, -0.1730177253484726, 0.8670485019683838, -0.39646512269973755, 0.143109530...
trots backwards to the start of the word before firing up isearch. I've bound it to C-+, which is easy to type on my keyboard and similar to \*, so when I type `C-+ C-w` it copies from the start of the word to the search mini-buffer. However, this still isn't perfect. Ideally it would regexp search for `"\<" word "\>"...
[ -0.3711854815483093, 0.32261547446250916, 0.7928304076194763, -0.26974165439605713, -0.12103132903575897, 0.16370996832847595, 0.35457226634025574, -0.41911065578460693, 0.13555461168289185, -0.5808058977127075, 0.1990363597869873, 0.6135464906692505, -0.34653180837631226, -0.0376430638134...
An isearch-\* function seems the best bet, but these don't behave well when scripted. Any ideas? Can anyone offer any improvements to the bit of elisp? Or is there some other way that I've overlooked? Based on your feedback to my first answer, how about this: ``` (defun my-isearch-word-at-point () (interactive) (...
[ -0.2274559885263443, -0.23135119676589966, 0.6793699860572815, -0.026089182123541832, -0.08577878773212433, 0.0009814082877710462, 0.28664612770080566, -0.31315964460372925, -0.011208191514015198, -0.28091222047805786, -0.018630055710673332, 0.7850347757339478, -0.15562020242214203, -0.053...
(progn (skip-syntax-backward "w_") (point)) (progn (skip-syntax-forward "w_") (point))) "\\>"))) (if (and isearch-case-fold-search (eq
[ -0.7705912590026855, -0.18125708401203156, 0.5498937964439392, -0.36266836524009705, 0.41178441047668457, -0.06380882114171982, 0.1512175053358078, -0.36461931467056274, 0.05080755054950714, -0.6351841688156128, -0.6973097324371338, 0.4360586404800415, -0.40727224946022034, -0.233174845576...
'not-yanks search-upper-case)) (setq string (downcase string))) (setq isearch-string string isearch-message (concat isearch-message (mapconcat 'isearch-text-char-description string
[ -0.04460744932293892, -0.3446948826313019, 0.6190357804298401, 0.04373481869697571, 0.014671382494270802, -0.14286381006240845, 0.5832886099815369, -0.0981336310505867, -0.2556520402431488, -0.22652260959148407, -0.5813155770301819, 0.5724733471870422, -0.6821323037147522, -0.1605515629053...
"")) isearch-yank-flag t) (isearch-search-and-update)))) (add-hook 'isearch-mode-hook 'my-isearch-yank-word-hook) ```
[ 0.009405843913555145, -0.059575870633125305, 0.7249241471290588, -0.1340704709291458, 0.07541458308696747, -0.25516608357429504, 0.5910454988479614, -0.19538606703281403, -0.1305326372385025, -0.2613163888454437, -0.5857827067375183, 0.7111295461654663, -0.4385621249675751, -0.025036979466...
I have the following code in one of my methods: ``` foreach (var s in vars) { foreach (var type in statusList) { if (type.Id == s) { Add(new NameValuePair(type.Id, type.Text)); break; } } } ``` This seems sort of ineffective to me, and I was wondering if th...
[ 0.13561686873435974, 0.09982060641050339, 0.41278594732284546, -0.4936624765396118, 0.1835198551416397, -0.03997894003987312, 0.3143889009952545, -0.307721883058548, -0.021933380514383316, -0.6859907507896423, -0.11294744908809662, 0.6088327169418335, -0.16882747411727905, 0.22577989101409...
at least one of the foreaches wih a LINQ query. Any suggestions? **EDIT:** vars is an array of strings and the Add method adds an item to a CSLA NameValueList. EDIT: **I hadn't noticed the `break;` before** If there could be more than one type with the relevant ID, then you need to use `FirstOrDefault` as per [Keith'...
[ 0.1400773823261261, 0.01999390311539173, 0.4170333445072174, -0.15126492083072662, -0.20417028665542603, -0.13475851714611053, 0.2600081264972687, -0.41942429542541504, -0.41258206963539124, -0.500637948513031, -0.11780834197998047, 0.30130183696746826, -0.3626709282398224, 0.0902161672711...
join type in statusList on s equals type.Id select new NameValuePair(type.Id, type.Text); foreach (var pair in query) { Add(pair); } ``` You might want to make an `AddRange` method which takes an `IEnumerable<NameValuePair>` at which point you could just call `AddRange(query)`. Alternatively, you ca...
[ -0.16521123051643372, -0.29959985613822937, 0.585830807685852, -0.29596152901649475, -0.09317882359027863, 0.07989929616451263, 0.2736232578754425, -0.44354477524757385, -0.10034658759832382, -0.7420498728752136, -0.317658007144928, 0.4267098307609558, -0.5831422805786133, 0.00243029301054...
var type = types.First(); // Guaranteed to be at least one entry Add(new NameValuePair(type.Id, type.Text)); } } ``` The benefit of this is that it only goes through the list of types once to build up a dictionary, basically.
[ 0.12417899072170258, 0.06268636882305145, 0.3819640278816223, -0.1914711594581604, 0.0007869861437939107, -0.33721989393234253, 0.3060762584209442, -0.2657928764820099, -0.007761834189295769, -0.5719746351242065, -0.05742259323596954, 0.7518744468688965, -0.30268222093582153, -0.0629979074...
The browser is probably closer to be CPU-constraint than network constraint, right? We have a very heavy ajax application, so from the brower's perspective (not the server) perhaps it should be better not to use compression. What do you think It entirely depends on the browser and device. On a normal laptop or desktop...
[ 0.2952497601509094, 0.07897098362445831, 0.4663545787334442, 0.5079044699668884, 0.028086403384804726, 0.00504015339538455, 0.21215444803237915, 0.03376181796193123, -0.44055190682411194, -0.8162291646003723, -0.10871263593435287, 0.4996985197067261, 0.18768510222434998, 0.0060066748410463...
win than a bottleneck.
[ -0.3738527297973633, -0.14945438504219055, -0.19769561290740967, 0.34397047758102417, -0.45149722695350647, -0.5592021346092224, -0.07527317106723785, 0.031308844685554504, 0.1773301064968109, -0.2917881906032562, 0.33578062057495117, 0.38798245787620544, 0.5618753433227539, -0.05308401212...
I am working in a distributed software development environment. The SCM tool currently in use is Visual SourceSafe 2005 Client/ Server. We are trying to work out strategies to minimize code breaks. What are the features of VSS that we can use for safer SCM in distributed environment? Any suggestions for references on ...
[ 0.5233937501907349, 0.011418969370424747, 0.35077518224716187, -0.15440095961093903, 0.21356382966041565, -0.470829576253891, 0.3377048075199127, -0.0372411273419857, -0.4950447082519531, -0.7339524626731873, 0.003511641174554825, 0.46652930974960327, -0.13813762366771698, 0.13688112795352...
not really certain what you mean by "breaks" here though. Do you mean merge conflicts? Do you mean link breaking? Do you mean that people can get code that is broken? If you mean people are getting code that is broken, VSS doesn't have a transactioned and atomic commit system, so there are times when a pull can pull...
[ 0.2914718687534332, -0.22990447282791138, 0.09020587801933289, 0.19885140657424927, -0.13151054084300995, -0.21354374289512634, 0.1309276968240738, 0.08333352953195572, -0.6480153203010559, -0.2610909342765808, 0.07292421907186508, 0.40326938033103943, -0.2940012514591217, 0.07913964986801...
is distributed, i'd choose something more client-server oriented with transactional commits and change sets. UPDATE: Yes, VSS has automatic merging, however if two people edit the same file, and those changes overlap, it takes human intervention to merge those changes. VSS will pup up a window that allows you to choos...
[ 0.2431519478559494, -0.4603692591190338, 0.11429652571678162, 0.2533568739891052, 0.00058729387819767, -0.31607282161712646, 0.01670999266207218, 0.2185220569372177, -0.5843830108642578, -1.0125247240066528, -0.06224657595157623, 0.20111864805221558, -0.36799076199531555, 0.249399036169052...
merge the branches to get them into an earlier part of the branch. It sounds to me like you want to use version control in a way that VSS is not the best fit for. I wouldn't recommend Subversion either (as many like to. It's a great tool, but it's not as user friendly as VSS), because it does have some learning curve ...
[ 0.43541431427001953, -0.4264396131038666, 0.11972992867231369, 0.2624119818210602, 0.026652181521058083, -0.20436157286167145, 0.1033991202712059, 0.16572044789791107, -0.27718842029571533, -0.44589564204216003, -0.02349836379289627, 0.519074022769928, -0.09983167797327042, 0.0757862254977...
also have an evaluation version and can import SourceSafe databases.
[ 0.14433133602142334, 0.06625798344612122, 0.09028534591197968, 0.37875932455062866, -0.053793780505657196, -0.3418508470058441, 0.03745996579527855, 0.058887604624032974, 0.006242465693503618, -0.5936443209648132, -0.20403215289115906, 0.33703091740608215, 0.08250338584184647, -0.075554639...
I had defined my own signal handler for SIGINT. But my signal handler doesn't get called The signal handler just terminates the program. But on pressing ctrl+c, the program doesn't quit. Please help... This is how the code looks.. ``` sa.sa_handler = handle_termsig; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sigact...
[ -0.1982782483100891, -0.3004397451877594, 0.9745158553123474, -0.19798055291175842, 0.30394116044044495, 0.02109432965517044, 0.3758736252784729, -0.43225911259651184, -0.12533718347549438, -0.9190956354141235, -0.5388368964195251, 0.36484530568122864, -0.43818551301956177, 0.1486203074455...
private PictureBox pictureBox; #endregion public MyObject(PictureBox pictureBox) { this.pictureBox = pictureBox; } } ```
[ 0.12695299088954926, -0.1383170187473297, 0.4723571538925171, -0.3231804072856903, 0.2561618983745575, -0.2574601173400879, 0.3824063837528229, 0.379501074552536, 0.11596501618623734, -0.8976274132728577, -0.26846843957901, 0.6058688759803772, -0.5739750862121582, 0.07550235837697983, 0....
I'm creating a web based system which will be used in countries from all over the world. One type of data which must be stored is dates and times. What are the pros and cons of using the Java date and time classes compared to 3rd party libraries such as [Joda time](http://www.joda.org/joda-time/)? I guess these third ...
[ 0.4476277828216553, 0.008494568057358265, 0.09083673357963562, 0.2322068065404892, 0.06927426904439926, -0.2329782247543335, 0.06147026643157005, 0.49064627289772034, -0.5462729334831238, -0.7204296588897705, 0.10018003731966019, 0.18146181106567383, -0.11535748839378357, 0.130811601877212...
asked for the pros and cons of using Joda... Pros: * It works, very well. I strongly suspect there are far fewer bugs in Joda than the standard Java libraries. Some of the bugs in the Java libraries are really hard (if not impossible) to fix due to the design. * It's designed to encourage you to think about date/time...
[ 0.42429569363594055, -0.19715119898319244, 0.6568771600723267, -0.12865422666072845, 0.022605884820222855, -0.06027849763631821, 0.4841022491455078, 0.11074959486722946, -0.13712845742702484, -0.5553084015846252, 0.0790659636259079, 0.29029348492622375, -0.08241013437509537, -0.26340770721...
same instant") * I believe it makes it easier to update the timezone database, which *does* change relatively frequently * It has a good immutability story, which makes life a *lot* easier IME. * Leading on from immutability, all the formatters are thread-safe, which is great because you almost *always* want to reuse a...
[ 0.13919560611248016, -0.1431354582309723, 0.5089494585990906, 0.2588920295238495, 0.24848106503486633, -0.2787460684776306, 0.13086384534835815, 0.11978495866060257, -0.46965914964675903, -0.861301839351654, -0.04570341855287552, 0.710929274559021, -0.005452917888760567, -0.225235044956207...
to migrate your skills * I've failed to use the `DateTimeZoneBuilder` effectively in the past. This is a *very* rare use case though. To respond to the oxbow\_lakes' idea of effectively building your own small API, here are my views of why this is a bad idea: * It's work. Why do work when it's already been done for y...
[ 0.5870300531387329, 0.11928033083677292, 0.07060582935810089, 0.05298975110054016, -0.1138051375746727, -0.05079273134469986, 0.32644110918045044, 0.024771396070718765, -0.2706824541091919, -0.8582773804664612, 0.23804210126399994, 0.20540058612823486, 0.015333491377532482, -0.230700016021...
things have a habit of growing more complicated, one tiny bit at a time. Date and time manipulation is *hard* to do properly. Furthermore, the built-in Java APIs are hard to *use* properly - just look at the rules for how the calendar API's date/time arithmetic works. Building anything on top of these is a bad idea rat...
[ 0.2772769629955292, 0.001764223212376237, -0.042755112051963806, 0.3169061541557312, 0.26877838373184204, -0.07439076155424118, 0.2403997778892517, 0.15107683837413788, -0.461446076631546, -0.5605693459510803, 0.1732155680656433, 0.1544194370508194, -0.21027450263500214, 0.3527206182479858...
I want to connect to a server using HTTP, send a string to it and recieve the response string from the server. Any ideas about how to connect to server by the url, send and recieve message from it? ``` // create the request NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.co...
[ 0.07498180866241455, 0.13253095746040344, 0.5175811648368835, -0.02942059375345707, 0.09365110844373703, 0.27092477679252625, 0.25614193081855774, -0.056002769619226456, -0.2940606474876404, -0.8600009679794312, -0.03391417860984802, 0.3725498914718628, -0.1485220044851303, 0.1619776487350...
*theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if (theConnection) { // Create the NSMutableData that will hold // the received data // receivedData is declared as a method instance elsewhere receivedData=[[NSMutableData data] retain]; } else { // inform the user t...
[ -0.23186013102531433, -0.02768007479608059, 0.5181877017021179, -0.1378173977136612, 0.01991891860961914, -0.1177992969751358, 0.36494407057762146, -0.34115132689476013, -0.3196796178817749, -0.5877262353897095, -0.5492936372756958, 0.4312991499900818, -0.2483968585729599, 0.32219475507736...
Say you have a large table with thousands of rows and 3 columns, looking something like this: ``` Name City Birthyear Egon Spengler New York 1957 Mac Taylor New York 1955 Sarah Connor
[ -0.029725033789873123, 0.6623196005821228, 0.3232428729534149, -0.09280973672866821, 0.26004642248153687, 0.25497883558273315, -0.31176912784576416, 0.2829945385456085, -0.6924310922622681, -0.33872565627098083, 0.2570872902870178, 0.259991317987442, 0.055894188582897186, 0.223082825541496...
Los Angeles 1959 Jean-Luc Picard La Barre 2305 Ellen Ripley Nostromo 2092 James T. Kirk Riverside 2233 Henry Jones Chicago 1899
[ -0.022900285199284554, 0.12042960524559021, -0.08349110186100006, 0.2697533369064331, -0.10944472998380661, 0.49860021471977234, -0.13032129406929016, 0.215329110622406, -0.3043791651725769, -0.2784077823162079, -0.13474689424037933, 0.6636874675750732, -0.21572399139404297, -0.10243365168...
Jason Bourne Paris 1971 ``` ...... and so on. Is it possible to sort people by City into separate files? For example, if you have 100 or more cities in the table, is there a query that would create 100 or more files with people names and birth years in it? For a smaller number of cities one could u...
[ 0.28293558955192566, 0.4026956856250763, -0.1330435425043106, -0.05418287590146065, 0.10679842531681061, 0.13331767916679382, -0.31108251214027405, 0.15415775775909424, -0.49027302861213684, -0.13731950521469116, -0.13108445703983307, 0.12972472608089447, -0.2513933479785919, -0.4067507684...
fun to do it manually if you have hundreds of cities. From the sick and wrong department (may contain syntax errors, this is just to give you an idea of the twisted possibilities): ``` SELECT concat("SELECT name, birthyear from table where city = '", city, "' into ...
[ 0.4446153938770294, -0.11063236743211746, 0.45769453048706055, 0.5145343542098999, 0.23140698671340942, -0.0779765248298645, -0.03995678201317787, 0.24995021522045135, -0.2519834339618683, -0.6700906157493591, -0.12343355268239975, 0.24581697583198547, -0.21780747175216675, -0.039204709231...
city,"';") FROM table ``` Put that in query1.sql, then: ``` mysql < query1.sql > query2.sql mysql < query2.sql ``` Write a query that generates queries on the fly, then execute the resulting queries against the database. This definitely falls into the "quick and dirty" category. Note also that the queries exe...
[ 0.47725194692611694, -0.15010318160057068, 0.6272998452186584, 0.20247675478458405, -0.08166295289993286, -0.02924402244389057, 0.2698356509208679, -0.11982793360948563, -0.20587977766990662, -0.6087900996208191, -0.06323646008968353, 0.38686299324035645, -0.5020788311958313, 0.15014840662...
don't have shell access to the server, this could be a problem unless there is a network file system that the server can write to that you can read from another host.
[ 0.3456989824771881, -0.007743095047771931, -0.036835186183452606, 0.20550189912319183, 0.19438216090202332, -0.39366477727890015, 0.2923519015312195, 0.3972740173339844, -0.0278116874396801, -0.5691573023796082, -0.08842070400714874, 0.6929427981376648, -0.2709616422653198, 0.2479331344366...
In my controller, I have the following: ``` ViewData["myList"] = new SelectList(itemRepository.GetAll(), "Id", "Name", currentItem.Id); ``` And in the view I have: ``` <%= Html.DropDownList("myItem", (SelectList)ViewData["myList"])%> ``` The rendered drop down list *should* have the item with the Id of curren...
[ -0.1286432445049286, -0.38308966159820557, 0.9089909791946411, -0.07780245691537857, 0.021663103252649307, 0.03623887151479721, -0.08197513967752457, -0.19626563787460327, -0.2140951156616211, -0.7821678519248962, -0.010373920202255249, 0.735496461391449, -0.280250608921051, 0.084151402115...
Html.DropDownList("myList") %> ``` The HtmlHelpers seem to work best when using them in this fashion (though that is not always possible). **Update:** To expand upon the reason why this seems to work while the other methods don't, I dove into the code for SelectExtensions.cs... However you call DropDownList, the p...
[ -0.07293947041034698, -0.1515350192785263, 0.8504021763801575, -0.0961560308933258, 0.0032486137934029102, -0.13670486211776733, 0.06271050125360489, -0.2168065309524536, -0.25282925367355347, -0.6969597935676575, -0.3958704471588135, 0.47369205951690674, -0.2806306481361389, -0.3319035470...
selectList, null /* object, htmlAttributes */ ) -> DropDownList( name, selectList, new RouteValueDictionary(htmlAttributes) ) -> SelectInternal( null, name, selectList, false, false, htmlAttributes ) ``` So at the end of the day, the difference between the two paths is that the way that works passes *true* into Selec...
[ 0.07769832760095596, -0.24223469197750092, 0.7562423944473267, -0.03028654307126999, -0.06707166880369186, -0.2693111300468445, 0.4527486264705658, -0.25110894441604614, 0.019758576527237892, -0.8255192637443542, -0.1440017968416214, 0.48893681168556213, -0.03743308037519455, -0.1591785401...
Is there any way to take an xml string in .net and make it easyer to read? what i mean is can i convert this: ``` <element1><element2>some data</element2></element1> ``` to this: ``` <element1> <element2> some data </element2> </element1> ``` is there any built in class for this? as sql server 200...
[ 0.14047951996326447, -0.08668842166662216, 0.03270795941352844, -0.02719144895672798, -0.1878994107246399, -0.3006994426250458, 0.13274767994880676, -0.16002777218818665, 0.07110276818275452, -0.38121888041496277, 0.09487093985080719, 0.3611413240432739, -0.34505900740623474, -0.0108803845...
{ string xml = "<element1><element2>some data</element2></element1>"; XDocument doc = XDocument.Parse(xml); xml = doc.ToString(); Console.WriteLine(xml); } } ``` Result: ``` <element1> <element2>some data</element2> </element1> ``` If you're writing it to a file or other stre...
[ -0.04311206936836243, -0.18225054442882538, 0.356393426656723, -0.08894474804401398, 0.2927573025226593, -0.14606036245822906, -0.01405809260904789, -0.203639954328537, 0.07333270460367203, -0.40965932607650757, -0.5227689743041992, 0.38791340589523315, -0.31684041023254395, -0.10525620728...
The situation at the moment is that we have a sharepoint server which started out as a pilot but now actually runs as the production environment. The server on which sharepoint runs is an old machine which does not conforms the standard requirements so I want to move the current environment to the shiny new server. I'...
[ 0.12674841284751892, 0.265823096036911, 0.3751635253429413, 0.08905191719532013, 0.1253383606672287, -0.16059619188308716, -0.028744803741574287, 0.323312371969223, 0.03673582151532173, -0.5465250015258789, 0.37061381340026855, 0.28833460807800293, -0.22912918031215668, 0.3970257341861725,...
new server as a clean install, restored the databasses on the new server, restored the backup on the new server which I made with Sharepoint Central Administration, alas, I did not worked :-( Lots of "Can't find this" and "Can't find that" errors... It should be possible to grab all the data/sites/subsites/databasses...
[ -0.21543031930923462, -0.01772521808743477, 0.39980682730674744, -0.04143587127327919, -0.09149870276451111, -0.1259089857339859, 0.5256398916244507, 0.10219509899616241, -0.08784978836774826, -0.8556678295135498, -0.0011070524342358112, 0.4897039234638214, -0.14312566816806793, 0.19432508...
Then use the SPContentDeploymentWizard which can be downloaded for free from CodePlex to make an export of all site content and import these on Server\_B. Also backup custom databases needed by features and create these on Server\_B. I do have a almost completly equal server running now, some funky errors pop up now a...
[ 0.39348435401916504, 0.0006173114525154233, 0.36374804377555847, 0.203818216919899, -0.17752128839492798, -0.2699337601661682, 0.3101019561290741, -0.03212548419833183, -0.3589058220386505, -0.8122596144676208, -0.03086109645664692, 0.6296860575675964, -0.21018405258655548, -0.042457532137...
I've a question (just like me)... but...if I've a choosen algorithm written in C or C++ or whatever code you want...fixed a compiler I can determine the number of instructions but these intructions are different each other: x ADD, y MUL, z MOV, f FADD, t FMUL (F stands for FLOATING)...Is there a methodology or equatio...
[ 0.49944499135017395, 0.33163514733314514, 0.10101346671581268, 0.35166308283805847, -0.31736111640930176, 0.26096609234809875, -0.16561059653759003, -0.07009556889533997, -0.2812405526638031, -0.5317503809928894, 0.05424685403704643, 0.37065741419792175, 0.09454909712076187, 0.097912587225...
My problem is: To determine a execution time of different algorithms implemented on different architectures of soft core. On y-axis I must write time, on x-axis the number of instruction and the point of the graph are parametrized by the type of architecture (excuse me for my english). But on x-axix I think it's better...
[ 0.0050734165124595165, 0.28649553656578064, 0.0940742939710617, 0.26228877902030945, -0.1789400577545166, 0.18854929506778717, 0.17281745374202728, -0.0015940566081553698, -0.3791002035140991, -0.7693942785263062, 0.14706967771053314, 0.4360131323337555, -0.24266581237316132, 0.09975974261...
other. The ability to execute several instructions at a time differs from one processor family to another. That's why this task is really hardware-specific, it can't be solved once and for all. All you can do is graph an execution timeline of instructions and processor cycles. Processor cycles could be y-axis, instruc...
[ 0.12626111507415771, -0.09928261488676071, -0.1393069326877594, 0.4029938578605652, 0.024024121463298798, 0.08150208741426468, 0.09263022989034653, -0.12903006374835968, -0.4812714457511902, -0.8028126358985901, 0.3453022241592407, 0.40110039710998535, -0.16816648840904236, -0.013173136860...
So I have these checkboxes: ``` <input type="checkbox" name="type" value="4" /> <input type="checkbox" name="type" value="3" /> <input type="checkbox" name="type" value="1" /> <input type="checkbox" name="type" value="5" /> ``` And so on. There are about 6 of them and are hand-coded (i.e not fetched from a db) so th...
[ 0.40936073660850525, 0.13171939551830292, 0.5668628811836243, -0.22098568081855774, -0.0940454974770546, 0.22388289868831635, 0.21164770424365997, -0.4618660509586334, -0.02997553162276745, -0.9132593870162964, -0.07002153247594833, 0.48854145407676697, -0.15584756433963776, -0.03005082160...
I need to get a list of applications that are currently running so that my C++ application and make them take focus. Has anybody done this? There is no real cross platform way of doing that. The whole concept of processes, applications, etc. is an operating system specific concept. If you use a certain library to solv...
[ 0.4941885471343994, 0.18380223214626312, -0.06191379576921463, 0.2470424771308899, -0.03245377540588379, -0.3204202353954315, 0.1295306533575058, 0.2510567605495453, -0.24353544414043427, -0.5703170299530029, 0.11417850106954575, 0.4049548804759979, -0.33509522676467896, 0.2181508988142013...
won't run, a Qt solution won't work. Most UNIX like platforms support the POSIX API (some more, some less) and if you limit yourself to POSIX functions, the solution will work in Linux, BSD, Mac OS X, Solaris, and similar OSes. It will not work on Windows, though. Microsoft decided to drop POSIX support (not that their...
[ -0.01866762712597847, -0.02999339997768402, 0.2189328968524933, 0.0955519899725914, 0.15021942555904388, 0.07153382152318954, 0.09934597462415695, 0.29610660672187805, -0.11248943209648132, -0.6532776951789856, -0.09923336654901505, 0.678464412689209, -0.5747096538543701, -0.18244078755378...
problem here - the way how a POSIX tool like ps gets process information is entirely different on a Linux system compared to a BSD system for example. The second issue is that you are talking "focus". Focus is something that does not apply to applications. A background application that has no UI and no windows cannot ...
[ 0.31794536113739014, -0.1931016445159912, 0.2516593635082245, 0.2535625696182251, -0.03775127977132797, -0.1768217831850052, -0.12878182530403137, 0.30346623063087463, -0.44871821999549866, -0.5944273471832275, -0.14375172555446625, 0.4800659120082855, -0.37507161498069763, -0.097749456763...
windows systems are even more different between different platforms and POSIX ignores UIs altogether. Also you have a Visual-C++ tag on your question, so how cross platform must your code really be, as Visual-C++ is a Windows only thing, isn't it? What platforms are you really trying to support (please update your que...
[ 0.27131786942481995, -0.09186170995235443, 0.1726580411195755, 0.2912789285182953, -0.10755127668380737, -0.09695564210414886, 0.07191278785467148, 0.46711215376853943, -0.3218342959880829, -0.6511508822441101, 0.06468526273965836, 0.5022268891334534, -0.24513810873031616, -0.0574105642735...
I want to use a library that makes heavy use of singletons, but I actually need some of the manager classes to have multiple instances. The code is open source, but changing the code myself would make updating the lib to a newer version hard. What tricks are there, if any, to force creation of a new instance of a sing...
[ 0.45101091265678406, -0.002841679845005274, -0.10314033925533295, 0.09811574965715408, -0.11382893472909927, -0.10528648644685745, -0.2165428102016449, -0.01762419566512108, -0.244391068816185, -0.6443778872489929, 0.10284850001335144, 0.687879741191864, -0.2614387571811676, 0.122400037944...
end up with multiple copies. The newer implementations have a single heap, whereas the older CRTs created one heap per library linked in.
[ 0.03198542818427086, -0.2106700986623764, 0.19362181425094604, 0.4867272973060608, 0.14204570651054382, -0.03758886083960533, 0.012220745906233788, 0.032189466059207916, -0.32500937581062317, -0.723466694355011, -0.4238724708557129, -0.1907537877559662, -0.4221470355987549, 0.2909448742866...
I know I can return an empty table using the following query : ``` select * from tbFoo where 1=2 ``` but that code doesn't look nice to me. **Is there a 'standard' way of doing this?** If you're wondering why I want to do such a strange thing, it's because [I can't name the datatables I return from a stored proce...
[ 0.026821115985512733, 0.13782958686351776, 0.15612170100212097, -0.08794400095939636, 0.051422737538814545, -0.10496789216995239, 0.11783388257026672, -0.20931188762187958, -0.3664964735507965, -0.46847474575042725, 0.024433773010969162, 0.43609270453453064, -0.06307566165924072, 0.3088661...
I'm trying to find resources on video and voice chat operability in Python... Does anybody know of some good resources or sample projects? Any help would really be appreciated! If you want something higher level you can try [Empathy](http://live.gnome.org/Empathy). It has python bindings so you can use chat GUI elemen...
[ 0.4651798605918884, 0.023868413642048836, 0.1760706603527069, 0.22064490616321564, -0.41872766613960266, -0.026084313169121742, 0.14245560765266418, 0.03685168921947479, -0.37887319922447205, -0.6972134113311768, 0.0720917209982872, 0.577489972114563, -0.2390526980161667, -0.04027779772877...
I want a simple class that implements a fixed-size [*circular buffer*](https://en.wikipedia.org/wiki/Circular_buffer). It should be efficient, easy on the eyes, generically typed. For now it need not be [MT-capable](https://en.wikipedia.org/wiki/Multithreading_(computer_architecture)). I can always add a lock later, ...
[ -0.05897822231054306, 0.15103629231452942, 0.18272705376148224, 0.14846771955490112, -0.0073918835259974, -0.008271650411188602, 0.12765319645404816, -0.20544570684432983, -0.4113474488258362, -0.49030882120132446, -0.15673454105854034, 0.3819497525691986, -0.35181495547294617, 0.202291846...
as the *circular buffer* fills up and rolls over. This isn't a *stack*, it's a circular buffer. Regarding "*overflow*": I would expect internally there would be an array holding the items, and over time the *head* and *tail* of the buffer will rotate around that fixed array. But that should be invisible from the user....
[ 0.33843886852264404, 0.08422215282917023, 0.30402418971061707, 0.15942707657814026, 0.17082901298999786, 0.08357349038124084, -0.04803905636072159, -0.10279066860675812, -0.6045244336128235, -0.362078458070755, -0.28642538189888, 0.03186606243252754, -0.07800087332725525, 0.435983151197433...
add and get methods. Like: (Bug hunting is left to the user) ``` // Hijack these for simplicity import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; public class CircularBuffer<T> { private T[] buffer; private int tail; private int head; @SuppressWarnings("unchecked") publ...
[ 0.15159045159816742, -0.29352355003356934, 0.38083404302597046, -0.2464737594127655, -0.021274521946907043, 0.050206657499074936, 0.2848184406757355, -0.35016030073165894, -0.1845356523990631, -0.302715927362442, -0.23327572643756866, 0.601420521736145, -0.5144982933998108, 0.0925164595246...
throw new BufferOverflowException(); } head = head % buffer.length; } public T get() { T t = null; int adjTail = tail > head ? tail - buffer.length : tail; if (adjTail < head) { t = (T) buffer[tail++]; tail = tail % buffer.length; } else { throw new BufferUnderflowEx...
[ -0.0427323579788208, -0.2852078974246979, 0.499639630317688, -0.5355063676834106, -0.09351975470781326, 0.09154912084341049, 0.42818599939346313, -0.3905569016933441, 0.1695944219827652, -0.41711366176605225, -0.2093174159526825, 0.4208945333957672, -0.379154771566391, 0.17121613025665283,...
} public String toString() { return "CircularBuffer(size=" + buffer.length + ", head=" + head + ", tail=" + tail + ")"; } public static void main(String[] args) { CircularBuffer<String> b = new CircularBuffer<String>(3); for (int i = 0; i < 10; i++) { System.out.println("Start: " + b); ...
[ -0.05394187569618225, -0.13087677955627441, 0.7913225889205933, -0.6287601590156555, -0.06466078758239746, 0.2797284722328186, 0.09647943824529648, -0.2761276364326477, -0.3406270742416382, -0.004482137970626354, -0.20921318233013153, 0.43414685130119324, -0.49048933386802673, 0.3554430007...
System.out.println("Two: " + b); System.out.println("Got '" + b.get() + "', now " + b); b.add("Three"); System.out.println("Three: " + b); // Test Overflow // b.add("Four"); // System.out.println("Four: " + b); System.out.println("Got '" + b.get() + "', now " + ...
[ -0.032459478825330734, -0.03771510720252991, 0.13768160343170166, -0.3547505736351013, 0.16628329455852509, 0.08489464968442917, 0.4778316915035248, -0.25395941734313965, -0.33617138862609863, -0.35280105471611023, -0.4858469069004059, 0.5110890865325928, -0.33493125438690186, 0.1989293992...