text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
public override void ExecuteResult(ControllerContext context) { context.HttpContext.Response.Clear(); context.HttpContext.Response.StatusCode = 201; context.HttpContext.Response.ClearHeaders(); context.HttpContext.Response.AddHeader("Location", Location); } } ``` And my action ...
[ -0.1375960409641266, -0.38585302233695984, 0.6827160120010376, -0.06651753187179565, 0.15022780001163483, 0.1268032342195511, 0.44347161054611206, -0.619779646396637, -0.26707401871681213, -0.4856831133365631, -0.3362911641597748, 0.4663490653038025, -0.2823638617992401, 0.2132247984409332...
= newEntity.Id }) }; return result; } ``` However, IE, Firefox and Chrome all fail to redirect to the new resource. Have I messed up generating the correct response, or do web browsers not expect this type of response, instead relying on servers to send a Redirect response? Redirect after post or post/redirect/ge...
[ 0.20199930667877197, -0.27089279890060425, 0.690001368522644, -0.2577466368675232, -0.1031109169125557, -0.16885991394519806, 0.5760402083396912, -0.293612539768219, -0.32852891087532043, -0.756805419921875, -0.23821395635604858, 0.45794111490249634, -0.2560769319534302, 0.2282284498214721...
and do NOT redirect after post. It works like this. 1. The browser POSTS the data. 2. Your application validates the data. If it's invalid, you respond with the form so they can fix it and POST. 3. Your application responds with a redirect. 4. The browser gets the redirect and does a GET. 5. Your application sees the...
[ 0.0011062136618420482, -0.1568419635295868, 0.8982803821563721, 0.30231449007987976, -0.11338763684034348, -0.1696896106004715, 0.4358978569507599, -0.1343846172094345, -0.09597761183977127, -0.4135802388191223, -0.5568064451217651, 0.7751283049583435, -0.21925076842308044, -0.179271608591...
I have set up cruisecontrol.net cs for my project that has a number of modules and components that get build and get stored in folder by date on the build machine.The thing is that I need to make setup for the application(wpf non web) and the thing is that since there are a number of module and different solutions that...
[ 0.5291840434074402, -0.13754984736442566, 0.6620662212371826, 0.14574803411960602, 0.1930808275938034, -0.32806622982025146, 0.0450291708111763, 0.14287331700325012, -0.32926490902900696, -0.7163020372390747, 0.26037710905075073, 0.6336841583251953, 0.2984963655471802, 0.03491967171430588,...
I was planning to install something on the build machine that would pick up the files from the folder (what folder?) and make the setup... A link to illustrate the point is [Firefox's nightly build](https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2008/). Any advice guys Thanks in advance. I am finding that t...
[ 0.5414751172065735, 0.478349506855011, 0.24323798716068268, -0.17019233107566833, -0.03114023059606552, -0.23935319483280182, 0.22791343927383423, 0.04700692743062973, -0.2570267617702484, -0.5103380084037781, -0.11142969876527786, 0.7695887088775635, -0.23476649820804596, -0.1545369625091...
best for compiling your component projects * Use MSBuild to create WIX installers, though I have also used MSBuild to create InnoSetup and Wise Installation Studio installations * Use MSBuild to update the AssemblyInfo.cs files for any projects that you want the build script to control * Use your source control command...
[ 0.7665969729423523, 0.17240415513515472, 0.3724863529205322, -0.2809898555278778, 0.038052741438150406, -0.11920890212059021, 0.2199995517730713, 0.03618019446730614, -0.07340850681066513, -0.9816132187843323, -0.007645116653293371, 0.6882961988449097, -0.13725709915161133, -0.273280799388...
like to generate a build notice email at the end. As for **installer recommendations**, there is a trade-off. For fast generation, use a script installer like NSIS or Inno Setup. The drawback is not being Windows Installer compatible. For Windows Installer products, using Wise or InstallShield are faster to generate...
[ 0.6856866478919983, 0.13866211473941803, 0.15500983595848083, 0.0017941208789125085, -0.09879782050848007, -0.32654857635498047, 0.29335418343544006, 0.03733880817890167, 0.16913986206054688, -1.0337026119232178, 0.18542379140853882, 0.9684950113296509, -0.0810958668589592, -0.161916106939...
had some success with installation bundling with Inno Setup as Windows Installer bundling and chaining (at least for Windows XP) is a real pain.
[ 0.06307243555784225, 0.08015675842761993, 0.2806699872016907, 0.03621615469455719, -0.07590018957853317, -0.4332644045352936, 0.2817506790161133, 0.04461567848920822, -0.06855101883411407, -0.47165173292160034, -0.1189461499452591, 0.7823818325996399, -0.22015883028507233, -0.0719635263085...
I am looking for some material giving introduction to DAO and ADO usage in VBA. Most of the material i came across give examples of how to use them. I am looking for a broader theory based definition of what they are and how they came about and the requirements for their usage. thanks regards tksy See [Data Access Us...
[ 0.2973463535308838, 0.1456596553325653, 0.17566801607608795, 0.023948336020112038, -0.14831991493701935, -0.0002971366629935801, -0.16643139719963074, -0.1263946294784546, -0.3528243601322174, -0.3889966607093811, -0.2385154813528061, 0.36959782242774963, -0.12230857461690903, 0.1902110576...
I have to use a smart pointer and I found "shared\_ptr" from boost looks good. I downloaded the boost library and I can see many files and libraries there. Is there any way to use only the shared\_ptr ? [`boost bcp`](http://www.boost.org/doc/libs/1_37_0/tools/bcp/bcp.html) is your friend. It allows extracting individua...
[ 0.318374365568161, -0.04580066725611687, 0.13972482085227966, 0.26931971311569214, -0.2341482937335968, -0.15834172070026398, 0.01870122179389, 0.11929492652416229, -0.1959453523159027, -0.3633982837200165, 0.17925062775611877, 0.588123083114624, -0.10849622637033463, -0.1233174279332161, ...
I'm trying to get the exact equivalent (not functional) of this vb.net code in F#: ``` Function FastPow(ByVal num As Double, ByVal exp As Integer) As Double Dim res As Double = 1 If exp < 1 Then If exp = 0 Then Return res exp = -exp num = 1 / num End If Do While exp > 1 If exp Mod 2...
[ 0.19856800138950348, -0.7581479549407959, 0.5588717460632324, -0.3195306062698364, -0.0107939587906003, 0.04044921696186066, 0.30247762799263, -0.2940879762172699, -0.3216211795806885, -0.36146873235702515, -0.22253958880901337, 0.723359227180481, -0.2526746094226837, -0.08657973259687424,...
res = res * num num = num * num exp = exp >> 1 Loop Return res * num End Function ``` I wrote this: ``` let FastPow num exp = let mutable ex = exp let mutable res = 1 let mutable n = num if ex < 1 then if ex = 0 then res ex <- -ex n <- 1 / n
[ -0.15913031995296478, -0.6197736263275146, 0.5955663919448853, -0.14717015624046326, 0.04189886152744293, 0.03375121206045151, 0.5064811110496521, -0.5146846771240234, -0.20430538058280945, -0.4481920003890991, -0.3595888912677765, 0.7313891053199768, 0.09435006976127625, 0.312166094779968...
while ex > 1 do if (ex % 2 = 1) then res <- res * n n <- n * n exp >>> 1 res * n ``` but in the line "if ex = 0 then res" at res I got an error: "This expression has type int but is here used with type unit". I cannot understand why it gives me that error. Edit: i actually got a ...
[ 0.14356888830661774, -0.37400954961776733, 0.29653769731521606, -0.29874545335769653, 0.13792063295841217, 0.08003160357475281, 0.6537927389144897, -0.39613181352615356, -0.14058028161525726, -0.517142117023468, -0.19018441438674927, 0.573558509349823, -0.3245767056941986, 0.35890808701515...
as well: "This expression should have type 'unit', but has type 'int'." at "if (ex % 2 = 1) then" In F#, a function's return value is the last expression evaluated in the function. So, lets focus on the following: ``` if ex < 1 then if ex = 0 then res (* <--- this is not an early return *) ex <...
[ -0.07587971538305283, -0.2667759358882904, 0.5109441876411438, -0.29368212819099426, 0.17247343063354492, 0.01714261807501316, 0.1993277221918106, -0.17656747996807098, 0.25524458289146423, -0.4536658823490143, -0.5239880681037903, 0.877204179763794, 0.13954171538352966, 0.1446662694215774...
n <- 1 / n (* if statement *) ``` Additionally, if statements have return values, which also happens to be the last value executed in the if statement. If an if statement isn't the return value of a function, it should have the return type `unit`. Notice that variable assignment has a return type of `...
[ -0.21187417209148407, -0.6716628670692444, 0.15599191188812256, 0.031649794429540634, 0.5073010325431824, -0.0001921726216096431, 0.22711281478405, -0.0018508217763155699, -0.10734394192695618, -0.42673972249031067, -0.39356252551078796, 0.4966275691986084, -0.20571978390216827, -0.0616362...
= 0 then 1 else let mutable ex = exp let mutable res = 1 let mutable n = num if ex < 1 then ex <- -ex n <- 1 / n while ex > 1 do
[ -0.02414296194911003, -0.3123463988304138, 0.349629670381546, -0.236131489276886, 0.2098236382007599, -0.0009351368644274771, 0.2928590178489685, -0.6483850479125977, -0.11627260595560074, -0.43280503153800964, -0.42235690355300903, 0.676245927810669, -0.08403337001800537, 0.53001844882965...
if (ex % 2 = 1) then (* still have a bug here *) res <- res * n n <- n * n exp >>> 1 (* <--- this is not a variable assignment *) res * n ``` We still have a bug, although I
[ 0.2562488913536072, 0.0022388685029000044, 0.24380919337272644, -0.10380037128925323, 0.38353922963142395, -0.2325042486190796, 0.4404841959476471, -0.08668309450149536, -0.10225724428892136, -0.5639820694923401, -0.17591458559036255, 0.6581231355667114, -0.25528818368911743, 0.44169595837...
think F# is reporting the error in the wrong place. The expression `exp >>> 1` returns an int, it does not assign any variables, so its not equivalent to your original C# code. I think you meant to use the `ex` variable instead. We can fix your code as follows: ``` let FastPow2 num exp = if exp = 0 then 1 else...
[ 0.10225928574800491, -0.39231231808662415, 0.3409668803215027, 0.011813034303486347, 0.3721538484096527, 0.012922506779432297, 0.22079099714756012, -0.09648465365171432, -0.30809491872787476, -0.5019431114196777, -0.04935956373810768, 0.968757688999176, -0.5016543865203857, 0.0175628867000...
n = num if ex < 1 then ex <- -ex n <- 1 / n while ex > 1 do if (ex % 2 = 1) then res <- res * n
[ -0.05944925919175148, -0.3825407028198242, 0.042521487921476364, -0.4038515090942383, 0.1795729249715805, 0.2594734728336334, 0.37908264994621277, -0.6063226461410522, -0.1456824690103531, -0.3124787509441376, -0.2787012457847595, 0.3022319972515106, 0.11616245657205582, 0.3309909105300903...
n <- n * n ex <- ex >>> 1 res * n ``` Now your function is fixed, but its really really ugly. Lets convert it to more idiomatic F#. You can replace the if statement with pattern matching, and replace the while loop with recursion: ``` let FastPow2 num exp = match exp with | 0 -> 1 | ...
[ -0.1591651290655136, -0.510709285736084, 0.28673118352890015, -0.1756782978773117, 0.15094923973083496, 0.05834320932626724, 0.17184360325336456, 0.04969094693660736, -0.002399327466264367, -0.5586671233177185, -0.15633849799633026, 0.5635287761688232, -0.5055708885192871, -0.3238340020179...
let rec loop ex res n = if ex > 1 then let newRes = if ex % 2 = 1 then res * n else res loop (ex >>> 1) newRes (n * n) else res * n let
[ 0.1585165560245514, -0.5321598649024963, 0.4886317551136017, -0.3702634274959564, 0.11008463054895401, -0.11646860837936401, 0.47254306077957153, -0.7447813153266907, -0.4397454261779785, -0.37737852334976196, -0.359842449426651, 0.5781593918800354, -0.30857908725738525, 0.4731411933898926...
ex, n = if exp < 1 then (-exp, 1 / num) else (exp, num) loop ex 1 n ``` Much better! Theres still some more room to beautify this function, but you get the idea :)
[ -0.022917108610272408, -0.20228469371795654, 0.3118087649345398, -0.34823328256607056, 0.11555920541286469, -0.011910603381693363, 0.4992203116416931, -0.4448920786380768, 0.008002083748579025, -0.23954366147518158, -0.20460642874240875, 0.4394785761833191, -0.3481757938861847, -0.02179550...
I have a table that has a list of restaurant names and links to another table that holds the cuisine type. I want to provide a search box on my web page that when typing, each word is searched for in the database and results returned. I was looking for a solution that doesn't involve setting up sql full text search as...
[ 0.5892835855484009, 0.3625999391078949, 0.25522366166114807, -0.232906773686409, 0.19542387127876282, -0.14961174130439758, -0.15633262693881989, -0.11150477826595306, -0.30386683344841003, -0.694258451461792, 0.03314104303717613, 0.5074748396873474, -0.22824759781360626, 0.134946152567863...
As String) As String Dim searchFields As New List(Of String) searchFields.Add("Name") searchFields.Add("Postcode") searchFields.Add("Cuisine") Dim firstCol As Boolean = True Dim a() As String Dim j As Integer a = searchText.Trim.Split(" ") Dim filter As String = "" Dim compa...
[ 0.22911211848258972, -0.46628233790397644, 0.6560277938842773, -0.42957401275634766, -0.12701508402824402, 0.09110230952501297, 0.2189929038286209, -0.35181352496147156, -0.22609423100948334, -0.3155145049095154, -0.4849194884300232, 0.5339164733886719, -0.6656347513198853, 0.1453139930963...
compareString = a(j).ToUpper() compareString = compareString.Trim() If firstCol Then filter = filter & col & " LIKE '" & compareString & "%' " firstCol = False Else
[ -0.18845030665397644, -0.2043064534664154, 0.4300313889980316, -0.44541287422180176, -0.15395502746105194, 0.22344082593917847, 0.11349499970674515, -0.4232868552207947, 0.3086497485637665, -0.862676739692688, -0.2671256363391876, 0.4117276668548584, -0.42959651350975037, -0.13873523473739...
filter = filter & " or " & col & " LIKE '" & compareString & "%' " End If Next Next Return filter End Function ``` This has the search fields hard coded and then loops through each one and each word in the search text to construct an OR LIKE filter. I'm sure I could then use this in my L...
[ 0.19873429834842682, -0.28201204538345337, 0.4639265239238739, -0.3245869278907776, -0.11783251911401749, -0.166447713971138, 0.23887966573238373, -0.36083757877349854, 0.12053827196359634, -0.7805317044258118, -0.1219635009765625, 0.3779953122138977, -0.6875501871109009, -0.07499039173126...
elegant solution especially since the columns are hard coded and not used how LINQ uses them. Could anyone recomend a better way to do this or some tips in what direction to go with this? Thanks You could use full text search and still use LINQ to SQL. You can create a stored procedure and have LINQ call it. In addi...
[ -0.3630005419254303, -0.16387347877025604, 0.42437031865119934, 0.4724986255168915, -0.14518007636070251, -0.24271489679813385, 0.09034428745508194, -0.47806861996650696, -0.14028006792068481, -0.5985153913497925, 0.1811782866716385, 0.5380814075469971, -0.08532226085662842, -0.19278304278...
Bombay might also return hits to Mumbai (thesaurus based replacement search) * Searches that will return all different linguistic forms of a word (called generations) search on bank would return hits to banking, banked, banks, banks' and bank's, etc. (all declensions and/or conjugations of the search term bank) * Accen...
[ -0.0727510154247284, -0.29366523027420044, 0.1245400607585907, -0.03420093283057213, -0.13114897906780243, 0.3023783266544342, 0.4332619607448578, -0.01629374735057354, -0.14577768743038177, -0.29769739508628845, 0.03728463128209114, 0.3578423261642456, -0.2531268000602722, 0.0195305030792...
The following does not work in this particular case, complaining that whatever you give it is not a character. ``` (handler-bind ((sb-int:character-coding-error #'(lambda (c) (invoke-restart 'use-value #\?)))) (sb-ext:octets-to-string *euc-jp* :external-format :euc-jp)) ``` ...
[ -0.059792425483465195, 0.11391806602478027, 0.21170030534267426, 0.011650893837213516, -0.15386773645877838, 0.060071155428886414, 0.3378019630908966, -0.28161147236824036, -0.03496405854821205, -0.5857465267181396, -0.17895448207855225, 0.42778247594833374, -0.1074858009815216, 0.31282034...
appreciated! EDIT: To reproduce `*EUC-JP*`, fetch <http://blogs.yahoo.co.jp/akira_w0325/27287392.html> using drakma. There's an expression in SBCL 1.0.18's `mb-util.lisp` that looks like this: ``` (if code (code-char code) (decoding-error array pos (+ pos bytes) ,format ',malformed pos)) ...
[ -0.02194863371551037, 0.005944363307207823, 0.3777846395969391, -0.23161602020263672, -0.11744236201047897, -0.08313138782978058, 0.3118433952331543, -0.14251145720481873, -0.08517798781394958, -0.44342461228370667, -0.07562560588121414, 0.626315712928772, -0.24247895181179047, -0.33601209...
the definition of `DECODING-ERROR` in `octets.lisp`).
[ -0.598448634147644, 0.1571236103773117, -0.1099385917186737, -0.04227723181247711, 0.21610970795154572, -0.04794573038816452, 0.4713568389415741, -0.38708171248435974, 0.0002884686691686511, -0.4517890512943268, -0.4860924780368805, 0.5131291151046753, -0.5500029921531677, -0.4390017390251...
Using Amazon's own [client libraries](http://developer.amazonwebservices.com/connect/entry.jspa?externalID=552&categoryID=187) (or [alternatives](http://code.google.com/p/typica/)), you can get listings of available pre-packaged AMIs, but the interface is definitely designed for scriptability, not readability. [Elastic...
[ 0.2259458750486374, -0.16053247451782227, 0.39470821619033813, 0.11594243347644806, -0.09282027930021286, -0.09825444966554642, 0.24290461838245392, -0.33954349160194397, -0.3016798198223114, -0.45800283551216125, 0.01353195309638977, 0.5728563666343689, -0.39853522181510925, -0.2231075912...
the structured XML.
[ -0.10796435922384262, 0.08926635980606079, 0.12182718515396118, 0.33134186267852783, -0.3027801215648651, -0.22975945472717285, -0.2732694149017334, 0.05528310686349869, 0.05777817219495773, -0.3962476849555969, -0.658403217792511, 0.46106165647506714, -0.17808589339256287, -0.074188016355...
How do I run stylecop against an iis based webproject on a buildserver? Buildserver runs in continuous integration and I would like this automated. With a library I can add a few lines to the .csproj and its done. I believe it to be a website application project. I believe the spring loaded stack of plates is correct,...
[ 0.6257723569869995, 0.19442029297351837, -0.07917623966932297, -0.12438759207725525, 0.007841394282877445, 0.16236566007137299, -0.4071933329105377, 0.0016538375057280064, -0.49548566341400146, -0.5068920254707336, 0.3797851800918579, 0.28464290499687195, 0.09479156136512756, 0.23474022746...
think this is the origin. The Tech Model Railroad Club definitely influenced the design of the Digital Equipment Corporation's (DEC) PDP-6. The PDP-6 was one of the first machines to have stack oriented instructions in the hardware. The instructions were PUSH, POP, PUSHJ, POPJ. <http://ed-thelen.org/comp-hist/pdp-6.h...
[ 0.15667735040187836, -0.11193221062421799, 0.2504194378852844, 0.06520756334066391, -0.08272235095500946, 0.4082983434200287, -0.22636578977108002, 0.042177826166152954, -0.5240827202796936, -0.3004318177700043, 0.10088217258453369, 0.3248230218887329, -0.3919410705566406, -0.0084638614207...
With `:limit` in query, I will get first N records. What is the easiest way to get last N records? Updated Answer (2020) --------------------- You can get last N records simply by using [last](https://apidock.com/rails/ActiveRecord/FinderMethods/last) method: `Record.last(N)` Example: `User.last(5)` Returns 5 user...
[ -0.05274299159646034, -0.1810011863708496, 0.6131508946418762, 0.033272672444581985, 0.25120753049850464, -0.025718022137880325, -0.10818598419427872, -0.3237299621105194, -0.6326712965965271, -0.6923286318778992, -0.09040489792823792, 0.6274867653846741, -0.060378022491931915, 0.424244165...
I found this statement is some old code and it took me a second to figure out... ``` IsTestActive = (TestStateID == 1 ? true : false); ``` Please correct me if I'm wrong but isn't this the same as this one?: ``` IsTestActive = (TestStateID == 1); ``` If it is, why would you ever want to use the first? Which one i...
[ 0.21531140804290771, 0.1992882341146469, -0.1789853423833847, 0.14105363190174103, -0.10263650864362717, -0.16403572261333466, 0.6349529027938843, 0.02792797051370144, 0.022816592827439308, -0.4674607813358307, -0.025603346526622772, 0.4400798976421356, -0.4162864089012146, -0.068999737501...
Kicking around some small structures while answering [this post](https://stackoverflow.com/questions/414981/directly-modifying-listt-elements), I came across the following unexpectedly: The following structure, using an int field is perfectly legal: ``` struct MyStruct { public MyStruct ( int size ) { ...
[ -0.031855300068855286, 0.06311538815498352, 0.2653474807739258, -0.11590171605348587, -0.13480544090270996, -0.3333987891674042, 0.4125157296657562, -0.5018225312232971, -0.13097313046455383, -0.2604634165763855, -0.22710536420345306, 0.4259742498397827, -0.3956504166126251, -0.00597268203...
this.Size = size; // <-- Compile-Time Error! } public int Size{get; set;} } ``` The error returned is "The 'this' object cannot be used before all of its fields are assigned to". I know that this is standard procedure for a struct: the backing field for any property must be assigned directly (and not via th...
[ 0.1268714964389801, 0.09213297069072723, 0.5542116165161133, -0.29278236627578735, 0.21254663169384003, -0.23397725820541382, 0.10959978401660919, -0.33271703124046326, -0.07225029915571213, -0.4815097153186798, -0.507013201713562, 0.6892544627189636, -0.40856441855430603, 0.23221169412136...
} private int _size; public int Size { get { return _size; } set { _size = value; } } } ``` (Note that VB.NET would not have this issue, because in VB.NET all fields are automatically initialized to 0/null/false when first created.) This would seem to be an unfortunate limitation wh...
[ 0.0969632938504219, -0.17584095895290375, 0.2318907082080841, -0.22508177161216736, -0.23182275891304016, -0.3267979025840759, 0.22354145348072052, -0.2610436975955963, -0.24557821452617645, -0.3948788642883301, -0.18306122720241547, 0.7114229202270508, -0.24861672520637512, 0.034544363617...
an exception that allows the property set accessor to be called within a struct's constructor, at least for an automatic property? This is a minor issue, almost an edge-case, but I was wondering what others thought about this... From C# 6 onward: this is no longer a problem --- Becore C# 6, you need to call the defa...
[ -0.2320626974105835, 0.08734118938446045, 0.3644067645072937, -0.12062346190214157, -0.1481093466281891, -0.42032143473625183, 0.21062470972537994, -0.021335355937480927, -0.2985624372959137, -0.6059417724609375, -0.27328017354011536, 0.7204515933990479, -0.4875114858150482, 0.250449389219...
enough. With recent versions of C#, you can improve on this: ``` public int Size { get; } ``` This can now *only* be assigned in the constructor.
[ 0.43457460403442383, 0.18289650976657867, 0.14076553285121918, -0.12026578933000565, -0.1416337937116623, -0.23830099403858185, 0.17645691335201263, -0.32991430163383484, -0.34377434849739075, -0.5472733378410339, -0.2130734622478485, 0.7077122330665588, -0.20303210616111755, 0.11006767302...
### Background Information For saving out crash dumps, I have a script passed to `cdb.exe` in the `Debugger` value of the `AeDebug` registry key: ``` C:\progra~1\debugg~1\cdb.exe -p %ld -e %ld -g -y SRV*c:\mss*http://msdl.microsoft.com/download/symbols -c "$<d:\tgticker\Dumps\RDFD.cdbscript" ``` Here is the first p...
[ -0.1273680031299591, 0.003210442839190364, 0.5289461016654968, 0.2309846580028534, 0.23203380405902863, -0.0726771205663681, 0.46905550360679626, -0.129226952791214, 0.07178270071744919, -0.7833688855171204, 0.000687061867211014, 0.6371697187423706, -0.26202839612960815, -0.206983223557472...
from [DumpAnalysis.org](http://www.dumpanalysis.org/blog/index.php/2008/08/13/generating-file-name-for-dump-command/ "DumpAnalysis.org: Generating file name for .dump command"). This command pulls the name out of the PEB Header for the image, using `ntdll.dll`. Without symbols for the OS, it doesn't know where to find ...
[ 0.473585307598114, -0.01392331812530756, 0.16074974834918976, -0.13531270623207092, -0.2807348072528839, -0.24625204503536224, -0.02161373198032379, -0.1474837213754654, -0.05872981250286102, -0.4695162773132324, 0.41163957118988037, 0.46813663840293884, -0.3423069417476654, 0.225684359669...
crashed so that it can be used in a filename for writing a log file or crash dump from a script: ``` aS ${/v:CrashFirstModule} "UnknownModule" .foreach /pS b /ps b (name {.imgscan}) { .if($spat("${name}","*.exe") !=0){aS ${/v:CrashFirstModule} "${name}"; .break} } ``` After these two lines, `CrashFirstModule` will b...
[ 0.2511458396911621, 0.019549254328012466, 0.1035374328494072, -0.04022333398461342, -0.12200956046581268, 0.05484512820839882, 0.1461149901151657, 0.2879354655742645, -0.08095183223485947, -0.28769469261169434, -0.07681012153625488, 0.48433631658554077, -0.23900830745697021, 0.293576657772...
of executable modules, which will include .exe, .dll, .drv etc. This is the starting point for finding the executable name. ``` 0:000> .imgscan MZ at 01000000, prot 00000002, type 01000000 - size 14000 Name: notepad.exe MZ at 73070000, prot 00000002, type 01000000 - size 27000 Name: WINSPOOL.DRV MZ at 762b0000, pr...
[ -0.43455591797828674, -0.009645006619393826, 0.7905250787734985, -0.09809155762195587, 0.23998217284679413, 0.08858790248632431, -0.08364513516426086, -0.22676421701908112, -0.38377565145492554, -0.796761155128479, -0.3444369435310364, 0.46597185730934143, -0.41161638498306274, -0.01875459...
size 5a000 Name: msvcrt.dll MZ at 77c00000, prot 00000002, type 01000000 - size 48000 Name: GDI32.dll MZ at 77c50000, prot 00000002, type 01000000 - size a0000 Name: RPCRT4.dll MZ at 77e40000, prot 00000002, type 01000000 - size 102000 Name: KERNEL32.dll MZ at 7c800000, prot 00000002, type 01000000 - size c3000...
[ -0.27111876010894775, -0.29757416248321533, 0.936038613319397, -0.1499606817960739, 0.003428493160754442, 0.45050013065338135, 0.013568242080509663, -0.348457396030426, -0.43532297015190125, -0.928138017654419, -0.2697102129459381, 0.4964815080165863, -0.27168235182762146, 0.12511330842971...
how far into the list the first value is. `/ps` specifies the distance between values. (b = 11 in hex) This is necessary as `.foreach` will separate on spaces. With these arguments, the list becomes: ``` 0:000> .foreach /pS b /ps b (name {.imgscan}) { .echo name } notepad.exe WINSPOOL.DRV comdlg32.dll Secur32.dll USER...
[ -0.06515831500291824, -0.08251410722732544, 0.5426639914512634, -0.15012142062187195, 0.04836905002593994, 0.03056607022881508, 0.1761055290699005, -0.3901062309741974, -0.1042340025305748, -0.30595144629478455, 0.05406362935900688, 0.32149264216423035, -0.3360414505004883, 0.0715957134962...
of your alias written in a string. if you are using the alias in a command, you can just use it, so `.echo CrashFirstmodule` would echo out `notepad.exe`. In those cases where you actually mean the name of the alias, you can specify it as `${/v:<alias name>}` which will just resolve to the alias name. This expansion pr...
[ 0.3073315918445587, -0.09933323413133621, 0.34981775283813477, -0.29610905051231384, 0.09762654453516006, -0.12863636016845703, 0.426276832818985, -0.11884958297014236, -0.22435005009174347, -0.5663009285926819, -0.14227646589279175, 0.6591835618019104, -0.35444265604019165, 0.328584551811...
`aS` is terminated by ; or the end of line and will strip the " from the entry. The following line will alias `CrashFirstModule` to `UnknownModule`: ``` aS ${/v:CrashFirstModule} "UnknownModule" ``` ### .break `.break` ends the `.foreach` after a match is found. End --- That's all the pieces that make up the comm...
[ 0.1709158718585968, 0.17440316081047058, 0.5310238599777222, 0.0385265052318573, 0.2280092090368271, -0.10971904546022415, 0.34387657046318054, -0.14107200503349304, -0.0007298727869056165, -0.3949589431285858, -0.4480985999107361, 0.6077033281326294, -0.15987539291381836, 0.44190710783004...
Is there something similar to the "Open Command Window Here" Windows Powertoy for Mac OS? I've found a couple plugins through a google search but wanted to see what works best for developers out there. As of Mac OS X Lion 10.7, Terminal includes exactly this functionality as a Service. As with most Services, these are ...
[ -0.008115887641906738, -0.06981994956731796, 0.6194841861724854, -0.2861565053462982, -0.019700689241290092, 0.0835135355591774, 0.23028689622879028, 0.24499915540218353, -0.37386155128479004, -0.8247995376586914, -0.09818259626626968, 0.8831613063812256, -0.3251543343067169, 0.23318564891...
window (if any, else it will create a new window). These Services work in all applications, not just Finder, and they operate on folders as well as absolute pathnames selected in text. You can even assign command keys to them. Services appear in the Services submenu of each application menu, and within the contextual...
[ -0.06922908127307892, -0.07394832372665405, 0.6747152805328369, -0.010308449156582355, 0.1325787454843521, 0.15682795643806458, 0.4529109299182892, 0.30180108547210693, -0.3519282937049866, -1.1230483055114746, -0.5186544060707092, 0.54084312915802, -0.14525571465492249, 0.2803290188312530...
activate the service via the Services menu or context menu. In addition, Lion Terminal will open a new terminal window if you drag a folder (or pathname) onto the Terminal application icon, and you can also drag to the tab bar of an existing window to create a new tab. Finally, if you drag a folder or pathname onto a...
[ 0.15931889414787292, -0.20006375014781952, 0.5714045166969299, -0.4495075047016144, 0.27827706933021545, -0.11932595819234848, 0.32539039850234985, 0.26238858699798584, -0.11679703742265701, -0.9007367491722107, -0.5335075259208679, 0.7701305747032166, -0.3451266884803772, 0.05274727195501...
do this from the command line or a shell script: ``` open -a Terminal /path/to/folder ``` This is the command-line equivalent of dragging a folder/pathname onto the Terminal application icon. On a related note, Lion Terminal also has new Services for looking up man pages: **Open man page in Terminal** displays the ...
[ -0.1858428567647934, 0.17264272272586823, 0.2691979706287384, -0.25332167744636536, -0.24541650712490082, 0.08620533347129822, 0.23676767945289612, -0.20910786092281342, -0.31714990735054016, -0.7565879821777344, -0.3930836319923401, 0.46350768208503723, -0.26359057426452637, -0.0229952018...
I'm just curious about this really, does anyone know why they broke convention on this one? Thanks, Ciaran @Cory: You'd be surprised to know who lurking on StackOverflow. :-) You are very much right. The original design of CFML was to allow non-programmers to build complex web applications. ColdFusion\CFML was the f...
[ 0.447253942489624, 0.03813694790005684, 0.5165806412696838, 0.18649053573608398, -0.09989482909440994, -0.40013357996940613, 0.18833735585212708, 0.2854503393173218, -0.32046136260032654, -0.023141564801335335, 0.1622651219367981, 0.33326980471611023, -0.5804033875465393, -0.06448092311620...
to a bit of confusion, especially when ColdFusion code interacts directly with Java or .NET. However, it's just become one of those 'quirks'. The decision was revisited back in 2000/2001 when CF was rebuilt as a Java EE application, but backward compatibility prevented the change.
[ 0.028440173715353012, 0.2121264636516571, 0.4070965647697449, -0.10172800719738007, -0.1496858149766922, -0.40134719014167786, 0.2025611400604248, 0.07184482365846634, -0.03687133267521858, -0.22799645364284515, 0.3114008903503418, -0.027088992297649384, -0.4021334648132324, 0.024759035557...
If I am using JAXB as part of Metro Web Services under Glassfish v2, how do tell JAXB to add: ``` <xsd:any/> and <xsd:anyAttribute/> ``` tags to my generated complex types so that if I make changes in the future to add elements or attributes to my response objects then my current clients won't break. JAXB documen...
[ 0.19845722615718842, -0.23956546187400818, 0.5203811526298523, 0.20858252048492432, -0.09430457651615143, -0.09277724474668503, 0.022040557116270065, 0.0779331848025322, -0.35190409421920776, -0.9685294032096863, -0.010293226689100266, 0.58986496925354, -0.44630056619644165, -0.18464457988...
started.
[ 0.37244004011154175, 0.19190414249897003, -0.0250688549131155, 0.1602720320224762, -0.13575468957424164, -0.4321267604827881, 0.17783936858177185, 0.24341660737991333, -0.21898870170116425, -0.48463088274002075, -0.1345275491476059, 0.18447823822498322, 0.2364143431186676, 0.41254758834838...
After a large SQL Query is run that is built through my ASPX Pages I see the following two items listed in sql profiler. ``` Event Class TextData ApplicationName CPU Reads
[ 0.18589305877685547, -0.0524345226585865, 0.052911773324012756, -0.12204290926456451, -0.0970572978258133, -0.07926782220602036, -0.16813012957572937, 0.050530269742012024, -0.3206634819507599, -0.9040927886962891, 0.20025871694087982, 0.5934627652168274, -0.013832108117640018, 0.295245081...
Writes SQL:BatchCompleted Select N'Testing Connection...' SQLAgent - Alert Engine 1609 0 0 SQL:BatchCompleted EXECUTE msdb.sbo.sp_sqlagent_get_perf_counters SQLAgent - Alert Engine 1609 96 0 ``` These CPU is the same as the query so does that query actually take 1609\*...
[ -0.1288733333349228, 0.18858051300048828, 0.13443852961063385, -0.07576931267976761, -0.36919480562210083, 0.14671067893505096, 0.3072183132171631, -0.03626549616456032, -0.1187049001455307, -0.4625931978225708, 0.4311061501502991, 0.39975348114967346, -0.21629838645458221, -0.071771547198...
takes 1609 milliseconds of CPU in total. What is the duration? I bet the same or slighty more because I doubt SQL Agent queries use parallelism. Are you trying to reduce background processes using CPU? If so, then you reduce functionality by disabling SQL Agent (no backups then for example) and restarting SQL Server w...
[ -0.1998322457075119, -0.09222427010536194, 0.2897796630859375, 0.27021723985671997, -0.020035946741700172, 0.05416334792971611, 0.4966315031051636, -0.10821499675512314, -0.6228408217430115, -0.41453617811203003, 0.11559291929006577, 0.568194568157196, -0.24819402396678925, -0.056051384657...
parity on RAID 5 disks. High CPU can often be solved by more RAM and a better disk config.
[ -0.5020124912261963, -0.03219160437583923, 0.14401133358478546, 0.3371863067150116, -0.018821073696017265, 0.19858190417289734, 0.30769896507263184, -0.08335582911968231, -0.3487917482852936, -0.739318311214447, -0.3569282591342926, 0.7056582570075989, -0.23062270879745483, -0.015548276714...
In WCF, contracts can be switched to streaming mode, to transfer large messages. After reading and testing it seems to me, that streaming mode can not be used with duplex channels (channels with OneWay-calls and a callback interface). Is this so? Do duplex and streaming can not be used with each other? Or is there a ...
[ 0.38248929381370544, -0.5114162564277649, 0.7285157442092896, 0.00519428588449955, -0.18210510909557343, -0.3010697364807129, 0.29186660051345825, -0.3692589998245239, -0.19575193524360657, -0.745694637298584, -0.15709218382835388, 0.6870779991149902, -0.5211785435676575, 0.398592233657836...
[OperationContract(IsOneWay = true)] void sendFile(byte[] bytes, int offset, int count); [OperationContract(IsOneWay = true)] void sendFileName(string fileName); } [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode=ConcurrencyMode.Multiple)] public class...
[ 0.13343042135238647, -0.33650362491607666, 0.23284611105918884, -0.17778722941875458, 0.02396538481116295, -0.010157736949622631, 0.9232803583145142, -0.20445244014263153, -0.2182973325252533, -0.5424752831459045, -0.43810978531837463, 0.4907723665237427, -0.4925321042537689, 0.46846729516...
public FreeBoxService() { callBack = OperationContext.Current.GetCallbackChannel<IFreeBoxServiceCallBack>(); } public void sendFileName(string fileName) { this.fileName = fileName; } public void sendFile(byte[] bytes, int offset, int count) ...
[ 0.24130171537399292, -0.2928166687488556, 0.3756997585296631, -0.2228020876646042, 0.16931051015853882, -0.03585953637957573, 0.3293895721435547, -0.20118200778961182, -0.15293341875076294, -0.4660264551639557, -0.5211429595947266, 0.6646294593811035, -0.5668920278549194, 0.029870970174670...
using (FileStream fileStream = new FileStream(path + fileName, FileMode.Append, FileAccess.Write)) { fileStream.Write(bytes, offset, count); fileStream.Close(); fileStream.Dispose(); } }} ``` client: ``` private
[ 0.13313621282577515, -0.04822014644742012, 0.5345509648323059, -0.10113303363323212, 0.28601810336112976, 0.053126972168684006, 0.20001864433288574, -0.32472410798072815, -0.21598562598228455, -0.7696425914764404, -0.2335054725408554, 0.6755974292755127, -0.36770254373550415, 0.31276312470...
void sendFileToServer() { FileStream fs = new FileStream(fullName,FileMode.Open,FileAccess.Read); int bytesRead = 0; bytes = new byte[15000]; proxy.sendFileName("someFile.xml"); while ((bytesRead = fs.Read(bytes, 0, 15000))>0) {
[ 0.05831065773963928, -0.2815425395965576, 0.797195315361023, -0.39456114172935486, 0.03870188072323799, 0.009823492728173733, 0.36326122283935547, -0.16889150440692902, -0.15218548476696014, -0.5784236788749695, -0.38457685708999634, 0.3947238624095917, -0.2232583463191986, 0.0742558985948...
proxy.sendFile(bytes, 0, bytesRead); } fs.Close(); fs.Dispose(); } ``` .config ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="FreeBoxServiceLib.FreeBoxService" behaviorConfiguration="MyServiceBehevior...
[ -0.3570825159549713, -0.034966886043548584, 0.39742574095726013, -0.14421714842319489, -0.042270563542842865, 0.262491911649704, 0.546819269657135, -0.03880990296602249, -0.09730421751737595, -0.931546151638031, -0.37147000432014465, 0.22217324376106262, -0.4387626647949219, 0.300066083669...
binding="netTcpBinding"> </endpoint> <endpoint address="MEX" binding="mexTcpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:8080/FreeBoxService/"/> </baseAddresses> </host> </service> </service...
[ -0.0541282556951046, -0.25366395711898804, 0.5578083992004395, -0.023778043687343597, -0.41212067008018494, -0.023178059607744217, 0.1866348832845688, -0.7395145297050476, -0.20879234373569489, -0.5274739265441895, -0.033962640911340714, 0.25913357734680176, -0.47315794229507446, 0.2158501...
name="MyServiceBehevior"> <serviceMetadata /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration> ``` is always better to pass an array of bytes. I think, not need describe the callback functions?
[ -0.02813349850475788, -0.2059449553489685, 0.30608925223350525, -0.22591017186641693, -0.10950823873281479, 0.05735968425869942, 0.43810349702835083, 0.08168728649616241, -0.16022048890590668, -0.5411931872367859, -0.06730084121227264, 0.4962899386882782, -0.2030414193868637, 0.25156855583...
I'm trying to implement some basic linear algebra operations and one of these operations is the inversion of a triangular (upper and/or lower) matrix. Is there an easy and stable algorithm to do that? Thank you. Yes, use [back substitution](http://en.wikipedia.org/wiki/Triangular_matrix#Forward_and_back_substitution)....
[ 0.27472391724586487, -0.03333500772714615, 0.0401158481836319, -0.23731087148189545, -0.059159304946660995, 0.5141420960426331, -0.3362511098384857, -0.21327579021453857, 0.04634770750999451, -0.5567430257797241, 0.01031107734888792, 0.38693490624427795, -0.049532145261764526, -0.005745390...
In My Asp.net webpage I need to display today's date into one of the textbox , so in my form load I wrote the following code ``` textbox1.text = System.DateTime.Today.ToShortDateString(); ``` this line is giving me date like 1/7/09 but I want date like 01/07/09 , Is there anyway I can conver this date into mm/dd/yy...
[ 0.36977118253707886, -0.1235893964767456, 0.7594873309135437, -0.07813911139965057, 0.020496269688010216, -0.032699812203645706, 0.17098169028759003, 0.19836223125457764, -0.3567759394645691, -0.5972062349319458, -0.03431427478790283, 0.1343436986207962, 0.000941647682338953, 0.10761096328...
just seems weird to go "middle/low/high" in terms of scale like that.)
[ 0.3023994266986847, -0.13143235445022583, 0.2052004188299179, 0.10384183377027512, 0.002842988120391965, 0.30861878395080566, 0.42859068512916565, 0.2626873850822449, -0.11591779440641403, -0.16360868513584137, 0.13247397541999817, 0.40265098214149475, 0.3681262135505676, 0.197427302598953...
These characters show fine when I cut-and-paste them here from the VisualStudio debugger, but both in the debugger, and in the TextBox where I am trying to display this text, it just shows squares. 说明\r\n海流受季风影响,3-9 月份其流向主要向北,流速为2 节,有时达3 节;10 月至次年4 月份其流向南至东南方向,流速为2 节。\r\n注意\r\n附近有火山爆发的危险,航行时严加注意\r\n I thought that th...
[ -0.03344585373997688, 0.25076404213905334, 0.3523308336734772, -0.04771878570318222, -0.5106871724128723, 0.4838584363460541, 0.23690743744373322, -0.5336922407150269, -0.15135985612869263, -0.9662514925003052, 0.3159298896789551, 0.19838780164718628, -0.26143503189086914, -0.1134143695235...
Is there any way to serialize a property with an internal setter in C#? I understand that this might be problematic - but if there is a way - I would like to know. **Example:** ``` [Serializable] public class Person { public int ID { get; internal set; } public string Name { get; set; } public int Age ...
[ -0.00047293148236349225, 0.06422299891710281, 0.4539605379104614, -0.0471748486161232, 0.17842309176921844, 0.09573144465684891, 0.2056061029434204, -0.3521512448787689, -0.203704833984375, -0.4774034321308136, -0.39792951941490173, 0.3949963450431824, -0.16382145881652832, 0.3277174532413...
encoding="utf-8"?> <Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Name>Patrik</Name> <Age>27</Age> </Person> ``` If it is an option, [`DataContractSerializer`](https://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractser...
[ -0.39034855365753174, -0.26364925503730774, 0.3063156306743622, -0.17114078998565674, 0.1719338744878769, 0.3769640624523163, -0.017120983451604843, -0.23476077616214752, -0.19103343784809113, -0.5297325849533081, -0.4864479899406433, 0.25376060605049133, -0.38002270460128784, 0.2945670485...
DataContractSerializer serializer = new DataContractSerializer(typeof(Person)); XmlWriter writer = XmlWriter.Create(@"c:\test.xml"); serializer.WriteObject(writer, person); writer.Close(); } ``` With the xml (re-formatted): ``` <?xml version="1.0" encoding="utf-8"?> <Person xmlns:i="http://www.w3.org/200...
[ -0.007773236371576786, -0.12301342934370041, 0.5029071569442749, -0.2663942277431488, -0.2968650162220001, 0.327473908662796, -0.19561578333377838, -0.40873321890830994, -0.07644425332546234, -0.3178853988647461, -0.06145258992910385, 0.289628803730011, -0.49561816453933716, 0.249345511198...
How do I do that? Right now, IPv6 will not be used, but I need to design the application to make it IPv6-ready. It is necessary to store IP addresses and CIDR blocks (also BGP NLRI, but this is another story) in a MySQL database. I've alway used an INT for IPv4 + a TINYINT for masklen, but IPv6 is 128 bit. What appro...
[ -0.030875569209456444, -0.06052067503333092, 0.3847888708114624, 0.29970625042915344, -0.0063228546641767025, -0.19813397526741028, 0.2030612826347351, -0.15769702196121216, -0.08426053076982498, -0.8069483041763306, 0.012422631494700909, 0.6671493649482727, -0.14116868376731873, 0.0849696...
address formats natively (although whilst "[WL#798: MySQL IPv6 support](http://dev.mysql.com/worklog/task/?id=798)" suggests that it was going to be in MySQL v6.0, current documentation doesn't back that up). However of those you've proposed I'd suggest going for 2 \* BIGINT, but make sure they're UNSIGNED. There's a ...
[ 0.03773493319749832, -0.03751666843891144, 0.23659701645374298, 0.012285551056265831, -0.22523711621761322, -0.27888280153274536, 0.20107057690620422, 0.26324963569641113, -0.382974237203598, -0.9506178498268127, -0.2505200207233429, 0.45561400055885315, -0.2562101483345032, 0.343779712915...
I have a linq2sql setup where objects are sent from client side (flex via flourinefx) and attach them to a new datacontext a seen below: I also have a "global" datacontext that is used throughout the session. ``` public static void Update(Enquiry enquiry) { OffertaDataContext db = new OffertaDataCont...
[ 0.06773228943347931, 0.05000109225511551, 0.7399224042892456, -0.2148210108280182, -0.08155842870473862, -0.052707139402627945, 0.4095228314399719, -0.4595862627029419, -0.019302761182188988, -0.5967020392417908, -0.2117910236120224, 0.7471223473548889, -0.11451814323663712, 0.161370605230...
the error "Cannot add an entity with a key that is already in use". I think this error happens if you `Attach` an *entity* to a `DataContext` that was already loaded. The code that causes the error is exactly like you show here? After creating the new `OffertaDataContext` do you query anything before the `Attach`?
[ -0.06192534789443016, 0.02570456825196743, 0.46755555272102356, 0.005490824580192566, 0.20444706082344055, -0.39223572611808777, 0.2665942311286926, -0.31202444434165955, -0.08752565085887909, -0.3524959981441498, -0.1644093543291092, 0.7441976070404053, -0.15537552535533905, 0.13167396187...
When trying out these tutorials ([T4 Tutorial: Creating reusable code generation templates](http://www.olegsych.com/2008/09/t4-tutorial-creating-reusable-code-generation-templates/)) I noticed that although I was using plain c# I didn't get any intellisense, probably because of the file extension (.tt) Isn't there any...
[ 0.0912337675690651, -0.08972176164388657, 0.22189949452877045, 0.2638470232486725, -0.2972790598869324, -0.18701718747615814, 0.276756227016449, -0.2063838690519333, -0.03738259896636009, -0.604523777961731, -0.03249024227261543, 0.8052337765693665, -0.2360120266675949, -0.3270204663276672...
which relies on [T4 Toolbox](http://www.codeplex.com/t4toolbox).
[ 0.3102887272834778, -0.22121593356132507, 0.07057759165763855, -0.008299718610942364, 0.026371853426098824, 0.025604601949453354, 0.14067475497722626, -0.30786919593811035, -0.2530909776687622, -0.24349980056285858, -0.5549657344818115, 0.3761320114135742, -0.45163586735725403, -0.18978011...
I'm going to be brief because I'm short on time, so I apologize if this isn't as detailed as I'd like it to be. I have some code: ``` print("<a href='#'>Some text<sup>&reg;</sup> some more text</a>"); ``` In FF, this works like I would like, the link as a whole is underlined. However in IE, the link is underlined e...
[ 0.49342361092567444, -0.032617222517728806, 0.7374247908592224, 0.07806771248579025, -0.0809793621301651, -0.41315630078315735, 0.32925206422805786, 0.29191160202026367, -0.12601733207702637, -0.9272172451019287, -0.08626540750265121, 0.32036471366882324, -0.1902921348810196, 0.02038587816...
option unfortunately. So far the best solution is to break the underline completely at the sup tag with CSS which still leaves it working fine in FF while still looking less silly in IE. If anyone could help with this it would be most appreciated, I'd rather not go through the site removing `<sup>` tags as I've been t...
[ 0.17335030436515808, -0.25394290685653687, 0.656854510307312, 0.09642412513494492, -0.03892531618475914, 0.017612209543585777, 0.6304414868354797, 0.23608461022377014, -0.2425174117088318, -0.6784603595733643, -0.35908612608909607, 0.5687881708145142, -0.06230374798178673, 0.10003970563411...
than it was worth we all decided. Thanks to those who replied. The `<sup>` tag isn't great for things like trademark and reg symbols. I prefer doing it with css: ``` <span style='font-size:75%;vertical-align:super;text-decoration:none'>&reg</span> ``` If you can set up a .reg class: ``` .reg { font-size:75%; ...
[ -0.2564736008644104, -0.26227548718452454, 0.5275381803512573, 0.3660903871059418, 0.27344515919685364, 0.3459736704826355, 0.23635928332805634, -0.23830710351467133, -0.16556045413017273, -0.6377343535423279, -0.1849263310432434, 0.7679265737533569, 0.17881929874420166, -0.243295446038246...
When `foreach`ing through a generic list I often want to do something different for the first element in the list: ``` List<object> objs = new List<object> { new Object(), new Object(), new Object(), new Object() }; foreach (object o in objs) { if (o == objs.First()) { System.Diagnosti...
[ -0.06051279231905937, -0.1548989862203598, 0.4496724307537079, -0.37571513652801514, -0.01382056437432766, 0.1336563676595688, 0.26695144176483154, -0.3095504641532898, -0.3088894486427307, -0.7556199431419373, -0.35689598321914673, 0.36359450221061707, -0.570195734500885, 0.15653681755065...
output: ``` First object - do something special object Do something else object Do something else object Do something else ``` This is all fine and dandy. However if my generic list is of a value type, this approach will fail. ``` List<int> ints = new List<int> { 0, 0, 0, 0 }; foreach (int i in in...
[ 0.028297249227762222, -0.23353300988674164, 0.1545402556657791, -0.15967659652233124, -0.1679830104112625, -0.0176906269043684, 0.3141639530658722, -0.35056495666503906, -0.12260590493679047, -0.6628645062446594, -0.23089002072811127, 0.42771464586257935, -0.4743250906467438, 0.14427839219...
System.Diagnostics.Debug.WriteLine("int Do something else"); } } ``` This will output: ``` First int - do something special First int - do something special First int - do something special First int - do something special ``` Now I know I could recode this to add a `boolean` flag variable or ...
[ 0.19998584687709808, -0.2639331519603729, 0.05780550837516785, -0.11087708175182343, -0.08957228809595108, -0.10589662939310074, 0.24720732867717743, -0.3637973666191101, -0.14112842082977295, -0.5834046602249146, -0.09095799177885056, 0.5669581294059753, -0.4697546660900116, 0.07530439645...
ints.GetEnumerator()) { if(iter.MoveNext()) { // do "first" with iter.Current while(iter.MoveNext()) { // do something with the rest of the data with iter.Current } } } ``` The bool flag option (with `foreach`) is probably easier though... that is what I (almost) always do! Another option ...
[ -0.04674315080046654, -0.39790645241737366, 0.2355058789253235, -0.1838684380054474, -0.13683299720287323, -0.29032889008522034, 0.02250625193119049, -0.3194199800491333, -0.32979056239128113, -0.5948918461799622, -0.41921430826187134, 0.3458997905254364, -0.4291224181652069, -0.0848285555...
the list 3 times... since we know it is a list, that is fine - but if all we had was an `IEnumerable<T>`, it would only be sensible to iterate it once (since the source might not be re-readable).
[ 0.22599275410175323, -0.06458433717489243, 0.39108651876449585, -0.110651396214962, -0.09821824729442596, -0.060192640870809555, 0.5503541231155396, -0.39371660351753235, -0.21682927012443542, -0.7206249237060547, -0.04231712594628334, 0.3792022466659546, -0.2592772841453552, 0.07581545412...
Just got a review comment that my static import of the method was not a good idea. The static import was of a method from a DA class, which has mostly static methods. So in middle of the business logic I had a da activity that apparently seemed to belong to the current class: ``` import static some.package.DA.*; class...
[ 0.15937159955501556, -0.18280573189258575, -0.05078070983290672, -0.17954760789871216, -0.23077861964702606, -0.17484886944293976, 0.19087038934230804, 0.09071730077266693, -0.1929394155740738, -0.36337190866470337, 0.17815369367599487, 0.5996454358100891, -0.6061105728149414, 0.0436624400...
it was confusing where the method was defined, it wasn't in the current class and not in any superclass so it too some time to identify its definition (the web based review system does not have clickable links like IDE :-) I don't really think this matters, static-imports are still quite new and soon we will all get us...
[ 0.04569333419203758, -0.04868065565824509, 0.11611280590295792, 0.4017711877822876, -0.12396198511123657, -0.42862337827682495, 0.2970121502876282, -0.03787669911980629, -0.19551557302474976, -0.09464769810438156, 0.18273261189460754, 0.1710129976272583, -0.23135250806808472, 0.27214416861...
super class. So, when *does* it make sense to static import methods? When have you done it? Did/do you like the way the unqualified calls look? EDIT: The popular opinion seems to be that static-import methods if nobody is going to confuse them as methods of the current class. For example methods from java.lang.Math a...
[ 0.23717033863067627, -0.5210914611816406, -0.027985161170363426, 0.21613852679729462, -0.31924936175346375, -0.31271860003471375, 0.31168657541275024, -0.07330262660980225, -0.367328405380249, -0.44735774397850037, -0.20960482954978943, 0.568892776966095, -0.34807759523391724, -0.211572632...
static import? **Very sparingly!** Only use it when you'd otherwise be tempted to declare local copies of constants, or to abuse inheritance (the Constant Interface Antipattern). ... If you overuse the static import feature, it can make your program unreadable and unmaintainable, polluting its namespace with all the st...
[ 0.20353418588638306, -0.23472481966018677, 0.19718550145626068, 0.057917457073926926, -0.42815351486206055, -0.26352545619010925, 0.33111998438835144, 0.32929527759552, -0.3481072783470154, -0.116399385035038, -0.20884175598621368, 0.6008671522140503, -0.6598533987998962, 0.306728214025497...
individually. (<https://docs.oracle.com/javase/8/docs/technotes/guides/language/static-import.html>) There are two parts I want to call out specifically: * Use static imports **only** when you were tempted to "abuse inheritance". In this case, would you have been tempted to have BusinessObject `extend some.package.D...
[ 0.509480893611908, 0.031179293990135193, -0.21223995089530945, -0.13357649743556976, -0.6147791147232056, -0.04041320085525513, 0.22112511098384857, -0.4875192642211914, -0.5191869735717773, -0.4274173378944397, -0.1249648705124855, 0.6324304938316345, -0.3279072642326355, -0.0421624518930...
from. Personally, I have used this language feature *very* rarely, and almost always only with constants or enums, never with methods. The trade-off, for me, is almost never worth it.
[ 0.5888864994049072, 0.1303664743900299, 0.1335640549659729, -0.05113678053021431, -0.17255787551403046, 0.03828722983598709, 0.24328258633613586, 0.37553951144218445, 0.05199470743536949, -0.684800386428833, -0.41135892271995544, 0.3816663324832916, -0.04664496332406998, 0.145064577460289,...
I'm considering moving my code (around 30K LOC) from CPython to Jython, so that I could have better integration with my java code. Is there a checklist or a guide I should look at, to help my with the migration? Does anyone have experience with doing something similar? From reading the [Jython site](http://jython.so...
[ -0.07673273235559464, 0.06358549743890762, 0.27345141768455505, -0.26192015409469604, -0.10850919038057327, 0.03302985057234764, 0.16683758795261383, 0.04013168811798096, -0.4073033332824707, -0.5868509411811829, 0.2041788101196289, 0.11076725274324417, -0.3157631456851959, 0.2727288007736...
to write python code that works in CPython, Jython and IronPython](https://stackoverflow.com/questions/53543/what-are-some-strategies-to-write-python-code-that-works-in-cpython-jython-and-i) I'm starting this as a wiki collected from the other answers and my experience. Feel free to edit and add stuff, but please try t...
[ 0.11953404545783997, 0.13372282683849335, 0.006823373027145863, -0.01917836256325245, -0.3312489688396454, -0.12107826769351959, 0.5330531597137451, -0.06779883056879044, -0.27749624848365784, -0.4837498962879181, 0.03448871523141861, 0.5617731213569641, -0.22213685512542725, -0.1780735105...
\_\_ method is invoked very late in Jython code, not immediately after the last reference to the object is deleted. MySQL Integration ----------------- `mysqldb` is a c module, and therefore will not work in jython. Instead, you should use `com.ziclix.python.sql.zxJDBC`, which comes bundled with Jython. Replace th...
[ -0.25985416769981384, 0.22189690172672272, 0.5689424872398376, 0.024586627259850502, 0.10626715421676636, -0.08931925147771835, 0.446079283952713, -0.1453213095664978, -0.06279505789279938, -0.5709471106529236, -0.39511096477508545, 0.42086952924728394, -0.45610344409942627, 0.164046540856...