text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
&& rake db:create && rake db:migrate Here is what I get in the console: ``` >> i = Item.create(:name => 'My Item') => #<Item id: 2, name: "My Item"> >> t = Transaction.create(:profit => 100) => #<Transaction id: 2, profit: #<BigDecimal:2411d2c,'0.1E3',4(8)>> >> t.tran_items.create(:item => i) => #<TranItem id: ni...
[ -0.06987418979406357, 0.17801882326602936, 0.5918018817901611, 0.07769285142421722, -0.18313778936862946, 0.3572515547275543, -0.05566456541419029, -0.6619542837142944, 0.051719922572374344, -0.6782682538032532, 0.27613410353660583, 0.7079318761825562, 0.042049504816532135, 0.4900143742561...
If I have 2 DataTables (dtOne and dtTwo) and I want to merge them and put them in another DataTable (dtAll). How can I do this in C#? I tried the Merge statement on the datatable, but this returns void. Does Merge preserve the data? For example, if I do: ``` dtOne.Merge(dtTwo); ``` Does dtOne change or does dtTwo c...
[ 0.1474374383687973, -0.11893682926893234, 0.1357504427433014, -0.22126083076000214, 0.15852387249469757, -0.15022854506969452, 0.22481228411197662, -0.3417104184627533, 0.08220068365335464, -0.8921687602996826, -0.10760414600372314, 0.663486659526825, -0.3690739572048187, -0.01920453645288...
dtOne.Merge(dtTwo); ``` The `Merge` method takes the values from the second table and merges them in with the first table, so the first will now hold the values from both. If you want to preserve both of the original tables, you could copy the original first, then merge: ``` dtAll = dtOne.Copy(); dtAll.Merge(dtTwo);...
[ 0.09416929632425308, -0.2922700047492981, 0.12184660881757736, -0.1850813329219818, 0.20791152119636536, 0.10421527922153473, 0.007690935395658016, -0.40814194083213806, -0.05769176408648491, -0.8731666803359985, -0.332535982131958, 0.6561196446418762, -0.5742612481117249, -0.0842081680893...
This is something that comes up so often I almost stopped thinking about it but I'm almost certain that I'm not doing this the best way. The question: Suppose you have the following table ``` CREATE TABLE TEST_TABLE ( ID INTEGER, TEST_VALUE NUMBER, UPDATED DATE, FOREIGN_KEY INTEGER ); ``` What...
[ 0.19481411576271057, 0.47840774059295654, 0.11782872676849365, 0.0038536973297595978, 0.21989569067955017, 0.10323408991098404, 0.0012278039939701557, -0.11685927212238312, -0.12162810564041138, -0.7765102982521057, 0.11081266403198242, 0.1784939467906952, -0.0027290049474686384, 0.1223249...
top row. Not bad but for large returns the order by would kill performance. So bonus points: how to do it in a scalable manner (ie without the unnecessary order by). Analytic functions are your friends ``` SQL> select * from test_table; ID TEST_VALUE UPDATED FOREIGN_KEY ---------- ---------- --------- -----...
[ -0.48542913794517517, 0.13767577707767487, 0.4205528795719147, 0.196410670876503, 0.10105118900537491, -0.11800052970647812, -0.0015454734675586224, -0.2468692660331726, -0.15296794474124908, -0.65223228931427, -0.10957129299640656, 0.703022837638855, -0.11566640436649323, -0.2038837373256...
20 11-NOV-08 10 SQL> ed Wrote file afiedt.buf 1* select * from test_table SQL> ed Wrote file afiedt.buf 1 select max( test_value ) keep (dense_rank last order by updated) 2 from test_table 3* where foreign_key = 10 SQL> / MAX(TEST_VALUE)KEEP(DENSE_RANKLASTORDERBYUPDATED) -------------------------...
[ 0.04511602967977524, -0.04276992008090019, 0.6793795824050903, 0.02012699283659458, 0.03580837324261665, -0.15574580430984497, 0.1646471917629242, -0.5442736148834229, -0.07587599009275436, -0.718726634979248, -0.13863810896873474, 0.4741809070110321, -0.10013911873102188, 0.00799155700951...
that to get the information for the entire row ``` SQL> ed Wrote file afiedt.buf 1 select max( id ) keep (dense_rank last order by updated) id, 2 max( test_value ) keep (dense_rank last order by updated) test_value , 3 max( updated) keep (dense_rank last order by updated) updated 4 from test...
[ 0.12475287914276123, 0.08072860538959503, 0.45383164286613464, 0.005843185354024172, 0.21854150295257568, 0.007532727438956499, 0.1926557421684265, -0.5469669699668884, 0.08061809092760086, -0.5614780187606812, 0.10456325113773346, 0.47470760345458984, -0.23342512547969818, 0.0485328882932...
10 12-NOV-08 ``` And analytic approaches are generally pretty darned efficient. I should also point out that analytic functions are relatively new, so if you are on something earlier than 9.0.1, this may not work. That's not a huge population any more, but there are always a few folks stuck on old versions.
[ 0.29830417037010193, 0.14684627950191498, 0.5271114110946655, 0.1026042178273201, 0.03854375332593918, -0.44231873750686646, 0.03797750174999237, 0.4078328311443329, 0.004945778753608465, -0.4531959295272827, -0.29454305768013, 0.7627183794975281, 0.1832292228937149, 0.1203119307756424, ...
We've got an app with some legacy printer "setup" code that we are still using `[PrintDlg](http://msdn.microsoft.com/en-us/library/ms646940(VS.85).aspx)` for. We use a custom template to allow the user to select which printer to use for various types of printing tasks (such as reports or drawings) along with orientatio...
[ 0.5046274662017822, 0.0165480338037014, 0.7062681317329407, 0.001595709822140634, 0.10883240401744843, -0.1886262744665146, -0.14499862492084503, -0.2398907095193863, -0.10158398747444153, -0.9196085333824158, -0.000567720562685281, 0.7159056067466736, -0.29083916544914246, -0.135242074728...
`[PageSetupDlg](http://msdn.microsoft.com/en-us/library/ms646937(VS.85).aspx)` and `[PrintDlgEx](http://msdn.microsoft.com/en-us/library/ms646942(VS.85).aspx)`, there is no apparent easy transition without changing a fair amount of code and/or changing completely how we present printing and printer setup to the user. ...
[ 0.13387662172317505, 0.2328614592552185, 0.48943769931793213, -0.01850098744034767, -0.1381562203168869, -0.19351476430892944, 0.04541647434234619, -0.14793381094932556, -0.2651870846748352, -0.9635255336761475, -0.37329819798469543, 0.4921613037586212, -0.31874918937683105, 0.067626968026...
Please share how you do version control for Lotus Notes/Domino development. I want to put in our SVN repository all the scripts, views, custom forms, script libraries, etc. Semi-automated methods are accepted as well (i.e. if I find a way to get all the event scripts for a form in one file, and to be able to place it...
[ 0.32709836959838867, -0.05038071423768997, 0.025316137820482254, 0.07066607475280762, -0.3083401024341583, -0.394259512424469, -0.11772529035806656, -0.02816453017294407, -0.36186882853507996, -0.4479929804801941, 0.028619825839996338, 0.3835460841655731, -0.27557456493377686, 0.2496430575...
I created a custom login page using Forms Authentication and using a sQL DB to store user data. I am able to create a session variable from the username, but wondering if it is possible to pull a separate field and create a session variable based on that. I would like the session variable to be based off a SalesNumber ...
[ 0.24796323478221893, 0.11362490057945251, 0.36349427700042725, -0.19448304176330566, -0.22448314726352692, -0.09331229329109192, 0.27995219826698303, -0.23655568063259125, -0.14046049118041992, -0.510401725769043, -0.07900512218475342, 0.6727356314659119, -0.11180119961500168, 0.0841132327...
directory, then any references to "anyfile.js" will automagically be converted to a reference to "anyfile-vsdoc.js" behind the scenes. Add an empty file next to your plugin with "-vsdoc" appended to the filename. That should "hide" the plug-in from the external javascript processor.
[ 0.3500491976737976, -0.13909193873405457, 0.405992716550827, 0.18021677434444427, 0.2580791711807251, -0.5084087252616882, 0.09727004170417786, 0.26963746547698975, -0.05573330447077751, -0.568638801574707, -0.27894270420074463, 0.7344292402267456, -0.40523383021354675, -0.0746595859527587...
What is the best way to create a 'global event' in flex/actionscript - preferably using a static class? I want to raise an event to indicate that a stylesheet is loaded in order to show components that require that stylesheet. So I want each portion of the application that requires a style from the stylesheet to liste...
[ 0.021930072456598282, -0.43485087156295776, 0.31262490153312683, -0.03252390772104263, -0.04974342882633209, -0.34384825825691223, 0.16861416399478912, 0.20188552141189575, -0.20458127558231354, -0.5739719271659851, -0.27187100052833557, 0.8819992542266846, -0.451860636472702, -0.475345849...
file next to your plugin with "-vsdoc" appended to the filename. That should "hide" the plug-in from the external javascript processor.
[ 0.49495527148246765, -0.04962259158492088, 0.24482892453670502, 0.21454006433486938, 0.2194228172302246, -0.4477143883705139, 0.2692451775074005, 0.3366295397281647, -0.06078614667057991, -0.6800278425216675, -0.5069413185119629, 0.6720716953277588, -0.1842232197523117, -0.1024228557944297...
With the following code: ``` Dim x As System.Xml.Linq.XElement = _ <div> <%= message.ToString() %> </div> Dim m = x.ToString() ``` ...if message is HTML, then the < and > characters get converted to `&lt;` and `&rt;`. How can I force it to skip this encoding? What is the type of your `message` variable? If `messag...
[ 0.2599055767059326, -0.10709062963724136, 0.7463823556900024, -0.28888145089149475, -0.20252637565135956, 0.12427641451358795, 0.13591670989990234, -0.4734692871570587, -0.21382728219032288, -0.3170199394226074, -0.27899301052093506, 0.5145188570022583, -0.5035696029663086, 0.1837658137083...
<div> <%= XElement.Parse(message.ToString()) %> </div> Dim m = x.ToString() ```
[ 0.21972618997097015, -0.13594011962413788, 0.524614155292511, -0.45049723982810974, 0.008361873216927052, 0.0002991562942042947, 0.5408286452293396, -0.17042572796344757, -0.2639175355434418, -0.43187981843948364, -0.33952775597572327, 0.6428260803222656, -0.5798843502998352, 0.31665760278...
This question is about a Java JTree or a Window .Net Tree (Winforms) or an Adobe Flex Tree. In a client-server application (for Flex it's Web, really), I have a tree with hierarchical data (in a Windows Explorer type interface). Right now I lazily load up the tree as the user requests more data from the server. This i...
[ 0.06815943121910095, 0.03809627890586853, 0.2282094955444336, 0.19711832702159882, -0.16766296327114105, -0.014511249028146267, 0.08430270850658417, -0.21127961575984955, -0.2822099030017853, -0.7849650382995605, 0.11924704909324646, 0.3960827589035034, -0.1981547772884369, 0.0141221014782...
20 million nodes is not at all unlikely. Should I be releasing data from the tree when a branch is collapsed so the Garbage Collector can release the memory? This is fine, but what if the users are not efficient and don't collapse branches? Should I do a memory management module that goes around closing branches that ...
[ 0.08050570636987686, -0.21695329248905182, 0.4646158218383789, 0.22699753940105438, 0.05175846815109253, 0.009888519532978535, 0.587800920009613, -0.07508528977632523, -0.5857763886451721, -0.41327816247940063, -0.018091244623064995, 0.40953901410102844, 0.061992477625608444, 0.13381367921...
up the UI until it busts (maybe it's not a bad idea)? Why don't you take a few days or a week to experiment with Rails, just for fun? You might, like many other devs before, find a real liking for it and 'fall in love' with Ruby and revitalize your programming interest. If not you just embrace ASP.net which will feel m...
[ 0.4175052344799042, -0.5248286724090576, 0.22603851556777954, 0.6386368870735168, -0.40320277214050293, -0.36812105774879456, 0.045588377863168716, 0.3207266926765442, -0.3758722245693207, -0.4723093807697296, 0.28356659412384033, 0.5133017897605896, 0.0012427913025021553, 0.05484159663319...
supply. You can do the math as far as earning potential.
[ 0.7187877893447876, -0.32675909996032715, -0.14339762926101685, 0.35204315185546875, 0.20233844220638275, 0.6764073371887207, -0.46575209498405457, 0.10989733040332794, -0.2847055494785309, -0.6499190330505371, 0.25595301389694214, 0.7728241682052612, -0.1421157568693161, 0.017949936911463...
I have a script that constantly segfaults - the problem that I can't solve as segfault is in python libxml bindings - didn't write those. Ok, so in Linux I used to run an inf.loop so that when script dies - it restarts, like so: ``` #!/bin/bash while [ 1 ] do nice -n 19 python server.py sleep 1 done ``` Well, I can'...
[ 0.3804383873939514, 0.20287741720676422, 0.1868811696767807, -0.09766804426908493, -0.05094044655561447, -0.36399030685424805, 0.27282118797302246, 0.103457011282444, -0.4176231622695923, -0.7935992479324341, -0.1174788698554039, 0.8534227609634399, -0.25891295075416565, 0.1354214102029800...
I would like to design very high availability(never take server down, roll out features without restart etc) application with both client(probably C# gui) and server components(Java,C++,Perl). I got some advice from ([minimize-code-maximize-data.html](http://database-programmer.blogspot.com/2008/05/minimize-code-maxi...
[ 0.11945092678070068, -0.006999660283327103, 0.3403920531272888, -0.024874377995729446, 0.23909589648246765, 0.04092361032962799, -0.04086350277066231, -0.1308736354112625, -0.29016241431236267, -0.45568445324897766, 0.03771280124783516, 0.6512657999992371, -0.30894631147384644, -0.01267834...
client or server and have application reflect changes with as short lag as possible(dynamic class loading etc). What are the performance and other limitations of designing such a "never kill" system? Has anybody managed to create such an application? What were the main lesson learned? When is this not cost effective a...
[ 0.5017793774604797, -0.013245590031147003, -0.1270909607410431, 0.15487399697303772, -0.031140921637415886, -0.17016486823558807, 0.15865983068943024, -0.1644602119922638, -0.3391011953353882, -0.4432287812232971, 0.024074191227555275, 0.5958580374717712, -0.33221161365509033, 0.0509045645...
of the program is the script runner and shell-like part. This is definitely bad for performance, I think that is a given. If I remember correctly, Yegge posted something similar once in his blog, so if you get to talk to him again, might ask him about that.
[ 0.2973676323890686, 0.1176886335015297, -0.05827675014734268, 0.04744776710867882, -0.11851156502962112, -0.319638729095459, 0.35205554962158203, 0.5421520471572876, 0.1701536476612091, -0.35379165410995483, 0.018006199970841408, 0.5007405281066895, 0.17284755408763885, 0.06939660012722015...
Every night I need to trim back a table to only contain the latest 20,000 records. I could use a subquery: ``` delete from table WHERE id NOT IN (select TOP 20000 ID from table ORDER BY date_added DESC) ``` But that seems inefficient, especially if we later decide to keep 50,000 records. I'm using SQL 2005, and thou...
[ 0.28973135352134705, 0.2786998748779297, 0.41234853863716125, -0.029969939962029457, 0.11459708213806152, -0.07620436698198318, 0.3139338493347168, -0.1819113940000534, -0.41192829608917236, -0.5904638171195984, 0.11253920197486877, 0.7452476620674133, -0.06382551044225693, 0.2331047803163...
would make sure it is inefficient before I start barking up the wrong tree. Measure the time, cpu usage, disk I/O, etc. to see how well it performs. I think you'll find it performs better than you think.
[ 0.362764447927475, 0.40904128551483154, -0.0647292211651802, 0.3260723948478699, 0.3572470247745514, -0.07693841308355331, 0.20939040184020996, 0.14334359765052795, 0.038312122225761414, -0.6245435476303101, 0.199501633644104, 0.6641338467597961, 0.16943509876728058, -0.07817896455526352, ...
I have a web application that is using a data store that has it's own built in paging. The PagedResult class tells me the number of total pages. What I would like to do it (after binding my ASP.NET GridView) do this: ``` MyGridView.PageCount = thePageCount; ``` And then have the GridView magically build the paginati...
[ 0.25995853543281555, 0.009005739353597164, 0.5533645749092102, 0.1793464720249176, -0.2296094000339508, -0.03528575226664543, 0.19370514154434204, -0.1607438623905182, -0.1857197880744934, -0.9444614052772522, 0.197475865483284, 0.3955323100090027, -0.031345464289188385, 0.1977276504039764...
ObjectDataSource, you configure both a SelectMethod and a SelectCountMethod. You could either modify your PagedResult class to return record count instead of page count, or wrap the PagedResult call in a method to convert page count to record count (PageCount \* PageSize). If your PagedResult class only exists to sup...
[ 0.03262278065085411, -0.3268454968929291, 0.4760696589946747, 0.3190588057041168, -0.05256033316254616, 0.00123333721421659, 0.1745029240846634, -0.15935899317264557, -0.08686744421720505, -0.5569906830787659, 0.18226240575313568, 0.569450318813324, -0.3344408869743347, 0.21153657138347626...
Is there a way in FreeBSD to (being root) run a command as unprivileged user, like nobody? Kind of like reverse of sudo. Oh and considering that 'nobody' has /usr/sbin/nologin as shell - so **su** is not an option. sudo will allow you to run a command as another user. ``` sudo -u nobody <command> ``` will run as nob...
[ 0.027969012036919594, -0.2099553942680359, 0.003305134829133749, -0.001096644438803196, -0.2525222897529602, -0.3390127122402191, 0.5261027812957764, 0.4838320016860962, -0.46114838123321533, -0.4509221017360687, -0.5925635099411011, 0.2542969584465027, -0.21356038749217987, 0.535445511341...
In firefox, the error messages display as should. Just to the right of the element being validated. In IE. No matter what I do with the sizing of the labels/elements/errors, the error is always posted below the element, causing every other element to be pushed down. ``` <p> <label for="handle"><strong>User Name</st...
[ -0.14868083596229553, 0.18115074932575226, 0.610590934753418, -0.4505247175693512, 0.1355007141828537, -0.27013394236564636, 0.21419908106327057, -0.6318220496177673, 0.02228044532239437, -0.6547134518623352, -0.3093761205673218, 0.7037213444709778, -0.5583022832870483, -0.5056619048118591...
<INPUT TYPE="TEXT" id="confirmPassword" NAME="confirmPassword" MAXLENGTH=50 VALUE="#attributes.getUser.password#"> </p> ``` If anyone else has had this issue, i'd be very grateful for any help. One approach for Oracle: ``` SELECT val FROM myTable UNION ALL SELECT 'DEFAULT' FROM dual WHERE NOT EXISTS (SELE...
[ 0.004927377216517925, -0.18621794879436493, 0.15875893831253052, -0.019226746633648872, 0.036277662962675095, 0.017699601128697395, -0.08893432468175888, -0.38604113459587097, 0.10604963451623917, -0.6698070764541626, 0.04791252687573433, 0.6919752955436707, -0.021881338208913803, -0.10186...
I have two C DLLs that I need to access in the same executable. I have header files and .LIB files for both libraries. Unfortunately a subset of the functions that I need to access have the exact same names. The best solution I have been able to come up with so far is to use LoadLibrary to load one of the DLLs and expl...
[ 0.26748061180114746, 0.04880644381046295, 0.02812516689300537, 0.010213988833129406, -0.22245998680591583, -0.24678315222263336, 0.07350896298885345, -0.024167465046048164, 0.005313141271471977, -0.8004503846168518, -0.02497994527220726, 0.6241939067840576, -0.4677691161632538, 0.079854346...
and in the other case I want to call OpenApi in DLL B? I'm developing my executable in C++ using Visual Studio 2008 and the corresponding C runtime library (msvcr90.dll). [Edit] Commenter Ilya asks below what I don't like about the GetProcAddress solution. I don't like it for two reasons: 1. It makes the code more ...
[ 0.10246861726045609, 0.11332958936691284, 0.2128804475069046, -0.0613231286406517, -0.24025854468345642, 0.046543192118406296, 0.3326180577278137, -0.2755679488182068, -0.06281271576881409, -0.42423155903816223, -0.3472587764263153, 0.37068918347358704, -0.6966317296028137, -0.156421706080...
the signature I don't see the error until run-time. Say I decide to integrate a new version of the dll and one of the method names has changed, it will compile just fine and won't have a problem until the actual call to GetProcAddress, which could possibly even be missed in a test pass. It used to be you could 'rename'...
[ 0.46699562668800354, -0.006268954370170832, 0.48120102286338806, 0.10535452514886856, -0.052498456090688705, -0.34136763215065, 0.4313823878765106, 0.008296065963804722, -0.37443479895591736, -0.7241381406784058, -0.007457489147782326, 0.32959240674972534, -0.40131497383117676, 0.476675212...
I'm not sure if this means they removed the functionality, or if they just don't want to support it anymore. Here's on page that describes the IMPORTS directive: <http://www.digitalmars.com/ctg/ctgDefFiles.html#imports> Other kludgy alternatives are: 1. create wrapper functions for the conflicting APIs. Those funct...
[ 0.2992037534713745, -0.268913596868515, 0.3748795986175537, 0.35117194056510925, -0.2233569175004959, -0.06261897087097168, 0.15681351721286774, -0.2596667408943176, -0.27783268690109253, -0.36405929923057556, -0.204816997051239, 0.4910812973976135, -0.6502501964569092, 0.20796531438827515...
real librarys. Note the wrapper libraries do not need to wrap all the API's - they just need to wrap the conflicting ones.
[ 0.38414332270622253, -0.3350652754306793, 0.22395026683807373, 0.8177403211593628, -0.18296796083450317, -0.025730248540639877, 0.25547701120376587, 0.04931766912341118, -0.1604910045862198, -0.5572659969329834, -0.1869504749774933, 0.6665729880332947, -0.36967605352401733, -0.113592207431...
So, let's say I want to write a class that operates on different kinds of numbers, but I don't a priori know what kind of numbers (i.e. ints, doubles, etc.) I will be operating on. I would like to use generics to create a general class for this scenario. Something like: ``` Adder<Double> adder = new Adder<Double>();...
[ 0.4745911955833435, -0.15496136248111725, 0.11136686056852341, 0.031538043171167374, -0.24373109638690948, -0.19530774652957916, 0.339666485786438, -0.2673706114292145, -0.20439790189266205, -0.4229118824005127, -0.034115493297576904, 0.4233623445034027, -0.7935207486152649, 0.238986223936...
runtime system. In your particular case, if you just want to be able to add various types together, may I suggest method overloading? e.g., `double add(double, double)`, `float add(float, fload)`, `BigDecimal add(BigDecimal, BigDecimal)`, etc.
[ 0.3168143630027771, -0.17525175213813782, 0.11014828085899353, 0.07693374156951904, 0.11142325401306152, -0.07355916500091553, 0.07340200990438461, 0.04168824106454849, -0.3725455701351166, -0.36199501156806946, -0.06536519527435303, 0.5296540856361389, -0.7143449783325195, -0.277207076549...
One of my columns is called `from`. I can't change the name because I didn't make it. Am I allowed to do something like `SELECT from FROM TableName` or is there a special syntax to avoid the SQL Server being confused? Wrap the column name in brackets like so, `from` becomes [from]. ``` select [from] from table; ``` ...
[ 0.12362346053123474, 0.15803749859333038, 0.25512316823005676, -0.13926488161087036, -0.19263587892055511, -0.10007862746715546, -0.11839130520820618, -0.3203932046890259, -0.029672086238861084, -0.5042014122009277, 0.00034511397825554013, 0.285533607006073, -0.19081395864486694, 0.1871716...
I have been using git for several months in a project developed only by myself. I have a local repository and push it regularly to github for backup purposes. I want to add another developer to this project, however I will have the responsibility of integrating the whole project. What is the recommended workflow? D...
[ 0.3138624429702759, 0.09462585300207138, 0.23090001940727234, 0.09425573796033859, -0.01280944049358368, -0.17920026183128357, -0.09554479271173477, 0.18231192231178284, 0.012851749546825886, -0.8478122353553772, -0.0554918572306633, 0.31096193194389343, -0.08835435658693314, 0.35039398074...
his repository? Git is geared towards *pulling*, rather than pushing. Ideally, the other developer would clone from your *public* repo on Github; then, when he was done with his changes, you'd either pull from a repo that he makes available to you, or you'd integrate his changes with patches that he emails to you. Eith...
[ 0.18751895427703857, -0.2543529272079468, 0.32574328780174255, 0.34065279364585876, 0.06188259646296501, 0.29691368341445923, -0.2560540735721588, -0.0070856534875929356, -0.24843518435955048, -0.6657447814941406, -0.23637783527374268, 0.2980724275112152, -0.3938540518283844, 0.20911665260...
either.
[ 0.19374112784862518, 0.0841873362660408, 0.11437725275754929, 0.5279663801193237, 0.10864425450563431, -0.019655419513583183, 0.035574108362197876, 0.31063878536224365, -0.04980192705988884, -0.1981993168592453, 0.019404737278819084, 0.4979858100414276, 0.06802926957607269, -0.019227094948...
I want to reverse engineer (import into diagram form) the database definition dump of a database I have, then since no foreign keys are defined in this particular database, I want to be able to manually create the table to table key mappings (using crow feet notation if possible). I've taken a look at MySQL Workbench,...
[ 0.2116965800523758, 0.2947961091995239, 0.33268973231315613, 0.019728083163499832, 0.39082661271095276, 0.04662417992949486, 0.34056156873703003, -0.1986297219991684, -0.20688225328922272, -0.6755825877189636, 0.06091025099158287, 0.2726965844631195, -0.08066807687282562, -0.08446787297725...
feedback from you guys for which are your favorite tools to use for this scenario? Why do you like that(your) particular tool? My intended purpose is to take a legacy database, and train jr. engineers on the organization of the DB. Visual aids are nifty. My fallback option is to recreate an ER diagram by hand. Not fun...
[ 0.6045932769775391, -0.04459132254123688, 0.17323166131973267, 0.1748909056186676, -0.11700726300477982, -0.03093564882874489, 0.06083517149090767, 0.042320284992456436, -0.13253597915172577, -0.6150084137916565, 0.07584002614021301, 0.3427530825138092, 0.10178561508655548, 0.0777569115161...
I've developed a "Proof of Concept" application that logs unhandled exceptions from an application to a bug-tracking system (in this case Team Foundation Server, but it could be ANY bug tracking system). A limitation of this idea is that I don't want duplicate Bug Items opened every time the same exception is thrown (f...
[ 0.4433095455169678, 0.31784045696258545, -0.26223692297935486, 0.05191349610686302, 0.11369019001722336, -0.22460635006427765, 0.11559052020311356, -0.23172704875469208, -0.41737285256385803, -0.41056060791015625, 0.17557629942893982, 0.2732320725917816, -0.34635522961616516, -0.0147335575...
is an open bug with the same information. (This example is .NET - but I would think the concept is platform independant). The problem obviously is that these fields can be very large (particularly the stack trace) - and requires a "Full-Text" type of implementation to store them and the searching is very expensive. ...
[ 0.33344101905822754, 0.10794055461883545, 0.07866441458463669, 0.19183595478534698, 0.14107628166675568, -0.5599437952041626, 0.17944562435150146, 0.4525705575942993, -0.39370596408843994, -0.4342460036277771, -0.12758579850196838, 0.4439232647418976, -0.5464110374450684, 0.235931381583213...
indexed column. That way the query to the Bug Store would be pretty fast to avoid duplicates on insert.
[ -0.16588374972343445, 0.10194461792707443, 0.4721662402153015, 0.33431684970855713, -0.021728232502937317, 0.033866751939058304, -0.25046393275260925, 0.22920343279838562, -0.3794539272785187, -0.4915604889392853, 0.25484979152679443, 0.3812629282474518, -0.7086325287818909, 0.196887671947...
My company is in the process of rewriting our software from scratch, and I'm the one who is going to be doing most of the work in rewriting the Mac client (The core of our software is Windows based, and the Mac client communicates with it through a webservice). This isn't a real heavy app, mainly does some background ...
[ 0.5251601338386536, 0.4691613018512726, 0.22541917860507965, -0.1997753381729126, 0.31681516766548157, -0.03969971835613251, 0.20906686782836914, 0.0896104946732521, -0.1685800403356552, -0.5468159317970276, -0.20337989926338196, 0.8032541871070862, -0.1196800097823143, -0.0002892100310418...
to code, I could use all the features of Obj-C 2.0 such as synthesized properties and fast enumeration. * It would give me access to several classes, and methods in existing classes, that don't exist in 10.4 (Just in mocking up a UI I've come across NSPathControl and NSTreeNode, both of which I would otherwise be very ...
[ 0.1359691470861435, 0.1243307888507843, 0.2905178368091583, -0.004614905454218388, -0.21016299724578857, 0.007106546778231859, 0.6860927939414978, -0.0005257322918623686, -0.2784954309463501, -0.6605032682418823, -0.1421956717967987, 0.5913361310958862, -0.4415181279182434, -0.228938117623...
these if writing for 10.4. The downside would of course be that we'd no longer be supporting an operating system that was only a year out of date. My boss is himself supportive of this move, but of course has our customers to consider and doesn't want to cause any more issues for them than are justified. The director...
[ 0.5359160304069519, 0.299413800239563, 0.5577401518821716, 0.097636878490448, 0.3784385919570923, 0.23176538944244385, -0.09411879628896713, -0.03485357388854027, -0.12820491194725037, -0.18446272611618042, -0.010820676572620869, 0.6597908139228821, 0.19064787030220032, 0.06567087769508362...
side. I'm trying to talk to some of the support people and get an idea of how many of our customers are actually still using 10.4, but I don't have that data yet. Some kind of hybrid solution might be possible, such as rewriting parts of the old client to use the new webservice, or writing the client in 10.5 and back...
[ 0.5598341822624207, 0.010527346283197403, 0.28045377135276794, -0.12400349974632263, -0.11312438547611237, 0.1378622055053711, 0.20917348563671112, 0.0007662426796741784, -0.12415188550949097, -0.37474334239959717, 0.48548048734664917, 0.6209189295768738, 0.16731639206409454, -0.0784387737...
questions are as follows: 1. Given the information above, do you think making a case for the adoption of 10.5+ only is the right thing to do? Do you have any suggestions as to how this might be presented positively to the rest of the company? 2. I don't know as much about the coming 64 bit transition as I'd like. Does...
[ 0.5769193172454834, 0.23058800399303436, 0.029271425679326057, 0.07458813488483429, -0.0007850850815884769, 0.005957741290330887, -0.10174263268709183, -0.11180270463228226, -0.08415564894676208, -0.4084985852241516, -0.06349028646945953, 0.7023213505744934, -0.18952733278274536, -0.222478...
around the corner and 10.5 did come out with a lot of great, new things (especially Objective-c 2.0). However, I think you really need to answer this question based on what you think your target customer group will be using. If they are slow to adopt new technology, it may be that you have to support 10.4 or risk losin...
[ 0.4257219433784485, 0.1313355565071106, 0.10341841727495193, 0.19642777740955353, -0.23872119188308716, -0.20363005995750427, 0.19945363700389862, -0.009426959790289402, -0.0369499996304512, -0.23544690012931824, 0.11460066586732864, 0.8270387649536133, -0.2158934772014618, -0.075210049748...
ensure that you don't use any classes or features of the frameworks that didn't exist in 10.4. You can also do weak linking to the 10.5 frameworks and programatically decide whether you can use a new feature or not (while this is a bit of extra work up front, you can easily phase 10.4 support out of your code in the fu...
[ 0.6013030409812927, 0.007438416592776775, -0.09932252764701843, 0.3747433125972748, -0.1120108962059021, -0.3447059690952301, 0.42091286182403564, 0.18744786083698273, -0.17168858647346497, -0.6230457425117493, -0.07734127342700958, 0.7766208648681641, -0.18250568211078644, -0.226500570774...
that if you do target 10.4 make sure you have a 10.4 machine available to do a lot of testing (especially if you compile from the 10.5 SDK to take advantage of the 64-bit ready features). Also check the docks for any feature you may want to use from the 10.5 SDK. Many features were actually available in 10.4 but undocu...
[ 0.3109593391418457, -0.01268976740539074, 0.21782222390174866, 0.20433388650417328, 0.26243144273757935, -0.14349213242530823, 0.16839171946048737, -0.09555073827505112, -0.2708958685398102, -0.6477592587471008, -0.08805184811353683, 0.7507932782173157, -0.05326933041214943, -0.26355060935...
I want to convert for example a particular date 12-11-2008 11:33:04.510 to UTC datetime. Can anyone help me how to do this. I want to do this in c# coding. Just use [DateTime.ToUniversalTime](http://msdn.microsoft.com/en-us/library/system.datetime.touniversaltime.aspx), assuming it's in the local timezone of your compu...
[ 0.31457966566085815, -0.15645651519298553, 0.38286033272743225, 0.21821807324886322, 0.21247562766075134, -0.16347745060920715, 0.2723335027694702, 0.378899484872818, -0.17455622553825378, -1.0464168787002563, 0.09548352658748627, 0.40477049350738525, 0.0015231043798848987, 0.0096807517111...
This is my very first question so I am a bit nervous about it because I am not sure whether I get the meaning across well enough. Anyhow, here we go.... Whenever new milestones in programming have been reached it seems they always have had one goal in common: to make it easier for programmers, well, to program. Machi...
[ 0.16957585513591766, 0.3736073076725006, -0.22538477182388306, 0.1226128488779068, -0.2331734597682953, -0.0005075381486676633, 0.12232647091150284, 0.11603605002164841, -0.24312061071395874, -0.6580322980880737, -0.1148761659860611, 0.5758400559425354, 0.10017068684101105, -0.049923297017...
a sort of renaissance in recent years. I also believe that FP will get an enormous boost when Microsoft will add F# to their mainstream programming languages. Returning to my original question, I believe that ultimately programming will be done in a natural language (English) with very few restrictions or rules. The c...
[ 0.21117068827152252, 0.0860375314950943, 0.06983773410320282, 0.09015979617834091, -0.07601919770240784, -0.08705925941467285, -0.012701869010925293, 0.2971177399158478, 0.020242536440491676, -0.5354110598564148, -0.5623422265052795, 0.7728421092033386, -0.1591726690530777, -0.510145127773...
lead us faster to natural-language programming? This question should not be used to discuss the useability or feasability of natural-language programming because only the future will tell. Sorry, I don't agree at all. Code is ultimately a blueprint for making things (objects), so it *has* to be very precise and rule-g...
[ 0.4282737970352173, -0.0023356499150395393, -0.04341859742999077, 0.5475835800170898, 0.0427376814186573, 0.03804386034607887, 0.10030577331781387, 0.33853188157081604, 0.09078556299209595, -0.9172353744506836, -0.017968187108635902, 0.46387848258018494, 0.12675246596336365, -0.12717372179...
Using Java, how can I test that a URL is contactable, and returns a valid response? ``` http://stackoverflow.com/about ``` The solution as a unit test: ``` public void testURL() throws Exception { String strUrl = "http://stackoverflow.com/about"; try { URL url = new URL(strUrl); HttpURLConne...
[ -0.16307884454727173, -0.05362672358751297, 0.43060702085494995, -0.14190667867660522, -0.1614726185798645, -0.029149871319532394, 0.4664764702320099, -0.4746571183204651, 0.031785160303115845, -0.47217151522636414, -0.5200344324111938, 0.5486267805099487, -0.29595521092414856, 0.253388524...
e.printStackTrace(); throw e; } } ```
[ 0.06420181691646576, 0.07237965613603592, 0.09769896417856216, -0.38155433535575867, 0.09660083055496216, -0.42649632692337036, 0.30266380310058594, -0.3158016800880432, 0.028372781351208687, -0.5233326554298401, -0.37800759077072144, 0.592025637626648, -0.4649660885334015, 0.0974431484937...
As the title suggest... How can I apply a scrum process to anything that doesn't work on new code and can be estimated to some degree? How can I apply a scrum process to maintenance and emergency fixes (which can take from 5 minutes to 2 weeks to fix) type of environment when I still would like to plan to do things? ...
[ 0.43115296959877014, 0.21080511808395386, -0.09164952486753464, 0.12046447396278381, 0.11565523594617844, -0.1665717363357544, 0.35000285506248474, -0.2734846770763397, -0.23312526941299438, -0.4422648251056671, 0.1055644229054451, 0.4770863354206085, -0.14492331445217133, 0.13069555163383...
is going to be shorter iterations. I've heard of teams doing daily iterations. You can also move towards a Kanban type style where you have a queue which has a fixed limit (usually very low, like 2 or 3 items) and no more items can be added until those are done. What I'd do is try out one week iterations with the dail...
[ 0.3177458643913269, -0.4894530475139618, 0.11439867317676544, 0.08168522268533707, -0.3635036051273346, 0.37750110030174255, 0.5734645128250122, 0.054878488183021545, -0.4169846773147583, -0.6187043190002441, 0.24002401530742645, 0.2463998794555664, 0.32733505964279175, -0.2942309379577636...
environment once you've tried it. There was also a PDF called [Agile for Support and Operations in 5 minutes](http://blog.crisp.se/mattiasskarin/files/agileforsupport/kanban_for_support_and_operations.pdf) that was recently posted to the [Scrum Development list](http://groups.yahoo.com/group/scrumdevelopment) on Yahoo...
[ 0.14876703917980194, -0.22000078856945038, 0.13512715697288513, -0.16544541716575623, 0.014236842282116413, -0.4510424733161926, 0.25267890095710754, -0.30339327454566956, -0.17508630454540253, -0.5612450838088989, -0.16888388991355896, 0.5663775205612183, -0.18725904822349548, -0.55055212...
The `equals()` method of the URL class in the Java class library makes a DNS request to get the IP for the hostname, to check the two IP's for equality. This happens even for URLs that are created from the same `String`. Is there a way to avoid this internet access? Use [java.net.URI](http://docs.oracle.com/javase/8/do...
[ -0.18317940831184387, 0.08283782750368118, 0.32864493131637573, 0.08212035894393921, -0.1588175743818283, -0.260789692401886, 0.0027216903399676085, -0.0013236862141638994, -0.05249026417732239, -0.5263419151306152, 0.09790998697280884, 0.27651333808898926, -0.43304285407066345, 0.35790643...
The renewal wizard doesn't seem to ask for a renewal period. I think the Cerficate Supplier sets the renewal period. So it depends on the type of Cert you buy (or the setup of your certification service).
[ 0.9214057326316833, 0.27749863266944885, 0.8973592519760132, 0.24972674250602722, 0.05670635774731636, -0.4032381772994995, 0.08022385090589523, -0.37996748089790344, 0.10519670695066452, -0.23755450546741486, 0.11444005370140076, 0.8040005564689636, 0.475393146276474, 0.11635532975196838,...
I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into the JAVA\_OPTS environment variable, but I'm testing that with jconsole to see if it wor...
[ 0.2163352370262146, 0.0044572604820132256, 0.16105256974697113, 0.07766004651784897, 0.40033668279647827, 0.04885724559426308, 0.3264926075935364, 0.05539441853761673, -0.13510537147521973, -0.6987659931182861, -0.03554019331932068, 1.050170660018921, -0.2343248873949051, -0.26599138975143...
you look in your installation's bin directory you will see catalina.sh or .bat scripts. If you look in these you will see that they run a setenv.sh or setenv.bat script respectively, if it exists, to set environment variables. The relevant environment variables are described in the comments at the top of catalina.sh/b...
[ 0.7279583811759949, 0.11514896154403687, 0.05050741881132126, 0.1964968591928482, 0.04723023250699043, -0.25267478823661804, 0.16685539484024048, -0.28747546672821045, -0.2338280975818634, -0.5295425057411194, -0.15906351804733276, 0.48798614740371704, -0.13293512165546417, -0.177679806947...
If I have a key set of 1000, what is a suitable size for my Hash table, and how is that determined? It depends on the load factor (the "percent full" point where the table will increase its size and re-distribute its elements). If you know you have exactly 1000 entries, and that number will never change, you can just s...
[ 0.11974941939115524, 0.10589850693941116, 0.44372040033340454, 0.06264566630125046, 0.20609936118125916, 0.2554168999195099, 0.13167671859264374, -0.4452785551548004, -0.235862135887146, -0.49062642455101013, -0.049166593700647354, 0.255237877368927, -0.027742788195610046, 0.29007616639137...
(expected size/LF) for *really* good performance, at a cost of extra memory. You can use the following constructor to set the load factor: ``` Hashtable(int initialCapacity, float loadFactor) ```
[ -0.1833636462688446, -0.030226580798625946, 0.12913565337657928, -0.1718778908252716, 0.031551361083984375, 0.017406273633241653, -0.23406925797462463, -0.12307050079107285, -0.020706946030259132, -0.5345380306243896, -0.09501658380031586, 0.5209033489227295, -0.08463551104068756, -0.04669...
How would I go about creating a Google map that allows the user to zoom beyond the default zoom levels for the map? Would I have to create a new map type that has a greater maximum zoom? Are there any tutorials out there that show how to do this? I'm not familiar enough with the Decimal class to help you out, but your ...
[ 0.42827388644218445, 0.05162718892097473, 0.03210386261343956, 0.4520952105522156, 0.11804567277431488, -0.023341374471783638, 0.19116544723510742, 0.25952860713005066, -0.1740434616804123, -0.39881742000579834, 0.37519341707229614, 0.4210940897464752, 0.049694906920194626, -0.028119344264...
class (like Decimal, probably). `EDIT:` What about the decimal class isn't working properly for you? As long as I start with a string, rather than a float, powers seem to work fine. ``` >>> import decimal >>> print(decimal.Decimal("1.2") ** 2) 1.44 ``` The [module documentation](http://docs.python.org/library/decim...
[ 0.1333436518907547, -0.04256497323513031, -0.0013482945505529642, 0.3759094774723053, -0.14383143186569214, 0.021481914445757866, -0.11030013859272003, 0.11541721969842911, -0.13662296533584595, -0.19107405841350555, -0.06336751580238342, 0.4388720691204071, 0.09914751350879669, -0.2301646...
I am not a fan of using SQL\*PLUS as an interface to Oracle. I usually use [yasql](http://sourceforge.net/projects/yasql/), but it hasn't been updated since 2005 and can do with some improvements. A quick [Google search](http://www.google.com/search?q=sql*plus+replacement) shows yasql and [SQLPal](http://www.sqlpal.com...
[ 0.35588493943214417, 0.2874477803707123, 0.2526129484176636, -0.0715533122420311, -0.4403058588504791, 0.11323894560337067, 0.07885407656431198, 0.1848767101764679, -0.19727455079555511, -0.6775560975074768, 0.5100532174110413, 0.5581059455871582, -0.17912641167640686, 0.1697440892457962, ...
a new connection to your database, then just start typing a script. Press F5 to run it (or just the part of the script that you've highlighted).
[ 0.39234650135040283, -0.03311773017048836, 0.1845172643661499, 0.07036712020635605, 0.16490992903709412, -0.14100748300552368, 0.19479665160179138, 0.36097976565361023, -0.21897195279598236, -0.727293074131012, -0.18672291934490204, 0.38415074348449707, -0.03900064155459404, -0.11842456459...
I want to assert that a method is called exactly one time. I'm using RhinoMocks 3.5. Here's what I thought would work: ```cs [Test] public void just_once() { var key = "id_of_something"; var source = MockRepository.GenerateStub<ISomeDataSource>(); source.Expect(x => x.GetSomethingThatTakesALotOfResources...
[ 0.5456289649009705, -0.09766014665365219, 0.36752864718437195, -0.19984303414821625, 0.04308219254016876, 0.09280651807785034, 0.5054619908332825, -0.3788678050041199, -0.27180615067481995, -0.628174901008606, 0.20180097222328186, 0.6142116785049438, -0.3263120651245117, 0.2575345039367676...
// and source is not used client.GetMeMyThing(key); } ``` I want this test to fail if the second invocation of `GetMeMyThing()` calls `source.GetSomethingThatTakesALotOfResources()`. Here's how I'd verify a method is called once. ```cs [Test] public void just_once() { // Arrange (Important to GenerateMock no...
[ 0.43684643507003784, -0.07922147214412689, 0.4917231798171997, -0.0764811560511589, 0.3724158704280853, -0.07470021396875381, 0.5529977679252625, -0.7415153980255127, -0.09215366840362549, -0.606300950050354, 0.08081457763910294, 0.671161949634552, -0.23698654770851135, 0.14013738930225372...
Before anybody asks, I am not doing any kind of screenscraping. I'm trying to parse an html string to find a div with a certain id. I cannot for the life of me get this to work. The following expression worked in one instance, but not in another. I'm not sure if it has to do with extra elements in the html or not. ``...
[ 0.06199701502919197, 0.10015281289815903, 0.33089932799339294, -0.06843661516904831, -0.21461637318134308, -0.20485271513462067, 0.25931212306022644, -0.1722087264060974, -0.023419532924890518, -0.706346333026886, -0.3823387026786804, 0.3753948509693146, -0.20148135721683502, 0.03508782386...
other stuff <div id="otherdiv">other stuff here</div> more stuff </div> </div> ``` This should bring back ``` <div id="content">some other stuff <div id="otherdiv">other stuff here</div> more stuff </div> ``` , but for some reason, it is not. It is bring back: ``` <div id="content">some other...
[ 0.21874868869781494, -0.22773528099060059, 0.2158498466014862, 0.01826673559844494, 0.02982574887573719, -0.5482900142669678, 0.13007545471191406, -0.06605666130781174, -0.26902711391448975, -0.3683621883392334, -0.18737921118736267, 0.27565646171569824, -0.291954904794693, -0.058281794190...
| .*?<div (?>depth) | .*?</div> (?>-depth) )*) (?(depth)(?!)) .*?</div> ``` You must use the singleline option. Here is an example using the console: ``` using System; using System.Text.RegularExpressions; namespace Temp { class Program { static void Main() { ...
[ -0.03433368355035782, -0.4596828520298004, 0.5133056640625, -0.046257633715867996, 0.06555493921041489, -0.13207368552684784, 0.15624356269836426, -0.03771226108074188, -0.19535429775714874, -0.5939356684684753, -0.529087483882904, 0.3346220552921295, -0.35698410868644714, 0.23625448346138...
Regex r = new Regex(@"(?<text>(<div\s*?id=(\""|&quot;|&\#34;)" + @"content(\""|&quot;|&\#34;).*?>)(?>.*?</div>|.*?<div " + @"(?>depth)|.*?</div> (?>-depth))*)(?(depth)(?!)).*?</div>", RegexOptions.Singleline); Console.WriteLine("HTML:\n"); Console....
[ -0.288401335477829, -0.19802753627300262, 1.0332362651824951, -0.19658143818378448, 0.0350370891392231, 0.3542824983596802, 0.27706441283226013, -0.5414731502532959, 0.0641532838344574, -0.6460121870040894, -0.4950186610221863, 0.48743563890457153, -0.3478251099586487, 0.2991960048675537, ...
m = r.Match(s); if (m.Success) { Console.WriteLine("\nCaptured text:\n"); Console.WriteLine(m.Groups[4]); } Console.ReadLine(); } } } ```
[ -0.616463840007782, 0.14129853248596191, 0.7357050776481628, -0.5039938688278198, 0.4889683425426483, 0.054999422281980515, 0.40107646584510803, -0.4049641788005829, -0.09417753666639328, -0.5598127245903015, -0.7804533839225769, 0.8068474531173706, -0.35022491216659546, 0.1773497462272644...
I have developed a simple mechanism for my mvc website to pull in html via jquery which then populates a specified div. All is well and it looks cool. My problem is that i'm now creating html markup inside of my controller (Which is very easy to do in VB.net btw) I'd rather not mix up the sepparation of concerns. I...
[ 0.3162730932235718, 0.11062692105770111, 0.6483327150344849, 0.023415304720401764, -0.11208901554346085, -0.079593725502491, 0.04526299610733986, -0.024799425154924393, -0.24621400237083435, -0.5636147856712341, 0.07233534753322601, 0.4115242660045624, -0.35416460037231445, 0.1160287633538...
rendering and passing back to the calling browser. You have several options. Create a MVC View User Control and action handler in your controller for the view. To render the view use ``` <% Html.RenderPartial("MyControl") %> ``` In this case your action handler will need to pass the model data to the view ``` pub...
[ -0.3214510679244995, -0.4140949845314026, 0.8046977519989014, 0.02851143479347229, -0.15324462950229645, 0.3116070628166199, 0.21363253891468048, -0.1194894090294838, -0.20581170916557312, -0.7784065008163452, -0.24258418381214142, 0.5730803608894348, -0.3066738247871399, 0.235746935009956...
control has it's own data type you can also construct it within the page In MyControl.ascx.cs: ``` public class MyControlViewData { public string Name { get; set; } public string Email { get; set; } } public partial class MyControl : System.Web.Mvc.ViewUserControl <MyControlViewData> { } ``` And in your pa...
[ -0.260000616312027, -0.44828492403030396, 0.7912914156913757, 0.5916328430175781, 0.1284967064857483, -0.008872244507074356, -0.14189311861991882, -0.035126302391290665, 0.009197426028549671, -0.5407640933990479, -0.19730275869369507, 0.3578140437602997, -0.3935895264148712, 0.210581287741...
example: I want to see if `array[5]` holds a value or is empty. Elements in primitive arrays can't be empty. They'll always get initialized to something (usually `0` for `int` arrays, but depends on how you declare the array). If you declare the array like so (for example): ``` int [] myArray ; myArray = new int[7] ...
[ 0.22924014925956726, 0.04243724048137665, 0.08036472648382187, -0.29676711559295654, -0.15696068108081818, 0.20086044073104858, 0.33077308535575867, -0.3969228267669678, -0.2035835087299347, -0.40599948167800903, -0.1923857033252716, 0.4298160970211029, -0.30671727657318115, 0.044732682406...
I like [StyleCop](http://code.msdn.microsoft.com/sourceanalysis)'s static code analysis and rules enforcement. However, it is severely lacking in several key departments. * Adding new rules isn't officially supported and from what I hear pretty difficult. * Automatic "fixing" of trivial rules violations would be nice...
[ 0.2500288486480713, -0.011441840790212154, 0.5804404020309448, 0.15188318490982056, 0.03086072951555252, -0.41574564576148987, -0.018088944256305695, -0.10472676903009415, -0.39541447162628174, -0.5631600618362427, -0.1255037933588028, 0.6517013907432556, -0.4305051863193512, -0.0435917489...
As promised, we will also be releasing > SDK documentation for StyleCop > explaining how to author custom rules > and how to integrate the tool into > custom build environments. The SDK > documentation is currently under final > review and we hope to release it very > soon. > -- [JasonAll](http://blogs.msdn.com...
[ 0.4231685400009155, 0.1629025638103485, 0.43719932436943054, 0.016885986551642418, -0.06593020260334015, -0.38966742157936096, 0.29718393087387085, -0.3619828522205353, -0.22884880006313324, -0.6159406304359436, -0.15064312517642975, 0.5427756905555725, -0.34028539061546326, -0.32470133900...
the root of our source tree in each project. The end effect is much what we want. There are a handful of "in-house" choices that would be nice to flag, but even without them StyleCop is delivering a lot of value for us.
[ 0.7860067486763, -0.10024469345808029, 0.31064945459365845, 0.3596190810203552, 0.07631076872348785, 0.02709842287003994, -0.018354328349232674, 0.2987661063671112, 0.0917147547006607, -0.47899529337882996, 0.13578394055366516, 0.2664925456047058, 0.2230624109506607, 0.051202863454818726, ...
I have a c# winforms program and it opens up a serial port. The problem happens when the end user unplugs the usb cable and then the device disappears. After this the program will crash and want to report the error to microsoft. Is there a way to capture this event and shut down gracefully? You can use WMI (Windows M...
[ 0.34851327538490295, 0.28414228558540344, 0.27341243624687195, 0.024494795128703117, 0.3378206193447113, -0.4784410297870636, 0.12013842165470123, 0.17076247930526733, -0.23851673305034637, -0.5674536824226379, 0.14558866620063782, 0.5856644511222839, -0.2281293272972107, 0.222750514745712...
System.ComponentModel; using System.Runtime.InteropServices; using System.Management; class UsbWatcher { public static void Main() { WMIEvent wEvent = new WMIEvent(); ManagementEventWatcher watcher = null; WqlEventQuery query; ManagementOperationObserver observer = new Manageme...
[ 0.1969834864139557, -0.4088647663593292, 0.8541658520698547, 0.02187148481607437, 0.46928486227989197, 0.23646993935108185, 0.43110886216163635, -0.23039700090885162, -0.40157827734947205, -0.305453360080719, -0.19969449937343597, 0.8105736970901489, -0.7303640246391296, 0.3384162187576294...
{ query = new WqlEventQuery(); query.EventClassName = "__InstanceCreationEvent"; query.WithinInterval = new TimeSpan(0,0,10); query.Condition = @"TargetInstance ISA 'Win32_USBControllerDevice' "; watcher = new ManagementEventWatcher(scope, query); ...
[ -0.22035476565361023, -0.4456995129585266, 0.5757176876068115, -0.09080790728330612, 0.34728512167930603, -0.03827144205570221, 0.39080530405044556, -0.19452868402004242, -0.35771679878234863, -0.5936633348464966, -0.11997222900390625, 0.8501965999603271, -0.23324155807495117, 0.2502492666...
+= new EventArrivedEventHandler(wEvent.UsbEventArrived); watcher.Start(); } catch (Exception e) { //handle exception } } ``` I don't remember if I modified the query to receive events only for e specific device, or if I filtered out events from other devices in ...
[ -0.22207403182983398, -0.19454893469810486, 0.414626806974411, -0.15459197759628296, 0.19721172749996185, -0.30725452303886414, 0.39459875226020813, -0.1483992338180542, -0.24494074285030365, -0.39260628819465637, -0.09744687378406525, 0.5497310161590576, -0.4129194915294647, 0.20333383977...
may want to have a look at the [MSDN WMI .NET Code Directory](http://msdn.microsoft.com/en-us/library/ms257338.aspx). **EDIT** I found some more info on the event handler, it looks roughly like this: ``` protected virtual void OnUsbConnected(object Sender, EventArrivedEventArgs Arguments) { PropertyData TargetIns...
[ 0.08032143861055374, -0.42408981919288635, 0.45619460940361023, -0.0741019994020462, 0.03361411765217781, -0.2461681365966797, 0.26584064960479736, -0.34457430243492126, -0.2863903343677521, -0.4771134555339813, -0.06066103279590607, 0.7444541454315186, -0.1684425324201584, 0.3014357388019...
string deviceId = dependent.Substring(dependent.IndexOf("DeviceID=") + 10); // device id string taken from windows device manager if (deviceId = "USB\\\\VID_0403&PID_6001\\\\12345678\"") { // Device is connected } }
[ -0.21692734956741333, -0.24695514142513275, 0.6083685755729675, -0.10663502663373947, 0.4635075330734253, 0.001818000921048224, -0.10042528063058853, -0.23724929988384247, -0.03011542372405529, -0.465207040309906, -0.03784940391778946, 0.8438850045204163, -0.34575095772743225, 0.2469414174...
} } ``` You may want to add some exception handling, though.
[ 0.10927580296993256, 0.3082890212535858, -0.21472324430942535, -0.0037610053550451994, 0.2875523269176483, -0.3511490821838379, -0.13549962639808655, 0.48000892996788025, 0.13649356365203857, -0.44097861647605896, -0.04440198093652725, 0.6153051257133484, -0.3338870108127594, 0.07927072048...
I am currently refactoring an application that prints its status to the console window. At the moment I am doing something like this: ``` Console.Write("Print some status.....") //some code Console.WriteLine("Done!") ``` Now while this works fine, all the logic is hidden between console.writelines and I find mak...
[ 0.4894773066043854, 0.39959195256233215, 0.532129168510437, -0.02553188055753708, 0.22745849192142487, -0.38321980834007263, 0.2256300449371338, 0.1140129342675209, -0.29210758209228516, -0.9463249444961548, 0.21363221108913422, 0.6373714804649353, 0.04603266343474388, 0.20287322998046875,...
your app, no idea. However knowing Log4Net will likely help you down the road someday so maybe this is a good chance too learn it.
[ 0.6373506784439087, -0.15428009629249573, 0.02888813614845276, 0.5429482460021973, 0.042737945914268494, -0.3267357051372528, 0.4978589713573456, 0.7740954756736755, -0.23445387184619904, -0.6261789202690125, 0.26645365357398987, 0.5602667331695557, 0.3589245676994324, -0.2474251240491867,...
Given two 3D vectors A and B, I need to derive a rotation matrix which rotates from A to B. This is what I came up with: 1. Derive cosine from acos(A . B) 2. Derive sine from asin(|A x B| / (|A| \* |B|)) 3. Use A x B as axis of rotation 4. Use matrix given near the bottom of [this page](http://www.euclideanspace.com/...
[ 0.15760554373264313, -0.14530396461486816, 0.671114444732666, -0.1428525447845459, -0.5142571926116943, 0.11355358362197876, -0.17189322412014008, -0.5343159437179565, 0.01680678129196167, -0.5720440745353699, 0.3040207028388977, 0.5603665113449097, -0.20267006754875183, 0.2273638397455215...
answer. Edit: Removed acos and asin (see [Hugh Allen's post](https://stackoverflow.com/questions/286274/direct3d-geometry-rotation-matrix-from-two-vectors#286300)) It's probably more of a typo than a thinko, but acos(A.B) is the angle, not its cosine. Similarly for point 2. You can calculate the sin from the cos usin...
[ -0.17589165270328522, -0.06573343276977539, 0.5736169815063477, -0.03291427344083786, -0.35473617911338806, 0.1581544429063797, -0.17101043462753296, -0.5232433080673218, 0.0011229350930079818, -0.4049361050128937, -0.06116507574915886, 0.3539249897003174, -0.2854762077331543, -0.160344272...