text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
the -stdio option Either: ``` sas -stdio ``` Then start typing. Or ... ``` echo "proc options; run;" | sas -stdio ```
[ -0.050404757261276245, -0.1266075223684311, 0.25664758682250977, -0.2077103704214096, 0.07954998314380646, -0.09679179638624191, 0.40971839427948, 0.06003545597195625, 0.23326431214809418, -0.545130729675293, -0.8082414269447327, 0.800147294998169, -0.24864214658737183, -0.2496982514858245...
I have a .NET class library containing a class with a method that performs some lengthy operation. When a client calls this method it should perform the lengthy operation on a new thread in order to avoid blocking the caller. But once the method finishes it should execute some code on the main thread. In a WinForms app...
[ 0.002482812851667404, -0.18893450498580933, 0.03968193009495735, -0.11967354267835617, -0.17609573900699615, -0.2625465393066406, 0.5896896123886108, -0.1755824089050293, 0.24167154729366302, -0.7147042751312256, 0.1827390342950821, 0.6292169094085693, -0.4391523003578186, 0.25892472267150...
Run(string executable, object processExitHandler) { ThreadPool.QueueUserWorkItem(state => { var p = new Process() { StartInfo = new ProcessStartInfo() {
[ 0.23097674548625946, -0.5465417504310608, 0.6118184924125671, -0.19489867985248566, 0.396472692489624, 0.38533055782318115, 0.2604180574417114, 0.1264008730649948, -0.5967893600463867, -0.504025936126709, -0.17576472461223602, 0.3690359890460968, -0.5219593644142151, 0.5321818590164185, ...
FileName = executable } }; p.Start(); while (!p.HasExited) { Thread.Sleep(100);
[ 0.2384577989578247, -0.17838852107524872, 0.45593583583831787, -0.49159500002861023, 0.7132396697998047, 0.10103489458560944, 0.14671120047569275, -0.0153806172311306, -0.33621156215667725, -0.7100614905357361, -0.3494154214859009, 0.24098128080368042, -0.24569952487945557, 0.5269174575805...
} state .GetType() .InvokeMember( "call", BindingFlags.InvokeMethod,
[ -0.12910029292106628, -0.07876743376255035, 0.26468801498413086, -0.2777760922908783, 0.3606218099594116, -0.19304348528385162, 0.6572933793067932, -0.6336590647697449, 0.010640141554176807, -0.5143451690673828, -0.2644834518432617, 0.49520987272262573, -0.6815692186355591, 0.3436813652515...
null, state, new object[] { null, p.ExitCode } ); }, processExitHandler); } } ``` And in my HTML page I use it like this: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head><title>ActiveXRun...
[ -0.02961127832531929, -0.1329338699579239, 0.6938024163246155, -0.16261005401611328, -0.014847996644675732, -0.1671208143234253, 0.38703739643096924, -0.3772973120212555, -0.14808546006679535, -0.6566781997680664, -0.2375575751066208, 0.2942611277103424, -0.3762733042240143, 0.331783086061...
<script type="text/javascript"> function runNotepad() { var ax = new ActiveXObject('ActiveXRunner.Runner'); ax.Run('c:\\windows\\notepad.exe', h); } function h(exitCode) { alert('exitCode = ' + exitCode); } </script> </head> <body> <a href="#" onclick="runNotepad();">Run...
[ -0.23989878594875336, -0.037523966282606125, 0.7820722460746765, -0.2983015179634094, -0.007176857907325029, 0.06906231492757797, 0.34433913230895996, -0.18566113710403442, -0.006195751018822193, -0.882121741771698, -0.2766956388950348, 0.4388754665851593, -0.24914614856243134, -0.29830989...
I'm writing a small GUI app that contains some "editor" functionality, and something that I'd like to let users open a few sample text files to test things out quickly. The easiest way of doing this would be to package a separate zip with the appropriate sample files, and have them open them manually; I'd like to make ...
[ 0.6314018368721008, 0.08944682031869888, -0.08875905722379684, 0.27087461948394775, 0.1741563230752945, 0.05619563162326813, -0.04407345503568649, -0.2146887332201004, 0.04067014157772064, -0.6758438348770142, 0.45764848589897156, 0.6249861717224121, -0.14171727001667023, -0.21634022891521...
file right in the jar and then open it as a resource stream in your app. If you're using Spring, you can inject the resource right into a bean. If not, check out [Class.getResourceAsStream()](http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)). You just have to be careful a...
[ 0.31435003876686096, -0.009488350711762905, 0.21567192673683167, -0.03716630861163139, 0.1481509506702423, -0.08540235459804535, 0.1867576390504837, 0.0931510478258133, -0.43973708152770996, -0.6484351754188538, -0.019784949719905853, 0.3171440660953522, -0.0491415299475193, 0.029593363404...
I cannot understand how this is possible. Please help!! I have an app with a trayicon. I want a form to be show when the user double clicks the trayicon. I have a problem where it is possible to get 2 or more forms showing by quickly triple or quadruple clicking the trayicon. The reason I don't want a singleton is tha...
[ 0.7028059959411621, -0.0747961774468422, 0.4908645451068878, 0.009775771759450436, -0.2699303925037384, -0.25245070457458496, 0.22147871553897858, -0.04220263287425041, -0.2799603343009949, -0.6998297572135925, 0.326628714799881, 0.5219900608062744, -0.4374292194843292, 0.04339668899774551...
of the TrayIcon. ``` private Form1 m_form1; private void ShowForm1() { if (m_form1 == null) { Trace.WriteLine("*CREATE*" + Thread.CurrentThread.ManagedThreadId.ToString()); m_form1 = new Form1();
[ 0.5524933338165283, -0.16357168555259705, 0.749584436416626, -0.45948097109794617, 0.3503827452659607, -0.06809582561254501, 0.4995567202568054, -0.26859068870544434, -0.1819806694984436, -0.29356124997138977, -0.12152794003486633, 0.3499448001384735, -0.5857605934143066, 0.393324106931686...
m_form1.FormClosed += new FormClosedEventHandler(m_form1_FormClosed); m_form1.Show(); } m_form1.BringToFront(); m_form1.Activate(); } ``` So when Form1 takes a while to construct, then it is possible to create 2 because m\_form1 is still null when the second...
[ -0.18090885877609253, -0.263167142868042, 0.6243909597396851, -0.5808640122413635, 0.012259343639016151, -0.22751861810684204, 0.6779249906539917, -0.6496434807777405, -0.14923454821109772, -0.6094685792922974, -0.8166612982749939, 0.5179547667503357, -0.590734601020813, -0.098861403763294...
not seem to work as it is the same thread both calls (I'm guessing the UI thread) ie the trace writes out \*CREATE\*1 twice (below). ``` [3560] *CREATE*1 [3560] *CREATE*1 ``` Changing the code to include a lock statement does not help me. ``` private Form1 m_form1; private object m_Locker = new object(); ...
[ 0.32158347964286804, -0.2075720578432083, 0.366048127412796, -0.32185688614845276, 0.3472965955734253, -0.07935626059770584, 0.6309159994125366, -0.31953540444374084, -0.22457420825958252, -0.4974718391895294, -0.00002951941678475123, 0.29557323455810547, -0.4957643151283264, 0.05482617393...
{ Trace.WriteLine("****CREATE****" + Thread.CurrentThread.ManagedThreadId.ToString()); m_form1 = new Form1(); m_form1.FormClosed += new FormClosedEventHandler(m_form1_FormClosed); m_form1.Show(); }
[ 0.2527032792568207, -0.31989672780036926, 0.5014194250106812, -0.4124172329902649, 0.44559112191200256, -0.1240677759051323, 0.5562252402305603, -0.4193551540374756, -0.2547573149204254, -0.5583913326263428, -0.25441932678222656, 0.06935981661081314, -0.48012638092041016, 0.280642211437225...
} m_form1.BringToFront(); m_form1.Activate(); } ``` How should I handle this situation? Thanks guys Tim. Have an additional boolean variable, "m\_formUnderConstruction" which you test for before constructing the form, and which you set as soon as you've decided to construct it. The re-entrancy...
[ 0.19493040442466736, 0.14301297068595886, 0.6045452952384949, -0.046489350497722626, 0.28991496562957764, -0.10468066483736038, 0.5325998663902283, -0.14449462294578552, -0.3443438410758972, -0.693123996257782, -0.30554550886154175, 0.6887561678886414, -0.40271371603012085, -0.007647560443...
m_form1; private bool m_underConstruction = false; private void ShowForm1() { if (m_underConstruction) { // We're about to show it anyway return; } m_underConstruction = true; try { if (m_form1 == null) { m_form1 = new Form1();
[ 0.2631687819957733, -0.25009027123451233, 0.6799103021621704, -0.6399778127670288, 0.08118496835231781, -0.0361090786755085, 0.9391285181045532, -0.4726053774356842, 0.12780208885669708, -0.2761845588684082, -0.5059963464736938, 0.5100034475326538, -0.2969036400318146, 0.026249222457408905...
m_form1.FormClosed += new FormClosedEventHandler(m_form1_FormClosed); m_form1.Show(); } } finally { m_underConstruction = false; } m_form1.BringToFront(); m_form1.Activate(); } ```
[ -0.1837204396724701, -0.14608106017112732, 0.8784067630767822, -0.6008249521255493, 0.01947563700377941, -0.12978887557983398, 0.6357544660568237, -0.6729528307914734, -0.14441382884979248, -0.4476677179336548, -0.7417498230934143, 0.6109951734542847, -0.31538134813308716, -0.0470209941267...
I have an application where the user selects the dates of a first statement and a last statement. Example, first statement = 1/1/08, last statement = 12/1/08, should equal 12 statements. However, when using the following code, the result is 11: ``` numPayments = DateDiff(DateInterval.Month, CDate(.FeeStartDate), CDat...
[ 0.49660247564315796, 0.13943295180797577, 0.45935627818107605, -0.06246431544423103, -0.06603679060935974, 0.06614664942026138, 0.06566648185253143, -0.21060456335544586, -0.25942397117614746, -0.2850981056690216, 0.1555173397064209, 0.13373436033725739, 0.17660388350486755, 0.303825348615...
end dates are the same. Their difference is 0 but you'd still want 1 statement to show just to note one odd case.
[ 0.3499097228050232, -0.0261151734739542, 0.2066507488489151, 0.30438753962516785, -0.173554465174675, -0.15527597069740295, 0.135249525308609, 0.07943597435951233, -0.0775320753455162, -0.5465430021286011, 0.027319004759192467, -0.26249730587005615, 0.06448148190975189, 0.5265231728553772,...
I have these 3 tables + data: **items**: itemId, itemName data: 1, my item one **categories**: catId, catName data: 1, my cat one. 2, my cat two **map**: mapId, itemId, catId When you include item "my item one" in category "my cat one", you insert [1, 1, 1] into the map. When you add "my item one" to "my cat two"...
[ -0.22727730870246887, -0.05414201691746712, 0.6062196493148804, -0.13886763155460358, -0.3340551257133484, 0.3100877106189728, -0.015059656463563442, -0.29806846380233765, -0.38084059953689575, -0.8499030470848083, -0.12869182229042053, 0.25351449847221375, -0.3264469802379608, 0.280797570...
What's the most efficient sequence of steps to take to do so? (I'm looking for a solution that will scale beyond this trivial example.) Assuming you've already got the category ID for "my cat two" and the item ID for "my item 1": ``` DELETE FROM MAP WHERE ItemID = @MyItem1Id AND CatID <> @MyCat2Id ```...
[ -0.0639168918132782, -0.17459893226623535, 0.4157513678073883, -0.039982181042432785, -0.2091572880744934, -0.0012326051946729422, 0.20010443031787872, -0.17720498144626617, -0.3739436864852905, -0.643795371055603, -0.1831372231245041, 0.5019152760505676, -0.4224833846092224, 0.23606008291...
the above but with "AND CatID NOT IN [ ... ]"
[ -0.3188513219356537, 0.2196245640516281, 0.21927271783351898, -0.3571608364582062, -0.26707375049591064, 0.14771293103694916, 0.5330164432525635, -0.09712047874927521, -0.20540399849414825, -0.5597976446151733, -0.4577886164188385, 0.40594300627708435, -0.2790694236755371, 0.25972414016723...
Is it possible to create an attribute that can be initialized with a variable number of arguments? For example: ``` [MyCustomAttribute(new int[3,4,5])] // this doesn't work public MyClass ... ``` Attributes will take an array. Though if you control the attribute, you can also use `params` instead (which is nicer to...
[ 0.038086842745542526, -0.08803721517324448, 0.26886171102523804, 0.15053388476371765, -0.12942959368228912, 0.1685338020324707, 0.26424965262413025, -0.3752779960632324, -0.1546051949262619, -0.3926134407520294, -0.15454617142677307, 0.5333881974220276, -0.39817100763320923, 0.060808431357...
{ public int[] Values { get; set; } public MyCustomAttribute(int[] values) { this.Values = values; } } [MyCustomAttribute(new int[] { 3, 4, 5 })] class MyClass { } ```
[ -0.09264250099658966, -0.10267886519432068, 0.3689854145050049, 0.026952946558594704, 0.24611198902130127, -0.05385449156165123, 0.3397890329360962, -0.19085653126239777, 0.017686208710074425, -0.535497784614563, -0.46949800848960876, 0.5815715193748474, -0.35111668705940247, 0.17051985859...
I have 4 databases with similar schema's, and I'm trying to create a query to return just the table, column pairs that exist ONLY in database 1 and do not exist in database 2, 3, or 4. Currently I can return the symmetric difference between database 1 and 2 via the following query... ``` select table_name, column_nam...
[ 0.10079716145992279, 0.08254339545965195, 0.6924881935119629, 0.0539381168782711, -0.15573358535766602, 0.2826802730560303, -0.027586720883846283, -0.29255977272987366, -0.5312297940254211, -0.591415286064148, 0.0951366201043129, 0.12408733367919922, -0.4019521474838257, 0.3975732922554016...
table_name, column_name having count(*) = 1 ``` However, in trying to isolate just those columns in database 1, and doing the same across all 4 databases, things are getting complicated. What is the cleanest solution for this query? Attributes will take an array. Though if you control the attribute, you can also use ...
[ -0.051154594868421555, 0.053877174854278564, 0.41170790791511536, 0.10918575525283813, -0.03497610241174698, 0.2586773931980133, 0.2681150436401367, -0.4620228409767151, -0.3828224241733551, -0.7081486582756042, -0.208526149392128, 0.36042892932891846, -0.4445578455924988, 0.13945792615413...
array creation just happens to be off: ``` class MyCustomAttribute : Attribute { public int[] Values { get; set; } public MyCustomAttribute(int[] values) { this.Values = values; } } [MyCustomAttribute(new int[] { 3, 4, 5 })] class MyClass { } ```
[ 0.1935223489999771, -0.11041820049285889, 0.3349134624004364, -0.005907457787543535, 0.0027522481977939606, -0.0873592421412468, 0.21195369958877563, -0.2722011208534241, -0.182182177901268, -0.4221637547016144, -0.1627335101366043, 0.582918107509613, -0.20554393529891968, 0.04501633718609...
I've just installed CodeGear Studio 2009 and I didn`t find where I can put the Intellisense and code hints on. And, by the way, in Visual Studio we can indent selected blocks of code in the same way. How can I use similar functions in CodeGear? Any ideas about that? It's called Code Insight. I don't have 2009 yet but...
[ 0.06442556530237198, -0.18095886707305908, 0.510972261428833, -0.031441785395145416, -0.44840049743652344, -0.33133599162101746, 0.33474066853523254, 0.07123789936304092, 0.02534232661128044, -1.1708898544311523, 0.3409390449523926, 0.8805862069129944, -0.028167467564344406, -0.28384622931...
I'm currently running Visual Studio 2008 Standard Edition and one of the items they cut out for that edition is the unit testing capability. As a result, when I open up example projects like the MVC commerce test, one of the projects just won't load since it doesn't know to open that type of project. I know I can just...
[ 0.2820168733596802, 0.20891010761260986, 0.09185517579317093, -0.10823724418878555, -0.2628374993801117, -0.13061769306659698, 0.30817297101020813, -0.03630542755126953, 0.01183241792023182, -0.4178900718688965, 0.22465495765209198, 0.7420322895050049, -0.19417212903499603, 0.0421508215367...
NUnit testing that this won't work? **UPDATE:** To clarify, I'm curious if there are any programs or plugins out there that can run Test projects *within Visual Studio 2008*. TestDriven.NET cannot load or run or allow VS2008 to open Test projects and Gallio does not run within the VS2008 IDE (although I appreciate the...
[ 0.32049667835235596, -0.05416937172412872, -0.13518597185611725, 0.1569022238254547, -0.6348850727081299, 0.3045981526374817, 0.5547490119934082, -0.39464712142944336, 0.27637994289398193, -0.2932295501232147, 0.2043377310037613, 0.4183610677719116, -0.3190351128578186, -0.2428687512874603...
**MSTest**, NBehave, NUnit, xUnit.Net, and csUnit. Gallio provides tool support and **integration with** CCNet, MSBuild, NAnt, NCover, Pex, Powershell, Resharper, **TestDriven.Net**, TypeMock, and Visual Studio Team System.
[ -0.022171342745423317, -0.27225741744041443, -0.022119667381048203, 0.21033881604671478, -0.06823650747537613, 0.23702478408813477, 0.07248236238956451, 0.2129015028476715, -0.14112377166748047, -0.8795191645622253, -0.278109073638916, 0.38606971502304077, -0.2548310160636902, 0.0537160709...
I'm currently optimizing the performance on my company's site; when it was taking 6-10 seconds to download 2MB+ of our homepage and assets (the site is mostly Flash with a lot of media, so it's not 2MB of HTML and viewstate). There are a lot of things that will need to be done to get this download size down; but one th...
[ 0.21905860304832458, 0.14448808133602142, 0.32827335596084595, 0.17911776900291443, -0.12789100408554077, -0.22128674387931824, 0.1212996169924736, 0.004607661627233028, -0.33801668882369995, -0.814518392086029, -0.2049817591905594, 0.448696494102478, 0.11576245725154877, 0.028574647381901...
staging site so I can do some server testing and benchmarking. This means I'm going to have to do some Metabase editing, since IIS 6 doesn't allow you to set compression on an individual site via IIS manager. The problem with that is the Metabase is locked by IIS so I can't save; and even if I save the edits, I'm requi...
[ 0.37506288290023804, 0.14903296530246735, 0.1554051637649536, -0.03914802893996239, 0.18338531255722046, -0.1588275134563446, 0.05554744228720665, -0.16854219138622284, -0.16754157841205597, -0.41386547684669495, 0.3794511556625366, 0.5782703757286072, -0.21962030231952667, 0.1685145497322...
staging site; I just don't want this work to take down other sites on the server. Any assistance is greatly appreciated. [This fellow](http://www.dotnetspider.com/resources/17562-Edit-Delete-Create-Encrypt-sections.aspx) shows sample code if you still want to do it after all the caveats: ``` protected void EditConfig...
[ 0.3081229031085968, 0.13766510784626007, 0.23047521710395813, 0.13121403753757477, 0.22777211666107178, -0.2979024052619934, 0.35197505354881287, -0.28654420375823975, -0.25202593207359314, -0.5459703207015991, -0.054867543280124664, 0.1628878116607666, -0.31783631443977356, 0.031509049236...
For a windows script I am writing, I need to detect if the machine has Apache 2.2 installed, and to find the application path. One solution I came up with is to wget <http://localhost:8080/server-info> and parse the root and the config file from it. This would fail if the server does not use port 8080 Another option...
[ 0.13608838617801666, -0.002049849834293127, 0.2552099823951721, -0.16424253582954407, -0.3595489263534546, -0.2874891757965088, 0.6872004270553589, -0.03907545655965805, -0.10546058416366577, -0.6036748886108398, 0.2174956500530243, 0.3195977210998535, -0.5696215033531189, 0.01785631850361...
if they didn't install it using the installer. If they used the MSI/installer, you can check the registry: ``` HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Apache\2.2.2\ServerRoot HKEY_CURRENT_USER\SOFTWARE\Apache Software Foundation\Apache\2.2.2\ServerRoot ``` You can also check the running process list:...
[ 0.10878006368875504, 0.35877302289009094, 0.3705577850341797, -0.09318780899047852, 0.14254134893417358, -0.25153249502182007, 0.1836930513381958, 0.37756097316741943, -0.3153591454029083, -0.9180755615234375, -0.22599609196186066, 0.6232869029045105, -0.15860062837600708, 0.29972755908966...
I have a class that contains two methods like these: ``` public String getFoo(Int32 a) { return getBar(a, "b", null); } public String getBar(Int32 a, String b, Int32 c) { //do something return ""; } ``` However when I compile my class I get two errors: 1. The best overloaded method match for getBar(int,strin...
[ -0.007497524842619896, 0.1061757430434227, -0.11783343553543091, -0.10213937610387802, -0.057130955159664154, -0.09550238400697708, 0.5388360619544983, -0.24191266298294067, 0.1555456966161728, -0.4675065279006958, 0.009429475292563438, 0.6095963716506958, -0.4588705003261566, 0.1203902736...
reason? More importantly, can I design my code this way? If so, what do I need to do to fix the errors? My reason for designing my class this way is because I don't want to duplicate the code in getBar, in getFoo. The two methods do essentially the same thing except one takes a third parameter. Thanks. In .NET, there...
[ 0.21305033564567566, -0.0980834811925888, 0.010503836907446384, 0.22434481978416443, -0.19227458536624908, -0.02487882226705551, 0.2944856286048889, -0.24760256707668304, -0.19023743271827698, -0.7147074937820435, 0.3578501045703888, 0.35126054286956787, -0.5333728194236755, 0.228336304426...
that, it is perfectly valid to store a null pointer. A value type is an object that is allocated on the stack, it will be a subclass of System.ValueType. Because a value type lives on the stack, when you pass its value to a function, you pass the entire contents of the object. Value types cannot be null. Most C# pr...
[ 0.11466050148010254, -0.2839784026145935, 0.25335580110549927, 0.10386062413454056, -0.2085539549589157, -0.18429714441299438, 0.09958463907241821, -0.19430221617221832, -0.15251873433589935, -0.43956780433654785, 0.057424698024988174, 0.17808644473552704, -0.5969496965408325, 0.2736971378...
really happens is that the logic inside of the Nullable<T> struct is emulating a null for you. They expressed it using a syntax shortcut by adding a question mark to the type, for example: ``` int? nullableInt = null; float? nullableFloat = null; ``` etc... If you don't like the int? syntax, you can always use Nul...
[ 0.211643785238266, -0.010780181735754013, 0.21026398241519928, -0.03907959908246994, -0.13905444741249084, -0.053749214857816696, 0.42746636271476746, 0.07611812651157379, -0.1068994477391243, -0.669061005115509, -0.1704471856355667, 0.31561392545700073, -0.5166992545127869, 0.146423250436...
`std::auto_ptr` is broken in VC++ 8 (which is what we use at work). My main gripe with it is that it allows `auto_ptr<T> x = new T();`, which of course leads to horrible crashes, while being simple to do by mistake. From an [answer](https://stackoverflow.com/questions/106508/what-is-a-smart-pointer-and-when-should-i-u...
[ 0.04295199364423752, 0.05891205742955208, 0.5064422488212585, -0.13297325372695923, 0.00597685482352972, -0.07414931058883667, 0.3431699872016907, -0.15263083577156067, -0.3632705509662628, -0.3639218807220459, -0.2310819774866104, 0.7307772040367126, -0.44582831859588623, -0.1228032857179...
me, I wonder what would be the best approach: * Replace `std::auto_ptr` with something from the net. Like this [this](http://groups.google.com/group/comp.std.c++/msg/97a2539a1bbbe491) one from Rani Sharoni (haven't tried it yet). * Use `boost::shared_ptr` instead. Will of course work, although there will be some minor...
[ 0.2673957049846649, -0.05117150768637657, 0.10705984383821487, -0.01778731308877468, -0.06676455587148666, 0.16924943029880524, 0.20255647599697113, -0.4876452386379242, -0.19696223735809326, -0.19349592924118042, 0.1362294852733612, 0.5852230787277222, -0.09792134910821915, -0.13014952838...
T { public: T() { OutputDebugStringA("T\n"); }; ~T() { OutputDebugStringA("~T\n"); }; }; { fix::auto_ptr<T> x(new T); // This just works. } { fix::auto_ptr<T> x = (new T); // Doesn't compile. Great! } { fix::auto_ptr<T> x = fix::auto_ptr<T>(new T); // Transfer of ownership w...
[ 0.3296428620815277, -0.16938984394073486, 0.11808253079652786, -0.02511262521147728, 0.19744931161403656, -0.15808086097240448, 0.49440962076187134, -0.10967336595058441, -0.15831358730793, -0.4612545073032379, -0.42760950326919556, 0.823182225227356, -0.5185633897781372, -0.00617588264867...
built in one. Note: I don't know if I'm allowed to use this implementation yet, with respect to copyright. I have emailed Rani and I'm waiting for a reply. I'll update this post when I know more. Permission is granted for everyone to use Rani Sharoni's auto\_ptr implementation as you wish. Thank you for all your rep...
[ 0.4395778775215149, 0.026837045326828957, 0.1663891226053238, 0.2617896497249603, 0.1698954552412033, 0.03977806493639946, 0.16105400025844574, -0.35712558031082153, -0.03434820845723152, -0.6381952166557312, 0.05336347967386246, 0.5594850778579712, -0.4058809280395508, 0.03279361873865127...
still have to track which instance is the current owner and make sure the owner leaves last. unique-ptr "fixes" that, by making release not only give up ownership, but also setting the RHS to null. It is the closest replacement for auto-ptr, but with its different semantics it is not a drop-in replacement. There's a...
[ 0.18175268173217773, 0.006685197819024324, 0.28621217608451843, 0.027162393555045128, 0.11414716392755508, -0.21887308359146118, 0.15006813406944275, -0.18435199558734894, -0.13338010013103485, 0.1304589807987213, -0.1975119560956955, 0.48657330870628357, -0.24075624346733093, 0.0134279765...
I have a site a few years old that contains about 30 aspx Web Form pages with code behind. I want to add a common master page to all these with the minimum amount of work. Essentially, I just need to add everything in the body tags to the Content Placeholder, and preserve the code behind. Is there a fast way to do t...
[ 0.662310004234314, 0.10136430710554123, 0.35337033867836, 0.2709542214870453, -0.07499655336141586, -0.12118137627840042, 0.3600003123283386, -0.2927837073802948, -0.08191224932670593, -0.8791469931602478, 0.10336501896381378, 0.34946995973587036, -0.03202710300683975, -0.14478948712348938...
KEEP its contetnts - Remove the form tag - Done
[ 0.15978339314460754, -0.03321920335292816, 0.7229685187339783, -0.003525754436850548, 0.21772804856300354, -0.18801140785217285, -0.06402024626731873, 0.0007846603402867913, -0.028942780569195747, -0.21829943358898163, -0.2084604799747467, 0.4074365496635437, -0.023077037185430527, -0.1113...
I have hit upon this problem about whether to use bignums in my language as a default datatype when there's numbers involved. I've evaluated this myself and reduced it to a convenience&comfort vs. performance -question. The answer to that question depends about how large the performance hit is in programs that aren't g...
[ 0.060758184641599655, 0.06636745482683182, -0.08543969690799713, -0.01670503057539463, 0.015072764828801155, 0.284933477640152, 0.17165735363960266, -0.10175440460443497, -0.082712322473526, -0.706409752368927, -0.02556242235004902, 0.6725305914878845, 0.015024772845208645, -0.209941461682...
can I expect to the results in the overall language performance if I'll put my language to default on bignums? To be honest, the best answer is "try it and see". Clearly bignums can't be as efficient as native types, which typically fit in a single CPU register, but every application is different - if yours doesn't do...
[ 0.14380811154842377, 0.032747987657785416, -0.14334841072559357, 0.09829756617546082, -0.002881025429815054, 0.10576734691858292, 0.5296970009803772, 0.10327138751745224, -0.09334301948547363, -0.5897603631019592, -0.24912992119789124, 0.8727303743362427, -0.16653001308441162, -0.276668488...
I learned about [Microsoft BizSpark](http://www.microsoft.com/bizspark/) the other day and started the sign up process. Has anyone else heard about it or had success with it? I can't speak for BizSpark specifically (it's so new), but Microsoft has had the similar [Empower](http://www.empowerforisv.com/) program in plac...
[ 0.7083204388618469, -0.09359925240278244, 0.3830350339412689, 0.20034553110599518, -0.17439818382263184, -0.21114420890808105, 0.11872638761997223, 0.23223714530467987, -0.22282323241233826, -0.6020259857177734, 0.24696333706378937, 0.3421095609664917, 0.1515040099620819, 0.027532745152711...
office and gave us a clear path to working toward the typical ISV Partner relationship. You also get some technical support incidents, which are handy when/if you need to escalate an issue you're running into. The requirements for Empower were/are pretty straightforward... basically commit to releasing a commercial so...
[ 0.542795717716217, -0.03465748578310013, 0.4850638806819916, 0.23035410046577454, -0.13459721207618713, -0.18988540768623352, 0.1787448525428772, 0.07664673030376434, -0.05934916436672211, -0.27691614627838135, -0.0030037136748433113, 0.4501831829547882, 0.14138147234916687, -0.11684311181...
I am using the Skype4Com COM object to intercept audio from the microphone. I know that it is 16 bit mono, but how do I find out what its sample rate is? It would seem that there is no facility in Skype4Com to determine the microphone sample rate at the moment. My experiments indicate that it is 16kHz.
[ 0.3682030737400055, 0.2913898229598999, 0.5406777858734131, 0.2007203847169876, -0.26578041911125183, -0.15630067884922028, 0.7104929089546204, -0.07571250945329666, 0.29043683409690857, -0.4432312250137329, 0.03359971567988396, 0.7305150032043457, -0.3021659851074219, 0.356563001871109, ...
I'm getting this error: ``` javax.servlet.ServletException: bean not found within scope ``` on a page with this at the top. ```html <jsp:useBean id="bean" type="com.example.Bean" scope="request" /> ``` The class exists in the classpath, it worked this morning, and I don't get what not found within scope means. H...
[ 0.06501007080078125, 0.32051360607147217, 0.24924972653388977, -0.2670851945877075, 0.006717435084283352, -0.2731023132801056, 0.5509286522865295, -0.22746244072914124, -0.3523125648498535, -0.8013534545898438, -0.24065180122852325, 0.6393375396728516, -0.5779380202293396, 0.19056396186351...
behind the scenes: ```java Bean bean = (Bean) pageContext.getAttribute("bean", PageContext.REQUEST_SCOPE); if (bean == null) { bean = new Bean(); pageContext.setAttribute("bean", bean, PageContext.REQUEST_SCOPE); } // Use bean ... ``` If it has worked before and it didn't work "in a sudden", then it means ...
[ 0.38479048013687134, -0.09258225560188293, 0.3295370042324066, -0.30272701382637024, -0.023784607648849487, -0.3003426194190979, 0.3557491898536682, -0.3369164764881134, -0.21919262409210205, -0.5259741544723511, -0.5002032518386841, 0.448322057723999, -0.5521312952041626, -0.0146381035447...
`/WEB-INF` and forward to it instead.
[ 0.05062472075223923, 0.06797057390213013, 0.2541864216327667, -0.10767817497253418, -0.236444354057312, -0.0881960541009903, 0.07120253890752792, 0.4357990026473999, -0.16588452458381653, -0.7262457609176636, -0.38431739807128906, 0.39826080203056335, -0.11002384126186371, 0.12912556529045...
I recently got a notification from a McAfee service (what used to be called HackerSafe) that my website is using SSLv2 and it should be using SSLv3. I don't know anything about the versions of SSL. My site is using IIS 6.0, is there a setting somewhere to turn on SSLv3 or do I need to install something to make this hap...
[ 0.7941287755966187, 0.29386481642723083, 0.18384364247322083, -0.05503794550895691, -0.17014151811599731, -0.38170766830444336, 0.45245450735092163, 0.2795865833759308, -0.21566173434257507, -0.7409948110580444, -0.10200931131839752, 0.405806303024292, -0.30579298734664917, 0.4931326508522...
I need two divs to look a bit like this: ``` | | ---| LOGO |------------------------ | |_______________| LINKS | | CONTENT | ``` What's the
[ 0.45510292053222656, -0.18001991510391235, 0.45248740911483765, -0.13912710547447205, 0.12810641527175903, -0.06304512172937393, -0.05420602485537529, 0.19393880665302277, 0.02273852564394474, -0.5456209778785706, 0.16191837191581726, 0.7363672256469727, -0.3578358292579651, 0.084522910416...
neatest/most elegant way of making them overlap neatly? The logo will have a fixed height and width and will be touching the top edge of the page. I might approach it like so (CSS and HTML): ```css html, body { margin: 0px; } #logo { position: absolute; /* Reposition logo from the natural layout */ left: ...
[ 0.30304819345474243, -0.041089218109846115, 1.034685492515564, 0.0630197674036026, 0.0497635081410408, -0.1435966044664383, -0.11655686050653458, -0.4707335829734802, -0.3158031404018402, -1.0296529531478882, -0.04068075120449066, 0.2133396714925766, -0.19078058004379272, 0.063486695289611...
id="content"> <div id="links">dssdfsdfsdfsdf</div> </div> ```
[ 0.021880721673369408, -0.0631471499800682, 0.5237337350845337, 0.09700597822666168, -0.38671743869781494, -0.42927631735801697, 0.14512449502944946, -0.11360540986061096, -0.31755614280700684, -0.6955731511116028, -0.47296804189682007, 0.15517021715641022, -0.24793840944766998, 0.377532392...
Can any one tell me how to convert an legacy application which is vb6 ( COM dll's ocx and exes) to use Regfree COM . I tried opening the dlls in visual studio and created manifest file, but some of the dlls it is giving error. Is there any tools out there which will help me to do this process? I tried a tool from co...
[ 0.5445575714111328, -0.0686597004532814, 0.04890323057770729, 0.2415781021118164, -0.33788639307022095, 0.058679498732089996, 0.132150337100029, -0.14180020987987518, -0.13001395761966705, -1.086092233657837, 0.20823420584201813, 0.5831195116043091, -0.22210153937339783, 0.0966160148382186...
to .NET, for some months we have to deploy it, it will easier if it is xcopy based deployment. To create manifest files you can try to use Make My Manifest from <http://mmm4vb6.atom5.com/>. *EDIT* The MMM website is down. I see [here](http://web.archive.org/web/20140829021337/http://mmm4vb6.atom5.com/) that the author...
[ 0.3994680643081665, -0.24486470222473145, 0.6610000133514404, -0.12028224021196365, -0.17058853805065155, -0.22516430914402008, 0.026485193520784378, 0.17862987518310547, -0.40697675943374634, -0.9646680355072021, 0.17599405348300934, 0.31192243099212646, -0.45964622497558594, 0.2145126014...
be stored in vbp project file and you won't get full manifest file. Probably you will have to catch object creations while the application is running. Depends.exe application can profile running application and report all used dlls. I don't know if there is tool that can find additional COM related information.
[ 0.6804698705673218, -0.31103813648223877, 0.3366638720035553, 0.2783149480819702, -0.18444332480430603, -0.2646027207374573, 0.053302325308322906, 0.032241154462099075, -0.25235673785209656, -0.6544281244277954, 0.08202913403511047, 0.4715994596481323, -0.051583267748355865, 0.243635147809...
I've got an arbitrary list of .NET assemblies. I need to programmatically check if each DLL was built for x86 (as opposed to x64 or Any CPU). Is this possible? Look at `System.Reflection.AssemblyName.GetAssemblyName(string assemblyFile)`. You can examine assembly metadata from the returned AssemblyName instance: Usi...
[ 0.802266538143158, 0.08714816719293594, 0.25999194383621216, -0.23304839432239532, -0.15147726237773895, -0.04990577697753906, 0.12355667352676392, -0.00981003325432539, -0.060265857726335526, -0.5198319554328918, -0.056810162961483, 0.5844860076904297, 0.053176190704107285, -0.02933208271...
: file:///C:/projects/powershell/BuildAnalyzer/... EscapedCodeBase : file:///C:/projects/powershell/BuildAnalyzer/... **ProcessorArchitecture : MSIL** Flags : PublicKey HashAlgorithm : SHA1 VersionCompatibility : SameMachine KeyPair : FullName : Microsoft.GLEE, ...
[ -0.1804627925157547, -0.037064097821712494, 0.08316276222467422, -0.08003377914428711, -0.14053097367286682, 0.4725262522697449, 0.11435239762067795, 0.023474542424082756, -0.2938964366912842, -0.6113059520721436, -0.12067925184965134, -0.14659613370895386, -0.2288094013929367, 0.298292130...
64-bit Intel [Itanium](https://en.wikipedia.org/wiki/Itanium) processor only. * **MSIL**: Neutral with respect to processor and bits-per-word. * **X86**: A 32-bit Intel processor, either native or in the Windows on Windows environment on a 64-bit platform ([WoW64](https://en.wikipedia.org/wiki/WoW64)). * **None**: An u...
[ -0.1674792766571045, 0.18122777342796326, 0.1018824428319931, 0.2681593894958496, -0.14048165082931519, 0.24470734596252441, 0.14390935003757477, 0.017830349504947662, 0.0009538463782519102, -0.534774124622345, -0.34025049209594727, 0.5668744444847107, -0.3301554024219513, -0.0737122371792...
I use the Boost Test framework to unit test my C++ code and wondered if it is possible to test if a function will assert? Yes, sounds a bit strange but bear with me! Many of my functions check the input parameters upon entry, asserting if they are invalid, and it would be useful to test for this. For example: ``` void...
[ 0.25611695647239685, 0.40931200981140137, 0.24758358299732208, -0.059760235249996185, -0.37175416946411133, -0.024907425045967102, 0.4577085077762604, -0.7686322927474976, -0.1895260214805603, -0.12398941069841385, -0.18829500675201416, 0.7293965220451355, -0.12935927510261536, -0.08262483...
Test so I wondered if there was some assert magic too... I don't think so. You could always write your own assert which throws an exception and then use BOOST\_CHECK\_NOTHROW() for that exception.
[ 0.12357187271118164, -0.08410020172595978, -0.18315671384334564, 0.13695645332336426, -0.41316118836402893, -0.2580060064792633, 0.5968267917633057, -0.20103560388088226, 0.3963661789894104, -0.2662847936153412, 0.23026341199874878, 0.7783869504928589, 0.2629709541797638, -0.25090694427490...
What to do automatic nightly build of .NET web application and upload to the test server. Or, if this tool is overkill, please suggest something else. I have found this great tutorial: [How to Hook Up a VS.NET 2005 Solution With CruiseControl.NET in a Few Minutes](http://weblogs.asp.net/jdanforth/pages/How-to-Hook-Up...
[ -0.02976866252720356, -0.4335569143295288, 0.513137936592102, 0.030044160783290863, -0.02684420347213745, -0.4225652813911438, 0.20679108798503876, -0.4163559675216675, -0.1657954901456833, -0.37826138734817505, 0.10444401949644089, 0.551441490650177, 0.25648537278175354, -0.30836275219917...
In the situation of having a project initiated by a marketing or sales team, how can we capture the not so obvious requirements that the project be marketable, or even better, self marketing? In many cases the marketing/sales team can hardly enumerate the functional specs of what the project should do, let alone desc...
[ 0.6699312925338745, 0.295270174741745, -0.020149512216448784, 0.08068796992301941, 0.03427136316895485, -0.06669797003269196, 0.13461819291114807, -0.09521149098873138, -0.18661761283874512, -0.4500446915626526, -0.06163903325796127, 0.754233717918396, 0.3592197597026825, 0.102687060832977...
customer ever hears about or finds the deals??? One thing I've been thinking about doing in order to address this shortfall in the requirements process (which turns into a shortfall in the deployment process) is to dedicate a portion of the scope of the project to analysis and promotion by engineers as opposed to the ...
[ 0.8050984740257263, 0.14017824828624725, 0.2903044819831848, -0.11443726718425751, 0.29393815994262695, -0.17914558947086334, -0.0010317300911992788, -0.02033567614853382, 0.03869049623608589, -0.33499252796173096, -0.15441752970218658, 0.610645592212677, 0.32421308755874634, -0.0364298224...
beta promotion and review period(in addition to the QA period we already include), the creation of the appropriate survey and the engineering review of that survey, and then a final launch with any tweaks. I realize this is outside the scope of a typical technical product manager's realm for scoping a project, but some...
[ 0.8512572050094604, 0.12194999307394028, -0.18800118565559387, -0.08173337578773499, 0.09779857099056244, -0.3373016119003296, -0.021186070516705513, 0.09625513851642609, 0.0402977354824543, -0.46741530299186707, -0.04537403583526611, 0.4903353154659271, 0.2847903370857239, -0.073145687580...
feel free to provide answers for all fields. Update- An example: Recently we launched a deals project so users can get deals that our hotels provide. When building the deals project, we didn't include an RSS feed of deals to our customers, didn't provide an alert signup for people who are looking for specific deals, ...
[ 0.6394265294075012, -0.22036461532115936, 0.9409806132316589, 0.36374354362487793, 0.3513795733451843, -0.8081982731819153, 0.2333807796239853, -0.35605740547180176, -0.4383352994918823, -0.43065115809440613, -0.06367732584476471, 0.3941039443016052, 0.20754212141036987, 0.0452126748859882...
great for everyone who sees the deals, since we have such good pricing and combos, but the number of people seeing the deals is smaller since they have to know the deals are there to find them. Prototype early, prototype often, and make sure to get customers to look at your early versions. If you're working on an exi...
[ 0.6562367081642151, -0.00522723700851202, 0.2761712372303009, 0.2523793876171112, 0.3950319290161133, -0.31734466552734375, -0.22887077927589417, -0.0005096513195894659, -0.22831514477729797, -0.6141495704650879, 0.16128279268741608, 0.5634146928787231, 0.26268330216407776, -0.155826598405...
this, they're missing out on essential customer input.
[ 0.43367716670036316, 0.3873295187950134, 0.054622914642095566, -0.15192602574825287, 0.12102828174829483, -0.021435478702187538, 0.14721617102622986, 0.3820178210735321, -0.23168134689331055, -0.5868025422096252, 0.13181157410144806, 0.4587094485759735, 0.2415463924407959, 0.03327401354908...
Is it a good idea to store my SQL queries in a global resource file instead of having it in my codebehind? I know stored procedures would be a better solution but I don't have that luxury on this project. I don't want queries all over my pages and thought a central repository would be a better idea. Resource files ar...
[ 0.22608262300491333, 0.20002754032611847, -0.055404357612133026, 0.28390341997146606, 0.031266290694475174, -0.29887479543685913, 0.2519757151603699, 0.3349265158176422, -0.2696364223957062, -0.5568872690200806, 0.28674858808517456, 0.21914659440517426, -0.06442484259605408, 0.592731118202...
be using linq or typed datasets, etc. Personally I've only had to resort to text queries a handful of times over the years, and when I do it's usually something like the following: You set up a small framework and then all you need to do is maintain an Xml file. An single specific xml file is a lot easier to manage an...
[ 0.6030827760696411, 0.20883414149284363, -0.21434541046619415, 0.0651584267616272, 0.007252801675349474, -0.26744353771209717, 0.3031845688819885, 0.03413308411836624, 0.017813388258218765, -0.6934245228767395, -0.055186882615089417, 0.6533687710762024, -0.09788420051336288, -0.30721384286...
Once you've started using the class you can then add things down the road that you can't (easily) do with just a simple string. --- Notepad compiler, so apologies if this isn't 100%. It's just a sketch of how everything interacts. ``` public static class SqlResource { private static Dictionary<string,SqlQuery> ...
[ 0.1761244535446167, -0.1551377773284912, 0.31365707516670227, 0.09318876266479492, -0.08004148304462433, -0.11489012837409973, 0.1948491781949997, -0.09989535808563232, -0.02110464870929718, -0.9416261315345764, -0.12892837822437286, 0.7044020891189575, -0.29664891958236694, 0.225903257727...
{ XmlSerializer deserializer = new XmlSerializer(typeof(List<SqlQuery>)); list = (List<SqlQuery>)deserializer.Deserialize(streamReader); } dictionary = new Dictionary<string,SqlQuery>(); foreach(var item in list ) { dictionary.Add(item.Name,item); ...
[ 0.031983036547899246, -0.5154794454574585, 0.37741565704345703, -0.10033779591321945, -0.21955567598342896, 0.5285075306892395, 0.12060897052288055, -0.394110769033432, -0.10110838711261749, -0.8039148449897766, -0.20425184071063995, 0.5685437321662903, -0.7169345617294312, 0.3350294828414...
public static SqlQuery GetQueryByName(string name) { SqlQuery query = dictionary[name]; if( query == null ) throw new ArgumentException("The query '" + name + "' is not valid."); if( query.IsObsolete ) { // TODO - log this. }
[ -0.24648407101631165, -0.23950529098510742, 0.2603977620601654, 0.12064240872859955, 0.1477295607328415, -0.09607578814029694, 0.3792377710342407, -0.037258293479681015, 0.1703309714794159, -0.26964235305786133, -0.32700785994529724, 0.47452279925346375, -0.5755506753921509, 0.287567824125...
return query; } } public sealed class SqlQuery { [XmlAttributeAttribute("name")] public bool Name { get; set; } [XmlElement("Sql")] public bool Sql { get; set; } [XmlAttributeAttribute("obsolete")] public bool IsObsolete { get; set; } [XmlIgnore] public TimeSpan Timeout { get; s...
[ -0.18136146664619446, -0.06543213129043579, 0.3670719563961029, -0.0019696587696671486, 0.053400199860334396, 0.03546677157282829, -0.03298775851726532, -0.033616747707128525, -0.062153369188308716, -0.46459394693374634, -0.3814195394515991, 0.10623966157436371, -0.2986995577812195, 0.5076...
{ get { return Timeout.ToString(); } set { Timeout = TimeSpan.Parse(value); } } } ``` your xml file might look like ``` <?xml version="1.0" encoding="utf-8"?> <ArrayOfSqlQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SqlQuery name=...
[ -0.21420671045780182, -0.1720900684595108, 0.38161811232566833, -0.021121438592672348, -0.1361420601606369, 0.07614385336637497, 0.04139096289873123, -0.1683405488729477, -0.21812580525875092, -0.788264811038971, -0.21870402991771698, 0.38854408264160156, 0.1225610077381134, 0.149351939558...
</Sql> </SqlQuery> </ArrayOfSqlQuery> ```
[ 0.08810260146856308, 0.41910320520401, 0.3073451817035675, -0.17729797959327698, -0.19368763267993927, -0.14518272876739502, 0.13533872365951538, -0.02158927731215954, -0.29719170928001404, -0.5380308032035828, -0.10458510369062424, 0.2917114496231079, -0.24154944717884064, 0.2475773692131...
I can use VS08's MFC/ActiveX template to create a C++ ActiveX object that I can load into a HTML page and script with Javascript. But I can't figure out how to create an interface that allows me to call custom methods on my component with Javascript. Could you please tell me how to accomplish that? I have spent over t...
[ 0.4901147782802582, 0.07884444296360016, 0.32585543394088745, 0.051653001457452774, -0.1350400447845459, -0.03742184117436409, 0.2800061106681824, -0.238221675157547, -0.15140928328037262, -0.6375585198402405, -0.07494859397411346, 0.6410574316978455, -0.5270704627037048, 0.066555291414260...
Javascript). The methods must also be "automation-compatible", which means that the parameters are convertible to the VARIANT type, or are explicitly of type VARIANT. Note that for in/out parameters, the type must be VARIANT\* for the automation "hookup" to work. I don't know how to make the ActiveX object accessible ...
[ 0.0413815975189209, -0.098108671605587, 0.42743366956710815, -0.17353840172290802, -0.05487054958939552, -0.060120124369859695, 0.05975617468357086, -0.2493439018726349, -0.04006180167198181, -0.6427823305130005, -0.23136423528194427, 0.6273669004440308, -0.6082642674446106, -0.23292197287...
I recently found a log statement in my projects codebase that says "here i am with search parameter==>===========11/30/2008===1====00:00 AM" what guidelines do you adhere to for writing good log messages in an application? That `log' statement looks more like a trace statement. Logging: show the normal events and err...
[ 0.5506384372711182, 0.16642238199710846, 0.3443058133125305, 0.1067468449473381, 0.05777493119239807, -0.4635619819164276, 0.47208431363105774, -0.13002318143844604, -0.33569642901420593, -0.5662178993225098, 0.15291783213615417, 0.3051341772079468, -0.007869754917919636, -0.09185867011547...
types of log messages for context. So you should have 2 log levels at least, and be able to turn off tracing for performance. You should be able to route these event streams to different locations. This allows you to easily keep logs for historical records, while not having them cluttered with debug info that you only...
[ 0.5364091992378235, -0.13061115145683289, 0.13271880149841309, 0.4164755940437317, -0.1642841100692749, -0.5193735957145691, 0.22555865347385406, -0.04068254679441452, -0.5827192068099976, -0.7013055086135864, 0.0395636186003685, 0.32342642545700073, -0.29599449038505554, -0.03157698363065...
be able to include/exclude the date stamp at will via config files, but you won't be able to place or remove log statements without recompiling, so it makes sense to think pretty hard about where they go. Beyond the standard fields, such as timestamp and thread ID, etc, you want to know the class and method name that t...
[ 0.5265374183654785, -0.04475324600934982, -0.09611635655164719, -0.022016214206814766, 0.13457800447940826, -0.3450479805469513, 0.14147520065307617, 0.062153711915016174, -0.46942391991615295, -0.35923370718955994, -0.04200184717774391, 0.15449200570583344, -0.17467841506004333, -0.102125...
is particularly necessary for tracing, but I include it on all my log messages. **Logging**: You want to know enough information about what action is about to be performed to go back and poke around if something goes wrong. Good candidates are message IDs, email addresses, something that uniquely identifies the work...
[ 0.7180241942405701, -0.051480356603860855, 0.30368855595588684, 0.2804105579853058, 0.04902363568544388, -0.23271621763706207, 0.4251534640789032, -0.0172817874699831, -0.29051730036735535, -0.48745742440223694, -0.22411134839057922, 0.23701916635036469, -0.012891692109405994, -0.174304842...
work item we need to look at to see why we failed. Logging exceptions should be paired with an 'attempt' log message, so that the exception message makes sense in context when reading the log. This means thinking about the structure of exception handling. If you are using .net and you only want to log an exception, no...
[ 0.49476590752601624, -0.21189767122268677, -0.045114077627658844, 0.1846112161874771, -0.18022693693637848, -0.17664410173892975, 0.4450325071811676, -0.3410281538963318, -0.333459734916687, -0.8076820969581604, -0.05467165261507034, 0.514775276184082, -0.28930309414863586, -0.388480126857...
at the beginning and end of a method of interest, like bookends. In the entry you can print critical method arguments that affect the program flow. Logging a message at the end of a method is kind of optional, usually you will be interested in looking at the trace sort of like a stack trace. You can figure out the exec...
[ 0.4652573764324188, -0.1261989325284958, 0.14473526179790497, 0.24021397531032562, -0.1858414262533188, -0.2639005482196808, 0.28527015447616577, -0.07999022305011749, -0.44969382882118225, -0.47235536575317383, -0.057218242436647415, 0.5436215400695801, -0.07161552459001541, -0.1847480237...
is to be able to turn tracing off for performance, and have logging be terse enough to leave on, even if a log message is expensive. When correctly done, there shouldn't be enough of them to be a problem.
[ 0.6254646182060242, -0.09293806552886963, 0.24955880641937256, 0.378500372171402, 0.13760553300380707, -0.34167689085006714, 0.3413812518119812, -0.25134366750717163, 0.014670463278889656, -0.45372551679611206, -0.11033060401678085, 0.4424065947532654, -0.10245472192764282, -0.217518612742...
I have a char array buffer that I am using to store characters that the user will input one by one. My code below works but has a few glitches that I can't figure out: 1. when I execute a printf to see what's in Buffer, it does fill up but I get garbage characters at the end 2. it won't stop at 8 characters despite be...
[ 0.003516178345307708, 0.3184451460838318, 0.17174062132835388, -0.27731242775917053, -0.09531884640455246, 0.29026514291763306, 0.4180193841457367, -0.011597595177590847, -0.22231647372245789, -0.5857900381088257, 0.08899839222431183, 0.5454420447349548, -0.24465923011302948, 0.16287507116...
Buffer[i] = charInput; i++; // Display a response to input printf("Buffer is %s!\n", Buffer); } ``` Output: ``` tagBuffer is 1┬┬w! tagBuffer is 12┬w! tagBuffer is 123w! tagBuffer is 1234! tagBuffer is 12345! tagBuffer is 123456=! tagBuffer is 1234567! tagBuffer is 12345678! ``` tagBuffer ...
[ -0.15038101375102997, -0.04916659742593765, 0.268098384141922, -0.261949747800827, -0.15882182121276855, 0.23837339878082275, 0.2443745732307434, -0.3466714322566986, -0.14128299057483673, -0.32808566093444824, -0.21900935471057892, 0.26849228143692017, -0.37576040625572205, 0.034679263830...
I'm checking out the Delphi 2009 Trial, but run into problems with the generics stuff right away. The following code does not compile, and I haven't the slightest idea why it's giving me E2015 for the Equals() method: ``` type TPrimaryKey<T> = class(TObject) strict private fValue: T; public constructor ...
[ -0.17637938261032104, -0.26179277896881104, 0.22724173963069916, -0.21891944110393524, -0.1573505401611328, 0.046241212636232376, 0.38797640800476074, -0.32418644428253174, 0.15154658257961273, -0.6235010027885437, -0.09441858530044556, 0.5805686712265015, -0.6277097463607788, 0.0684763863...
= fValue); end; function TPrimaryKey<T>.GetValue: T; begin Result := fValue; end; ``` Why does the compiler think that fValue and the result of GetValue() can not be compared? What if T is a string? What if it's a TSize record? Without constraining T (e.g. with <T :class>), you can't be sure that the comparison w...
[ 0.0713178887963295, -0.5001540780067444, 0.20793744921684265, -0.03352753445506096, -0.25550878047943115, 0.03175845742225647, 0.2357446551322937, -0.3677622377872467, 0.08106032758951187, -0.4836633503437042, -0.2119903415441513, 0.7840754985809326, -0.43315234780311584, 0.153523936867713...
I have multiple Network Interface Cards on my computer, each with its own IP address. When I use `gethostbyname(gethostname())` from Python's (built-in) `socket` module, it will only return one of them. How do I get the others? Use the [`netifaces`](https://pypi.org/project/netifaces/) module. Because networking is co...
[ 0.22729410231113434, 0.06270326673984528, 0.7748791575431824, -0.14431248605251312, -0.5048828125, 0.03901505470275879, 0.28978046774864197, -0.42864173650741577, -0.34188899397850037, -0.9493250250816345, 0.12438289821147919, 0.6241171956062317, -0.5160799026489258, -0.34513625502586365, ...
netifaces.interfaces(): ... for link in netifaces.ifaddresses(interface)[netifaces.AF_INET]: ... print link['addr'] ... 127.0.0.1 10.0.0.2 ``` This can be made a little more readable like this: ``` from netifaces import interfaces, ifaddresses, AF_INET def ip4_addresses(): ip_list = [] for interface i...
[ 0.24433115124702454, 0.08237555623054504, 0.7513700127601624, -0.26316648721694946, -0.7004073858261108, -0.1866140067577362, 0.300825297832489, -0.363168865442276, -0.7117123603820801, -0.7169162631034851, -0.018570493906736374, 0.23253905773162842, -0.8308190107345581, -0.100966237485408...
and each NIC can have multiple addresses, and each address has its own set of options.
[ 0.6653228402137756, -0.2201993614435196, 0.14380396902561188, 0.44377997517585754, 0.43095332384109497, -0.027267908677458763, -0.0665227621793747, -0.026902927085757256, -0.006840946618467569, -0.5986480712890625, -0.3850921094417572, 0.28558430075645447, -0.11907725781202316, 0.175522893...
I have a system in which different server processes are handling requests passed as JMS messages from various clients via a JMS broker. I am trying to identify the source of the messages. Is there a way to get the IP or some identifying information about the origin ? Clarification: I already have the client deployed ...
[ 0.31794193387031555, 0.11622974276542664, 0.18719594180583954, -0.005438387393951416, -0.13344448804855347, -0.2170974165201187, 0.3660105764865875, 0.14369776844978333, -0.35210180282592773, -0.6204662322998047, -0.19314421713352203, 0.344099223613739, -0.2926991283893585, 0.1099011451005...
support. For example here is [how to enable it in Apache ActiveMQ](http://activemq.apache.org/jmsxuserid.html)
[ 0.1421567052602768, -0.15665224194526672, 0.5786882042884827, 0.1089843288064003, -0.049757737666368484, -0.3455163240432739, 0.4433082044124603, -0.1436661332845688, -0.1666838377714157, -0.47432154417037964, -0.4254302978515625, 0.5109779238700867, -0.2680835425853729, -0.165144592523574...