text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
<RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="100" /> </Grid.ColumnDefinitions> <Label x:Name="titleLabel" Grid.Column="0"></Label> <Label x:Name="shortcutLabel" Grid.Column="1"></Label> ...
[ 0.04407835379242897, -0.0464235283434391, 0.1113211065530777, -0.01901690661907196, -0.015776554122567177, -0.10205194354057312, 0.13721945881843567, -0.4429619610309601, -0.4176195561885834, -0.7430724501609802, -0.005751062650233507, 0.19923515617847443, -0.28170886635780334, 0.191891416...
checked that?
[ 0.3921448290348053, 0.3651779890060425, 0.05643482878804207, 0.09335301071405411, 0.17667703330516815, -0.2177867442369461, 0.07064516842365265, 0.028775807470083237, -0.18436096608638763, 0.04967103525996208, 0.2072642296552658, 0.06860513240098953, -0.06216232851147652, -0.05809305980801...
How do I best gather messages that have not been read by a given user? Existing tables ``` Message table ---------------------------------- id title body sentAt User table ---------------------------------- id username Read Messages table ---------------------------------- user_id message_id ``` I'...
[ -0.06359995156526566, 0.07058300077915192, 0.4471653699874878, 0.04763105511665344, 0.0329095721244812, -0.12557227909564972, 0.25506895780563354, -0.6191511750221252, -0.24929630756378174, -0.6509813666343689, 0.11370160430669785, 0.5002859234809875, 0.016608241945505142, -0.3156906962394...
with the exact same problem at work earlier. I wasted a good week in trying to figure the best way to do this. I ended up with creating a join table, as you have done, but the table contains only *unread* messages, instead of keeping track of *read* messages. Because ======= 1. The status quo is "everyone has read a...
[ 0.40134549140930176, -0.021717600524425507, 0.36941611766815186, 0.15424981713294983, 0.12106544524431229, -0.1622321754693985, 0.37013134360313416, 0.0922902300953865, -0.7285593152046204, -0.6356051564216614, -0.10576138645410538, 0.4010757505893707, -0.4604988396167755, 0.11109903454780...
the database grows pretty rapidly (*users*\**messages* rows), easily leading to thousands of rows of 'dead weight' in even smaller applications. This problem is exaggerated if the lifetime of messages are indefinite - you could be keeping track of message statuses that are many years old. If keeping track of the inver...
[ 0.061445336788892746, 0.11291835457086563, 0.4160158634185791, 0.14894439280033112, -0.02740608900785446, -0.13369885087013245, 0.26192712783813477, 0.19769123196601868, -0.5437835454940796, -0.5911985635757446, 0.20409253239631653, 0.1870000660419464, -0.09720394760370255, 0.4011628031730...
fast as computationally possible, writing is a chore. For each written message, you need to insert an entry to this join table. Additionally, if multiple people can read the same message, you need to insert one row for each recipient. If the recipients are implicit (e.g. only a user group's name is given, or even with ...
[ 0.11917337775230408, 0.2054407298564911, 0.11500487476587296, 0.05163371190428734, -0.007100911345332861, -0.2583203613758087, 0.09352940320968628, 0.08927711844444275, -0.1712806224822998, -0.6949160695075989, -0.1841009557247162, 0.26283735036849976, -0.05102033540606499, -0.069757245481...
I'm working on a small console application in Visual Studio C++ 2008 and would like to make an installer that I can distribute to a few friends to test the application. I recall a publish option being under the build menu, but it is not there now. Could I somehow have turned this feature off? Is there a simple way to ...
[ 0.3844815492630005, 0.1021261140704155, 0.008330026641488075, 0.23189662396907806, -0.030739150941371918, -0.2908274829387665, 0.30481234192848206, 0.09588298201560974, -0.026766659691929817, -0.6689779758453369, 0.12610618770122528, 0.9257945418357849, -0.10762681066989899, 0.096048004925...
This is driving me nuts. Everything in single quotes is supposed to be assigned as is, yet if I do the following: TEST=' .\* ' echo $TEST I get a bunch of garbage on the screen listing all "dot" files in the current directory... Any help would be appreciated. ``` echo "$TEST" ``` If you don't quote the variable, ...
[ 0.9223015308380127, 0.3122589588165283, 0.011210432276129723, -0.3133374750614166, -0.01504526473581791, -0.08019563555717468, 0.46480223536491394, -0.22945649921894073, 0.08742331713438034, -0.2659415602684021, 0.2486216425895691, 0.4153423011302948, -0.43414193391799927, 0.17817762494087...
I like ORM tools, but I have often thought that for large updates (thousands of rows), it seems inefficient to load, update and save when something like ``` UPDATE [table] set [column] = [value] WHERE [predicate] ``` would give much better performance. However, assuming one wanted to go down this route for performa...
[ 0.209232896566391, 0.3349688947200775, 0.25395920872688293, 0.17393158376216888, -0.017807960510253906, -0.3739682734012604, 0.03181719779968262, -0.22807684540748596, -0.1924603134393692, -0.43506741523742676, -0.04446147009730339, 0.8282526731491089, -0.028431018814444542, -0.09846302866...
on the DB to call .NET code that drops the cache" etc etc, but I'm interested to hear common solutions to this sort of problem. You're right, in this instance using an ORM to load, change and then persist records is not efficient. My process goes something like this 1) Early implementation use ORM, in my case NHiberna...
[ 0.2699253261089325, 0.19390526413917542, 0.21538282930850983, 0.11128154397010803, -0.3584853410720825, -0.43465471267700195, 0.41084927320480347, -0.059302765876054764, -0.2383134663105011, -0.6180697679519653, -0.06906668841838837, 0.7120386958122253, -0.29073551297187805, 0.147487610578...
have accepted that some clients will be stale, which is the case with standard ORM usage anyway, and then check a timestamp on update/insert.
[ 0.557161808013916, 0.20664295554161072, 0.49372830986976624, -0.12661699950695038, 0.4439287781715393, -0.4541604518890381, 0.12196861207485199, 0.20177918672561646, -0.1895604133605957, -0.5079857110977173, -0.29175472259521484, 0.4253281354904175, -0.05867059901356697, 0.0193167664110660...
I have a cookie that I did using javascript and to check if it had to be replaced I used "onload=checkCookie()" in the body tag of the HTML, however now I'm trying to place the js in another file and just link it using the tag, but if I do that I can no longer call this function using just "onload" so I was wondering h...
[ 0.31677669286727905, 0.13300295174121857, 0.40172332525253296, -0.04266168922185898, 0.0023742960765957832, -0.20495183765888214, 0.06761366128921509, -0.16462145745754242, -0.1886138617992401, -0.8436124920845032, -0.03531801328063011, 0.4281836748123169, -0.5646439790725708, 0.0086287530...
c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1){ c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } ...
[ -0.1669110804796219, -0.09606195986270905, 0.5926650166511536, -0.27626046538352966, 0.4723884165287018, 0.10951416194438934, -0.00518923532217741, -0.2654650807380676, -0.18718279898166656, -0.44223812222480774, -0.6402798295021057, 0.35183125734329224, -0.2681941092014313, 0.532234609127...
exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } function checkCookie(){ username=getCookie('username'); if(username!=null && username!=""){ alert('Welcome again '+username+'!'); }else{ ...
[ -0.11724133789539337, -0.2331734448671341, 0.8449733257293701, -0.4642730951309204, 0.12227924168109894, -0.029254956170916557, 0.6358384490013123, -0.24660924077033997, -0.12706513702869415, -0.6388638019561768, -0.6465529799461365, 0.3491227626800537, -0.46784576773643494, 0.038975790143...
good thing. Add the onload function to the script- **window**.onload=checkCookie; //(no parenthesis) and take it out of the html.
[ 0.020958110690116882, 0.12934820353984833, 0.40144312381744385, -0.12309204041957855, 0.02670925110578537, -0.27539896965026855, 0.39120742678642273, 0.3614468276500702, 0.02481689490377903, -0.7562426924705505, -0.19165734946727753, 0.37555068731307983, -0.31660398840904236, -0.0198776572...
I would like to know what the XML is for the simplest feature and that will register a Server Control in the GAC, and add it the safe controls section of the web.config for the SharePoint site. My assembly: MyServerControl.dll (MyServerControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3249363c0f6f8c59) I can...
[ 0.46659013628959656, 0.05584972724318504, 0.49257731437683105, -0.09349971264600754, -0.0536685474216938, -0.027195576578378677, 0.3001689016819, -0.20291365683078766, -0.03270113095641136, -0.7817986607551575, 0.00022776389960199594, 0.28793561458587646, -0.3387589752674103, 0.12413830310...
add a safe controls entry to the web.config. [MSDN on Solutions and Web Part Packages](http://msdn.microsoft.com/en-us/library/ms413687.aspx) As building a MOSS solution by hand can be a lot of pain, there are some cool tools out there which can support you on that. [VSeWSS 1.3](http://www.microsoft.com/downloads/d...
[ -0.021683957427740097, -0.3529468774795532, 0.7674483060836792, 0.3468019962310791, 0.22159947454929352, -0.41702839732170105, 0.3039228618144989, -0.5275424122810364, -0.16020362079143524, -0.582257091999054, -0.08926030248403549, 0.3624095916748047, -0.4036427140235901, 0.005600675474852...
In SQL Server, you can declare a table variable (`DECLARE @table TABLE`), which is produced while the script is run and then removed from memory. Does Oracle have a similar function? Or am I stuck with `CREATE`/`DROP` statements that segment my hard drive? Yes. > Declare TABLE TYPE variables in a > PL/SQL declare bl...
[ -0.0668504387140274, 0.09595946967601776, 0.487348735332489, -0.07963363081216812, -0.3282197117805481, -0.1304674744606018, -0.028236452490091324, -0.053010694682598114, -0.07068175822496414, -0.4038619101047516, -0.11264882981777191, 0.11469688266515732, -0.29971686005592346, 0.296534985...
| > variable%TYPE | > table.column%TYPE > [NOT NULL] > INDEX BY BINARY INTEGER; > > > -- Then to declare a TABLE variable of this type: > variable\_name type\_name; > > > -- Assigning values to a TABLE variable: > variable\_name(n).field\_name := > 'some text'; -- Where 'n' is the > index value Ref: <http...
[ -0.2892891466617584, -0.04247892275452614, 0.2668975293636322, -0.019196581095457077, -0.022683799266815186, 0.04177147522568703, -0.13577596843242645, -0.11554128676652908, -0.3135642111301422, -0.16614669561386108, -0.19837327301502228, 0.40792977809906006, -0.3160160779953003, -0.017511...
Can someone help me? I am trying to do something like the following: ``` #include <boost/iostreams/tee.hpp> #include <boost/iostreams/stream.hpp> #include <sstream> #include <cassert> namespace io = boost::iostreams; typedef io::stream<io::tee_device<std::stringstream, std::stringstream> > Tee; std::stringstream...
[ 0.11500253528356552, 0.09847099334001541, 0.3482363224029541, 0.04836302995681763, 0.1886197179555893, 0.10778318345546722, 0.6407616138458252, -0.4283226728439331, -0.06909484416246414, -0.6235768795013428, 0.057930052280426025, 0.6403834223747253, -0.1811385601758957, -0.2554867267608642...
tee-stream itself and forward all arguments to that. C++03 has only limited capabilities when it comes to forwarding arguments to functions (amount of overloads needed easily grow exponentially). It (`io::stream`) makes the following restrictions: > Each of these members constructs an instance of stream and associates...
[ 0.10352156311273575, -0.02386549860239029, 0.35772478580474854, -0.346093088388443, -0.0696929544210434, 0.05421930178999901, -0.3305164873600006, -0.3844522535800934, 0.14177808165550232, -0.5529851317405701, 0.05884990841150284, 0.7726221084594727, -0.4420798420906067, -0.121442161500453...
template argument is a stream or stream buffer type, and a const reference otherwise. That won't work, of course. `io::stream` provides another constructor that takes a `T` as first argument. This works here (Compiles, at least. The assertion fails, though. I've not worked with `boost::iostreams` so i can't help with ...
[ 0.41425594687461853, -0.0810769721865654, 0.5770421624183655, -0.3869786560535431, 0.1418931484222412, -0.08978874236345291, 0.3344828486442566, -0.5435089468955994, 0.17226631939411163, -0.6337459087371826, -0.20044296979904175, 0.6460657119750977, -0.32287874817848206, -0.090063273906707...
I am looping through a directory and copying all files. Right now I am doing `string.EndsWith` checks for `".jpg"` or `".png"`, etc . . Is there any more elegant way of determining if a file is an image (any image type) without the hacky check like above? Check the file for a [known header](https://web.archive.org/web...
[ 0.30052849650382996, 0.19747020304203033, 0.47000840306282043, 0.03656430169939995, -0.0031754353549331427, 0.3264590799808502, 0.1735626608133316, -0.04982157424092293, -0.49260255694389343, 0.008748764172196388, 0.050762563943862915, 0.32326599955558777, -0.09336775541305542, -0.07968395...
Is there an object that will event at a given DateTime or DateTimeOffset? I am using a Timer to do this operation now but it requires a bit of calculation on my part, was just thinking there might already be something in place. I don't see how you have to do any calculation: ``` public void StartTimer(DateTime target)...
[ 0.026866190135478973, -0.39886006712913513, 0.37166473269462585, -0.13876058161258698, 0.25272229313850403, 0.059735007584095, 0.3176732659339905, 0.04911956936120987, -0.31937089562416077, -0.5379849076271057, -0.20512335002422333, 0.7421993017196655, -0.32036224007606506, 0.2552439868450...
I'm trying to start the session in a header page in my webiste. But it seems there might be some sort of bug because it fails with the following error: ``` Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_a7430aab4dd08d5fc0d511f781f41fe5, O_RDWR) failed: No such file or directory (2) in D:\Devel...
[ 0.05261022225022316, 0.2959655821323395, 0.36991992592811584, -0.20021015405654907, -0.13031727075576782, -0.20372508466243744, 0.627953290939331, -0.035634566098451614, -0.340785950422287, -0.6172863841056824, -0.10654331743717194, 0.7548399567604065, -0.20342455804347992, 0.0130110681056...
5.2.8 This means that you don't have the correct permissions to either read or write the files in the temp directory. If you on linux then do this ``` sudo chmod -R 755 \xampp\tmp //or should it be 775 ``` On windows do this as an administrator ``` attrib -r -a C:\xampp\tmp /S ```
[ 0.11240202188491821, 0.13549509644508362, 0.5462740659713745, 0.03687272593379021, 0.2274358868598938, -0.3892747759819031, 0.25165390968322754, 0.0021450172644108534, -0.2698339819908142, -0.5568834543228149, -0.513936460018158, 0.748822808265686, -0.27348291873931885, 0.1441175788640976,...
What is meant by IDL? I have googled it, and found out it stands for Interface Definition Language, which is used for interface definition for components. But, in practice, what is the purpose of IDL? Does Microsoft use it? An interface definition language (IDL) is used to set up communications between clients and serv...
[ 0.5113633275032043, -0.04120384901762009, 0.4269792139530182, 0.19841346144676208, -0.2249995619058609, -0.46428248286247253, -0.5161413550376892, -0.049032241106033325, -0.06280530989170074, -0.5875760912895203, -0.0027407531160861254, 0.4941929876804352, -0.2700623571872711, 0.2137129455...
call functions across the network. RPC needs to create stub functions for the client and a server, using the IDL information. It's very similar to a function prototype in C but the end result is slightly different, such as in the following graphic: ``` +----------------+ | Client | | +----------+ | ...
[ -0.1945788860321045, 0.13550056517124176, 0.4097161591053009, 0.043233394622802734, -0.2815984785556793, -0.10897485166788101, -0.015491769649088383, -0.2550927400588989, 0.013676105067133904, -0.21441131830215454, -0.1580737829208374, 0.4645926356315613, -0.4253230690956116, 0.20256519317...
| +----------+ | | | stub_cli |----(comms)--->| stub_svr | | | +----------+ | | |----------| | +----------------+ | | function | | | +----------+ |
[ -0.7248411774635315, 0.2675072252750397, 0.8964451551437378, -0.19990453124046326, -0.21953532099723816, 0.1431715488433838, 0.05126611515879631, -0.3517198860645294, -0.16620852053165436, -0.48919621109962463, -0.4595317542552948, 0.26799276471138, -0.17838262021541595, 0.2283697128295898...
+---------------+ ``` In this example, instead of calling `function` in the same program, `main` calls a client stub function (with the same prototype as `function`) which is responsible for packaging up the information and getting it across the wire to another process, via the comms channel. This can be the same ma...
[ 0.2115202695131302, 0.1096879243850708, 0.394596666097641, -0.23308096826076508, -0.18082119524478912, 0.03360627219080925, -0.16874468326568604, -0.3791733980178833, -0.2012358158826828, -0.2741066515445709, -0.22738367319107056, 0.35227614641189575, -0.3338208496570587, 0.389554649591445...
it and passes it to the real function. The real function then does what it needs to and returns to the server stub which can package up the return information (both return code and any `[out]` or `[in,out]` variables) and pass it back to the client stub. The client stub then unpacks that and passes it back to `main`....
[ -0.07740721851587296, -0.20208962261676788, 0.7659851312637329, -0.032702673226594925, 0.12081431597471237, -0.13369441032409668, 0.04773356020450592, 0.02432967908680439, 0.10659375786781311, -0.5541961193084717, -0.4001694619655609, 0.4056982100009918, -0.16579324007034302, 0.41442954540...
[in] int handle, [out] int *status ); } ``` All that information at the top (for example, `uuid` or `endpoint`) is basically networking information used for connecting client and server. The "meat" of it is inside the interface section where the prototype is shown. This allows the IDL compiler to build th...
[ 0.49953046441078186, 0.17181061208248138, 0.13550730049610138, -0.01755288988351822, -0.08428933471441269, -0.24178044497966766, -0.1945495307445526, -0.0684242993593216, -0.05576146021485329, -0.5951904058456421, 0.16627256572246552, 0.6275212168693542, -0.14591272175312042, 0.24084095656...
also used third party products with MS operating systems, both DCE and ONC RPC.
[ 0.2749423682689667, -0.025449568405747414, 0.15048807859420776, 0.3090616464614868, 0.13991637527942657, 0.08805559575557709, -0.1015223041176796, 0.09182397276163101, -0.3035944700241089, -0.16477057337760925, -0.26501041650772095, 0.3797956109046936, -0.10702285170555115, 0.2022681683301...
I'm building a line-of-business application in Silverlight and need to get the user to edit two .NET TimeSpan values. One is a time of day (relative to midnight) and the other is a duration. Currently I'm using two TextBoxes, formatted as hh:mm. This is pretty straightforward, but it could definitely be improved. I've ...
[ 0.5813165307044983, -0.13185441493988037, 0.4960559010505676, -0.04200565814971924, -0.2258652150630951, -0.044148147106170654, -0.030573412775993347, 0.04885241389274597, -0.28043287992477417, -0.7111305594444275, 0.13587556779384613, 0.27364590764045715, -0.19302856922149658, 0.288562983...
allow any time of the day to be selected with accuracy down to the minute, but emphasize times within the normal working day (eg: 8:00am - 5:00pm). Some users tend to enter 2:00 (am) when they really mean 2:00pm. In my app, I'm tending towards aligning the times and durations to 5 minute intervals. As a bit of backgro...
[ 0.3615935444831848, -0.15557673573493958, 0.6718671321868896, 0.0031124111264944077, 0.19140830636024475, 0.07826036959886551, 0.3255540430545807, -0.08775020390748978, -0.2972954511642456, -0.6830816268920898, -0.05110034719109535, 0.3243624269962311, 0.03713783994317055, 0.07619975507259...
8PM ``` Of course I didn't need as high precision as you do, but I believe that with slightly longer slider 5min intervals would be possible. To emphasize normal workday, you could colour background of the slider in different colour for normal workday. Or make handlers "snap" to start and end of normal workday.
[ 0.47144970297813416, -0.2169593870639801, 0.45423153042793274, -0.3351130783557892, -0.14674894511699677, -0.19658389687538147, 0.06153218075633049, -0.15613405406475067, -0.32791197299957275, -0.28735601902008057, -0.055176131427288055, 0.6623045802116394, -0.22557328641414642, -0.2846654...
Ignoring the special libraries that allow you to work with very big numbers, what's the largest int value you can store in PHP? From the [PHP manual](http://php.net/manual/en/language.types.integer.php): > The size of an integer is > platform-dependent, although a maximum > value of about two billion is the > usual va...
[ -0.2220340520143509, -0.0076842596754431725, 0.4209272563457489, 0.12116845697164536, -0.29210275411605835, 0.10025005787611008, 0.2827518582344055, -0.1356414407491684, -0.6285880208015442, -0.3600183129310608, 0.3014751374721527, 0.2528221309185028, -0.10523934662342072, -0.0670126304030...
32 bit.
[ -0.23678256571292877, 0.048167046159505844, 0.2876158654689789, -0.057876911014318466, -0.05044356733560562, 0.02913450263440609, 0.024200310930609703, -0.3847515285015106, -0.023385247215628624, -0.27784621715545654, -0.24755337834358215, 0.24845564365386963, -0.07859959453344345, 0.05858...
I was looking through some pages when I stumbled across [this open source JavaScript date library: Datejs](http://code.google.com/p/datejs/). Now I've been trying to use it but everytime I try any function like: ``` $(function() { Date.today().toLongDateString() } ); ``` or even only ``` Date.today().toLongDateStri...
[ 0.25283461809158325, 0.025521110743284225, 0.5486074090003967, -0.20710405707359314, 0.1341094821691513, -0.29368188977241516, 0.18348947167396545, 0.07124821096658707, -0.27968287467956543, -0.40308064222335815, -0.05918935686349869, 0.30380862951278687, -0.39085590839385986, 0.1999111026...
beginning of the script and see if you get that popup when the page loads.
[ 0.31397387385368347, 0.015588482841849327, 0.29786354303359985, 0.22870519757270813, -0.18320488929748535, -0.2702944278717041, -0.18342790007591248, 0.3890640139579773, -0.06114578619599342, -0.7505634427070618, -0.1472567915916443, 0.25199106335639954, 0.14065811038017273, 0.048327866941...
I would like to reuse \*.aspx files in multiple ASP.Net MVC projects. Is this possible? EDIT: Anthony's suggestion of using version control system to share common files across multiple projects solves my question in a practical way. Luckily, since I'm using Subversion, the solution fits me. However, if I wasn't using ...
[ 0.24318043887615204, -0.201522096991539, 0.33350998163223267, 0.19247691333293915, -0.32149338722229004, -0.1978432834148407, 0.37162983417510986, -0.42156410217285156, -0.29095789790153503, -0.551854133605957, 0.07032003998756409, 0.40081772208213806, -0.5177046656608582, 0.04723727330565...
construct controller actions like this: ``` public ActionResult Shared() { return View<SharedPageOrUserControl>(); } ``` Does that look possible? I normally solve this sort of issue via source code control. Most systems (even VSS) allow you to share a file across multiple projects.
[ 0.37310877442359924, -0.43707770109176636, -0.0095905102789402, 0.21887992322444916, -0.00033536311821080744, -0.34040501713752747, -0.11790017783641815, -0.015791837126016617, -0.2556284964084625, -0.5833882689476013, 0.06174081936478615, 0.6294520497322083, -0.30325013399124146, 0.380029...
I think this question has not to do with programming in general, but nevertheless the answers might be interesting to other web developers. I just wondered how to estimate the minimum requirements to have a fast website. Obviously there are some facts that have to be considered like the expected number of visitors, th...
[ 0.41964367032051086, 0.09504351764917374, 0.17687419056892395, 0.4582193195819855, -0.0644567608833313, -0.2797660827636719, 0.21002358198165894, 0.33744192123413086, -0.3959169387817383, -0.5988630056381226, 0.12665212154388428, 0.4497217535972595, -0.058049317449331284, 0.190325587987899...
such information? This is arguably more art than science. What you have to remember is that like many things in programming and IT, your website will be as slow as the slowest link in the chain, meaning you will have some bottleneck such as bandwidth, the Web servers, disk I/O, memory, your databases, your firewall, e...
[ 0.5335878729820251, 0.11617787927389145, 0.26741328835487366, 0.5362474918365479, 0.2514883577823639, -0.12446602433919907, 0.2199764996767044, 0.3445532023906708, -0.3056558072566986, -0.7457200884819031, 0.20631307363510132, 0.4189596474170685, 0.10205105692148209, 0.2323712408542633, ...
times adding more memory might be useless because memory isn't your problem. Likewise, lack of a certain resource can be masked, like lack of memory can be masked by intensive disk I/O as your system swaps (page faults) constantly but disk I/O isn't the problem. So what do you do? The first thing is you need to iden...
[ 0.5017104148864746, -0.05924583226442337, 0.05631523206830025, 0.44592809677124023, 0.1952528953552246, 0.10647726058959961, 0.31415072083473206, -0.39432621002197266, -0.4833899736404419, -0.8278403878211975, 0.4025641977787018, 0.6440020799636841, -0.02097436599433422, -0.218778088688850...
of how your Website scales, how much bandwidth is going to be required and so on. By modelling 100, 500, 1000, 2000 users you will hopefully be able to see how linearly you Web site scales. You may find that supporting 1000 users requires 1 gig of RAM but 2000 requires 4 gigs: that's an example of non-linear scalabili...
[ 0.5513094663619995, 0.2580658793449402, 0.4966288208961487, 0.0496792197227478, -0.0125351557508111, 0.1316259503364563, 0.2695024609565735, -0.17313119769096375, -0.48936012387275696, -0.6282625794410706, 0.06174296885728836, 0.6019879579544067, 0.13379815220832825, 0.013001344166696072, ...
popular of sites ($10k can buy you 1 or even 2 servers with 16G of RAM and 4-8 cores each). Shared and VPS hosting are a different story because you'll typically only want to pay for however much memory, bandwidth and disk space you need. Luckily those kinds of solutions tend to alow you to upgrade pretty easily (at le...
[ 0.3421728014945984, -0.09933081269264221, 0.3750424087047577, 0.4365408420562744, 0.13620910048484802, -0.28835323452949524, 0.2238069623708725, 0.014521108940243721, -0.6327136158943176, -0.6185163259506226, -0.11820057779550552, 0.32279548048973083, 0.14526787400245667, 0.302077054977417...
out hwo much CPU time they require, hit a mocked up page 100 times and work out how much bandwidth it generates and so on. These rough estimates combined with guesses about how users will use the site will give you a ballpark (hopefully within a factor of 2-3) of what you'll need.
[ 0.19886712729930878, 0.23155705630779266, 0.5000753402709961, 0.2699934244155884, 0.09026592969894409, -0.18744957447052002, 0.2506403625011444, -0.11991418898105621, -0.09712669998407364, -0.8200697302818298, 0.17406952381134033, 0.2073098123073578, 0.14147637784481049, 0.050014678388834,...
The company I work for is developing an ASP.NET application that is used by both PC and Mac users. We're considering making our next version in Silverlight. If you've developed a business application in Silverlight, are there differences in appearance/performance etc between Silverlight on the PC and Silverlight on the...
[ 0.8552116751670837, 0.34684044122695923, 0.027307121083140373, 0.01088175643235445, -0.004247655626386404, -0.1094251200556755, 0.009591350331902504, 0.058404382318258286, -0.22724862396717072, -0.7001558542251587, 0.35041192173957825, 0.4478742182254791, -0.07791899144649506, 0.0450898297...
that whenever it was activated on one page, as soon as I closed that page the entire browser would crash, I have since removed Silverlight from my computer so that I can surf the web without having random crashes. This happens even on a clean install of Mac OS X, and using Safari 4 Beta or the previous release version...
[ 0.317928671836853, 0.3364287316799164, 0.23449108004570007, -0.3052181303501129, -0.03305239602923393, -0.4192919433116913, 0.6584578156471252, 0.21847262978553772, -0.4299487769603729, -0.3585969805717468, 0.06577333807945251, 0.5378128290176392, -0.4835778772830963, 0.15137545764446259, ...
yet another plugin when they already have Flash installed.
[ 0.09100155532360077, 0.06356342881917953, 0.05304776877164841, 0.4542183578014374, -0.017596742138266563, -0.26966166496276855, 0.036523427814245224, 0.2279512584209442, -0.25168031454086304, -0.37927451729774475, -0.0929480642080307, 0.46192121505737305, -0.024789193645119667, 0.001370682...
This one's been bugging me for a while now. Is it possible to redirect `stdout` and `stderr` to both the terminal output *and* to a program? I understand it's possible to redirect the outputs to a file and to `stdout` with [`tee`](http://linux.die.net/man/1/tee), but I want it to go to a program (my editor [TextMate])...
[ 0.3492233157157898, 0.2724589705467224, 0.22918294370174408, -0.2915229797363281, -0.2943441867828369, -0.007401742041110992, 0.21527820825576782, -0.24211230874061584, -0.2663576602935791, -0.8168969750404358, 0.0015715844929218292, 0.5840322375297546, -0.2473144382238388, -0.046424567699...
In socket programming, you create a listening socket and then for each client that connects, you get a normal stream socket that you can use to handle the client's request. The OS manages the queue of incoming connections behind the scenes. Two processes cannot bind to the same port at the same time - by default, anyw...
[ 0.34625497460365295, -0.2581777274608612, 0.06514905393123627, 0.16740241646766663, -0.17154128849506378, 0.1443939059972763, -0.13967956602573395, 0.2656041383743286, -0.2564147114753723, -0.7976000308990479, -0.11790537089109421, 0.5583415627479553, -0.392599493265152, 0.3091577887535095...
block when accepting a new connection. When a client connected, one of the idle process instances would accept that client. This would allow each process to have a very simple, single-threaded implementation, sharing nothing unless through explicit shared memory, and the user would be able to adjust the processing ban...
[ 0.1581835150718689, -0.20904292166233063, -0.028479991480708122, 0.31714534759521484, -0.022035039961338043, -0.06575984507799149, 0.2031628042459488, 0.06497353315353394, -0.5161892771720886, -0.6105931997299194, -0.13133877515792847, -0.10977392643690109, -0.5144602656364441, 0.401597976...
to one thread at a time, or are absolutely immutable, and most popular languages and runtimes lack built-in support for managing this complexity. By starting a handful of identical worker processes, you would get a concurrent system in which the *default* is no sharing, making it much easier to build a correct and sca...
[ 0.4539065659046173, -0.027264844626188278, 0.07879573106765747, 0.24869607388973236, 0.22005164623260498, 0.04458799585700035, 0.1826857626438141, 0.41089704632759094, -0.5405523180961609, -0.6024001836776733, -0.10141778737306595, 0.14700005948543549, -0.38354554772377014, 0.6974714398384...
and (for example with a TCP listening socket) can be used to `accept()` new sockets for clients. This is how many servers, including Apache in most cases, work. On Windows the same thing is basically true, except there is no `fork()` system call so the parent process will need to use `CreateProcess` or something to cr...
[ 0.23777925968170166, 0.17312054336071014, 0.053468458354473114, 0.19267883896827698, 0.1446009874343872, -0.31951624155044556, 0.14368976652622223, 0.12507349252700806, -0.27828922867774963, -0.7691282629966736, -0.10969281196594238, 0.4139755368232727, -0.25251504778862, 0.694852113723754...
handle (still in the parent process however), which will have the inheritable flag set on it. Then you can give that handle in the `STARTUPINFO` structure to the child process in CreateProcess as a `STDIN`, `OUT` or `ERR` handle (assuming you didn't want to use it for anything else). EDIT: Reading the MDSN library , ...
[ 0.07054697722196579, -0.11536877602338791, 0.16481024026870728, -0.01247314177453518, 0.08044097572565079, -0.22078615427017212, 0.05471460521221161, -0.08615949749946594, -0.1620740443468094, -0.6719561815261841, -0.1317967027425766, 0.20950622856616974, -0.11068566888570786, 0.3682611882...
filesystem) CLARIFICATION: In answer to the OP's original question, no, multiple processes cannot `bind()`; just the original parent process would call `bind()`, `listen()` etc, the child processes would just process requests by `accept()`, `send()`, `recv()` etc.
[ -0.010875253938138485, -0.08216461539268494, 0.5177335739135742, 0.0764237716794014, 0.3320896327495575, -0.08891646564006805, -0.04126225411891937, -0.3546360433101654, -0.45177799463272095, -0.32214388251304626, -0.44965142011642456, 0.50554358959198, -0.34417790174484253, 0.406507879495...
We all know that generic List<> does not box value types. Why on the following code snippet the rects[1] is not affected by Inflate method? If there is no boxing and I want to afect the rect[1] I need to write three lines of code as it is shown - commented. Can someone please explain this? ``` List<Rectangle> rects ...
[ 0.10976622998714447, -0.11156947910785675, 0.6490868926048279, -0.2068922370672226, -0.28820276260375977, 0.09131093323230743, 0.3119809031486511, -0.6691606044769287, -0.21787837147712708, -0.6004364490509033, -0.23314635455608368, 0.4216671288013458, -0.4208638370037079, 0.02376412600278...
boxing - simply that when you get the rectangle out, you are manipulating a standalone **copy** of the rectangle. This is one of the side effect of having mutable value-types (structs). And the reason you shouldn't write your own mutable structs - it is too easy to lose data. Since you can't make the pre-built rectan...
[ 0.21739177405834198, 0.15312547981739044, -0.1332167387008667, 0.0673077404499054, -0.1278800666332245, -0.3656718134880066, 0.05522331967949867, 0.012031622231006622, 0.005784125998616219, -0.12953481078147888, 0.002979500452056527, 0.20291991531848907, -0.2295931577682495, -0.11566247791...
Still working my way around this, but is there any function/command I can use to set some simple variables? Logging into mysql is quicker when I'm already ssh'd in, but typing in the full connection string is a bit annoying. Any way to do something like: ``` mysql ${variable} dbname ``` Where `variable` would be so...
[ 0.34626835584640503, 0.04135525971651077, 0.3193482756614685, 0.15318378806114197, -0.07140027731657028, -0.2786461412906647, 0.39052364230155945, 0.058613765984773636, -0.24461014568805695, -0.7839241027832031, 0.16450831294059753, 0.6810348629951477, -0.17245404422283173, 0.2501514852046...
conMy dbname ``` or when already logged on, just: ``` conMy dbname ``` --- From the bash manpage: > **alias** [-p] [name[=value] ...] > Alias with no arguments or with the -p option prints the list of > aliases in the form alias name=value > on standard output. When arguments are > supplied, an alias is defi...
[ -0.02227473258972168, 0.16001467406749725, 0.38605695962905884, -0.299344539642334, -0.3367762267589569, -0.21596240997314453, 0.2442542314529419, -0.057569507509469986, 0.22723723948001862, -0.6020986437797546, -0.2310536652803421, 0.7932693362236023, -0.2829400897026062, -0.0229291860014...
of the alias is printed. Alias returns > true unless a name is given for which > no alias has been defined.
[ -0.05030108615756035, 0.0051488615572452545, 0.5187069773674011, 0.18921346962451935, 0.1459212601184845, -0.31092390418052673, 0.13573743402957916, -0.08381079137325287, 0.09636163711547852, -0.47511398792266846, -0.2650788426399231, 0.4267609119415283, -0.19238151609897614, -0.0835243910...
I've been running some metrics on my Java project and apparently there are a lot of dependency cycles between packages. I didn't really know how to organize stuff into packages, so I just did what made sense to me, which is apparently wrong. My project is a neural network framework. Neural networks have Neurons, which...
[ 0.4579737186431885, -0.044068221002817154, -0.20405687391757965, 0.18343651294708252, 0.014098899438977242, 0.0909993052482605, -0.04308812692761421, -0.12013327330350876, -0.2727052867412567, -0.57940673828125, 0.3513926863670349, 0.3360222280025482, -0.4484553039073944, 0.163126841187477...
it shouldn't be in the package, but since they refer to each other, I now have a circular dependency. This is just an example, but I have more situations like this. How do you handle these kinds of situations? Also, I read that classes in a package higher up in the package hierarchy are not supposed to refer to class...
[ 0.44563692808151245, -0.4247127175331116, -0.3605596423149109, 0.24729865789413452, -0.018027905374765396, -0.27850082516670227, 0.1806057095527649, -0.04406869038939476, -0.43134936690330505, -0.5450003743171692, 0.29279595613479614, 0.5124422907829285, -0.17489640414714813, 0.16233964264...
that case, it would refer to a sibling package instead of a child. Is that better practice? The [antcontrib VerifyDesign task](http://ant-contrib.sourceforge.net/tasks/tasks/verifydesign.html) will help you do what you want: > For example, if there are three > packages in one source tree > > > > ``` > * biz.xsoftw...
[ 0.14166760444641113, 0.27706366777420044, 0.22656430304050446, -0.04798383638262749, -0.061912644654512405, 0.04063604399561882, 0.3012143671512604, -0.5961014032363892, -0.06560942530632019, -0.8588760495185852, 0.13998156785964966, 0.4243062734603882, -0.27605733275413513, 0.048940941691...
a > class in biz.xsoftware.presentation > and that class depended on a class in > biz.xsoftware.dataaccess, the build > would fail. This ensures the design > actually follows what is documented(to > some degree at least). This is > especially nice with automated builds So once you have decided how things should...
[ 0.18082818388938904, -0.16454735398292542, 0.06373947113752365, 0.052060555666685104, -0.18697023391723633, -0.22486144304275513, 0.4906398057937622, -0.44488486647605896, -0.2584543824195862, -0.7733830213546753, -0.08863462507724762, 0.6268038153648376, -0.29740381240844727, -0.091413028...
case that you cite... I might do something like this: * package nn contains Nueron and Connection * package nn.neurons contains the subclasses of Nueron Neuron and Connection are both high-level concepts used in the NeuralNetowrk, so putting them all together makes sense. The Neuron and Connection classes can refer t...
[ 0.1917736828327179, -0.5265839099884033, -0.4411768615245819, 0.10771666467189789, -0.024506403133273125, -0.0013390060048550367, -0.16572724282741547, -0.06264539062976837, -0.22849725186824799, -0.4690026342868805, 0.1983407437801361, 0.1755790114402771, -0.20544669032096863, 0.255651116...
The effect of issuing an inner join is the same as stating a cross join with the join condition in the WHERE-clause. I noticed that many people in my company use cross joins, where I would use inner joins. I didn't notice any significant performance gain after changing some of these queries and was wondering if it was ...
[ 0.17462220788002014, 0.1854003518819809, 0.2913411855697632, -0.3359476923942566, -0.14492720365524292, -0.14268261194229126, 0.2548938989639282, -0.38466572761535645, 0.1349533200263977, -0.5441448092460632, -0.2471780627965927, 0.5556163787841797, -0.46041369438171387, 0.3047402501106262...
every combination of rows from two or more tables. That means if table A has 6 rows and table B has 3 rows, a cross join will result in 18 rows. There is no relationship established between the two tables – you literally just produce every possible combination. With an inner join, column values from one row of a table...
[ 0.1376367211341858, 0.05410487949848175, 0.4520191252231598, -0.09655720740556717, 0.02428078092634678, 0.2815837562084198, 0.32466503977775574, -0.6078740358352661, -0.27448487281799316, -0.6639397144317627, -0.08705901354551315, 0.09800389409065247, -0.6384672522544861, 0.152809888124465...
limiting factor. As long as your queries abide by common sense and vendor specific performance guidelines (i), I like to think of the decision on which type of join to use to be a simple matter of taste. *(i) Vendor Specific Performance Guidelines* 1. [MySQL Performance Tuning and Optimization Resources](https://www...
[ 0.09324478358030319, -0.004028309602290392, 0.10908001661300659, 0.09901402145624161, -0.14625440537929535, -0.14266450703144073, -0.00519391568377614, -0.33298566937446594, 0.11021579056978226, -0.6845321655273438, -0.1316593736410141, 0.7354819178581238, -0.4415884017944336, -0.189184308...
I've been working on a home project using VS2008. It involves WCF and Silverlight. Until recently, ASP.NET development server worked just fine and was accessible from the browsers (I use both FF and IE). Now, it seems the browsers are no longer able to access the asp.net dev server. Initially, I believed it to be certa...
[ 0.4545271694660187, 0.09116168320178986, 0.2605609595775604, 0.1309981644153595, -0.370029091835022, -0.29449307918548584, 0.4952923655509949, -0.052469391375780106, -0.42354634404182434, -0.8445882797241211, 0.1635567843914032, 0.4928400218486786, -0.34106186032295227, 0.17212806642055511...
else? Have you been able to solve the problem or at least find the reason for it? (I just bypassed it by using IIS instead) Apparently, the problem was in the hosts file. **C:\Windows\System32\drivers\etc\hosts** I managed to solve this problem according to a post [here](http://forums.asp.net/t/1395973.aspx). I chos...
[ -0.07260056585073471, 0.08589405566453934, 0.11235548555850983, 0.24429476261138916, 0.19218452274799347, -0.017647622153162956, 0.36510491371154785, 0.31469446420669556, -0.5784254670143127, -0.9336475729942322, 0.29785773158073425, 0.7243347764015198, -0.2475336790084839, 0.0478741675615...
I'm interested in making a twitter client using Adobe Air, but I'm kinda stuck right now, as I can't figure out a better way to connect to the twitter REST API since it needs authentication. Currently, the client sends a request to my server (a php script using curl) with the twitter username/password (unencrypted) in...
[ 0.42000463604927063, -0.021198038011789322, 0.4000397324562073, -0.026665041223168373, -0.2646719813346863, 0.03110681101679802, 0.2544563412666321, 0.12203944474458694, 0.1175125315785408, -0.5629191398620605, 0.22546319663524628, 0.17838354408740997, -0.3506765067577362, 0.11229603737592...
it? **FYI:** I'm using jQuery. There are a few Base64 Encoding tools out there. You can use one of them. You can add a header with the encoded username and password based on the [Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication) specs Here is a post that does exactly what you want. <http://www.as...
[ 0.13976052403450012, 0.02510533109307289, 0.24176491796970367, 0.21415062248706818, 0.11866610497236252, -0.17004314064979553, 0.15721538662910461, -0.06555179506540298, -0.007536421064287424, -0.5750418901443481, -0.34247973561286926, 0.4405324459075928, -0.23714038729667664, -0.066027753...
encodeBase64(username + ":" + password)); }, sucess: function(result) { alert('done'); } }); ```
[ -0.06080950051546097, -0.15663951635360718, 0.307279109954834, -0.43206509947776794, 0.4831695854663849, -0.19484438002109528, 0.2694956958293915, -0.3555169701576233, 0.06723935157060623, -0.37558189034461975, -0.6539390683174133, 0.7037713527679443, -0.4703812301158905, -0.05610733851790...
Are there sample ASP.NET projects around using the patterns discussed in the book by Martin Fowler ([Patterns of Enterprise Application Architecture](https://rads.stackoverflow.com/amzn/click/com/0321127420))? I have downloaded the Northwind starters kit and Dinner Now, which are very good. Are there others that use t...
[ 0.10050266981124878, 0.030685042962431908, 0.034858595579862595, 0.13734441995620728, -0.13620363175868988, -0.16809333860874176, 0.37469515204429626, -0.4690748155117035, -0.4977743327617645, -0.4762943685054779, -0.08720891177654266, 0.27327537536621094, -0.24333353340625763, -0.32986596...
Where in the page life cycle is it most appropriate to set event handler delegates for events raised by custom User Controls? I have a `ReportFilter` user control that raises an `ApplyFilterClicked` event. Currently I am just using `Page_Load` to assign a handler method. ``` reportFilter.ApplyFilterClicked += reportF...
[ 0.10991977900266647, -0.23232311010360718, 0.4477779269218445, 0.05515741929411888, -0.08512882143259048, -0.22483974695205688, 0.13998007774353027, -0.20495308935642242, -0.3864821791648865, -0.7402200102806091, 0.06863647699356079, 0.30905982851982117, -0.455767422914505, 0.0759459882974...
be called, since the event handling phase is next in line after Load.
[ -0.03304818645119667, -0.41570809483528137, -0.18816232681274414, -0.08335382491350174, 0.07657136768102646, -0.2715013027191162, -0.1378886103630066, -0.0024176836013793945, -0.1377282738685608, -0.18447399139404297, -0.4254630208015442, 0.5603116750717163, 0.06054763123393059, -0.1564425...
I've came accross this concept several times and did not find a clear explanation. What is it? What has it to do with programming? What has it to do with what we (software engineeers / programmers) call architecture? How can it help me? How can I put this to work for me? How is the professional that best understand thi...
[ 0.46488529443740845, 0.2125176042318344, 0.08438978344202042, 0.2747305929660797, -0.011996128596365452, 0.21578294038772583, 0.13225747644901276, 0.10610924661159515, 0.010972457006573677, -0.7189903259277344, 0.06805816292762756, 0.5160005688667297, 0.148738831281662, 0.5114426612854004,...
In a little demo application that I'm building I put code to initialize the database in the Global.Session\_Start() event. However, I notice that this event does not fire when I'm running through the app in the debugger on the development server (haven't tested it anywhere else yet). **Question 1:** What gives? When d...
[ 0.1648130863904953, 0.09608378261327744, 0.09604143351316452, 0.05762866139411926, 0.015449230559170246, -0.2665517032146454, 0.35167232155799866, 0.1139509305357933, -0.4392382800579071, -0.7042463421821594, -0.06739071756601334, 0.6393285989761353, -0.006506412290036678, 0.14858689904212...
where the code to initialize the database should go? i would rather not put it in the Application\_Start method, since it does not always get called when debugging. PS. By initialize database I do not mean I open a connection to SqlServer and leave it open forever. I am using db4o and I open a pre-built database file....
[ 0.4140452444553375, 0.09945445507764816, -0.1199265792965889, -0.008142517879605293, 0.09425733238458633, -0.40322360396385193, 0.2828366756439209, 0.14732185006141663, -0.03466756269335747, -0.7506368160247803, 0.13456690311431885, 0.4061264395713806, -0.05652214586734772, 0.2786604464054...
an unneeded session.
[ 0.18359734117984772, 0.1299915909767151, 0.009787463583052158, 0.20940722525119781, -0.07651840895414352, -0.3587879240512848, 0.2498815804719925, -0.1449775993824005, 0.05885552987456322, -0.010919648222625256, 0.054590679705142975, 0.2670693099498749, -0.2030700147151947, -0.033431220799...
Any way to have a NSButton title to wrap when it's width is longer than the button width, instead of getting clipped? I'm trying to have a radio button with a text that can be long and have multiple lines. One way I thought about having it work is to have an NSButton of type NSRadioButton but can't get multiple lines...
[ 0.5500572323799133, -0.21628206968307495, 0.24587412178516388, 0.08891285955905914, -0.13384422659873962, -0.28962019085884094, 0.43496042490005493, -0.2644660174846649, -0.26495200395584106, -0.7233591079711914, -0.22451113164424896, 0.7032062411308289, -0.19382955133914948, 0.12702248990...
for this. That said, it's typically a bad idea to have multiple lines of text on a button. [A button label should concisely represent the action performed:](http://developer.apple.com/documentation/userexperience/Conceptual/AppleHIGuidelines/XHIGControls/XHIGControls.html#//apple_ref/doc/uid/TP30000359-TPXREF186) > T...
[ 0.09920103847980499, -0.19056467711925507, 0.42961522936820984, -0.08279098570346832, 0.11786826699972153, 0.26162487268447876, 0.22120103240013123, -0.31928518414497375, -0.3989279270172119, -0.4289308190345764, -0.2700539827346802, 0.4150506258010864, -0.39931783080101013, -0.32465690374...
to do?
[ 0.4817182719707489, 0.2337234616279602, -0.276188462972641, -0.07178594917058945, 0.15937423706054688, -0.050334230065345764, 0.1863415241241455, -0.11838353425264359, -0.3196043074131012, -0.07116853445768356, 0.14708180725574493, 0.1168535053730011, -0.11307921260595322, -0.1422777175903...
My problem is a little bit complicate. (I use PHP) I have two arrays, (simple arrays array[0] = string, array[1] = string...) OK, now I will display the content of two arrays in a webpage. The first array contain names and the second images URL. Images and names are already displayed (my problem isn't here). But now...
[ 0.25101813673973083, 0.2698622941970825, 0.389472097158432, -0.05164634808897972, -0.4366503953933716, -0.08517507463693619, 0.3821929395198822, -0.09851951897144318, -0.15549522638320923, -0.7584773898124695, 0.2615194320678711, 0.4537593424320221, -0.23271797597408295, 0.0394225828349590...
have thought of something simple, crawl the keys (number) of unchecked checkboxes and unset them from my array. But the problem that I didn't know how to deal with the check boxes first of all i recomend having just one array: ``` $array = array (0 => array('name' => '....', 'url' => '....')) ``` i think this will m...
[ 0.1937379091978073, 0.17753039300441742, 0.4693184494972229, -0.11132560670375824, -0.3645927608013153, -0.20057088136672974, 0.6177662014961243, -0.19193947315216064, -0.15414868295192719, -0.821537971496582, -0.0111419428139925, 0.35488855838775635, -0.4282914400100708, -0.15573033690452...
action you itarate the intial array and remove the unchecked ones. ``` foreach ($yourArray as $key=>$value) { if (!isset($_POST['chkArr'][$key]) OR $_POST['chkArr'][$key]!='1') { unset($yourArray[$key]); } } ```
[ -0.34440287947654724, -0.3737870156764984, 0.4629943072795868, -0.22062355279922485, 0.00649966299533844, 0.18551582098007202, 0.23488323390483856, -0.3529261648654938, -0.25507867336273193, -0.2963710427284241, -0.44740626215934753, 0.6620637774467468, -0.5325701236724854, -0.297844290733...
Linux: I want to list all the files in a directory and within its subdirectories, except some strings. For that, I've been using a combination of find/grep/shell globbing. For instance, I want to list all files except those in the directories ``` ./bin ./lib ./resources ``` I understand this can be done as shown [in...
[ 0.08742523193359375, -0.05131318420171738, 0.28926748037338257, -0.22969889640808105, -0.16949790716171265, -0.29424071311950684, -0.04555583745241165, 0.23483806848526, -0.3057156205177307, -0.6373013257980347, -0.40204155445098877, 0.7398214936256409, -0.5384320616722107, -0.108265534043...
in the shell extended globbing. Thanks. With [bash's extglob shopt setting](http://www.faqs.org/docs/bashman/bashref_55.html) enabled, you can exclude files with `!` in your [wildcard pattern](http://www.faqs.org/docs/bashman/bashref_35.html). Some examples: * Everything except bin, lib, and resources ``` shopt -s ...
[ 0.039642084389925, 0.12844514846801758, -0.022302791476249695, -0.3358505070209503, 0.07945792376995087, -0.3711443841457367, 0.14366011321544647, -0.26480039954185486, -0.210451140999794, -0.3885476291179657, -0.5478035807609558, 0.925277590751648, -0.517909824848175, 0.02050764113664627,...
I have seen a method somewhere here on SO to restrict items returned from a foreach loop to a certain type, using, if I remember correctly, LINQ extensions on IEnumerable and a lambda for the type check. I can't find it again, can anyone suggest how this was achieved? You could do this with a call to the Where extensio...
[ 0.3661578595638275, -0.010368406772613525, 0.2856169641017914, -0.15095442533493042, 0.07789558172225952, -0.20322920382022858, 0.20860609412193298, -0.23849977552890778, -0.21815869212150574, -0.4338962733745575, -0.08651311695575714, 0.5339288115501404, -0.3202856481075287, 0.20163388550...
has an extension method called OfType, documented [here](http://msdn.microsoft.com/en-us/library/bb360913.aspx). To use it, you'd do something like this: ``` foreach(var x in theCollection.OfType<int>()) { // Do something to x } ```
[ 0.23891082406044006, -0.026309626176953316, 0.21647588908672333, -0.2376640886068344, 0.10479406267404556, -0.05909399315714836, 0.09623133391141891, -0.2838912010192871, -0.11102403700351715, -0.40792861580848694, -0.07261072844266891, 0.31689685583114624, -0.4411327838897705, 0.189829409...
I love using LINQ in .NET, but I want to know how that works internally? It makes more sense to ask about a particular aspect of LINQ. It's a bit like asking "How Windows works" otherwise. The key parts of LINQ are for me, from a C# perspective: * Expression trees. These are representations of code as data. For insta...
[ 0.5341771245002747, 0.19906578958034515, 0.1325952708721161, 0.17064008116722107, -0.17685474455356598, -0.35046273469924927, -0.06288741528987885, -0.08374423533678055, -0.12082625180482864, -0.4680245518684387, -0.031473755836486816, 0.5855723023414612, -0.17362985014915466, -0.200723245...
can analyze them and convert them into SQL. * Lambda expressions. These are expressions like this: ``` x => x * 2 (int x, int y) => x * y () => { Console.WriteLine("Block"); Console.WriteLine("Lambda"); } ``` Lambda expressions are converted either into *delegates* or *expression trees*. * Anonymous types. These are...
[ 0.04669266566634178, -0.009701251052320004, 0.22321608662605286, 0.07926032692193985, -0.06061417609453201, 0.05589626729488373, 0.18454331159591675, -0.33052384853363037, -0.04486138001084328, -0.5522663593292236, -0.17220386862754822, 0.4769030213356018, -0.4859456717967987, 0.0237027760...
people where person.Age < 18 select person.Name ``` These are translated by the C# compiler into "normal" C# 3.0 (i.e. a form which doesn't use query expressions). Overload resolution etc is applied afterwards, which is absolutely key to being able to use the same query syntax with multiple data types, without the co...
[ 0.27549827098846436, 0.049303531646728516, 0.34017008543014526, -0.039555080235004425, 0.09483630210161209, 0.1414451152086258, 0.026299525052309036, -0.33570417761802673, -0.41160351037979126, -0.559099018573761, -0.37581950426101685, 0.6185692548751831, -0.2879994809627533, -0.3177160322...
example, an extension method like this: ``` public static int CountAsciiDigits(this string text) { return text.Count(letter => letter >= '0' && letter <= '9'); } ``` can then be used like this: ``` string foo = "123abc456"; int count = foo.CountAsciiDigits(); ``` Note that the implementation of `CountAsciiDig...
[ 0.21635091304779053, 0.0009198486804962158, 0.5794880390167236, -0.049105122685432434, -0.12979792058467865, -0.1405002772808075, -0.027893804013729095, -0.2665247619152069, -0.11829287558794022, -0.3357015550136566, -0.18886058032512665, 0.6744410991668701, -0.4656820595264435, -0.1611982...
site. The way providers such as LINQ to SQL work is generally via the `Queryable` class. At their core, they translate expression trees into other query formats, and then construct appropriate objects with the results of executing those out-of-process queries. Does that cover everything you were interested in? If the...
[ 0.6351224184036255, 0.12377224862575531, 0.24056613445281982, 0.310295969247818, -0.03534289821982384, -0.558682918548584, 0.20269320905208588, 0.22521094977855682, -0.19752280414104462, -0.534672737121582, -0.1285911351442337, 0.3691888749599457, -0.039022937417030334, 0.06850294023752213...
I am not gettng the RESTful thing. Yes, I know how to send a GET request to my app from my browser. It's through URL linking. ``` <a href="/user/someone"> ``` And can also send POST requests through form method. ``` <form method="post"> ``` Beside that I know browsers sometimes send HEAD command to figure out pag...
[ 0.22476422786712646, 0.0014938170788809657, 0.8104634881019592, -0.12231987714767456, -0.26204559206962585, -0.23030219972133636, 0.6744011044502258, -0.058125078678131104, -0.00546327605843544, -0.6230061054229736, -0.6133686304092407, 0.5668184161186218, -0.29767781496047974, -0.08476085...
So in HTML there is no way of describing other methods than this by now. But the [HTML 5 specification](http://www.w3.org/TR/html5/) (currently just a working draft) does name `PUT` and `DELETE` as [valid values](http://www.w3.org/TR/html5/forms.html#attr-fs-method). Taking a look into the [XMLHttpRequest object spec...
[ 0.03971521183848381, -0.05553858354687691, 0.4747810959815979, 0.07545707374811172, -0.245102196931839, -0.23071704804897308, 0.12998919188976288, -0.28089261054992676, -0.30008453130722046, -0.5274649262428284, -0.2803942561149597, 0.3145168423652649, -0.21564216911792755, -0.151164218783...