text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
using the same code on the same conditions (multiple same executable running simultaneously, release mode, etc.) It's simply a bug in your code: finalizers should not be accessing managed objects. The only reason to implement a finalizer is to release unmanaged resources. And in this case, you should carefully impleme...
[ 0.10247290879487991, -0.022351982071995735, -0.06747854501008987, 0.044385358691215515, 0.1112763062119484, -0.39314720034599304, 0.29098814725875854, -0.2745574414730072, -0.37762561440467834, -0.7924111485481262, -0.2758726477622986, 0.3214760422706604, -0.29971954226493835, 0.3767919242...
What are the advantages/disadvantages of the major Ruby VMs (things like features, compatibility, performance, and quirks?) I know there are also some bonus features like being able to use Java interfaces through JRuby, too. Those would also be helpful to note. Does any VM have a clear advantage at this point, and in w...
[ 0.14600548148155212, -0.015181489288806915, 0.04598700627684593, 0.16513405740261078, -0.0892498791217804, -0.3622846007347107, 0.3112204968929291, -0.28248414397239685, -0.22524480521678925, -0.682364821434021, -0.023907853290438652, 0.46531280875205994, -0.1266120821237564, 0.24075630307...
disposing)". When this method is called from the finalizer, it cleans up unmanaged resources, but does not attempt to clean up managed resources. In your example, you don't have any unmanaged resources, so should not be implementing a finalizer.
[ -0.004716190975159407, -0.17470808327198029, 0.18493053317070007, 0.09872488677501678, 0.19144833087921143, -0.23690807819366455, 0.09450394660234451, -0.3275938034057617, -0.23184366524219513, -0.7295156717300415, -0.30284082889556885, 0.3442477285861969, -0.28845712542533875, 0.197679117...
I've got a VS2008 deployment project that builds an installer for a couple of Windows services. Each service references several different projects: ``` CustomerName.MailSendingService -> CustomerName.Network -> CustomerName.Data -> CustomerName.Security CustomerName.ProductIntegrationService -> CustomerName.Cor...
[ 0.302907794713974, 0.22315767407417297, 0.4754182994365692, -0.12735486030578613, 0.017206266522407532, -0.09606489539146423, 0.0893983244895935, -0.037153348326683044, -0.16654528677463531, -0.7683058977127075, -0.4499891400337219, 0.6568177938461304, -0.23729045689105988, 0.0960844531655...
is missing. (`CustomerName.ProductIntegrationService` is missing `CustomerName.Security`) Maddeningly, the DLLs for the other projects referenced by the Windows service are present; just one project's output is missing. (Edit) I've verified that the reference is set to Copy Local in the reference properties window. ...
[ 0.11322861909866333, 0.21555279195308685, 0.35425299406051636, -0.20960822701454163, 0.18016667664051056, -0.0896160826086998, 0.3095336854457855, -0.05030228942632675, -0.27475184202194214, -0.6107695698738098, -0.3712905943393707, 0.5532023310661316, -0.39985817670822144, 0.3525421023368...
of this issue. Why would just one project's output be missing? I have a couple more things to add after reproducing the same suspected msi defect. 1) When I added the second project output sharing the same detected dependency to the installer it did not automatically add the dependency. I removed both project output'...
[ 0.37350764870643616, 0.15018455684185028, -0.051939092576503754, 0.30937135219573975, -0.03522137925028801, -0.13791470229625702, 0.48964160680770874, -0.06551706045866013, -0.30749884247779846, -0.4762299358844757, 0.2167651206254959, 0.6722486019134521, -0.692716658115387, -0.00895364023...
the 'Manually add detected assembly' workaround. Initially we added the dependency from the location in '\Program Files\xxx' but ran into build problems on 64 bit machines where that same dependency was in the '\Program Files (x86)\xxx' folder even though VS is smart enough to handle this problem when picking up refere...
[ 0.4454319477081299, 0.07318099588155746, 0.19926995038986206, -0.3057820200920105, -0.09967582672834396, 0.009513036347925663, 0.21635161340236664, -0.18227022886276245, 0.02866576798260212, -0.8588016629219055, 0.02395871840417385, 0.6714207530021667, -0.49536001682281494, -0.060999974608...
I have a DataGrid, with an ItemTemplate that has an image and label. In the EditItemTemplate the label is replaced by a textbox. My problem is that the edit template only shows when I click the Edit button the second time. What gives? Make sure you're re-binding the DataGrid after setting the EditItemIndex property. E...
[ 0.12529438734054565, -0.07625047862529755, 0.6593334078788757, 0.13634344935417175, -0.26566311717033386, -0.23384271562099457, 0.08906374871730804, -0.2730802297592163, -0.05704718083143234, -0.761127233505249, 0.1558443158864975, 0.7488908767700195, -0.25762414932250977, 0.10710233449935...
I have a data table with a variable number of columns and a data scroller. How can I enable server side sorting? I prefer that it be fired by the user clicking the column header. ``` <rich:datascroller for="instanceList" actionListener="#{pageDataModel.pageChange}"/> <rich:dataTable id="instanceList" rows="10" value="...
[ -0.16363389790058136, 0.10469610244035721, 0.8298767805099487, -0.036159809678792953, -0.03816520422697067, 0.00792369619011879, 0.303534597158432, -0.694388747215271, -0.16482532024383545, -0.5518350005149841, 0.2409999519586563, 0.38123035430908203, -0.12525492906570435, 0.08248405158519...
on the bean for executing the sort. ``` public void sort(int column) ``` I ended up doing it manually. I adding a support tag to the header text tag, like so. ``` <h:outputText value="#{column}"> <a4j:support event="onclick" action="#{pageDataModel.sort(idx)}" eventsQueue="instancesQueue" ...
[ -0.284350723028183, 0.07582390308380127, 0.6192801594734192, -0.09784848242998123, -0.33874380588531494, 0.17867211997509003, 0.2544137239456177, -0.37585338950157166, -0.42402952909469604, -0.5211531519889832, -0.10166136175394058, 0.32036182284355164, -0.6596270799636841, -0.371712833642...
reRender="instanceList,instanceListScroller"/> </h:outputText> ```
[ -0.13678939640522003, 0.33860158920288086, 0.42733657360076904, -0.22915862500667572, -0.13673922419548035, -0.05893954634666443, 0.44838181138038635, -0.3281223773956299, -0.45371532440185547, -0.5719702243804932, -0.512282133102417, 0.45952892303466797, -0.38113507628440857, 0.1928360611...
What is the difference between `bool` and `Boolean` types in C#? `bool` is an alias for `System.Boolean` just as `int` is an alias for `System.Int32`. See a full list of aliases here: [Built-In Types Table (C# Reference)](https://msdn.microsoft.com/en-us/library/ya5y69ds.aspx).
[ 0.09705622494220734, -0.0609099455177784, -0.11556628346443176, 0.07846333831548691, -0.08593877404928207, -0.2763511538505554, 0.38992828130722046, 0.11950748413801193, -0.139593243598938, -0.29361844062805176, -0.12161930650472641, 0.5843722224235535, -0.29877614974975586, 0.230580076575...
I know I can compile individual source files, but sometimes -- say, when editing a header file used by many `.cpp` files -- multiple source files need to be recompiled. That's what Build is for. Default behavior of the "Build" command in VC9 (Visual C++ 2008) is to attempt to compile all files that need it. Sometimes ...
[ 0.49002256989479065, 0.40199026465415955, 0.054464101791381836, -0.17926084995269775, -0.14432871341705322, -0.32953622937202454, 0.6045911908149719, 0.06210637465119362, -0.13711266219615936, -0.4762871563434601, -0.007875326089560986, 0.74640291929245, -0.054273270070552826, -0.037497758...
came up with a better macro guys. It stops immediately after the first error/s (soon as build window is updated). Visual Studio -> Tools -> Macros -> Macro IDE... (or ALT+F11) ``` Private Sub OutputWindowEvents_OnPaneUpdated(ByVal pPane As OutputWindowPane) Handles OutputWindowEvents.PaneUpdated If Not (pPane.Nam...
[ -0.055857304483652115, -0.05724465101957321, 0.7110699415206909, -0.4142594039440155, 0.10729896277189255, 0.21784834563732147, 0.4663415849208832, -0.10187280178070068, -0.1641920506954193, -0.5813710689544678, -0.34086084365844727, 0.7869914770126343, -0.2551243305206299, -0.125413909554...
works out for you guys.
[ 0.5363610982894897, -0.08647565543651581, 0.289642333984375, 0.14837446808815002, 0.6121991872787476, -0.24303677678108215, 0.4056798815727234, 0.6684505343437195, 0.07574672251939774, -0.22089484333992004, 0.24792371690273285, 0.2974681854248047, 0.5893118381500244, -0.32122111320495605, ...
Is there a way to listen for a javascript function to exit? A trigger that could be setup when a function has completed? I am attempting to use a user interface obfuscation technique (BlockUI) while an AJAX object is retrieving data from the DB, but the function doesn't necessarily execute last, even if you put it at ...
[ 0.015259340405464172, -0.20145031809806824, 0.09526745975017548, -0.1296817660331726, -0.19910162687301636, -0.29606369137763977, 0.3841221332550049, -0.2503401041030884, 0.20062696933746338, -0.5073902010917664, 0.06698025017976761, 0.6190426349639893, -0.35319051146507263, -0.09331434965...
a separate thread is spawned to complete each one. So, though my AJAX call might take 10-15 seconds to complete, I am only blocking the user for just a split-second, due to the linear execution of the function. There are less elegant ways around this...putting a loop to end only when a return value set by the AJAX fun...
[ 0.2081069052219391, -0.008497130125761032, 0.12994374334812164, -0.01845111884176731, -0.19643396139144897, -0.3651181757450104, 0.4791134297847748, -0.002128537045791745, -0.0663655623793602, -0.25366780161857605, -0.027251431718468666, 0.5250952839851379, -0.39086228609085083, 0.03520822...
callback(); } ``` Then: ``` function doStuff(){ blockUI(); ajaxCall(unblockUI); } ```
[ -0.4729580581188202, -0.4026910066604614, 0.2962118983268738, -0.15566091239452362, -0.12163790315389633, -0.3029787242412567, 0.24369491636753082, -0.07505951076745987, 0.22048015892505646, -0.5918705463409424, -0.34014108777046204, 0.8711458444595337, -0.3725488483905792, -0.050431128591...
I have an *index.php* file which has to process many different file types. How do I guess the filetype based on the `REQUEST_URI`? If I request `http://site/image.jpg`, and all requests redirect through *index.php*, which looks like this ``` <?php include('/www/site'.$_SERVER['REQUEST_URI']); ?> ``` How would I ...
[ 0.7134501338005066, 0.3479244112968445, 0.3873737156391144, -0.04200246185064316, -0.0789676308631897, 0.0035179476253688335, 0.30457833409309387, -0.2337905615568161, -0.017856581136584282, -0.7371835112571716, 0.1871335655450821, 0.4309658110141754, -0.035370416939258575, 0.2318513840436...
excellent [getID3](http://getid3.sourceforge.net) library which can determine the MIME type of many different file types. Lastly, you can check out the [mime\_content\_type()](http://us3.php.net/manual/en/function.mime-content-type.php) function - but it has been deprecated for the [Fileinfo](http://us3.php.net/manual...
[ 0.03572915121912956, -0.04833221063017845, 0.47471487522125244, 0.08488630503416061, 0.0012049051001667976, -0.17235328257083893, 0.3945671319961548, -0.08361941576004028, -0.11216247826814651, -0.37240293622016907, -0.1654932200908661, 0.6683858036994934, -0.05950983613729477, -0.19150044...
I have some code I've written in PHP for consuming our simple webservice, which I'd also like to provide in Perl for users who may prefer that language. What's the simplest method of making a HTTP request to do that? In PHP I can do it in one line with `file_get_contents()`. Here's the entire code I want to port to Pe...
[ 0.2942425310611725, 0.2282978743314743, 0.530465304851532, 0.07032409310340881, -0.3028242290019989, 0.2630704939365387, -0.041472189128398895, -0.39556998014450073, -0.22351819276809692, -0.3734706938266754, -0.0015091192908585072, 0.406063973903656, -0.08767345547676086, -0.0653988271951...
responses */ function callAPI( $cmd, $argsArray=array() ) { $apikey="MY_API_KEY"; $secret="MY_SECRET"; $apiurl="https://foobar.com/api"; // timestamp this API was submitted (for security reasons) $epoch_time=time(); //--- assemble argument array into string $query = "cmd=" .$cmd; foreach ($ar...
[ -0.2826237678527832, -0.1776810884475708, 0.7354903221130371, -0.17316915094852448, -0.18623493611812592, 0.6744476556777954, 0.2569415271282196, -0.8067559003829956, -0.12552690505981445, -0.330758661031723, -0.40717339515686035, 0.464513897895813, -0.39505326747894287, 0.2773414552211761...
$url = $apiurl . "?" . $query . "&md5=" . $md5; //--- make simple HTTP GET request, put the server response into $response $response = file_get_contents($url); //--- convert "|" (pipe) delimited string to array $responseArray = explode("|", $response); return $responseArray; } ``` LWP::Simple: ``` us...
[ 0.19678474962711334, -0.03233178332448006, 0.6393037438392639, -0.29498550295829773, -0.16717948019504547, 0.17151884734630585, 0.3283417820930481, -0.6698405146598816, -0.07929304987192154, -0.2631836533546448, -0.48910945653915405, 0.7140008211135864, -0.48849156498908997, 0.095217652618...
I have a mindmp file from a target's application crash. Is it possible for me to rebuild the dll/pdb files for a version of software and have windbg load symbols correctly? My problem is that our pdb files are only kept for major releases (unfortunately). This is a daily build, which I can rebuild myself, but I'm get...
[ -0.015433224849402905, 0.15668407082557678, 0.4267154335975647, 0.04613644629716873, -0.30435243248939514, -0.13329856097698212, 0.6499004364013672, -0.3902893662452698, 0.002636210760101676, -0.7509631514549255, 0.0071461996994912624, 0.5807210206985474, -0.10437479615211487, 0.0045385682...
for symbols using debugger-provided data. DBGHELP: C:\...\XXX.pdb - mismatched pdb ``` Note I've build the pdb with the dll, they are from the same RELEASE directory (should I be building debug?) Theses are release builds (as release builds are installed on the target and crashing) should I be somehow using the debu...
[ 0.31938502192497253, 0.22851955890655518, 0.08458365499973297, 0.013408733531832695, -0.14302685856819153, 0.1792752742767334, 0.5784963965415955, -0.21628762781620026, 0.06577348709106445, -0.8201627135276794, -0.03318726643919945, 0.4947948753833771, -0.35292309522628784, -0.017599994316...
the 'load anything' options: .symopt+0x40 to get windbg to ignore the timestamp differences.
[ 0.00867711566388607, -0.417565256357193, 0.29368191957473755, 0.035707809031009674, -0.08342783153057098, -0.33490243554115295, 0.2836207151412964, -0.1283082365989685, -0.16856250166893005, -0.33255016803741455, -0.194895938038826, 0.5528783202171326, -0.24802559614181519, -0.194598570466...
How do I easily undo a git rebase? A lengthy manual method is: 1. checkout the commit parent to both of the branches 2. create and checkout a temporary branch 3. cherry-pick all commits by hand 4. reset the faulty rebased branch to point to the temporary branch In my current situation, this works because I can easily...
[ 0.3031393587589264, 0.22521567344665527, 0.14783892035484314, 0.027567943558096886, -0.028419816866517067, 0.12550896406173706, 0.40638068318367004, -0.2201126664876938, -0.36565130949020386, -0.4812883138656616, -0.21844157576560974, 0.2583344578742981, -0.15341022610664368, 0.13336499035...
replayed, not only one. The easiest way would be to find the head commit of the branch as it was immediately before the rebase started in the [reflog](https://git-scm.com/docs/git-reflog)... ``` git reflog ``` and to reset the current branch to it (with the usual caveats about being absolutely sure before reseting w...
[ 0.01108360942453146, -0.10139530152082443, 0.5041286945343018, 0.08799249678850174, 0.08967942744493484, -0.10784881561994553, 0.3040314316749573, 0.1337498277425766, -0.626265287399292, -0.30965113639831543, -0.194889634847641, 0.7598627805709839, -0.08658467233181, 0.2860408425331116, ...
be able to simply do `git reflog branchname@{1}` as a rebase detaches the branch head before reattaching to the final head. I would double check this, though as I haven't verified this recently. Per default, all reflogs are activated for non-bare repositories: ``` [core] logAllRefUpdates = true ```
[ 0.22193865478038788, -0.07070092111825943, 0.4956389367580414, -0.04290442168712616, 0.18276706337928772, -0.4499290883541107, 0.5084089636802673, 0.09305848181247711, -0.13442790508270264, -0.3668521046638489, -0.4060173034667969, 0.7469465732574463, -0.16440068185329437, 0.10959655046463...
I'd sooner not just permanently have a bunch of files checked out to me, but I'd like a way to prevent some really critical files being changed without my being aware of it. PS Yes I know SourceSafe is terrible. You can only set access rights on a project by project basis. This is done by running the the Source Safe...
[ 0.7419043183326721, 0.07755754888057709, 0.1818801760673523, 0.3324393928050995, 0.05491947755217552, -0.31351882219314575, 0.0839402824640274, -0.030752986669540405, -0.0416959784924984, -0.7337262630462646, 0.10670115798711777, 0.7553497552871704, 0.005466377828270197, 0.3137535750865936...
the subset. When you go into Source Safe if you set the working folder of the sub folder to be the same as the parent then when you do a get latest etc. all the files will be in the same folder. If you want the protected files to be in a seperate folder then set the working folder accordingly.
[ 0.5121504068374634, -0.5869431495666504, 0.1756112277507782, 0.13316242396831512, 0.08854150772094727, -0.4382978081703186, 0.07151126861572266, -0.23593856394290924, 0.13113287091255188, -0.850068211555481, -0.10216475278139114, 0.7074199318885803, -0.21028517186641693, -0.073037035763263...
How do I display a leading zero for all numbers with less than two digits? ```none 1 → 01 10 → 10 100 → 100 ``` In Python 2 (and Python 3) you can do: ``` number = 1 print("%02d" % (number,)) ``` Basically **%** is like `printf` or `sprintf` (see [docs](https://docs.python.org/3/library/stdtypes.html#prin...
[ -0.09228863567113876, -0.01266454067081213, 0.17701728641986847, -0.2528092563152313, -0.39290934801101685, -0.10570041090250015, 0.33882391452789307, -0.27588191628456116, -0.10804551094770432, -0.38131842017173767, 0.020780669525265694, 0.5011171698570251, -0.28635597229003906, -0.272465...
Is it even possible to perform address (physical, not e-mail) validation? It seems like the sheer number of address formats, even in the US alone, would make this a fairly difficult task. On the other hand it seems like a task that would be necessary for several business requirements. Here's a free and sort of "outside...
[ 0.4722314178943634, -0.005508520640432835, 0.3991521894931793, 0.5254007577896118, 0.020766235888004303, -0.24253924190998077, 0.055647604167461395, -0.12343839555978775, 0.08249402046203613, -0.574077308177948, -0.04819879308342934, 0.16909626126289368, 0.001502174767665565, -0.0198985729...
the address is invalid you will get a result of 602 from the service. There's definitely a possibility of false positives or false negatives, but used in conjunction with other consistency checks it could be useful. ([Yahoo's geocoding web service](http://developer.yahoo.com/maps/rest/V1/geocode.html), on the other ha...
[ -0.0738677978515625, 0.17522290349006653, 0.4759055972099304, 0.5440211892127991, 0.09409339725971222, -0.08582258224487305, 0.42553186416625977, 0.044524677097797394, -0.19802498817443848, -0.3438332676887512, -0.38721388578414917, -0.11057231575250626, -0.10785609483718872, 0.30705267190...
How would I be able to get N results for several groups in an oracle query. For example, given the following table: ``` |--------+------------+------------| | emp_id | name | occupation | |--------+------------+------------| | 1 | John Smith | Accountant | | 2 | Jane Doe | Engineer | | 3 | Ja...
[ 0.29591450095176697, 0.23112201690673828, 0.07535432279109955, 0.24925464391708374, 0.6068904399871826, 0.6032892465591431, -0.015701351687312126, -0.3223485052585602, -0.536013662815094, -0.2223222553730011, 0.20781852304935455, 0.3198002576828003, -0.4331289529800415, -0.0713322982192039...
a subquery? This produces what you want, and it uses no vendor-specific SQL features like TOP N or RANK(). ``` SELECT MAX(e.name) AS name, MAX(e.occupation) AS occupation FROM emp e LEFT OUTER JOIN emp e2 ON (e.occupation = e2.occupation AND e.emp_id <= e2.emp_id) GROUP BY e.emp_id HAVING COUNT(*) <= 3 OR...
[ 0.019748635590076447, -0.2594883441925049, 0.5521634817123413, 0.2293715626001358, 0.03647451102733612, 0.37161514163017273, -0.0517583005130291, -0.19251808524131775, -0.10467339307069778, -0.4139426648616791, -0.35934293270111084, 0.13760125637054443, -0.37164753675460815, 0.416356563568...
When generating XML from XmlDocument in .NET, a blank `xmlns` attribute appears the first time an element *without* an associated namespace is inserted; how can this be prevented? Example: ``` XmlDocument xml = new XmlDocument(); xml.AppendChild(xml.CreateElement("root", "whatever:name-space-1.0")); xml.DocumentE...
[ 0.016314100474119186, 0.11811409145593643, 0.320713073015213, -0.033040646463632584, -0.05613931268453598, -0.24363896250724792, 0.0841011181473732, -0.4936007261276245, -0.0074193282052874565, -0.6822115778923035, -0.4056609570980072, 0.5937111377716064, -0.23839624226093292, 0.0414202958...
in any usage that I've seen of this protocol. Thanks to Jeremy Lew's answer and a bit more playing around, I figured out how to remove blank `xmlns` attributes: pass in the root node's namespace when creating any child node you want *not* to have a prefix on. Using a namespace without a prefix at the root means that yo...
[ 0.16008520126342773, 0.12230861186981201, 0.4002528190612793, 0.21553291380405426, -0.025933267548680305, 0.11599425226449966, 0.14067839086055756, -0.24777579307556152, -0.03987769037485123, -0.7872642874717712, -0.32850536704063416, -0.04604034870862961, -0.08572477102279663, 0.227153345...
This may be a matter of style, but there's a bit of a divide in our dev team and I wondered if anyone else had any ideas on the matter... Basically, we have some debug print statements which we turn off during normal development. Personally I prefer to do the following: ``` //---- SomeSourceFile.cpp ---- #define DEB...
[ 0.2549145519733429, 0.012552836909890175, 0.19187191128730774, -0.09935246407985687, 0.07209306955337524, 0.009649737738072872, 0.421812504529953, -0.08676556497812271, -0.14612406492233276, -0.39766132831573486, -0.32511407136917114, 0.7129274010658264, -0.1961357593536377, -0.11782290786...
you and why? My feeling is that the first is safer because there is always something defined and there's no danger it could destroy other defines elsewhere. My initial reaction was *`#ifdef`, of course*, but I think `#if` actually has some significant advantages for this - here's why: First, you can use `DEBUG_ENABLED...
[ 0.41680675745010376, -0.060864176601171494, 0.21499407291412354, -0.0855507105588913, -0.03664713352918625, -0.10589621216058731, 0.2047385275363922, -0.5733298063278198, -0.22966225445270538, -0.5802468061447144, -0.04001883417367935, 0.7661135792732239, -0.1463206559419632, 0.01427487935...
to a global constant. `#define`s are usually frowned on by most C++ programmers. And, Third, you say you've a divide in your team. My guess is this means different members have already adopted different approaches, and you need to standardise. Ruling that `#if` is the preferred choice means that code using `#ifdef` wi...
[ 0.15695911645889282, -0.012426439672708511, -0.07968076318502426, 0.03954562172293663, -0.002434495138004422, -0.305311381816864, 0.05126606300473213, 0.07511317729949951, -0.2694239914417267, -0.4058225750923157, -0.07953783869743347, 0.6100475192070007, -0.4226158857345581, 0.12525230646...
the value is a single lexical token, it's the one time you don't need parentheses around it. ``` #define DEBUG_ENABLED true ``` instead of ``` #define DEBUG_ENABLED (1) ```
[ 0.09222861379384995, 0.18505974113941193, 0.09374815970659256, -0.05705631151795387, 0.15665121376514435, -0.28173303604125977, 0.22644272446632385, 0.014248901978135109, 0.024242589250206947, -0.2565016448497772, -0.4217563569545746, 0.556265652179718, -0.4596269428730011, -0.226847082376...
I have developed in C++ many years ago, but these days I am primarily a Java software engineer. Given I own an iPhone, am ready to spring for a MacBook next month, and am generally interested in getting started with Mac OS developmentmt (using Objective C), I thought I would just put this question out there: What Next?...
[ 0.29199233651161194, 0.4977364242076874, 0.18639430403709412, -0.12658335268497467, 0.36685818433761597, -0.11891262978315353, 0.1485205441713333, 0.2275792956352234, -0.3270781636238098, -0.4718289077281952, -0.024809377267956734, 0.6853675246238708, 0.043429844081401825, -0.3930976986885...
these titles? Finally, I would be very interested in a summary of what I should be prepared to expect, once I embark on this journey. As someone that develops in Java using IntelliJ IDEA, what are some key differences I will notice as I move over to writing ObjectiveC code in Xcode? What's the differences between Mac O...
[ 0.30522769689559937, 0.3032335638999939, 0.06374186277389526, 0.3343852460384369, -0.134296253323555, -0.16359011828899384, 0.06992235779762268, 0.13394981622695923, -0.2589951455593109, -0.5388385057449341, 0.009243637323379517, 0.4761376678943634, 0.2266252338886261, -0.08549880981445312...
Swing, building Visual C++ resource files that code interacts with, or is it more like some of the borland IDEs that will generate code for guis? Having purchased both of the books in your question, I recommend Cocoa Programming for Mac OS X as a quick way to learn the language and the Cocoa framework, and is probably ...
[ 0.6944660544395447, 0.2475302368402481, -0.1374240517616272, 0.2388545572757721, -0.29575619101524353, -0.38274696469306946, -0.039210572838783264, -0.12653201818466187, -0.4457399249076843, -0.10911636799573898, 0.1829068809747696, 0.5361257195472717, -0.05033993721008301, -0.408563554286...
the other book. However, if you ever need to a list of all the reserved keywords in Objective-C, that's the book to go to. All of the user interface can be generated progmatically, but you'll find it much easier to use Interface Builder, which comes with XCode, to lay out the user interface. You'll end up with a lot l...
[ 0.14091046154499054, 0.1969725489616394, 0.09234859049320221, 0.20057621598243713, -0.35871171951293945, -0.29110950231552124, -0.08836163580417633, -0.14843186736106873, -0.380128413438797, -0.5353403687477112, 0.18466483056545258, 0.7562789916992188, -0.4422244131565094, -0.2808848917484...
Cocoa, you just get NSSet, NSArray, and NSDictionary, and there's no analog to the Comparable interface. These classes are also immutable, but have mutable versions such as NSMutableArray. I actually haven't played with the Garbage Collection in Objective-C 2.0. In previous versions of Objective-C, memory management w...
[ -0.03128397837281227, 0.056356970220804214, 0.06538891792297363, 0.052910421043634415, -0.1834624707698822, -0.11260611563920975, -0.10010917484760284, 0.1930217444896698, -0.6936557292938232, -0.24799507856369019, -0.008396631106734276, 0.824793815612793, -0.281415194272995, -0.0917257890...
autorelease methods do nothing. However, if you are writing a library or framework to be used by others, you should program it as if garbage collection is turned off. That way applications can use it whether or not they have garbage collection turned on. As for Web resources, <http://cocoadevcentral.com/> is a great s...
[ 0.31487417221069336, -0.019162386655807495, 0.12693220376968384, 0.019699500873684883, -0.4654034674167633, 0.08231844007968903, 0.35301700234413147, 0.030491426587104797, -0.6096554398536682, -0.49415016174316406, -0.0833975225687027, 0.8284818530082703, -0.34062641859054565, -0.493611574...
get approved by Apple to get access to the iPhone developer center, Apple has provided some great video overviews of the differences, which point you to the documentation you need to make the jump from Mac OS X to iPhone OS X programming.
[ 0.5494531989097595, 0.14542046189308167, 0.24917039275169373, 0.10279838740825653, 0.3133348524570465, -0.12187417596578598, 0.05151999741792679, -0.02926112711429596, -0.16835500299930573, -0.4749310612678528, -0.011602399870753288, 0.5136106610298157, 0.01483872439712286, -0.150120452046...
So in my documentation it says: > public event TreeViewPlusNodeCheckedEventHandler NodeChecked() > > > You can use this event to run cause a method to run whenever the > check-box for a node is checked on the tree. So how do I add a method to my code behind file that will run when a node is checked? The method I w...
[ 0.28002771735191345, -0.08244092017412186, 0.5147387385368347, -0.24372565746307373, 0.002052183961495757, -0.3809331953525543, 0.5660542249679565, -0.30033764243125916, -0.38956815004348755, -0.4938409924507141, -0.09128229320049286, 0.4830387830734253, -0.46773889660835266, 0.13414141535...
List<MapResourceItem> mapResources = new List<MapResourceItem>(); if (BaseLayers.Contains(aNode.Text)) { foreach (BaseDataLayerElement anEl in _arcTOCConfig.BaseDataLayers) { if (!aNode.Text.Equals(anEl.Name)) { if (aNode.TreeViewPlus.Nodes.FindByValue(an...
[ 0.039294853806495667, -0.1643737107515335, 0.6495813131332397, -0.31589430570602417, 0.08048012852668762, -0.008482672274112701, 0.3377295136451721, -0.598988950252533, -0.3073538839817047, -0.5824129581451416, -0.22427056729793549, 0.5135589241981506, -0.4397110939025879, -0.0333034582436...
aNode.TreeViewPlus.Nodes.FindByValue(anEl.Name).Checked = false; aNode.TreeViewPlus.Nodes.FindByValue(anEl.Name).Refresh(); MapResourceItem aMapResource = this.Map1.MapResourceManagerInstance.ResourceItems.Find(anEl.Name); aMapResource.DisplaySettings.Visible ...
[ -0.43697112798690796, -0.2807319462299347, 0.26454097032546997, -0.2536231279373169, 0.03369327262043953, 0.16525240242481232, 0.7365100383758545, -0.13678376376628876, -0.48970651626586914, -0.6645288467407227, -0.43304145336151123, 0.4130343496799469, -0.323813796043396, 0.09810042381286...
this.Map1.RefreshResource(anEl.Name); mapResources.Add(aMapResource); this.Map1.MapResourceManagerInstance.ResourceItems.Remove(aMapResource); } else {
[ -0.35867512226104736, -0.4367019236087799, 0.3078154921531677, -0.23349589109420776, 0.23446549475193024, 0.131517231464386, 0.4101761281490326, -0.3934582471847534, -0.3353568911552429, -0.6963868737220764, -0.35074883699417114, 0.7958646416664124, -0.3114623725414276, -0.0354225598275661...
MapResourceItem aMapResource = this.Map1.MapResourceManagerInstance.ResourceItems.Find(anEl.Name); mapResources.Add(aMapResource); this.Map1.MapResourceManagerInstance.ResourceItems.Remove(aMapResource); } } } foreach (MapResourceItem...
[ -0.42248043417930603, -0.13806568086147308, 0.3472464978694916, -0.30329495668411255, 0.29412370920181274, 0.27919474244117737, 0.3291531503200531, -0.4103858768939972, -0.24912339448928833, -0.6086438298225403, -0.444621205329895, 0.7803717255592346, -0.24302458763122559, 0.01336694508790...
{ int count = this.Map1.MapResourceManagerInstance.ResourceItems.Count - 1; this.Map1.MapResourceManagerInstance.ResourceItems.Insert(count, aMapResource); this.Map1.MapResourceManagerInstance.CreateResource(aMapResource); } this.Map1.InitializeFunctionalities(); ...
[ 0.04860036447644234, -0.4991973340511322, -0.09958870708942413, 0.2483333945274353, -0.04001757502555847, -0.2077699601650238, 0.2768585979938507, -0.42979735136032104, -0.3622456192970276, -0.5086764097213745, -0.2982974946498871, 0.42742353677749634, -0.30711808800697327, 0.0607597678899...
new TreeViewPlusNodeCheckedEventHandler(TOCNodeCheckedServer)
[ -0.20253831148147583, -0.18540909886360168, 0.27200421690940857, -0.13100145757198334, -0.27701377868652344, -0.2609638571739197, 0.5155569314956665, -0.03292091190814972, -0.513038694858551, -0.6381785273551941, -0.5001515746116638, -0.09251008927822113, 0.009611206129193306, -0.047281406...
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of...
[ 0.6892784237861633, 0.12530900537967682, 0.18887853622436523, 0.14570286870002747, -0.20926125347614288, 0.06959769874811172, 0.007333650719374418, -0.00017358706099912524, -0.34330952167510986, -0.5455018281936646, 0.07920688390731812, 0.4851462244987488, -0.21602527797222137, 0.120981507...
give you a little insight. * Fetching feeds. Fetching lots of feeds by cron jobs (it was the only solution until SDK 1.2.5) is not efficient and scalable, which has lower limit on job frequency (say 1 min, so you could only fetch at most 60 feeds hourly). And with latest SDK 1.2.5, there is [XMPP API](http://drupal.or...
[ 0.5338090062141418, -0.03078320622444153, 0.4984619617462158, 0.06231209635734558, -0.23235966265201569, 0.0659293532371521, 0.11359738558530807, -0.1199248656630516, -0.4307996332645416, -0.8176796436309814, -0.14542821049690247, 0.7103210687637329, -0.5170800685882568, -0.208657681941986...
You may already know that parsing feeds is cpu-intensive. I use [Universal Feed Parser](http://www.feedparser.org/) by Mark Pilgrim, when parsing a large feed (say a public google reader topic), AppEngine may fail to process all entries. My dashboard have a lot of these CPU-limit warnings. But it may result in my incap...
[ 0.5133612155914307, 0.24406161904335022, -0.17403548955917358, 0.04063240438699722, -0.09864239394664764, 0.2676076889038086, 0.23439496755599976, 0.24577750265598297, -0.38155806064605713, -0.6648036241531372, 0.23235565423965454, 0.3726204037666321, -0.8550153374671936, -0.10136027634143...
On the web side we are working on getting source control. Now, I want to see what can be done for the iSeries side. What is your favorite source control application for iSeries and why? I am looking for low-cost if possible. The two most common source control packages for the iSeries are [Turnover](http://www.softlandi...
[ 0.3161388635635376, -0.19501851499080658, 0.1630549132823944, 0.08623243123292923, 0.3172619342803955, 0.033601272851228714, -0.6200177669525146, 0.3365529477596283, -0.267647922039032, -0.4440792202949524, -0.10275653749704361, 0.7318102121353149, 0.12398678064346313, 0.003983085043728352...
I have always wondered WHaT tHE *HecK?!?* is the difference between JScript and JavaScript. Just different names for what is really ECMAScript. John Resig has a [good explanation](http://ejohn.org/blog/versions-of-javascript/). Here's the full version breakdown: * IE 6-7 support JScript 5 (which is equivalent to ECMA...
[ 0.2937464118003845, 0.2870890200138092, 0.608849048614502, -0.36570650339126587, -0.18868207931518555, -0.26015007495880127, 0.6154903769493103, -0.40559130907058716, -0.13978058099746704, -0.571403980255127, -0.3695731461048126, 0.9466058611869812, -0.6729274392127991, -0.5024309158325195...
3.0 supports JavaScript 1.8 (1.7 + Generator Expressions + Expression Closures + misc.) * The next version of Firefox will support JavaScript 1.9 (1.8 + To be determined) * Opera supports a language that is equivalent to ECMAScript 3 + Getters and Setters + misc. * Safari supports a language that is equivalent to ECMAS...
[ 0.021990470588207245, 0.04970107972621918, 0.552442193031311, -0.3880094587802887, -0.14028316736221313, -0.12870587408542633, 0.6457105875015259, -0.20000571012496948, -0.25315314531326294, -0.6651788353919983, -0.37951919436454773, 0.6183379292488098, -0.7797795534133911, -0.538634777069...
Haven't done ASP.NET development since VS 2003, so I'd like to save some time and learn from other's mistakes. Writing a web services app, but not a WSDL/SOAP/etc. -- more like REST + XML. Which of the many "New Item" options (Web Form, Generic Handler, ASP.NET Handler, etc.) makes the most sense if I want to handle...
[ -0.05687472224235535, -0.12791866064071655, 0.07026978582143784, -0.0368766225874424, -0.57097327709198, 0.11351536959409714, 0.5772542953491211, 0.04251827672123909, -0.35135364532470703, -0.8743962049484253, -0.0006681601516902447, 0.39797526597976685, -0.24096034467220306, -0.3369515538...
in web services (*.asmx), then you should probably use a generic handler (*.ashx).
[ 0.6261773705482483, -0.1365177035331726, -0.21538510918617249, 0.17209286987781525, -0.26035240292549133, -0.3449639678001404, 0.2448725551366806, 0.24518048763275146, -0.36847037076950073, -0.5224421620368958, -0.27861371636390686, 0.1688687652349472, -0.3108655512332916, 0.09914691746234...
I frequently come across Windows programs that bundle in MSVCRT (or their more current equivalents) with the program executables. On a typical PC, I would find many copies of the same .DLL's. My understanding is that MSVCRT is the C runtime library, somewhat analogous to glibc/libc.so under \*nix. Why do Windows progr...
[ 0.32490283250808716, 0.32331717014312744, -0.040616702288389206, 0.004287317860871553, -0.22834984958171844, -0.33310675621032715, -0.04521896690130234, 0.35613521933555603, -0.35705843567848206, -0.3928101658821106, -0.12293290346860886, 0.478900671005249, -0.07161556929349899, 0.32644549...
current maintainer of the Native SxS technology at Microsoft] New versions of MSVCRT are released with new versions of Visual Studio, and reflect changes to the C++ toolset. So that programs compiled with versions of VS released after a particular version of Windows continue can work downlevel (such as VS 2008 project...
[ -0.05753178149461746, 0.028480347245931625, 0.711447536945343, 0.05896511673927307, 0.2669887840747833, -0.17290662229061127, 0.45580682158470154, 0.006396246608346701, -0.0475713387131691, -0.5148728489875793, -0.4947221577167511, 0.4552440643310547, -0.28817206621170044, 0.32064175605773...
administrator privileges on the machine to run their installer, they bundle the CRT directly in the same directory as the application, for private use. So on a typical machine, you'll find many programs that have opted for this solution.
[ 0.1645728200674057, 0.061530664563179016, 0.24436119198799133, 0.39722293615341187, 0.18829599022865295, -0.5254232287406921, -0.17259983718395233, 0.14907272160053253, -0.5584903359413147, -0.7273290157318115, -0.3294740915298462, 0.5152014493942261, -0.1768169403076172, 0.288271129131317...
We have a Silverlight 2 project (game) that will require a lot of character animation. Can anyone suggest a good way to do this. Currently we plan to build the art in Illustrator, imported to Silverlight via Mike Snow's plug-in as this matches the skills our artists have. Is key framing the animations our only option ...
[ 0.8313450217247009, 0.04007595404982567, 0.28008049726486206, 0.40627381205558777, -0.07137668132781982, 0.25935098528862, -0.36682501435279846, -0.044415783137083054, -0.4484979808330536, -0.7738000154495239, 0.21659590303897858, 0.24893109500408173, -0.13499213755130768, -0.2488743960857...
for the image to display a specific piece of a larger image, like a sprite sheet. This may or may not be more performant than swapping pngs. Also you could use the ImageBrush on a Rectangle to show just what you want, this would probably be a bit more efficient than the Clip property.
[ 0.6324084401130676, -0.42104941606521606, 0.39097410440444946, 0.5192266702651978, -0.3386791944503784, 0.06072643771767616, -0.3298512399196625, -0.23074910044670105, -0.24457880854606628, -0.6014297604560852, 0.3708726763725281, 0.5701749324798584, -0.09954088926315308, -0.02581387013196...
What is the fastest list implementation (in java) in a scenario where the list will be created one element at a time then at a later point be read one element at a time? The reads will be done with an iterator and then the list will then be destroyed. I know that the Big O notation for get is O(1) and add is O(1) fo...
[ -0.051163215190172195, -0.04360063746571541, 0.1447041630744934, -0.015794718638062477, 0.04021574184298515, -0.07611845433712006, 0.06830139458179474, -0.35325223207473755, -0.4475279748439789, -0.6824319362640381, 0.0789809450507164, 0.4916480481624603, -0.455457866191864, -0.20817331969...
list up front. If you do, use `ArrayList`; it will certainly be faster. Otherwise, you'll probably have to profile. While access to the `ArrayList` is O(1), creating it is not as simple, because of dynamic resizing. Another point to consider is that the space-time trade-off is not clear cut. Each Java object has qui...
[ 0.35442808270454407, -0.14517664909362793, 0.34196731448173523, -0.009007030166685581, -0.18673747777938843, -0.07159139215946198, 0.05478862673044205, -0.34848377108573914, -0.5239629149436951, -0.7410218119621277, -0.031290341168642044, 0.21373967826366425, -0.3612169027328491, -0.171114...
few wasted slots in an `ArrayList` before a `LinkedList` actually wins its presumed space advantage. Locality of reference is also a factor, and `ArrayList` is preferable there too. In practice, I almost always use `ArrayList`.
[ 0.1832035481929779, 0.1582857370376587, 0.001166623318567872, 0.07128332555294037, -0.042646683752536774, -0.21599559485912323, -0.13555660843849182, -0.040721021592617035, -0.20114226639270782, -0.7457138895988464, -0.17445997893810272, 0.3830115795135498, -0.10716799646615982, -0.0110120...
When running a CherryPy app it will send server name tag something like CherryPy/version. Is it possible to rename/overwrite that from the app without modifying CherryPy so it will show something else? Maybe something like MyAppName/version (CherryPy/version) Actually asking on IRC on their official channel fumanchu ...
[ 0.09392499923706055, -0.12515468895435333, 0.6298931837081909, -0.02637273259460926, -0.12425387650728226, -0.03378662094473839, 0.6352657675743103, 0.22541886568069458, -0.119876429438591, -0.5273375511169434, -0.2208544760942459, 0.5979812145233154, -0.2985946536064148, 0.088315747678279...
'tools.response_headers.headers': [('Server', serverTag)]}) cherrypy.quickstart(HelloWorld()) ```
[ -0.13597050309181213, -0.4612220525741577, 0.18644417822360992, -0.07206274569034576, 0.22905400395393372, -0.1428615301847458, 0.5723767876625061, 0.5678440928459167, -0.016106879338622093, -0.6128588318824768, -0.3865337669849396, 0.646800696849823, -0.36699020862579346, -0.0397789701819...
Does anybody know if there is a built-in function in Mathematica for getting the lhs of downvalue rules (without any holding)? I know how to write the code to do it, but it seems basic enough for a built-in For example: ``` a[1]=2; a[2]=3; ``` `BuiltInIDoNotKnowOf[a]` returns `{1,2}` This seems to work; not sure ho...
[ -0.22553254663944244, 0.28776562213897705, 0.22447237372398376, 0.016420919448137283, 0.016005896031856537, -0.055321842432022095, 0.219695046544075, -0.17930221557617188, -0.11487002670764923, -0.2501092553138733, -0.069420225918293, 0.6251778602600098, -0.10790099203586578, -0.2497563809...
There are a group of private methods in my class, and I need to call one dynamically based on an input value. Both the invoking code and the target methods are in the same instance. The code looks like this: ``` MethodInfo dynMethod = this.GetType().GetMethod("Draw_" + itemType); dynMethod.Invoke(this, new object[] { ...
[ 0.030207261443138123, 0.0086747407913208, 0.5470166206359863, 0.08150164037942886, -0.05909983068704605, 0.06024859845638275, 0.3224640488624573, -0.45880308747291565, -0.12034047394990921, -0.5707909464836121, -0.13877949118614197, 0.4588378071784973, -0.5977351069450378, 0.19073991477489...
object[] { methodParams }); ``` Here's the [BindingFlags enumeration documentation](http://msdn.microsoft.com/en-us/library/system.reflection.bindingflags.aspx).
[ -0.02713978849351406, 0.14532417058944702, 0.753538966178894, -0.018211975693702698, -0.3119519054889679, -0.24013081192970276, 0.38405781984329224, -0.4725811183452606, -0.3509746491909027, -0.5060243010520935, -0.3759331703186035, 0.2490139603614807, -0.3029312193393707, 0.09164690971374...
Suppose I have the following code: ``` while(TRUE) { pthread_t *thread = (pthread_t *) malloc(sizeof(pthread_t)); pthread_create(thread, NULL, someFunction, someArgument); pthread_detach(*thread); sleep(10); } ``` Will the detached thread free the memory allocated by malloc, or is that something I now have t...
[ 0.07791461795568466, 0.006729792803525925, 0.4087117314338684, -0.29338136315345764, 0.3501265347003937, -0.020122438669204712, 0.2309962809085846, -0.08020675927400589, -0.21249882876873016, -0.6574673652648926, -0.3486596345901489, 0.3425579071044922, -0.19957157969474792, 0.255031794309...
In WPF, we are creating custom controls that inherit from button with completely drawn-from-scratch xaml graphics. We have a border around the entire button xaml and we'd like to use that as the location for updating the background when MouseOver=True in a trigger. What we need to know is how do we update the backgroun...
[ 0.392713338136673, -0.29258817434310913, 0.4786372482776642, 0.12053721398115158, 0.28474363684654236, -0.19160428643226624, -0.03195783123373985, -0.5778427720069885, -0.19202770292758942, -0.5605561137199402, 0.18727286159992218, 0.4014449417591095, -0.38441604375839233, -0.2104898840188...
`Button`: ``` <Style TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border Name="customBorder" CornerRadius="5" BorderThickness="1"
[ -0.06007197126746178, -0.3140411376953125, 0.9112940430641174, 0.2613903284072876, 0.06536532938480377, -0.12250987440347672, -0.06286617368459702, -0.3735254108905792, -0.3310212194919586, -0.7570284605026245, 0.07659396529197693, 0.20637546479701996, -0.12919314205646515, 0.2822940945625...
BorderBrush="Black" Background="{StaticResource normalButtonBG}"> <ContentPresenter HorizontalAlignment="Center"
[ -0.042979296296834946, -0.2747175991535187, 0.5146867036819458, 0.21995632350444794, 0.28654372692108154, -0.12338720262050629, 0.2798265814781189, 0.0044273920357227325, -0.1101263239979744, -0.4138748347759247, -0.23859436810016632, 0.04901286959648132, -0.43271464109420776, 0.1324360370...
VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver"
[ -0.39714866876602173, -0.545986533164978, 0.6726310849189758, 0.11401213705539703, 0.3326933681964874, 0.26877257227897644, 0.19705729186534882, -0.10519304126501083, -0.5116705894470215, -0.735437273979187, -0.15903930366039276, -0.07785293459892273, -0.2687079608440399, 0.468703329563140...
Value="True"> <Setter TargetName="customBorder" Property="Background"
[ 0.21650411188602448, -0.28643548488616943, 0.1007220596075058, -0.003579475451260805, 0.12119100987911224, 0.10559895634651184, 0.21850214898586273, -0.11871363967657089, -0.1415073722600937, -0.22785279154777527, -0.2849366068840027, 0.5959440469741821, -0.13132888078689575, 0.06824877113...
Value="{StaticResource hoverButtonBG}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> ``` If that doesn't help, we'll need to know more, probably seeing your own XAML. Your description doesn't make it very cle...
[ 0.31419384479522705, -0.03251953423023224, 0.33670321106910706, 0.11337761580944061, 0.04721744731068611, -0.16737119853496552, -0.3231194317340851, -0.1672622263431549, -0.3152255117893219, -0.42960238456726074, 0.018108904361724854, 0.253152996301651, -0.3060707449913025, 0.0758753344416...
your actual visual tree is.
[ 0.5907178521156311, -0.15171660482883453, 0.012119784951210022, 0.2186560481786728, -0.02012350969016552, 0.17664654552936554, 0.03337801620364189, 0.27575841546058655, -0.3033866584300995, -0.6118065118789673, 0.054985400289297104, 0.3132874369621277, -0.09359301626682281, -0.204885557293...
I have an index on columns A, B, C, D of table T I have a query that pulls from T with A, B, C in the WHERE clause. Will the index be used or will a separate index be needed that only includes A, B, C? David B is right that you should check the execution plan to verify the index is being used. > Will the index be us...
[ 0.09024512022733688, 0.24473516643047333, 0.427154004573822, -0.09678057581186295, -0.0800539031624794, 0.25063538551330566, -0.1632886677980423, -0.1248573511838913, 0.07010858505964279, -0.43659740686416626, -0.026691924780607224, 0.20309948921203613, -0.3625354468822479, 0.2275357991456...
solution), there is *almost* never a reason to index a subset of your indexed columns. If your index is (A, B, C, D), a WHERE against (A, B, C) will most likely result in an index **seek**, which is the ideal situation -- the index includes all the information the engine needs to go directly to the result set. I believ...
[ -0.37792065739631653, 0.1029275581240654, 0.47385650873184204, 0.13578322529792786, 0.06715380400419235, 0.16590307652950287, 0.363882452249527, -0.27742576599121094, -0.011880435980856419, -0.6022111773490906, -0.10435747355222702, 0.36148449778556824, -0.5061806440353394, 0.1498492807149...
an index **scan**, which would mean that the SQL engine would have to scan across all combinations of A, B, and C, and then check whether D met your criteria before deciding whether to add the row to the result set. On a particularly large table, when I found myself having to do a lot of queries against column "D", I a...
[ 0.16215068101882935, -0.06395186483860016, 0.5135916471481323, 0.18037813901901245, -0.17857959866523743, -0.05042321979999542, 0.170155867934227, -0.30648380517959595, -0.039852600544691086, -0.535136878490448, 0.08207464963197708, 0.5905230641365051, -0.20322200655937195, -0.044408243149...
query you want to run.
[ 0.3080984354019165, 0.05875461548566818, 0.01151933055371046, 0.31984955072402954, -0.26527589559555054, -0.050388164818286896, 0.18925800919532776, 0.038032982498407364, -0.4031466543674469, -0.3333931267261505, 0.10652056336402893, 0.3793964982032776, -0.6095105409622192, 0.1134619116783...
I'm a PHPer, and am not writing object-oriented code. What are the advantages of OO over procedural code, and where can I learn how to apply these ideas to PHP? **It doesn't help you automatically.** You can write worse "OO" programs than structural programs, and vice versa. OOP is a tool which allows you to create mo...
[ 0.37312859296798706, 0.3723914921283722, 0.16960610449314117, 0.16815827786922455, -0.2683179974555969, -0.08064231276512146, 0.29794225096702576, 0.07414745539426804, -0.2942643165588379, -0.6698197722434998, 0.25908350944519043, 0.3995112478733063, 0.031030016019940376, -0.40561646223068...
to practice a lot. * As with every powerful tool you should read a lot about it, and read what other people think. Learn from others. * But, as with every powerful tool, there are people out there who misuse it. Learn to not learn bad practices from them. This is hard.
[ 0.8198800683021545, 0.05624410882592201, -0.6830071210861206, 0.031648412346839905, -0.2678576707839966, -0.11697414517402649, 0.8529306650161743, -0.06686151772737503, -0.04511386901140213, -0.8708490133285522, 0.2659164369106293, 0.7940777540206909, -0.01585843414068222, -0.1978659331798...
In the (otherwise) excellent book [C++ Coding Standards](http://www.gotw.ca/publications/c++cs.htm), Item 44, titled **"Prefer writing nonmember nonfriend functions"**, Sutter and Alexandrescu recommend that only functions that really need access to the members of a class be themselves members of that class. All other ...
[ -0.11816544085741043, -0.11522728204727173, -0.18787233531475067, -0.0008320787455886602, -0.0656435564160347, -0.088409423828125, 0.2438502460718155, -0.20344889163970947, -0.14072005450725555, -0.29196134209632874, -0.6000785827636719, 0.41294965147972107, -0.3228756785392761, -0.0865802...
some function is a member or not. * It keeps the class small, which in turn makes it easier to test and maintain. Although I see the value in these argument, I see a huge drawback: **my IDE can't help me find these functions!** Whenever I have an object of some kind, and I want to see what operations are available on ...
[ 0.3416978418827057, 0.06802333891391754, -0.06449373066425323, 0.2592620551586151, -0.12776178121566772, -0.18406137824058533, 0.664327085018158, -0.08156968653202057, -0.5056255459785461, -0.37191563844680786, -0.14840075373649597, 0.2750818431377411, -0.07510866969823837, 0.2781360149383...
really worth the trouble. **How do you deal with that?** I'm going to have to disagree with Sutter and Alexandrescu on this one. I think if the behavior of function `foo()` falls within the realm of class `Bar`'s responsibilities, then `foo()` should be part of `bar()`. The fact that `foo()` doesn't need direct access...
[ 0.6487227082252502, 0.48941007256507874, 0.06779903918504715, -0.030800143256783485, -0.15122395753860474, -0.10304807871580124, 0.16614969074726105, -0.31139105558395386, -0.2152748703956604, -0.27995410561561584, 0.0827607586979866, 0.47517985105514526, -0.16252043843269348, 0.2683293223...
that peripherally-related functions should *not* be part of the class, but if something is core to the class responsibilities, there's no reason it shouldn't be a member, regardless of whether it is directly mucking around with the member data. As for these specific points: > *It promotes encapsulation, because there...
[ 0.08666197210550308, -0.2570019066333771, -0.01587514393031597, 0.32327601313591003, 0.0029682395979762077, -0.07946442812681198, -0.1302926391363144, 0.32011479139328003, -0.24893349409103394, -0.3006604015827179, -0.11301781982183456, 0.3770935535430908, -0.03212219104170799, 0.205542489...
a half-class, that requires a bunch of external functions to be useful. Pulling well-factored functions away from their classes also seems to discourage the writing of well-factored functions. > *It makes writing function templates easier, because you don't have to guess each time whether some function is a member or ...
[ 0.25087448954582214, -0.12119871377944946, -0.13606898486614227, 0.2973245084285736, -0.28247618675231934, -0.03505898639559746, 0.3300809860229492, 0.003443573135882616, -0.014875651337206364, -0.3636190593242645, -0.18110716342926025, 0.34282606840133667, -0.29841354489326477, 0.25595155...
classes is going to be converted into a template (ugh). > *It keeps the class small, which in turn makes it easier to test and maintain.* Um, sure. It also creates a lot of additional, external functions to test and maintain. I fail to see the value in this.
[ 0.2832774519920349, -0.12367663532495499, -0.0612667053937912, 0.2911745309829712, -0.029881995171308517, -0.11798089742660522, 0.30559155344963074, 0.2574896216392517, -0.015219433233141899, -0.7878021597862244, -0.031123947352170944, 0.24477554857730865, -0.27331578731536865, 0.054469089...
Is there such a thing as too many stored procedures? I know there is not a limit to the number you can have but is this any performance or architectural reason not to create hundreds, thousands?? To me the biggest limitation to that hundreds or thousands store procedure is maintainability. Even though that is not a di...
[ 0.6958382725715637, 0.21680821478366852, -0.006722544319927692, 0.25539660453796387, 0.206791490316391, -0.013565420173108578, 0.24733418226242065, 0.12287595868110657, -0.3617054224014282, -0.5825628042221069, 0.17871780693531036, 0.5362488627433777, -0.14887425303459167, 0.10037045180797...
NHibernate, .NET LINQ I would try to keep as much store procedures logic in the code, and only put it in the database when speed is a factor.
[ 0.0646425262093544, 0.018364332616329193, 0.2824523150920868, 0.1532105654478073, -0.2652711272239685, -0.14868031442165375, 0.09967545419931412, 0.017810311168432236, -0.1858169585466385, -0.6625579595565796, 0.3412565290927887, 0.41540926694869995, -0.3112536072731018, 0.0695910751819610...
It is typical to have something like this in your cshrc file for setting the path: ``` set path = ( . $otherpath $path ) ``` but, the path gets duplicated when you source your cshrc file multiple times, how do you prevent the duplication? EDIT: This is one unclean way of doing it: ``` set localpaths = ( . $otherpa...
[ 0.30978789925575256, 0.06375819444656372, 0.17595145106315613, 0.25521039962768555, 0.2107020765542984, -0.1953241229057312, 0.10637323558330536, 0.01703590154647827, -0.6552011966705322, -0.4849161207675934, 0.013044469058513641, 0.33144813776016235, -0.5760296583175659, 0.325239747762680...