text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
application](https://stackoverflow.com/questions/564829/launching-a-net-winforms-application-interactively-from-a-service/564874) from it. Then the user session application could either process the information itself or pass it to the service via a pipe or socket.
[ 0.37304434180259705, -0.10808844119310379, 0.43559104204177856, -0.07575473189353943, -0.0908336490392685, 0.026283569633960724, 0.2324570268392563, -0.16434872150421143, 0.0760146751999855, -0.45675912499427795, -0.3205951750278473, 0.357400119304657, -0.11928962916135788, 0.2490741014480...
MSDN says that a class that would be 16 bytes or less would be better handled as a struct [[citation]](http://msdn.microsoft.com/en-us/library/ah19swz4(VS.71).aspx). Why is that? Does that mean that if a struct is over 16 bytes it's less efficient than a class or is it the same? How do you determine if your cl...
[ -0.1330815553665161, 0.0880790427327156, 0.3674606680870056, 0.04992315545678139, -0.16637633740901947, -0.07725169509649277, 0.22730858623981476, -0.14111879467964172, -0.4559897482395172, -0.5756528377532959, -0.30441319942474365, 0.537335216999054, -0.25495630502700806, -0.0650226399302...
reference type. If you're using 16 bytes for total storage, it's probably not worth it to create memory references (4 to 8 bytes) for each one. * When you have really small objects, they can often be pushed onto the IL stack, instead of references to the objects. This can really speed up some code, as you're eliminatin...
[ 0.36210018396377563, 0.15784280002117157, 0.06707403063774109, 0.37858444452285767, -0.32105210423469543, 0.1652202308177948, 0.11884157359600067, -0.10045823454856873, -0.4039372205734253, -0.7159295678138733, 0.2812149226665497, 0.18320848047733307, -0.2118394374847412, 0.233997941017150...
most important difference between a `struct` and a `class`, though, is that `struct`s are value type and `class`es are reference type.
[ -0.15661537647247314, 0.09353438019752502, -0.09684373438358307, 0.27651241421699524, -0.37537965178489685, -0.09977075457572937, -0.018611468374729156, 0.12135107815265656, 0.3895747661590576, -0.6925908327102661, -0.2926005423069, 0.26044538617134094, -0.005979764275252819, 0.10749916732...
I am using JDBC to connect to a MySQL server (no connection pooling I think). In the connection URL I have `autoReconnect=true` But my connection still times out. I've even checked `conn.isClosed()` and its false. But when I try to use the connection I get the following exception. ``` com.mysql.jdbc.CommunicationsEx...
[ 0.10967288166284561, 0.35084912180900574, 0.23951153457164764, -0.37257882952690125, -0.191465362906456, -0.12348166108131409, 0.4728768467903137, 0.03327053040266037, -0.2488502860069275, -0.9726274609565735, 0.04169246926903725, 0.6844232678413391, -0.35241755843162537, 0.271710634231567...
time out? Or am I going to have to upgrade to Java 1.6? I had the same issue and it was absolutely maddening. Here's what the docs say on the MySQL website (emphasis mine) *Should the driver try to re-establish stale and/or dead connections? **If enabled the driver will throw an exception for a queries issued on a sta...
[ 0.3038961887359619, -0.019840549677610397, 0.3649688959121704, -0.1252678632736206, 0.1717280000448227, -0.11282633990049362, 0.21151359379291534, -0.03762108087539673, -0.2354406863451004, -0.6663090586662292, -0.051492754369974136, 0.4495505392551422, -0.12077998369932175, 0.095425844192...
data consistency when applications do not handle SQLExceptions properly, and is only designed to be used when you are unable to configure your application to handle SQLExceptions resulting from dead and stale connections properly. Alternatively, investigate setting the MySQL server variable "wait\_timeout" to some high...
[ -0.15829122066497803, -0.23467086255550385, 0.46381428837776184, 0.2917817234992981, 0.05056789144873619, -0.17872129380702972, 0.4925810694694519, 0.02382395789027214, -0.3252522647380829, -0.332146555185318, -0.0013601770624518394, 0.47670361399650574, -0.19469185173511505, 0.15476556122...
and retry the query if possible. **ETA**: [This link](http://bugs.mysql.com/bug.php?id=5020) provides a bit more information, and indicates that autoReconnect will probably be removed in the future anyways.
[ 0.022476155310869217, -0.15808454155921936, 0.17574194073677063, 0.18196149170398712, 0.4153859615325928, -0.1410616785287857, 0.3435750901699066, 0.27619293332099915, -0.2912828028202057, -0.49912598729133606, -0.19151371717453003, 0.5168712735176086, -0.6003008484840393, -0.1060806065797...
I've Inheritted a large Java Web project which I've got to make some modifications to, I'm a fairly competent Java Programmer when it comes the the basics but I've never done any JSP programming or EJB programming before. I remember vauguely doing some servlet programming 5 or so years ago in university, but I'm assumi...
[ 0.2845039367675781, 0.022840440273284912, 0.04762393981218338, 0.12787088751792908, -0.12518362700939178, -0.04090041667222977, 0.38255754113197327, 0.26331982016563416, -0.47902920842170715, -0.42269840836524963, 0.34369832277297974, 0.5371127724647522, 0.372545450925827, 0.01910834014415...
will let me be able to read the JSP servlet and EJB code and understand how it works well enough to modify it and deploy it? Ofcaurse it depends a lot on what project you inherited and when it was written. Also what technologies are used? The best resource on starting J2EE development I think it's the [Java Passion si...
[ 0.54730224609375, -0.1058713048696518, 0.18860776722431183, 0.14589829742908478, -0.1265885829925537, -0.386953204870224, 0.11492603272199631, 0.20837858319282532, -0.12367753684520721, -0.5198280811309814, 0.11415965855121613, 0.4558090269565582, 0.42157480120658875, -0.14763423800468445,...
How do I determine if a function is defined in php? I'd like to do something like: ``` if(! function_defined(money_format)) // function not defined on windows { function money_format($str) { ... } } ``` Is this possible in php? You can use the [`function_exists`](http://us2.php.net/manual/en/function.function...
[ 0.29525312781333923, 0.0661335363984108, 0.24759401381015778, -0.03456311300396919, 0.029018741101026535, -0.1952325850725174, -0.24268296360969543, -0.1761966049671173, -0.1283046156167984, -0.33945518732070923, 0.3123302161693573, 0.7173566818237305, 0.11072203516960144, -0.1436379700899...
Given: I fill up an array of handles with auto reset events and pass it off to WaitForMultipleObjects with bWaitAll = FALSE. From MSDN: “When bWaitAll is FALSE, this function checks the handles in the array in order starting with index 0, until one of the objects is signaled. If multiple objects become signaled, the ...
[ 0.07317519932985306, -0.22648146748542786, 0.3765861690044403, -0.2286122590303421, -0.053031958639621735, 0.15037956833839417, 0.28440016508102417, -0.11687559634447098, -0.29190927743911743, -0.35691455006599426, 0.08717577904462814, 0.442184716463089, -0.30410584807395935, 0.25103071331...
have a loop that’s along the lines of: ``` For ( ; ; ) { WaitForMultipleObjects(…) If (not failed) Process object that called. Remove the handle that signaled from the array. Compact the arrary. } ``` > So, now if multiple objects signal I’ll get the index of the first one. Do I have to loop > thou...
[ 0.1361234188079834, -0.38846883177757263, 0.5317571759223938, -0.12237699329853058, -0.083351269364357, 0.15104547142982483, 0.29374244809150696, -0.456278532743454, -0.3975166976451874, -0.30475035309791565, 0.1735701709985733, 0.46431639790534973, -0.5214188694953918, 0.1259525865316391,...
have a very rapidly firing first object in the wait object array, it will starve the others; what you do is order your objects in the wait object array by frequency of firing, with the least frequent being first. BTW, where you're using an endless for(), you could use a goto. If you really are not leaving a loop, an u...
[ 0.5860486030578613, -0.6979822516441345, -0.023949626833200455, 0.012001563794910908, -0.22846689820289612, -0.1610718071460724, 0.42444002628326416, -0.17496447265148163, -0.16549581289291382, -0.07764476537704468, -0.29303857684135437, 0.2192448079586029, -0.4571875333786011, 0.034755341...
What is the preferred method to determine if the Sun Java Plugin is installed in the browser? [java deployment toolkit](http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit) ``` script src="http://java.com/js/deployJava.js" if (deployJava.versionCheck('1.6')) { alert("1.6 insta...
[ 0.05227818340063095, -0.1440758854150772, 0.4696688950061798, -0.506730854511261, 0.2855164110660553, -0.3462807834148407, 0.12822572886943817, -0.21266479790210724, -0.4015342593193054, -0.6162670254707336, -0.48128271102905273, 0.6430206298828125, -0.28135740756988525, -0.429497182369232...
Is there a fast and easy way of getting term frequencies from a Lucene index, without doing it through the `TermVectorFrequencies` class, since that takes an awful lot of time for large collections? What I mean is, is there something like `TermEnum` which has not just the document frequency but term frequency as well?...
[ 0.1278609186410904, 0.04978266730904579, 0.44779959321022034, 0.3194138705730438, -0.05600922927260399, -0.5931404829025269, -0.23865382373332977, -0.06794320046901703, -0.005742475390434265, -0.6619765162467957, -0.3730998635292053, 0.47921741008758545, 0.02657746709883213, 0.042368449270...
the ".frq" file in an index segment, where each term frequency is listed in document order. If that's "too slow", make sure that you've optimized your index to merge multiple segments into a single segment. Iterate over the documents in order (skips are alright, but you can't jump back and forth in the document list e...
[ 0.2027071863412857, -0.034836284816265106, 0.4818507432937622, 0.40509068965911865, 0.0048505752347409725, -0.335747092962265, -0.03784805163741112, -0.3023203909397125, -0.5223987102508545, -0.465768963098526, -0.18728987872600555, 0.6392306685447693, -0.2711097300052643, -0.1027469635009...
to the OS for use on its own file-caching system.
[ 0.1735532581806183, -0.08216153830289841, 0.09820938110351562, 0.12469058483839035, 0.13975128531455994, 0.08380850404500961, -0.2613339126110077, 0.15728135406970978, -0.07328514009714127, -0.2764379382133484, -0.6890758275985718, 0.36913204193115234, -0.08801192045211792, 0.1068557500839...
I have a file, its contents are identical. It is passed into gzip and only the compressed form is stored. I'd like to be able to generate the zip again, and only update my copy should they differ. As it stands diffing tools (diff, xdelta, subversion) see the files as having changed. Premise, I'm storing a mysqldump of...
[ 0.7729437947273254, 0.32144108414649963, 0.32090070843696594, -0.23133543133735657, -0.08140209317207336, -0.17795854806900024, 0.02217816933989525, -0.18055862188339233, -0.14950689673423767, -0.43378663063049316, -0.21687327325344086, 0.2992108166217804, -0.3638274073600769, 0.5415716767...
have my revision numbers needlessly increase every 15m. I realize I could dump the file as just plain text, but I'd prefer not as it's rather large. The command I am currently using to generate the dumps is: ``` mysqldump $DB --skip-extended-insert | sed '$d' | gzip -n > $REPO/$DB.sql.gz ``` The `-n` instructs gzi...
[ 0.11764932423830032, 0.40259861946105957, 0.7189545631408691, -0.19832731783390045, 0.14092640578746796, -0.04656945914030075, 0.07704632729291916, -0.20702584087848663, -0.5515936613082886, -0.442311555147171, -0.294227659702301, 0.2858366370201111, -0.3211960196495056, 0.3038603067398071...
I had mistakenly used a capital N when the correct argument was a lowercase one.** > The -N instructs gzip to remove the > filename/timestamp information. Actually, that does just the opposite. `-n` is what tells it to forget the original file name and time stamp.
[ -0.17875976860523224, 0.40053778886795044, 0.46141281723976135, -0.14765627682209015, 0.28635790944099426, -0.06144358590245247, 0.21319051086902618, 0.27542024850845337, -0.10107172280550003, -0.5012245774269104, -0.42063263058662415, 0.3543853759765625, -0.030724383890628815, 0.482232928...
I have been programming for a few years now and have used function pointers in certain cases. What I would like to know is when is it appropriate or not to use them for performance reasons and I mean in the context of games, not business software. Function pointers are fast, John Carmack used them to the extent of abu...
[ 0.24490001797676086, 0.20455405116081238, -0.031260259449481964, 0.27488863468170166, -0.040208395570516586, -0.2632865309715271, 0.3254731595516205, -0.0808718129992485, -0.07658199220895767, -0.5349385738372803, 0.34301674365997314, 0.8320112228393555, -0.09039847552776337, -0.3280053138...
uses of function pointers in modern c-style languages such as C, C++, C# and Java, etc? There is nothing especially "fast" about function pointers. They allow you to call a function which is specified at runtime. But you have exactly the same overhead as you'd get from any other function call (plus the additional point...
[ -0.12130185216665268, -0.16253627836704254, 0.32593241333961487, 0.3453175723552704, -0.24401910603046417, -0.03616293892264366, -0.1669575423002243, -0.19701741635799408, -0.23017388582229614, -0.6389093399047852, -0.014402956701815128, 0.5777813196182251, -0.2407490611076355, -0.26329523...
nothing to do with performance, and should never be used to gain performance. Instead, they are a very slight nod to the functional programming paradigm, in that they allow you to pass a function around as parameter or return value in another function. A simple example is a generic sorting function. It has to have so...
[ 0.3229193687438965, -0.21362829208374023, 0.09086261689662933, 0.07266067713499069, -0.27550050616264343, -0.09443865716457367, -0.08900216221809387, -0.08396359533071518, -0.3541682958602905, -0.3472161889076233, -0.02317563071846962, 0.28521469235420227, -0.40263789892196655, 0.130629822...
that does not define the less than operator, you have to pass in a function pointer it can call to perform the comparison. And this leads us nicely to a superior alternative. In C++, you're not limited to function pointers. You often use functors instead - that is, classes that overload the operator `()`, so that they...
[ 0.06535214185714722, -0.17024284601211548, -0.17212046682834625, 0.18970324099063873, -0.4803723990917206, -0.10133339464664459, 0.017247797921299934, -0.13385608792304993, -0.15236367285251617, -0.3111943006515503, -0.1360374391078949, 0.7944066524505615, -0.4405706524848938, -0.059916850...
the surrounding code can call. * They are faster: unlike function pointers, whose type only encode the signature of the function (a variable of type `void (*)(int)` may be *any* function which takes an int and returns void. We can't know which one), a functor's type encodes the precise function that should be called (S...
[ -0.07486562430858612, -0.1600686013698578, 0.19555561244487762, 0.19023914635181427, -0.26541751623153687, -0.10910818725824356, 0.0063138375990092754, -0.22046764194965363, 0.09729691594839096, -0.5118138194084167, -0.17982257902622223, 0.6426710486412048, -0.4014681279659271, -0.16804115...
function designed specifically for your datatype. The compiler can eliminate all the overhead of calling a user-defined function. * They are safer: There's very little type safety in a function pointer. You have no guarantee that it points to a valid function. It could be NULL. And most of the problems with pointers ap...
[ 0.09541281312704086, -0.08396594226360321, -0.01965603046119213, 0.15999487042427063, -0.2408950924873352, -0.0815437063574791, 0.1505129337310791, -0.1368120312690735, -0.09131612628698349, -0.41504353284835815, -0.2406347692012787, 0.6694375276565552, -0.6297942996025085, -0.181117340922...
any other variable. You can pass a function to another function, and it will call your function at specified times (when a timer expires, when the window needs redrawing, or when it needs to compare two elements in your array) As far as I know (and I could be wrong, because I haven't worked with Java for ages), Java d...
[ 0.22806213796138763, -0.2702353596687317, 0.1123153567314148, -0.056225985288619995, -0.22301089763641357, -0.07818877696990967, 0.07936044782400131, -0.0029652267694473267, -0.1586896777153015, -0.4014265239238739, 0.06222047284245491, 0.5941980481147766, -0.5147542357444763, 0.0122272903...
delegate), you call `foo.Execute()`. Similar to the C++ implementation in principle, but without the generality of C++ templates, and without the function syntax that allows you to treat function pointers and functors the same way. So that is where you use function pointers: When more sophisticated alternatives are no...
[ 0.3392810523509979, -0.28462544083595276, 0.0664091408252716, 0.27236267924308777, -0.032567575573921204, -0.1907641589641571, 0.02436596341431141, -0.4452413320541382, -0.29216688871383667, -0.4694085419178009, -0.04284297674894333, 0.5377021431922913, -0.47666025161743164, 0.309641808271...
system in question. So really, forget about John Carmack and don't assume that anything you see in his code will magically make your code better if you copy it. He used function pointers because the games you mention were written in C, where superior alternatives are not available, and not because they are some magica...
[ 0.24230971932411194, 0.22950753569602966, -0.32619133591651917, 0.6455209851264954, 0.28021854162216187, -0.061020899564027786, 0.3650013506412506, 0.03718007355928421, -0.2051725685596466, -0.34113314747810364, -0.07643957436084747, 0.74351966381073, -0.19214853644371033, -0.0317950397729...
I recently refactored some of my code to stuff rows into a db using 'load data' and it works great -- however for each record I have I must upload 2 files to s3 -- this totally destroys the magnificent speed upgrade that I was obtaining. Whereas I was able to process 600+ of these documents/second they are now tricklin...
[ 0.2917589545249939, 0.4137957692146301, 0.336904913187027, 0.05215403437614441, -0.21630197763442993, -0.15919359028339386, 0.5010121464729309, -0.024530619382858276, -0.015336132608354092, -0.6264089941978455, 0.503222644329071, 0.5374634265899658, -0.11566193401813507, 0.3366438150405884...
The text files are usually no more than 1.5k. (the other file we stuff in there is an xml representation of the text) I already cache these files in HTTP requests to my web server as they are used quite a lot. btw: our current implementation uses java; I have not yet tried threads but that might be an option Recomme...
[ 0.5723525285720825, -0.5851848125457764, 0.19626246392726898, 0.07356362789869308, -0.171638622879982, -0.10444417595863342, 0.18620498478412628, 0.021753665059804916, -0.22348526120185852, -0.9044657349586487, -0.26976245641708374, 0.5293369889259338, -0.2187231034040451, -0.4565891623497...
<http://jets3t.s3.amazonaws.com/api/org/jets3t/service/multithread/S3ServiceMulti.html#putObjects(org.jets3t.service.model.S3Bucket>, org.jets3t.service.model.S3Object[])
[ 0.1702759563922882, -0.44286665320396423, 0.1311909258365631, 0.11913182586431503, -0.1423226147890091, 0.49846962094306946, 0.15083813667297363, -0.32084816694259644, -0.2871266305446625, -0.5883960723876953, -0.3250562250614166, 0.3549388349056244, -0.2279050350189209, -0.213174208998680...
A web service is configured to expose some of its data when receiving a USR1 signal. The signal will be sent by a xinetd server when it receives a request from a remote client, e.g. nc myserver 50666. When the web server receives USR1 signal, it opens a dedicated fifo pipe, writes its data to the pipe, and then close t...
[ 0.5527231097221375, -0.29888710379600525, 0.5316153168678284, 0.18183524906635284, 0.11922714114189148, -0.45358842611312866, 0.01763913407921791, -0.00026877372874878347, -0.19367586076259613, -0.8146958947181702, -0.47097766399383545, 0.18518584966659546, -0.33263933658599854, 0.33393004...
the pipe did not get closed properly and the cache is leftover, so when next time it serves, both previous and current are sent to the client. The problem is its not constantly happening when trying to reproduce, unluckily, I wasn't able to reproduce once. The following are the simple snippets to demonstrate the proc...
[ 0.2345200479030609, -0.013473392464220524, 0.635646641254425, -0.40878260135650635, 0.0009326758445240557, 0.08102570474147797, 0.37514129281044006, -0.16003955900669098, -0.025297200307250023, -0.9085805416107178, 0.17643481492996216, 0.3589991629123688, -0.44627323746681213, 0.5330140590...
Serve(): if not os.path.exists(PIPE_FILE): os.mkfifo(PIPE_FILE) os.kill(server_pid, signal.SIGUSR1) for i in open(PIPE_FILE): print i, ``` So what exactly happened to cause the dup? How to trigger it? The current fix I unlink the pipe file and recreate it every time to avoid any leftovers but I don't kn...
[ 0.6803065538406372, -0.5154009461402893, 0.4365910589694977, -0.1417301595211029, -0.13786549866199493, -0.0755574032664299, 0.20272687077522278, -0.3465348184108734, -0.11996916681528091, -0.8973127007484436, -0.006144471000880003, 0.4018956124782562, -0.6289278268814087, 0.25303065776824...
database. [1]: <http://jets3t.s3.amazonaws.com/api/org/jets3t/service/multithread/S3ServiceMulti.html#putObjects(org.jets3t.service.model.S3Bucket>, org.jets3t.service.model.S3Object[])
[ 0.1622324436903, -0.4107550084590912, 0.2759110927581787, 0.34333980083465576, -0.0854044035077095, 0.2389618456363678, 0.12400247156620026, -0.2984808087348938, -0.2908003032207489, -0.6399269104003906, -0.025221968069672585, 0.3271370232105255, -0.3918733298778534, -0.05635903403162956, ...
I have a list which I've set item-level permissions on. I set it to allow users to read all items and only edit their own items... The issue is that if I do this then I can still edit all items... If I change it so that I can only read my own and only edit my own then it works as expected... Anyone have any thought...
[ 0.4689643085002899, 0.11880157142877579, 0.4555666744709015, 0.17599880695343018, 0.13429106771945953, -0.12061161547899246, 0.22028015553951263, -0.4083389937877655, -0.3538883924484253, -0.4941399395465851, 0.14205840229988098, 0.42266780138015747, -0.316299170255661, 0.36497431993484497...
let contributors to go to EditForm but once contributors try to save item, that doesn't belong to them, it show error message that you don't have permissions. give it a try, create an item by some user let say User1, then try to modify that item using User2 credentials (User must have only Contributor right on the sit...
[ 0.26263609528541565, -0.12206167727708817, 0.39919358491897583, 0.2211918979883194, -0.24738341569900513, -0.3501680791378021, 0.22808405756950378, 0.012919193133711815, -0.2518177330493927, -0.5921825170516968, 0.154291570186615, 0.38337013125419617, -0.19060276448726654, 0.25862565636634...
In my code jsc.tools is an object containing objects. Each sub-object contains a init() and run() method. I have the following code running at startup: ``` for(tool in jsc.tools) { tool.init(); } ``` which gives me the error "tool.init is not a function". A sample of a tool's declaration is: ``` jsc.tools.som...
[ 0.26840105652809143, 0.13321936130523682, 0.15641836822032928, -0.12665016949176788, -0.06982868909835815, 0.02714313566684723, 0.3552691638469696, -0.15218570828437805, 0.044599879533052444, -0.6632491946220398, -0.14591309428215027, 0.47150489687919617, -0.18395940959453583, 0.0293220710...
I'm trying to create a (very) simple Win32 GUI program, but for some reason the compiler (I'm using VC++ 2008 Express) wants me to manually typecast every string or char\* to LPCWSTR: I get this compiler error every time I do this, for example I get this error for the "Hello" and "Note": error C2664: 'MessageBoxW' : ...
[ -0.010029929690063, 0.4677870273590088, 0.15008427202701569, -0.3016655445098877, -0.12610052525997162, 0.010237492620944977, 0.48115426301956177, -0.3285428583621979, 0.060474246740341187, -0.5417847037315369, 0.001704630209133029, 0.6699565649032593, -0.5385400056838989, 0.11051208525896...
return 0; } ``` The default for new projects in VS2008 is to build UNICODE aware applications. You can either change that default and go back to using ANSI or MBCS apps (Properties->Configuration Properties->General->Character Set), or use Unicode Strings like this: ``` int WINAPI WinMain(HINSTANCE hInstance, HINSTAN...
[ -0.0037970549892634153, -0.06465647369623184, 0.5198754072189331, 0.00975794531404972, 0.09455913305282593, -0.029531562700867653, 0.3449760675430298, -0.19429351389408112, -0.18471528589725494, -0.5602327585220337, -0.28436022996902466, 0.5545347929000854, -0.48375797271728516, 0.17887233...
I am trying to pass an array of a simple object to a web service and I'm really stuck on this error during compile of my web client project: Cannot implicitly convert type 'TRIMBrokerUtil.MetaData[]' to 'TRIMBrokerASMXProxy.ASMXProxy.MetaData[]' Here is my "utility" project compiled into TRIMBrokerUtil.dll: ``` name...
[ 0.45525091886520386, 0.04825526103377342, 0.15820732712745667, -0.0953359603881836, 0.04822365567088127, -0.22632741928100586, 0.26581063866615295, -0.40991902351379395, -0.02005341835319996, -0.5170539021492004, -0.12002679705619812, 0.6932656168937683, -0.37333616614341736, 0.04619828611...
} public string Name { get { return this._Name; } set { Name = value; } } public string Value {
[ -0.17331364750862122, -0.2240556925535202, 0.09204952418804169, -0.1336621642112732, 0.0625779777765274, -0.02709459513425827, 0.22975848615169525, -0.02431410364806652, 0.1762877106666565, -0.4244101345539093, -0.37276512384414673, 0.6683036088943481, -0.3305326998233795, 0.25337514281272...
get { return this._Value; } set { _Value = value; } } } ``` Here is a snippet of the web service which also compiles fine: using TRIMBrokerUtil; namespace TRIMBrokerService { [WebService(Namespace = "<http://tempuri.org/>")] [WebServiceBinding(Confo...
[ 0.34417879581451416, -0.16104108095169067, 0.42669570446014404, 0.232591450214386, 0.01900658570230007, -0.028369160369038582, 0.4587269723415375, -0.3016672134399414, -0.32930484414100647, -0.835970401763916, -0.41508883237838745, 0.8194929957389832, -0.11242026835680008, -0.0025632269680...
[WebMethod] public string UploadFile(byte[] incomingArray , string FileName , long FileLengthInBytes , MetaData[] metaDataArray) { ``` ...and usage later as this: ``` Update update = BuildMetaData(metaDataArray); ``` ...and this: ``` private Update BuildMetaData(MetaData[] nvPairs)...
[ -0.14340652525424957, -0.16331709921360016, 0.6613489985466003, 0.02300257980823517, -0.0675298422574997, 0.0462099127471447, 0.24980787932872772, -0.5689030289649963, -0.23591892421245575, -0.8037794828414917, -0.3476733863353729, 0.3213482201099396, -0.37320253252983093, 0.28213447332382...
nvPairs[i].Value; } update.Items = ip; return update; } ``` Next, (via "Add Web Reference") I have my proxy class for the ASMX webservice in a separate project and it compiles without problem. Inside the generated reference.cs file I find this which seems OK: ``` [System.Web.Services.Protocols.SoapDo...
[ 0.09429732710123062, -0.13726896047592163, 0.7521024942398071, -0.183349609375, -0.19138632714748383, 0.20763550698757172, 0.26003390550613403, -0.3736165463924408, -0.3962089717388153, -0.7580187916755676, -0.13849309086799622, 0.3441831171512604, -0.15792590379714966, 0.19932690262794495...
incomingArray, FileName, FileLengthInBytes, metaDataArray}); return ((string)(results[0])); } ``` Now for the error that occurs in compilation in the web client project (default.aspx.cs): ``` using TRIMBrokerUtil; public partial class _Defa...
[ -0.36201542615890503, -0.08771788328886032, 0.534720242023468, -0.17984402179718018, 0.3913503587245941, -0.003795477794483304, 0.23919619619846344, 0.044041652232408524, -0.2804114818572998, -0.5412585139274597, -0.4100894033908844, 0.680561363697052, -0.3468293249607086, 0.28317144513130...
: System.Web.UI.Page { private void UploadFile(HttpPostedFile postedFile , string fileNameOnly , MetaData[] metaDataArray) { string strURI = string.Empty; TRIMBrokerASMXProxy.ASMXProxy.FileService client = new TRIMBrokerASMXProxy.ASMXProxy.FileService(); B...
[ -0.13113194704055786, -0.27941206097602844, 0.2539753317832947, -0.0955539345741272, -0.24997657537460327, 0.3095151484012604, 0.402894526720047, -0.32562145590782166, -0.3326427638530731, -0.7214776873588562, -0.3374471366405487, 0.3903963267803192, -0.6069828271865845, 0.298918753862381,...
TRIMBrokerASMXProxy.ASMXProxy.MetaData[] kvData = metaDataArray; // error complains about this line strURI = client.UploadFile(binData, fileNameOnly, binData.Length, kvData ); ``` I have also tried changing the last 2 lines above to simply this one line: ``` strURI = client.UploadFile(binData, fileNameOnly, ...
[ 0.15355485677719116, 0.1353146731853485, 0.1513124257326126, -0.09089735150337219, -0.09671808034181595, -0.18262840807437897, 0.5180131793022156, -0.37649333477020264, 0.07152168452739716, -0.4893563389778137, -0.08721327036619186, 0.7553532123565674, -0.3845248520374298, 0.02601536177098...
assign an array of TRIMBrokerUtil.MetaData to an array of TRIMBrokerASMXProxy.ASMXProxy.MetaData. Remember that the asp.net proxy declares its own type. Just copy the data into a new array with the proxy type.
[ 0.30874988436698914, -0.20534805953502655, 0.1962878704071045, 0.3548378348350525, 0.09902074187994003, -0.2754693329334259, -0.056587036699056625, -0.4892066717147827, -0.10785896331071854, -0.4272679090499878, -0.09607873857021332, 0.5591697692871094, -0.4657902717590332, -0.254645347595...
What is the purpose of adding the batch="false" in the compilation tag in ASP.NET 1.1? MSDN says the purpose of the batch flag > eliminates the delay caused by the compilation required when you > access a file for the first time. When this attribute is set to True, > ASP.NET precompiles all the uncompiled files in ...
[ 0.5425367951393127, -0.1324818879365921, 0.2113264948129654, -0.11768977344036102, -0.08363582193851471, -0.1893581598997116, 0.5133476257324219, -0.24610067903995514, -0.3153207302093506, -0.36612749099731445, -0.10959071666002274, 0.403613418340683, -0.27133357524871826, 0.11148426681756...
faster the first time, but slower subsequent times, and I believe this applies to 1.1 as well. [MSDN Link](http://msdn.microsoft.com/en-us/library/s10awwz0.aspx)
[ -0.18607459962368011, -0.4315435290336609, 0.4607055187225342, 0.09956227242946625, 0.0065210009925067425, -0.12288225442171097, 0.3076377511024475, 0.05262862890958786, -0.22007343173027039, -0.8960283398628235, -0.37154966592788696, 0.4238232374191284, -0.1759619265794754, -0.12388611584...
I am trying to parse an HTML table using Hpricot but am stuck, not able to select a table element from the page which has a specified id. Here is my ruby code:- ``` require 'rubygems' require 'mechanize' require 'hpricot' agent = WWW::Mechanize.new page = agent.get('http://www.indiapost.gov.in/pin/pinsearch.aspx') ...
[ 0.19823171198368073, 0.3567659556865692, 0.7406833171844482, -0.042483046650886536, -0.07038949429988861, -0.0012188834371045232, 0.3544529378414154, -0.3235699236392975, -0.034350570291280746, -0.6007227897644043, -0.025418881326913834, 0.2858890891075134, -0.40271812677383423, 0.08621403...
ends up looking like this: ``` | SilverlightLib | File1.cs | File2.cs | ClrLib | File1.cs <as link> | File2.cs <as link> ``` Then VS works fine, and both sets of code get compiled. The annoying part is where the Silverlight framework doesn't line up. (WCF has some parts that don't exist in SL.) In that case,...
[ 0.4205712080001831, -0.03208427131175995, 0.4373864233493805, 0.04079727828502655, -0.362581729888916, -0.376833438873291, 0.31662121415138245, -0.3497316241264343, 0.007582317106425762, -0.8920535445213318, 0.3842332363128662, 0.546496570110321, -0.2667793333530426, 0.09278691560029984, ...
* Always edit from the SL project -- this way the editor will limit to SL, and you won't get surprises later on. * Sometimes you have to close the opened file for Intellisense to update in the other project.
[ 0.052533332258462906, -0.15159600973129272, 0.3964916467666626, 0.08288544416427612, -0.23515699803829193, -0.41691771149635315, 0.14931751787662506, 0.3252135217189789, -0.4081999659538269, -0.42549681663513184, 0.0012481171870604157, 0.30736982822418213, 0.056273408234119415, -0.14986588...
Greetings Everyone, Trying to compile using g++ and need to link the standard f90 (or f77 even) libraries for some fortran source codes in my Makefile. I cant find the name of it anywhere. Makerfile: ``` products: SlowDynamic.exe SlowDynamic.exe: main.o SA.o mersenne.o CFE.o BCs.o EMatrix.o Numbering.o KMatrix.o So...
[ -0.27762678265571594, 0.3550017774105072, 0.8312464952468872, 0.28288912773132324, -0.29306095838546753, 0.03267699107527733, 0.3601550757884979, 0.49925336241722107, -0.09403038024902344, -0.5926120281219482, -0.503878116607666, 0.018795741721987724, 0.35534965991973877, -0.03291791677474...
-o SA.o SA.cpp mersenne.o: mersenne.cpp g++ -c -o mersenne.o mersenne.cpp CFE.o: CFE.c gcc -c -o CFE.o CFE.c MA_57.o: MA_57.f f77 -c -o MA_57.o MA_57.f blas.o: blas.f f77 -c -o blas.o blas.f MA_57_Depend.o: MA_57_Depend.f f77 -c -o MA_57_Depend.o MA_57_Depend.f Metis.o: Metis.f f77 -c -o M...
[ -0.32219037413597107, 0.44407111406326294, 0.5042501091957092, 0.27851179242134094, -0.459203839302063, 0.8487101793289185, 0.10660501569509506, 0.372616171836853, -0.7038317322731018, -0.8077147603034973, -0.3361656665802002, -0.135702446103096, -0.05703151598572731, 0.07941179722547531, ...
-o Solve.o Solve.c clean: rm *.o Main.exe *.gpi ``` Compiler: ``` birch $ make mksh: Warning: newline is not last character in file Makefile Current working directory /u/f/osv20/Y4-UNIX/complete g++ -L/usr/sfw/lib -R/usr/sfw/lib -lgcc_s -o SlowDynamic.exe main.o \ SA.o mersenne.o CFE.o MA_57.o blas.o M...
[ -0.31809455156326294, 0.3294633626937866, 0.7418760657310486, 0.09442442655563354, 0.15782836079597473, 0.3052363395690918, 0.3806731104850769, 0.15113334357738495, -0.21452294290065765, -0.4607187807559967, -0.462683767080307, 0.05697312951087952, -0.14761890470981598, 0.3467612564563751,...
in file __f90_sfw_i4 MA_57.o __f90_sfw_ch MA_57.o __f90_sfw_r4 MA_57.o __f90_ifw_ch
[ -0.14798927307128906, 0.6472631692886353, 0.37716010212898254, -0.0022972964216023684, 0.3915756046772003, 0.421745628118515, -0.15106120705604553, -0.21469858288764954, -0.2930454611778259, -0.3355574905872345, -0.36136192083358765, 0.26917704939842224, -0.1037549301981926, 0.182746708393...
MA_57.o __f90_ifw_r4 MA_57.o __nintf MA_57.o __s_cmp blas.o __r_sign
[ -0.4180743098258972, 0.557733952999115, 0.35438618063926697, -0.3679908215999603, 0.19018152356147766, 0.661173403263092, 0.05572780221700668, -0.23040056228637695, -0.5383533239364624, -0.5877059102058411, -0.31592079997062683, 0.2436559647321701, -0.22926416993141174, 0.3455207049846649,...
MA_57_Depend.o __f90_sifw MA_57.o __f90_ssfw MA_57.o __f90_stop blas.o __f90_esfw
[ -0.10310039669275284, 0.1976853907108307, 0.56498783826828, -0.29875773191452026, 0.031219474971294403, 0.6132384538650513, 0.34485936164855957, -0.10055491328239441, -0.4965175688266754, -0.5198473930358887, -0.27675575017929077, 0.5117946863174438, -0.3463181257247925, 0.2373681962490081...
MA_57.o __f90_eifw MA_57.o ld: fatal: Symbol referencing errors. No output written to SlowDynamic.exe collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `SlowDynamic.exe' ``` Results for running 'f77 -v hello.f' ``` amos $ f77 -v hello.f NOTICE:...
[ -0.3120657205581665, 0.20847313106060028, 0.4492526650428772, -0.17077012360095978, 0.270303875207901, 0.44760599732398987, 0.5046682953834534, -0.09743356704711914, -0.223526731133461, -0.3310287296772003, -0.28493115305900574, 0.40950363874435425, -0.2662420868873596, 0.09354043751955032...
-v hello.f -lf77compat ### f90: Note: NLSPATH = /opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat /opt/SUNWspro/prod/bin/f90comp -y-o -yhello.o -ev -y-ftrap=%none -m3 -dq -y-fbe -y/opt/SUNWspro/prod/bin/fbe -y-xarch=generic -y-s -H "/opt/SUNWspro/pr...
[ -0.5502307415008545, -0.14503736793994904, 1.0722236633300781, -0.1762235313653946, -0.0580592006444931, 0.08887078613042831, 0.40764376521110535, -0.29095613956451416, -0.416999876499176, -0.3462560474872589, -0.5057379603385925, 0.7317507863044739, -0.5348727107048035, -0.118980757892131...
command line files and options (expanded): ### -v hello.f ### f90: Note: NLSPATH = /opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat /opt/SUNWspro/prod/bin/f90comp -y-o -yhello.o -ev -y-ftrap=common -m3 -dq -y-fbe -y/opt/SUNWspro/prod/bin/fbe -y-xar...
[ -0.6734587550163269, -0.19619539380073547, 0.44901910424232483, -0.055202532559633255, 0.35244739055633545, 0.2343166023492813, 0.18574045598506927, -0.012615342624485493, -0.24104851484298706, -0.6174067258834839, -0.6514840126037598, 0.6704056262969971, -0.4489877223968506, -0.2011767923...
Warning: newline is not last character in file Makefile Current working directory /u/f/osv20/Y4-UNIX/complete g++ -c -o main.o main.cpp In file included from main.cpp:16: SA.h:85:9: warning: no newline at end of file main.cpp:38:2: warning: no newline at end of file g++ -c -o SA.o SA.cpp In file included from SA.cpp:22...
[ -0.204572856426239, 0.1260915994644165, 0.8150581121444702, -0.08183067291975021, 0.18805888295173645, 0.2645990252494812, 0.5693524479866028, 0.10632051527500153, -0.5594254732131958, -0.6651322841644287, -0.6025645732879639, -0.002652568044140935, -0.3012716770172119, 0.5352420210838318,...
at end of file In file included from CFE.c:29: BCs.h:15:84: warning: no newline at end of file In file included from CFE.c:32: KMatrix.h:12:171: warning: no newline at end of file In file included from CFE.c:34: Solve.h:9:91: warning: no newline at end of file CFE.c: In function `CFE': CFE.c:145: warning: `return' with...
[ 0.017838532105088234, 0.34052082896232605, 0.5305356979370117, -0.0883629247546196, 0.20034535229206085, 0.02577141672372818, 0.4268982410430908, -0.0826057717204094, -0.5243438482284546, -0.5391238927841187, -0.5524632930755615, 0.38117581605911255, -0.5783684253692627, 0.4423817396163940...
-c -o EMatrix.o EMatrix.c In file included from EMatrix.h:9, from EMatrix.c:9: fg_types.h:38:7: warning: no newline at end of file EMatrix.c:78:2: warning: no newline at end of file gcc -c -o Numbering.o Numbering.c In file included from Numbering.h:8, from Numbering.c:8: fg_types.h:38...
[ -0.22395186126232147, 0.5284315943717957, 0.8972422480583191, 0.2671884000301361, 0.09042099118232727, 0.48441365361213684, 0.1042054072022438, 0.007675569038838148, -0.5355971455574036, -0.6808681488037109, -0.5606714487075806, 0.11390851438045502, -0.5116483569145203, 0.2498340755701065,...
from KMatrix.c:9: fg_types.h:38:7: warning: no newline at end of file In file included from KMatrix.c:9: KMatrix.h:12:171: warning: no newline at end of file KMatrix.c:194:2: warning: no newline at end of file gcc -c -o Solve.o Solve.c In file included from Solve.c:8: Solve.h:9:91: warning: no newline at end of file So...
[ -0.3819466531276703, 0.22724951803684235, 0.8101345896720886, 0.12735573947429657, 0.2612151503562927, 0.2221834361553192, 0.4877694845199585, -0.15745800733566284, -0.43976545333862305, -0.5759251713752747, -0.5476943254470825, 0.3032170236110687, -0.5455768704414368, 0.2913855016231537, ...
ma57q: ma57r: ma57u: ma57s: ma57t: ma57d: ma57e: ma57g: ma57j: ma57k: ma57f: ma57l:
[ 0.04105117917060852, 0.16885295510292053, -0.4288994371891022, -0.4530507028102875, -0.24056224524974823, 0.5864500999450684, 0.5730172991752625, -0.06486780941486359, -0.6487895846366882, -0.3500354588031769, -0.09028732776641846, -0.2675292491912842, -0.2768271267414093, 0.53785169124603...
ma57m: ma57n: ma57o: ma57p: ma57w: ma57x: ma57y: ma57v: ma57h: ma57z: f77 -c -o blas.o blas.f NOTICE: Invoking /usr/bin/f90 -f77 -ftrap=%none -c -o blas.o blas.f blas.f: sgemm:
[ -0.10697067528963089, -0.02227812260389328, 0.15469132363796234, -0.38534387946128845, 0.13813047111034393, 0.46071797609329224, 0.40011340379714966, 0.11517760157585144, -0.5337848663330078, -0.3502393364906311, -0.5798301696777344, 0.12600177526474, -0.04635307192802429, 0.14033679664134...
stpsv: isamax: xerbla: lsame: sgemv: f77 -c -o MA_57_Depend.o MA_57_Depend.f NOTICE: Invoking /usr/bin/f90 -f77 -ftrap=%none -c -o MA_57_Depend.o MA_57_Depend.f MA_57_Depend.f: mc47a: mc47b: mc71a: mc34a: mc59a: mc59b:
[ -0.2740112543106079, -0.13591933250427246, 0.6688394546508789, -0.1427491307258606, 0.009409639984369278, 0.20743201673030853, 0.42939692735671997, -0.11733447760343552, -0.33218619227409363, -0.5286902189254761, -0.45990049839019775, 0.659336268901825, -0.27415022253990173, -0.30788201093...
mc59c: mc59d: mc59e: mc59f: ma27i: ma27a: ma27b: ma27c: ma27g: ma27h: ma27u: ma27j: ma27k:
[ -0.4701843559741974, 0.46182626485824585, 0.3223338723182678, -0.4050743281841278, -0.2050039917230606, 1.0372406244277954, 0.5781197547912598, -0.13187889754772186, -0.6031103134155273, -0.40917348861694336, -0.023160697892308235, -0.193333238363266, -0.018527206033468246, 0.3468567430973...
ma27l: ma27m: ma27n: ma27o: ma27p: ma27q: ma27r: mc64i: mc64a: mc64b: mc64d: mc64e:
[ -0.4432382583618164, 0.826320230960846, 0.46961286664009094, -0.48977768421173096, -0.2880026400089264, 0.877673864364624, 0.5258769989013672, -0.3603353798389435, -0.7380015254020691, -0.10914377868175507, -0.04613017663359642, -0.054531920701265335, -0.1276744306087494, 0.116875194013118...
mc64f: mc64r: mc64s: mc64q: mc64u: mc64w: mc21a: mc21b: fd15a: f77 -c -o Metis.o Metis.f NOTICE: Invoking /usr/bin/f90 -f77 -ftrap=%none -c -o Metis.o Metis.f Metis.f: metis_nodend: f77 -L/usr/sfw/lib -R/usr/sfw/lib -lgcc_s -lstdc++ -o SlowDynamic....
[ -0.2638251781463623, -0.03395981341600418, 0.38868221640586853, 0.20347610116004944, -0.27253881096839905, 0.10174227505922318, 0.2961372137069702, 0.14901447296142578, -0.19371405243873596, -0.5857210755348206, -0.3832511901855469, 0.16935648024082184, -0.1855774223804474, 0.0043236091732...
SA.o mersenne.o CFE.o MA_57.o blas.o MA_57_Depend.o Metis.o\ BCs.o EMatrix.o Numbering.o KMatrix.o Solve.o NOTICE: Invoking /usr/bin/f90 -f77 -ftrap=%none -L/usr/sfw/lib -R/usr/sfw/lib -lgcc_s -lstdc++ -o SlowDynamic.exe main.o SA.o mersenne.o CFE.o MA_57.o blas.o MA_57_Depend.o Metis.o BCs.o EMatrix.o Numberin...
[ -0.27194222807884216, 0.347426176071167, 0.5140213370323181, -0.0706741213798523, -0.539975643157959, 0.21654830873012543, 0.30877554416656494, 0.108570896089077, -0.46659159660339355, -0.5534009337425232, -0.1613350510597229, 0.0887334942817688, -0.19859372079372406, 0.23097242414951324, ...
at the time were: * Try link using g77 and include library -lstdc++ (and possibly -lm?) * Try link using g++ and include libraries -lg2c -lm (and possibly -lfrtbegin?) If using newer gfortran then -lgfortran should work if linking with g++ and -lstdc++ if linking with gfortran. You also want to make sure that the g...
[ 0.13754457235336304, -0.2797597348690033, 0.1807631552219391, 0.033657778054475784, -0.06081908568739891, -0.253092497587204, 0.22343498468399048, -0.14729362726211548, -0.20512354373931885, -0.705756425857544, -0.19000311195850372, 0.3663380444049835, -0.6541696786880493, -0.0344622507691...
GCC g++. I don't think this is possible. Try using GCC's g77 or gfortran instead of SUN f77.
[ -0.3833642601966858, -0.1424003541469574, 0.4936312139034271, -0.23196576535701752, -0.3328899145126343, -0.39837056398391724, 0.02400417998433113, -0.06697610020637512, -0.3811851441860199, -0.3980039656162262, -0.18076853454113007, 0.9278796911239624, -0.6115983724594116, -0.034515582025...
I want to have a library that will have a function in it that accepts an object for it's parameter. With this object I want to be able to call a specified function when X is finished. The function that will be called is to be specified by the caller, and X will be done and monitored by the library. How can I do this?...
[ 0.27190548181533813, -0.15523576736450195, 0.2546418607234955, 0.16734012961387634, -0.06151723489165306, 0.02916727215051651, -0.025988295674324036, -0.5824173092842102, -0.19977200031280518, -0.4783824682235718, -0.033727940171957016, 0.5332821011543274, -0.5526967644691467, -0.005150727...
when calling it. 2. Use an interface Using a delegate/lambda ----------------------- ``` public static void DoWork(Action processAction) { // do work if (processAction != null) processAction(); } public static void Main() { // using anonymous delegate DoWork(delegate() { Console.WriteLine("Completed"); }...
[ 0.2020665556192398, -0.09751130640506744, 0.5166512727737427, -0.4814935624599457, 0.2195652574300766, 0.008119549602270126, 0.17198733985424042, -0.8286014199256897, -0.11679374426603317, -0.36365360021591187, -0.5702179074287415, 0.49126145243644714, -0.3678986728191376, 0.25186571478843...
Lambda DoWork((str) => Console.WriteLine(str)); } ``` If it needs multiple arguments, you can add more type parameters to `Action`. If you need a return type, as mentioned use `Func` and make the return type the *last* type parameter (`Func<string, int>` is a function accepting a string and returning an int.) More...
[ 0.25216224789619446, -0.0596168227493763, 0.6191315650939941, 0.00267994892783463, -0.22609053552150726, -0.026299625635147095, -0.1672159880399704, -0.7857204079627991, -0.13418181240558624, -0.4095076322555542, 0.14914628863334656, 0.6600035429000854, -0.27670398354530334, 0.048426900058...
Main() { var obj = new MyObjectWithX() ActionClass.DoWork(obj); } ```
[ -0.43014848232269287, -0.18887320160865784, 0.5765021443367004, -0.517695963382721, 0.23703473806381226, 0.24073417484760284, 0.5907127261161804, -0.028744705021381378, -0.37409600615501404, -0.5279498100280762, -0.34469208121299744, 0.4620624780654907, -0.3984038829803467, 0.4703421890735...
The MSDN docs weren't entirely clear on this one. or perhaps I'm not reading them well enough. If I do an insert (which may insert zero rows), followed by ``` ;SELECT SCOPE_IDENTITY() ``` And then call the command by ExecuteScalar()... What will the result be if the Insert doesn't insert any rows? I want to stop...
[ 0.21620887517929077, -0.08958742767572403, 0.21896028518676758, -0.10863600671291351, 0.5417519211769104, 0.015325232408940792, 0.21406321227550507, -0.013144020922482014, -0.13700346648693085, -0.5281979441642761, 0.006959759164601564, 0.6826415061950684, -0.39435306191444397, 0.092517197...
int OUTPUT) as Begin Select @ID = Scope_Identity() End Declare @SOMEID int Exec SomeInsertToFail @SOMEID OUTPUT Select @SOMEID --This will yield null ```
[ 0.023731756955385208, -0.1744510978460312, 0.30210989713668823, -0.26046571135520935, -0.008044233545660973, -0.18632756173610687, 0.3084081709384918, -0.03916533663868904, 0.3874167799949646, -0.2014189064502716, -0.08658983558416367, 0.5182299017906189, -0.22453784942626953, 0.0589362457...
I wrote a C# program to read an Excel .xls/.xlsx file and output to CSV and Unicode text. I wrote a separate program to remove blank records. This is accomplished by reading each line with `StreamReader.ReadLine()`, and then going character by character through the string and not writing the line to output if it contai...
[ 0.17014487087726593, 0.2551415264606476, 0.2684667408466339, -0.16843250393867493, -0.005771066062152386, 0.18311524391174316, 0.08392363041639328, -0.2573988437652588, 0.08304909616708755, -0.6144605278968811, -0.08200575411319733, 0.29181626439094543, -0.4323151409626007, -0.012298237532...
them as \x0A, and normal lines just use StreamWriter.WriteLine(). The problem occurs in the separate program to remove blank records. When I read in with `StreamReader.ReadLine()`, by definition it only returns the string with the line, not the terminator. Since the embedded newlines show up as two separate lines, I c...
[ -0.005402141250669956, -0.2313288450241089, 0.5199446678161621, -0.02145213447511196, 0.027098938822746277, 0.17519961297512054, 0.04125935211777687, 0.13619345426559448, -0.1320277601480484, -0.7836641073226929, -0.003073337022215128, 0.32059961557388306, -0.25500649213790894, 0.322313576...
remove blank lines. I would recommend that you change your architecture to work more like a parser in a compiler. You want to create a lexer that returns a sequence of tokens, and then a parser that reads the sequence of tokens and does stuff with them. In your case the tokens would be: 1. Column data 2. Comma 3. En...
[ -0.15853142738342285, -0.07190488278865814, 0.5309633612632751, 0.06397217512130737, -0.3464849889278412, 0.1528414487838745, -0.08796995878219604, -0.397444486618042, -0.11035623401403427, -0.5619184374809265, -0.19133831560611725, 0.31889277696609497, -0.5289154052734375, -0.115598946809...
Only storing a max of 1 lines worth of data 3. Reusing as much memory as possible (for the string builder and the list) 4. It's easy to change should your requirements change Here's a sample of what the Lexer would look like: **Disclaimer:** I haven't even compiled, let alone tested, this code, so you'll need to clea...
[ 0.02036205679178238, -0.2724641263484955, 0.34379521012306213, 0.14228716492652893, 0.062445204704999924, 0.25435715913772583, 0.2816128432750702, -0.3019118905067444, -0.1603827029466629, -0.6093805432319641, 0.09173066169023514, 0.29521337151527405, -0.2941667139530182, -0.12079203128814...
type) { Type = type; } public Token(TokenType type, string data) { Type = type; Data = data; } } private IEnumerable<Token> GetTokens(TextReader s) { var builder = new StringBuilder(); while (s.Peek() >= 0) { var c = (char)s.Read(); switch (c) ...
[ -0.018886785954236984, -0.381152868270874, 0.3792974054813385, -0.10343202203512192, -0.20455209910869598, 0.22252678871154785, 0.5341116786003113, -0.48164740204811096, -0.08139414340257645, -0.4008324444293976, -0.45704418420791626, 0.24984166026115417, 0.009003780782222748, 0.1822036951...
case ',': { if (builder.Length > 0) { yield return new Token(TokenType.ColumnData, ExtractText(builder)); }
[ -0.28811657428741455, -0.37587860226631165, 0.167692169547081, -0.1574394404888153, -0.02496226690709591, 0.3473881483078003, 0.26227471232414246, -0.622756838798523, -0.06493842601776123, -0.4088609218597412, -0.2618826925754547, 0.19229859113693237, -0.040632352232933044, 0.1833162903785...
yield return new Token(TokenType.Comma); break; } case '\r': { var next = s.Peek(); if (next == '\n')
[ -0.4069809317588806, -0.6065888404846191, 0.20010089874267578, -0.32803595066070557, 0.03431727737188339, 0.26813048124313354, 0.47465047240257263, -0.40678369998931885, -0.24326570332050323, -0.5727008581161499, -0.5727518796920776, 0.18673211336135864, -0.026810849085450172, 0.1766378432...
{ s.Read(); } if (builder.Length > 0) {
[ 0.20820097625255585, -0.35032403469085693, 0.42476707696914673, -0.30802881717681885, 0.13362321257591248, 0.14713312685489655, 0.7692972421646118, -0.6328011155128479, -0.1903209686279297, -0.6340949535369873, -0.48707762360572815, 0.17959396541118622, 0.028421735391020775, 0.253216117620...
yield return new Token(TokenType.ColumnData, ExtractText(builder)); } yield return new Token(TokenType.LineTerminator); break; } default: builder.Append(c);
[ -0.3435010015964508, -0.24674424529075623, 0.2113945335149765, -0.3011936545372009, -0.05217282846570015, 0.48770686984062195, 0.4308197498321533, -0.538257360458374, -0.08180283010005951, -0.3342439830303192, -0.4960356652736664, 0.32253575325012207, -0.19084258377552032, 0.27168473601341...
break; } } s.Read(); if (builder.Length > 0) { yield return new Token(TokenType.ColumnData, ExtractText(builder)); } } private string ExtractText(StringBuilder b) { var ret = b.ToString(); b.Remove(0, b.Length); return ret; } ``` Your "parser" code would then look like thi...
[ -0.020099319517612457, -0.25190091133117676, 0.5045887231826782, -0.3898801803588867, 0.004667238797992468, 0.12024765461683273, 0.6539321541786194, -0.5399842858314514, -0.3765674829483032, -0.29046738147735596, -0.417389839887619, 0.40123921632766724, -0.314798504114151, 0.27333712577819...
false; foreach (var token in GetTokens(s)) { switch (token.Type) { case TokenType.ColumnData: { seenAnyData = true; if (lastWasColumnData)
[ -0.1380215883255005, -0.4083285331726074, 0.1292629987001419, -0.34849289059638977, 0.08261938393115997, 0.10762258619070053, 0.8027240037918091, -0.09762301295995712, -0.26652294397354126, -0.37554746866226196, -0.09942134469747543, 0.18951264023780823, -0.14322924613952637, 0.35523924231...
{ //TODO: do some error reporting } else {
[ -0.018784932792186737, -0.08198218792676926, -0.24135509133338928, -0.02129385620355606, 0.001493035932071507, -0.32247886061668396, 0.44810497760772705, 0.046342384070158005, 0.276528537273407, -0.1911413073539734, 0.010433245450258255, 0.8161100745201111, -0.10719653218984604, -0.3194611...
lastWasColumnData = true; columnData.Add(token.Data); } break; } case TokenType.Comma: {
[ -0.14514198899269104, -0.6400956511497498, 0.06649946421384811, -0.10947846621274948, 0.2064105123281479, 0.11906707286834717, 0.6377278566360474, -0.23932023346424103, -0.30132147669792175, -0.3635222017765045, -0.20697371661663055, 0.21564172208309174, -0.16638357937335968, 0.19907540082...
if (!lastWasColumnData) { columnData.Add(null); } lastWasColumnData = false;
[ -0.09802207350730896, -0.4047604203224182, 0.35984787344932556, -0.44086435437202454, 0.1897091120481491, 0.029896430671215057, 0.6346585154533386, -0.14334142208099365, -0.03508668392896652, -0.13648515939712524, -0.18338917195796967, 0.33848586678504944, -0.40453654527664185, 0.209140598...
break; } case TokenType.LineTerminator: { if (seenAnyData) { OutputLine(lastWasColumnData);
[ -0.32350072264671326, -0.6799072027206421, 0.24456220865249634, -0.22599689662456512, 0.27315765619277954, -0.03618564456701279, 0.5846735835075378, -0.043820712715387344, -0.13718825578689575, -0.38199383020401, -0.45558327436447144, 0.08139751851558685, -0.2230246365070343, 0.29227033257...
} seenAnyData = false; lastWasColumnData = false; columnData.Clear(); } } } if (seenAnyData) {
[ -0.28581491112709045, -0.33229246735572815, 0.4326798617839813, -0.41986244916915894, 0.14551782608032227, -0.1426660418510437, 0.4838933050632477, 0.13450780510902405, -0.12351898103952408, -0.3924653232097626, -0.21981202065944672, 0.38837653398513794, -0.3745442032814026, 0.214849874377...