text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have the following text: ``` <i><b>It is noticeably faster.</b></i> <i><b>They take less disk space.</i> ``` And the following regex: ``` (</[b|i|u]>)+(\s*)(<[b|i|u]>)+ ``` The matching creates the following groups: ``` 0: </b></i> <b><i> 1: </i> 2: spaces 3: <b> ``` How can I change my regex so it creates...
[ -0.17323532700538635, -0.13751406967639923, 0.17191435396671295, -0.06733869761228561, -0.21450862288475037, 0.09768564254045486, 0.11181727051734924, -0.46053993701934814, -0.2661310136318207, -0.8552025556564331, 0.004574170336127281, 0.3591540455818176, -0.22098049521446228, -0.20253936...
faster.</b></i> <i><b>They take less disk space.</i>"; Regex pattern = new Regex(@"(</[b|i|u]>)+(\s*)(<[b|i|u]>)+"); Match match = pattern.Match(text); foreach (Group group in match.Groups) { Console.WriteLine("Next group:"); foreach (Capture capture in group.Cap...
[ -0.16591039299964905, -0.4161737859249115, 0.557962954044342, 0.004162932746112347, 0.3525829613208771, -0.021566947922110558, 0.02641664259135723, -0.5878953337669373, -0.2762904465198517, -0.8751999139785767, -0.14109274744987488, 0.366524338722229, -0.38249140977859497, -0.0931651070713...
Console.WriteLine(" " + capture.Value); } } } } ```
[ -0.340510755777359, 0.08836018294095993, 0.42957302927970886, -0.12705861032009125, 0.4150730073451996, -0.28039243817329407, 0.12634886801242828, 0.025644777342677116, 0.2752336859703064, -0.6747345328330994, -0.17282210290431976, 0.624657154083252, -0.40737080574035645, 0.277588546276092...
In managed C++/CLI, I could do this either as (1): ``` array<System::Byte>^ css_keycode = {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00}; ``` or (2): ``` array<System::Byte>^ css_keycode; css_keycode = gcnew array<System::Byte>(6) {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00}; ``` But I apparently can't do (3): ``` array<System::...
[ -0.09785693138837814, 0.03146013617515564, 0.0327780619263649, -0.310001403093338, 0.008206825703382492, -0.154165580868721, 0.46821343898773193, -0.19652721285820007, -0.24001947045326233, -0.37497299909591675, -0.16893132030963898, 0.5709013938903809, -0.5234858393669128, 0.1001942157745...
css_keycode = {0x51, 0x67, 0x67, 0xc5, 0xe0, 0x00}; } } ``` Thanks! You have to differ between initialization and assignment. It's like Tobias Wärre said in his post. You can't do (3) because assingnment does not work with the *initialization brackets*. (4) does work because you ardinarly assign the new values to...
[ 0.027410587295889854, 0.27674275636672974, 0.10626349598169327, -0.18017370998859406, -0.126695454120636, 0.0712384283542633, 0.31787335872650146, -0.48763009905815125, -0.39287054538726807, -0.6833257675170898, -0.2887217700481415, 0.425134539604187, -0.32139721512794495, 0.12179496884346...
css_keycode_tmp; } } ``` This way the assigned values are copied to your array. **EDIT:** Unfortunately there is no `swap` method like for STL containers (at least none I know of), else you could just swap the contents with the temporary.
[ 0.24877534806728363, 0.03338553011417389, 0.16791237890720367, 0.01895911619067192, -0.010818948037922382, -0.19020305573940277, 0.00940770749002695, 0.22002270817756653, -0.37505874037742615, -0.7591659426689148, -0.11413058638572693, 0.37036603689193726, -0.3566918671131134, 0.1780799627...
I am testing a simple query to get data from an AS400 database. **I am not sure if the way I am using the SQL query is correct.** I get an error: "The parameter is incorrect." ``` Select FIELD1, FIELD2 From Mylibrary.MyTable WHERE FIELD1 = @Field1 ``` I don't get an error when I run the following query: ``` Selec...
[ 0.1457425355911255, 0.2910851240158081, 0.30871841311454773, 0.045004844665527344, -0.2691400945186615, 0.05420774221420288, 0.36839163303375244, -0.5116384029388428, 0.02382020652294159, -0.7349674701690674, 0.21403135359287262, 0.6079192757606506, -0.055386267602443695, -0.21479533612728...
solution by playing around and trying different things. As I said before, I am used to OLEDB and ADO.Net so I am used to doing things like: ``` Select FIELD1, FIELD2 From Mylibrary.MyTable WHERE FIELD1 = @Field1 ``` which work in Access and SQL Server but not in AS/400. I got the following to work: ``` Select FIE...
[ -0.16792277991771698, 0.05581601709127426, 0.5400066375732422, -0.013727819547057152, -0.02544853277504444, 0.13862043619155884, 0.18026277422904968, -0.5070559978485107, -0.1569288820028305, -0.3133266568183899, 0.03238590806722641, 0.45793500542640686, -0.2830717861652374, -0.12211733311...
I am trying to troubleshoot an MS Access XP database and the first thing it does it close the main window and prompt for a date. Everything I enter comes with an error message stating that the value entered is not a valid date mm/dd/yyyy. It then proceeds to close access. I've tried every date format I can think of to ...
[ 0.2592993974685669, 0.5274917483329773, 0.5748854875564575, -0.06995873153209686, 0.1972683072090149, -0.1682850569486618, 0.6638716459274292, 0.44937485456466675, -0.25357064604759216, -0.4191058576107025, -0.06598208844661713, 0.4753264784812927, -0.06887166202068329, 0.6704840064048767,...
open it. Hold the Shift-key down when you choose open in the file menu in Access.
[ -0.1737632155418396, 0.1578257530927658, 0.3753557801246643, -0.27677980065345764, 0.31716322898864746, -0.024191098287701607, -0.1609029620885849, 0.24812209606170654, -0.17880958318710327, -0.5315055847167969, -0.4791371822357178, 0.6611625552177429, -0.28343838453292847, 0.0267327111214...
I happened across this article about [hardware based hard drive encryption](http://arstechnica.com/hardware/news/2009/01/hard-drive-manufacturers-unveil-disk-encryption-standard.ars) and realized that not only would this give a great way to protect your data but it would also speed up the applications that we use to en...
[ 0.4544723927974701, 0.2122393101453781, 0.25975579023361206, 0.18523414433002472, 0.1091497465968132, -0.19601266086101532, -0.17876851558685303, -0.20560471713542938, -0.2330969125032425, -0.32878488302230835, 0.02722218632698059, 0.9861269593238831, 0.1847638487815857, -0.091320201754570...
quite a bit more storage space to folks. What are the pros and cons of programming such an approach to be used in the firmware? In the world of 1TB drives for $100 speed is a much more valuable resource than space. It wouldn't be worth it. EDIT: Ah so you're saying that it would be quicker to grab 100 bytes of compr...
[ 0.38165682554244995, 0.029053622856736183, -0.13424734771251678, 0.5848254561424255, 0.14251214265823364, 0.030146224424242973, -0.06915691494941711, 0.056007031351327896, -0.185251384973526, -0.18566524982452393, 0.272012859582901, 0.39515721797943115, 0.09032395482063293, 0.0504043772816...
I'm willing to bet that if the trade off ends up being worth it that hard drive manufacturers have already employed this technique and hard drive speeds are what they are in spite of the fact. But who knows, you may be on to something!
[ 0.6605626344680786, -0.01551264338195324, 0.025005163624882698, 0.5907053351402283, 0.21661755442619324, -0.17076317965984344, -0.038890231400728226, 0.5960152745246887, -0.5169214606285095, -0.14875896275043488, 0.3598558008670807, 0.7948649525642395, 0.3533134460449219, 0.249572664499282...
I'm working on some JQuery to hide/show some content when I click a link. I can create something like: ``` <a href="#" onclick="jquery_stuff" /> ``` But if I click that link while I'm scrolled down on a page, it will jump back up to the top of the page. If I do something like: ``` <a href="" onclick="jquery_stuff"...
[ 0.3457641899585724, -0.07958543300628662, 0.4422878921031952, 0.1374550312757492, -0.08192814141511917, -0.3824165165424347, 0.2151811569929123, 0.20727364718914032, -0.36211565136909485, -0.6633644700050354, -0.03130154311656952, 0.2784971296787262, -0.30916354060173035, 0.302056610584259...
handler to the `onclick` event, without changing anything on the page or moving the scrollbar? Put a "return false;" on the second option: ``` <a href="" onclick="jquery_stuff; return false;" /> ```
[ -0.034888237714767456, -0.3030708432197571, 0.19854041934013367, 0.05249364301562309, 0.180528461933136, -0.3000672161579132, 0.40968823432922363, -0.17059525847434998, 0.030919404700398445, -0.39293310046195984, -0.3631950616836548, 0.5747267603874207, -0.35650765895843506, -0.11332208663...
Our build is annoyingly slow. It's a Java system built with [Ant](http://en.wikipedia.org/wiki/Apache_Ant), and I'm running mine on Windows XP. Depending on the hardware, it can take between 5 to 15 minutes to complete. Watching overall performance metrics on the machine, as well as correlating hardware differences w...
[ 0.2455177754163742, 0.2896382212638855, 0.24437306821346283, 0.18527166545391083, 0.230050727725029, 0.2379433810710907, 0.4939228594303131, -0.21503768861293793, 0.183989480137825, -0.8476809859275818, 0.060809485614299774, 0.42762231826782227, 0.36800435185432434, -0.16010251641273499, ...
the compiler, the build is re-reading the same commonly used libraries many times. What are some profiling tools that will tell me what a given process is doing with which files? Free is nice, but not essential. --- Using [Process Monitor, as suggested by Jon Skeet,](https://stackoverflow.com/questions/493177/how-ca...
[ 0.32768353819847107, 0.3956288695335388, -0.36333054304122925, 0.07156723737716675, -0.2093595564365387, -0.17591559886932373, 0.1552814096212387, -0.41382738947868347, -0.36009731888771057, -0.5454001426696777, -0.15935365855693817, 0.7482481598854065, -0.11613348126411438, -0.01753550395...
disk cut build times by about 40%; clearly, Windows file system caching isn't doing a good enough job, even though I've told Windows to optimize for that. One interesting thing I noticed is that the typical 'read' operation on a [JAR](http://en.wikipedia.org/wiki/JAR_%28file_format%29) file is just a few dozen bytes;...
[ 0.29291832447052, 0.14205943048000336, -0.04488838464021683, 0.11383260041475296, -0.35134780406951904, 0.044977817684412, 0.041649214923381805, 0.20536117255687714, -0.4921087920665741, -0.6766279339790344, -0.049875110387802124, 0.7886772751808167, 0.12272452563047409, 0.1412871479988098...
for Windows, SysInternals [Process Monitor](http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) should show you everything you need to know. You can select the process, then see each operation as it goes and get a summary of file operation as well.
[ 0.18950819969177246, -0.31559762358665466, 0.450250506401062, 0.17104631662368774, 0.3925741910934448, -0.20497843623161316, 0.02312491461634636, 0.2710179090499878, -0.42650288343429565, -0.7945699095726013, -0.4651017487049103, 0.45071694254875183, -0.061260201036930084, 0.16267055273056...
I have created a small application which opens,reads and creates Excel files. The app has been written in C# and I don't know why I get this error message when the application is running in one computer. I have run the same applicaiton on my computer and I don't have any problem. Can somebody help me and let me know w...
[ 0.2852470576763153, 0.5041956305503845, -0.03155568242073059, 0.30030372738838196, -0.015933915972709656, -0.15820668637752533, 0.40327149629592896, 0.1609405130147934, 0.06274639815092087, -0.5651678442955017, 0.33634713292121887, 0.7475176453590393, -0.07037211954593658, 0.11100774258375...
reason for a formula working on one machine and not on others is usually "locale": check if that machine has different formatting settings for numbers, dates and/or currencies (comma v.s. period, etc).
[ 0.43938612937927246, 0.0826406478881836, 0.11074209213256836, 0.40160131454467773, 0.5062515735626221, -0.32528844475746155, 0.0472196526825428, 0.20794889330863953, -0.3213100731372833, -0.4017859101295471, -0.292462021112442, 0.18693692982196808, -0.040192145854234695, 0.3096048235893249...
The following code executes properly when the data key has no data to send, i.e. data: "{}" an empty JSON object and the webservice takes no parameters. I would like to post some data to the webservice but I am running into trouble. When I try to set this to data:"{'name':'Niall','surname':'Smith'}", I get an error `...
[ 0.22648455202579498, 0.2082790583372116, 0.4169551432132721, -0.3377891480922699, -0.02064690925180912, -0.12336160242557526, 0.9032391905784607, -0.5990011096000671, -0.21547269821166992, -0.3219286799430847, -0.28270986676216125, 0.638944685459137, -0.3633190393447876, 0.0457702986896038...
to post my data back to the server. ``` $.ajax({ type: "POST", url: "/WebServices/BasketServices.asmx/AddItemToBasket", data: "{'name':'niall'}", // Is this Correct?? contentType: "application/json; charset=utf-8", dataType: "json", success: OnItemAddedSuccess })...
[ 0.06430754065513611, -0.03473920747637749, 0.40746891498565674, -0.2516975700855255, -0.27022624015808105, 0.209823340177536, 0.37162742018699646, 0.05344846844673157, -0.15225748717784882, -0.8989874720573425, -0.10887419432401657, 0.18594275414943695, -0.1764235496520996, 0.0972071066498...
WebService ``` [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] [System.Web.Script.Services.ScriptService] public class BasketServices : System.Web.Services.WebService { [WebMethod(true)] public string AddIt...
[ 0.08055025339126587, 0.011433581821620464, 0.3000700771808624, 0.17574872076511383, -0.27529168128967285, 0.14599859714508057, 0.3680110573768616, -0.21842704713344574, -0.33331239223480225, -0.6054903268814087, 0.07247625291347504, 0.5387056469917297, -0.27596068382263184, -0.087959378957...
`json` to be set. Try this AJAX call : ``` var data = {'name':'niall'}; $.ajax({ type: "POST", url: "/WebServices/BasketServices.asmx/AddItemToBasket", data: "json=" + JSON.stringify(data), contentType: "application/json; charset=utf-8", dataType: "json", success: OnItemAddedSuccess }); ``` ...
[ 0.10605098307132721, -0.1349906325340271, 0.46112141013145447, -0.29953426122665405, -0.2213842123746872, -0.082715705037117, 0.41098254919052124, -0.18381556868553162, -0.41798412799835205, -0.6718711853027344, -0.5761786103248596, 0.5602532029151917, -0.45716139674186707, -0.318933337926...
I am interested in cross-compiling a Linux kernel for an ARM target on a x86 host. Are there some good practices you recommend? Which is the best cross-compile suite in your opinion? Have you settled up a custom cross-compile environment? If yes, what advices do you have? Is it a good idea? There are two approaches I'v...
[ 0.72599196434021, -0.0404859334230423, -0.15118543803691864, 0.07956214249134064, -0.14610454440116882, -0.04194381833076477, -0.09082531183958054, 0.26256486773490906, -0.06714187562465668, -0.7518039345741272, 0.06366285681724548, 0.5536746382713318, -0.11138352006673813, -0.135484054684...
matters to you, check out [crosstool-ng](http://crosstool-ng.org/). This project is a configuration tool similar to the Linux kernel configuration application. Set which versions of gcc, binutils, libc (GNU or uCLibc), threading, and Linux kernel to build and crosstool-ng does the rest (i.e. downloads the tar balls, co...
[ 0.7129017114639282, -0.069819875061512, -0.014500290155410767, 0.002583955181762576, -0.12379805743694305, 0.0992998331785202, 0.041086453944444656, -0.198869526386261, -0.22116142511367798, -0.7228801250457764, 0.04380330443382263, 0.6304988265037537, -0.37505215406417847, 0.0612754933536...
the versions of binutils, C library etc. as not all combinations necessarily work together or even build. One hybrid approach might be to start with the pre-built tools and replace them later with a custom solution via crosstool-ng if necessary. **Update**: The answer originally used the [CodeSourcery tools](http://w...
[ 0.6053481101989746, -0.19649186730384827, 0.3671318292617798, 0.10373701900243759, -0.1063840240240097, -0.10051009804010391, -0.16654422879219055, -0.12025395780801773, -0.003389996476471424, -0.8360165953636169, -0.4291788935661316, 0.28990602493286133, -0.1666271686553955, -0.1048956885...
I'm wondering what is the best practice for moving a website to another server (along with all settings, etc.) * Manually recreate the site on the new server (not maintainable for obvious reasons) * Copy the applicationHost.config settings file * Use appcmd to make a backup and restore * Use MSDeploy to publish the si...
[ 0.07006403803825378, -0.07421132177114487, 0.4537481665611267, 0.18543237447738647, 0.16505780816078186, -0.3051145076751709, 0.45515677332878113, 0.1345573216676712, -0.4012656509876251, -1.0260605812072754, -0.21902459859848022, 0.5473025441169739, -0.2617284655570984, 0.2000961154699325...
across the internet, if you are just gonna move them via a USB key then don't sweat it.) 4. Move these files to your new server ``` administration.config applicationHost.config configEncKey.key ``` 5. On the new server, go back to the “Shared Configuration” section and check “Enable shared configuration.” Enter the ...
[ 0.371214359998703, 0.09972120076417923, 0.6601590514183044, 0.03339181840419769, 0.27458012104034424, -0.5221922993659973, 0.1743246167898178, -0.08465715497732162, -0.4457024335861206, -0.8938482999801636, -0.2685936689376831, 0.6155062317848206, -0.1277453452348709, 0.09383520483970642, ...
If a file system task such as a rename fails, for example if the file does not exist, then this is considered an error by SSIS. This means the whole package fails. I can get around it by using a script task, or setting the maximum errors for the package to more than one. The problem with setting maximum errors for the ...
[ 0.13465671241283417, -0.03883293643593788, -0.002528528682887554, 0.07874632626771927, 0.26851409673690796, -0.26180630922317505, 0.6423855423927307, 0.09064517170190811, -0.3188711404800415, -0.561997652053833, -0.23213070631027222, 0.7542015314102173, -0.16092559695243835, 0.040175966918...
based on success or failure of the file system task? I tried sticking the file task into a sequence container with ForceExecutionResult set to Success, but the package still fails saying maximum error count reached. I've run into this exact problem and I've always used a Script Task. I don't think there's a better solu...
[ 0.3066183924674988, -0.05051711946725845, 0.10021664947271347, -0.044221118092536926, -0.08253108710050583, 0.26150354743003845, 0.42691776156425476, -0.33309656381607056, -0.030741244554519653, -0.5138331055641174, 0.44971343874931335, 0.750038743019104, -0.11481814086437225, 0.1284956187...
I want to show an image from an URL with a certain width and height even if it has a different size ratio. So I want to resize (maintaining the ratio) and then cut the image to the size I want. I can resize with html `img` property and I can cut with `background-image`. How can I do both? Example: This image: ![e...
[ 0.3973838984966278, -0.02181227318942547, 0.6036754846572876, -0.08558136224746704, -0.10072129219770432, 0.20568929612636566, 0.033232998102903366, -0.35323432087898254, -0.3675873875617981, -0.7845435738563538, -0.1807868331670761, 0.5778310298919678, -0.010613544844090939, 0.04298867657...
200px; height: 150px;" src="https://i.stack.imgur.com/wPh0S.jpg"> ``` And with `background-image` I can cut the image `200x100` pixels. ``` <div style="background-image: url('https://i.stack.imgur.com/wPh0S.jpg'); width:200px; height:100px; background-position:center;">&nbsp;</div> ```...
[ 0.21395383775234222, -0.30262038111686707, 0.6150195598602295, -0.12525491416454315, -0.08826269954442978, 0.44273900985717773, -0.10430341958999634, -0.5155310034751892, -0.3911503553390503, -0.7674254179000854, -0.3565678596496582, 0.6745156645774841, 0.06223266199231148, -0.187730312347...
overflow: hidden; } .crop img { width: 400px; height: 300px; margin: -75px 0 0 -100px; } ``` ```html <div class="crop"> <img src="https://i.stack.imgur.com/wPh0S.jpg" alt="Donald Duck"> </div> ``` You can use negative `margin` to move the image around withi...
[ -0.08986194431781769, -0.18219655752182007, 0.7087013125419617, 0.020913079380989075, 0.0033729090355336666, 0.20636768639087677, -0.23289726674556732, -0.4051123857498169, -0.3876194655895233, -0.33054986596107483, -0.04664863273501396, 0.29025545716285706, 0.04378046840429306, -0.0403584...
I'm designing a RESTful Web app that will provide an authentication system for several other apps. The other apps will query this app through HTTP and get back XML describing authenticated users. The authentication app needs to keep track of **which users** are allowed to **do what** on **which applications.** I'm wo...
[ 0.14459510147571564, 0.3644198477268219, 0.4186689555644989, -0.07698533684015274, -0.13790220022201538, 0.06072167679667473, 0.10871364921331406, -0.40015870332717896, 0.1730419248342514, -0.5908621549606323, 0.12213496118783951, 0.4610317349433899, -0.38658639788627625, -0.11864069849252...
function in the the "Equipment Inventory" app. So "Equipment Inventory" would say to the auth system "get the user with username xxx and password yyy." Then it would look at the returned (via ActiveResource) `User` object and check whether its `roles` Array contains a `Role` with a name of "ADMIN" that itself belongs t...
[ -0.04497183859348297, -0.1340142786502838, 0.5562726855278015, -0.010094882920384407, 0.22615404427051544, 0.06390240043401718, 0.09822554141283035, -0.23180465400218964, 0.05880245938897133, -0.6612455248832703, -0.26785850524902344, 0.9760763049125671, -0.38943415880203247, -0.0271442867...
just answered my own question, but comments or suggestions would be most welcome. The schema looks sane, You would send `<login><username>abc</username><password>xyz</password><app>51</app></login>` and you get back `<auth> <user> <username>abc</a> <lastlogin>123456464</lastlogin> </user> <app> <name>Equipment Inv...
[ 0.43101024627685547, 0.040963754057884216, 0.39629673957824707, 0.026996897533535957, 0.0836876705288887, 0.13624489307403564, 0.054473306983709335, -0.5599350333213806, -0.12030622363090515, -0.5393083095550537, -0.11773382872343063, 0.4998665452003479, -0.23861375451087952, 0.03643738850...
mmm, I have just a little confusion about multiple auto declarations in the upcoming C++0x standard. ``` auto a = 10, b = 3.f , * c = new Class(); ``` somewhere I read it is not allowed. The reason was(?) because it was not clear if the consecutive declarations should have the same type of the first one , (int in t...
[ 0.1745484471321106, 0.10973750054836273, 0.4902447462081909, -0.3901515305042267, 0.2394407093524933, 0.20401829481124878, 0.3938734829425812, -0.2251640111207962, -0.30727773904800415, -0.5319432020187378, -0.26293131709098816, 0.8471338152885437, -0.6293385624885559, -0.05384926497936249...
resulted in the standard? If I can say my POV, translation #2 was the most obiouvs, at least for me that I'm a regular C++ user . I mean, for me "every variable declared is of the same declared type", witch is auto. Translation #1 would be really un-intuitive to me. Good Bye QbProg It's probably not the latest, but ...
[ 0.23191742599010468, 0.24547681212425232, 0.6621401309967041, -0.22312495112419128, -0.5473681092262268, -0.2014685571193695, 0.5271807909011841, -0.28003931045532227, -0.07638046890497208, 0.002129477448761463, -0.014080666936933994, 0.9183149337768555, -0.24239829182624817, 0.04614705592...
changed from June this is (or will be) permitted in a limited form with a pretty intuitive interpretation. The limitation is that if you do want to string multiple auto declarations like this (using the example above), it works because the inferred type of `v` and `u` have the same 'base type' (int in this case) to us...
[ 0.5346201658248901, -0.23933108150959015, 0.6385200619697571, -0.1281767040491104, -0.17491258680820465, -0.18328306078910828, 0.10477380454540253, -0.25003448128700256, -0.4281094968318939, -0.3237006664276123, -0.18827328085899353, 0.510962724685669, -0.2123090624809265, 0.22776848077774...
U is not the same in each deduction, the program is ill-formed. where the "deduced template parameter U" is determined by: > the deduced type of the parameter u in the call f(expr) of the following invented function template: > > > > ``` > `template <class U> void f(const U& u);` > > ``` Why they've come up wit...
[ 0.3669314980506897, 0.2789624035358429, 0.0189106073230505, -0.14718025922775269, -0.11893489956855774, 0.1850583702325821, 0.276737242937088, -0.573025643825531, 0.06950455158948898, -0.2416469007730484, -0.044769782572984695, 0.6184678077697754, -0.39663487672805786, 0.09923020750284195,...
you've figured out the the `auto` keyword replaces, you can't change it in the same statement. Take for example: ``` int x = 5; CFoo * c = new CFoo(); auto a1 = x, b1 = c; // why should this be permitted if int a2 = x, CFoo* b2 = c; // this is not? ``` In any case, I'm not a fan of putting multiple declar...
[ 0.6029189229011536, 0.06388449668884277, -0.14375661313533783, -0.3176021873950958, -0.07519108802080154, -0.2313881367444992, 0.2541392147541046, -0.06687301397323608, -0.20525315403938293, -0.2196826934814453, -0.3471382260322571, 0.7361401319503784, -0.3615909516811371, 0.01628489606082...
How do you manage your project life cycle? For example: Do you start with a template? Do you use versioning such as SVN as the authoritative source? Do you archive the projects, if so when and how? When a project is revived (work resumes), how’s that handled? Do you use automated scripts to do things such as create II...
[ 0.8913716673851013, -0.016652774065732956, -0.13732995092868805, 0.37575244903564453, 0.005190104246139526, -0.4180278778076172, 0.2628597021102905, 0.017978860065340996, -0.3707943260669708, -0.6064179539680481, -0.1958680897951126, 0.5122740268707275, -0.0679129809141159, 0.1148957610130...
to use the same IDE (Eclipse), so that they can help eachother with their environments. **Project Management:** We are using GForge to manage our projects. Sourceforge is slightly better, but GForge is much cheaper and has a different licensing fee model. GForge incorporates CVS, SVN, Document storage, Issue trackers ...
[ 0.5306374430656433, 0.05061425641179085, 0.37512528896331787, 0.089727982878685, -0.20555588603019714, -0.27124613523483276, -0.07317589223384857, 0.017665177583694458, -0.3589087426662445, -0.6024328470230103, -0.3210979998111725, 0.5225676894187927, -0.1749023050069809, 0.017260028049349...
and sourcecode, is running on a VMWare EX server. Backups are done daily on VM level and we make VM snapshots if we feel that we need more frequent restore points for some reason. **Reviving projects:** This is very common in our business. Every project has all it's libraries and build requirements in CVS. The project...
[ 0.6974329948425293, 0.23173017799854279, -0.12367583066225052, 0.2528170645236969, 0.25707006454467773, -0.26416993141174316, 0.11868012696504593, 0.271047979593277, -0.18663623929023743, -0.6669009327888489, -0.25996795296669006, 0.6827926635742188, 0.17557010054588318, 0.0094653097912669...
don't have to spend days tweaking their settings. Nearly all projects are built using Maven, which also makes life easy for our developers. Ususally reviving a projects only takes a few steps: * Download eclipse * Connect to CVS over SSH (extssh is built into Eclipse) * Check out the project (default "Check Out" opti...
[ 0.5835692286491394, -0.04104304686188698, 0.29501014947891235, -0.010356987826526165, -0.21826796233654022, -0.19428159296512604, 0.42513149976730347, -0.14069950580596924, -0.05351993814110756, -0.7831737399101257, -0.2962110936641693, 0.6829919219017029, 0.16959252953529358, -0.093549929...
and when there are failures the team automatically gets an email. Usually we use one build server per project, and it is a simple luntbuid server (Linux, Tomcat, Luntbuild). Both the buildserver and sometimes even the developer machines are VM's. This makes reviving a project really easy. Get the VM from the fileserve...
[ 0.5556309223175049, 0.12103410065174103, 0.11648639291524887, 0.14561742544174194, 0.18523280322551727, -0.024740640074014664, 0.30017802119255066, 0.0365438275039196, -0.11302749067544937, -0.6752093434333801, -0.24707041680812836, 0.6973761320114136, 0.19960163533687592, 0.17609600722789...
software, and it figures out what it needs to do to the database itself. This really comes in handy because the buildserver can just start the software. No special steps needed. Our customers are also happy, they never need to worry about their database, or upgrade scripts. The whole project lifecycle is managed, docu...
[ 0.518720805644989, -0.00485331192612648, 0.2739543616771698, 0.22468478977680206, 0.2011987417936325, -0.32128578424453735, -0.06311105191707611, 0.13601860404014587, -0.2699807286262512, -0.5419191122055054, -0.3049677610397339, 0.808671236038208, 0.02472282387316227, -0.02089608833193779...
lost. It saves time. Particularly when a customer comes back to you after 2 or 3 years for modifications on old software (yes, that happens). All the stuff we use is open source (you can even use an open source fork of GForge). It's not in the tools, it's how you use them.
[ 0.6287021040916443, 0.18953098356723785, 0.18413983285427094, 0.555755615234375, 0.5123805999755859, -0.19699881970882416, -0.05508500710129738, 0.4985254406929016, -0.1259806603193283, -0.2502547800540924, -0.018317269161343575, 0.544817328453064, 0.11747851222753525, 0.464705228805542, ...
Originally I though I'll just take a screenshot of my app on the iPhone then tweak it in Photoshop. The images should be 480 x 320 according to [Apple doc](http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/chapter_3_section_4.html#//apple_ref/doc/...
[ 0.316667377948761, 0.0664568543434143, 0.5769805312156677, -0.04834432154893875, -0.1593652218580246, 0.5667069554328918, -0.03518693149089813, -0.4858550727367401, -0.2538771331310272, -0.4995880424976349, 0.2040296345949173, 0.45188072323799133, -0.0049913180992007256, -0.249935403466224...
create your Default.png? You can leave the notification area in the screenshot. The iPhone will draw the real notification bar over it. **iOS 7 update**: the [iOS 7 Transition Guide](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/Scoping.html#//apple_ref/doc/uid/TP40013...
[ 0.27060869336128235, -0.23886127769947052, 0.6197774410247803, -0.031982507556676865, 0.32007449865341187, 0.04609344154596329, 0.04289981722831726, 0.21014180779457092, -0.3422888517379761, -0.5935946106910706, -0.6079651117324829, 0.5951889753341675, -0.35221850872039795, -0.414610534906...
Wonder what the difference between: ``` static PROCESSWALK pProcess32First=(PROCESSWALK)GetProcAddress(hKernel,"Process32First"); ... pProcess32First(...); ``` what is hKernel? Look in [here](http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212%28v=vs.85%29.aspx). You can replace with `GetModuleHandle()`...
[ 0.10799715667963028, 0.0789773166179657, 0.5535210371017456, -0.29941824078559875, 0.00003750316318473779, 0.052775200456380844, 0.19444085657596588, -0.1183512881398201, -0.37538251280784607, -0.6674210429191589, -0.15332838892936707, 0.6417008638381958, -0.17418208718299866, 0.1672970056...
wrong version) your app will simply fail to load. It really only makes a difference if you want to use a function that isn't in all versions of a given dll.
[ 0.2797129154205322, -0.09754449129104614, 0.48455461859703064, 0.2543058693408966, 0.12257087230682373, 0.10243570804595947, 0.673821210861206, 0.2999432384967804, -0.09464645385742188, -0.5574089884757996, -0.3367944657802582, 0.5349449515342712, -0.5809593796730042, 0.17752674221992493, ...
In .NET remoting what is the difference between RemotingConfiguration.RegisterWellKnownServiceType and RemotingServices.Marshal? What I want to do is create an object in a Windows Service, then put it in as a remoting object and have the Windows Service and the Client both act on the remoting object. I thought the be...
[ 0.2341630458831787, 0.2243947982788086, 0.3874637186527252, -0.12096359580755234, -0.08144436031579971, -0.15230849385261536, 0.2674351632595062, -0.25788745284080505, -0.19032658636569977, -0.5651386380195618, -0.02476726658642292, 0.6141429543495178, -0.4742351770401001, 0.13466779887676...
is not created until a client ask for it, and the same object is used for any other clients. ``` RemotingServices.Marshal(foo); ``` Marshal will register an object that has been created by the server, in this case a windows service. Then server will then have reference to the object and the clients will consume the ...
[ 0.43122854828834534, 0.46530023217201233, 0.3804803490638733, 0.09366943687200546, 0.19478106498718262, -0.14521066844463348, 0.2018316090106964, -0.07850836962461472, -0.3912334740161896, -0.5069523453712463, -0.08264141529798508, 0.43725821375846863, -0.3335616886615753, 0.38907986879348...
however I could not get the service to have a reference to the same object. The solution is overriding the remoting object in this case FooRemoting. If I overrode the InitializeLifetimeService and returned null, the client would never lose connection, and the service will, keep the connection. ``` public override obj...
[ 0.12273847311735153, 0.13888271152973175, 0.5173081755638123, -0.2275516539812088, 0.326692134141922, -0.18792223930358887, 0.537121593952179, -0.2836824357509613, -0.006924964487552643, -0.45568543672561646, -0.2655794620513916, 0.5874577164649963, -0.4981590509414673, 0.4389727711677551,...
I have a Java method in which I'm summing a set of numbers. However, I want any negatives numbers to be treated as positives. So (1)+(2)+(1)+(-1) should equal 5. I'm sure there is very easy way of doing this - I just don't know how. Just call [Math.abs](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#ab...
[ 0.18556196987628937, 0.11740697920322418, 0.2182128131389618, -0.35123583674430847, -0.19435299932956696, 0.10286899656057358, 0.2674330174922943, -0.43124842643737793, -0.2829333245754242, -0.2622457444667816, 0.08380819857120514, 0.655215859413147, -0.3493635654449463, -0.083595871925354...
I am using master pages and am having trouble setting page titles from the @ Page directive. All of my classes inherit from a class *myPage* which inherits from the ASP.NET *System.Web.UI.Page* class. **Please Note:** I have **runat="server"** set in my master page's head tag. Here's what my @ Page directives look lik...
[ 0.2598913908004761, 0.27715376019477844, 0.5524857640266418, -0.027709797024726868, -0.13782592117786407, -0.2362407147884369, 0.4054657220840454, -0.39063337445259094, -0.05435967072844505, -0.7883287668228149, -0.12922637164592743, 0.31497132778167725, -0.05763036385178566, 0.33296868205...
file, **MainMaster.master**, looks like: ``` <%@ Master Language="VB" CodeFile="MainMaster.master.vb" Inherits="MainMaster" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>untitled</title> </h...
[ 0.3964847922325134, -0.05542812868952751, 0.21639439463615417, 0.1226128488779068, -0.03251924365758896, -0.1730414628982544, 0.3636416494846344, -0.43823590874671936, -0.30488061904907227, -0.5524394512176514, -0.13617631793022156, 0.12351470440626144, 0.10602817684412003, 0.3567051589488...
fine. Why would my pages being children of *myPage* instead of *System.Web.UI.Page* prevent the title from being set correctly in the @ Page directive? I realize that I could just set the page titles programmatically through the *Page\_Load* methods in every page, but I'd rather do it in the @ Page directives in the ....
[ 0.4137919247150421, 0.307738333940506, 0.4417461156845093, 0.31780946254730225, -0.1189001277089119, -0.3681204617023468, 0.49720120429992676, -0.08378066122531891, -0.2509463131427765, -0.7259252071380615, -0.01751161925494671, 0.5672907829284668, 0.19711147248744965, 0.45433416962623596,...
the changes on to *Page.Title* as it should have been. A one line change fixed my problem :)
[ 0.032240692526102066, -0.09146248549222946, 0.5706301331520081, 0.05446426942944527, -0.0006886248011142015, 0.10417298227548599, 0.3958909213542938, 0.2962751090526581, -0.44084522128105164, -0.6176598072052002, -0.20441877841949463, 0.1914328932762146, -0.2602393329143524, 0.343959510326...
A client is running my company's program and it is halting before it gets anywhere. They sent this information from the Windows Event Log: ``` faulting module program.exe, version 1.2.3.4, fault address 0x00054321. ``` We don't have much else to go on so as a last ditch effort I've been trying to see if I can find w...
[ 0.23829995095729828, 0.48135051131248474, 0.30864137411117554, -0.2297496497631073, 0.15323686599731445, 0.16638372838497162, 0.5759852528572083, 0.09078525006771088, -0.39655667543411255, -0.32678690552711487, -0.08681941777467728, 0.7106901407241821, -0.37524545192718506, 0.2352758646011...
00054322 ??? 00054323 ??? 00054324 ??? 00054325 ??? 00054326 ??? 00054327 ??? 00054328
[ -0.8020429611206055, -0.06711050868034363, -0.4628269672393799, -0.18903489410877228, 0.039620768278837204, 0.7582361102104187, 0.60219806432724, -0.32216572761535645, -0.5028426051139832, -0.12665271759033203, -0.2527417540550232, 0.28089019656181335, -0.6307770609855652, 0.47653469443321...
??? 00054329 ??? 0005432A ??? ``` Would this be because Visual Studio only disassembles part of the EXE near the pause position or something? It's hard for me to look through how much is actually disassembled because the scrollbar doesn't work fully. (I can't grab and move ...
[ 0.3529336750507355, 0.4629049301147461, 0.19215896725654602, 0.13553421199321747, 0.13884085416793823, -0.024070704355835915, 0.32322779297828674, 0.13354113698005676, 0.0014378869673237205, -0.6038879156112671, -0.12171053141355515, 0.6468045115470886, -0.025890884920954704, -0.1138351708...
any insight you may have! The fault address could also be caused from a stack corruption problem, ie. the return address could be compromised and jumped back to the wrong address @ 0x54321. Also, depending on the tecnology used (Java, .NET) the code could change it's position between runs. Visual studio makes a disass...
[ 0.17056319117546082, -0.1017988920211792, -0.10186772793531418, 0.15873442590236664, -0.020327046513557434, -0.037609949707984924, 0.21390104293823242, 0.006201926153153181, -0.3570612072944641, -0.4927426278591156, -0.07582921534776688, 0.5462440252304077, -0.03273636847734451, 0.05276318...
I want to make a [C#](http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29) program that can be run as a CLI or GUI application depending on what flags are passed into it. Can this be done? I have found these related questions, but they don't exactly cover my situation: * [How to write to the console in a ...
[ -0.061230964958667755, 0.23745101690292358, 0.24712862074375153, 0.15490902960300446, 0.19432379305362701, 0.057408690452575684, 0.06495797634124756, -0.16080805659294128, 0.16148412227630615, -0.45193514227867126, -0.33573880791664124, 0.618614673614502, 0.08337321132421494, -0.1022011637...
Once the program has started running, it's too late to go back and request the other mode. [Cade's answer](https://stackoverflow.com/questions/493536/can-one-executable-be-both-a-console-and-gui-app/493556#493556) points to [an article about running a .Net WinForms application with a console](http://www.csharp411.com/...
[ -0.06127860024571419, -0.15032514929771423, 0.6342940330505371, -0.047521159052848816, 0.20454244315624237, -0.1857539415359497, 0.08946989476680756, -0.1546991914510727, 0.2801923155784607, -0.4890654981136322, -0.5012689232826233, 0.5383663177490234, -0.2207830548286438, 0.19945557415485...
process, and the parent process is not aware that it should wait for the child to finish running before using the console for other things. Chen's article points to [an article by Junfeng Zhang that explains a couple of other techniques](http://blogs.msdn.com/junfeng/archive/2004/02/06/68531.aspx). The first is what ...
[ -0.08497880399227142, -0.32251131534576416, 0.1461840718984604, 0.14869412779808044, 0.05359852686524391, 0.23740717768669128, 0.06365633010864258, -0.34099945425987244, -0.25579214096069336, -0.6544021964073181, -0.10422814637422562, 0.5897340178489685, -0.003160006832331419, 0.2739346921...
*exe* files when you type a command without the file extension. There's a simpler variation on this that the Windows Script Host does. It provides two completely separate binaries, *wscript.exe* and *cscript.exe*. Likewise, Java provides *java.exe* for console programs and *javaw.exe* for non-console programs. Junfen...
[ 0.20033693313598633, -0.17795927822589874, 0.05137781426310539, -0.3139992654323578, -0.24325203895568848, -0.06511920690536499, -0.15397818386554718, -0.1530253142118454, 0.16610503196716309, -0.791543185710907, -0.04554889351129532, 0.18004055321216583, -0.31828293204307556, -0.094634309...
no console-mode command-line parameters, it re-launches itself. It's not enough to simply call `FreeConsole` to make the first instance cease to be a console program. That's because the process that started the program, *cmd.exe*, "knows" that it started a console-mode program and is waiting for the program to stop ru...
[ 0.030552832409739494, -0.0650336816906929, 0.5393717885017395, 0.10547090321779251, 0.2626644968986511, -0.3525066375732422, 0.04846138879656792, 0.2577185034751892, -0.2749841511249542, -0.4684489071369171, -0.4882587790489197, 0.5742964744567871, -0.2339407056570053, 0.4679984748363495, ...
that the second instance will not be attached to the parent console. After that, the first instance can terminate and allow the command prompt to resume processing commands. The side effect of this technique is that when you start the program from a GUI interface, there will still be a console. It will flash on the sc...
[ 0.22884398698806763, -0.1257815957069397, 0.3633147180080414, -0.04609007015824318, 0.21546807885169983, -0.11170513927936554, 0.19448526203632355, 0.29396623373031616, -0.030247339978814125, -0.5816929340362549, -0.2806689143180847, 0.6060583591461182, -0.17927053570747375, 0.323017746210...
be no need to modify anything afterward. The bottom line, then, is that **you can either have two binaries, or you can have a momentary flicker of a console window**. Once you decide which is the lesser evil, you have your choice of implementations. `*` I say *non-console* instead of *GUI* because otherwise it's a fa...
[ 0.3863738477230072, 0.040248557925224304, 0.10876481235027313, 0.10117798298597336, -0.007393748965114355, -0.1009010374546051, 0.3936086893081665, 0.20898853242397308, 0.13699626922607422, -1.02976393699646, -0.22071506083011627, 0.7911660671234131, -0.39007410407066345, 0.008671530522406...
This has happened repeatedly on various machines in VS2008 and Visual C# 2008. I create an XBAP appliation. I click the green arrow and it works. I click Build/Publish and publish it to either a website or folder, it works. I make some changes, publish again, and I just get a white screen. Both browsers, can restar...
[ -0.03417385742068291, -0.13381770253181458, 0.3459183871746063, -0.12897297739982605, -0.1590254306793213, 0.006767221726477146, 0.2047284096479416, -0.025167424231767654, -0.4526439905166626, -0.5267010927200317, -0.02684171311557293, 0.5923287272453308, -0.4752138555049896, -0.1077131256...
character. Note that this is greedy by default, so if you have the following string: ``` <branch id="attribute"> <leaf id="attribute"/> <leaf id="attribute"/> <leaf id="attribute"/> </branch> <branch id="attribute"> <leaf id="attribute"/> <leaf id="attribute"/> <leaf id="attribute"/> </branch> ``` then t...
[ -0.3245413899421692, -0.3220117390155792, 0.368704617023468, 0.16958880424499512, -0.14302776753902435, 0.09225301444530487, 0.08480717986822128, -0.30036357045173645, -0.009240883402526379, -0.5554993748664856, 0.054689787328243256, 0.4972078502178192, -0.04987361654639244, -0.35672321915...
I am developing a form in .NET Compact Framework, which hosts a variable number of controls. Every control should have the same width as the form. When there are only a few controls, no vertical scrollbar appears. When there are more controls than they can fit in one form, a vertical scrollbar appears. The width of the...
[ 0.2875475585460663, -0.10116477310657501, 0.7185212969779968, 0.06269494444131851, 0.12223215401172638, -0.19532854855060577, -0.018135756254196167, -0.24530337750911713, 0.0051252529956400394, -1.0517363548278809, -0.005812251940369606, 0.47262704372406006, -0.12143178284168243, 0.0447890...
one point, both a vertical and horizontal scrollbar appear, and you want only the vertical scrollbar? Doesn't setting the Anchor of each control to "Top|Left|Right" solve this problem automatically?
[ -0.1450854241847992, -0.1623915582895279, 0.5161446332931519, 0.26740312576293945, 0.2143774926662445, 0.08936711400747299, -0.256017804145813, -0.19023610651493073, -0.2142539769411087, -0.2956007122993469, 0.08921078592538834, 0.44346752762794495, -0.3679525852203369, 0.06727512925863266...
I am working on a dataManagement project that periodically deletes files in a specific folder. The solution has three projects of which, one is the application and the other two are static libraries. Now I want to add one more project which is a static library used for logging. The logging static library project has a ...
[ 0.45657217502593994, 0.09475941210985184, 0.30986014008522034, 0.13081945478916168, 0.018569497391581535, 0.0566147118806839, 0.15690374374389648, -0.10753975063562393, -0.5358624458312988, -0.3527326285839081, 0.06983818858861923, 0.2590574622154236, -0.4021238684654236, 0.416913092136383...
bix in the project dependencies. Can anyone please help me? It needs an additional include file path to reference the header file directory... Project->Properties->Config Properties->C/C++->Additional Include Directories it doesn't auto pick up the header file paths, it just knows how to link to the project.... Its c...
[ 0.2618052661418915, -0.11780127137899399, 0.38406556844711304, 0.21322540938854218, -0.1618744134902954, -0.2918120324611664, 0.04891693964600563, -0.020435774698853493, -0.28686946630477905, -0.5275644063949585, 0.15744468569755554, 0.32227498292922974, -0.5335274338722229, 0.157967716455...
I've written a plugin for a game that connects to a PHP page and sends it information from the game. The PHP page takes this information, connects to a SQL Server 2005 instance, then inserts the information given into a variety of tables. I am using Apache (WampServer) to host the PHP page and SQL Server 2005 Express ...
[ -0.04729139432311058, 0.31512704491615295, 0.27092310786247253, -0.12972505390644073, -0.15660829842090607, -0.11641448736190796, 0.03196936473250389, -0.0667768269777298, -0.009993527084589005, -0.5496112108230591, 0.27241358160972595, 0.46856585144996643, -0.26538223028182983, 0.17068691...
page to either add data to the database or query information from the database. Since 'clients' are not directly hitting the database, would SQL Server 2005 require a paid license of some type for me to 'legally' use it in this way? What is the standard definition of 'production server?' Note: I am not making any mon...
[ 0.4608166515827179, 0.30908823013305664, 0.47390156984329224, -0.009224887005984783, -0.3560318648815155, -0.28675490617752075, 0.11273601651191711, 0.1553826779127121, -0.14835065603256226, -0.13359086215496063, 0.15989840030670166, 0.497911274433136, -0.32435885071754456, 0.1936817318201...
deployment, you just have to accept the limitations * Single CPU * 1GB RAM Max Usage * 4GB Database size limit (not including logs) Based on your description I think that the SQLExpress would work fine for your application. Here's a reference from MS <http://www.microsoft.com/Sqlserver/2005/en/us/compare-features.as...
[ 0.07428938150405884, 0.030453413724899292, 0.4149422347545624, -0.035895779728889465, 0.148227259516716, 0.016192179173231125, 0.2123103141784668, -0.12066352367401123, -0.4181230366230011, -0.8028818368911743, 0.03684810921549797, 0.45728716254234314, 0.05331284925341606, -0.1202086880803...
How would you go about calling several methods in the data access layer from one method in the business logic layer so that all of the SQL commands lived in one SQL transaction? Each one of the DAL methods may be called individually from other places in the BLL, so there is no guarantee that the data layer methods ar...
[ 0.5264892578125, -0.3033566176891327, 0.20577718317508698, 0.31392019987106323, -0.03397170826792717, -0.036450453102588654, -0.4792628586292267, -0.4150916337966919, -0.45360100269317627, -0.05980778858065605, 0.17162570357322693, 0.4038042426109314, -0.15570178627967834, 0.12968352437019...
of each of the previous calls. We only want to commit (from the business layer) at the very end of the entire process. well, firstly, you'll have to adhere to an atomic Unit of Work that you specify as a single method in your BLL. This would (for example) create the customer, the order and the order items. you'd then w...
[ 0.41164135932922363, -0.12498674541711807, 0.2866801917552948, -0.13409626483917236, 0.07594023644924164, 0.18220393359661102, -0.19945861399173737, -0.16221749782562256, -0.3804756700992584, -0.5897193551063538, -0.047002702951431274, 0.7393006682395935, -0.6185045838356018, -0.0027429587...
throw new ArgumentNullException("artist"); int artistid = 0; using (TransactionScope scope = new TransactionScope()) { // insert the master Artist /* we plug the artistid variable into any child instance where ArtistID is required */
[ 0.07922856509685516, -0.48706820607185364, 0.2505859434604645, -0.171453058719635, 0.23662859201431274, 0.2713850736618042, 0.17250221967697144, -0.3465048372745514, 0.09468863159418106, -0.7781708240509033, -0.11296585947275162, 0.6366822123527527, -0.3822847902774811, 0.01852143555879593...
artistid = SiteProvider.Artist.InsertArtist(new ArtistDetails( 0, artist.BandName, artist.DateAdded)); // insert the child ArtistArtistGenre artist.ArtistArtistGenres.ForEach(item => { var artistartistgenre = new ArtistArtistGenreDetails( 0,
[ -0.14809493720531464, -0.10613815486431122, 0.5574578046798706, 0.05149752274155617, 0.2779774069786072, 0.6765421628952026, 0.27326592803001404, -0.06968358904123306, -0.017465369775891304, -0.9794055223464966, -0.23988500237464905, 0.31345537304878235, 0.12876181304454803, 0.173665165901...
artistid, item.ArtistGenreID); SiteProvider.Artist.InsertArtistArtistGenre(artistartistgenre); }); // insert the child ArtistLink artist.ArtistLinks.ForEach(item => { var artistlink = new ArtistLinkDetails(
[ -0.220832958817482, -0.33636003732681274, 0.704501748085022, -0.14995166659355164, 0.30979347229003906, 0.5301119685173035, 0.3041198253631592, -0.14847306907176971, -0.10700002312660217, -0.9880825281143188, -0.3491877317428589, 0.30469316244125366, -0.05069097876548767, 0.342686384916305...
0, artistid, item.LinkURL); SiteProvider.Artist.InsertArtistLink(artistlink); }); // insert the child ArtistProfile artist.ArtistProfiles.ForEach(item => { var artistprofile = new ArtistProfileDetails(
[ -0.29209038615226746, -0.37266239523887634, 0.6002662777900696, -0.27703195810317993, 0.33296045660972595, 0.5962183475494385, 0.39028042554855347, -0.20294159650802612, -0.0655919536948204, -0.8640716671943665, -0.45316439867019653, 0.33249831199645996, -0.13936229050159454, 0.17598682641...
0, artistid, item.Profile); SiteProvider.Artist.InsertArtistProfile(artistprofile); }); // insert the child FestivalArtist artist.FestivalArtists.ForEach(item => {
[ -0.07232357561588287, -0.1974385529756546, 0.4283876121044159, -0.08182872831821442, 0.18512946367263794, 0.5312050580978394, 0.10175473988056183, 0.18560890853405, 0.010763509199023247, -0.7825586199760437, -0.30373167991638184, 0.28847265243530273, 0.20555049180984497, 0.2940455675125122...
var festivalartist = new FestivalArtistDetails( 0, item.FestivalID, artistid, item.AvailableFromDate, item.AvailableToDate,
[ -0.017225246876478195, -0.3580285906791687, 0.8503032326698303, 0.022019950672984123, -0.18590772151947021, -0.048657920211553574, 0.22307583689689636, -0.08900385349988937, -0.4580945074558258, -0.6489458680152893, -0.43583038449287415, 0.21394601464271545, 0.008677229285240173, 0.4149983...
item.DateAdded); SiteProvider.Festival.InsertFestivalArtist(festivalartist); }); BizObject.PurgeCacheItems(String.Format(ARTISTARTISTGENRE_ALL_KEY, String.Empty, String.Empty)); BizObject.PurgeCacheItems(String.Format(ARTISTLINK_ALL_KEY, String.Empty, String.Empty)); BizObjec...
[ -0.17223328351974487, -0.18612703680992126, 0.3977230191230774, -0.1556192934513092, 0.028492029756307602, -0.033672820776700974, 0.43598681688308716, 0.09816714376211166, -0.6140229105949402, -0.41536250710487366, -0.5155581831932068, 0.2779027819633484, -0.4638625979423523, 0.38278305530...
scope.Complete(); } return artistid; } ``` hopefully, you'll get the gist. basically, it's an all succeed or fail job, irrespective of any disparate databases (i.e. in the above example, artist and artistartistgenre could be hosted in two separate db stores but TransactionScope would care less about that, it ...
[ 0.5092952847480774, -0.41772621870040894, 0.5375561118125916, -0.15997500717639923, -0.010044442489743233, -0.35163578391075134, 0.7101974487304688, -0.34705427289009094, -0.1391301453113556, -0.9876194596290588, -0.3702510595321655, 0.8661843538284302, -0.36872661113739014, -0.24418450891...
to complete), however, subsequent calls are *almost* instantaneous (i.e. typically 250-750 ms). the trade off between a simple point of contact transaction vs the (unwieldy) alternatives mitigates (for me and my clients) that initial 'loading' latency. just wanted to demonstrate that ease doesn't come without compromi...
[ 0.01797442138195038, -0.09053735435009003, 0.47063571214675903, 0.12458855658769608, 0.36287662386894226, 0.02311612293124199, 0.5007877349853516, -0.30095815658569336, -0.16732266545295715, -0.7219488620758057, -0.34007057547569275, 0.6329591870307922, 0.12540847063064575, -0.246102541685...
I often use the website www.cplusplus.com as a reference when writing C code. I was reading the example cited on the page for [fread](http://www.cplusplus.com/reference/clibrary/cstdio/fread.html) and had a question. As an example they post: ``` /* fread example: read a complete file */ #include <stdio.h> #include <...
[ 0.10261903703212738, 0.13989165425300598, 0.5942137837409973, -0.40084272623062134, 0.29524528980255127, 0.058172933757305145, 0.18107746541500092, -0.3858298361301422, -0.35542649030685425, -0.45625731348991394, -0.39563775062561035, 0.32842496037483215, -0.21668092906475067, 0.2068228125...
the whole file: buffer = (char*) malloc (sizeof(char)*lSize); if (buffer == NULL) {fputs ("Memory error",stderr); exit (2);} // copy the file into the buffer: result = fread (buffer,1,lSize,pFile); if (result != lSize) {fputs ("Reading error",stderr); exit (3);} /* the whole file is now loaded in the memo...
[ 0.2882676124572754, -0.00921434536576271, 0.541752815246582, -0.3170362710952759, 0.24535231292247772, 0.11998771876096725, 0.32669803500175476, -0.33668211102485657, -0.35194817185401917, -0.42216670513153076, -0.4280664622783661, 0.5389096736907959, -0.4518771469593048, 0.186690270900726...
are of a very high quality. Perhaps I am not understanding correctly? It wouldn't be a memory leak *in this example*, because terminating the program (by calling `exit()`) frees all memory associated with it. However, it would be a memory leak if you used this piece of code as a subroutine and called something like `r...
[ -0.034434154629707336, 0.19516050815582275, -0.14903412759304047, 0.06641454994678497, 0.3177086114883423, -0.30642738938331604, 0.6283385157585144, 0.24871936440467834, -0.08730462938547134, -0.3196919560432434, -0.5568606853485107, 0.3728538155555725, -0.2786482274532318, 0.4961266517639...
I have a List<> of objects in C# and I need a way to return those objects that are considered duplicates within the list. I do not need the Distinct resultset, I need a list of those items that I will be deleting from my repository. For the sake of this example, lets say I have a list of "Car" types and I need to know...
[ 0.21695266664028168, 0.38498762249946594, 0.18095345795154572, 0.30330780148506165, 0.1631711721420288, 0.6281638741493225, -0.07041562348604202, 0.006712855771183968, -0.14475350081920624, -0.4168189465999603, -0.05853128433227539, 0.5574285984039307, -0.01952400989830494, 0.5299064517021...
example I need the result (IEnumerable<>, List<>, or whatever) to contain Car4 and Car5 because I want to delete these from my repository or db so that I only have one car per color in my repository. Any help would be appreciated. I inadvertently coded this yesterday, when I was trying to write a "distinct by a project...
[ 0.21942149102687836, 0.2255774736404419, -0.08303500711917877, 0.12770463526248932, 0.23373006284236908, 0.5020962953567505, -0.026092378422617912, -0.03058178350329399, -0.39047539234161377, -0.6503798365592957, 0.03265921398997307, 0.2645455002784729, -0.26109400391578674, 0.146136552095...
{ // Yield it if the key hasn't actually been added - i.e. it // was already in the set if (!seenKeys.Add(keySelector(element))) { yield return element; } } } ``` You'd then call it with: ``` var duplicates = cars.DuplicatesBy(car => car.Color); ```
[ 0.265430748462677, 0.11440157145261765, 0.03006257303059101, 0.36681196093559265, 0.5042307376861572, 0.4355148673057556, -0.1602563112974167, -0.021971192210912704, -0.7120623588562012, -0.24630683660507202, 0.038598574697971344, 0.4933384358882904, -0.15177500247955322, 0.412405252456665...
How do I get an NSString from console input, and then try to cast it into an int? The average lifetime of software I write at the moment is probably a few days. (I write a lot of scripts, so I might be an aberration. ;-) But the core system I work with is probably 15 to 20 years old now. The underlying OS is about 30 y...
[ 0.21713685989379883, 0.2240523248910904, 0.4640463888645172, 0.05765877664089203, 0.3874092400074005, -0.019620809704065323, 0.2084643691778183, 0.3370680510997772, -0.1403280794620514, -1.0688812732696533, 0.19206583499908447, 0.4766388237476349, 0.5227351784706116, 0.22484523057937622, ...