text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
branch, but it should be easy enough to add a line or two to `git checkout` the stable branch.
It installs git into `/usr/local/git-v1.6.0.2-287-g3791f77/` (for example), then symlinks /usr/local/git/ to the latest directory.
You can set it to run periodically (nightly?), either via cron (which is extremely simple, b... | [
0.02186453342437744,
-0.2647518813610077,
0.7486996054649353,
-0.023746255785226822,
0.24538053572177887,
-0.31318914890289307,
0.3325244188308716,
0.2925362288951874,
-0.5261082053184509,
-0.20911335945129395,
-0.5173829197883606,
0.5831553339958191,
-0.083867147564888,
0.0891997665166854... | |
How do you get the caret position in a `<textarea>` using JavaScript?
For example: `This is| a text`
This should return `7`.
How would you get it to return the strings surrounding the cursor / selection?
E.g.: `'This is', '', ' a text'`.
If the word “is” is highlighted, then it would return `'This ', 'is', ' a tex... | [
-0.06550085544586182,
-0.40551328659057617,
0.5641952157020569,
-0.11178923398256302,
-0.040776461362838745,
0.29379531741142273,
0.04918719828128815,
-0.3270418047904968,
-0.03897649049758911,
-0.8089818954467773,
-0.23646096885204315,
0.6364837288856506,
-0.3663352429866791,
-0.114524058... | |
return 0;
}
var c = "\001",
sel = document.selection.createRange(),
dul = sel.duplicate(),
len = 0;
dul.moveToElementText(node);
sel.text = c;
len = dul.text.indexOf(c);
sel.moveStart('character',-1);
sel.text = "";
return len;
}
```
([complete code here](http://web.archive.org/web... | [
0.003042142139747739,
-0.301779568195343,
0.6143319606781006,
-0.005230129696428776,
0.10792388021945953,
0.24415865540504456,
-0.13509489595890045,
-0.27406808733940125,
-0.2714352011680603,
-0.7276841402053833,
-0.3117486238479614,
0.5291890501976013,
-0.05269294232130051,
0.083548128604... | |
el.focus();
var r = document.selection.createRange();
if (r == null) {
return 0;
}
var re = el.createTextRange(),
rc = re.duplicate();
re.moveToBookmark(r.getBookmark());
rc.setEndPoint('EndToStart', re);
return rc.text.length;
}
return 0;
}
```
Check an e... | [
0.15802711248397827,
-0.15024709701538086,
0.6886942982673645,
-0.35832223296165466,
0.0995490625500679,
0.16118668019771576,
0.22507479786872864,
-0.5494237542152405,
-0.18524502217769623,
-0.4460110366344452,
-0.5663809776306152,
0.601184070110321,
-0.2595553696155548,
0.2563839256763458... | |
I normally store all my configs in the registry.
Even though I have started using LINQ I would not like to have the DSN in the web.config, but rather let it stay in the registry and attach it (maybe in the Application Start Event) to the System Config.
How can this be done?
Thanx for any ideas!
edit: to make it clea... | [
0.34139424562454224,
-0.06437069177627563,
0.8592220544815063,
0.282469779253006,
0.22080057859420776,
-0.37489497661590576,
0.31845733523368835,
-0.16727310419082642,
-0.17666606605052948,
-0.7135958671569824,
-0.2896111011505127,
0.4951641857624054,
-0.2520676553249359,
0.162806570529937... | |
new Class, with one method, which inherits from the original Datacontext:
```
Public Class MyDatabaseDataContext
Inherits DatabaseDataContext
Public Sub New()
MyBase.New(Settings.DSN)
End Sub
End Class
```
2) Use this Class in all Linq Datasources instead of the original Context.
```
ContextTypeName="MyPro... | [
-0.24166527390480042,
0.01863953098654747,
0.24459223449230194,
0.12885847687721252,
0.09657018631696701,
-0.2503304183483124,
-0.016577497124671936,
-0.45852556824684143,
-0.07210242003202438,
-0.6237614750862122,
-0.05250651389360428,
0.589719831943512,
-0.3809698820114136,
0.42886799573... | |
}
}
```
I have a static class in my library called ConnectionHolder which stores the connection string:
```
public static class ConnectionHolder
{
static string _ConnectionString;
public static string ConnectionString
{
get { return _ConnectionString; }
set { _ConnectionString = value; }... | [
-0.34929123520851135,
-0.02873981185257435,
0.7636184096336365,
-0.05733406916260719,
0.31524062156677246,
0.060541439801454544,
-0.031842250376939774,
0.046544525772333145,
-0.32255885004997253,
-0.829043984413147,
-0.5349338054656982,
0.6853484511375427,
-0.39226576685905457,
0.243048846... | |
I have a python script that I would like to add a "Shutdown when done" feature to.
I know I can use gksudo (when the user clicks on "shutdown when done") to ask the user for root privileges but how can I use those privileges at a later time (when the script is actually finished).
I have thought about chmod u+s on the... | [
0.4128667414188385,
0.1772674024105072,
0.06414620578289032,
0.0780520960688591,
-0.22334390878677368,
-0.6355717778205872,
0.5546200275421143,
0.531430721282959,
-0.13666754961013794,
-0.6078494787216187,
-0.08433102071285248,
0.6449562907218933,
-0.14629638195037842,
0.17101596295833588,... | |
command.
So I think I'd just throw out a "gksudo echo meh" or something every minute. Should reset the timer and keep you active until you reboot. | [
0.3660373389720917,
-0.0554831400513649,
0.421447217464447,
0.0964081659913063,
-0.27400389313697815,
-0.26705676317214966,
0.620696485042572,
0.24840068817138672,
-0.14664305746555328,
-0.41158685088157654,
-0.2797318398952484,
0.4448666572570801,
-0.2395339161157608,
0.1398819535970688,
... | |
I have a model being populated by my data layer and then I have a partial view which is rendering an instance of that model.
```
<li class="<%= td.Active ? "youarehere" : string.Empty %> <%= i == ViewData.Model.Count() - 1 ? "last" : string.Empty %>">
```
The problem is that `class=""` is invalid XHTML and I will ne... | [
0.006042209453880787,
0.14343006908893585,
0.4660702347755432,
-0.1438104212284088,
-0.11825428903102875,
0.06993147730827332,
0.35739463567733765,
-0.07638388127088547,
0.011331050656735897,
-0.8034987449645996,
-0.0766974613070488,
0.6241902709007263,
-0.2130005806684494,
0.4634694159030... | |
draw the lines as far as where I put logic and what is an acceptable amount of logic for each layer to contain.
I'd probably implement the code to render that class attribute in a helper method. Either one specific to this view, or one slightly more generic. That way you have less code in your view and it could handle ... | [
0.4717188775539398,
-0.20002952218055725,
0.20664013922214508,
0.2550027370452881,
-0.24151435494422913,
0.30967533588409424,
-0.028161020949482918,
0.09437379986047745,
0.10967186093330383,
-0.7463112473487854,
0.42046818137168884,
0.6070958375930786,
-0.17497031390666962,
0.0614486597478... | |
I usually type my map declarations but was doing some maint and found one without typing. This got me thinking (Oh No!). What is the default typing of a Map declaration. Consider the following:
```
Map map = new HashMap();
map.put("one", "1st");
map.put("two", new Integer(2));
map.put("three", "3rd");
for (Map.Entry e... | [
-0.10846654325723648,
0.025493327528238297,
0.5252858400344849,
-0.3821423351764679,
-0.09178287535905838,
-0.2263869345188141,
0.12667304277420044,
-0.42268651723861694,
-0.14688484370708466,
-0.9940595626831055,
-0.2283613532781601,
0.7140319347381592,
-0.34478816390037537,
-0.0023795070... | |
*java.lang.Object*.
The *for* construct takes a type of *Iterable* and calls its *iterator* method. Since the *Set* isn't typed with generics, the iterator returns objects of type *Object*. These need to be explicitly cast to type *Map.Entry*.
```
Map map = new HashMap();
map.put("one", "1st");
map.put("two", new Int... | [
-0.42816147208213806,
-0.21875959634780884,
0.33663010597229004,
-0.46851447224617004,
0.006640654988586903,
-0.025036079809069633,
0.19852815568447113,
-0.6442188620567322,
-0.2542734742164612,
-0.8196852207183838,
-0.43293455243110657,
0.4678645133972168,
-0.5122235417366028,
-0.05359273... | |
Is there a stand-alone GUI designer that can read and write the .form files that NetBeans (Matisse) generates? I like the GUI designer, but I don't want all the overhead of a complete Java IDE just to create and edit .form XML files.
You could check out [JFormDesigner](http://www.jformdesigner.com/). I know it can impo... | [
0.4736517071723938,
-0.10291317850351334,
-0.008848720230162144,
0.08311747014522552,
-0.225177600979805,
-0.23602533340454102,
-0.3058236539363861,
0.05968141928315163,
-0.222609281539917,
-0.6398390531539917,
0.012808769010007381,
0.6031768918037415,
-0.11518187820911407,
0.0259477496147... | |
I have a Delphi 5 executable that calls into a .NET assembly via the free [Delphi .NET](http://sourceforge.net/projects/delphinet/) code, and for the most part, this works great. However, one of the requirements of my application is that our clients be able to use this from a networked share as well as local. On my tes... | [
0.43662428855895996,
0.1883995085954666,
0.011776028200984001,
-0.11422188580036163,
-0.061886634677648544,
-0.34220078587532043,
0.26547786593437195,
0.005921855568885803,
-0.00626371381804347,
-0.77506422996521,
-0.1478668451309204,
0.9744322896003723,
-0.04573284462094307,
0.04374426603... | |
tell me how to at least get the error messages back from this? Or if possible, can anyone tell me why I would get errors this way? Thanks.
Update to .NET 3.5 SP 1. That [removes the distinction](http://blogs.msdn.com/vancem/archive/2008/08/13/net-framework-3-5-sp1-allows-managed-code-to-be-launched-from-a-network-share... | [
0.24048753082752228,
-0.09266199916601181,
0.41271135210990906,
0.20097975432872772,
-0.10295497626066208,
-0.3320552110671997,
0.4567752480506897,
0.013490869663655758,
-0.37924328446388245,
-0.747262179851532,
-0.3609854280948639,
0.589504599571228,
-0.1347125768661499,
0.035997018218040... | |
By "code snippet execution", I mean the ability to write a few lines of code, run and test it without having to fire up an IDE and create a dummy project.
It's incredibly useful for helping people with a small code sample without creating a project, compiling everything cleanly, sending them the code snippet and delet... | [
0.8597654700279236,
-0.18796129524707794,
0.03915998339653015,
0.30253565311431885,
-0.3575669527053833,
0.27183768153190613,
-0.016784483566880226,
-0.020884787663817406,
-0.43474647402763367,
-0.7186771631240845,
0.06387665122747421,
0.043007876724004745,
-0.10481588542461395,
-0.1943648... | |
Java that doesn't involve firing up Eclipse?
What about C?
For C, the in-browser <http://codepad.org/> is truly excellent. Executes code and everything. | [
0.14430367946624756,
-0.04318341985344887,
-0.5054508447647095,
0.00664674723520875,
-0.5172962546348572,
-0.27882906794548035,
0.02715238928794861,
0.32644933462142944,
-0.3481384813785553,
-0.6358728408813477,
0.10447246581315994,
0.7461884021759033,
-0.23436561226844788,
-0.405723273754... | |
I need recommendations on what to use in Delphi (I use Delphi 2009) to handle very large XML files (e.g. 100 MB) as fast as possible.
I need to input the XML, access and update the data in it from my program, and then export the modified XML again.
Hopefully the input and output could be done within a few seconds on... | [
-0.0662647932767868,
0.17313258349895477,
0.485637366771698,
-0.04999174550175667,
-0.028422214090824127,
-0.2971740663051605,
0.1370694637298584,
-0.14847347140312195,
-0.17723962664604187,
-0.7535532712936401,
-0.18990810215473175,
0.7845334410667419,
-0.10548533499240875,
-0.14778161048... | |
is only done once for File Loading and the output done only for File saving, usually just once upon exit. These should be quick as well, but are not as important as the in-memory data access and update.
My understanding is that 3rd party parsers only help with input and output, but not on using and modifying the data ... | [
-0.1102672889828682,
0.2490890622138977,
-0.013606477528810501,
0.19845198094844818,
0.1457480490207672,
-0.07777932286262512,
0.49030688405036926,
-0.2200411558151245,
-0.13615821301937103,
-0.6621608734130859,
-0.39272311329841614,
0.8493955731391907,
0.11072254180908203,
-0.171737715601... | |
try with direct text manipulation - skip XML parsing.
Read from stream, use some fast text search algorithm e.g. [Boyer-Moore](http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm), to find places where you need to modify data, do your modification and output data into another stream.
This would be one-p... | [
0.1820496767759323,
-0.2380174696445465,
-0.18180732429027557,
0.2559787333011627,
-0.07376420497894287,
0.010558553040027618,
0.2059067040681839,
-0.227032870054245,
-0.1402803361415863,
-0.6634700298309326,
-0.04249827563762665,
0.5146403312683105,
-0.3875728249549866,
-0.174407377839088... | |
I find it much easier to write MXML classes with embedded Script than trying to make an actionscript file.
I was wondering however what kind of overhead there is of using an MXML file - in terms of file size. I'm not especially concerned about performance, but if that is relevant would be interested in any findings.
... | [
0.5474720001220703,
-0.027037356048822403,
0.21322551369667053,
0.1491459459066391,
-0.4693501591682434,
0.0738818496465683,
0.1650979071855545,
0.2057218849658966,
-0.21483276784420013,
-0.8002548217773438,
0.017355073243379593,
0.6762882471084595,
-0.23171782493591309,
0.0975571796298027... | |
your swf any bigger.
The thing that's affecting size is using the Flex SDK and its components. Whether you declare them with MXML or AS3, you're using them and their code is being built into the swf. By the same token, if you're referencing the Flex RSL, and thus avoiding building the Flex stuff directly into your swf... | [
0.4297281503677368,
-0.14396853744983673,
0.47258973121643066,
-0.021870223805308342,
-0.4161314368247986,
-0.30299800634384155,
0.04252564534544945,
-0.21046555042266846,
-0.7729177474975586,
-0.7491418719291687,
-0.129276841878891,
0.479522705078125,
-0.2806034982204437,
0.12816730141639... | |
does generate intermediate AS3 code, it might be more verbose than you would care to write on your own, so you could see some additional size from that. To peek at it (which is good for understanding in general) you can look at with the compiler directive to keep the generated code.
> From: <http://www.flashguru.co.u... | [
0.09306669980287552,
-0.2366592288017273,
0.30213651061058044,
-0.1847197264432907,
-0.18468065559864044,
0.05294284224510193,
0.2451656311750412,
-0.4235789179801941,
-0.20159782469272614,
-0.5734224915504456,
-0.26523295044898987,
0.7362122535705566,
-0.27367308735847473,
-0.566882908344... | |
your Flex Project by clicking the Run button.
> 7. Right-click your Flex Project again in the Navigator Panel.
> 8. Choose Refresh from the Context-Menu.
> 9. A new folder should appear under your Flex Project in the Navigator
> Panel, named ‘generated’
This is a good thing to do once you get into debugging and profi... | [
0.36273443698883057,
-0.3919626474380493,
0.19593116641044617,
0.08783440291881561,
-0.27251243591308594,
-0.26275724172592163,
0.043329112231731415,
0.1729341745376587,
-0.27485257387161255,
-0.9186117649078369,
-0.09803084284067154,
0.864396333694458,
-0.17770589888095856,
-0.15523554384... | |
What is the most efficient way to cacluate the closest power of a 2 or 10 to another number? e.g.
3.5 would return 4 for power of 2 and 1 for power of 10
123 would return 128 for power of 2 and 100 for power of 10
0.24 would return 0.25 for power of 2 and 0.1 for power of 10
I'm just looking for the algorithm and d... | [
-0.11043490469455719,
0.20629063248634338,
0.3360074758529663,
-0.1872182935476303,
-0.15703903138637543,
0.2525928020477295,
0.004444916732609272,
-0.6839026808738708,
-0.14931997656822205,
-0.28185904026031494,
0.13952557742595673,
0.6927616000175476,
-0.3667771816253662,
-0.198789745569... | |
is a logarithm to any convenient base. | [
-0.35244083404541016,
0.17158856987953186,
0.3907264471054077,
0.14830927550792694,
0.14069664478302002,
0.008607922121882439,
-0.029631933197379112,
-0.1895645409822464,
0.0899539589881897,
-0.28362181782722473,
-0.23799750208854675,
-0.07293377816677094,
0.08605239540338516,
0.1167253404... | |
I've a web service running on server which return data either in XML format or JSON format.
I wanted to request a JSON format but using HTTP Post method.
This is the code which work for JSON post request,
TouchJSON Framework is used for parsing the JSON, thanks 'schwa'.
```
NSArray *keys = [NSArray arrayWithObjects:@"... | [
0.23711048066616058,
0.08552346378564835,
0.6794962882995605,
-0.20796288549900055,
-0.15524926781654358,
0.09273867309093475,
0.3383984863758087,
-0.30864280462265015,
0.02813061885535717,
-0.7097925543785095,
-0.16353541612625122,
0.5228462219238281,
-0.1773277372121811,
0.09403700381517... | |
= [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&theResponse error:&theError];
NSString *theResponseString = [[[NSString alloc] initWithData:theResponseData encoding:NSUTF8StringEncoding] autorelease];
NSLog(theResponseString);
NSDictionary *theResponseDictionary = [[CJSONDeserializer deserialize... | [
-0.22215360403060913,
-0.10562554001808167,
0.34775057435035706,
-0.21265290677547455,
0.04242540895938873,
0.1851976364850998,
0.5443246364593506,
-0.1766011118888855,
-0.1292078047990799,
-0.7327956557273865,
-0.49119481444358826,
0.37368836998939514,
-0.323970764875412,
0.14272285997867... | |
How can I fetch more than 1000 record from data store and put all in one single list to pass to django?
Starting with Version 1.3.6 (released Aug-17-2010) you **CAN**
[From the changelog:](http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes#Version_1.3.6_-_August_17,_2010)
> Results of datastore count() qu... | [
0.305309921503067,
0.15548427402973175,
0.4625394940376282,
0.22789695858955383,
-0.2234848588705063,
-0.0854179710149765,
0.02571270801126957,
-0.34510231018066406,
-0.48447123169898987,
-0.49778828024864197,
0.23055702447891235,
0.49733930826187134,
-0.1460539549589157,
0.197297289967536... | |
I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries.
Now, since the underlying implementation (and since SQL Server... | [
-0.15527045726776123,
0.03002111241221428,
0.9277697801589966,
0.2674945890903473,
-0.11002359539270401,
-0.5083542466163635,
-0.23855191469192505,
-0.06326740235090256,
-0.38982051610946655,
-0.26685208082199097,
-0.03451457619667053,
0.5588169097900391,
-0.332093209028244,
0.368914604187... | |
to SQL in as the layer that generates these queries?
Is this because of performance or EF uses a different way of transforming the eSQL statement into SQL?
It seemed to me - at least for my unlearned mind - a natural fit to dogfood Linq to SQL in EF.
Comments?
It is worth noting that Entity Framework has (at least) ... | [
0.137703999876976,
0.03042229823768139,
0.6095866560935974,
0.16295550763607025,
-0.4476664662361145,
-0.1240639016032219,
-0.21171942353248596,
-0.17453119158744812,
-0.12403047829866409,
-0.2579655349254608,
0.11366052180528641,
0.6468390822410583,
-0.33702361583709717,
0.208793312311172... | |
command (in a canonical, database agnostic form) which the ADO.NET Provider for the specific RDBMS is responsible for converting into store specific SQL. This is the right model IMHO as over the years a lot of time has been invested (and will continue to be invested) in producing great ADO.NET Providers for each store.... | [
0.17734907567501068,
0.027646129950881004,
0.45513179898262024,
0.11009916663169861,
-0.07347246259450912,
-0.2250836342573166,
-0.17632555961608887,
-0.27557411789894104,
-0.03353714197874069,
-0.2952834665775299,
-0.13725097477436066,
0.6617597341537476,
-0.23503267765045166,
0.020042445... | |
team had a much smaller problem to solve - "works only with SQL Server" and hence could do store specific stuff more easily. I know the EF team are aware that there are cases where EF to SQL Server is producing TSQL less efficiently than L2S and are working on improving this for V2.
Interestingly this model allows new... | [
0.3550211191177368,
0.008534038439393044,
0.3764007091522217,
-0.11208192259073257,
-0.23793475329875946,
-0.2285325974225998,
-0.09109184145927429,
-0.2729244828224182,
-0.356454461812973,
-0.4434402287006378,
-0.05515378713607788,
0.5902139544487,
-0.08560358732938766,
-0.023718496784567... | |
the bigger picture you can see that it would be horribly difficult and indeed restrictive to try and somehow retrofit L2S TSQL generation into the archiecture of the Entity Framework. | [
0.1899605393409729,
-0.03570252284407616,
0.12706002593040466,
0.24206429719924927,
0.118181012570858,
-0.25023460388183594,
0.04801032319664955,
0.061591774225234985,
-0.0009541189065203071,
-0.551321804523468,
-0.041200120002031326,
0.3587527573108673,
-0.046831391751766205,
0.3203298151... | |
Are event handlers fired in the order that they attached to the event? If not, can I enforce some kind of order onto the event handlers such that they are called in a specific order?
Assuming a simple implementation of the event (using += and -= on a delegate field, which in turn will use `Delegate.Combine/Remove`) the... | [
0.2342674732208252,
-0.1339183896780014,
-0.004190037027001381,
0.035183366388082504,
0.051269397139549255,
-0.13173004984855652,
0.16298577189445496,
-0.44884222745895386,
-0.1588420867919922,
-0.329351007938385,
-0.3636265695095062,
0.6146886944770813,
-0.44500645995140076,
-0.0618764273... | |
*a*
> and *b* in that order.
See my [article about events](http://pobox.com/~skeet/csharp/events.html) for some examples of which `Delegate.Combine/Remove` do (and what events are like under the covers). | [
0.4191492199897766,
0.0654274970293045,
-0.3119877576828003,
0.2214219570159912,
-0.14159385859966278,
-0.285722017288208,
0.28309205174446106,
-0.10397456586360931,
-0.6440015435218811,
-0.31053557991981506,
-0.3383100926876068,
-0.08409366011619568,
-0.06343672424554825,
0.13177597522735... | |
I'm interested in compressing data using Python's `gzip` module. It happens that I want the compressed output to be deterministic, because that's often a really convenient property for things to have in general -- if some non-gzip-aware process is going to be looking for changes in the output, say, or if the output is ... | [
0.26692676544189453,
0.08493492752313614,
-0.04841771721839905,
-0.03415495157241821,
0.0006789335748180747,
-0.048011936247348785,
-0.151954784989357,
0.2720261514186859,
-0.35800421237945557,
-0.5514163374900818,
0.16462107002735138,
0.4999110698699951,
-0.5721428990364075,
-0.0526081509... | |
to have a gzip stream without a timestamp in it, which is too bad.
In any case, there doesn't seem to be a way for the caller of Python's `gzip` module to supply the correct modification time of the underlying data. (The actual `gzip` program seems to use the timestamp of the input file when possible.) I imagine this ... | [
0.37139832973480225,
0.1319163292646408,
0.1550237238407135,
0.003974410239607096,
0.02810792252421379,
-0.2016816884279251,
0.27769872546195984,
0.16105373203754425,
-0.25523245334625244,
-0.48503097891807556,
0.08539161831140518,
0.7217459082603455,
-0.5052893757820129,
-0.15160246193408... | |
least terrible way to `gzip` some data with an arbitrary timestamp from Python?
From Python 2.7 onwards you can specify the time to be used in the gzip header. N.B. filename is also included in the header and can also be specified manually.
```
import gzip
content = b"Some content"
f = open("/tmp/f.gz", "wb")
gz = gz... | [
0.3559185266494751,
0.09408386051654816,
0.25117194652557373,
-0.3039315640926361,
0.05332965776324272,
-0.18543647229671478,
0.6510494947433472,
-0.03689344972372055,
-0.2619839906692505,
-0.7678936123847961,
-0.2018396109342575,
0.6475493907928467,
-0.4663604497909546,
0.0406980849802494... | |
Is there a way (in C#) to access the systray?
I am not talking about making a notify icon.
I want to iterate through the items in the tray (I would guess through the processes but I don't know how to determine what is actually in the tray and what is just a process) and also represent the items with their icons in my o... | [
0.4642200469970703,
-0.13335324823856354,
0.35152456164360046,
0.38222116231918335,
0.37480682134628296,
-0.04570608213543892,
-0.063680000603199,
0.13644792139530182,
-0.3050544261932373,
-0.6794522404670715,
0.08105863630771637,
0.6770008206367493,
-0.21879427134990692,
-0.34079402685165... | |
not now).
The magic appears to be that he gets a handle to the system tray's window:
```
NotifyWnd = FindWindowEx(SysTray, 0, "TrayNotifyWnd", 0);
```
Then he sets a hook on its message pump:
```
hHook=SetWindowsHookEx(WH_CALLWNDPROC,HOOKPROC(MsgProc),
hInstance,dwExplorerThreadId);
```
Then during the me... | [
-0.10888814926147461,
-0.019816022366285324,
0.8169234991073608,
-0.23217853903770447,
0.3685447871685028,
0.13383705914020538,
0.3661337196826935,
-0.3717184066772461,
-0.23713159561157227,
-0.5589450597763062,
-0.22311493754386902,
0.3245275616645813,
-0.4899614751338959,
0.0581248812377... | |
familiar with what's going on behind the scenes there, but it doesn't seem entirely out of the question.
I'm going to play with this a bit myself, but hopefully it's a good place to get you started. :) | [
0.6693766713142395,
-0.052931006997823715,
0.29340603947639465,
0.3068270683288574,
0.4638092517852783,
-0.44224900007247925,
0.1125478520989418,
0.28415727615356445,
-0.04457904398441315,
-0.31964704394340515,
0.13276827335357666,
0.398672878742218,
0.31961217522621155,
-0.347816556692123... | |
There is a similar question going around, but it just got the same old answers that people always give about Regex syntax, but that's not the point here, so please try to not knee jerk the same old answers about regex syntax. Try to be a little more original and personal about it this time.
Regex syntax is very VERY c... | [
0.4703209102153778,
0.2004961520433426,
0.0614485926926136,
0.30502837896347046,
-0.03131943941116333,
-0.4348769783973694,
0.3204077482223511,
0.2758692800998688,
-0.04109082370996475,
-0.6832996010780334,
0.02386435866355896,
0.6826077103614807,
-0.2737483084201813,
-0.07940731197595596,... | |
to hear include :
* *Answer*: It's compact
* *Counter*: Haven't we all agreed in this day and age that code should be literate and a variable like "client" is better than "c"?
* *Answer*: It's a "domain specific language"
* *Counter*: how about all the very easy to understand, non compact, non cryptic and dare I say p... | [
0.39030545949935913,
0.2794412672519684,
-0.12523454427719116,
0.3042570650577545,
-0.18143577873706818,
-0.42050421237945557,
0.3966826796531677,
0.33755412697792053,
-0.4658874273300171,
-0.43948298692703247,
-0.3444083631038666,
0.5717335343360901,
0.1349104940891266,
-0.164619192481040... | |
never seen it before. And why do people defend Regex when its such a hard language to look at, but then go on and complain about Lisps parenthesis?
Ok now everyone try to be original and honest here, don't just pull out the same old rote answers programmers used 20 years ago to design regex. Unless you really believe ... | [
0.5633269548416138,
0.08923785388469696,
0.26513922214508057,
0.36073610186576843,
-0.17780210077762604,
-0.28207895159721375,
0.24608387053012848,
0.5568204522132874,
-0.0643039271235466,
-0.5600895285606384,
0.21348236501216888,
0.7531136274337769,
0.039026349782943726,
0.020389838144183... | |
had taken as "truths" about regex, and look at them from a modern standpoint. Mostly because questioning principles is necessary for further development, and because so many newcomers complain vehemently about them, they can't just be flat out right, so I decided to try to step into the shoes of a newcomer and consider... | [
0.44995975494384766,
0.4206414818763733,
0.04141344130039215,
0.37692543864250183,
-0.3260842561721802,
-0.2852518558502197,
0.20125530660152435,
0.09081875532865524,
0.08699286729097366,
-0.18791528046131134,
-0.07272211462259293,
0.7996348142623901,
0.3135208487510681,
0.211131751537323,... | |
good arguments pro and con regex outdated syntax, that can serve newcomers to actually understand more about why regex are what they are, and even better hopefully get some newcomer to come up with a better solution US old minded can't see because we are blinded by the "coolness" of regex.
---
**Quote:**
> The Perl ... | [
0.33591851592063904,
0.2616477608680725,
0.2107769250869751,
0.18557283282279968,
-0.06592470407485962,
-0.11315292865037918,
0.4437597393989563,
0.1988682746887207,
0.08385295420885086,
-0.4555833637714386,
0.059456173330545425,
1.0198081731796265,
-0.12316235899925232,
0.0527796894311904... | |
as good programmers should we consider refactoring them? Maybe cleaning up and trying over as we've done with some many other technologies?
Most of what I have to say were addressed by Adam and DGM, but I don't think they cover your second point very well.
"how about all the very easy to understand, non compact, non c... | [
0.25844696164131165,
0.38680699467658997,
-0.2404150366783142,
0.197938472032547,
-0.2467421293258667,
-0.28688690066337585,
0.2967153489589691,
0.31064581871032715,
-0.08705618232488632,
-0.2587258219718933,
-0.19280456006526947,
0.5520666241645813,
-0.05336036905646324,
-0.10100108385086... | |
of something that is not '>' followed by a '>' remember zero or more of something, stopping at the first "</TAG>"
This is a fairly simple regex. Is the English form really easier to understand? Could you do better?
Regular expressions are hard to read, but what you want from them can be just as hard to explain. | [
0.17830297350883484,
-0.09554105252027512,
0.08528698980808258,
0.14510206878185272,
-0.10604682564735413,
0.0010476855095475912,
0.05713442340493202,
0.12402550876140594,
0.226710245013237,
-0.3194639980792999,
-0.15905258059501648,
0.5803660750389099,
-0.19390425086021423,
-0.35806283354... | |
I'm not sure how to describe this problem, so I think an example is the best way to ask my question:
I have two tables with a manyToMany relationship:
DriversLicence <-> LicenceClass
LicenceClass is things like "Car", "Motorbike", and "Medium Rigid".
Using Hibernate Criteria, how can I find all licences that have b... | [
0.4111185669898987,
0.13353443145751953,
0.7202620506286621,
0.10190623253583908,
-0.4054226279258728,
-0.2991235554218292,
0.013861236162483692,
-0.26438412070274353,
-0.36384981870651245,
-0.15980523824691772,
0.1572284996509552,
0.8574017882347107,
0.19949014484882355,
0.286529093980789... | |
"Can you do what I initially described in SQL - and is there a Hibernate Criteria analog?"
Here's how I finally achieved it using HQL:
```
public List<DriversLicence> findDriversLicencesWith(List<LicenceClass> licenceClasses) {
String hqlString = "select dl from DriversLicenceImpl dl where 1=1 ";
for (int i = ... | [
-0.09247594326734543,
-0.21531328558921814,
0.7082915306091309,
-0.036274880170822144,
-0.17310111224651337,
-0.009096978232264519,
0.29956746101379395,
-0.8150453567504883,
-0.17567425966262817,
-0.6330975890159607,
-0.13381272554397583,
0.8855831027030945,
-0.1067383661866188,
-0.1061973... | |
query.setParameter("licenceClass" + i, licenceClasses.get(i));
}
return query.list();
}
```
Or using Hibernate Criteria with an sqlRestriction:
```
for (LicenceClass licenceClass : licenceClasses) {
criteria.add(Restrictions.sqlRestriction("? = some(select " + LicenceClass.PRIMARY_KEY + " ... | [
0.09394529461860657,
-0.2893049418926239,
0.6567980051040649,
-0.0822996273636818,
0.03386778384447098,
-0.07559723407030106,
0.36432087421417236,
-0.594096302986145,
-0.16321690380573273,
-0.6665349006652832,
-0.34939688444137573,
0.5250639319419861,
-0.39361143112182617,
0.22467122972011... | |
DriversLicence.PRIMARY_KEY + " = " + DriversLicence.PRIMARY_KEY + ")",
licenceClass.getId(), Hibernate.LONG));
}
```
LICENCE\_CLASS\_JOIN\_TABLE is the name of the table that hibernate generates to support the many-to-many relationship between driversLicence and LicenceClass. | [
0.0250871442258358,
-0.1474904716014862,
0.5747596621513367,
-0.25041407346725464,
-0.21660944819450378,
-0.04686642810702324,
0.09090667217969894,
-0.22226057946681976,
0.2811567485332489,
-0.23371152579784393,
-0.21550850570201874,
0.6962350010871887,
-0.39216604828834534,
0.211374938488... | |
In traditional embedded programming, we will give a delay function like so:
```
for(i=0;i<255;i++)
for(j=0;j<255;j++);
```
In the microprocessor's view, is this how the sleep() function works?
Is there an alternative for the sleep() function in C?
Alternatives depend in what you are trying to do and what OS you ... | [
0.18783333897590637,
-0.4640030562877655,
0.08019095659255981,
-0.11205792427062988,
0.13214361667633057,
-0.1429944932460785,
-0.2561924457550049,
0.05424162372946739,
-0.10575266927480698,
-0.6624459624290466,
-0.29776790738105774,
0.7986552715301514,
-0.18728061020374298,
-0.09116638451... | |
used with all file descriptor sets zero in order to get a fairly accurate sub-second wait.
On windows systems, you have Sleep, which is pretty much the same, but taking a number of milliseconds.
In a multi-tasking operating system, a sleep function can sometimes be given 0 as a parameter. This generally causes the f... | [
0.38485798239707947,
-0.4122205078601837,
0.2008579671382904,
-0.1686691790819168,
0.057421110570430756,
-0.1547853648662567,
0.09165287762880325,
-0.16344089806079865,
-0.4127003252506256,
-0.5964249968528748,
-0.19600290060043335,
0.4833630621433258,
-0.05283990874886513,
0.1683100610971... | |
let us have a situation in which the following program prints some 10 lines of #
```
for(i=0;i<10;i++)
prinf("\n#");
```
now how to go back to 5 th line and edit that # and change the color of it without clearing the screen or clearing the below 5 lines?
I have tried
```
window(5,0,20,20);
textcolor(GREEN);
cprint... | [
0.2105124592781067,
-0.06970486044883728,
0.5802323818206787,
0.056044477969408035,
0.10739073157310486,
0.2844823896884918,
0.31278178095817566,
-0.03365865722298622,
-0.21639946103096008,
-0.9430837631225586,
-0.0962500348687172,
0.4772239923477173,
-0.180211141705513,
-0.089845903217792... | |
pixel i.e, in your example (5,0) to the pixel pointed by next 2 coordinates. so your program should work try it out or else use gotoxy() | [
0.03309299796819687,
-0.21216820180416107,
0.4130397140979767,
0.11350172758102417,
-0.2863870859146118,
0.058712437748909,
0.12537525594234467,
-0.26829397678375244,
0.004502220544964075,
-0.7709078788757324,
0.04362192004919052,
0.03655693680047989,
-0.14317838847637177,
0.16001705825328... | |
I'm doing some searching of tags, and some users like "cat" while others like "Cat" Go figure...
Anyways, is there a way to force a particular find to be case sensitive? Such as:
```
Tag.find(:some-special-option-here)
```
Any ideas?
You can also do a case-sensitive search without changing your column properties.
... | [
0.002674736548215151,
0.021700063720345497,
0.16174887120723724,
0.03118537925183773,
0.11587170511484146,
-0.10369226336479187,
-0.1384345442056656,
-0.15044145286083221,
-0.16608357429504395,
-0.6024875640869141,
0.061721280217170715,
0.5885221362113953,
-0.3943794071674347,
-0.132310971... | |
I have used this in my HTML:
```
<q> Hai How r u </q>
```
Which shows the text in quotes, like "Hai How r u", for example.
This is working fine in FF but not in IE 6.0.
Please let me know why this happens, and any solutions you might know of.
I don't want to use the quote (") character in my HTML or a separate c... | [
0.7684834599494934,
0.2762407958507538,
0.3500719964504242,
-0.21732646226882935,
-0.3301336467266083,
-0.13999630510807037,
0.1355537474155426,
-0.005622354801744223,
0.13464653491973877,
-0.6244663000106812,
0.047420233488082886,
0.4294605255126953,
-0.30478188395500183,
0.25994613766670... | |
encode them in yourself. It's a bit of a pain, but at least it levels the playing field and you know that your content will look the same cross-browser.
If you *really* don't want to have to type the quotes in yourself, then take a look at these articles:
* <http://simon.incutio.com/archive/2003/04/03/fixingQuotesWit... | [
0.4224551022052765,
0.1649760603904724,
0.3378109633922577,
0.11595785617828369,
-0.21579132974147797,
-0.06057640165090561,
0.1791454404592514,
-0.31866833567619324,
-0.16024774312973022,
-0.5228249430656433,
0.16110016405582428,
0.43930017948150635,
-0.3212783634662628,
-0.07995938509702... | |
I've got a Repeater and its SqlDatasource nested inside a Gridview TemplatedField.
The Repeater's datasource SelectCommand is set using the FormatString of an Eval from the Gridview.
The SelectCommand has a WHERE clause which is to compare a string.
Because I have already used the single and double quotes, I a... | [
0.5752285718917847,
0.02863236330449581,
0.414828896522522,
0.018713489174842834,
-0.09273555874824524,
-0.04013843461871147,
0.34291642904281616,
-0.09664216637611389,
0.057720333337783813,
-0.6711190938949585,
0.39870089292526245,
0.16533242166042328,
0.03418096527457237,
0.4713757038116... | |
may be able to offer.
```
<asp:GridView ID="GridView1" runat="server" DataSourceID="DataSource1" DataKeyNames="Foo" AutoGenerateColumns="False" AllowSorting="true" >
<Columns>
<asp:BoundField DataField="Foo" HeaderText="Foo" SortExpression="Foo" />
<asp:BoundField DataField="Bar" HeaderText="Bar" ... | [
-0.007587983272969723,
-0.12101461738348007,
0.6397314667701721,
-0.08817208558320999,
0.08576449006795883,
0.28421327471733093,
-0.09859177470207214,
-0.353072851896286,
-0.09854694455862045,
-0.6628109216690063,
-0.2706933617591858,
0.3076048493385315,
-0.15447606146335602,
-0.0704752802... | |
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Blah") %>'></asp:Label>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="DataSourceNested" runat="server" DataFile="~/App_Data/DatabaseName" | [
-0.14802305400371552,
-0.16399505734443665,
0.6121361255645752,
-0.07418815046548843,
-0.22420190274715424,
0.2074638158082962,
0.1296604573726654,
-0.3284057080745697,
-0.4136883616447449,
-0.3330164849758148,
-0.23104332387447357,
0.23902544379234314,
-0.11935476958751678,
0.197707056999... | |
SelectCommand='<%# Eval("Bar", "SELECT Blah FROM TableName WHERE (StringField = {0})") %>' >
</asp:SqlDataSource>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
```
Don't forget that a .aspx page is simply XML. You just escape the quotes as you normally would.
... | [
0.12163426727056503,
-0.19684700667858124,
0.7356657385826111,
-0.10058024525642395,
-0.13712555170059204,
-0.11713922768831253,
0.027845680713653564,
-0.48029109835624695,
-0.2863227427005768,
-0.5308640599250793,
-0.3053176999092102,
0.19617463648319244,
-0.2819947898387909,
0.0371671393... | |
</ItemTemplate>
<SeparatorTemplate>
<br />
</SeparatorTemplate>
</asp:Repeater>
```
When the above expression is databound the value between `<%#` and `%>` becomes:
> `Eval("Id", "This is item '{0}'.")`
...which produces on the HTML page as output when databound with an array of objects with "Id" pr... | [
-0.07763329893350601,
0.0892205759882927,
0.609923243522644,
-0.14755943417549133,
-0.26539990305900574,
0.24182672798633575,
0.15891137719154358,
-0.7708772420883179,
-0.2952273190021515,
-0.5122978687286377,
-0.4775331914424896,
0.219748854637146,
-0.20841343700885773,
0.1763708740472793... | |
I want to be able to get a list of all differences between two JavaScript object graphs, with the property names and values where the deltas occur.
For what it is worth, these objects are usually retrieved from the server as JSON and typically are no more than a handful of layers deep (i.e. it may be an array of obje... | [
0.3793632984161377,
-0.11442930996417999,
0.06630197167396545,
0.06387069821357727,
-0.1568520963191986,
0.20408153533935547,
0.2775692343711853,
-0.27608823776245117,
-0.2314249873161316,
-0.6921713352203369,
0.01962587796151638,
0.14846302568912506,
-0.10703050345182419,
-0.0404800511896... | |
will probably end up writing this myself, but hope someone has already done this work or know of someone who has.
---
EDIT: These objects will typically be very close in structure to one another, so we are not talking about objects that are utterly different from one another, but may have 3 or 4 deltas.
After reviewi... | [
0.5575252771377563,
-0.11150665581226349,
0.3490173816680908,
0.29126816987991333,
-0.014446912333369255,
-0.1451677531003952,
0.14770406484603882,
0.07989572733640671,
-0.2525099217891693,
-0.6397467851638794,
-0.01832645572721958,
0.12035898119211197,
0.12478743493556976,
-0.031003218144... | |
creating a diff on the server side and passing the client only the changed bits. | [
0.3015914559364319,
-0.1791960895061493,
0.3371833562850952,
0.2832726240158081,
-0.2251475304365158,
0.1112031489610672,
-0.09814924746751785,
0.12020015716552734,
-0.0390341654419899,
-0.36752691864967346,
-0.2497740387916565,
0.3149227797985077,
-0.22397573292255402,
0.2182517796754837,... | |
Apple strongly recommends using the binary plist format when reading large XML-based data sets into iPhone apps. Among their reasoning is the fact that XML parsing is very taxing on the iPhone. However, this requires that files residing on the remote web server be converted first.
For frequently-changing content, it i... | [
0.0052213650196790695,
0.137065127491951,
0.4338187277317047,
0.036110784858465195,
0.2299910932779312,
0.010743825696408749,
-0.1965080201625824,
-0.00037803954910486937,
-0.1875825822353363,
-0.7106757164001465,
-0.4066798985004425,
0.44897881150245667,
-0.4185504913330078,
-0.2876062095... | |
can be directly built and run on Linux and Windows, so you can write a CF tool using the normal APIs you would use on Mac OS X, but build and run it on other platforms.
The particular API you want to be looking at is [CFPropertyListWriteToStream()](http://developer.apple.com/documentation/CoreFoundation/Reference/CFPr... | [
0.43243926763534546,
0.13722069561481476,
0.5088545680046082,
0.008783905766904354,
0.5260667204856873,
-0.2123679369688034,
0.07968100905418396,
-0.13992781937122345,
-0.37110140919685364,
-0.39773818850517273,
-0.0539487786591053,
0.5555471777915955,
-0.5042839050292969,
0.14973387122154... | |
in binary plists are uniqued (such as strings). Other elements are not (such as arrays and dictionarts). The binary plist format allows them to be uniqued, the issue is that it is expensive to actually walk through and unique arrays and dictionaries. If you have a lot of identical arrays or dicts in your content you ma... | [
0.12346572428941727,
0.09259925037622452,
-0.012226355262100697,
0.2533559799194336,
-0.15086884796619415,
0.05244230106472969,
0.06818085163831711,
0.24031175673007965,
-0.34078946709632874,
-0.5707041025161743,
-0.019158566370606422,
0.1194838285446167,
-0.4898145794868469,
0.15170994400... | |
case a future release makes any optimizations that break that. Also, make sure you are ready to turn it off at a moments notice. | [
0.1255250871181488,
-0.06917242705821991,
0.5279490947723389,
0.24764586985111237,
0.5463622212409973,
-0.6181222200393677,
0.10063553601503372,
0.5888917446136475,
0.06268388032913208,
-0.6217620968818665,
-0.48680612444877625,
0.7965197563171387,
-0.13431145250797272,
-0.2895835340023041... | |
After much googling I have been wondering what the benefits/differences are between mysql and sqlite3. I am primarily hoping for a speed bump when moving my development database to my production database, although I imagine this will primarily happen in my code. Does any know what the major differences are in performan... | [
0.5540711283683777,
0.2686501741409302,
-0.014199275523424149,
0.03871849924325943,
-0.2179168164730072,
-0.02450070157647133,
0.003590433159843087,
0.11733876913785934,
-0.060165755450725555,
-0.7268792986869812,
0.5247867703437805,
0.6644480228424072,
-0.04576777294278145,
0.349700897932... | |
Different database engines behave differently and will cause unexpected bugs to appear. Try to get your development system as close to production as you possibly can (hint: run it in a VM)
SQLite and MySQL are both fine products in the right context. Understand what their capabilities are.
SQLite:
* Runs in-process... | [
0.2841196358203888,
-0.0549284853041172,
0.21384599804878235,
0.3391225337982178,
-0.15521779656410217,
-0.24469007551670074,
0.11558651924133301,
0.04355819523334503,
-0.21721449494361877,
-0.816139817237854,
0.0782901719212532,
0.7005358338356018,
-0.22933746874332428,
0.117604099214077,... | |
Choice of engines (InnoDB provides good features for many workloads)
* Much more control of storage, backup, restore etc
* Network-capable - which allows its use in large scale applications
* Better concurrency - the InnoDB engine has MVCC which means that readers do not block writers, nor do writers block readers. Eve... | [
-0.393488347530365,
-0.07402128726243973,
0.5269479155540466,
0.19740723073482513,
-0.2712845504283905,
-0.0482637882232666,
0.11078976094722748,
-0.22758068144321442,
-0.46114638447761536,
-0.7928224205970764,
-0.05017825961112976,
0.7059540748596191,
-0.4085666537284851,
-0.1639032512903... | |
your database on a local disc (or of course, network disc, if one is available). If you want to scale your web application, you'll probably have to use a server-based database such as MySQL. | [
0.34059852361679077,
-0.0024264429230242968,
0.30237269401550293,
0.5499090552330017,
0.07275379449129105,
-0.2863723635673523,
-0.1353604644536972,
0.37028610706329346,
-0.5886638164520264,
-0.7085965871810913,
0.11658599972724915,
0.6496140956878662,
0.024991638958454132,
0.2618485093116... | |
My php is weak and I'm trying to change this string:
```
http://www.example.com/backend.php?/c=crud&m=index&t=care
^
```
to be:
```
http://www.example.com/backend.php?c=crud&m=index&t=care
^
```
removing the `/` after the `backend.php?`. Any ide... | [
0.060009416192770004,
0.46377524733543396,
0.4405703842639923,
-0.11889618635177612,
-0.1926933079957962,
-0.0062787397764623165,
0.4179143011569977,
0.08338786661624908,
0.014693793840706348,
-0.7651276588439941,
0.22011759877204895,
0.5151960253715515,
-0.07776037603616714,
0.12935705482... | |
use simply [str\_replace](http://www.php.net/str_replace), like the manual says:
> If you don't need fancy replacing
> rules (like regular expressions), you
> should always use this function
> instead of ereg\_replace() or
> preg\_replace().
```
<?
$badUrl = "http://www.site.com/backend.php?/c=crud&m=index&t=care... | [
0.5347446799278259,
0.25923269987106323,
0.44998911023139954,
-0.38692283630371094,
-0.0661131739616394,
-0.1489025503396988,
0.28429651260375977,
-0.5725876092910767,
-0.19502636790275574,
-0.5147412419319153,
-0.5574952960014343,
0.7009263634681702,
-0.6823363900184631,
-0.22997875511646... | |
I want to determine if a certain window is visible to the user or hidden/occluded. In Windows XP I would use the GetClipBox() function and check for a NULLREGION or empty RECT return value. This worked perfectly fine, but on Windows Vista it does not work if another window is occluding the window. In this case, GetClip... | [
0.09998051077127457,
-0.16401487588882446,
0.39655354619026184,
-0.09264057129621506,
-0.18500109016895294,
-0.40689393877983093,
0.5470086336135864,
0.09695440530776978,
-0.17631123960018158,
-0.9499897956848145,
-0.09716352820396423,
0.7701406478881836,
-0.47721192240715027,
0.0337284244... | |
is because you are not being clipped! The whole point of the DWM is each window (that isn't a child, like buttons or edit boxes) gets it's own buffer to draw to, so foreground windows can be moved around without having to fill in the windows behind them.
As a simple example, hover over your window entry in the task ba... | [
0.335099458694458,
-0.46585822105407715,
0.30103424191474915,
0.21492761373519897,
0.059358708560466766,
-0.02922879345715046,
-0.08541987091302872,
-0.20427969098091125,
-0.24066658318042755,
-0.6442887783050537,
-0.009852740913629532,
0.26143839955329895,
-0.036747027188539505,
-0.003511... | |
extended glass, like Windows Media Player uses - resize it to as small as it will go and see it use glass for its entire area!) Of course, layered windows (from XP on) and custom window regions meant this could always be the case, but now it's the default.
**Summary/TL;DR:**
If you are doing heavy animation/fancy eff... | [
0.3772245943546295,
-0.25022682547569275,
0.8555530905723572,
-0.0729394406080246,
-0.014785148203372955,
-0.12489558011293411,
0.14507515728473663,
-0.14942894876003265,
-0.531538724899292,
-0.4475736618041992,
-0.27067363262176514,
0.4639444351196289,
0.07478895783424377,
0.0284982174634... | |
in the background, you won't get one when you are activated!). | [
0.3026977777481079,
-0.25273850560188293,
0.23941633105278015,
0.12661372125148773,
0.30589559674263,
-0.28837841749191284,
0.33597782254219055,
-0.005090611521154642,
-0.11918163299560547,
-0.397549569606781,
-0.4844711720943451,
0.6348313689231873,
-0.34574440121650696,
-0.08362454175949... | |
We are using CruiseControl with a StarTeam server and having problems with the StarTeam server crashing. We are wondering if we are hitting the server too hard. Across 3 CruiseControl machines and a total of about 30 projects, we are logging into StarTeam and checking for modifications every minute or so. Most of our p... | [
-0.017951348796486855,
-0.05667296424508095,
0.4420478343963623,
0.2776694595813751,
0.31744852662086487,
-0.12127812951803207,
0.07151991128921509,
0.10202373564243317,
-0.20338627696037292,
-0.6924278736114502,
0.0830831378698349,
0.44115638732910156,
0.03119019605219364,
0.0042510987259... | |
issues when using CruiseControl and a large number of projects with lots of files?
I've some experience with using Star Team for continous integration - though using TeamCity, not CruiseControl. In our case, the regular connections from TeamCity to StarTeam barely register as a blip on our performance monitoring.
Have... | [
0.08867254853248596,
-0.19436123967170715,
0.05323309823870659,
0.3659083843231201,
0.28594788908958435,
-0.2221383899450302,
-0.004429912194609642,
0.24771253764629364,
-0.4198782742023468,
-0.590642511844635,
0.030842991545796394,
0.610390305519104,
-0.04867817088961601,
-0.3517981469631... | |
I have a big lump of binary data in a char[] array which I need to interpret as an array of packed 6-bit values.
I *could* sit down and write some code to do this but I'm thinking there has to be a good extant class or function somebody has written already.
What I need is something like:
```
int get_bits(char* data,... | [
0.1377546787261963,
0.11819294095039368,
0.005180723965167999,
-0.10776190459728241,
0.0025467975065112114,
0.32309746742248535,
0.28893738985061646,
-0.20202121138572693,
-0.2470214068889618,
-0.5099236369132996,
-0.12431976199150085,
0.3364797532558441,
-0.09529431164264679,
0.1989199966... | |
Marco posted, though I'm not entirely sure why he'd gather one bit at a time.
```
int get_bits(char* data, unsigned int bitOffset, unsigned int numBits) {
numBits = pow(2,numBits) - 1; //this will only work up to 32 bits, of course
data += bitOffset/8;
bitOffset %= 8;
return (*((int*)data) >> bitOffset... | [
0.29494985938072205,
-0.3325224816799164,
0.8194678425788879,
0.32936400175094604,
0.2674030065536499,
0.05543682351708412,
0.1755984127521515,
-0.5074136257171631,
-0.1792590171098709,
-0.38470569252967834,
-0.1468246877193451,
0.3909934461116791,
-0.3379826843738556,
-0.17135530710220337... | |
t[0];
t[0] = t[3];
t[3] = temp;
temp = t[1];
t[1] = t[2];
t[2] = temp;
return x;
}
``` | [
0.5482087731361389,
-0.2835235297679901,
-0.09512487053871155,
-0.29445314407348633,
-0.15032906830310822,
0.06972524523735046,
0.6101425886154175,
-0.5067487955093384,
-0.0013075349852442741,
-0.2925611436367035,
-0.5724732279777527,
0.7455206513404846,
-0.8131021857261658,
0.143144547939... | |
A few months ago I was introduced to the new [`DateTimeOffset`](http://msdn.microsoft.com/library/system.datetimeoffset.aspx) type and was glad [`DateTime`](http://msdn.microsoft.com/library/system.datetime.aspx)'s flaws with regard to time zones were finally taken care of.
However, I was left wondering if there were ... | [
0.18349474668502808,
-0.08881597965955734,
0.11311808973550797,
0.12070043385028839,
-0.023863868787884712,
-0.20919226109981537,
0.2960261106491089,
0.3999478220939636,
-0.4194715619087219,
-0.45137569308280945,
0.022087855264544487,
0.15198320150375366,
-0.2631380259990692,
0.04670995101... | |
and time rather than an *instant* in time. To be honest it's more often useful to represent just a time - e.g. "wake me up at 8am, regardless of timezone" - but date and time could be useful too.
I agree that for the vast majority of cases, `DateTimeOffset` is a better fit. It does strike me as odd that there isn't a ... | [
0.3502883017063141,
-0.3282313346862793,
0.47834834456443787,
0.22834864258766174,
0.052491359412670135,
0.09369644522666931,
-0.14005325734615326,
0.2883100211620331,
-0.4533954858779907,
-0.8782495856285095,
-0.25918063521385193,
0.23604650795459747,
0.3380040228366852,
0.277568191289901... | |
because you don't know when DST might kick in.)
If you want that kind of structure, I have a [very crude implementation in another answer](https://stackoverflow.com/questions/246498/creating-a-datetime-in-a-specific-time-zone-in-c-fx-35#246529). I'm sure it could be improved very easily :) | [
0.3786419928073883,
-0.3145213723182678,
0.41274556517601013,
0.23709526658058167,
0.42787227034568787,
-0.2850479781627655,
0.09869833290576935,
0.11383432149887085,
-0.3908308744430542,
-0.2553004324436188,
0.06440344452857971,
0.21990205347537994,
-0.14199857413768768,
-0.08976870030164... | |
Throughout or C# sourcecode we have a lot of comments that miss the actual content such like this:
```
/// <summary>
/// </summary>
```
or this:
```
/// <summary>
///
/// </summary>
```
or this:
```
/// <param Name="flag"></param>
```
Unfortunately Visual Studio does not generate warnings for this type of miss... | [
0.7123615741729736,
0.4609607756137848,
-0.17801354825496674,
0.08800480514764786,
-0.16471487283706665,
-0.2159685492515564,
0.3436136841773987,
-0.15942320227622986,
-0.36613571643829346,
-0.4033099114894867,
-0.2394527941942215,
0.35815075039863586,
-0.2922234535217285,
-0.1545616537332... | |
have any idea on how to achieve this?
ReSharper is the answer to this (as many other) shortcoming of Visual Studio. I have nothing but pity for anyone who does not use it. ;) | [
0.7568243741989136,
0.11951924860477448,
0.47685497999191284,
0.10649850219488144,
-0.13162153959274292,
-0.12882089614868164,
0.13543739914894104,
0.31936731934547424,
-0.12667328119277954,
-0.5242798924446106,
0.08401397615671158,
0.7565394639968872,
0.19957910478115082,
0.06944786012172... | |
`getopt()` is not behaving as I expect for short options.
eg: Invoking the below program with a missing parameter:
Valid Case: `testopt -d dir -a action -b build`
Error Case: `testopt -d -a action -b build`
This did not throw any error as I was expecting an error message operand missing for `-d`
* Is this a known ... | [
0.005306823179125786,
-0.03378630802035332,
0.02875056490302086,
-0.05102798342704773,
0.07218237221240997,
0.0792757123708725,
0.570543646812439,
-0.17456158995628357,
-0.21086570620536804,
-0.5605047345161438,
-0.2962527275085449,
0.734535813331604,
-0.5192618370056152,
-0.20608285069465... | |
int chr;
while ( ( chr = getopt(argc, argv, ":d:a:b:") ) != -1 )
{
switch(chr)
{
case 'a':
printf("Got a...\n"); | [
-0.025799475610256195,
-0.05382414162158966,
0.24508549273014069,
-0.5233744978904724,
0.2793084979057312,
0.09795050323009491,
0.23506096005439758,
-0.42176881432533264,
-0.15074561536312103,
-0.1561223417520523,
-0.6472445726394653,
0.6364105939865112,
-0.2872982621192932,
0.160376772284... | |
break;
case 'b':
printf("Got b...\n"); | [
-0.001074478030204773,
0.06443944573402405,
-0.2065926045179367,
-0.4661105275154114,
0.5388952493667603,
0.07114165276288986,
0.2537906765937805,
0.0779213160276413,
-0.3335796296596527,
-0.17606385052204132,
-0.8249300122261047,
0.3729948401451111,
-0.24723756313323975,
-0.05300994589924... | |
break;
case 'd':
printf("Got d...\n");
break;
case | [
-0.09084144979715347,
-0.09228499978780746,
-0.1809462606906891,
-0.2624054551124573,
0.6331561803817749,
0.08121798187494278,
0.2646256387233734,
0.0936216488480568,
-0.40031763911247253,
-0.27709001302719116,
-0.8482346534729004,
0.4339263141155243,
-0.22652967274188995,
-0.1012765690684... | |
':':
printf("Missing operand for %c\n", optopt);
break;
case '?': | [
-0.24206267297267914,
-0.08347069472074509,
-0.11729298532009125,
-0.26485103368759155,
0.4577525854110718,
0.2917616665363312,
0.24006354808807373,
0.0453893207013607,
0.03411100432276726,
-0.14937786757946014,
-0.819909930229187,
0.5469499230384827,
-0.46763163805007935,
-0.1625612527132... | |
printf("Unknown option %c\n", optopt);
break;
}
}
printf("execution over\n");
return 0;
}
```
`getopt()` thinks `-a` is an argument for `-d`, not an option.
Try `testopt -a action -b build -d` - it should complain about missing argument.
You need to check for `-d` ... | [
-0.2110261470079422,
-0.20886456966400146,
0.03901736065745354,
-0.2747476100921631,
0.46416711807250977,
0.12060074508190155,
0.3968508839607239,
-0.12890851497650146,
-0.20379100739955902,
-0.44808292388916016,
-0.6660625338554382,
0.7075636982917786,
-0.4338717758655548,
-0.231822803616... | |
that `optarg` has valid value - the one without dash in the beginning. | [
-0.18640820682048798,
-0.12181172519922256,
0.18585553765296936,
-0.12782754004001617,
-0.17739225924015045,
-0.0678299143910408,
0.06182847544550896,
0.25771191716194153,
0.0989651307463646,
-0.3910926282405853,
-0.36657238006591797,
0.5148953795433044,
-0.01893576607108116,
-0.3860540390... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.