text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I asked about [setting up an in-memory dataset with TClientDataset,](https://stackoverflow.com/questions/274958/delphi-using-tclientdataset-as-an-in-memory-dataset) and was told I had to use the "Create Data Set" command in the form designer. That works just fine until I try to create a master-detail database relation....
[ 0.35411420464515686, 0.10910174995660782, 0.05438189208507538, 0.11168663203716278, 0.06814621388912201, -0.24832485616207123, 0.16184936463832855, -0.18905092775821686, -0.13927200436592102, -0.347362220287323, -0.08496617525815964, 0.5646317005157471, -0.4267429709434509, 0.1585509032011...
putting your detail in a ftDataSet column, just use a unique integer or GUID for the key reference, and place the detail data in a different TClientDataSet and have that key. Like you would in a normal database. Each TClientDataSet representing a different table.
[ 0.368902325630188, -0.3916678726673126, 0.4744352102279663, 0.45617592334747314, -0.0012500645825639367, 0.007917717099189758, -0.18593522906303406, -0.22694696485996246, 0.04761833697557449, -0.7985281944274902, 0.1177218034863472, 0.5900859236717224, -0.38020551204681396, -0.020304700359...
I am currently working on a web application that uses PHP and MySQL, but I do not have shell access to the server (working on that problem already...). Currently, I have source control with subversion on my local computer and I have a database on the local computer that I make all changes to. Then, once I've tested all...
[ 0.484906941652298, 0.3030928075313568, 0.39619264006614685, -0.20030094683170319, 0.006990194786339998, -0.1890154331922531, 0.3591882586479187, 0.17951396107673645, -0.18443025648593903, -0.7694694995880127, -0.05992937088012695, 0.6763031482696533, -0.16114355623722076, 0.137703865766525...
one major thing, I need a way to avoid copying my .svn files... Does anyone know what the best solution for this particular setup would be? I've looked into Capistrano a bit and Ant, but both of those look like it would be a problem that I do not have shell access... You can do a subversion export (rather than checkout...
[ 0.607182502746582, 0.05644996091723442, 0.17771145701408386, 0.1299804151058197, 0.2124500572681427, -0.26686325669288635, 0.1631755828857422, 0.3494719862937927, -0.37722495198249817, -0.5626766085624695, 0.26216280460357666, 0.6478046178817749, -0.15589265525341034, 0.25612905621528625, ...
Do you follow a standard for wrapping long lines in source code? What line length do you find most comfortable to read? Sometimes I find people who program on wide-screen monitors and like to use its full width for displaying source code. I prefer shorter lines, around 80-100 characters, but I have a hard time trying ...
[ 0.45958033204078674, 0.034523528069257736, 0.21646319329738617, 0.2647050619125366, -0.038665320724248886, -0.16611243784427643, 0.4856918156147003, -0.10803327709436417, -0.3388831913471222, -0.43363597989082336, -0.1064365953207016, 0.409010648727417, -0.012993554584681988, -0.2075397819...
row. Horizontal scrolling is undesirable but an 81-character line is easier to read than an indentation-confusingly line-wrapped version. 80 characters is likely to be inadaquate for programming styles with large indentations and/or verbose variable names. Keep the amount of logical complexity down to a per-line maxim...
[ -0.44910264015197754, -0.039962828159332275, 0.624269962310791, 0.2678926885128021, -0.22302038967609406, 0.16566555202007294, 0.20068185031414032, -0.32818523049354553, -0.21302054822444916, -0.5301282405853271, -0.04367708042263985, 0.43556734919548035, -0.09313337504863739, -0.361483573...
Generally I connect and retrieve data using the standard way (error checking removed for simplicity): ``` $db = mysql_select_db("dbname", mysql_connect("host","username","passord")); $items = mysql_query("SELECT * FROM $db"); while($item = mysql_fetch_array($items)) { my_function($item[rowname]); } ``` Where my...
[ -0.12535691261291504, 0.31601595878601074, 0.6926661133766174, -0.15938915312290192, -0.4883056879043579, 0.11514398455619812, 0.04128273203969002, -0.3216034471988678, -0.029809728264808655, -0.6021904349327087, -0.041189298033714294, 0.18088939785957336, -0.16295786201953888, 0.338113725...
a pass by reference $query->bindValue(':pass', $pass); // this is a pass by value $query->execute(); // query is run // to get all the data at once $res = $query->fetchall(); print_r($res); ``` see [PDO driver at php.net](http://ca3.php.net/manual/en/book.pdo.php) Note that this way (with prepared statements) wil...
[ 0.3188709318637848, -0.10142397880554199, 0.6673753261566162, 0.06934721022844315, -0.40082454681396484, -0.3166089653968811, 0.5600134134292603, -0.5829451680183411, -0.1540747433900833, -0.6556963324546814, -0.17866350710391998, 0.1657990962266922, -0.4621827006340027, 0.2066509574651718...
else when it comes to PHP. You can then use [$query->fetchobject](http://ca3.php.net/manual/en/pdostatement.fetchobject.php) to retrieve your data as an object.
[ 0.034669261425733566, -0.4284222722053528, 0.4438985586166382, 0.23288504779338837, -0.22794461250305176, 0.13565728068351746, -0.2543933391571045, -0.14534270763397217, -0.43265458941459656, -0.32610172033309937, 0.11913574486970901, 0.5325467586517334, -0.04948601871728897, -0.2019285708...
I can set data in JTable constructor, and then user can change this data when program is running manually(typing from keyboard). But what method should I use in case I want to change data in some column? To change column header I use TableColumn method setHeaderValue. What should I use to set value in JTable cell? If ...
[ 0.20557154715061188, 0.12487073987722397, 0.20164689421653748, -0.03465081378817558, -0.07297773659229279, -0.11096825450658798, -0.07967255264520645, -0.2709031403064728, -0.3068684935569763, -0.8171574473381042, 0.2592272162437439, 0.44668298959732056, -0.3693521022796631, -0.14262215793...
C++0x will allow template to take an arbitrary number of arguments. What is the best use of this feature other than implementing tuples ? 1. **Type-safe printf** 2. Forwarding of arbitrary many constructor arguments in **factory methods** 3. Having **arbitrary** base-classes allows for putting and removing useful **pol...
[ 0.16480451822280884, -0.3335272967815399, 0.33988744020462036, -0.23677463829517365, -0.1506911665201187, 0.18668490648269653, -0.3539595603942871, -0.5281931757926941, -0.25666359066963196, -0.3889125883579254, -0.09999076277017593, 0.5224222540855408, -0.6601771116256714, -0.332365363836...
}; my_container c = { a, b, c }; ``` Sample to 5: ``` template<char... digits> int operator "" b() { return convert<digits...>::value; } ``` See this example code: [here](https://stackoverflow.com/questions/537303/binary-literals/538101#538101)
[ 0.08306251466274261, 0.08050251752138138, 0.368584543466568, -0.2729286253452301, 0.32013294100761414, 0.09335943311452866, -0.06325668841600418, -0.3076349198818207, -0.2801807224750519, -0.20018553733825684, -0.15744802355766296, 0.5069113373756409, -0.18262943625450134, 0.32455486059188...
What would be the best way to manage large number of instances of the same class in MATLAB? Using the naive way produces absymal results: ``` classdef Request properties num=7; end methods function f=foo(this) f = this.num + 4; end end end >> a=[]; >> tic,for i=...
[ -0.3140939772129059, -0.3174174129962921, 0.3922998607158661, -0.21505454182624817, 0.03950187936425209, 0.2960817217826843, 0.518438458442688, -0.6615561842918396, 0.08856885135173798, -0.44377169013023376, -0.09978774189949036, 0.5756903290748596, 0.1380048245191574, 0.024734066799283028...
Request];end;toc Elapsed time is 31.261500 seconds. ``` Inheriting handle drastically improve the results: ``` classdef RequestH < handle properties num=7; end methods function f=foo(this) f = this.num + 4; end end end >> tic,for i=1:1000 a=[a RequestH];end;to...
[ -0.28277599811553955, -0.14788709580898285, 0.7900504469871521, -0.32659560441970825, -0.057542137801647186, 0.23908202350139618, 0.4800321161746979, -0.6943314671516418, -0.0823630541563034, -0.38979193568229675, -0.2622183859348297, 0.6231780052185059, 0.02664967253804207, 0.092668637633...
an acceptable performance, especially considering the increasing reallocation overhead Is there a way to preallocate class array? Any ideas on how to manage lange quantities of object effectively? Thanks, Dani This solution expands on [Marc's answer](https://stackoverflow.com/questions/276198/matlab-class-array#2...
[ -0.1730058491230011, -0.14638838171958923, 0.6088021993637085, -0.2050689160823822, -0.2999523878097534, 0.4461457431316376, 0.5726439356803894, -0.5415894389152527, -0.21009114384651184, -0.7976988554000854, -0.17697790265083313, 0.5667716860771179, 0.020815934985876083, -0.06794162839651...
I have a form made up of multiple, optional subparts - each of which is enclosed in a ``` <div class="details"></div> ``` When editing the form I would like to hide those subparts which aren't as yet completed, and obviously I would like to do it unobtrusively. To simplify things I'm just checking to see if those fi...
[ 0.1274028867483139, 0.07326725870370865, 0.2164711356163025, -0.051376234740018845, -0.16095301508903503, 0.26013660430908203, 0.031025076285004616, -0.5311459898948669, 0.1819814145565033, -0.8112906217575073, -0.3183383643627167, 0.3116738796234131, -0.1749381721019745, 0.020430015400052...
course, the :empty selector may be wrong, or indeed inappropriate. (Of course what I really want to do is show any parts where any fields are completed, but I thought I'd start with just checking the most important one.) I would be greatful if anyone could anyone point me in the right direction... No selector love? No...
[ 0.24175164103507996, 0.17345818877220154, -0.06931834667921066, 0.08860243111848831, 0.13140501081943512, -0.08324584364891052, 0.1620825231075287, -0.08604495227336884, -0.025600798428058624, -0.6615999937057495, -0.21379317343235016, 0.28609156608581543, -0.09000058472156525, 0.171622157...
Other than the fact that **ASP.NET MVC Web Application** has more clarity in its implementation of the MVC pattern and that it strictly follows the MVC pattern, how is it different from **ASP.NET Web Application**? If you make your **ASP.NET Web Application** have a **Business Logic Layer**, **Data Access Layer** and ...
[ 0.14278873801231384, -0.06880096346139908, 0.7023953199386597, 0.18760845065116882, -0.26150593161582947, -0.12096145004034042, -0.043614454567432404, -0.19133086502552032, -0.5154269337654114, -0.5230211615562439, -0.27440890669822693, 0.4238697290420532, -0.25567302107810974, 0.289895683...
and/or shed more light on the subject. This recent question may address your concerns: [How does the MVC pattern differ, if at all, from the DAL / BLL design pattern?](https://stackoverflow.com/questions/267924/how-does-the-mvc-pattern-differ-if-at-all-from-the-dal-bll-design-pattern)
[ 0.18806470930576324, -0.1995762288570404, 0.03072250820696354, -0.269821435213089, -0.1952802836894989, 0.053517818450927734, -0.12881581485271454, -0.08118011802434921, -0.6371236443519592, -0.22025088965892792, -0.22162316739559174, 0.30777695775032043, 0.030794361606240273, 0.1944777518...
C#: How do you pass an object in a function parameter? ``` public void MyFunction(TextBox txtField) { txtField.Text = "Hi."; } ``` Would the above be valid? Or? So long as you're not in a different thread, yes the code sample is valid. A textbox (or other windows forms items) are still objects that can be passed t...
[ 0.09892692416906357, 0.1876615583896637, 0.38442936539649963, -0.09100398421287537, -0.022011257708072662, -0.09720871597528458, 0.23617075383663177, -0.14500457048416138, -0.0857597067952156, -0.3237042725086212, -0.3924984037876129, 0.36660316586494446, -0.377158522605896, 0.074455097317...
I have a window (derived from JFrame) and I want to disable the close button during certain operations which are not interruptible. I know I can make the button not do anything (or call a handler in a WindowListener) by calling ``` setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); ``` but I would like to make it...
[ 0.38337117433547974, 0.16988719999790192, 0.36022430658340454, -0.3959990441799164, 0.0854717493057251, -0.21045434474945068, 0.4248613119125366, 0.09476985037326813, -0.03407244384288788, -0.8198403716087341, -0.20335395634174347, 0.4785615801811218, -0.37176066637039185, 0.32381403446197...
When a webpage has moved to a new location, how do I show the moved web page AND return a 301 permanent redirect HTTP response status code in [Django](http://djangoproject.com/)? ``` from django import http return http.HttpResponsePermanentRedirect('/yournewpage.html') ``` the browser will get the 301, and go ...
[ 0.3447984457015991, 0.06187284737825394, 0.4417184889316559, -0.3667411506175995, -0.33579736948013306, -0.028740650042891502, -0.014398237690329552, -0.25097352266311646, -0.276024729013443, -0.35701417922973633, -0.037731822580099106, 0.5785477161407471, -0.16775043308734894, -0.33258026...
-------------------> GET /youroldpage.html HTTP/1.1 <------------------- HTTP/1.1 301 Moved Permanently Location: /yournewpage.html -------------------> GET /yournewpage.html HTTP/1.1 ```
[ 0.39976418018341064, -0.0018529706867411733, 0.4393177032470703, 0.020367564633488655, -0.15613898634910583, -0.34977245330810547, 0.42030155658721924, 0.12829463183879852, -0.02183869667351246, -0.4645571708679199, 0.20635679364204407, 0.20590779185295105, 0.09014449268579483, -0.02609052...
I am in search for a database with translations so I can have comonly used phrases and words translated by a machine and not by an expensive translator. Is there such a thing as a translation database with words and often used phrases? If you don't know any would you use such a service? edit: the database should only...
[ 0.47169485688209534, 0.33984625339508057, 0.18599186837673187, 0.01910906285047531, 0.07569959759712219, -0.3043060898780823, 0.6413106918334961, 0.15102247893810272, 0.02538268081843853, -0.5081051588058472, -0.07866669446229935, 0.5120061635971069, -0.15334026515483856, 0.183094263076782...
I could really do with updating a user's session variables from within my HTTPModule, but from what I can see, it isn't possible. *UPDATE:* My code is currently running inside the `OnBeginRequest ()` event handler. *UPDATE:* Following advice received so far, I tried adding this to the `Init ()` routine in my HTTPModu...
[ 0.18491855263710022, 0.14627666771411896, 0.05713466927409172, 0.053569842129945755, -0.08854339271783829, -0.2916546165943146, 0.7715577483177185, 0.12499412149190903, -0.3163112699985504, -0.7388361692428589, -0.23331160843372345, 0.279762864112854, -0.24865198135375977, 0.18491710722446...
MyHttpModule : IHttpModule { public void Init(HttpApplication application) { application.PostAcquireRequestState += new EventHandler(Application_PostAcquireRequestState); application.PostMapRequestHandler += new EventHandler(Application_PostMapRequestHandler); } void Application_PostMapRequestH...
[ -0.4642389416694641, -0.1145051047205925, 0.608959436416626, -0.12751314043998718, 0.033942289650440216, 0.3389069139957428, 0.5992287993431091, -0.3426443040370941, -0.1043851301074028, -0.9169917106628418, -0.4758916199207306, 0.5127331018447876, -0.5492517352104187, 0.11972842365503311,...
// swap the current handler app.Context.Handler = new MyHttpHandler(app.Context.Handler); } void Application_PostAcquireRequestState(object source, EventArgs e) { HttpApplication app = (HttpApplication)source; MyHttpHandler resourceHttpHandler = HttpContext.Current.Handler as MyHttpHandler;...
[ -0.17914941906929016, -0.2904496192932129, 0.3326590955257416, -0.22914893925189972, 0.2196643203496933, 0.3930875062942505, 0.39911776781082153, -0.40817177295684814, -0.19592440128326416, -0.5509758591651917, -0.4752752482891083, 0.5364046096801758, -0.6079718470573425, 0.117432698607444...
session state should be available Debug.Assert(app.Session != null, "it did not work :("); } public void Dispose() { } // a temp handler used to force the SessionStateModule to load session state public class MyHttpHandler : IHttpHandler, IRequiresSessionState { internal readonly IH...
[ 0.05178286135196686, -0.14968925714492798, 0.08471319079399109, 0.013800754211843014, 0.1279371827840805, -0.09474049508571625, 0.5913001298904419, -0.24181805551052094, -0.20818322896957397, -0.4238068759441376, -0.29995256662368774, 0.5568232536315918, -0.4449306130409241, 0.251793563365...
public void ProcessRequest(HttpContext context) { // do not worry, ProcessRequest() will not be called, but let's be safe throw new InvalidOperationException("MyHttpHandler cannot process requests."); } public bool IsReusable { // IsReusable must be set to false since...
[ 0.10176742076873779, -0.16388413310050964, 0.2937440872192383, -0.08609436452388763, 0.06409840285778046, -0.10937581211328506, 0.6824121475219727, -0.16458632051944733, -0.07569390535354614, -0.44183439016342163, -0.4398149847984314, 0.5823131799697876, -0.22482545673847198, 0.37237635254...
} } } } ```
[ -0.016344990581274033, 0.4495171308517456, 0.23163163661956787, -0.18499617278575897, 0.39558660984039307, -0.21481190621852875, 0.08800963312387466, 0.4133334159851074, 0.23730628192424774, -0.5074179768562317, -0.3644443452358246, 0.5587084293365479, -0.3209930658340454, 0.33781036734580...
Optimization of PHP code via runtime benchmarking is straight forward. Keep track of $start and $end times via microtime() around a code block - I am not looking for an answer that involves microtime() usage. What I would like to do is measure the time it takes PHP to get prepared to run it's code - code-parse/op-code...
[ 0.2251121699810028, 0.2673628628253937, 0.14406606554985046, 0.24670812487602234, -0.032548412680625916, 0.013364049606025219, 0.15050259232521057, -0.24933290481567383, -0.1839301884174347, -0.7030043005943298, 0.35592350363731384, 0.7704065442085266, -0.1531020849943161, -0.2824294865131...
that an opcode cache such as APC is **not** part of the scenario. Would I be correct that measurement of parse time in PHP is something that would have to take place in mod\_php? **EDIT**: If possible, taking into account `$_SERVER['DOCUMENT_ROOT']` usage in code would be helpful. Command solutions might take a bit o...
[ 0.2960206866264343, 0.2213684469461441, -0.029476307332515717, 0.18946819007396698, 0.18870912492275238, 0.12302304059267044, 0.2831352949142456, -0.23827897012233734, -0.15670086443424225, -0.5475339293479919, 0.17876215279102325, 0.7094956040382385, -0.02597106620669365, -0.2809945642948...
used this method on large files and PHP5.3 on Core2Duo 2.4Ghz can parse between 1.5 and 4.5MB of PHP code per second (it depends very much on complexity of the code of course).
[ 0.023753544315695763, -0.022260133177042007, 0.242971733212471, 0.06680547446012497, -0.19481101632118225, -0.030914168804883957, 0.6481752395629883, -0.14466513693332672, -0.23109909892082214, -0.43816766142845154, 0.21268713474273682, 0.22743013501167297, 0.06576409935951233, -0.16240791...
I'm working on a project for OSX where the user can pick a collection of documents (from any application) which I need to generate PDF's from. The standard Macintosh Print dialog has a PDF button which has a number of PDF-related commands including "Save as PDF...". However, I need to generate the PDF file without requ...
[ 0.3774278163909912, -0.029499070718884468, 0.2827131152153015, 0.2084445357322693, 0.19950643181800842, 0.07545765489339828, -0.003062814474105835, 0.0027048145420849323, -0.22608155012130737, -0.6476067304611206, -0.05857842043042183, 0.7758979797363281, -0.2573089301586151, -0.1651636064...
printing any file but only to a real printer. * AppleScript. Some applications have the ability to generate PDF files (for instance, if you send 'save doc in "test.pdf"' to Pages it will generate a PDF (but this only works for Pages - I need support for any type of document). * Custom Printer. I could create a virtual ...
[ 0.49494361877441406, 0.03859638795256615, 0.5491724610328674, 0.13031822443008423, -0.22413980960845947, 0.07127919048070908, -0.08127907663583755, 0.15160596370697021, -0.5851916074752808, -0.8883407711982727, 0.22338812053203583, 0.5149261355400085, -0.3288065791130066, -0.06258892267942...
carrying out the following steps: 1. Do Cmd-P (opens the print dialog) 2. Click the "PDF" button 3. Select "Save as PDF..." (second item in menu) 4. Type in filename in save dialog 5. Click "Save" If that's the best approach (is it?) then the real problem is: how do I send UI Events to an external application (keystr...
[ 0.03905203938484192, -0.28732794523239136, 0.8081309199333191, 0.15094545483589172, 0.03298789635300636, -0.17922255396842957, 0.17390894889831543, -0.3789461851119995, -0.1449967920780182, -0.7934475541114807, -0.39548659324645996, 0.6998189687728882, -0.09073685109615326, -0.160895258188...
The common denominator is that each of these documents has an associated application and that application knows how to print it (and OSX knows how to render print output to a PDF file). So, the samples at Cocoa Dev Central don't help because they're about generating a PDF from *my application*. I think you could use a...
[ 0.2811320722103119, 0.3393552899360657, 0.38117024302482605, -0.1122489795088768, -0.13298693299293518, -0.018896546214818954, 0.07180339097976685, -0.18273226916790009, -0.18423449993133545, -0.6761178970336914, -0.18798640370368958, 0.7053141593933105, -0.21978852152824402, -0.1073186770...
foremost to true keystroke "p" using {command down} delay 3 click menu button "PDF" of sheet 2 click menu item "Save as PDF…" of menu 1 of menu button "PDF" of sheet 2 keystroke "my_test.file"
[ 0.038001738488674164, -0.05804769694805145, 0.5798476338386536, 0.08125938475131989, 0.09897187352180481, -0.1874125748872757, 0.48590216040611267, -0.5772756338119507, 0.08192464709281921, -0.3647397458553314, -0.1236254870891571, 0.8750738501548767, 0.10030780732631683, -0.23667070269584...
keystroke return delay 10 end tell end tell ```
[ 0.1814737468957901, 0.13640041649341583, 0.5584409832954407, -0.09209280461072922, 0.24099281430244446, -0.04770740121603012, 0.6008270382881165, -0.15930180251598358, -0.061947837471961975, -0.25182226300239563, -0.2666279375553131, 0.632107138633728, -0.14263589680194855, 0.3329658210277...
I'm trying to make a webpage that allows the uploading of multiple files at the same times. I will limit the file extensions to the most common images like JPG, JPEG, PNG and GIF. I've done some research on this and everywhere I look it's flash this and flash that. I don't want to use flash really. Especially with Fl...
[ 0.48822587728500366, 0.18479706346988678, 0.21807149052619934, 0.1501074582338333, -0.2648915946483612, -0.2596725523471832, -0.000431187596404925, 0.2781015634536743, -0.4073740541934967, -0.7244570255279541, 0.09025474637746811, 0.4978574514389038, -0.5425221920013428, 0.2512161433696747...
the form. Creating the new input fields with a Javascript is nog big deal really. So I'm wondering how this works. Do I need to give all file-input fields the same name atribute so I can use 1 piece of PHP code to solve this? Or Is there some way for PHP to detect howmany files have been sumbitted and simply put the c...
[ 0.5016850233078003, 0.05217927321791649, 0.4246247410774231, 0.24194787442684174, -0.5045472383499146, -0.1875607669353485, 0.2936195135116577, -0.3088513910770416, -0.1274515837430954, -0.49038296937942505, 0.18078823387622833, 0.5361452698707581, -0.38576507568359375, -0.0895548984408378...
$\_FILES array looking how many files have been uploaded and handling them.
[ 0.346525102853775, 0.17383046448230743, 0.23465639352798462, 0.13915343582630157, 0.209267720580101, -0.05301082506775856, 0.01506893616169691, 0.10405311733484268, -0.22291749715805054, -0.7709174156188965, -0.04997880011796951, 0.4600884020328522, -0.252269983291626, 0.29261285066604614,...
With LINQ to SQL most likely going to not get as much active development as Entity Framework do you think it's best to switch to Entity Framework? I've personally found EF to be very clunky and hard to use compared to LINQ to SQL which feels very natural. EDIT: I recently posted an article on my blog about my feeling...
[ 0.25131648778915405, 0.23939675092697144, 0.7520238757133484, -0.047509126365184784, -0.1779414564371109, -0.5362454056739807, 0.03110596351325512, -0.15346725285053253, -0.138135626912117, -0.6471429467201233, -0.0621497817337513, 0.6930399537086487, -0.27178582549095154, 0.12354020029306...
years) will almost certainly look quite different to EF today. Or certainly "different enough" ;-p As such, my view is: stick with simple. And simple is LINQ-to-SQL. I don't see much benefit learning a notoriously complex system if I know it is going to change very soon. And I'm 100% with you on LINQ-to-SQL ;-p If ...
[ -0.09719350934028625, 0.049399930983781815, 0.8150731921195984, -0.27936795353889465, -0.2019418627023697, -0.04526587948203087, 0.15806280076503754, -0.20352020859718323, -0.16537007689476013, -0.720206618309021, -0.1936301440000534, 0.7396184206008911, 0.07824516296386719, -0.00797745119...
I'm trying to write rules for detecting some errors in *annotated* multi-threaded java programs. As a toy example, I'd like to detect if any method annotated with @ThreadSafe calls a method without such an annotation, without synchronization. I'm looking for a tool that would allow me to write such a test. I've looke...
[ 0.44898632168769836, 0.04080478847026825, -0.26897522807121277, 0.09795038402080536, -0.12421263009309769, -0.1598898470401764, 0.24803507328033447, -0.041122324764728546, -0.09898193925619125, -0.631211519241333, 0.3057548403739929, 0.41830694675445557, -0.44478002190589905, -0.0357019007...
overriden method is annotated with @Override. Have you tried [FindBugs](http://findbugs.sourceforge.net/)? It actually supports a set of [annotations for thread safety](http://www.javaconcurrencyinpractice.com/annotations/doc/net/jcip/annotations/package-summary.html) (the same as those used in [Java Concurrency in Pra...
[ 0.3405461013317108, -0.06995571404695511, 0.008821412920951843, 0.012276940979063511, -0.1033560037612915, -0.46234530210494995, 0.47276508808135986, -0.20445233583450317, -0.4224764406681061, -0.33404043316841125, 0.1984255462884903, 0.3041703402996063, -0.5289667844772339, -0.08265147358...
I have seen some very weird `for` loops when reading other people's code. I have been trying to search for a full syntax explanation for the `for` loop in C but it is very hard because the word "for" appears in unrelated sentences making the search almost impossible to Google effectively. This question came to my mind...
[ 0.49472492933273315, 0.10673259198665619, -0.061171844601631165, -0.05286818742752075, -0.14177940785884857, 0.25819188356399536, 0.22955748438835144, -0.11373458057641983, -0.34711307287216187, -0.3296058773994446, -0.18516606092453003, -0.12023023515939713, -0.24096356332302094, 0.247290...
`b<<=1`. But within a loop exit condition, what happens? Does it exit when `p==0`, when `a==1` or when both happen? It would be great if anyone could help me understand this and maybe point me in the direction of a full `for` loop syntax description. The comma is not exclusive of for loops; it is the comma operator....
[ -0.05566069856286049, -0.043219685554504395, 0.16336053609848022, -0.1302102506160736, 0.11948194354772568, -0.18927250802516937, 0.4821031093597412, -0.15243549644947052, -0.11297290772199631, -0.22981978952884674, -0.5946926474571228, 0.22002612054347992, -0.5314772725105286, 0.171828091...
increment; } ``` So your for loop example is (again ignoring `continue` and `break`) equivalent to ``` p=0; while (p+=(a&1)*b,a!=1) { ... a>>=1,b<<=1; } ``` Which acts as if it were (again ignoring `continue` and `break`): ``` p=0; while (true) { p+=(a&1)*b; if (a == 1) break; ... a>>=1; ...
[ 0.10683269798755646, -0.2852495312690735, 0.6269301176071167, -0.23679232597351074, 0.02303289622068405, 0.11705280840396881, 0.7077224850654602, -0.3736140727996826, -0.36437442898750305, -0.10635956376791, -0.2749791443347931, 0.5467213988304138, -0.3480004668235779, 0.21567843854427338,...
breaks the loop). * A `continue` acts as if it were a goto to a label just before the increment, unlike a `continue` in the while loop which would skip the increment. Also, an important detail about the comma operator: it is a sequence point, like `&&` and `||` (which is why I can split it in separate statements and k...
[ 0.07114159315824509, -0.2268477827310562, 0.3426012396812439, -0.01678277738392353, -0.03861776366829872, -0.36523184180259705, 0.44939398765563965, -0.22983799874782562, -0.5637580752372742, -0.02329470030963421, -0.5083236694335938, -0.09828099608421326, -0.29263055324554443, 0.227481797...
a pair of braces ``` { for (...) { ... } } ``` The standard sayeth: > ### ISO/IEC 9899:1999 §6.8.5 Iteration statements > > > ¶5 An iteration statement is a block whose scope is a strict subset of the scope of its > enclosing block. The loop body is also a block whose scope is a strict subset of the scope > of ...
[ 0.3748069107532501, 0.026284996420145035, 0.05399433895945549, -0.1626051962375641, -0.33604592084884644, 0.2388974130153656, 0.4205915331840515, -0.4393550753593445, -0.14875270426273346, -0.2948787808418274, -0.04266984388232231, 0.018825765699148178, -0.4975903630256653, -0.060093123465...
around the loop' comes into its own; it explains why the variable `i` cannot be accessed outside the loop. You can declare more than one variable, but they must all be of the same type: ``` for (int i = 0, j = sizeof(something); i < j; i++, j--) { ... } ``` The standard sayeth: > ### ISO/IEC 9899:1999 §6.8.5.3 The ...
[ 0.01667073182761669, 0.14867444336414337, 0.3761848509311676, -0.21103712916374207, -0.27307257056236267, -0.341678649187088, 0.34226471185684204, -0.4747811555862427, -0.2338138222694397, 0.019384386017918587, -0.06682071089744568, -0.03426186740398407, -0.6686173677444458, 0.323357313871...
The expression expression-3 is > evaluated as a void expression after each execution of the loop body. If clause-1 is a > declaration, the scope of any variables it declares is the remainder of the declaration and > the entire loop, including the other two expressions; it is reached in the order of execution > befo...
[ 0.010369725525379181, 0.022148586809635162, 0.3007338345050812, -0.2026679515838623, -0.01833517663180828, -0.09074771404266357, 0.6810845732688904, -0.7751830816268921, -0.0045655169524252415, -0.16409337520599365, -0.5693591237068176, 0.2559221386909485, -0.5666407346725464, -0.100163958...
nonzero constant. > > > 133) Thus, clause-1 specifies initialization for the loop, possibly declaring one or more variables for use in > the loop; the controlling expression, expression-2, specifies an evaluation made before each iteration, > such that execution of the loop continues until the expression compares e...
[ -0.01908327452838421, -0.20820647478103638, 0.13303567469120026, -0.1286056786775589, -0.010302968323230743, 0.11023279279470444, 0.4405953586101532, -0.6928409337997437, 0.20122221112251282, -0.02557813748717308, -0.27219364047050476, 0.26934322714805603, -0.5983631610870361, -0.077486515...
I need to build a function which parses the domain from a URL. So, with ``` http://google.com/dhasjkdas/sadsdds/sdda/sdads.html ``` or ``` http://www.google.com/dhasjkdas/sadsdds/sdda/sdads.html ``` it should return `google.com` with ``` http://google.co.uk/dhasjkdas/sadsdds/sdda/sdads.html ``` it should ret...
[ -0.0056903469376266, 0.36035341024398804, 0.4076060354709625, -0.11283236742019653, -0.25347012281417847, -0.17626573145389557, 0.5172834396362305, -0.14106538891792297, -0.028848230838775635, -0.5005762577056885, -0.2235579639673233, 0.135550856590271, -0.42130357027053833, 0.491123855113...
I'm looking to implement something in Java along the lines of: ``` class Foo{ private int lorem; // private int ipsum; public setAttribute(String attr, int val){ //sets attribute based on name } public static void main(String [] args){ Foo f = new Foo(); f.setAttribute("lorem",1); f.setAttribute("...
[ 0.266143798828125, -0.06945563852787018, 0.35640373826026917, -0.1654047816991806, -0.1415655016899109, -0.029053235426545143, 0.27096280455589294, -0.4494132697582245, 0.06021784245967865, -0.3561649024486542, -0.008554017171263695, 0.6718365550041199, -0.4601576328277588, -0.013880124315...
void setIntField(String fieldName, int value) throws NoSuchFieldException, IllegalAccessException { Field field = getClass().getDeclaredField(fieldName); field.setInt(this, value); } ```
[ 0.3123576045036316, -0.2675921320915222, 0.11808444559574127, -0.09751825034618378, 0.3820361793041229, -0.11074598878622055, 0.566613495349884, -0.3031916618347168, -0.08507680147886276, -0.20024943351745605, -0.20728813111782074, 0.6878697276115417, -0.5491255521774292, 0.199108526110649...
I'm going to running thousands of queries into SQL and I need to prevent the duplication of field 'domain'. Never had to do this before and any help would be appreciated. You probably want to create a "UNIQUE" constraint on the field "Domain" - this constraint will raise an error if you create two rows that have the sa...
[ 0.23949012160301208, 0.2355598360300064, 0.1230466365814209, 0.08305603265762329, -0.3025522530078888, -0.20435073971748352, 0.3038076162338257, 0.03515658155083656, -0.2680840492248535, -0.4570156931877136, 0.2835782766342163, 0.2824519872665405, -0.19917255640029907, 0.26215633749961853,...
language, it is a SQL database definition thing. A huge advantage of expressing this constraint in SQL is that you can trust the database to preserve the constraint even when people import / export data from the database, your application is buggy or another application shares the database.
[ 0.1994342803955078, 0.012714498676359653, -0.07482153922319412, 0.2755269408226013, -0.022717691957950592, -0.25791671872138977, 0.6280896067619324, 0.3482029438018799, -0.16362915933132172, -0.3710446059703827, 0.11537055671215057, 0.6090149879455566, -0.6180668473243713, -0.2665014266967...
Can Emacs support the concept of projects? That would be where several configuration options varies depending on what project you are working on. You generally wouldn't expect emacs to know about differences in build requirements---you let the build system (make or whatever) take care of that. To handle different codin...
[ 0.3054601848125458, -0.05479817092418671, 0.16033902764320374, 0.40024128556251526, 0.1345067322254181, -0.1256684809923172, 0.1310892403125763, -0.009839954786002636, -0.18881286680698395, -0.5261392593383789, -0.2853951156139374, 0.6028962135314941, -0.2587469816207886, -0.15072149038314...
Given a pointer to some variable.. is there a way to check whether it was statically or dynamically allocated?? Quoting from your comment: > im making a method that will basically get rid of a struct. it has a data member which is a pointer to something that may or may not be malloced.. depending on which one, i would...
[ -0.12389576435089111, -0.26480138301849365, 0.024985693395137787, 0.2833990156650543, -0.031749218702316284, 0.020946726202964783, -0.440916508436203, -0.1919134259223938, -0.3617244064807892, -0.5468100905418396, -0.07476592808961868, 0.3139444887638092, -0.5608789324760437, 0.14485090970...
be: * A static variable * On the stack * On the stack but dynamically allocated (i.e. `alloca()`) * On the heap, allocated with `malloc()` * On the heap, allocated with `new` * On the heap, in the middle of an array allocated with `new[]` * On the heap, within a struct allocated with `malloc()` * On the heap, within a...
[ 0.03693186864256859, -0.2474592924118042, 0.06419143080711365, -0.09941717237234116, 0.0481756366789341, 0.3185902535915375, -0.036011941730976105, 0.06960739195346832, 0.01592753268778324, -0.8704596757888794, -0.419671893119812, 0.40857401490211487, -0.2888973653316498, -0.09216455370187...
must always release memory with the correct release function for the allocator you used. So, either the part of the program responsible for allocating the memory should also free the memory, or you must pass the correct release function (or a wrapper around it) to the code which will free the memory. You can also avoi...
[ 0.057339202612638474, 0.07092771679162979, 0.1089293584227562, 0.2408767193555832, 0.3068157136440277, -0.11658822745084763, -0.11507711559534073, -0.11811726540327072, -0.2543233036994934, -0.3139040172100067, -0.7070549726486206, 0.5464879274368286, -0.2688758671283722, -0.05827822163701...
you can even use tricks (like tagged pointers) to allow one to also use static allocation (but I will not go into the details of this approach here). [Raymond Chen](http://en.wikipedia.org/wiki/Raymond_Chen) has a blog post about it (Windows-centric, but the concepts are the same everywhere): [Allocating and freeing m...
[ 0.11358606070280075, -0.04321780800819397, -0.279752641916275, 0.24762074649333954, 0.12001831084489822, -0.16115474700927734, 0.07430767267942429, -0.24201121926307678, -0.7841531038284302, -0.4087255299091339, -0.17069269716739655, 0.18256038427352905, -0.09988168627023697, 0.16731721162...
I have an initialization class that preloads content into a variable (probably a list or array). There will only be one instance of this initialization class but there will be many classes that need to access the preloaded content. The problem is not many of them are related and none of them extend my initialization c...
[ 0.014954435639083385, -0.2803359925746918, 0.18207022547721863, 0.14433884620666504, 0.06046738103032112, -0.13593418896198273, -0.006457425653934479, -0.18702472746372223, 0.012281615287065506, -0.6506164073944092, 0.022175131365656853, 0.46849459409713745, -0.44701147079467773, 0.2836626...
//return the preloaded content that matches given name } } ``` The preloaded content may at some time decrease or increase in size depending on what the situation may call for. I've run into situations where something like this has been the only decent looking solution however; I think its an ugly solution. Not...
[ 0.3690205216407776, 0.11548076570034027, 0.1119709312915802, 0.14099399745464325, 0.1634557694196701, -0.11261066049337387, 0.13607364892959595, 0.3271510899066925, -0.1327921599149704, -0.6549192667007446, -0.11411911249160767, 0.4395555853843689, -0.2483750432729721, 0.39932072162628174,...
up. Certain classes will be loaded/unloaded depending on the rendering of the scene and my InitClass won't handle the creation of these objects most of the time. Can anyone give me a better solution? what you are doing is known as [singleton](http://en.wikipedia.org/wiki/Singleton_pattern). here are some previous disc...
[ 0.3414776921272278, 0.014093629084527493, 0.28321316838264465, -0.04732362926006317, -0.17510640621185303, -0.09522796422243118, 0.19966016709804535, -0.31895625591278076, -0.7146605849266052, -0.7953256964683533, -0.019624337553977966, 0.5419237017631531, -0.3060111999511719, -0.056036204...
I want to retrieve a list of the files that has been added or deleted from our Subversion repository over, for example, the last month. I'd prefer to have the file names, and not just a count. Is this possible from the Subversion command line, or would I need to use a script to trawl the log? I don't think you can do...
[ 0.4362204670906067, -0.06429049372673035, 0.27547964453697205, -0.07034025341272354, -0.07566128671169281, -0.19988290965557098, 0.05754018947482109, 0.05400046706199646, -0.5055096745491028, -0.4336177408695221, -0.1277429461479187, 0.3900727927684784, -0.15566563606262207, 0.101684458553...
The last week on the ACM ICPC Mexico competition, I missed a "return 0" on a C++ program. For this reason we got punished with 20 minutes. I had read that the standard does not oblige us to write it at the end of a main function. It is implicit, isn't it? How can I prove it? We were using a Fedora system with a G++ ...
[ 0.07256680727005005, 0.10027701407670975, 0.0850389152765274, 0.06757939606904984, -0.3808550536632538, -0.20935580134391785, 0.5550218224525452, -0.16022837162017822, -0.07471257448196411, 0.0741356685757637, 0.4115394949913025, 0.736539363861084, -0.018228914588689804, 0.1315488666296005...
exit with the return value as the > argument. If control reaches the end > of main without encountering a return > statement, the effect is that of > executing `return 0;` If you haven't got the Standard at hand, you can show then the paragraph in a Working Draft. Here is one for c++98, which already had this defi...
[ -0.4536222815513611, -0.23687367141246796, 0.3236507773399353, -0.09521201997995377, 0.09579386562108994, -0.2723565995693207, 0.3347015380859375, -0.15832580626010895, 0.034941550344228745, -0.2732250988483429, -0.40509313344955444, 0.3271559178829193, -0.1853354126214981, 0.1512870937585...
I believe I already know the answer, but I am not 100% sure, so just a quick question: What does Red/Green Testing actually mean? I understand it as "Write your tests first, so that they all fail (= all red), then write your code and watch how each test turns green, and when all are green, you're fine". I heard this ...
[ 0.643807590007782, -0.13128747045993805, 0.213597372174263, -0.01181761734187603, 0.14796756207942963, -0.4622078835964203, 0.6459358930587769, -0.13544121384620667, -0.23051472008228302, -0.39078500866889954, -0.013241767883300781, 0.3047862648963928, 0.08496397733688354, -0.3609544932842...
he beleives in it) It does refer to TDD or Test Driven Development, but it would apply to each test. Write the test first, then write the code to pass the test. It would be wrong to write ALL the tests first. TDD is an incremental development approach. The basic idea is no code is written before there is failing test ...
[ 0.5013825297355652, -0.00695818243548274, -0.0824374258518219, 0.14132893085479736, -0.10155396163463593, -0.0884484127163887, 0.23627816140651703, -0.18118607997894287, 0.09530550241470337, -0.18207083642482758, -0.12229455262422562, 0.7510604858398438, -0.18066351115703583, -0.0437834858...
I wrote this function that's supposed to do StringPadRight("Hello", 10, "0") -> "Hello00000". ``` char *StringPadRight(char *string, int padded_len, char *pad) { int len = (int) strlen(string); if (len >= padded_len) { return string; } int i; for (i = 0; i < padded_len - len; i++) { ...
[ -0.2028171718120575, -0.2054927498102188, 0.6592591404914856, -0.14306829869747162, 0.04881679266691208, 0.061224084347486496, 0.46285369992256165, -0.23558498919010162, 0.010759220458567142, -0.4635396897792816, -0.1686796098947525, 0.735318660736084, -0.09762550890445709, 0.0645001605153...
How can I fix this? It might be helpful to know that printf does padding for you, using %-10s as the format string will pad the input right in a field 10 characters long ``` printf("|%-10s|", "Hello"); ``` will output ``` |Hello | ``` In this case the - symbol means "Left align", the 10 means "Ten characters ...
[ -0.009618769399821758, 0.0017107120947912335, 0.7120369672775269, 0.06937647610902786, -0.42282161116600037, -0.0034203920513391495, -0.2302962839603424, -0.2808670699596405, -0.2763743996620178, -0.5908666253089905, -0.029843278229236603, 0.591610848903656, -0.3177679181098938, -0.3889121...
history lesson of how widely printf has spread).
[ 0.29707732796669006, -0.12706038355827332, 0.37595701217651367, 0.07837238907814026, -0.04278295114636421, -0.149087592959404, 0.1840871125459671, -0.16222958266735077, 0.03441492095589638, -0.5729925632476807, -0.1725718080997467, 0.3918284773826599, -0.09296535700559616, 0.10418076813220...
I have a lot of assignments where I have to continually update a Makefile as I add more subsequently numbered C programs. Is there a way to do this with a loop which iterates over the values 1.1, 1.2, 1.3, etc.? ``` all: 1.1 1.2 1.3 1.4 1.5 1.6 1.7. 1.8 1.9 1.1: 1.1.o gcc -o 1.1 $(FLAGS) 1.1.o 1.1.o: 1.1.c gc...
[ 0.546756386756897, 0.30008164048194885, 0.31799209117889404, -0.17917050421237946, 0.06911701709032059, -0.07944983243942261, 0.13877125084400177, -0.47322505712509155, -0.43396756052970886, -0.2543237805366516, -0.06020829826593399, 0.47155922651290894, -0.6137645840644836, 0.040901038795...
1.3.c 1.4: 1.4.o gcc -o 1.4 $(FLAGS) 1.4.o 1.4.o: 1.4.c gcc -c $(FLAGS) 1.4.c 1.5: 1.5.o gcc -o 1.5 $(FLAGS) 1.5.o 1.5.o: 1.5.c gcc -c $(FLAGS) 1.5.c 1.6: 1.6.o gcc -o 1.6 $(FLAGS) 1.6.o 1.6.o: 1.6.c gcc -c $(FLAGS) 1.6.c 1.7: 1.7.o gcc -o 1.7 $(FLAGS) 1.7.o 1.7.o: 1.7.c gcc -c $(FLA...
[ 0.24159911274909973, 0.798446536064148, 0.7558032870292664, -0.05466007441282272, 0.0087861567735672, 0.22856315970420837, -0.2341463714838028, -0.3866215944290161, -0.5454484224319458, -0.14114011824131012, -0.29689884185791016, 0.19681453704833984, -0.4300455152988434, 0.2010973691940307...
-c $(FLAGS) 1.9.c clean: rm -f *.o rm -f 1.1 1.2 1.3 1.4 1.5 1.6 1.7. 1.8 1.9 ``` You want a [suffix rule](http://owen.sj.ca.us/rkowen/howto/slides/make/slides/makesuff.html), not a loop.
[ 0.5985000133514404, -0.03357353061437607, 0.6930529475212097, 0.05577806755900383, 0.1961713582277298, -0.24805457890033722, 0.11451862007379532, -0.3538283705711365, -0.44181305170059204, -0.04753267019987106, -0.13042262196540833, 0.1814851462841034, -0.34586769342422485, -0.150527849793...
In a progression of languages, I have been learning C and C++. Now I would like to learn C#. I know there are some drastic differences between them - such as the removal of pointers and garbage collection. However, I don't know many of the differences between the two. What are the major differences that a C++ programm...
[ -0.024214623495936394, 0.2654711902141571, 0.10946332663297653, -0.08857996016740799, -0.07334348559379578, 0.05532890558242798, 0.19719044864177704, 0.20120005309581757, -0.29999029636383057, -0.7224794030189514, 0.12525734305381775, 0.4374839961528778, -0.12721766531467438, -0.0379594452...
lists the most important comparisons between the two languages. Once you have explored some of these differences, you might choose a self-contained project you have written in the past in C++, and re-write it in C#. In your first pass, you will probably just end up translating directly across, using the same design an...
[ 0.26196256279945374, 0.11814488470554352, -0.02502777799963951, 0.12441638112068176, -0.1953108310699463, 0.03618047386407852, 0.17580312490463257, 0.3581170439720154, -0.18182982504367828, -0.694074809551239, -0.10308054834604263, 0.5764209032058716, 0.020325830206274986, -0.2069428414106...
I'm currently planning the migration of a Microsoft Content Management Server (MCMS) website to a SharePoint 2007 publishing site. The top-level site is a public facing, anonymously-accessible website. It will contain two areas which need to be protected with forms-based authentication - each of which will have a dist...
[ 0.018059873953461647, 0.0679001584649086, 0.6511422991752625, 0.28323042392730713, 0.08449572324752808, -0.40943804383277893, 0.12541703879833221, -0.22114679217338562, -0.6496553421020508, -0.4912707507610321, -0.22860433161258698, 0.3474760353565216, -0.2641920745372772, 0.19590866565704...
a single web application with three site collections. 1 for the public facing site, and the others for the two protected areas. However, I'm not sure if 1 site collection can be anonymous, with the other 2 implementing different FBA authentication providers. I'd like my Urls to be something like: www.whatever.com ...
[ 0.6161071062088013, 0.06732988357543945, 0.27490392327308655, 0.07924026995897293, -0.20277588069438934, -0.006388068664819002, 0.3026832044124603, -0.22934135794639587, -0.2484925091266632, -0.4496806263923645, -0.09077483415603638, 0.40697112679481506, -0.09932520240545273, 0.07433992624...
as not to duplicate content during authoring. Would appreciate any thoughts, thank you! Thanks, that extranet link will be helpful when looking at separating the authoring environment from the publishing environment. I was trying to implement two FBA membership providers on two site collections within the same web ...
[ 0.5784468054771423, -0.032010432332754135, 0.012910977005958557, 0.05107467994093895, -0.02545519918203354, -0.2093130201101303, 0.0991913229227066, 0.2795601487159729, -0.28279200196266174, -0.4701932668685913, 0.342990517616272, 0.5047687292098999, 0.014554331079125404, -0.02591259591281...
How can I detect if another host is using the same MAC address as the current host, e.g. because the other host is spoofing? I'm working in an embedded environment, so looking for answers on a protocol level, rather than “use such and such a tool”. **Edit**: RARP does *not* solve this problem. For RARP to get any rep...
[ 0.2306409329175949, 0.27603015303611755, 0.18370313942432404, 0.01245277188718319, -0.07322065532207489, -0.13374829292297363, 0.6678614020347595, 0.21308626234531403, -0.15007564425468445, -0.4655987620353699, -0.011482932604849339, 0.5320497751235962, -0.25830233097076416, 0.184880211949...
any different if there’s another host on the segment with the same MAC, unless that host has itself used a different IP address. This question is too interesting to put down! After several false starts I started thinking about the essential components of the problem and scoured the RFCs for advice. **I haven't found a ...
[ 0.3691743016242981, -0.0010649880860000849, 0.24065347015857697, 0.029294190928339958, -0.014507032930850983, 0.04511578753590584, 0.5027436017990112, -0.09569621831178665, -0.33603987097740173, -0.5631250739097595, 0.1344582736492157, 0.7000868320465088, -0.1410006433725357, -0.2850117981...
traffic and look for any packets that you didn't transmit but have your MAC address. This may or may not occur, so although it *can* tell you definitively if a duplicate exists, it *cannot* tell you definitively that it doesn't. * Any *active* method requires you to transmit a packet that *forces* an impostor to respon...
[ 0.068649522960186, -0.023208407685160637, 0.730540931224823, 0.1932777315378189, 0.056843362748622894, -0.3144321143627167, 0.5816479921340942, 0.2732529044151306, -0.6484419107437134, -0.7152012586593628, -0.19921468198299408, 0.49252355098724365, -0.774978756904602, 0.05926244333386421, ...
involve only the MAC address. * So the answer, it seems, would be to transmit either a broadcast (ethernet) packet or a packet with your MAC address as its destination, that requires a response. The monkeywrench is that an IP address is usually involved, and you don't know it. *What sort of protocol fits this descript...
[ 0.15912675857543945, -0.029625138267874718, 0.17505235970020294, 0.17661119997501373, 0.044418733566999435, -0.39001360535621643, 0.38171806931495667, 0.1245262399315834, -0.5381113290786743, -0.6299324035644531, -0.5760757327079773, 0.5186102390289307, -0.47449034452438354, -0.13986080884...
the wire and prevent yourself from responding (I'm thinking judicious use of iptables and NAT). **Not-so-easy Answers:** * A protocol that's independent of IP: either one that doesn't use the IP layer, or one that allows broadcasts. None comes to mind. * Send *any* packet that would normally generate a response from ...
[ 0.7486994862556458, -0.30514904856681824, 0.3783808648586273, 0.26597127318382263, -0.03888443857431412, -0.16626982390880585, 0.2951733469963074, -0.2786068618297577, -0.41029584407806396, -0.18551480770111084, -0.11003225296735764, 0.6546345353126526, -0.49955886602401733, -0.23806846141...
discussion was helpful. I suspect the final solution will involve a combination of techniques, as no single approach seems to guarantee a dependable determination. Some information is available at <http://en.wikipedia.org/wiki/ARP_spoofing#Defenses> If all else fails, you may enjoy this: <http://www.rfc-editor.org/r...
[ 0.3722321093082428, 0.059365689754486084, 0.3471528887748718, 0.06703153252601624, 0.08007252216339111, -0.35750484466552734, 0.5488138198852539, 0.0008706605876795948, -0.2531896233558655, -0.4734993875026703, -0.12778571248054504, 0.26277440786361694, 0.27837610244750977, -0.038984518498...
What are the benefits of having a member variable declared as read only? Is it just protecting against someone changing its value during the lifecycle of the class or does using this keyword result in any speed or efficiency improvements? The `readonly` keyword is used to declare a member variable a constant, but allow...
[ 0.18638616800308228, -0.22781963646411896, 0.03671346232295036, 0.09359069913625717, -0.08740774542093277, -0.3432554304599762, 0.17350733280181885, -0.025895699858665466, -0.1499488353729248, -0.15892289578914642, -0.23363471031188965, 0.5939494967460632, -0.44586366415023804, 0.212349995...
that the field is a member of. Also use it if you don't want to have to recompile external DLLs that reference the constant (since it gets replaced at compile time).
[ 0.4571686387062073, -0.17405563592910767, 0.03928907960653305, 0.047569409012794495, 0.090908944606781, -0.4998862147331238, -0.256973534822464, 0.17992129921913147, -0.17766809463500977, -0.22368624806404114, -0.2439718246459961, 0.5689300298690796, -0.32168158888816833, 0.123634137213230...
Is there any way to trap an error and exit gracefully from Perl? I am working on a script which might fail due to a SIG event from the OS or other applications running on my server. I wish to trap this event, display the error and exit after closing all files and other attributes I have open during the execution of the...
[ 0.12755315005779266, -0.16640089452266693, 0.11294710636138916, -0.06814531981945038, -0.18395909667015076, 0.10095889866352081, 0.4943937361240387, -0.01068932469934225, -0.02903669886291027, -0.6007286906242371, 0.061920300126075745, 0.08099138736724854, -0.32248497009277344, 0.090161748...
Rails is now making [multi-threaded](http://guides.rubyonrails.org/2_2_release_notes.html#_thread_safety) applications possible, but it doesn't sound like it applies in every situation (for instance, if you're using Mongrel, it doesn't sound like this affects you at all). When can you multi-thread your Rails applicati...
[ 0.08522257953882217, 0.0904170572757721, -0.012761573307216167, 0.17511959373950958, -0.06763353943824768, -0.2334091067314148, 0.5778225064277649, 0.0380403995513916, -0.6871810555458069, -0.32263466715812683, 0.12237262725830078, 0.4469830393791199, -0.222110316157341, 0.1637043356895446...
approach. JRuby is a different story. It uses Java's threads, which translate to native threads, and it uses Java's garbage collector, which is excellent.
[ -0.12183897197246552, -0.2826600670814514, 0.2607795298099518, 0.11890416592359543, -0.15601006150245667, -0.20558051764965057, 0.14122028648853302, -0.02850944735109806, -0.2988729178905487, -0.7268524169921875, 0.13367676734924316, 0.4505530893802643, -0.34474554657936096, -0.17494581639...
I have an ASP.NET MVC project and I have a single action that accepts GET, POST, and DELETE requests. Each type of request is filtered via attributes on my controllers `Action` methods. ``` [ActionName(Constants.AdministrationGraphDashboardAction), AcceptVerbs(HttpVerbs.Post)] public ActionResult GraphAdd([ModelBinder...
[ 0.00757251214236021, -0.17111866176128387, 0.5575081706047058, -0.022661376744508743, -0.43419864773750305, 0.14615945518016815, 0.36112964153289795, -0.48748505115509033, -0.49314892292022705, -0.6561762690544128, 0.02252592146396637, 0.27569833397865295, -0.42584729194641113, 0.074551440...
the MVC HtmlHelper method I should be using? i don't believe this is possible. the method attribute of form elements in HTML4 & XHTML 1.0 will only accept GET or POST. in addition, standard configs of most webservers will deny DELETE and PUT requests. assuming you have configured your webserver to allow methods like PU...
[ 0.268633097410202, 0.06941962242126465, 0.8029585480690002, -0.12031924724578857, -0.15685223042964935, -0.37220829725265503, 0.44023916125297546, -0.3601881265640259, -0.21318304538726807, -0.5038133263587952, -0.12137235701084137, 0.6744018197059631, -0.4387691020965576, 0.34155628085136...
I'm looking for some good resources to ramp up on the animation/storyboard concepts used in WPF/Silverlight. Any pointers? The one link posted was WPF specific. For Silverlight here are a few other resources. * [MSDN Animation Overview](http://msdn.microsoft.com/en-us/library/cc189019(VS.95).aspx) * [Silverlight SDK B...
[ 0.43459847569465637, 0.24259783327579498, -0.16549618542194366, 0.21230797469615936, -0.2716531455516815, 0.14498291909694672, -0.07161702960729599, -0.06046599894762039, -0.3182991147041321, -0.6957560777664185, 0.20051690936088562, 0.0805249810218811, 0.09602192044258118, 0.1567129045724...
I would like to intercept any URL which the user enters in their browser and perform some tasks before allowing the navigation to continue (any way could be good - i.e. via plug in, via proxy or any other creative suggestion). To clarify - I am not referring to a specific application that needs to catch this, but rathe...
[ 0.45742157101631165, 0.06228729709982872, 0.43693798780441284, 0.29995718598365784, 0.03984810411930084, -0.5902342796325684, 0.23452071845531464, 0.3932534158229828, -0.10143402963876724, -0.3628590703010559, -0.15545104444026947, 0.21484766900539398, -0.18762479722499847, 0.1396465748548...
the user enters via javascript. It smells like a big security exploit. You can detect when the user leaves the page, but you cannot detect where he is going next. * A proxy is a good choice if you just need the URL string to be processed. But anything more complex will be complicated to implement in a proxy. * A plugi...
[ 0.14509600400924683, 0.05453988537192345, 0.3758585751056671, 0.02644449844956398, -0.1291421502828598, -0.22918488085269928, 0.41905567049980164, 0.3049788177013397, 0.02747497893869877, -1.2401094436645508, -0.2960042655467987, 0.05309633910655975, -0.25093382596969604, 0.199786856770515...
about rolling your own browser (using IE's ActiveX control) or using one of the open source alternatives and use that? What exact processing is it that you wish to do?
[ 0.6700801849365234, -0.18700221180915833, 0.22696706652641296, 0.29344820976257324, 0.06777051091194153, -0.17973670363426208, -0.25967371463775635, 0.478751003742218, -0.08140069991350174, -0.6104444861412048, 0.1835499107837677, 0.530775249004364, -0.06530328094959259, -0.263823747634887...