text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
if( o.oneOrMoreSelected == '*' ) { var display = ''; $(this).find('INPUT:checkbox:checked').each( function() { if( $(this).parent().text() != o.selectAllText ) display = display + $(this).parent().text() + ', ';
[ -0.24812264740467072, -0.05356697738170624, 0.31538254022598267, -0.4715421199798584, 0.1910584270954132, 0.35502150654792786, 0.15115639567375183, -0.08126967400312424, 0.11626110970973969, -0.814385175704956, -0.5273175835609436, 0.4708918631076813, -0.30623751878738403, 0.21177296340465...
}); display = display.substr(0, display.length - 2); $(this).prev('INPUT.multiSelect').val( display ); } else {
[ -0.008033559657633305, -0.1909821629524231, 0.5806378722190857, -0.32871848344802856, 0.05318127200007439, 0.2740437686443329, 0.3524594306945801, -0.3399786055088043, -0.3694984018802643, -0.6365801692008972, -0.35654985904693604, 0.6964231729507446, -0.24854964017868042, 0.32572871446609...
$(this).prev('INPUT.multiSelect').val( o.oneOrMoreSelected.replace('%', i) ); } } } }); })(jQuery); ```
[ -0.01489352062344551, -0.10703201591968536, 0.41131386160850525, -0.44794943928718567, 0.4452853202819824, 0.1972508430480957, 0.4431743621826172, -0.14530454576015472, -0.019434979185461998, -0.530219554901123, -0.4129502773284912, 0.773180365562439, -0.3572806417942047, 0.298846423625946...
Say I have a variable named `choice` it is equal to 2. How would I access the name of the variable? Something equivalent to ``` In [53]: namestr(choice) Out[53]: 'choice' ``` for use in making a dictionary. There's a good way to do this and I'm just missing it. EDIT: The reason to do this is thus. I am running som...
[ 0.3403555452823639, 0.2014046013355255, 0.32519277930259705, -0.07719432562589645, -0.023497655987739563, 0.16607418656349182, -0.028234757483005524, -0.17453336715698242, -0.23059937357902527, -0.4295004606246948, 0.1365620344877243, 0.41553327441215515, -0.1951918601989746, 0.35530090332...
displayed and an empty string input will use the previously used value. My question comes about because when it comes to writing the dictionary that these values have been scanned into. If a parameter is needed I run `get_param` which accesses the file and finds the parameter. I think I will avoid the problem all to...
[ 0.2729976773262024, 0.2244272381067276, 0.5861167311668396, -0.13097429275512695, -0.1946500688791275, 0.27668970823287964, 0.24054820835590363, -0.25702112913131714, -0.39745354652404785, -0.7779155373573303, -0.20623475313186646, 0.5526050925254822, -0.48260176181793213, 0.12620368599891...
m = re.search(r'\bvarname\s*\(\s*([A-Za-z_][A-Za-z0-9_]*)\s*\)', line) if m: return m.group(1) if __name__ == '__main__': spam = 42 print varname(spam) ``` I hope it will inspire you to reevaluate the problem you have and look for another approach.
[ -0.41113436222076416, 0.025578627362847328, 0.8386784791946411, -0.6161996722221375, 0.11418843269348145, -0.009290658868849277, 0.6611745357513428, -0.5774854421615601, -0.07796265929937363, -0.4899742603302002, -0.6208116412162781, 0.7668561935424805, -0.567317545413971, 0.36399659514427...
Need to develop a .NET solution to graphically represent seats in sections, plotted in a stadium layout view, and output as a report... the seats would have different colours displaying sales status... Indeed, it might look scary at first sight, but [2D drawing](http://msdn.microsoft.com/en-us/library/system.drawing.as...
[ -0.042165789753198624, -0.26705336570739746, 0.3759569525718689, 0.21343308687210083, -0.22739849984645844, 0.08852759003639221, 0.03923876956105232, -0.4388628900051117, -0.03703981265425682, -0.7652134895324707, 0.13153833150863647, 0.3115345239639282, -0.5468460321426392, 0.112527593970...
Point(0, 0), reportImage.Size)); for (int i = 0; i != 6; i++) { Rectangle r = new Rectangle(20 + i * 40, 15, 25, 15); graphics.FillEllipse( i % 2 == 0 ? Brushes.DarkOrange : Brushes.DarkKhaki, r); graphics.DrawEllipse(Pens.Black, r); r.Offset(2, 0); graphic...
[ 0.036777205765247345, -0.1647176742553711, 0.7028454542160034, -0.2869534492492676, -0.10185986757278442, 0.5467407703399658, 0.01228976808488369, -0.710205614566803, -0.08820420503616333, -0.49831417202949524, -0.09060927480459213, 0.3714318573474884, -0.3064865469932556, 0.13518477976322...
What can you do in SQL Server 2008 Standard Edition that you cannot do in SQL Server 2008 Web Edition? I've seen the Microsoft feature lists, but I am wondering from a very practicle standpoint where I am going to run into limitations. Have you seen this matrix as well? <http://msdn.microsoft.com/en-us/library/cc6459...
[ 0.0745660662651062, 0.2115933746099472, 0.05512930452823639, 0.04792199283838272, 0.02407734841108322, -0.4512042701244354, 0.14255349338054657, -0.0031387198250740767, -0.21928977966308594, -0.4797077775001526, 0.356681764125824, 0.4990473985671997, -0.17832335829734802, 0.022093357518315...
I'm using locks and transactions a bit like a VBA excel programmer trying to write a multithreaded c++ server for the first time... I've tried to ask my coworkers for advice, but while we're all quite good (or so we think) at designing complex databases, writing fast and efficient queries, using index and constraints ...
[ 0.3101837933063507, 0.3873721659183502, 0.011835743673145771, 0.13767974078655243, 0.17954792082309723, -0.21134255826473236, -0.3917085528373718, -0.05630260705947876, -0.25795865058898926, -0.42985793948173523, -0.0761185958981514, 0.6906922459602356, -0.041875652968883514, -0.0864343568...
too without success. What I'm looking for is a list of simple real world problems, along with the right way to solve them. Example : Let's say I've got a table with one Active bit column, and that I don't want to have two active rows at the same time. Of course, many processes can try to insert data at the same time...
[ 0.09087057411670685, -0.13593485951423645, 0.41742998361587524, 0.20856808125972748, 0.08279290795326233, 0.10099247843027115, 0.1468443125486374, -0.18844793736934662, -0.37696900963783264, -0.4561968743801117, 0.069594606757164, 0.5825915932655334, -0.7140565514564514, 0.0581398494541645...
tbFoo set Active=0 insert into tbFoo (foo, Active) select 'foo',1 where not exists (select \* from tbFoo where Active=1) Please don't comment/answer on this specific problem and on my silly suggestions. I'm just trying to pinpoint the fact that I don't have a clue :) **Where can I find some good walkthroughs on simpl...
[ 0.1595812290906906, 0.3255457282066345, 0.24589280784130096, -0.17442767322063446, -0.017897676676511765, -0.11573947966098785, 0.24310027062892914, -0.2964055836200714, -0.234243243932724, -0.3405163884162903, 0.2663290202617645, 0.6051592826843262, -0.7003019452095032, -0.155050650238990...
especially those related to development and data mining, but nothing that would stop you from using it for a non-enterprise web site's data source. It seems to be between the Express version and Standard version.
[ 0.17837291955947876, -0.032130029052495956, 0.2096419334411621, 0.12127748876810074, 0.042007576674222946, -0.44307053089141846, 0.054297611117362976, 0.37646445631980896, -0.012296891771256924, -0.3904605209827423, 0.18186283111572266, 0.25176185369491577, -0.1756255030632019, -0.00910541...
Is F# better than C# in scenarios where you need complete parallelism in parts of an application? My main language is C# and I am writing an app where the core functionality built on top of the app (C#) has to be and planned to be very parallel. Am I better of implementing these classes in F#? I'd look at the Paralle...
[ 0.17310413718223572, 0.12848979234695435, 0.1726534366607666, 0.08708886802196503, -0.15505458414554596, 0.16525769233703613, 0.005630376748740673, 0.4092719554901123, -0.2723018527030945, -0.5276393294334412, 0.11988576501607895, 0.7672051787376404, -0.49876388907432556, -0.19061477482318...
Using a factor or forth, Arc or whatever as an example (note: factor is a bad example because it has a large set of practical libraries). Lets say you are considering using a programming language. Does having a large set of practical libraries matter? If your language is well designed, then it would be easy to create a...
[ 0.4258482754230499, 0.08968513458967209, -0.011726966127753258, 0.20787836611270905, -0.0929637998342514, 0.25049617886543274, 0.33210113644599915, -0.12281132489442825, -0.18639391660690308, -0.7718015313148499, 0.10303349792957306, 0.5588595271110535, -0.0940566211938858, -0.128729298710...
well-supported libraries that help accomplish what I want to do. This isn't to say I wouldn't enjoy writing my own libraries (quite the contrary), but for a production project where quick, accurate results are important, that wouldn't be a practical option by any stretch of the imagination.
[ 0.629245936870575, 0.14428627490997314, -0.1647292971611023, 0.4397929310798645, -0.0636904165148735, -0.1495678871870041, 0.10089849680662155, 0.26289042830467224, -0.27228471636772156, -0.3640081286430359, 0.06712783128023148, 0.20104992389678955, 0.35283714532852173, -0.0679031312465667...
Is it possible to always keep selected item in the middle of a listbox? If the user selects an item, I want to scroll so that the newly selected item is in the middle. I guess it want be possible for the 'edge cases' (the first and last few items), but that's ok. David Anson posted some articles on his blog that might...
[ 0.3140178620815277, -0.4017007648944855, 0.38912513852119446, 0.10441887378692627, 0.1374121606349945, -0.1705123484134674, 0.14186280965805054, -0.09417999535799026, -0.4618527591228485, -0.48207810521125793, -0.06908617168664932, 0.36617499589920044, -0.3517899215221405, 0.01639863662421...
I want to create an html page with a watermark. I set the background-image on the body. However I have some elements that are not allowing the background image to bleed through. They define their own background-color (but not background-image), overriding the color in the body. This surprised me. They didn't override t...
[ 0.6717955470085144, 0.2318406105041504, 0.3452117443084717, -0.07220848649740219, -0.28235042095184326, 0.010169132612645626, 0.2662983536720276, -0.20418252050876617, -0.2354937493801117, -0.9148796200752258, 0.21753455698490143, 0.3222813606262207, -0.2716473639011383, 0.0543513111770153...
background: url(/images/shield-25.png) blue no-repeat center; } table, div{ width: 100% } #table2 { background-color: white } #div2 { background-color: white } </style> </head> <body class="everything"> <table id="table1"><tr><td>Top</td></tr></table> <!-- This table put a big white line over my watermark image. ...
[ 0.1030229926109314, -0.15726906061172485, 0.20986808836460114, -0.14609389007091522, -0.09854672849178314, 0.2773856520652771, 0.030978797003626823, 0.046179816126823425, -0.30507779121398926, -0.7351308465003967, 0.07647088170051575, 0.07439037412405014, -0.25581052899360657, -0.089212007...
to the page background anymore. CSS3 allows you to set the opacity of the background using the `rgba()` expression, but IE doesn't support this ([Firefox 3 and Safari/Webkit do](http://css-tricks.com/examples/RGBaSupport/)). To get an rgba()-like effect in IE, you can use a `filter:` rule such as the following: ``` #...
[ -0.17083784937858582, -0.28395092487335205, 0.6304764747619629, -0.2597070336341858, -0.1542770266532898, -0.05687292665243149, 0.35531648993492126, -0.2470160275697708, -0.3347339630126953, -0.7880862355232239, -0.2835983633995056, 0.23861108720302582, -0.6222964525222778, -0.162395089864...
I know C# is getting a lot of parallel programming support, but AFAIK there is still no constructs for side-effects verification, right? I assume it's more tricky now that C# is already laid out. But are there plans to get this in? Or is F# the only .NET language that has constructs for side-effects verification? C# t...
[ 0.7961102724075317, 0.20610390603542328, 0.16936762630939484, 0.07090438902378082, -0.020293422043323517, -0.3496273159980774, -0.07228100299835205, -0.39115267992019653, 0.0531349778175354, -0.19878718256950378, 0.32308658957481384, 0.9905634522438049, -0.2728550136089325, -0.091627612709...
Unfortunately, they're internal. However, Microsoft.Contracts.\* is mostly born out of Spec# research, and Spec# has been folded into the Contracts APIs that will be part of .NET 4.0. We'll see what comes of this. I haven't checked to see if the pre-release .NET 4.0 bits contain any APIs like [Pure] or [Immutable] in ...
[ 0.6688892245292664, -0.005533312913030386, 0.2681725323200226, 0.10855881869792938, 0.04321647807955742, -0.19310344755649567, 0.2133968323469162, -0.2157575637102127, -0.0060765305534005165, -0.7622821927070618, 0.05098744109272957, 0.6774504780769348, 0.13229165971279144, 0.2132819443941...
the library, which suggests they will be in .NET 4.0. Woohoo! **edit 2** Now that .NET 4 has been released, I looked up these types. [[Pure]](https://msdn.microsoft.com/en-us/library/system.diagnostics.contracts.pureattribute%28v=vs.110%29.aspx) is still there in System.Diagnostics.Contracts namespace. It's not intend...
[ 0.23531416058540344, -0.17850534617900848, 0.22909978032112122, 0.1741146743297577, -0.19944098591804504, -0.024219699203968048, 0.19378018379211426, -0.4879879355430603, -0.034736473113298416, -0.513542890548706, 0.06719373911619186, 0.5775129795074463, -0.3101889193058014, 0.316536992788...
off that type. **Bottom line: it appears .NET 4 does nothing for side-effects verification.** **edit 3** With the recently (late 2011) previewed Microsoft Rosyln compiler-as-a-service tools -- believed to be scheduled for RTM in Visual Studio 2015 -- look like they'll be able to support stuff like this; you could writ...
[ 0.5495554804801941, -0.03299352899193764, 0.7214045524597168, -0.17463411390781403, -0.4869582951068878, -0.17257541418075562, 0.5564284920692444, 0.01439364068210125, -0.23183584213256836, -0.42917126417160034, 0.011982996016740799, 0.6812592148780823, 0.07630475610494614, 0.0413663648068...
a compiler extension for pure/immutability does indeed exist. However, that doesn't do anything for existing framework code, nor 3rd party library code. But on the horizon is a [C# 7 proposal for immutable types](https://github.com/dotnet/roslyn/issues/159). This would be enforced by the compiler and would introduce a ...
[ 0.3468116819858551, 0.035283803939819336, 0.4507879614830017, -0.02896908111870289, -0.07985778898000717, -0.24569346010684967, 0.39995521306991577, -0.22204315662384033, 0.045566804707050323, -0.4482063353061676, -0.3998565673828125, 0.5984549522399902, -0.6134263873100281, 0.301592767238...
string lastName, DateTimeOffset birthDay) { FirstName = firstName; // Properties can be assigned only in the constructor. LastName = lastName; BirthDay = birthDay; } public string FirstName { get; } // String is [Immutable], so OK to have as a readonly property public string La...
[ -0.3442694842815399, -0.37113845348358154, 0.7732901573181152, -0.23248830437660217, 0.1246926337480545, -0.21457724273204803, 0.052678294479846954, -0.057472605258226395, -0.46806642413139343, -0.7985385060310364, -0.17507830262184143, 0.07822681218385696, 0.37000858783721924, 0.655115067...
and it appears immutable types were dropped from C# 7. There's always hope for C# 8. :-) **edit 6** It's November 2017. C# 8 is coming into full view, and while we won't have pure functions, we will have [readonly structs](https://learn.microsoft.com/en-us/dotnet/csharp/reference-semantics-with-value-types). This make...
[ 0.0975695550441742, 0.11154324561357498, 1.0994693040847778, 0.17052598297595978, -0.0006940989405848086, -0.2995940148830414, 0.4215497374534607, 0.10526876896619797, -0.3900054693222046, -0.6691916584968567, -0.378152459859848, 0.6200190782546997, -0.35377436876296997, 0.2159784138202667...
for structs, as well as `record` structs. These also aid in the creation of immutable types.
[ 0.04880466312170029, 0.15878577530384064, 0.034640174359083176, -0.10573132336139679, -0.07777521759271622, -0.1764226257801056, 0.12127284705638885, 0.0232160072773695, -0.044660184532403946, -0.4809543490409851, -0.4311032295227051, 0.23715946078300476, -0.3182498514652252, -0.1042060106...
I'm using MS SQL Server but welcome comparitive solutions from other databases. This is the basic form of my query. It returns the number of calls per day from the 'incidentsm1' table: ``` SELECT COUNT(*) AS "Calls", MAX(open_time), open_day FROM ( SELECT incident_id, opened_by, open_time - (9.0/24) AS o...
[ -0.04543864727020264, 0.14781667292118073, 0.8579789400100708, -0.12708136439323425, -0.11290794610977173, 0.1698194444179535, 0.30776894092559814, -0.1462632268667221, -0.3369603455066681, -0.5547877550125122, -0.11530539393424988, 0.39903149008750916, -0.4682859182357788, 0.2616209685802...
no bar, and the user is like, "why does the graph only have six days and skip from Saturday to Monday?" Somehow I need to UNION ALL with a blank row from each day or something like that, but I can't figure it out. I am constrained to what I can do with one SQL statement and I have readonly access so I can't create a ...
[ 0.368395060300827, -0.03356892615556717, 0.7490358948707581, -0.0791444182395935, 0.05364937707781792, 0.19939376413822174, 0.02542020194232464, -0.15926876664161682, -0.44477957487106323, -0.6904129981994629, -0.1756107658147812, 0.307033896446228, -0.5852304697036743, 0.49926555156707764...
select datepart(dd,dateadd(day,-3,getdate())) as open_day union select datepart(dd,dateadd(day,-2,getdate())) as open_day union select datepart(dd,dateadd(day,-1,getdate())) as open_day union select datepart(dd,dateadd(day, 0,getdate())) as open_day ) days left join ( SELECT incident_id, opened_by, op...
[ -0.1440889984369278, -0.3258212208747864, 0.6810407638549805, -0.16455478966236115, 0.20527997612953186, 0.05748852714896202, 0.12354209274053574, -0.044096559286117554, -0.29391223192214966, -0.7337368726730347, -0.4791572690010071, 0.3068278133869171, -0.22215473651885986, 0.507115006446...
I want to do the moral equivalent of the following VBA code: ``` For Each col In Worksheets("Sheet1").Columns # do stuff Next col ``` I have generated MFC wrappers for the Excel type library that get me this far (the generated types all derive from `COleDispatchDriver`: ``` CApplication app; app.CreateDispatch(...
[ 0.3271077275276184, 0.04400661960244179, 0.6937386989593506, -0.12458871304988861, 0.2997351884841919, 0.1734808385372162, 0.4237789213657379, -0.32489630579948425, -0.07515774667263031, -0.605380117893219, -0.2757679522037506, 0.4150276482105255, -0.3285215497016907, 0.012945635244250298,...
and then get the column from the cell, but I was looking for a more direct translation of the above loop. (EDIT) Clarification: I don't actually care about the individual cells. My goal is to determine which columns have width 0 (are hidden) and delete them from the worksheet. I assume that you're trying to traverse a...
[ 0.1332380175590515, -0.017971588298678398, 0.7195687890052795, -0.07474560290575027, 0.12745891511440277, -0.06471721827983856, 0.4077341556549072, -0.5271720886230469, -0.4399471580982208, -0.6809449791908264, -0.4674411416053772, 0.30758145451545715, -0.5083217024803162, -0.0783964097499...
{ for (int j = 0; j <= nCols; j++) { Range cell = cells.get_Item(i+1,j+1); //Do stuff with individual cell } } ``` EDIT: In response to OP clarification: This will probably do what you're looking for: ``` CSheets sheets = book.get_WorkSheets(); CWorkSheet sheet = sheets.get_...
[ 0.012362014502286911, -0.14036399126052856, 0.9918351769447327, -0.07188337296247482, 0.22062143683433533, -0.1186460629105568, 0.23321814835071564, -0.5948717594146729, -0.686495840549469, -0.5865949988365173, -0.5328800678253174, 0.2667488157749176, -0.4433366656303406, 0.004656902048736...
Range topCellOfCol = cells.get_Item(1, i); Range entireCol = topCellOfCol.get_EntireColumn(); if (entireCol.get_Hidden()) entireCol.Delete( xlShiftToLeft ); } ```
[ -0.06283442676067352, -0.19759488105773926, 0.6223862767219543, -0.3727700710296631, 0.4815081059932709, 0.06770405173301697, 0.05246903747320175, -0.21983122825622559, -0.18574920296669006, -0.11907453089952469, -0.5463325381278992, 0.6890953779220581, -0.3880191743373871, -0.137290805578...
I'm looking for an alternative technique for rendering reflections in OpenGL ES on the iPhone. Usually I would do this by using the stencil buffer to mark where the reflection can be seen (the reflective surface) and then render the reversed image only in those pixels. Thus when the reflected object moves off the surfa...
[ 0.008390994742512703, -0.008682449348270893, 0.7102991938591003, 0.06446171551942825, -0.042313188314437866, 0.20789484679698944, 0.1958921104669571, 0.01936454512178898, 0.03126254677772522, -0.5937283635139465, 0.17183096706867218, 0.5952374339103699, -0.1773473620414734, 0.0077124489471...
they wouldn't be visible. Any ideas? Render the reflected scene first; copy out to a texture using `glCopyTexImage2D`; clear the framebuffer; draw the scene proper, applying the copied texture to the reflective surface.
[ 0.6432642936706543, -0.1621873676776886, 0.6203280091285706, 0.1929331123828888, 0.08088839799165726, 0.2282085418701172, -0.11822126805782318, -0.14537551999092102, 0.1563846915960312, -0.7926489114761353, -0.11010624468326569, 0.6397343873977661, -0.017100809141993523, -0.277125000953674...
I need something that runs in the background and go into my database and scan and update certain rows based on certain logic. I need this to run like every hour and my environment is Windows Server 2003, SqlServer 2005. Is WWF good for this purpose? Or should I create a Windows Service? And, what's difference between ...
[ 0.38329440355300903, 0.04438237100839615, 0.10989373177289963, -0.0016883023781701922, -0.3588739335536957, -0.08823637664318085, -0.17437131702899933, 0.04819750785827637, -0.0787644162774086, -0.4360853433609009, 0.7470919489860535, 0.7653170824050903, -0.1435268074274063, 0.027346739545...
it in WF is that MS is basically completely rewriting the next version of WF according to what MS said at PDC in Oct. There will be a way to run legacy 3.0/3.5 activities in 4.0, but my impression was that there are going to be major changes. Also, it sounds like you don't need the modular activity capability that WF ...
[ 0.35959339141845703, -0.08200658857822418, 0.5847747325897217, -0.28665438294410706, -0.09437333047389984, -0.28620028495788574, 0.22244122624397278, -0.34554460644721985, -0.37424302101135254, -0.7137028574943542, -0.1389884352684021, 0.4151865541934967, -0.5013007521629333, 0.02727333642...
would be a good choice if you had a business person that needed to constantly change the logic that was happening and you wanted to make a big investment in the management of this process you want to create. Also I agree that based on what you are saying you should consider creating an SSIS package in SQL Server, unle...
[ 0.09488283842802048, -0.14514979720115662, -0.17973966896533966, 0.38220444321632385, 0.10149773955345154, -0.28943830728530884, -0.007086225785315037, 0.17075924575328827, -0.23120790719985962, -0.7870554327964783, 0.2824469208717346, 0.4294256269931793, -0.09985052794218063, 0.1554820835...
I want to protect only certain numbers that are displayed after each request. There are about 30 such numbers. I was planning to have images generated in the place of those numerbers, but if the image is not warped as with captcha, wont scripts be able to decipher the number anyway? Also, how much of a performance hit ...
[ 0.5654129385948181, 0.20079414546489716, 0.2553771138191223, -0.032713692635297775, -0.2938305139541626, 0.014997445046901703, 0.5078222751617432, -0.1360507756471634, -0.04551960527896881, -0.8798511028289795, -0.12509411573410034, 0.6748132109642029, -0.047728028148412704, -0.18850810825...
I can poke into the flash file and get the values. You encrypt them in the flash and I can just run it then grab the output from the interpreter's display as a sequence of images. * You use images and I can just feed them through an OCR. You're in an arms race. What you need to do is make your information so useful an...
[ 0.6130804419517517, 0.2509414851665497, 0.14724712073802948, 0.193720743060112, -0.07960381358861923, -0.14390850067138672, 0.028457216918468475, 0.09615767002105713, -0.19642694294452667, -0.6935862302780151, 0.004361683968454599, 0.6856040358543396, -0.09427645057439804, -0.0256686713546...
Radical changes drive users away because the page is continually unfamiliar to them. Your image solution wont' help much, and images are far less efficient. A number is usually only a few bytes long in HTML encoding. Images start at a few hundred bytes and expand to a 1k or more depending on how large you want. Images...
[ 0.17129717767238617, -0.23418544232845306, 0.4959397614002228, 0.15142352879047394, -0.10879144817590714, 0.004483851604163647, 0.38267821073532104, -0.16439731419086456, -0.4606645107269287, -0.7963745594024658, -0.2321607917547226, 0.01614685170352459, -0.2736864984035492, 0.231055781245...
I was wondering if there is such a thing as regular expressions for sequential data that isn't a string. I know that regular expressions essentially boil down to DFAs, but I'm more interested in higher-level languages for specifying these DFAs. There is absolutely nothing in the theory of regular expressions that prev...
[ 0.2053649127483368, 0.020133987069129944, -0.17515844106674194, 0.18786108493804932, 0.02314676344394684, 0.19195754826068878, 0.09753356128931046, 0.2968328297138214, -0.2497749775648117, -0.16375522315502167, -0.32718411087989807, 0.4857085049152374, -0.436810165643692, -0.04356591776013...
use that engine to parse byte-oriented binary data. [Ragel](http://CompLang.Org/ragel/) is a state machine compiler that is specifically designed for parsing binary protocols. You write your state machine in a high-level (regexp-like) DSL and Ragel then compiles that into your target language – Ragel currently support...
[ 0.13366717100143433, -0.027453068643808365, -0.04904697835445404, 0.16200721263885498, -0.4119747281074524, -0.14138047397136688, 0.3683306574821472, -0.08864588290452957, -0.05582573637366295, -0.4899415671825409, 0.006714657414704561, 0.44165727496147156, -0.6316372156143188, 0.017857231...
superset of regular expressions, on steroids. It supports matching of not only strings of characters but also arrays and lists of integers and arbitrary objects.
[ -0.4491506814956665, -0.22268344461917877, 0.04637714475393295, 0.11714069545269012, -0.16416221857070923, 0.14063425362110138, 0.10155609250068665, -0.02740096114575863, -0.06007753685116768, -0.33033376932144165, -0.36578816175460815, 0.21985864639282227, -0.6369885802268982, -0.32491368...
I am looking to write a javascript function that will fire when a user submits a form, however I do not have edit access to the submit button so that I can add the onsubmit function. I am able to add a `<script>` tag, so if I can detect the submit, then I can execute my code. Anyone know how to do this? You can locate ...
[ 0.5189543962478638, -0.06542916595935822, 0.5232306122779846, 0.0719752162694931, 0.13549156486988068, -0.24133966863155365, 0.21267053484916687, -0.21438463032245636, 0.15220150351524353, -0.8162881731987, -0.19467924535274506, 0.833305299282074, -0.09391418099403381, 0.15461628139019012,...
I've inherited an application which depends on a third-party library, which in turn depends on Visual J#.NET. The application was previously being developed on Visual Studio 2005, and I've got it building mostly successfully on VS2008. Amongst other components, it included a Deployment Project which built a couple o...
[ 0.5166321396827698, 0.012872789986431599, 0.49686333537101746, -0.16669698059558868, 0.1287222057580948, -0.34437763690948486, 0.10284247994422913, -0.03397880122065544, -0.10390466451644897, -0.817073404788971, -0.10234233736991882, 0.5164512395858765, -0.19239932298660278, 0.238045379519...
no package I can find at the moment includes the merge module for VJ#. Although the project builds without error, the generated MSI fails to install. It starts, fails to detect the correctly installed VJ# on the machine, then displays a dialog box with only the text "1:" and two buttons "Yes" and "No". Clicking "Yes" o...
[ 0.5016390681266785, 0.057747501879930496, 0.2743634283542633, -0.23987723886966705, 0.01167324185371399, -0.07006470113992691, 0.3289426267147064, -0.17564167082309723, 0.1013294979929924, -0.8552055358886719, -0.45076167583465576, 0.7500287294387817, -0.4770253002643585, -0.07707717269659...
2008, and all its associated bits. * .NET 3.5 SP1 * .NET 1.1 * .NET 1.1 SDK * Visual J# 2.0 from <http://msdn.microsoft.com/en-au/vjsharp/bb188598.aspx> * Visual J# 1.1 from <http://msdn.microsoft.com/en-au/vjsharp/bb188598.aspx> Does anyone know where the merge module is located? Or how to correctly handle this launc...
[ 0.14603279531002045, 0.1656440943479538, 0.3163135349750519, 0.0683257058262825, -0.006694376468658447, -0.20215372741222382, 0.38349759578704834, -0.08050016313791275, -0.16839022934436798, -0.2682854235172272, -0.3091670572757721, 0.38442373275756836, -0.16621631383895874, 0.068909183144...
before your project msi launches.
[ 0.6015853881835938, -0.17535518109798431, 0.21336223185062408, 0.14287298917770386, 0.28133919835090637, -0.2627224028110504, -0.14085690677165985, 0.516645073890686, 0.06704454869031906, -0.5286269783973694, -0.11256076395511627, -0.033789101988077164, 0.13829949498176575, -0.046867344528...
I have two trees: 1. fooTree - made up of elements, 2. barTree - constructed by Both trees have MouseRightButtonDown event, but the e.Source type differs: 1. fooTree - System.Windows.Controls.TreeViewItem 2. barTree - System.Windows.Controls.TreeView Why e.Source differs? Also, how can I get the clicked item for t...
[ -0.07987295836210251, 0.025752078741788864, 0.20353342592716217, -0.05130843445658684, -0.07130853831768036, 0.30432599782943726, 0.19707711040973663, -0.5560083389282227, 0.06950312852859497, -0.7627501487731934, 0.09799613803625107, 0.2573379874229431, -0.18554438650608063, 0.07461181282...
<TextBlock Text="{Binding}" /> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView> ``` Code: ``` public partial class Window1 : Window { public Window1() { InitializeComponent(); this.DataContext = this; } public string[] BarItems { ge...
[ -0.1891622394323349, -0.23776400089263916, 0.44470420479774475, -0.2581811249256134, -0.08172397315502167, 0.3357703685760498, 0.2859627604484558, -0.1313210129737854, 0.028195537626743317, -0.7859026789665222, -0.7291358709335327, 0.43383103609085083, -0.2821756601333618, 0.12598785758018...
"bar", "bar" }; } } private void barTree_MouseDown(object sender, MouseButtonEventArgs e) { } private void fooTree_MouseDown(object sender, MouseButtonEventArgs e) { } } ``` Don't know why this happens, but at least I have found a solution: <http://social.msdn.microsoft.com/Forums/en-U...
[ 0.056887682527303696, -0.007163697388023138, 0.49633169174194336, -0.2742331027984619, 0.007563198450952768, 0.1028488501906395, 0.35035744309425354, -0.17852158844470978, -0.09152433276176453, -0.8253925442695618, -0.09188980609178543, 0.41363537311553955, -0.38027694821357727, 0.21680589...
System.Windows.Media.VisualTreeHelper.GetParent. > 2. You could try registering a class handler for type TreeViewItem and the > mouse down event. Then, your handler > should only be called when mouse > events pass through TreeViewItem > elements. > 3. You could register a class handler for type TreeViewItem and the...
[ 0.13194020092487335, -0.18618910014629364, 0.4100111424922943, -0.16702155768871307, 0.017448946833610535, 0.04825239256024361, 0.41028687357902527, -0.27067288756370544, -0.28694137930870056, -0.7575710415840149, -0.05629296600818634, 0.6712974309921265, -0.4132159650325775, 0.13671790063...
source; } ```
[ -0.108644999563694, 0.3001459538936615, 0.10779602825641632, -0.21641959249973297, 0.3284519612789154, -0.009598296135663986, -0.021599648520350456, 0.33270978927612305, 0.2699267268180847, -0.5389074683189392, -0.3158170282840729, 0.6901305317878723, -0.36700236797332764, 0.41665828227996...
An activity indicator view is useful in many applications. Any ideas about how to add, activiate and dismiss an activity indicator view on iPhone? All the methods for this are welcomed here. Create: ``` spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; ...
[ 0.018442770466208458, -0.3452582359313965, 0.8848814964294434, -0.1432453989982605, -0.08704745769500732, -0.36453142762184143, 0.43586409091949463, 0.16114704310894012, -0.0875469371676445, -0.6409987211227417, -0.205963134765625, 0.5947582721710205, -0.3812336325645447, -0.17209520936012...
Working on a particular application, I keep writing very similar queries, again and again. They're not exactly the same, but are of very similar form, and embedded in almost identical chunks of code, *e.g.*, ``` $Mysqli = new mysqli; if ($Stmt = $Mysqli->prepare("SELECT foo FROM tblFoo
[ 0.4258100688457489, 0.27685457468032837, 0.14662978053092957, -0.28960028290748596, 0.1808905303478241, -0.06930605322122574, 0.46395978331565857, -0.1117691695690155, -0.05013248696923256, -0.7173321843147278, -0.09423904120922089, 0.3210804760456085, -0.39418238401412964, 0.1849427819252...
WHERE something = ?")) { $Stmt->bind_param('s', $this->_something); $Stmt->execute(); if (0 != $Stmt->errno) throw new Exception("blah, blah, blah"); $Stmt->bind_result($foo); while ($Stmt->fetch()){ $this->_foos[] = new Foo($foo); } $Stmt->close(); } else { throw...
[ 0.15072885155677795, -0.09220169484615326, 0.6404944658279419, -0.5211482048034668, 0.2156147062778473, -0.0026048803701996803, 0.4148634970188141, -0.6487369537353516, -0.339632511138916, -0.4563821852207184, -0.5595546364784241, 0.4048343300819397, -0.472713440656662, 0.23184575140476227...
FROM tblBar WHERE somethingElse = ?")) { $Stmt->bind_param('s', $this->_somethingElse); $Stmt->execute(); if (0 != $Stmt->errno) throw new Exception("blah, blah, blah"); $Stmt->bind_result($bar, $baz);
[ 0.3577013909816742, -0.30177417397499084, 0.42876219749450684, -0.6257994174957275, 0.15522514283657074, -0.09247946739196777, 0.5628934502601624, -0.6777910590171814, -0.09510347992181778, -0.33159011602401733, -0.6003847718238831, 0.41248777508735657, -0.6364684700965881, 0.2208581566810...
while ($Stmt->fetch()){ // do something else with $bar and $baz } $Stmt->close(); } else { throw new Exception("blah, blah, blah");); } } ``` ... and then another, and elsewhere another ... etc. Is this a real violation of DRY? It doesn't seem to make sense to write a class for perfor...
[ 0.19073566794395447, 0.025166897103190422, 0.6065580248832703, -0.07442309707403183, -0.08744214475154877, 0.10846927016973495, 0.38119953870773315, -0.3137001097202301, -0.2529424726963043, -0.48529744148254395, -0.07761482894420624, 0.5158742070198059, -0.5333656668663025, 0.168082892894...
time, I can't shake this nagging feeling that I'm repeating myself. Maybe it's just that there are only so many ways to write a simple query and that a certain amount of repetition like this is to be expected. Thoughts? A lot of people do exactly this. Create a class representing each table, that all inherit from the...
[ 0.5700438618659973, -0.011977298185229301, 0.0797317624092102, 0.3270261585712433, -0.26390424370765686, -0.041781120002269745, 0.3162097632884979, 0.06247967854142189, -0.558748722076416, -0.5857759118080139, 0.323320209980011, 0.4537428021430969, -0.33127716183662415, 0.20792488753795624...
that handle a lot of the dirty work for you.
[ 0.6521092653274536, 0.7254071831703186, -0.2595229744911194, 0.1735849380493164, -0.06346380710601807, -0.14300842583179474, 0.12254662066698074, 0.20225511491298676, -0.23148351907730103, -0.10773104429244995, 0.3474172353744507, 0.6711216568946838, 0.1071595549583435, -0.1655064374208450...
``` type TStaticArray = array[1..10] of integer; TDynamicArray = array of integer; TMyClass = class(TObject) private FStaticArray: TStaticArray; FDynamicArray: TDynamicArray; published property staticArray: TStaticArray read FStaticArray write FStaticArray; //compiler chokes on this ...
[ 0.09833824634552002, -0.08801411092281342, 0.4163733124732971, 0.10908007621765137, -0.015131543390452862, -0.06398788094520569, 0.3351161479949951, -0.19104857742786407, -0.13165169954299927, -0.020085254684090614, -0.14202210307121277, 0.7668766975402832, -0.5299788117408752, 0.237024188...
I'm confused. Anyone know the reasoning behind this, and how I can work around it? (And no, I don't want to redeclare all my static arrays as dynamic. They're the size they are for a reason.) Published declaration tells the compiler to store information in the virtual method table. Only certain kinds of information can...
[ 0.18718977272510529, 0.245540589094162, 0.1999957263469696, 0.14139379560947418, 0.022635813802480698, -0.2991254925727844, 0.14631013572216034, -0.08273722231388092, -0.2535812258720398, -0.44768109917640686, -0.22746869921684265, 0.23892328143119812, -0.2701132595539093, 0.22944793105125...
I'm developing an application in Silverlight2 and trying to follow the Model-View-ViewModel pattern. I am binding the IsEnabled property on some controls to a boolean property on the ViewModel. I'm running into problems when those properties are derived from other properties. Let's say I have a Save button that I only...
[ 0.15025527775287628, 0.05869231000542641, 0.43926185369491577, -0.14879468083381653, 0.14353469014167786, -0.16154709458351135, -0.04997357726097107, 0.05162131041288376, -0.1868247389793396, -0.6911398768424988, 0.05511614307761192, 0.6788109540939331, -0.5300242304801941, 0.3522435724735...
get { return m_DatabaseBusy; } set { if (m_DatabaseBusy != value) { m_DatabaseBusy = value; OnPropertyChanged("DatabaseBusy"); }
[ -0.5241098999977112, -0.31075751781463623, 0.5661027431488037, -0.05039194971323013, 0.3537602722644806, 0.10729675740003586, 0.05375374108552933, -0.13679815828800201, -0.014999833889305592, -0.5494791269302368, -0.46451035141944885, 0.7729544639587402, -0.3318032920360565, -0.06078955903...
} } private bool m_IsLoaded; public bool IsLoaded { get { return m_IsLoaded; } set { if (m_IsLoaded != value) { m_IsLoaded = value;
[ -0.10966340452432632, -0.2330380380153656, 0.28273946046829224, -0.3471629321575165, 0.050785720348358154, -0.10517427325248718, 0.3155819773674011, -0.1761598289012909, -0.037230536341667175, -0.1410013884305954, -0.7415825128555298, 0.8576470017433167, -0.4526670277118683, -0.29882931709...
OnPropertyChanged("IsLoaded"); } } } ``` Now what I want to do is this: ``` public bool CanSave { get { return this.IsLoaded && !this.DatabaseBusy; } } ``` But note the lack of property-changed notification. So the question is: What is a clean way of exposing a single boolean property...
[ 0.24062062799930573, -0.025433413684368134, 0.3445133864879608, -0.23956480622291565, 0.013273252174258232, -0.32202205061912537, 0.24690115451812744, -0.223567396402359, -0.1402703821659088, -0.6974108219146729, -0.11126133054494858, 0.5737364888191223, -0.4374487102031708, 0.028885900974...
*Thanks for the help everyone - I got it going and had a go at making a custom attribute. I'm posting the source here in case anyone's interested. I'm sure it could be done in a cleaner way, so if you see any flaws, add a comment or an answer.* Basically what I did was made an interface that defined a list of key-valu...
[ 0.09789121150970459, 0.051613401621580124, 0.1575872302055359, 0.11755263060331345, -0.09847252815961838, 0.33580783009529114, 0.04912060871720314, -0.1845507174730301, -0.1050114631652832, -0.6296145915985107, 0.2894200086593628, 0.5887899994850159, -0.05808808654546738, 0.405247807502746...
each property: ``` [AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = false)] public class NotifyDependsOnAttribute : Attribute { public string DependsOn { get; set; } public NotifyDependsOnAttribute(string dependsOn) { this.DependsOn = dependsOn; } public static ...
[ 0.16972872614860535, -0.0235690176486969, 0.5176578164100647, -0.2430458962917328, -0.048191774636507034, 0.28928396105766296, 0.2926691472530365, -0.5382355451583862, -0.11765211820602417, -0.5382087826728821, -0.3348153531551361, 0.6461266875267029, -0.44769811630249023, -0.0445496886968...
var obj_interface = (obj as INotifyDependentPropertyChanged); if (obj_interface == null) { throw new Exception(string.Format("Type {0} does not implement INotifyDependentPropertyChanged.",obj.GetType().Name)); } obj_interface.DependentPropertyList.Clear(); // Build...
[ -0.14476796984672546, -0.08542128652334213, 0.649834394454956, -0.2528175711631775, 0.13798703253269196, 0.32093551754951477, 0.5217334628105164, -0.4872625768184662, -0.16960927844047546, -0.6016157269477844, -0.19541743397712708, 0.74436354637146, -0.5776759386062622, 0.26258915662765503...
// Find all of our attributes (may be multiple). var attributeArray = (NotifyDependsOnAttribute[])property.GetCustomAttributes(typeof(NotifyDependsOnAttribute), false); foreach (var attribute in attributeArray) { obj_interface.DependentPropertyList.Add(new KeyValuePa...
[ 0.02950669638812542, -0.17601603269577026, 0.49691852927207947, -0.004153418820351362, 0.16342979669570923, 0.2992224395275116, 0.4783288538455963, -0.6157987117767334, 0.004496184643357992, -0.4937955141067505, 0.03239316865801811, 0.8866223096847534, -0.3478158116340637, 0.03297704458236...
} } } ``` The attribute itself only stores a single string. You can define multiple dependencies per property. The guts of the attribute is in the BuildDependentPropertyList static function. You have to call this in the constructor of your class. (Anyone know if there's a way to do this via a class/constructor at...
[ 0.0018039491260424256, 0.0903196856379509, 0.06594755500555038, -0.026730723679065704, 0.053069524466991425, -0.1764262616634369, 0.04358535632491112, 0.22517670691013336, -0.1101379320025444, -0.6113324165344238, 0.10163889080286026, 0.771800696849823, -0.32171204686164856, 0.202759027481...
ViewModel : INotifyPropertyChanged, INotifyDependentPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanged(string propertyname) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(proper...
[ -0.07562192529439926, -0.41242191195487976, 0.7042850255966187, -0.1034708023071289, 0.35054782032966614, 0.16466693580150604, 0.24406413733959198, -0.25514549016952515, -0.2437378317117691, -0.4247545897960663, -0.25009629130363464, 0.9383881092071533, -0.2547439634799957, 0.2190364301204...
{ PropertyChanged(this, new PropertyChangedEventArgs(p.Value)); } } } private List<KeyValuePair<string, string>> m_DependentPropertyList = new List<KeyValuePair<string, string>>(); public List<KeyValuePair<string, string>> DependentPropertyList { get { return...
[ 0.03074391931295395, -0.45669659972190857, 0.8750545978546143, -0.33370664715766907, 0.2729315757751465, 0.06621614843606949, 0.4758414328098297, -0.4401162564754486, -0.14963169395923615, -0.6289885640144348, -0.21555489301681519, 1.1657012701034546, -0.16753745079040527, 0.07084099203348...
} } ``` Finally, you set the attributes on the affected properties. I like this way because the derived property holds the properties it depends on, rather than the other way around. ``` [NotifyDependsOn("Session")] [NotifyDependsOn("DatabaseBusy")] public bool SaveEnabled { get { return !th...
[ 0.09657465666532516, 0.0070801847614347935, 0.28596338629722595, -0.1545266956090927, 0.12247193604707718, -0.26033106446266174, 0.47500598430633545, 0.10483868420124054, -0.1778104156255722, -0.6670832633972168, -0.1884080022573471, 0.7438514232635498, -0.3149595856666565, 0.2406290322542...
I get around this is to subscribe to this.Session.NotifyPropertyChanged and fire PropertyChanged for "Session". (Yes, this would result in events firing where they didnt need to) The traditional way to do this is to add an OnPropertyChanged call to each of the properties that might affect your calculated one, like this...
[ 0.23432371020317078, 0.0023003832902759314, 0.41859471797943115, -0.1500653177499771, -0.006050777155905962, -0.42142245173454285, 0.48452436923980713, -0.33712494373321533, -0.16383737325668335, -0.34113645553588867, -0.09845586866140366, 0.8535036444664001, -0.27532920241355896, 0.070075...
value; OnPropertyChanged("IsLoaded"); OnPropertyChanged("CanSave"); } } } ``` This can get a bit messy (if, for example, your calculation in CanSave changes). One (cleaner? I don't know) way to get around this would be to override OnPropertyChanged and make the call there: ``` pr...
[ 0.28651636838912964, -0.06654830276966095, 0.6087692975997925, -0.2898291349411011, 0.3497758209705353, -0.002411213703453541, 0.09285090863704681, -0.4245813190937042, -0.32373282313346863, -0.493511825799942, -0.009608214721083641, 0.6965905427932739, -0.46563732624053955, 0.217570632696...
base.OnPropertyChanged("CanSave"); } } ```
[ -0.12543925642967224, 0.1587146669626236, 0.07736766338348389, -0.3615580201148987, 0.33260297775268555, -0.015539686195552349, 0.017128733918070793, 0.04253992438316345, -0.1242021843791008, -0.3052060306072235, -0.2815525531768799, 0.557688295841217, -0.4276016354560852, 0.02962181344628...
I am trying to use an autorun.inf to run my executable file under a sub-folder with space in its folder name. Like this: ``` H:\ autorun.inf FOLDER NAME 1 file.exe FOLDER NAME 2 some other stuffs ``` If there's no space in the folder name, it works well. But if there are some, it's not wo...
[ 0.5079925656318665, 0.09042523056268692, 0.12476210296154022, -0.07102777808904648, 0.06209355220198631, -0.1201506108045578, 0.43612509965896606, 0.046771157532930374, -0.22285161912441254, -0.606765866279602, 0.028116604313254356, 0.689602792263031, -0.5797981023788452, -0.05563193932175...
quotes are needed. Sounds strange though. open=""FOLDER NAME 1\Setup.exe""
[ 0.5838751196861267, 0.21961358189582825, 0.2868219316005707, 0.21808743476867676, 0.2591778337955475, -0.3298906683921814, -0.16550499200820923, 0.22763513028621674, -0.26667824387550354, -0.40272262692451477, -0.22136302292346954, 0.42054396867752075, -0.364069402217865, 0.095576100051403...
I've got two different apps that I am hosting (well the second one is about to go up) on Amazon EC2. How can I work with both accounts at the command line (Mac OS X) but keep the EC2 keys & certificates separate? Do I need to change my environment variables before each ec2-\* command? Would using an alias and having ...
[ 0.2779281437397003, 0.2032553255558014, 0.33588817715644836, 0.18722312152385712, 0.3883479833602905, -0.23122386634349823, 0.4089100658893585, -0.03172064572572708, -0.18446233868598938, -0.8917662501335144, 0.19218996167182922, 0.8573880195617676, -0.1373312622308731, -0.0302276182919740...
these inside aliases, e.g. ``` alias ec2-describe-instances1 ec2-describe-instances -K /path/to/key.pem ```
[ 0.05140457674860954, 0.06824621558189392, 0.23945003747940063, 0.1651756912469864, 0.1793331503868103, -0.2596910297870636, 0.2894880473613739, -0.12670406699180603, -0.03127380087971687, -0.6610715389251709, -0.21158689260482788, 0.36195772886276245, -0.08033077418804169, 0.03320340812206...
I'm having a hard time picking up how to grab the dimensions of an element with jQuery. Here is my sample code: ``` $(document).ready(function() { var width = $("#image_1").width(); var height = $("#image_1").height(); document.write(width); document.write(height); }); ``` Now ...
[ 0.13906769454479218, 0.06128745153546333, 0.5044059753417969, -0.13023154437541962, 0.03081010840833187, 0.1660926789045334, 0.0856618732213974, -0.4455430507659912, -0.2533492147922516, -0.7635937333106995, 0.1082727313041687, 0.5292136669158936, -0.0606970377266407, 0.02941233664751053, ...
for the help from a javascript newb. This works for me: ``` <head> <script type="text/javascript"> function foo() { var image = document.getElementById("the_image"); alert(image.offsetWidth); alert(image.offsetHeight); } </script> </head> <body onload="foo();...
[ 0.1834239810705185, -0.06708360463380814, 0.8035417795181274, -0.28642508387565613, -0.09521118551492691, 0.015258226543664932, 0.050018709152936935, -0.44529956579208374, -0.19664278626441956, -0.7033563852310181, -0.1711427867412567, 0.8544642925262451, -0.22596366703510284, -0.283738493...
has the advantage of not requiring jQuery, at all.
[ 0.03978605195879936, 0.03249068558216095, 0.29746106266975403, 0.0670870989561081, 0.26552748680114746, -0.15612447261810303, -0.36860597133636475, 0.46156203746795654, -0.16863849759101868, -0.33284279704093933, -0.3804969787597656, 0.3017038404941559, 0.5568092465400696, -0.1819763630628...
What is the easiest language to build Windows services in? Easiest in this case would be defined as least amount of code, and lowest point of entry into the language. At the risk of stating the obvious, if you have any C/C++/Java background, I think C# offers you the lowest point of entry. Assuming you're using Visua...
[ -0.022005748003721237, 0.1550435870885849, 0.28200358152389526, -0.30967649817466736, -0.1437743902206421, 0.08578488230705261, 0.29405707120895386, 0.024045083671808243, -0.0809970274567604, -0.7036188244819641, -0.2939339578151703, 0.3812500834465027, -0.1555889993906021, -0.073563039302...
this point, you have all the basics for your Windows service. The Program.cs file contains the Main() method for your service, and Service1.cs defines the System.ServiceProcess.ServiceBase component that is your new Windows service. 4. In the Property Grid for your Service1 component, consider setting the following pro...
[ 0.1937839686870575, 0.10979899019002914, 0.3485391139984131, -0.20302137732505798, -0.011067476123571396, -0.2337208390235901, 0.42504051327705383, -0.16883915662765503, -0.2671012878417969, -0.6666306257247925, -0.13527056574821472, 0.5323618650436401, -0.24898557364940643, 0.103350676596...
- see below) * CanShutdown - set to `true` if you want to handle system shutdowns * ServiceName - defines the name by which your service will be known to the Service Control Manager (SCM) 5. In the code for ServiceExample, the OnStart() and OnStop() virtual functions are stubbed out. You'll need to fill these in with...
[ 0.3947898745536804, 0.08709627389907837, 0.5922653675079346, -0.2552868127822876, 0.0983879417181015, -0.300332248210907, 0.5765699148178101, -0.04663616791367531, 0.13663217425346375, -0.578342616558075, -0.29388779401779175, 0.6479203701019287, 0.036883410066366196, 0.30732789635658264, ...
still need a way to install it. To do this, open the ServiceExample component in the designer. Right-click anywhere in the designer panel, and select the Add Installer menu option. This adds a ProjectInstaller component to your project, which contains two additional components - serviceProcessInstaller1 and serviceInst...
[ 0.09953910857439041, -0.15597029030323029, 0.7842590808868408, 0.025630544871091843, 0.35325509309768677, -0.2660277783870697, 0.5142942070960999, -0.043278444558382034, -0.11062955856323242, -0.7899646162986755, -0.18904049694538116, 0.5017423033714294, -0.07184823602437973, 0.24202296137...
the serviceInstaller1 component in the designer. In the Property Grid, consider setting the following properties: * (Name) - give you object an intuitive name, e.g., serviceInstaller * Description - the service's description which will show up in the SCM for your service * DisplayName - the friendly name for your se...
[ -0.13307331502437592, -0.26378244161605835, 0.5499605536460876, -0.1519450694322586, -0.19028057157993317, -0.03384774178266525, 0.34736496210098267, -0.16778527200222015, -0.06069157272577286, -0.8220203518867493, -0.42721158266067505, 0.43642881512641907, -0.21498170495033264, 0.25520220...
writing events to my own event log instead of the Application event log. To do this, you'll need to replace the default EventLogInstaller in your ProjectInstaller with a custom one. Make your code for your ProjectInstaller look like this: --- ``` using System.Diagnostics; [RunInstaller(true)] public partial class Pro...
[ 0.04299316927790642, -0.49859437346458435, 0.07131147384643555, -0.16570153832435608, 0.24400238692760468, -0.296276330947876, 0.4754239320755005, -0.10758177936077118, -0.06232966482639313, -0.7090256214141846, -0.4299624562263489, 0.8465858697891235, -0.3815859854221344, -0.0832355618476...
installer.Log = "ServiceExample"; // enter your event log name here } } private EventLogInstaller FindInstaller(InstallerCollection installers) { foreach (Installer installer in installers) { if (installer is EventLogInstaller) { return (Event...
[ -0.0992758721113205, -0.4841308891773224, 0.280572772026062, -0.4644276797771454, 0.2667689919471741, -0.2559712529182434, 0.38186678290367126, -0.0015096927527338266, -0.0169973261654377, -0.82583087682724, -0.6197664737701416, 1.0245153903961182, -0.352298378944397, -0.03952028974890709,...
} EventLogInstaller eventLogInstaller = FindInstaller(installer.Installers); if (eventLogInstaller != null) { return eventLogInstaller; } } return null;
[ -0.2859613001346588, -0.5140393972396851, 0.06192675977945328, -0.316743403673172, 0.16054083406925201, -0.201513409614563, 0.44473910331726074, 0.14209939539432526, -0.07956739515066147, -0.5599424839019775, -0.44995710253715515, 0.9396049380302429, -0.48710545897483826, 0.015675775706768...
} } ``` At this point, you can build your project to get your Windows service executable. To install your service, open the Visual Studio 2008 command prompt, and navigate to the Debug or Release directory where your executable is. At the command prompt, type the following: **InstallUtil ServiceExample.exe**. This wi...
[ 0.3967107832431793, 0.12328594923019409, 0.3216099739074707, -0.3615745007991791, -0.05975699424743652, -0.08446379750967026, 0.5243312120437622, 0.116007961332798, 0.11554567515850067, -0.9647915363311768, -0.3503269553184509, 0.7354397773742676, -0.2537805140018463, 0.35344913601875305, ...
it. However, you will be unable to overwrite the executable with your fixes and enhancements as long as it is running. To see your service in action, open the ServiceExample.cs file and make the following changes: ``` using System.Diagnostics; public partial class ServiceExample : ServiceBase { public ServiceExam...
[ 0.18895550072193146, -0.3392558991909027, 0.35351648926734924, -0.20776665210723877, 0.18111835420131683, -0.32637819647789, 0.5646462440490723, 0.02947036363184452, -0.12844787538051605, -0.7254398465156555, -0.6109539270401001, 0.42814892530441284, -0.29374510049819946, 0.157750502228736...
// ServiceExample event log created when the service was installed. EventLog.Log = "ServiceExample"; } protected override void OnStart(string[] args) { EventLog.WriteEntry("The service was started successfully.", EventLogEntryType.Information); } protected override void OnStop() ...
[ 0.0559907928109169, -0.3032861649990082, 0.47218844294548035, -0.38163691759109497, 0.28099966049194336, -0.04211852326989174, 0.771321713924408, -0.11035649478435516, -0.01639900915324688, -0.2543322741985321, -0.5947604179382324, 0.7440060377120972, -0.17684140801429749, 0.11032652109861...
EventLog.WriteEntry("The service was shutdown successfully", EventLogEntryType.Information); } } ``` Once you run your service with these changes, you can look at the ServiceExample event log in the Event Viewer and see the messages logged there. Hope this helps. EDIT: If you prefer to use the Application event...
[ 0.2882234752178192, -0.07162337750196457, 0.2917548716068268, -0.16834956407546997, 0.016101239249110222, -0.40479782223701477, 0.7097176313400269, 0.07978271692991257, -0.2881739139556885, -0.945202648639679, -0.37557992339134216, 0.5652444958686829, -0.2278834879398346, 0.157013639807701...
event log.
[ -0.072255440056324, -0.17118997871875763, 0.15379545092582703, 0.2166339010000229, 0.09553027153015137, -0.4185953736305237, 0.22423705458641052, 0.07148953527212143, -0.21011516451835632, -0.40093857049942017, -0.2050590217113495, 0.20910044014453888, 0.032364942133426666, -0.164287954568...