text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
AND i.ImageGUID IS NULL) OR (d.ImageGUID <> i.ImageGUID) END ``` --- Trigger to log Delete --------------------- ``` CREATE TRIGGER LogDelete_Nodes ON dbo.Nodes FOR DELETE AS /* Load the saved context info UserGUID */ DECLARE @SavedUserGUID uniqueidentifier SELECT @SavedUserGUID = CAST(context_info as uniquei...
[ 0.08827529102563858, 0.06921545416116714, 0.5904582738876343, -0.095977284014225, 0.06281337887048721, -0.010521654970943928, 0.1449473798274994, -0.7090730667114258, -0.44641733169555664, -0.7433807253837585, -0.009774711914360523, 0.6470216512680054, -0.36642253398895264, 0.0375189073383...
Username, HostName, AppName, UserGUID, TableName, FieldName, TagGUID, Tag, OldValue,NewValue) SELECT getdate(), --ChangeDate d.NodeGUID, --RowGUID 'DELETED', --ChangeType
[ -0.32271134853363037, -0.29316747188568115, 0.6036368608474731, -0.10169079899787903, 0.12002969533205032, 0.3089229464530945, 0.22353003919124603, 0.1171361431479454, -0.01951819844543934, -0.9634819030761719, -0.27998819947242737, 0.284625768661499, -0.4423552453517914, 0.414732247591018...
USER_NAME(), HOST_NAME(), APP_NAME(), @SavedUserGUID, --UserGUID 'Nodes', --TableName '', --FieldName d.ParentNodeGUID, --TagGUID d.Caption, --Tag null, --OldValue null --NewValue FROM Deleted d ``` --- And in order to know which user in the software did t...
[ -0.4155690371990204, 0.24941542744636536, 0.5700432062149048, 0.06686215847730637, 0.39451363682746887, 0.109139584004879, 0.17182379961013794, 0.29152363538742065, -0.35071757435798645, -0.7301693558692932, -0.29443466663360596, 0.5447704792022705, -0.2719617486000061, 0.5673288702964783,...
procedure: ``` CREATE PROCEDURE dbo.SaveContextUserGUID @UserGUID uniqueidentifier AS /* Saves the given UserGUID as the session's "Context Information" */ IF @UserGUID IS NULL BEGIN PRINT 'Emptying CONTEXT_INFO because of null @UserGUID' DECLARE @BinVar varbinary(128) SET @BinVar = CAST( REPLICATE( 0x00,...
[ -0.039476580917835236, 0.07924921065568924, 0.4751420319080353, -0.33007922768592834, -0.18545664846897125, 0.15884937345981598, 0.1495397537946701, -0.7979551553726196, -0.2240077406167984, -0.5873916745185852, 0.010974043980240822, 0.5071850419044495, -0.33078429102897644, 0.263244777917...
lines - so formatting sucks * We use a table of users, not integrated security * This code is provided as a convience - no critisism of our design selection allowed. Purists might insist that all logging code should be done in the business layer - they can come here and write/maintain it for us. * blobs cannot be logge...
[ 0.20043453574180603, -0.07474050670862198, 0.772672712802887, 0.09974813461303711, -0.0620475597679615, -0.12650400400161743, 0.10376482456922531, 0.061747416853904724, -0.31910640001296997, -0.4056107699871063, -0.04713711887598038, 0.18858109414577484, -0.3417770266532898, 0.059728458523...
to identify the row (e.g. if a customer was deleted, the tag will show "General Motors North America" in the audit log table. * TagGUID is used to point to the row's "parent". For example logging **InvoiceLineItems** points back to the **InvoiceHeader**. This way anyone searching for audit log entries related for a spe...
[ 0.237564355134964, 0.25472724437713623, 0.35805779695510864, -0.04597378522157669, 0.1457492709159851, 0.4679347574710846, -0.1304505467414856, 0.19675219058990479, -0.02207173779606819, -0.13313989341259003, -0.17067520320415497, -0.06608033925294876, 0.1394791454076767, 1.026310682296753...
Management ``` **Final note**: Feel free to not do what we do. This is great for us, but everyone else is free to not use it.
[ 0.3931575417518616, 0.10034248232841492, 0.030284451320767403, 0.20384341478347778, 0.23338524997234344, -0.7023114562034607, 0.3265562653541565, 0.02177402935922146, -0.09015120565891266, -0.41814932227134705, -0.11469005793333054, 0.7390221953392029, -0.07516468316316605, -0.163938432931...
There is `ConnectionManager` which waits for incoming connections. For each incoming connection it creates a `Connection` instance which handles the inbound and outbound traffic on this connection. Each `Connection` has a `Watchdog` which handles "bad connection" conditions and calls registered "Listerners". One "Liste...
[ -0.12252429872751236, -0.04105518013238907, 0.80107182264328, 0.0949227511882782, -0.035713259130716324, 0.03663055971264839, -0.0685504823923111, -0.07486432045698166, -0.5490849614143372, -0.4267731010913849, -0.20226551592350006, 0.7175067663192749, -0.4085372984409332, 0.40856772661209...
know yet how to do that without too much pain. The `Watchdog` doesn't know about the `ConnectionManager`. It is fairly generic. Also the Win32-Thread-API doesn't have something like "join", so I might need to roll my own with `GetExitCodeThread()` and `STILL_ACTIVE`... Thanks, guys. If the watchdog is running in a dif...
[ 0.6860193610191345, -0.06223350018262863, 0.6172351241111755, 0.14137017726898193, 0.2676087021827698, -0.4157189130783081, 0.39785197377204895, 0.07264527678489685, 0.0310991108417511, -0.536989152431488, 0.37605020403862, 0.4471586346626282, -0.19889648258686066, 0.4367305636405945, -0...
also signal the watchdog thread, or assert() something about the watchdog thread being ready to exit).
[ 0.33511868119239807, -0.1887526959180832, 0.32432520389556885, -0.07286017388105392, -0.21572484076023102, -0.18947111070156097, 0.670930027961731, -0.016992097720503807, -0.12200410664081573, -0.40347862243652344, -0.4102083444595337, 0.14201480150222778, -0.34100231528282166, 0.051103789...
JBoss 5 has just come out of beta after 2 years, giving us a Java EE 5 compliant container several months before the release of Java EE 6 (JavaOne in May or thereabouts 2009). We've had GlassFish v2 for awhile and now have GlassFish v3 Prelude. Is there any reason to JBoss 5 over these? I've had the feeling for the la...
[ 0.3003017008304596, 0.04643364995718002, 0.39483216404914856, -0.08392088115215302, -0.17245718836784363, -0.3171710669994354, 0.4666166603565216, 0.21824440360069275, -0.3723113238811493, -0.35246866941452026, 0.07827974110841751, 0.3141639530658722, -0.11842063069343567, 0.18623809516429...
the entire app server to run off the new JBoss Microcontainer. Not sure if it was worth the 3+ year effort but the release notes are here: <http://sourceforge.net/project/shownotes.php?release_id=645033&group_id=22866> As with any big rewrite of an app server, I would tread carefully on JBoss 5. If you are programmin...
[ 0.12040966004133224, -0.04701193422079086, 0.6552311182022095, -0.0939500480890274, -0.10552076995372772, 0.08316218852996826, 0.40469276905059814, -0.001056909328326583, -0.31736284494400024, -0.7124991416931152, -0.2389967143535614, 0.6385424137115479, -0.3383833169937134, -0.05330157652...
bugs should be fixed and you should hopefully be able to migrate easily then.
[ 0.3815639317035675, 0.06483668088912964, 0.15735730528831482, 0.4822138249874115, 0.5845844149589539, -0.08717624098062515, 0.20414800941944122, 0.7211266160011292, -0.5594674944877625, -0.9180989265441895, -0.08330697566270828, 0.38377758860588074, -0.5176927447319031, -0.1711155027151107...
Duplicate from : [String output: format or concat in C#?](https://stackoverflow.com/questions/16432/c-string-output-format-or-concat) ===================================================================================================================================== Especially in C# world using String.Format for ever...
[ 0.3356320559978485, 0.34485602378845215, -0.23769941926002502, 0.15063491463661194, 0.16069257259368896, 0.08944282680749893, 0.11621914803981781, 0.04762784019112587, -0.6779825091362, -0.24364183843135834, 0.3407910168170929, 0.2789947986602783, -0.5614898204803467, 0.2567894160747528, ...
input * It's more readable (*however this is personal*) * Better Performance \*\*Sometimes I need to change the style or replacing stuff dynamically then I use String.Format\* If you're ever going to localize your application (and it's often hard to rule that out at the start), then String.Format is to be much preferr...
[ 0.14205899834632874, 0.03241129592061043, 0.30568984150886536, 0.061375826597213745, -0.20535770058631897, -0.3294112980365753, 0.36719563603401184, 0.43495115637779236, -0.13811948895454407, -0.8763255476951599, -0.30833059549331665, 0.6833549737930298, -0.24324887990951538, -0.1191991120...
My homepage (or welcome page) will consist of data from two models (lets call them authors and posts). I am new to rails and not sure what is the best way to accomplish this. Should I create a new controller called welcome which gathers data from the authors and posts and then display them in the welcome index view? O...
[ 0.1412869542837143, -0.03647579997777939, 0.611624538898468, 0.32801195979118347, -0.17947793006896973, -0.20347796380519867, -0.06925935298204422, 0.0534391775727272, -0.08799713850021362, -0.8398327827453613, 0.22821326553821564, 0.23837623000144958, -0.0804024413228035, 0.23730665445327...
rails framework. The question is, is your home page just a landing page or will it be a group of pages? If it's just a landing page, you don't expect your users to hang around there for long except to go elsewhere. If it's a group of pages, or similar to an existing group, you can add an action to the controller it's m...
[ 0.17476150393486023, -0.2924644649028778, 0.22998318076133728, 0.3278132379055023, -0.01188325509428978, -0.18250896036624908, -0.060409966856241226, -0.13110396265983582, -0.44578418135643005, -0.4643297791481018, 0.26344355940818787, 0.27194756269454956, -0.40549200773239136, -0.09225226...
map a default route, use the following in `routes.rb`: ``` # Place at the end of the routing! map.root :controller => 'MyController', :action => :index ``` In my case this would be: ``` map.root :controller => 'static', :action => :index ``` If you wish to, you could create a controller just for this home page. I...
[ -0.4072130024433136, -0.509720504283905, 0.7306951284408569, 0.177425816655159, 0.11419341713190079, -0.23681215941905975, 0.0038249024655669928, 0.16731378436088562, -0.3967268168926239, -1.0003572702407837, 0.007283469662070274, 0.29361778497695923, -0.5919385552406311, 0.175752356648445...
end end ``` Assuming you have your model relationships defined correctly, the template to match it will be very simple. Good luck, hope this helps.
[ 0.3147968053817749, 0.292991042137146, 0.6932480931282043, 0.13064593076705933, 0.2860473692417145, -0.3374521732330322, 0.2110774964094162, 0.004113626666367054, 0.18972177803516388, -0.822555422782898, -0.04445064440369606, 0.42901676893234253, 0.0540868304669857, 0.25635918974876404, ...
In a software-project written in java you often have resources, that are part of the project and should be included on the classpath. For instance some templates or images, that should be accessible through the classpath (getResource). These files should be included into a produced JAR-file. It's clear that these reso...
[ 0.34217074513435364, 0.14533554017543793, -0.15896984934806824, -0.007412235718220472, -0.08304505050182343, -0.12369192391633987, 0.16871827840805054, 0.05036725848913193, -0.26010483503341675, -0.6395431160926819, -0.10433682054281235, 0.4602658152580261, -0.2656779885292053, 0.002456104...
but will be right next to the compiled class files in the packaged JAR file.
[ 0.29317542910575867, 0.1195278987288475, 0.34116461873054504, 0.19965092837810516, 0.08674918860197067, -0.11597058176994324, 0.07737945020198822, 0.11185566335916519, 0.08428378403186798, -0.658456027507782, 0.026454929262399673, 0.35839253664016724, 0.22447222471237183, 0.000797777960542...
Can anyone recommend any programmer-friendly (i.e. extensible) frameworks or systems for performing network level packet [fuzzing](http://en.wikipedia.org/wiki/Fuzzing)? I'm looking for such a system where I can program in additional packet formats and various ways of breaking those packets in a protocol-dependent man...
[ 0.32168927788734436, -0.3526405096054077, 0.034075360745191574, 0.3517751395702362, -0.02320329286158085, -0.3886503577232361, -0.1589004397392273, 0.08575000613927841, 0.00633133202791214, -0.4738035798072815, -0.08140970021486282, 0.39100608229637146, -0.17154552042484283, 0.080839477479...
I've built a nice website system that caters to the needs of a small niche market. I've been selling these websites over the last year by deploying copies of the software using Capistrano to my web server. It occurs to me that the only difference in these websites is the database, the CSS file, and a small set of imag...
[ 0.9022871851921082, 0.28813469409942627, 0.4936232268810272, 0.12064282596111298, 0.4119563102722168, 0.1763218343257904, -0.061152972280979156, 0.3788408935070038, -0.4736163020133972, -0.7177512049674988, 0.17289966344833374, 0.553211510181427, -0.023641187697649002, 0.03861401975154877,...
code. And this problem will only get worse. I am thinking that I should refactor this system, so that I can use one set of deployed ruby code, dynamically selecting the correct database, etc, by the URL of the incoming request. It seems that there are two ways of handling the database: * using multiple databases, on...
[ 0.329653799533844, 0.16925086081027985, 0.33410561084747314, 0.20072466135025024, -0.17819362878799438, 0.19571295380592346, 0.40883347392082214, -0.12270691245794296, -0.2524101436138153, -0.8099404573440552, 0.06947709619998932, 0.6399576663970947, -0.5789381861686707, 0.2102787345647812...
to all CRUD operations. However, it would be a hassle to have to run 'rake db:migrate' for tens or hundreds of different databases, every time I want to migrate the database(s). Obviously this could be done by a script, but it doesn't smell very good. On the other hand, every client will have 20K-50K items in an 'it...
[ 0.21916909515857697, 0.1945110410451889, 0.40602168440818787, 0.2777077555656433, -0.08364696055650711, -0.17527209222316742, 0.2276269942522049, -0.006593129597604275, -0.06989800184965134, -0.9648585915565491, 0.15612421929836273, 0.3946860432624817, -0.01281698513776064, 0.3188954889774...
into different client databases. If anyone has an informed opinion on the best way to approach this problem, I would very much like to hear it. Thanks much in advance... -- John There are advantages to using separate DBs (including those you already listed): * Fulltext searches will become slow (depending on your se...
[ 0.4002666473388672, 0.0048255762085318565, 0.030343277379870415, 0.3440934121608734, -0.022753501310944557, -0.23578917980194092, 0.1764782965183258, 0.1045696809887886, -0.39109599590301514, -0.5001110434532166, -0.2332456260919571, 0.5952473282814026, -0.2432287335395813, 0.0967774987220...
them) no apparent reason. Again, if you stay under your hardware's capacity, this might not be an issue. * If you ever drop a client, it'd be marginally cleaner to just pack up their DB than to remove all of their associated rows by client\_id. And equally clean to restore them if they change their minds later. * If an...
[ 0.5954686999320984, 0.085088811814785, 0.19796930253505707, 0.23151327669620514, -0.2092413306236267, 0.03853096812963486, 0.30292990803718567, -0.14682619273662567, -0.4771842360496521, -0.6976156234741211, -0.13057881593704224, 0.6226395964622498, -0.2563914358615875, 0.30917060375213623...
data. ;) All that being said, the single DB solution is probably better given: * Your DB server's capabilities makes the large single table a non-issue. * Your client's databases are guaranteed to remain identical. * You aren't worried about being able to keep everyone's data compartmentalized for purposes of archivi...
[ 0.1541568487882614, -0.051549069583415985, 0.28164297342300415, 0.3867190480232239, -0.10246019065380096, -0.23301658034324646, 0.23643381893634796, -0.058421749621629715, -0.581141471862793, -0.6507024168968201, -0.23474358022212982, 0.4982585906982422, -0.035234540700912476, 0.0792008265...
I'm using Flex Builder 3 now and it suddenly refuses to start debugging session. I've reinstalled debugger versions of Flash Player: both 9 and 10 versions. Then I've reinstalled Flex Builder itself allowing it to install it's native Flash Player version. And finally, I've tried to use both IE and Firefox as host for p...
[ -0.0764017179608345, 0.22178539633750916, 0.4240076243877411, -0.38273975253105164, -0.38495323061943054, -0.28893357515335083, 0.7041323184967041, -0.14730535447597504, -0.1718992441892624, -0.7940914034843445, -0.20256951451301575, 1.163413405418396, -0.39903250336647034, 0.0433619804680...
to debug connections. If it isn't, its a problem with player. If it is, try to check builder properties to see if it tries to connect to correct port. Try to telnet to said port to see if player responds.
[ -0.04563796892762184, -0.28564637899398804, 0.11847177892923355, 0.11547516286373138, -0.0373372919857502, -0.30062440037727356, 0.33702653646469116, -0.24692897498607635, -0.32571735978126526, -0.8851890563964844, -0.10322008281946182, 0.6276687979698181, -0.3676980435848236, 0.2758314609...
I want to automate the process of gathering code metrics on a .NET solution. Is there any way of getting msbuild to run the Code Metrics feature included in VS2008 Development Edition? I may end up using [SourceMonitor](http://www.campwoodsw.com/sourcemonitor.html), but I would like to know if there is a way to use t...
[ 0.3361952304840088, -0.06358609348535538, 0.25278106331825256, 0.15763677656650543, -0.24638715386390686, -0.08274636417627335, 0.21224409341812134, -0.13781988620758057, -0.2854425609111786, -0.47280153632164, 0.03844177722930908, 0.7614879608154297, 0.062430642545223236, -0.1140313744544...
I'm trying to get a UIDatePicker with a UIButton to show up in a UIActionSheet. Unfortunately it gets cropped off and the entire Date Picker is not visible. I have not even attempted to add the UIButton yet. Can anyone suggest on getting the entire view to fit properly? I'm not sure how to add the proper dimensions as ...
[ 0.2504960298538208, -0.2644193172454834, 0.580061674118042, -0.001579842297360301, -0.13283567130565643, 0.194957435131073, 0.08067630976438522, 0.09114906191825867, -0.2227151095867157, -0.5975281596183777, 0.07782740890979767, 0.4157179892063141, -0.11849405616521835, 0.15995211899280548...
delegate:self cancelButtonTitle:@"Cancel"
[ 0.20019176602363586, -0.2144668996334076, -0.22640790045261383, 0.27819162607192993, -0.08115691691637039, 0.020380521193146706, 0.2825523614883423, 0.017132382839918137, -0.43002697825431824, -0.4949365556240082, -0.0341845266520977, 0.24786143004894257, -0.3058878481388092, 0.13643515110...
destructiveButtonTitle:nil otherButtonTitles:nil]; // Add the picker UIDatePicker *pickerView = [[UIDatePicker alloc] init]; pickerView.datePickerMode = UIDatePickerModeDate; [menu addSubview:pickerView]; [menu showInView:self.view]; [pickerView release]; [menu release]; ``` ...
[ 0.31974881887435913, -0.12098093330860138, 0.5215088725090027, -0.005707497708499432, -0.2983729839324951, -0.1601368635892868, 0.6852313876152039, -0.194708913564682, -0.05767601728439331, -0.35877183079719543, 0.25435546040534973, 0.7212580442428589, -0.21626101434230804, 0.1594106554985...
[[UIActionSheet alloc] initWithTitle:@"Date Picker" delegate:self cancelButtonTitle:@"Cancel"
[ 0.05333143472671509, -0.11186613887548447, 0.023191753774881363, 0.10711084306240082, 0.2159111499786377, -0.06319940090179443, 0.21678657829761505, -0.034203238785266876, -0.4029216170310974, -0.38533520698547363, -0.07501687109470367, 0.30104735493659973, -0.2453431338071823, 0.146860748...
destructiveButtonTitle:nil otherButtonTitles:nil]; // Add the picker UIDatePicker *pickerView = [[UIDatePicker alloc] init]; pickerView.datePickerMode = UIDatePickerModeDate; [menu addSubview:pickerView];
[ 0.2706947326660156, -0.40731877088546753, 0.3383387625217438, -0.080259770154953, -0.3370353877544403, 0.07856970280408859, 0.45649978518486023, 0.10056576877832413, 0.0024197313468903303, -0.04126640409231186, 0.0038255902472883463, 0.5004664063453674, -0.21835677325725555, 0.235824942588...
[menu showInView:self.view]; [menu setBounds:CGRectMake(0,0,320, 500)]; CGRect pickerRect = pickerView.bounds; pickerRect.origin.y = -100; pickerView.bounds = pickerRect; [pickerView release]; [menu release]; ``` But you better create a fullscreen view with a UIDatePicker and a navigatio...
[ -0.15038207173347473, -0.3682512938976288, 0.5129480361938477, -0.1348993331193924, -0.17373381555080414, 0.24894575774669647, 0.2877846956253052, -0.1131906807422638, 0.00862327590584755, -0.4846331477165222, -0.20520515739917755, 0.4953766167163849, -0.2130085676908493, 0.142288461327552...
If you visit [this page](http://www.maplesoft.com/company/news/index.aspx) in Internet explorer, and choose a value from the "Current Media Releases" dropdown on the top right, eventually IE will try to redirect you to an ugly url containing this string: \_\_EVENTTARGET=selArchives&\_\_EVENTARGUMENT=&\_\_LASTFOCUS=&\_...
[ -0.14524514973163605, 0.04761505499482155, 0.6205697059631348, -0.01569560542702675, -0.15055060386657715, -0.3021029233932495, 0.36096224188804626, -0.1518399715423584, -0.3416948914527893, -0.6814451813697815, -0.4071032702922821, 0.46622008085250854, -0.2710799276828766, 0.3894266188144...
sure what specifically was causing the problem. Looks like it was a combination of a few factors. Thanks for the help First off, your page has javascript errors. Please fix them. Second, you only see the ugly url when you select a date and click the go button. But you've got the dropdown set to auto postback. Ditch t...
[ 0.20280486345291138, 0.017741739749908447, 0.17723125219345093, 0.20780238509178162, -0.06982069462537766, -0.2898273766040802, 0.6250319480895996, 0.4177074730396271, -0.17756442725658417, -0.47260648012161255, 0.03928709775209427, 0.5027646422386169, -0.2299642711877823, 0.19424359500408...
OK since I am in a holding pattern on this issue perhaps someone has seen these symptoms and can provide some sage advice. (Note: I have learned only enough Active Directory information to build this feature and I only have read access to the Active Directory.) I updated the company intranet to allow the automatic ent...
[ 0.8048765659332275, 0.4781777262687683, 0.8301110863685608, -0.3692123293876648, -0.16309933364391327, 0.017629627138376236, 0.5839496850967407, -0.04283350706100464, -0.12056595832109451, -0.3285196125507355, 0.270077645778656, 0.22091799974441528, -0.362165629863739, 0.15892496705055237,...
update user’ group and an ‘ADSupdate’ account (which belongs to ‘ADS update user’). Problem: Entries in Domain A update fine for Local Development Servers, Test Servers, and Production Servers. Entries in Domain B update only when run from Local Development Servers. When you run the same code (verified multiple times)...
[ 0.403261661529541, 0.2563624978065491, 0.6338165998458862, -0.04417946934700012, -0.004211268853396177, -0.0709480568766594, 0.3961751163005829, -0.3782437741756439, -0.34437257051467896, -0.4726638197898865, -0.11698982864618301, 0.3981623947620392, -0.4823536276817322, 0.3937354683876037...
to be honest I am thankful that the Local Development Servers are able to update the Active Directory entries in domain B. It proves that the code works at least in one location I have looked at machine permissions, permissions on the group and user, and IIS and I can spot no significant differences. Any help would be...
[ 0.23174676299095154, 0.21240068972110748, 0.41686680912971497, -0.12658149003982544, -0.22864411771297455, -0.05145696923136711, 0.05753731355071068, -0.022443555295467377, -0.4559241831302643, -0.572135865688324, -0.1581634283065796, 0.24244827032089233, -0.1766907274723053, 0.27107575535...
by recognizing the fact that the string is an IEnumerable and so ItemsControl can treat each character in the string as a separate item. The default panel for ItemsControl is a StackPanel, so the characters are laid out vertically. Note: For precise control over horizontal positioning, vertical spacing, etc, the ItemC...
[ -0.493894100189209, -0.16288287937641144, 0.6043674945831299, 0.048198677599430084, -0.07340846955776215, 0.29644981026649475, -0.19113866984844208, -0.08301620185375214, -0.3033032715320587, -0.4019509255886078, -0.3274604380130768, -0.026777438819408417, 0.0804520845413208, -0.2732442021...
Are there C++ compilers already supporting [C++0x](http://en.wikipedia.org/wiki/C%2B%2B0x) [lambda](http://en.wikipedia.org/wiki/Lambda_calculus) expressions? [Visual Studio 2010 CTP](https://connect.microsoft.com/VisualStudio/content/content.aspx?ContentID=9790) supports it already. **Update:** It is now [Visual Stud...
[ 0.2043357789516449, -0.1386115700006485, 0.31898248195648193, -0.07201451063156128, -0.36074554920196533, 0.0750596672296524, 0.08469261974096298, -0.11654235422611237, -0.2060701549053192, -0.44072607159614563, -0.1625315099954605, 0.4077630341053009, -0.31187009811401367, -0.478447020053...
Recently I used a class that inherits from a collection instead of having the collection instantiated within the class, is this acceptable or does it create unseen problems further down the road? Examples below for the sake of clarity: ``` public class Cars : List<aCar> ``` instead of something like: ``` public cla...
[ 0.04757905378937721, 0.14495448768138885, 0.09157602488994598, 0.2476852983236313, -0.06606685370206833, 0.12145250290632248, -0.09636272490024567, 0.10842371731996536, -0.5212946534156799, -0.5119525194168091, 0.14380969107151031, 0.7114762663841248, -0.19204019010066986, 0.18804475665092...
I am using a third-party DLL. For some particular cases, a function in the DLL is throwing an exception. Is it possible to debug the DLL in the Visual Studio? After [the answer from Andrew Rollings](https://stackoverflow.com/questions/349918/debugging-a-third-party-dll-in-visual-studio/349925#349925), I am able to vie...
[ 0.6645529270172119, 0.1397157460451126, 0.05283341184258461, -0.10023689270019531, -0.1386730968952179, -0.32053858041763306, 0.2838660776615143, -0.13434074819087982, -0.3194258213043213, -0.5230672955513, -0.24119192361831665, 0.5304155945777893, -0.1838870495557785, 0.07144728302955627,...
Is there a programmatic way to extract equations (and possibly images) from an MS Word document? I've googled all over, but have yet to find anything that I can sink my teeth into and work from. If possible, I'd like to be able to do this with VB.NET or C#, but I can pick up enough of any language to hack out a DLL. Th...
[ 0.12940524518489838, 0.025862447917461395, 0.2879953682422638, 0.30449479818344116, -0.004904892761260271, -0.03651731088757515, 0.5044393539428711, 0.2924189567565918, -0.11514078080654144, -0.7041343450546265, -0.04796649515628815, 0.6896932125091553, -0.14599540829658508, -0.16622491180...
Word 2000/2003 has an `InlineShapes` collection as part of the `Document` object which represents embedded images and possibly similar objects like equations. Some VBA code to copy the first item onto the clipboard, which might help you extract them: ``` ThisDocument.InlineShapes.Items(1).Select Selection.Copy ``` ...
[ -0.0942406952381134, -0.007573570124804974, 0.563134491443634, 0.09783683717250824, -0.2680209279060364, -0.019868943840265274, 0.10409644991159439, -0.08800314366817474, -0.16195954382419586, -0.4970383048057556, 0.03911770135164261, 0.4990769326686859, -0.4511352777481079, -0.05558887124...
I am converting a linux script from <http://www.perlmonks.org/index.pl?node_id=217166> specifically this: ``` #!/usr/bin/perl -w use strict; use Getopt::Std; use File::Find; @ARGV > 0 and getopts('a:', \my %opt) or die << "USAGE"; # Deletes any old files from the directory tree(s) given and # removes empty directorie...
[ 0.27628880739212036, 0.010665194131433964, 0.7536168694496155, -0.3749735951423645, 0.16195501387119293, 0.31674516201019287, 0.3617040514945984, -0.2041349709033966, -0.029642926529049873, -0.8419688940048218, -0.4119391143321991, 0.5757471323013306, -0.01743668131530285, 0.13279420137405...
0 and getopts('a:', \my %opt) or die << "USAGE"; # Deletes any old files from the directory tree(s) given and # removes empty directories en passant. usage: $0 [-a maxage] directory [directory ...] -a maximum age in days, default is 120 USAGE my $max_age_days = $opt{a} || 120; find({ wanted => sub { unlin...
[ 0.34261882305145264, -0.19084703922271729, 0.8610767126083374, -0.25581493973731995, 0.7465002536773682, 0.16692523658275604, 0.03354988619685173, -0.23476845026016235, -0.16141949594020844, -0.6304872632026672, -0.5346312522888184, 0.8256267309188843, 0.07370229810476303, 0.12980200350284...
my $expr = "$File::Find::dir"; $expr =~ s/\//\\/g; # replace / with \ print "rmdir $expr\n"; `rmdir $expr`;
[ -0.31788814067840576, 0.2639244794845581, 0.6994831562042236, -0.6670817136764526, 0.23161154985427856, 0.054067462682724, 0.4360974133014679, -0.12001144140958786, 0.3319152891635895, -0.23665264248847961, -0.3417068123817444, 0.8588160276412964, -0.3796013295650482, 0.22479894757270813, ...
}, }, @ARGV); ``` However I get an error when the script tries to remove a directory saying that the directory is in use by another process (when it isn't). Any ideas? I'm running the script on Windows Server 2003 SP2 64-bit using ActiveState 5.10. Thanks! From this [documentation](http://perl.active-venture.com/lib...
[ -0.13631385564804077, 0.12490565329790115, 0.4617036283016205, -0.1532643735408783, 0.055876437574625015, -0.254601389169693, 0.3728865385055542, -0.008550739847123623, -0.17750869691371918, -0.6357844471931458, -0.13127583265304565, 0.7925562858581543, -0.3687458038330078, 0.0426062829792...
the current directory is in > $File::Find::dir. This hook is handy > for summarizing a directory, such as > calculating its disk usage. When > follow or follow\_fast are in effect, > postprocess is a no-op. This means that your own code is still using the directory as you try to delete it. Try building a list of ...
[ 0.017570113763213158, -0.0941324383020401, 0.5487377047538757, -0.003792112460359931, 0.2948187291622162, -0.2790554463863373, 0.038611628115177155, 0.16570442914962769, -0.17411638796329498, -0.67301344871521, -0.14999955892562866, 0.6575170755386353, -0.06733053177595139, 0.2938117980957...
body: > To add to that: the issue here is that on Linux one can delete files and directories that are in use, on windows one can't. That's why it doesn't work unmodified. - [Leon Timmermans](https://stackoverflow.com/users/4727/leon-timmermans)
[ 0.4763743579387665, 0.1926797330379486, 0.04170147329568863, 0.11270042508840561, 0.01181717962026596, -0.3760446608066559, 0.31848469376564026, -0.3035295605659485, -0.36559927463531494, -0.29646962881088257, -0.20845277607440948, 0.6335164904594421, -0.11610525101423264, 0.01176903862506...
I'm having an issue with an ObservableCollection getting new items but not reflecting those changes in a ListView. I have enough quirks in the way I'm implementing this that I'm having a hard time determining what the problem is. My ObservableCollection is implemented thusly: ``` public class MessageList : Observable...
[ -0.02259293757379055, -0.02183152548968792, 1.1074910163879395, -0.06185897812247276, 0.27247247099876404, -0.0673113465309143, 0.2166079580783844, -0.6258955597877502, -0.4100164771080017, -0.6359453797340393, -0.343571275472641, 0.6523085832595825, -0.6988949775695801, 0.2622358798980713...
} ``` In the OnLoad event of my main NavigationWindow I have the following line: ``` ChatHelper.LobbyMessages = new MessageList(); ``` My XAML in the UserControl where the ListView is located reads as: ``` <ListBox IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Mode=OneWay}" x:...
[ -0.0786001905798912, 0.057484276592731476, 1.1879185438156128, -0.1892671436071396, 0.08455172926187515, -0.07781223207712173, 0.39874112606048584, -0.18437010049819946, -0.33004969358444214, -0.8482576608657837, -0.14520326256752014, 0.5620540380477905, -0.33080416917800903, 0.16405318677...
</ListBox.DataContext> </ListBox> ``` The initial message that I added in the constructor appears in the UI just fine. Now, the way I add new items to the collection is from a CallBack coming from a WCF service. I had this code working in a WinForms application and it was neccessary to marshall the callback to t...
[ -0.1381605565547943, -0.2122163623571396, 0.8393227458000183, -0.1369251310825348, -0.18926680088043213, 0.10874994844198227, 0.21076220273971558, -0.5321088433265686, -0.6485728025436401, -0.7525938153266907, -0.37733083963394165, 0.15910544991493225, -0.14183613657951355, 0.3502639234066...
serviceMessage) { // This is being called from the WCF service on it's own thread so // we have to marshall the call back to this thread. SendOrPostCallback callback = delegate { switch (serviceMessage.MessageType) { case MessageType.ChatMessage: ChatHelper.L...
[ 0.1642639935016632, -0.3401466906070709, 0.5896930694580078, 0.0040757497772574425, 0.14958395063877106, -0.013205597177147865, 0.5910146832466125, -0.5690894722938538, -0.2663962244987488, -0.6186983585357666, -0.12820179760456085, 0.37140315771102905, -0.48975861072540283, 0.475035786628...
new LobbyMessage() { Name = serviceMessage.OriginatingPlayer.Name, Message = serviceMessage.Message
[ 0.1352478712797165, -0.43461471796035767, 1.0261850357055664, -0.04935047775506973, 0.4987010955810547, 0.131245955824852, 0.36143630743026733, -0.40189456939697266, -0.3239147663116455, -0.8003196716308594, -0.18023233115673065, 0.2008443921804428, -0.2967890799045563, 0.4637176990509033,...
}); break; default: break; } }; Helper.Context.Post(callback, null); } ``` While debugging I can see the collection getting updated with messages from the service but the UI
[ -0.09250596910715103, -0.05440636724233627, 0.33808448910713196, -0.3016640245914459, 0.06544892489910126, -0.25048068165779114, 0.7106450200080872, -0.06612205505371094, -0.2101241648197174, -0.43296828866004944, -0.5805270075798035, 0.46145984530448914, -0.3311491310596466, 0.34663707017...
is not reflecting those additions. Any ideas about what I'm missing to get the ListView to reflect those new items in the collection? I resolved this issue. Neither the static property or the context of the incoming data had anything to do with the issue (which seems obvious in hindsight). The XAML which was generat...
[ 0.24416521191596985, 0.04710472375154495, 0.7905489802360535, -0.09075061976909637, 0.06658768653869629, -0.16422486305236816, 0.2671726942062378, -0.4008839428424835, -0.3399619460105896, -0.6300033330917358, -0.25741761922836304, 0.4743388891220093, -0.4906018078327179, 0.065587460994720...
Margin="223,18.084,15.957,67.787" x:Name="ListBoxChatMessages" ItemTemplate="{DynamicResource MessageListTemplate}" IsEnabled="True"/> ``` I'm a little confused as to why this works. I was reading the MSDN articles on how to bind data in WPF and they included several binding objects, referencing prope...
[ 0.016409756615757942, -0.17569473385810852, 0.7926884293556213, 0.09983953833580017, -0.3748137354850769, 0.00641491636633873, 0.20082218945026398, -0.1964579075574875, -0.2444995790719986, -0.5672847032546997, 0.1505633443593979, 0.35415247082710266, 0.0801662877202034, 0.2288864701986313...
Ladies and Gents, My best friends and I do a "Secret Santa" type gift exchange every year, this year I've been trying to think of a couple of ways to make it interesting. There are six of us involved and I want to design a small program that allows the six of us to rank their preferred gift-recipients from 1 to 5 as w...
[ 0.4400230646133423, 0.026239408180117607, 0.4749497175216675, 0.1614484339952469, -0.37430545687675476, 0.5252771973609924, 0.27211007475852966, 0.17549462616443634, -0.04668097943067551, -0.26311391592025757, 0.07990361005067825, 0.03614497929811478, 0.23321406543254852, 0.471531391143798...
> List 2 - People I would most like to recieve a present from: F, D, E, B, C All six of us will submit both these lists, so I'll have 12 lists all together. I suppose my question is what is the best algorithm to now go ahead and assign each person a gift recipient? I thought of something like this: If two people hav...
[ 0.33148449659347534, -0.21779444813728333, 0.4415065050125122, 0.0535179078578949, -0.5380820035934448, 0.44567322731018066, 0.14382073283195496, -0.26001372933387756, -0.24777480959892273, -0.6921008825302124, 0.089012011885643, 0.36105820536613464, -0.09225528687238693, 0.007520100567489...
list of gift-recipients and B is removed from our pool of gift-givers. Once I've assigned the "perfect matches" I'm kind of lost though, is there an establish algorithm for situations like this? Obviously it's only for entertainment value but surely there must be a "real" application of something similar? Perhaps time...
[ -0.08277884125709534, 0.4604666233062744, 0.5108991861343384, 0.2090200036764145, -0.3063889145851135, -0.05526987835764885, 0.21732430160045624, -0.1542334109544754, -0.18552061915397644, -0.11102836579084396, -0.040712129324674606, 0.19427938759326935, 0.0618402361869812, 0.1233142018318...
implemented that in Python and it works a treat. However, this is just a thought that occurred to me. I guess within our group of six best friends there are three pairings of "extra-best" friends so I have a feeling we'll just end up with three pairs of AB, CD, EF and BA, DC, FE in terms of gift giving and recieving. ...
[ 0.384440541267395, -0.2307906299829483, -0.039898548275232315, 0.25679564476013184, -0.22307805716991425, 0.15355578064918518, 0.18886911869049072, -0.1672174483537674, -0.38234373927116394, -0.23883718252182007, 0.05634237080812454, 0.2818574607372284, -0.2869994640350342, -0.140568897128...
assigned to buy a gift for A? Perhaps I need to solve the [Stable roommates problem](http://en.wikipedia.org/wiki/Stable_roommates_problem)? Related questions: * [Secret santa algorithm.](https://stackoverflow.com/questions/273567/secret-santa-algorithm) * [What is the best low-tech protocol to simulate drawing names...
[ 0.020880339667201042, -0.14902950823307037, 0.24023306369781494, 0.41918423771858215, -0.12606842815876007, -0.018150798976421356, 0.5296515226364136, -0.23435789346694946, 0.049004945904016495, -0.1532105654478073, 0.09773758053779602, 0.18835367262363434, -0.13418224453926086, 0.07674676...
of people will "elope" because they prefer each other to their current partners. This is not something you care about in your Secret Santa application. What you want (depending on your definition of "best") is a **maximum-weight bipartite matching**, which fixes both the above objections: put the "givers" on one side...
[ -0.21358899772167206, -0.1851561814546585, 0.12323279678821564, 0.2653471529483795, -0.21317839622497559, 0.06933243572711945, 0.6379370093345642, -0.0910930186510086, -0.3496857285499573, -0.5929434895515442, -0.10974743217229843, 0.1482190191745758, -0.4866154193878174, -0.08471294492483...
also vary how you assign the weights to optimize for different things (e.g. maximize the number of people who get their first choice, or minimize the worst choice that anyone gets, etc.) If you do use the Gale-Shapley stable marriage algorithm, note that it is optimal for the "proposers" (male-optimal and female-pessi...
[ -0.08508704602718353, -0.13121913373470306, 0.23392213881015778, 0.42156124114990234, 0.10897517949342728, 0.09684021025896072, 0.12227494269609451, -0.12380489706993103, -0.025085993111133575, -0.30781814455986023, 0.27512189745903015, 0.413389652967453, -0.10230325162410736, -0.087928228...
I'm starting to build a community website from the site up and my web framework will be Asp.net and Mysql. I want to start planning some scalability into the infrastructure early because I'm anticipating high traffic when the site goes live. **Are there any case studies which you recommend reading where asp.net or my...
[ 0.5625810027122498, 0.24790552258491516, 0.3075210452079773, 0.027954626828432083, -0.16207896173000336, -0.12179781496524811, 0.19369398057460785, 0.09309721738100052, -0.3061991035938263, -0.8142098188400269, 0.12368515133857727, 0.4605252146720886, 0.06842152029275894, -0.08457446843385...
for scalability](http://msdn.microsoft.com/en-us/library/ms998530.aspx). Weed out what is not appropriate for you. * Learn about database performance and implications of various design strategies such as denormalisation (when and why). * Consider out-of-process caching like [memcached](http://en.wikipedia.org/wiki/Memc...
[ 0.15478436648845673, -0.036671265959739685, 0.013835638761520386, 0.2193586379289627, 0.047890473157167435, -0.025814343243837357, 0.05634577199816704, -0.2826496362686157, -0.5390293002128601, -0.6727966666221619, 0.00698942132294178, 0.5557613968849182, -0.2080259472131729, -0.1684238314...
Learn how to measure the performance of your application and database (starting points [ASP.NET](http://www.google.com/search?hl=en&q=measuring+asp.net+performance) and [MySQL](http://www.google.com/search?hl=en&q=measuring+mysql+performance&btnG=Search)). * Develop a plan for scaling your architecture (1 server to 2 s...
[ 0.2681052088737488, -0.002153860405087471, 0.37208619713783264, 0.2705298662185669, 0.3500177562236786, 0.06234025955200195, 0.17571993172168732, -0.1901242583990097, -0.20388346910476685, -1.0483758449554443, -0.15079565346240997, 0.40676143765449524, 0.2671116292476654, 0.152868345379829...
Does someone knows if it's possible to dynamically create a call chain and invoke it? Lets say I have two classes A & B: ``` public class A public function Func() as B return new B() end function end class public class B public function Name() as string return "a string"; end function end...
[ 0.15425284206867218, -0.16156265139579773, 0.029179546982049942, -0.1274099498987198, -0.19185781478881836, 0.019793972373008728, 0.24558468163013458, -0.264508455991745, -0.19328759610652924, 0.05305862799286842, 0.11466862261295319, 0.4987770915031433, -0.5102373361587524, 0.368802338838...
use *Delegate.CreateDelegate* to create a delegate I can invoke from the two *MethodInfo* objects but this way I can only call the two functions separately and not as part of a call chain. I would like two solutions one for .NET 3.5 using expression tree and if possible a solution that is .NET 2.0 compatible as well A...
[ 0.5924760699272156, -0.19726602733135223, -0.02414345182478428, 0.2610110938549042, -0.33382874727249146, -0.04034339636564255, 0.10125724226236343, -0.558064877986908, -0.05015462636947632, -0.7680273652076721, 0.24600882828235626, 0.32442665100097656, -0.36912694573402405, 0.188715681433...
work in notepad (from my Eee... hence the lack of VS). EDIT: Okay, as an expression tree, you want something like (C# code, but I'm sure you can translate): ``` // I assume you've already got fMethodInfo and nameMethodInfo. Expression fCall = Expression.Call(null, fMethodInfo); Expression nameCall = Expression.Call(f...
[ -0.15068319439888, 0.03345898911356926, 0.47832125425338745, -0.2838781476020813, 0.28313741087913513, -0.040731076151132584, -0.020955976098775864, -0.24251239001750946, -0.10097835958003998, -0.7565421462059021, -0.15039581060409546, 0.7507475018501282, -0.24926422536373138, -0.559328734...
Note - I have not delved very deeply into Apple's iPhone SDK yet. However, based on another [question](https://stackoverflow.com/questions/350067/how-can-i-run-an-app-at-a-specified-time-on-the-iphone) asked recently, I'm wondering if, since the iPhone is running some stripped-down edition of Mac OS X if it doesn't ha...
[ 0.06920861452817917, 0.2929700016975403, 0.19890643656253815, 0.06546278297901154, 0.26238927245140076, 0.065873883664608, 0.2655205726623535, 0.2504265606403351, -0.476613312959671, -0.3838028311729431, -0.24516719579696655, 0.6818318367004395, -0.039980120956897736, 0.034154802560806274,...
How do I check to see if a particular value has already been assigned to Smarty and if not assign a (default) value? Answer: ``` if ($this->cismarty->get_template_vars('test') === null) { $this->cismarty->assign('test', 'Default value'); } ``` **Smarty 2** ``` if ($smarty->get_template_vars('foo') === null) { ...
[ 0.07422380149364471, 0.04284294694662094, 0.2761155962944031, 0.05896008759737015, 0.3645697832107544, -0.09951882064342499, 0.03327330946922302, -0.28726792335510254, 0.056642550975084305, -0.4951898753643036, -0.3040321171283722, 0.4670190215110779, -0.23993055522441864, -0.2220291942358...
In Unix/Linux, how do you find out what group a given user is in via command line? ``` groups ``` or ``` groups user ```
[ 0.06495099514722824, -0.08069182187318802, 0.05561258643865585, 0.1022365614771843, 0.050409357994794846, -0.35035470128059387, -0.3239688575267792, 0.42315301299095154, -0.24275818467140198, -0.6181507110595703, -0.19202014803886414, 0.5459426641464233, -0.32098838686943054, -0.1026668697...
Anyone know a good lib where i can run the strings before they are inserted, that can strip out sql/javascript code? To be run in jsp pages. Idealy the lib would be: * Free * Lightweight * Easy to use Thanks in advance to the SO community who will happily reply :) Apache Commons lang StringEscapeUtils will get you s...
[ 0.19033768773078918, -0.275198757648468, 0.2962281405925751, 0.1209256574511528, -0.034540098160505295, -0.2779293358325958, 0.3067655563354492, -0.08617358654737473, -0.20812635123729706, -0.7209009528160095, -0.16243131458759308, 0.4632861614227295, -0.36260759830474854, -0.1164147481322...
What is the best was to evaluate an expression like the following: (A And B) Or (A And C) Or (Not B And C) or (A && B) || (A && C) || (!B && C) At runtime, I was planning on converting the above expressions to the following: (True And False) Or (True And False) Or (Not False And True) or (True && Fal...
[ 0.06553488224744797, 0.24214176833629608, 0.06512517482042313, -0.059022221714258194, 0.08900589495897293, -0.05365680903196335, 0.5564378499984741, -0.40469929575920105, 0.23093612492084503, -0.2726782262325287, -0.17073403298854828, 0.8909074068069458, -0.19219762086868286, -0.2494095414...
Variable values are never null. I know I could create a simple assemble with a class and a method that I generate at runtime based on the inputs, but is there a better way. I have done this before. Use a string builder to write the code, then call the compiler. After that, you load the assembly and call the method. ...
[ 0.31374549865722656, -0.060167063027620316, -0.06631455570459366, 0.10683050006628036, -0.11458015441894531, 0.02052322030067444, 0.1995849907398224, -0.2698701024055481, 0.05622464790940285, -0.5155403017997742, 0.084415003657341, 0.8985587954521179, -0.5429412126541138, -0.06171689555048...
syntax tree builder for this kind of fairly simple grammer is quite an interesting exercise, and will execute somewhat faster than invoking the compiler (and it's neater in my view as well). If you're not using .NET3.5, then it's also not complicated to implement an interpreted abstract syntax tree yourself.
[ 0.11489664018154144, -0.09008177369832993, -0.07361765950918198, -0.045846931636333466, -0.39207422733306885, -0.2621815800666809, 0.46687135100364685, -0.23702192306518555, 0.056719206273555756, -0.5822269320487976, 0.054565101861953735, 0.6148732304573059, -0.36892977356910706, -0.192882...
I have a ListBox whose ItemSource is an ObjectDataProvider that is an instance of an ObservableCollection. The ObservableCollection is a collection of ObservableCollections. The ItemTemplate of the ListBox is a DataTemplate that creates a ListBox for each item of the listbox. To illustrate this better I'm trying to rec...
[ 0.3104056119918823, 0.1562965363264084, 0.4140741527080536, 0.1618015021085739, -0.12947368621826172, -0.019720768555998802, -0.3629375994205475, -0.23852545022964478, -0.37157493829727173, -0.6396222710609436, 0.33696815371513367, 0.24740435183048248, -0.14579170942306519, 0.3397676050662...
ListBox that has an ItemSource that is a Book, that is an ObservableCollection of Cards. I don't think I'm having a problem with the source or the template of the outer ListBox, but I'm having a hard time understanding how I'm going to set the source of the ListBox items to the collection of cards for each book. Essent...
[ 0.46871286630630493, 0.04946734756231308, 0.28186607360839844, 0.24941545724868774, 0.003007628722116351, -0.074240542948246, -0.3478589653968811, -0.18247286975383759, -0.5161847472190857, -0.6383553147315979, 0.2658854126930237, 0.15156321227550507, -0.21510326862335205, 0.13231644034385...
to approach this, I would greatly appreciate hearing it. With Card like the following: ``` public class Card { private string _name; public Card(string name) { _name = name; } public string Name { get { return _name; } set { _name = value; } } } ``` and Book li...
[ 0.13041247427463531, -0.1162741407752037, 0.3996473550796509, 0.2100990116596222, -0.013164903968572617, -0.4398342967033386, -0.32269287109375, -0.3302887976169586, -0.11493273824453354, -0.6408118009567261, -0.2506161332130432, 0.5873920917510986, -0.36349451541900635, 0.3063359558582306...
public Book(ObservableCollection<Card> cards) { _cards = cards; } public ObservableCollection<Card> Cards { get { return _cards; } } } ``` Then create your ListBox in the window: ``` <ListBox ItemsSource="{Binding ElementName=Window, Path=Books}" ItemTemplate="{St...
[ -0.16121380031108856, -0.03322553262114525, 0.9893073439598083, 0.10076126456260681, 0.29459017515182495, -0.16091635823249817, -0.15212783217430115, -0.3513645529747009, -0.4203948378562927, -0.5997847318649292, -0.37332335114479065, 0.41262727975845337, -0.3833560347557068, 0.00399714335...
x:Key="InsideListTemplate"> <TextBlock Text="{Binding Name}" /> </DataTemplate> <DataTemplate x:Key="MainListTemplate"> <ListBox ItemsSource="{Binding Cards}"
[ -0.28932178020477295, 0.18414998054504395, 0.7498874068260193, -0.01444170530885458, -0.06886988878250122, -0.05282003805041313, -0.30530765652656555, -0.47326111793518066, -0.2865734100341797, -0.46506568789482117, -0.13140356540679932, 0.12684844434261322, -0.27631014585494995, 0.1452871...
ItemTemplate="{StaticResource InsideListTemplate}" /> </DataTemplate> </ResourceDictionary> </Window.Resources> ``` Your ListBox uses the MainListTemplate, which contains a ListBox. The ItemsSource for that ListBox is your list of Cards, and the ItemTemplate is the InsideListTemplate. I have it as a sim...
[ -0.025030020624399185, -0.11977121978998184, 0.8276838064193726, -0.11552656441926956, -0.12716813385486603, 0.023298807442188263, -0.37498345971107483, -0.27776649594306946, -0.5646892189979553, -0.6695243716239929, 0.0620356947183609, 0.21684792637825012, -0.26810356974601746, 0.06099531...
Heres my link: <http://tinyurl.com/6j727e> If you click on the link in test.php, it opens in a modal box which is using the jquery 'facebox' script. I'm trying to act upon a click event in this box, and if you view source of test.php you'll see where I'm trying to loacte the link within the modal box. ``` $('#f...
[ 0.3221261203289032, 0.27974218130111694, 0.3793434202671051, 0.044283945113420486, 0.07868622243404388, -0.08475223183631897, 0.6450102925300598, 0.16042731702327728, -0.2679903209209442, -0.5753213763237, 0.13465389609336853, 0.43641772866249084, -0.09655946493148804, -0.02326851896941662...
I can't figure it out. Can anyone help? Typically its the very last part of a project and its holding me up, as is always the way ;) First, the reason you're getting the alert on document load is because the `#click` method takes a function as an argument. Instead, you passed it the return value of `alert`, which imme...
[ 0.1570308953523636, -0.20853902399539948, 0.6190587878227234, 0.29380548000335693, 0.030009975656867027, -0.33459165692329407, 0.4034164845943451, -0.28842878341674805, -0.2583245038986206, -0.482943594455719, -0.23706451058387756, 0.6173948049545288, -0.24418394267559052, -0.0257998723536...
click event only after the facebox is revealed. Something like:** ``` $(document).bind('reveal.facebox', function() { $('#facebox .hero-link').click(function() { alert('click!'); }); }); ``` **Option 2) Look into using the [jQuery Live Query Plugin](http://brandonaaron.net/docs/livequery/)** > Live Query utilizes...
[ 0.16023337841033936, -0.37749582529067993, 0.5937694311141968, -0.18195192515850067, -0.19545750319957733, -0.23156967759132385, 0.4733384847640991, -0.4070454239845276, -0.07846491783857346, -0.3968524634838104, -0.32063108682632446, 0.8297608494758606, -0.35120344161987305, -0.1347790658...
I have problem with starting processes in impersonated context in ASP.NET 2.0. I am starting new Process in my web service code. IIS 5.1, .NET 2.0 ``` [WebMethod] public string HelloWorld() { string path = @"C:\KB\GetWindowUser.exe"; ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.WorkingDi...
[ 0.00689271092414856, 0.15790295600891113, 0.5045307874679565, -0.1887950599193573, 0.4100472331047058, -0.06577496975660324, 0.6813130974769592, 0.06467926502227783, -0.12629026174545288, -0.6986396908760071, -0.3560350239276886, 0.5384365320205688, -0.31836897134780884, 0.2718275487422943...
string output = docCreateProcess.StandardOutput.ReadToEnd(); } ``` The "C:\KB\GetWindowUser.exe" is console application containing following code: ``` static void Main(string[] args) { Console.WriteLine("Windows: " + WindowsIdentity.GetCurrent().Name); } ``` When I invoke web service without impersonation, eve...
[ -0.11603372544050217, 0.11878283321857452, 0.5365596413612366, -0.10064440220594406, 0.24640804529190063, 0.19853031635284424, 0.5313705205917358, -0.2062591016292572, -0.12982288002967834, -0.5197559595108032, -0.3320986032485962, 0.49736568331718445, -0.25069403648376465, 0.2600440084934...
different credentials than ASPNET from asp.net (IIS 5.1) ? You have to put privileged code into the GAC (or run in Full trust). The code in the GAC must assert the XXXPermission, where XXX is what ever permission you are requesting, be it impersonation, access to the harddrive or what have you. You should revert the ...
[ 0.3106127977371216, 0.06807522475719452, 0.250312477350235, 0.23305290937423706, -0.17951048910617828, -0.44520753622055054, 0.33667615056037903, -0.20271874964237213, 0.063667893409729, -0.3650916814804077, 0.16275554895401, 0.7404894232749939, 0.031739622354507446, 0.20204922556877136, ...
a method like "BackUp()" and not "LaunchAribitraryProcess(string path)" The web.config file must have impersonation set up as well, or you will run into NTFS permission problems as well as CAS. Here is the [complete explanation](http://msdn.microsoft.com/en-us/library/aa302425.aspx).
[ -0.13488762080669403, -0.2267208993434906, -0.010945679619908333, 0.17268915474414825, 0.3173569440841675, -0.4217088222503662, 0.301017165184021, 0.08303803205490112, -0.36611491441726685, -0.3800400495529175, -0.46177950501441956, 0.44331955909729004, -0.30211639404296875, -0.03104292228...
Given the following classes and controller action method: ``` public School { public Int32 ID { get; set; } publig String Name { get; set; } public Address Address { get; set; } } public class Address { public string Street1 { get; set; } public string City { get; set; } public String ZipCode { get; set; ...
[ 0.3793347477912903, -0.3797873556613922, 0.48598772287368774, 0.22308270633220673, 0.1224101111292839, 0.0668899267911911, 0.3881191313266754, -0.13750246167182922, -0.07971717417240143, -0.7061049342155457, -0.6371402740478516, 0.10271386802196503, -0.17015790939331055, 0.3267536461353302...
following form: ``` <form method="post"> School: <%= Html.TextBox("Name") %><br /> Street: <%= Html.TextBox("Address.Street") %><br /> City: <%= Html.TextBox("Address.City") %><br /> Zip Code: <%= Html.TextBox("Address.ZipCode") %><br /> Sate: <select id="Address.State"></select><br /> Country: <select id...
[ 0.15049292147159576, -0.08236051350831985, 0.6794136762619019, 0.12247324734926224, -0.3791894018650055, 0.06604105979204178, 0.24916070699691772, -0.2766105532646179, -0.11386850476264954, -0.7931123971939087, -0.4140136241912842, -0.042706895619630814, 0.013964367099106312, 0.00588197587...
affect the list. The following is what I have so far, and it does not work as the selectors don't seem to match the IDs: ``` $(function() { $.getJSON("/Location/GetCountryList", null, function(data) { $("#Address.Country").fillSelect(data); }); $("#Address.Country").change(function() { $.getJSON("/Locat...
[ -0.07995521277189255, -0.32472583651542664, 0.4735294580459595, -0.2468206137418747, 0.15911166369915009, 0.07296472787857056, 0.5196317434310913, -0.3495449423789978, -0.3270932734012604, -0.6286477446556091, -0.34326204657554626, 0.27825620770454407, -0.37226757407188416, 0.0316872037947...
The first backslash escapes the second one, giving you one actual > backslash in your string - which then escapes the next character for jQuery. So, I guess you're looking at ``` $(function() { $.getJSON("/Location/GetCountryList", null, function(data) { $("#Address\\.Country").fillSelect(data); }); $("#Ad...
[ -0.17243285477161407, -0.1826736032962799, 0.7745909094810486, -0.10690328478813171, 0.15857866406440735, 0.207069993019104, 0.19516989588737488, -0.1305772066116333, -0.34363558888435364, -0.6237429976463318, -0.4386700689792633, 0.2089204341173172, -0.27242976427078247, -0.07241397351026...
Is there a Rails plugin or a rubygem that gives you a starting point for adding an api to your Rails app? We want to use the API Key/Secret Key model, the API should also be versionable. Is there something out there that will give us some, if not all of this? Check out this plugin for AuthLogic: <http://github.com/phu...
[ 0.5932750701904297, 0.02780969627201557, -0.06343290954828262, 0.3515184223651886, 0.03199241682887077, 0.08375609666109085, 0.09037426114082336, 0.3664303421974182, -0.026683518663048744, -0.6335609555244446, 0.2722044885158539, 0.5386162996292114, -0.1090269461274147, -0.105780228972435,...