text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
in subfolders during the bootstrap phase then you can set the following property in the appSettings of the tfsbuildserver.exe.config file on the build agent machines (located in %ProgramFiles%\Visual Studio 9.0\Common7\IDE\PrivateAssemblies)
```
<add key="ConfigurationFolderRecursionType" value="Full" />
```
Note th... | [
0.2714044749736786,
0.1486038863658905,
0.36131975054740906,
-0.09141077846288681,
0.2008771002292633,
-0.13561537861824036,
0.4853496253490448,
-0.059266023337841034,
-0.34829583764076233,
-0.9388663172721863,
0.08679220825433731,
0.8734859824180603,
-0.12596802413463593,
0.06433840095996... | |
I know there is a way to add a IE control, how do you add a chrome control...? Is it even possible right now?
I'm need this because of the fast javascript VM found in chrome.
I searched around and I don't think Google Chrome registers itself as a Windows COM+ component. I think you're out of luck. | [
0.5898220539093018,
0.12935815751552582,
0.377532422542572,
0.4228350520133972,
-0.06719280779361725,
-0.2718644142150879,
0.19103731215000153,
0.24723000824451447,
0.04239371791481972,
-0.7522220015525818,
0.2898157238960266,
0.5614486932754517,
-0.09624219685792923,
0.10663100332021713,
... | |
When a C# WinForms textbox receives focus, I want it to behave like your browser's address bar.
To see what I mean, click in your web browser's address bar. You'll notice the following behavior:
1. Clicking in the textbox should select all the text if the textbox wasn't previously focused.
2. Mouse down and drag in ... | [
0.3567068576812744,
-0.054500456899404526,
0.5802459716796875,
-0.24456487596035004,
-0.1515084058046341,
-0.2176274061203003,
0.23468108475208282,
-0.3746315538883209,
0.03249092027544975,
-0.6429646015167236,
-0.14058949053287506,
1.0834964513778687,
-0.31098729372024536,
-0.388859957456... | |
read the following before answering!** Thanks guys. :-)
> **Calling .SelectAll() during
> the .Enter or .GotFocus events won't
> work** because if the user clicked the
> textbox, the caret will be placed
> where he clicked, thus deselecting all
> text.
>
>
> **Calling .SelectAll() during the .Click event won't ... | [
0.1191752478480339,
-0.13247287273406982,
0.6353935599327087,
-0.1936940997838974,
-0.09923473745584488,
0.01210037712007761,
0.5858450531959534,
-0.5113158226013184,
-0.04776434227824211,
-0.6450185775756836,
-0.45912814140319824,
1.018904685974121,
-0.2621816396713257,
-0.280542284250259... | |
of all, thanks for answers! 9 total answers. Thank you.
Bad news: all of the answers had some quirks or didn't work quite right (or at all). I've added a comment to each of your posts.
Good news: I've found a way to make it work. This solution is pretty straightforward and seems to work in all the scenarios (mousing ... | [
-0.08038491755723953,
-0.14464037120342255,
0.7135215997695923,
0.1353403627872467,
-0.13691580295562744,
0.024530140683054924,
0.5083447694778442,
0.04371282458305359,
-0.12509922683238983,
-0.6612721681594849,
-0.45171740651130676,
0.4329233169555664,
-0.38397976756095886,
-0.10697100311... | |
// This makes tabbing to the textbox give focus.
if (MouseButtons == MouseButtons.None)
{
this.textBox1.SelectAll();
alreadyFocused = true;
}
}
void textBox1_MouseUp(object sender, MouseEventArgs e)
{
// Web browsers like Google Chrome select the text on mouse up.
// They only do it... | [
0.03077729418873787,
-0.18489857017993927,
0.6781942844390869,
-0.3114072382450104,
0.07738718390464783,
0.10806082934141159,
0.3472767174243927,
-0.0713443011045456,
-0.3077365458011627,
-0.5133680105209351,
-0.543230414390564,
0.7389351725578308,
-0.4220620393753052,
-0.21862642467021942... | |
{
alreadyFocused = true;
this.textBox1.SelectAll();
}
}
```
As far as I can tell, this causes a textbox to behave exactly like a web browser's address bar.
Hopefully this helps the next guy who tries to solve this deceptively simple problem.
Thanks again, guys, for all your answers that helped l... | [
0.5293229818344116,
0.2207234501838684,
0.3556581735610962,
0.15223294496536255,
0.04005326330661774,
-0.34101539850234985,
0.5908264517784119,
0.4805071949958801,
-0.11068659275770187,
-0.6158671975135803,
-0.14443999528884888,
0.599409282207489,
-0.08441715687513351,
-0.02156350016593933... | |
I need to get the value of the 'test' attribute in the xsl:when tag, and the 'name' attribute in the xsl:call-template tag. This xpath gets me pretty close:
```
..../xsl:template/xsl:choose/xsl:when
```
But that just returns the 'when' elements, not the exact attribute values I need.
Here is a snippet of my XML:
... | [
0.6653000712394714,
0.1688023805618286,
-0.18682409822940826,
0.3864523768424988,
-0.3924838602542877,
-0.04754292219877243,
-0.2663441002368927,
-0.46854010224342346,
0.22119617462158203,
-0.23932349681854248,
0.19407601654529572,
0.6048014163970947,
-0.13735747337341309,
-0.2082331180572... | |
to match generally, then you can use:
```
.../xsl:template/xsl:choose/xsl:when/xsl:call-template/@name
``` | [
0.25658196210861206,
-0.015732211992144585,
0.17019106447696686,
-0.050546370446681976,
-0.04785298928618431,
-0.3135423958301544,
-0.13829658925533295,
-0.165712371468544,
0.12974674999713898,
-0.5602747201919556,
0.020036976784467697,
0.4294814467430115,
-0.35221126675605774,
0.119358368... | |
What are all the valid self-closing elements (e.g. <br/>) in XHTML (as implemented by the major browsers)?
I know that XHTML technically allows any element to be self-closed, but I'm looking for a list of those elements supported by all major browsers. See <http://dusan.fora.si/blog/self-closing-tags> for examples of ... | [
0.04208483174443245,
0.43037286400794983,
0.47580912709236145,
-0.3243296146392822,
-0.32334819436073303,
-0.26190999150276184,
0.2930808663368225,
-0.02778841368854046,
-0.20133401453495026,
-0.43269434571266174,
-0.4854365885257721,
0.5674125552177429,
-0.46711069345474243,
-0.0802289769... | |
decision about ignoring DOCTYPE](https://lists.w3.org/Archives/Public/www-html/2000Sep/0024.html):
> The HTML WG has discussed this issue: the intention was to allow old
> (HTML-only) browsers to accept XHTML 1.0 documents by following the
> guidelines, and serving them as text/html. Therefore, documents served as
> t... | [
0.32057395577430725,
0.45079076290130615,
0.6175397038459778,
-0.19220726191997528,
-0.3570396304130554,
-0.6196573376655579,
0.40459999442100525,
-0.01507339347153902,
-0.1301945000886917,
-0.437078058719635,
-0.48817965388298035,
0.29127824306488037,
-0.31796836853027344,
0.0312045030295... | |
getting by on the error handling of HTML parsers. All those “Valid XHTML 1.0!” links on the web are really saying “Invalid HTML 4.01!”.
---
To test whether you have real XHTML or invalid HTML with XHTML's DOCTYPE, put this in your document:
```
<span style="color:green"><span style="color:red"/>
If it's red, it's ... | [
0.4523535668849945,
0.11751918494701385,
0.5497892498970032,
0.005367972422391176,
-0.33767032623291016,
-0.4232597351074219,
0.4682382345199585,
-0.09706875681877136,
-0.38794371485710144,
-0.5962280035018921,
-0.24319782853126526,
0.5832217335700989,
-0.23610961437225342,
-0.215321749448... | |
invalid.
In HTML5/XHTML5 this hasn't changed, and the distinction is even clearer, because you don't even have additional `DOCTYPE`. `Content-Type` is the king.
---
For the record, the XHTML spec allows any element to be self-closing by making XHTML an [XML application](https://www.w3.org/TR/REC-xml/#sec-starttags):... | [
0.08034314215183258,
0.2841102182865143,
0.5540198683738708,
-0.11407356709241867,
-0.15789289772510529,
-0.4886217415332794,
0.26815152168273926,
0.11517804861068726,
-0.46845895051956177,
-0.23252950608730316,
-0.5797996520996094,
0.16770921647548676,
-0.48955169320106506,
0.456367075443... | |
C# question (.net 3.5). I have a class, ImageData, that has a field ushort[,] pixels. I am dealing with proprietary image formats. The ImageData class takes a file location in the constructor, then switches on file extension to determine how to decode. In several of the image files, there is a "bit depth" field in the ... | [
0.5417817831039429,
0.05814672261476517,
0.42691880464553833,
-0.08657911419868469,
-0.19605425000190735,
0.05632035434246063,
-0.01398792676627636,
-0.3007577657699585,
-0.10870057344436646,
-0.4452207088470459,
-0.019458694383502007,
0.7314773797988892,
-0.4097636342048645,
-0.2016943395... | |
determined at runtime. I want to do this after I read the bit depth out of the header and before I copy the pixel data into memory. Any ideas?
To boil down your problem, you want to be able to have a class that has a **ushort[,] pixels** field (16-bits per pixel) sometimes and a **uint32[,] pixels** field (32-bits per ... | [
0.2877085506916046,
-0.35603657364845276,
0.42507636547088623,
0.22312188148498535,
0.08072654157876968,
0.08442405611276627,
-0.11135682463645935,
-0.26063206791877747,
-0.10216104984283447,
-0.8098759055137634,
0.2519371211528778,
0.6443037390708923,
-0.45361247658729553,
-0.185536652803... | |
of overhead, is tricky to get right and even trickier to determine if its right. Alternately you could create proxy classes for your pixel data (which would contain the ushort[,] or uint32[,] arrays and would have all the necessary accessors to be useful). The downside there is that you would likely end up with a lot o... | [
0.3506697118282318,
0.049172621220350266,
0.24465182423591614,
0.5184697508811951,
-0.2560844123363495,
0.04192019999027252,
0.07702095061540604,
-0.20117250084877014,
-0.09360510110855103,
-0.7124203443527222,
0.14474719762802124,
0.44290125370025635,
-0.6664084196090698,
-0.0312206260859... | |
ImageData is the base class, ImageData16bpp and ImageData32bpp are sub-classes, static method ImageData.Create(string imageFilename) is the factory method which creates either ImageData16bpp or ImageData32bpp depending on the header data. For example:
```
public static ImageData Create(string imageFilename)
{
// ..... | [
0.10374756902456284,
-0.388143390417099,
0.6027427315711975,
-0.21246489882469177,
-0.1169322207570076,
0.2627165913581848,
-0.011535334400832653,
-0.44678324460983276,
-0.36628463864326477,
-0.4755435883998871,
-0.3205890953540802,
0.4800821840763092,
-0.5843896865844727,
0.24788469076156... | |
What is the best available tool to monitor the memory usage of my C#/.Net windows service over a long period of time. As far as I know, tools like perfmon can monitor the memory usage over a short period of time, but not graphically over a long period of time. I need trend data over days, not seconds.
To be clear, I w... | [
0.36488622426986694,
0.12772810459136963,
0.2924695611000061,
0.20858974754810333,
0.25770890712738037,
-0.03464648500084877,
-0.06397561728954315,
0.25857412815093994,
-0.4242817461490631,
-0.6887400150299072,
0.20834046602249146,
0.5347703695297241,
0.16148006916046143,
0.146119177341461... | |
large graph.
Perfmon in my opinion is one of the best tools to do this but make sure you properly configure the sampling interval according to the time you wish to monitor.
For example if you want to monitor a process:
* for 1 hour : I would use 1 second intervals (this will generate 60\*60 samples)
* for 1 day : I w... | [
0.15300646424293518,
-0.26506590843200684,
0.5086119771003723,
-0.0409013032913208,
-0.20841820538043976,
0.13599057495594025,
0.01230979897081852,
-0.31489473581314087,
-0.6164038181304932,
-0.7327576279640198,
0.18393218517303467,
0.3339318633079529,
-0.13042671978473663,
0.3057787120342... | |
I've been somewhat spoiled using Eclipse and java. I started using vim to do C coding in a linux environment, is there a way to have vim automatically do the proper spacing for blocks?
So after typing a { the next line will have 2 spaces indented in, and a return on that line will keep it at the same indentation, and... | [
0.8429928421974182,
-0.21968592703342438,
0.4832964241504669,
0.09674020111560822,
0.0012718449579551816,
-0.0223967544734478,
0.13536280393600464,
-0.08096479624509811,
0.006115726660937071,
-0.8325327038764954,
0.03378695994615555,
0.6293575167655945,
-0.07226361334323883,
0.094301834702... | |
I'm working with PostSharp to intercept method calls to objects I don't own, but my aspect code doesn't appear to be getting called. The documentation seems pretty lax in the Silverlight area, so I'd appreciate any help you guys can offer :)
I have an attribute that looks like:
```
public class LogAttribute : OnMetho... | [
-0.09736189991235733,
0.0956522673368454,
0.3135433495044708,
0.02022157795727253,
0.10794354230165482,
-0.07034222036600113,
0.18489935994148254,
-0.23357252776622772,
-0.2922840714454651,
-0.5503321886062622,
-0.09715905040502548,
0.6017482876777649,
-0.22127312421798706,
-0.013798951171... | |
am I missing? Method calls under matching attribute targets don't appear to function.
**This is not possible with the present version of PostSharp.**
PostSharp works by transforming assemblies prior to being loaded by the CLR. Right now, in order to do that, two things have to happen:
* The assembly must be about to ... | [
0.3869885504245758,
-0.07249408960342407,
0.13434697687625885,
-0.0025547221302986145,
0.05276431888341904,
-0.1165325790643692,
0.229282408952713,
-0.2701682448387146,
-0.3169802129268646,
-0.23959894478321075,
-0.1223008781671524,
0.6352687478065491,
-0.44134825468063354,
-0.159947693347... | |
these two limitations](http://www.postsharp.org/blog/announcing-postsharp-1.5-ctp-3), but it is the second that's really the problem. This is, however, [a heavily requested feature](http://www.postsharp.org/blog/using-postsharp-at-runtime), so keep your eyes peeled:
> Users often ask if it is possible to use PostSharp... | [
0.26663777232170105,
-0.02992081642150879,
0.33840861916542053,
0.0761195495724678,
0.07566944509744644,
-0.47893714904785156,
0.2673703730106354,
-0.19974569976329803,
-0.4935382604598999,
-0.7260926365852356,
-0.22765885293483734,
0.5506640076637268,
-0.18067435920238495,
-0.077160425484... | |
yes! **Unfortunately, the long answer is more complex.**
### Runtime/third-party aspect gotchas
The author also proceeds to outline some of the problems that happen if you allow modification at runtime:
> So now, what are the gotchas?
>
>
> * **Plugging the bootstrapper.** If your code is hosted (for instance in
>... | [
0.38378483057022095,
0.0684339702129364,
0.677331268787384,
0.0466485470533371,
-0.14802810549736023,
0.06182838976383209,
0.11269313842058182,
-0.09977976977825165,
-0.5998998284339905,
-0.8015354871749878,
-0.011174964718520641,
0.4098813533782959,
-0.3304961621761322,
0.0841394513845443... | |
you may need to create a new
> application domain for the transformed
> application, and put transformed
> assemblies in its binary path. It's
> maybe not a big problem.
> * **Strong names.** Ough. If you modify an assembly at runtime, you will have to
> remove its strong name. Will it work?
> Yes, mostly. Of course, y... | [
0.1093660369515419,
0.17591221630573273,
0.23690170049667358,
0.0513354130089283,
-0.1271703988313675,
-0.06286263465881348,
0.451455295085907,
-0.18693754076957703,
-0.35299140214920044,
-0.9392990469932556,
-0.2572375535964966,
0.3411010801792145,
-0.647489070892334,
0.13911019265651703,... | |
find them
> and transform them. So here we have a
> real limitation: there cannot be
> "loose references" to strongly named
> assemblies: we are only able to
> transform real references.
> * **LoadFrom.** If any assembly uses Assembly.LoadFrom, Assembly.LoadFile
> or Assembly.LoadBytes, our
> bootstrapper is skipped. | [
0.2215592861175537,
-0.11571833491325378,
0.25274649262428284,
0.004118186421692371,
0.11442126333713531,
-0.3531498312950134,
0.6001052260398865,
-0.20315071940422058,
-0.2166205495595932,
-0.9159217476844788,
-0.22960154712200165,
0.6225719451904297,
-0.5122370719909668,
0.16851587593555... | |
I am developing a web app that will be hit frequently by mobile browsers. I am wondering if there is a way to get enough information from the browser request to lookup position data (triangulation or GPS) **Not from the request directly, of course.** A colleague suggested there some carriers supply a unique identifier ... | [
0.4361017644405365,
0.07110900431871414,
0.3019852936267853,
0.258779913187027,
0.21823197603225708,
0.2108757495880127,
-0.17671164870262146,
0.2526606619358063,
-0.06833787262439728,
-0.6155235767364502,
0.11215875297784805,
0.2118528038263321,
-0.06038989871740341,
-0.06617234647274017,... | |
very approximate. Obviously this is app candy, e.g. if the data is not available the app doesn't really care...
Or perhaps a web service by carrier that will provide triangulated data by IP?
Google has [ClientLocation](http://code.google.com/apis/ajax/documentation/#ClientLocation) as part of their AJAX APIs. You'll n... | [
-0.09202233701944351,
0.2459932416677475,
0.5526138544082642,
0.2409185916185379,
0.13739126920700073,
0.09889008849859238,
-0.08748235553503036,
0.3925274610519409,
-0.1498011350631714,
-0.47686001658439636,
0.13459716737270355,
0.39811044931411743,
-0.19865813851356506,
-0.19912207126617... | |
I am trying to get started writing scalable, telecom-grade applications with Asterisk and Ruby. I had originally intended to use the Adhearsion framework for this, but it does not have the required maturity and its documentation is severely lacking. AsteriskRuby seems to be a good alternative, as it's well documented a... | [
0.3968258202075958,
0.21990668773651123,
0.4850445091724396,
0.14635907113552094,
-0.11410218477249146,
-0.03914547711610794,
0.5115590691566467,
-0.07003165781497955,
0.12218748778104782,
-0.49335289001464844,
0.0013323471648618579,
0.530947744846344,
-0.12509313225746155,
-0.054887935519... | |
here:
<http://adhearsion.com>
<http://docs.adhearsion.com>
<http://api.adhearsion.com> | [
0.2859385907649994,
0.3532021641731262,
-0.1185569167137146,
-0.21322566270828247,
-0.24716046452522278,
0.7041760683059692,
0.7416990995407104,
0.028917772695422173,
0.08682023733854294,
-0.4446505308151245,
-0.3117411136627197,
0.4338444173336029,
-0.01861855387687683,
-0.112671844661235... | |
I've been using **Codegear RAD Studio** for a over a year now but since the **"May08 Help Update"** the help system no longer works. If I open the help the contents pane is entirely blank. If I hit F1 I get the following error: **"Unable to interpret the specified HxC file."**
I've searched for the answer using searc... | [
0.04864532873034477,
0.3046727478504181,
0.3003182113170624,
-0.20563650131225586,
-0.2257508933544159,
0.14740245044231415,
0.8475328683853149,
0.25067228078842163,
-0.23601074516773224,
-0.5762074589729309,
-0.04897157847881317,
0.6131691932678223,
-0.05207516998052597,
0.232959210872650... | |
complete uninstall/reinstall. Alas.
Be sure to check <http://docs.codegear.com> for the latest in Delphi help. On that site you can also download the Delphi 2007 help in various forms, including PDF and CHM. | [
-0.2937750220298767,
-0.2353077381849289,
0.1752399206161499,
-0.04847533628344536,
-0.09702371060848236,
-0.3098798394203186,
0.31207337975502014,
-0.11255380511283875,
-0.14965768158435822,
-0.3625442087650299,
-0.7066096067428589,
0.6387816071510315,
-0.16837941110134125,
-0.11700437963... | |
What is `std::pair` for, why would I use it, and what benefits does `boost::compressed_pair` bring?
[`std::pair`](http://en.cppreference.com/w/cpp/utility/pair) is a data type for grouping two values together as a single object. [`std::map`](http://en.cppreference.com/w/cpp/container/map) uses it for key, value pairs.
... | [
0.016036739572882652,
-0.10482924431562424,
0.051223646849393845,
-0.08011993020772934,
-0.4322930574417114,
0.01567240245640278,
-0.031430475413799286,
-0.33219146728515625,
-0.3611227869987488,
-0.4885592758655548,
-0.20249450206756592,
-0.05429986119270325,
-0.46852076053619385,
-0.0285... | |
What's the best practice for using a `switch` statement vs using an `if` statement for 30 `unsigned` enumerations where about 10 have an expected action (that presently is the same action). Performance and space need to be considered but are not critical. I've abstracted the snippet so don't hate me for the naming conv... | [
0.19842477142810822,
-0.15871216356754303,
0.18920660018920898,
-0.13397228717803955,
0.18775437772274017,
0.1919962614774704,
0.1796494722366333,
-0.4454725980758667,
-0.17617957293987274,
-0.2963152229785919,
-0.09740400314331055,
0.404848575592041,
-0.055730707943439484,
-0.196472927927... | |
// intentional fall-through
case ERROR_10 : // intentional fall-through
case ERROR_15 : // intentional fall-through
case ERROR_16 : // intentional fall-through
case ERROR_20 :
{
fire_special_event();
}
break;
default:
{
// error codes that require no additional action
}
break;
... | [
-0.13410831987857819,
0.061266809701919556,
-0.022581690922379494,
-0.15045394003391266,
0.14796632528305054,
0.2520262897014618,
0.6138393878936768,
-0.6274322271347046,
-0.23425529897212982,
-0.19553406536579132,
-0.5244884490966797,
0.3132258653640747,
-0.12772798538208008,
0.1628357023... | |
(ERROR_15 == numError) ||
(ERROR_16 == numError) ||
(ERROR_20 == numError))
{
fire_special_event();
}
```
Use switch.
In the worst case the compiler will generate the same code as a if-else chain, so you don't lose anything. If in doubt put the most common cases first into the switch statement.
In the be... | [
0.20042504370212555,
-0.10232403874397278,
-0.1945231854915619,
0.04920397326350212,
-0.11915208399295807,
-0.08401166647672653,
0.2722337543964386,
-0.4618671238422394,
-0.2249934822320938,
-0.6342120170593262,
-0.32543453574180603,
0.6598942875862122,
-0.29537931084632874,
-0.23271344602... | |
I often refactor code first by creating an inner class inside the class I'm working on--When I'm done, I move the entire thing into a new class file. This makes refactoring code into the new class extremely easy because A) I'm only dealing with a single file, and B) I don't create new files until I have a pretty good i... | [
0.41514045000076294,
-0.18577466905117035,
-0.20440459251403809,
0.21399079263210297,
-0.1263355016708374,
0.22191500663757324,
-0.000670152367092669,
-0.10824471712112427,
-0.24448822438716888,
-0.6230008006095886,
0.06412967294454575,
0.35061952471733093,
0.11029856652021408,
0.033672481... | |
can figure out the filename from the class name and the directory from the package.
This seems like a trivial refactor and really obvious, but I can't figure out the keystrokes/gestures/whatever to make it happen. I've tried dragging, menus, context menus, and browsing through the keyboard shortcuts.
Anyone know this... | [
0.2752695381641388,
-0.12627869844436646,
0.12058880925178528,
0.245951309800148,
0.3740524649620056,
0.005179979372769594,
0.15127629041671753,
0.1420818418264389,
-0.3927984833717346,
-0.5747325420379639,
0.05365030840039253,
0.3295176327228546,
0.030159849673509598,
0.11529563367366791,... | |
whole thing in a single step.
I'm sorry I gave the wrong answer before. I rechecked, and it didn't do quite want you want. I did find a solution for you though, again, in 3.4.
Highlight the class, do a copy CTRL-C or cut CTRL-X, click on the package you want the class do go into, and do a paste, CTRL-V. Eclipse will a... | [
0.2037307173013687,
-0.5886080265045166,
0.18442402780056,
0.19191117584705353,
-0.22932127118110657,
0.015263376757502556,
0.22451037168502808,
-0.1413004845380783,
-0.23335303366184235,
-0.4754798114299774,
0.016163727268576622,
0.6635785698890686,
-0.39072471857070923,
-0.00396683299914... | |
Is the a VS2005 C++ compiler flag like the Xmx???M java flag so I can limit the heap size of my application running on Windows.
I need to limit the heap size so I can fill the memory to find out the current free memory. (The code also runs on an embedded system where this is the best method to get the memory usage)
Y... | [
0.25195738673210144,
-0.01989121176302433,
0.07724008709192276,
0.14952115714550018,
-0.32979005575180054,
-0.2965439558029175,
0.31937021017074585,
0.050496287643909454,
-0.3551817238330841,
-0.6129515767097473,
0.12663379311561584,
0.45279839634895325,
-0.45907169580459595,
0.06627098470... | |
I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Windows has the **runas** command but this won't work for an automated script ... | [
0.5271973609924316,
0.33807358145713806,
0.20054471492767334,
-0.2382630556821823,
0.2534914016723633,
-0.2774445116519928,
0.548997163772583,
-0.0004182632255833596,
0.23367834091186523,
-0.6166405081748962,
0.13051699101924896,
0.9008823037147522,
-0.3134508430957794,
0.10109471529722214... | |
Any other tweaks for making emacs as vim-like as possible would be appreciated as well.
Addendum: The main reason I don't just use vim is that I love how emacs lets you open a file in two different frames [ADDED: sorry, this was confusing: I mean separate *windows*, which emacs calls "frames"]. It's like making a vert... | [
0.46263784170150757,
-0.1407773643732071,
0.5324851274490356,
0.06986913084983826,
-0.28676965832710266,
-0.035072095692157745,
0.22832155227661133,
0.11621875315904617,
-0.6167038679122925,
-0.7622008323669434,
0.1570529192686081,
0.5371071696281433,
-0.33147430419921875,
0.56527435779571... | |
I looked for the name of a procedure, which applies a tree structure of procedures to a tree structure of data, yielding a tree structure of results - all three trees having the same structure.
Such a procedure might have the signature:
```
(map-tree data functree)
```
Its return value would be the result of eleme... | [
-0.24304375052452087,
-0.0249156691133976,
0.2413085699081421,
-0.07251779735088348,
-0.06668995320796967,
0.17693676054477692,
-0.06963233649730682,
-0.4973496198654175,
-0.24274957180023193,
-0.5453757643699646,
-0.15022626519203186,
0.5113328695297241,
-0.40718239545822144,
-0.243224114... | |
'(((aa . ab) (bb . bc)) (cc . (cd . ce)))
'((car cdr) cadr))
```
yields the result
```
((aa bc) cd)
```
However I did not find such a function in the SLIB documentation, which I consulted.
Does such a procedure already exist?
If not, what would be a suitable name for the procedure, and how would you ord... | [
-0.057159341871738434,
0.31085753440856934,
0.40474268794059753,
-0.1367972195148468,
-0.08738633990287781,
-0.0327695831656456,
-0.11208470165729523,
-0.431933730840683,
-0.2758466303348541,
-0.4812663793563843,
-0.13580091297626495,
0.5770660042762756,
-0.48569831252098083,
-0.0867581292... | |
func data)
(if (list? func)
(map map-traversing func data)
(func data)))
```
Using your sample data, we have:
```
(map-traversing `((,car ,cdr) ,cadr) '(((aa . ab) (bb . bc)) (cc cd . ce)))
```
The second sample requires SRFI 26. (Allows writing `(cut * 2 <>)` instead of `(lambda (x) (* 2 x))`.)
```... | [
-0.08524595946073532,
0.16171570122241974,
0.1800120323896408,
0.11180935800075531,
-0.21345838904380798,
-0.20344099402427673,
-0.09390999376773834,
-0.32426589727401733,
-0.2544589936733246,
-0.42278218269348145,
-0.3412573039531708,
0.6713591814041138,
-0.3166115880012512,
-0.2318038344... | |
What is the maximum value of an int in ChucK? Is there a symbolic constant for it?
New in the latest version!
```
<<<Math.INT_MAX>>>;
```
For reference though, it uses the "`long`" keyword in C++ to represent integers.
So on 32-bit computers the max should be `0x7FFFFFFF`, or `2147483647`.
On 64-bit computers it wil... | [
0.10968752205371857,
0.14611156284809113,
-0.04957476630806923,
0.03788725659251213,
-0.02364605851471424,
0.44583290815353394,
-0.11136990040540695,
-0.22447937726974487,
-0.2845921218395233,
-0.20854569971561432,
0.17737367749214172,
0.31565380096435547,
-0.019177833572030067,
0.02549339... | |
I have a huge file, where I have to insert certain characters at a specific location. What is the easiest way to do that in C# without rewriting the whole file again.
Filesystems do not support "inserting" data in the middle of a file. If you really have a need for a file that can be written to in a sorted kind of way,... | [
0.5609042048454285,
0.23754650354385376,
-0.28111979365348816,
0.0158014465123415,
0.2698865532875061,
-0.10417332500219345,
-0.11598203331232071,
0.15965281426906586,
-0.2051837295293808,
-0.5727906823158264,
0.0025276881642639637,
0.2721676826477051,
-0.09058532863855362,
0.1121794208884... | |
only option is to rewrite the file, at least from the insertion point up to the end.
I would look at the [FileStream](http://msdn.microsoft.com/en-us/library/system.io.filestream(VS.80).aspx) class to do random I/O in C#. | [
0.07492860406637192,
-0.018349120393395424,
0.3043113648891449,
0.06864132732152939,
0.48043206334114075,
-0.013959833420813084,
0.07741333544254303,
0.022624872624874115,
-0.166001558303833,
-0.6415737271308899,
-0.29852908849716187,
0.48955032229423523,
-0.09835080057382584,
-0.036842867... | |
Hi i need to generate 9 digit unique account numbers. Here is my pseudocode:
```
function generateAccNo()
generate an account number between 100,000,000 and 999,999,999
if the account number already exists in the DB
call generateAccNo() /* recursive call */
else
return new accout numb... | [
-0.11536873877048492,
0.14238473773002625,
0.7260240316390991,
-0.03535197675228119,
-0.08394929021596909,
0.13140331208705902,
0.39431285858154297,
-0.16691279411315918,
-0.08907322585582733,
-0.20526272058486938,
0.15303689241409302,
0.4585776627063751,
-0.07435894757509232,
0.0861960798... | |
under apache)?
Is this an acceptable way to tackle this problem?
Thanks for your input.
You realize this could very well cause a stack overflow, right? As the number of customesr increases, the probability of not finding a an acceptable account number increases.
Also, why can't you just do sequential account number... | [
0.4177665114402771,
0.005351834464818239,
-0.1071866899728775,
0.45701584219932556,
-0.07022743672132492,
-0.41557613015174866,
0.6445184946060181,
-0.3305593430995941,
-0.47983109951019287,
-0.2315751016139984,
0.29136112332344055,
0.5829133987426758,
-0.22256934642791748,
-0.195856124162... | |
infinitely) and it will makes tons of expensive calls to the database.
**You should really consider some other approach:**
I strongly recommend just incrementing the customer number every time you create a customer. In fact, if you set up your db properly (with auto increment on the id column), you won't even have... | [
0.4030989110469818,
-0.08334222435951233,
0.26936718821525574,
-0.03904169425368309,
0.1856030821800232,
-0.028804883360862732,
0.1383516639471054,
-0.17167380452156067,
-0.2261296957731247,
-0.6287863850593567,
0.07685259729623795,
0.9058085083961487,
-0.1866244673728943,
0.17953503131866... | |
I need to run an equipment audit and to do that I need to obtain the Windows PC, monitor etc. serial numbers.
So I faced with going to each PC and manually writing down the numbers.
Is there a way I can get this programmatically so each user can run a small program and email me the results?
If this information is any... | [
0.7177473306655884,
0.19384221732616425,
0.4503495991230011,
0.1143195703625679,
0.3362925946712494,
-0.14054621756076813,
0.025508981198072433,
-0.30256322026252747,
-0.3537667691707611,
-0.34325963258743286,
0.431840181350708,
0.4339843988418579,
0.21590812504291534,
0.2347327470779419,
... | |
I'm looking for an extremely fast atof() implementation on IA32 optimized for US-en locale, ASCII, and non-scientific notation. The windows multithreaded CRT falls down miserably here as it checks for locale changes on every call to isdigit(). Our current best is derived from the best of perl + tcl's atof implementatio... | [
-0.0038696846459060907,
0.1341363936662674,
0.27753886580467224,
0.21050193905830383,
-0.05523892492055893,
-0.037196215242147446,
0.3140246272087097,
0.04222353920340538,
0.02099069021642208,
-0.8006910085678101,
0.03492574021220207,
0.5597251057624817,
-0.19328293204307556,
0.18085974454... | |
Non x86 assembly based solutions are also welcome.
Clarifications based upon initial answers:
Inaccuracies of ~2 ulp are fine for this application.
The numbers to be converted will arrive in ascii messages over the network in small batches and our application needs to convert them in the lowest latency possible.
W... | [
0.16761593520641327,
0.061886973679065704,
0.2253304123878479,
0.19607625901699066,
0.05579395964741707,
-0.03501508757472038,
0.32978174090385437,
-0.04837482422590256,
-0.34292545914649963,
-0.5781984925270081,
-0.1732987016439438,
0.6346315145492554,
-0.08477131277322769,
-0.10875470936... | |
tolerate an ulp or two of error (and more than that for subnormals), the sort of approach proposed by cruzer's can work and may be faster, but it definitely will not produce <0.5ulp output. You will do better accuracy-wise to compute the integer and fractional parts separately, and compute the fraction at the end (e.g.... | [
-0.18604776263237,
0.049471110105514526,
0.7728885412216187,
-0.0800589844584465,
-0.1525944173336029,
0.1294558346271515,
0.3394172787666321,
-0.5547180771827698,
-0.11808086186647415,
-0.6783835887908936,
0.20073002576828003,
0.7568846940994263,
-0.0597279891371727,
-0.22136639058589935,... | |
integers instead of floats.
The BCD instructions haven't been implemented in hardware since (IIRC) the 286, and are simply microcoded nowadays. They are unlikely to be particularly high-performance. | [
0.11217265576124191,
0.2430504560470581,
0.14334984123706818,
0.17973539233207703,
-0.02531803771853447,
-0.022758454084396362,
-0.18729780614376068,
-0.05843432620167732,
-0.15513543784618378,
-0.03673612326383591,
0.2065775990486145,
0.0676555335521698,
-0.30487608909606934,
0.0898247882... | |
When asking about [common undefined behavior in C](https://stackoverflow.com/questions/98340/what-are-the-common-undefinedunspecified-behavior-for-c-that-you-run-into), people sometimes refer to the strict aliasing rule.
What are they talking about?
A typical situation where you encounter strict aliasing problems is... | [
0.23966246843338013,
-0.14716468751430511,
-0.04085594043135643,
-0.04327051714062691,
0.07625292241573334,
-0.46100103855133057,
0.38751375675201416,
0.21750250458717346,
-0.396156370639801,
-0.293001264333725,
-0.1696697473526001,
0.49504658579826355,
-0.44740983843803406,
0.194489344954... | |
two incompatible pointers pointing to the same chunk of memory. I might then naively code something like this:
```
typedef struct Msg
{
unsigned int a;
unsigned int b;
} Msg;
void SendWord(uint32_t);
int main(void)
{
// Get a 32-bit buffer from the system
uint32_t* buff = malloc(sizeof(Msg));
//... | [
0.16291727125644684,
-0.013652856461703777,
0.3368666470050812,
-0.15531113743782043,
0.09424863755702972,
0.046636320650577545,
0.5364125370979309,
-0.2581072449684143,
-0.06608430296182632,
-0.4825037717819214,
0.06920867413282394,
0.5864811539649963,
-0.5425393581390381,
0.1690928339958... | |
msg->a = i;
msg->b = i+1;
SendWord(buff[0]);
SendWord(buff[1]);
}
}
```
The strict aliasing rule makes this setup illegal: dereferencing a pointer that aliases an object that is not of a [compatible type](http://en.cppreference.com/w/c/language/type) or one of the other types allowed by... | [
0.41904789209365845,
0.16392704844474792,
0.40882718563079834,
-0.09898022562265396,
0.2582452893257141,
-0.5710466504096985,
0.7452264428138733,
-0.18768203258514404,
-0.3220076858997345,
-0.14938507974147797,
-0.3267689347267151,
0.4818604290485382,
-0.4493284523487091,
0.175541788339614... | |
you run the code.
(GCC appears somewhat inconsistent in its ability to give aliasing warnings, sometimes giving us a friendly warning and sometimes not.)
To see why this behavior is undefined, we have to think about what the strict aliasing rule buys the compiler. Basically, with this rule, it doesn't have to think a... | [
0.7672582864761353,
0.12578681111335754,
0.07213526219129562,
0.3814682960510254,
-0.09612584859132767,
-0.34256020188331604,
0.7382423877716064,
-0.053483884781599045,
-0.20012876391410828,
-0.17798596620559692,
-0.15126891434192657,
0.9500158429145813,
-0.2771643400192261,
-0.42418745160... | |
loop. Before strict aliasing was introduced, the compiler had to live in a state of paranoia that the contents of `buff` could change by any preceding memory stores. So to get an extra performance edge, and assuming most people don't type-pun pointers, the strict aliasing rule was introduced.
Keep in mind, if you thin... | [
0.30250734090805054,
-0.12457387149333954,
0.11844095587730408,
-0.1576780527830124,
0.1081392914056778,
-0.4428373873233795,
0.7207741141319275,
-0.11396680027246475,
-0.2614514231681824,
-0.05105753242969513,
-0.12069576978683472,
0.46875783801078796,
-0.7361083626747131,
0.2159107327461... | |
SendWord(buff[i]);
}
}
```
And rewrote our earlier loop to take advantage of this convenient function
```
for (int i = 0; i < 10; ++i)
{
msg->a = i;
msg->b = i+1;
SendMessage(buff, 2);
}
```
The compiler may or may not be able to or smart enough to try to inline SendMessage and it may or may not de... | [
-0.0006508717779070139,
0.16835114359855652,
0.5367670655250549,
-0.24731266498565674,
-0.137513667345047,
-0.19263768196105957,
0.6240684986114502,
-0.21562941372394562,
-0.10372897982597351,
-0.4030187129974365,
-0.22318103909492493,
0.6928904056549072,
-0.3779197633266449,
0.00577085185... | |
C++ and this is some templated header only implementation that the compiler thinks it can inline. Or maybe it's just something you wrote in your .c file for your own convenience. Anyway undefined behavior might still ensue. Even when we know some of what's happening under the hood, it's still a violation of the rule so... | [
0.6754804849624634,
-0.13889557123184204,
0.15458665788173676,
0.0871114730834961,
-0.2663796842098236,
-0.38188910484313965,
0.5364664793014526,
-0.06045904755592346,
-0.30675575137138367,
-0.35462406277656555,
-0.12184605747461319,
0.6469024419784546,
-0.5130184292793274,
-0.176855906844... | |
C99 and explicitly allowed in C11.
```
union {
Msg msg;
unsigned int asBuffer[sizeof(Msg)/sizeof(unsigned int)];
};
```
* You can disable strict aliasing in your compiler ([f[no-]strict-aliasing](http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Optimize-Options.html#index-fstrict_002daliasing-825) in gcc))... | [
0.0033583026379346848,
-0.21152643859386444,
0.27821817994117737,
-0.05528809875249863,
0.15519201755523682,
-0.30628976225852966,
0.6260468363761902,
0.12498787045478821,
-0.16806210577487946,
-0.38025927543640137,
-0.30969056487083435,
0.643683910369873,
-0.43717315793037415,
0.031069235... | |
other. You should also learn about [endianness](http://en.wikipedia.org/wiki/Endianness), [word alignment](http://web.archive.org/web/20170708093042/http://www.cs.umd.edu:80/class/sum2003/cmsc311/Notes/Data/aligned.html), and how to deal with alignment issues through [packing structs](http://grok2.com/structure_packing... | [
0.22402825951576233,
0.00840398296713829,
0.5255112648010254,
0.031082279980182648,
0.04765504598617554,
0.0012618221808224916,
-0.18862833082675934,
-0.24174952507019043,
-0.18043366074562073,
-0.7357585430145264,
-0.18224211037158966,
0.40656423568725586,
-0.48985061049461365,
-0.2127646... | |
that includes one of the aforementioned types among its members (including, recursively, a member of a subaggregate or contained union), or
* a character type. | [
0.007695215754210949,
0.06871436536312103,
-0.34894394874572754,
0.04184144735336304,
-0.055651310831308365,
-0.10696639865636826,
0.08163875341415405,
0.05879892781376839,
0.15039695799350739,
-0.2547703683376312,
-0.7243380546569824,
-0.20037652552127838,
-0.2604987323284149,
0.263200908... | |
I've been quite used to working on small projects which I coded with 1,000 lines or less (pong, tetris, simple 3d games, etc). However as my abilities in programming are increasing, my organization isn't. I seem to be making everything dependent on one one another, so it's very hard for me to change the implementation ... | [
0.6767104864120483,
0.40383338928222656,
-0.20099972188472748,
0.20027443766593933,
-0.05619419366121292,
0.17284119129180908,
0.22011996805667877,
0.10327241569757462,
-0.3679927885532379,
-0.8637572526931763,
0.21723094582557678,
0.33099326491355896,
-0.12245150655508041,
-0.217739582061... | |
I can understand that imposing a minimum length on passwords makes a lot of sense (to save users from themselves), but my **bank** has a requirement that passwords are between 6 and 8 characters long, and I started wondering...
* Wouldn't this just make it easier for brute force attacks? (Bad)
* Does this imply that m... | [
0.297391414642334,
0.1291402131319046,
0.17701037228107452,
0.0846298485994339,
0.20968611538410187,
-0.09714768826961517,
0.33928683400154114,
0.05266006663441658,
-0.3360660672187805,
-0.3304266333580017,
0.0654270201921463,
0.48621252179145813,
0.04624515399336815,
0.11858616024255753,
... | |
reason for a minimum length is to prevent easy to guess passwords. There is no purpose for a maximum length.
The obligatory [XKCD](http://xkcd.com/936/) explaining why you're doing your user a disservice if you impose a max length:
[](http://xk... | [
0.11525353789329529,
-0.06530484557151794,
0.5584203004837036,
0.2623096704483032,
-0.37488889694213867,
-0.5589249134063721,
0.27962252497673035,
0.03339159116148949,
-0.13575993478298187,
-0.44083672761917114,
-0.43313342332839966,
0.45836278796195984,
-0.17950433492660522,
-0.2510072886... | |
I'm looking for a method to assign variables with patterns in regular expressions with C++ .NET
something like
```
String^ speed;
String^ size;
```
"command SPEED=[speed] SIZE=[size]"
Right now I'm using IndexOf() and Substring() but it is quite ugly
```
String^ speed; String^ size;
Match m;
Regex theregex = new R... | [
-0.025839805603027344,
-0.13999420404434204,
0.5077828764915466,
0.004644154105335474,
-0.03226059302687645,
-0.016294529661536217,
0.2999630272388458,
-0.2335500568151474,
-0.17776504158973694,
-0.7328143119812012,
0.07852184772491455,
0.5768945813179016,
-0.4878329634666443,
-0.030233098... | |
In an environment with multiple windows servers what is the best way to ensure patch compliance accross all systems?
Is there a simple tool (some sort of client/server app?) that allows reports to be generated showing the status of all the systems so any that aren't automatically patching themselves can be fixed with... | [
0.2677665054798126,
-0.34424716234207153,
0.5201901793479919,
0.31877362728118896,
0.2096681296825409,
-0.01122241746634245,
0.2554592788219452,
-0.19044630229473114,
-0.16161853075027466,
-0.7338098287582397,
-0.08148322999477386,
0.8034014701843262,
-0.3548935055732727,
-0.49751850962638... | |
number always represents the network segment itself and the highest is always the broadcast ... this leads to the -2 at the end of the formula.
For standard notation, convert the aaa.bbb.ccc.ddd netmask into an unsigned 4 byte integer (many networking libraries have this function) and subtract that from 2 ^ 32 - 2. | [
0.3812156319618225,
-0.1840508133172989,
0.4139195382595062,
-0.039984311908483505,
-0.16220039129257202,
-0.05199418216943741,
-0.033909425139427185,
-0.003934676758944988,
-0.341856986284256,
-0.43731412291526794,
-0.016031349077820778,
0.3189084529876709,
-0.3997243642807007,
0.46124568... | |
What are the pros/cons of using black-box reuse over white-box reuse?
In my experience, White box reuse is normally done through inheritance and black box is done through composition.
White Box Reuse
===============
Pro: You can customize the module to fit the specific situation, this allows reuse in more situations... | [
0.3678071200847626,
0.20179367065429688,
-0.04572289437055588,
-0.04451741278171539,
-0.10078906267881393,
-0.1015179380774498,
0.386980265378952,
-0.3708842396736145,
-0.02166660688817501,
-0.7272144556045532,
-0.14602676033973694,
0.8349401950836182,
-0.5744409561157227,
0.09873194247484... | |
I've got a WCF service which handles some sensitive data. I'd like to make sure I keep that data from being exposed and so I'm looking at netTCPBinding... primarily because I can control the network it runs across and performance is a high priority.
I recognize that there are two areas that can be encrypted: transport... | [
0.4022565484046936,
0.09176650643348694,
0.37729915976524353,
0.08687003701925278,
-0.18664708733558655,
-0.446716845035553,
0.20664648711681366,
-0.11414305865764618,
-0.1732371747493744,
-0.6400259733200073,
-0.3014056086540222,
0.5198292136192322,
-0.21570730209350586,
0.250854879617691... | |
need to bother with message level encryption? It seems unnecessary unless I want the flexibility of changing the transport.
The message-level encryption is needed when you do not control an intermediary. Intermediary services need to be able to modify the soap headers and could peek at your sensitive data for malicious... | [
0.28528034687042236,
-0.2580666244029999,
0.29198551177978516,
0.3870800733566284,
0.01332120317965746,
-0.322022020816803,
0.15374653041362762,
-0.21631911396980286,
-0.12419477850198746,
-0.6065977215766907,
0.08364550769329071,
0.6407496333122253,
-0.17770563066005707,
-0.14100915193557... | |
For UDP packets with a payload less then 1470, is it possible to achieve 1Gbit throughput? Due to the small packet size, there should be some bottlenecks in achieving such throughput (I/O, OS, network, etc.). I imagine drivers and hardware might have to be tuned to small packet/high throughput. Has anybody attempted su... | [
0.3631322979927063,
-0.23297695815563202,
0.2913271188735962,
-0.08047056943178177,
-0.3227720856666565,
-0.42789581418037415,
0.1764756143093109,
-0.05069328472018242,
-0.5163302421569824,
-0.8553237915039062,
-0.1080344095826149,
0.27911901473999023,
-0.3623269200325012,
0.03142943978309... | |
significantly improved by using a high speed bus to interface to your NIC (eg. a 4x pci-express NIC). But even with this there was a very definate packet/second limit. Obviously increasing the packet size would allow you to utilize more of your bandwidth while reducing processor load.
Along the same lines as the comme... | [
0.08709532022476196,
-0.28284555673599243,
0.3238457143306732,
0.1312587410211563,
0.014126374386250973,
-0.19795763492584229,
0.25113776326179504,
-0.157455712556839,
-0.5988718867301941,
-0.9208625555038452,
0.19167131185531616,
0.6625029444694519,
-0.1511092483997345,
-0.093495212495327... | |
of 30 to 40%.
It's more likely that the limitation is going to be imposed by your system hardware (ie. PC) than your network infrastructure - any network switch worth its salt should be capable of sustaining full speed network access with small packets - certainly at much higher rates than most PCs can cope with. | [
0.03760741651058197,
-0.07569902390241623,
0.5318707823753357,
0.40298962593078613,
0.095185287296772,
0.03994094580411911,
0.3375404477119446,
0.02997913584113121,
-0.23326526582241058,
-0.6347470879554749,
-0.13332144916057587,
0.5218456387519836,
-0.07475053519010544,
0.0024355258792638... | |
What is the best way to generate a current datestamp in Java?
YYYY-MM-DD:hh-mm-ss
Using the standard JDK, you will want to use java.text.SimpleDateFormat
```
Date myDate = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd:HH-mm-ss");
String myDateString = sdf.format(myDate);
```
However, if you h... | [
0.048109784722328186,
-0.09870560467243195,
0.8354965448379517,
-0.18572552502155304,
0.012670869939029217,
-0.17947183549404144,
0.03401137515902519,
-0.36921408772468567,
-0.16042035818099976,
-0.6529097557067871,
-0.12477132678031921,
0.2627950608730316,
-0.23639684915542603,
0.07595361... | |
sdf.parse("2008-09-18:22-03-15");
``` | [
-0.07445749640464783,
0.3212156593799591,
0.012164772488176823,
-0.2866312265396118,
-0.27733415365219116,
0.17919683456420898,
0.48614752292633057,
-0.2435883730649948,
0.15508203208446503,
-0.5922825336456299,
-0.32429733872413635,
0.24890762567520142,
-0.11759886145591736,
0.11691369116... | |
I need to generate a directory in my makefile and I would like to not get the "directory already exists error" over and over even though I can easily ignore it.
I mainly use mingw/msys but would like something that works across other shells/systems too.
I tried this but it didn't work, any ideas?
```
ifeq (,$(findst... | [
0.0357087068259716,
0.07563520222902298,
0.4878142476081848,
-0.12983642518520355,
0.3366449177265167,
-0.2300812005996704,
0.0057676853612065315,
0.07553033530712128,
-0.10397130995988846,
-0.7612243890762329,
-0.12814942002296448,
0.7327494621276855,
-0.3788119852542877,
0.06004730239510... | |
I search for "nurple" in a file. I found it, great. But now, every occurrence of "nurple" is rendered in sick black on yellow. Forever.
Forever, that is, until I search for something I know won't be found, such as "asdhfalsdflajdflakjdf" simply so it clears the previous search highlighting.
Can't I just hit a magic k... | [
0.27483850717544556,
0.08489979803562164,
0.5508450865745544,
-0.14345648884773254,
-0.2531439960002899,
-0.056875262409448624,
0.5852391123771667,
0.3039841055870056,
-0.23461675643920898,
-0.6569292545318604,
-0.3063374161720276,
0.5943455696105957,
-0.2617942988872528,
0.348658829927444... | |
I'm writing a C# program that acts as a PowerPoint 2007 plugin. On some machines, some calls to the PowerPoint object model throw a `COMException` with the message `RPC_E_SYS_CALL_FAILED`. I couldn't find any specific advice on what to do regarding this error, or how to avoid it. From Googling it looks like something t... | [
-0.24676692485809326,
0.27532488107681274,
0.42041850090026855,
-0.27825137972831726,
-0.07391370832920074,
-0.010746322572231293,
0.6185795664787292,
0.13853660225868225,
0.02758413553237915,
-0.6152746677398682,
-0.0737515240907669,
0.5872817039489746,
-0.2322850078344345,
0.511567354202... | |
to debug it! Should I just retry the calls whenever I get this error?
Any advice to help me resolve this problem would be greatly appreciated!
I don't know it is related to your problem, but all your COM calls must come from within the same thread your add-in was created on. If you created new threads you must take sp... | [
-0.07529176771640778,
0.1242690160870552,
0.3194607198238373,
-0.03902174532413483,
-0.0020453864708542824,
-0.310985267162323,
0.4894404113292694,
-0.044293202459812164,
-0.1771126538515091,
-0.34532004594802856,
-0.31830349564552307,
0.33750155568122864,
-0.7711747884750366,
0.4962678253... | |
For example, referencing something as System.Data.Datagrid as opposed to just Datagrid. Please provide examples and explanation. Thanks.
The benefit is that you don't need to add an import for everything you use, especially if it's the only thing you use from a particular namespace, it also prevents collisions.
The do... | [
0.43749871850013733,
0.25266990065574646,
0.032510142773389816,
0.3453115224838257,
-0.23892241716384888,
-0.337427020072937,
0.024761416018009186,
0.2694646418094635,
-0.5374855995178223,
-0.6440190672874451,
-0.19185246527194977,
0.4754143953323364,
-0.2506127655506134,
0.057901982218027... | |
readability of my code. | [
0.1437506228685379,
0.2870623767375946,
0.08239416778087616,
-0.012948010116815567,
-0.12228572368621826,
-0.13829705119132996,
0.20008163154125214,
0.06309007108211517,
0.04573385417461395,
-0.4950520098209381,
0.0013499913038685918,
0.47719570994377136,
0.4017794728279114,
-0.10942536592... | |
I'm interested in how java organizes memory and executes code (like what gets put in the stack or the heap), from the start of main, to assigning variables, calling functions, passing parameters, returning values, instantiating objects, etc. Has anyone found a good, beginner-friendly article/reference on it?
The canoni... | [
0.5792052745819092,
0.26586011052131653,
0.21624092757701874,
-0.03322576358914375,
-0.11206933856010437,
-0.35056251287460327,
-0.00028628576546907425,
-0.06332719326019287,
-0.37648865580558777,
-0.532441258430481,
0.003985013347119093,
0.33478879928588867,
-0.019780166447162628,
0.02333... | |
When I commit I get this error from Subversion:
```
bash-2.05b$ svn commit -m "testing subversion, still"
Adding baz
svn: Commit failed (details follow):
svn: MKCOL of '/viper/!svn/wrk/6b9bcd38-b2fe-0310-95ff-9d1a44098866/sandboxes/ohammersmith/trunk/baz': 405 Method Not Allowed (http://svn.example.com)
```
T... | [
0.24870584905147552,
0.24494774639606476,
0.09861604869365692,
-0.25953832268714905,
-0.07999662309885025,
0.03202717378735542,
0.6068578362464905,
-0.2597520351409912,
-0.5043309926986694,
-0.4191630482673645,
0.009708094410598278,
0.6122798323631287,
-0.4617585837841034,
0.34264418482780... | |
`svn update` to get the version on the server and re-do your changes.
As a general rule, be sure to do `svn update` since the error messages tend to be more helpful. | [
0.08826809376478195,
-0.037470441311597824,
0.6022670269012451,
0.08110718429088593,
-0.0007288663182407618,
-0.5702892541885376,
0.4709080159664154,
0.4119448661804199,
-0.37482979893684387,
-0.864080548286438,
-0.2893332540988922,
0.8053923845291138,
-0.27549809217453003,
0.0206185393035... | |
Do you think that writing about software (i.e. having a blog) and speaking on software (and concepts) make you a better programmer?
Statistically speaking yes. You only retain about 20% of what you read and hear, but 80% of what you teach.
By writing about something or teaching about it, you force yourself to understa... | [
0.8218298554420471,
0.1838512122631073,
0.1330500841140747,
0.20022523403167725,
0.13381986320018768,
-0.19243204593658447,
0.3200155794620514,
0.024813838303089142,
-0.05960352346301079,
-0.42826053500175476,
0.13984888792037964,
0.7710816860198975,
0.3501715362071991,
-0.2663044333457947... | |
[NTL Institute for Applied Behavioral Science](http://www.ntl.org/) maintains that research was done to back them up. | [
0.22814279794692993,
0.009743026457726955,
0.13347451388835907,
0.12742608785629272,
-0.23235884308815002,
-0.2512328028678894,
-0.020955797284841537,
-0.20604170858860016,
-0.3045782744884491,
0.11191393435001373,
0.036880217492580414,
0.45130085945129395,
0.3340744376182556,
0.2300461381... | |
If I'm writing an application that wants to communicate some information through the use of color, how can I change the background and foreground colors of a given widget? I would like to know how to do this in glade if it's possible, as well as programmatically (to a computed color).
I want to know how to do this to ... | [
0.7605023384094238,
-0.14815199375152588,
0.5400492548942566,
0.22816982865333557,
0.31707116961479187,
0.0860079750418663,
-0.0344732291996479,
0.027937332168221474,
-0.0394996739923954,
-0.868525505065918,
0.11123647540807724,
0.6996369361877441,
-0.10401701927185059,
-0.0301777627319097... | |
in use by the theme, so that I can programmatically compensate for any color choices which might make text unreadable or otherwise clashing - but I would be happy if I could just turn a button red.
Example program:
```
#include <gtk/gtk.h>
static void on_destroy(GtkWidget* widget, gpointer data)
{
gtk_main_qu... | [
0.09400226920843124,
0.05386508256196976,
0.5716449618339539,
-0.24259307980537415,
-0.030860837548971176,
-0.3532029688358307,
0.21717682480812073,
-0.1269349753856659,
-0.1638755351305008,
-0.5525515675544739,
-0.5713343620300293,
0.703300952911377,
-0.47430795431137085,
0.45102968811988... | |
g_signal_connect(G_OBJECT (window), "destroy",
G_CALLBACK (on_destroy), NULL);
button = gtk_button_new_with_label("Hello world!");
GdkColor red = {0, 0xffff, 0x0000, 0x0000};
GdkColor green = {0, 0x0000, 0xffff, 0x0000};
GdkColor blue = {0, 0x0000, 0x0000, 0xffff};
... | [
-0.3502066731452942,
-0.3103228211402893,
0.6804409623146057,
-0.18790839612483978,
0.06838718056678772,
0.27992984652519226,
0.2744784355163574,
-0.12126370519399643,
-0.1339041292667389,
-0.6929646730422974,
-0.3231123089790344,
0.26648280024528503,
-0.834657609462738,
0.2955769598484039... | |
gtk_widget_modify_bg(button, GTK_STATE_ACTIVE, &blue);
gtk_container_add(GTK_CONTAINER(window), button);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
``` | [
-0.15729720890522003,
0.14426304399967194,
0.5790193676948547,
-0.26662904024124146,
-0.012803264893591404,
-0.10603377968072891,
-0.13562491536140442,
0.10750053077936172,
0.002003057161346078,
-0.6596793532371521,
-0.5670555233955383,
0.41421443223953247,
-0.535453200340271,
0.4008283317... | |
I'm not looking so much for language-specific answers, just general models for implementing a plugin system (if you want to know, I'm using Python). I have my own idea (register callbacks, and that's about it), but I know others exist. What's normally used, and what else is reasonable?
> What do you mean by a plugin s... | [
0.42919957637786865,
0.12853410840034485,
-0.44956648349761963,
0.12951356172561646,
0.09858860820531845,
-0.243097186088562,
0.12233390659093857,
-0.12486622482538223,
-0.056951217353343964,
-0.4070242941379547,
-0.053366769105196,
0.4376978576183319,
-0.5181389451026917,
-0.2645303010940... | |
I'm doing, but I don't know much about them.
There is a very good [episode](http://www.se-radio.net/podcast/2008-07/episode-104-plugin-architectures) of [Software Engineering Radio](http://www.se-radio.net), which you may be interested in.
For future reference, I have reproduced here the "[Rules for Enablers](http://b... | [
0.03295210003852844,
0.11163399368524551,
0.05163498595356941,
0.034623801708221436,
0.23549418151378632,
-0.3207034170627594,
-0.017471637576818466,
-0.591134786605835,
-0.27543678879737854,
-0.2997378706932068,
-0.39891889691352844,
0.554267942905426,
-0.22189755737781525,
-0.27637875080... | |
Rule - All clients play by the same rules, even me.
> * Explicit Extension Rule - Declare explicitly where a platform can be extended.
> * Diversity Rule - Extension points accept multiple extensions.
> * Good Fences Rule - When passing control outside your code, protect yourself.
> * Explicit API Rule - separate the A... | [
0.5093097686767578,
-0.14283525943756104,
0.10839226096868515,
-0.08393650501966476,
0.12761446833610535,
-0.24651692807674408,
0.3194357752799988,
-0.6273667216300964,
-0.3200458884239197,
-0.34409451484680176,
-0.11468425393104553,
0.47898581624031067,
-0.3378998935222626,
-0.27586296200... | |
Does having several levels of base classes slow down a class? A derives B derives C derives D derives F derives G, ...
Does multiple inheritance slow down a class?
Non-virtual function-calls have absolutely no performance hit at run-time, in accordance with the c++ mantra that you shouldn't pay for what you don't use.... | [
-0.08034096658229828,
-0.10208099335432053,
0.16275301575660706,
0.22935441136360168,
-0.016172079369425774,
0.0037232646718621254,
0.23255394399166107,
-0.21982885897159576,
-0.1808340698480606,
-0.32780060172080994,
-0.41447609663009644,
0.713629424571991,
-0.2550242245197296,
-0.0850859... | |
before making the call. Raymond Chen describes [how this works](http://blogs.msdn.com/oldnewthing/archive/2004/02/06/68695.aspx) for COM objects. Basically, calling a virtual function on an object that inherits from multiple bases can require an extra subtraction and a jmp instruction on top of the extra pointer lookup... | [
0.17643317580223083,
-0.24048376083374023,
-0.0998905822634697,
-0.07051537930965424,
0.04213786497712135,
0.05991753563284874,
0.22496478259563446,
-0.42531058192253113,
-0.2841426730155945,
-0.09498535096645355,
-0.16225767135620117,
0.7556670308113098,
-0.3644756078720093,
0.15883709490... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.