text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
In a SQL statement ( or procedure ) I want to collapse the rows of this table into a single comma delimited string. ``` simpleTable id value -- ----- 1 "a" 2 "b" 3 "c" ``` Collapse to: ``` "a, b, c" ``` You can concatenate using an embedded 'set' statement in a query: ``` declare @combined varchar(20...
[ -0.019526954740285873, 0.09917464107275009, 0.17812158167362213, -0.3932386338710785, -0.31527042388916016, 0.019950183108448982, 0.2523476779460907, -0.6071702837944031, -0.2679990530014038, -0.19512048363685608, -0.21010617911815643, 0.3449525237083435, -0.6986297369003296, 0.15868665277...
code and explanation after comments) **Edit (ten years later):** SQL Server 2017 introduced the [STRING\_AGG()](https://learn.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql?view=sql-server-2017) function which provides an official way of concatenating strings from different rows. Like other aggregati...
[ -0.22008967399597168, 0.03981048986315727, 0.4944446384906769, -0.04309086874127388, -0.4759331941604614, 0.11764368414878845, 0.06089599430561066, -0.22933444380760193, -0.17878708243370056, -0.32419076561927795, -0.20400580763816833, 0.1543446183204651, -0.5822141766548157, 0.30554899573...
I keep on reading on SO that MD5 is broken, bust, obsolete and never to be used. That angers me. The fact is that [collision attacks](http://en.wikipedia.org/wiki/Birthday_attack) on MD5 are now fairly easy. Some people have collision attacks down to an art and can even us use them to [predict elections](http://www.w...
[ 0.2616453170776367, 0.3074250817298889, 0.10056022554636002, -0.030665157362818718, -0.22260265052318573, -0.5564438104629517, 0.25606769323349, 0.16190241277217865, -0.4725148379802704, -0.1665191352367401, -0.06715457141399384, 0.3042193651199341, -0.17672201991081238, 0.3939020335674286...
provable that it leaked from the person who had the good CA and thus was trusted anyway. What would be a lot more concerning is a [preimage](http://en.wikipedia.org/wiki/Preimage_attack) or second preimage attack. How likely is a preimage attack on MD5? Is there any current research to indicate that it is imminent?...
[ 0.3491184115409851, -0.1844712495803833, 0.11382932960987091, 0.01848241686820984, 0.15603230893611908, -0.3627416491508484, 0.21133805811405182, -0.20532609522342682, -0.19160588085651398, -0.3653397560119629, -0.1437295824289322, 0.4823715388774872, -0.049119628965854645, 0.1185151487588...
future attacks, cryptosystems are generally designed so that there is some safety margin. E.g. cryptographic keys are generally chosen a little bit longer than absolutely necessary. For the same reason algorithms are avoided once weaknesses are found, even if these weaknesses are just certificational. In particular, t...
[ -0.009744219481945038, 0.3520423471927643, 0.16576313972473145, -0.022663185372948647, 0.03688293322920799, -0.464468389749527, 0.5400180816650391, -0.18876637518405914, -0.35936692357063293, -0.38972559571266174, -0.1526431441307068, 0.24674196541309357, -0.4177440106868744, -0.0584928765...
decided that they no longer have confidence in MD5s collision resistance. Today, we are in a similar situation. If we are confident that a hash function is collision resistant then we can also be confident that the hash function is preimage resistant. But MD5 has significant weaknesses. Hence many cryptographers (incl...
[ 0.26663950085639954, 0.20866164565086365, -0.03041098080575466, -0.01328056026250124, -0.1847560852766037, -0.16357269883155823, 0.5475403666496277, -0.1836196482181549, -0.5147044062614441, -0.18210884928703308, 0.05471576750278473, 0.37767496705055237, 0.06327640265226364, 0.209090262651...
recommend reasonable precautions against potential attacks. Recommending not to use MD5 anymore is one such reasonable precaution.
[ 0.4309487044811249, 0.16888630390167236, 0.136562779545784, -0.15152867138385773, 0.24001182615756989, -0.4350613057613373, 0.19255559146404266, -0.13117359578609467, -0.08328660577535629, -0.2805435061454773, -0.2269754558801651, 0.38602203130722046, 0.08648579567670822, 0.057321190834045...
Let's say we have a class `foo` which has a private instance variable `bar`. Now let us have another class, `baz`, which `extends foo`. Can non-static methods in `baz` access `foo`'s variable `bar` if there is no accessor method defined in `foo`? I'm working in Java, by the way. No, not according to the [java langu...
[ 0.08244183659553528, 0.5184739232063293, 0.3282319903373718, -0.23734325170516968, -0.044805362820625305, -0.10906792432069778, 0.24697746336460114, -0.10426706820726395, -0.17634648084640503, -0.36650025844573975, -0.25996994972229004, 0.4285057783126831, -0.5563849806785583, 0.1647825241...
is not inherited by > subclasses. But regardless of this language restriction, you *can* [access private fields through reflection](http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html): ``` Field privateStringField = MyClass.class.getDeclaredField("privateString"); privateStringField.setA...
[ -0.11150562018156052, -0.21273352205753326, 0.24408365786075592, -0.15007126331329346, 0.003258652985095978, -0.2083849012851715, 0.458832710981369, -0.2668091356754303, -0.15751270949840546, -0.3484973609447479, -0.39648351073265076, 0.7902374267578125, -0.2680199146270752, 0.124744057655...
I am downloading files with the WebClient class in .NET 3.5. I would like to be sure that on the server side, the files requested appear to be downloaded with a IE client. What do I have to change exactly? Do I have simply to copy the header information generated by IE to the Header property of the WebClient object? ...
[ 0.3835769295692444, -0.09272491931915283, 0.546260416507721, 0.04992985352873802, -0.0909554585814476, -0.41900360584259033, 0.0929684191942215, 0.09711071103811264, -0.26456090807914734, -0.9539730548858643, -0.230961874127388, 0.4900912940502167, -0.2285717874765396, 0.061147235333919525...
We ate migrating one of our axis web service which was built using JDK 1.4 and axis 1.0. We are trying to migrate it to JDK 1.6.0 with axis 1.2, but I am getting the following null pointer exception. The same code is working fine as soon as switch back to JDK 1.4. Any help? Thanks in advance. ``` java.lang.NullPoin...
[ 0.05527298524975777, 0.17046001553535461, 0.17049601674079895, -0.11802105605602264, -0.10658801347017288, 0.7076622247695923, 0.1342286914587021, -0.2607894241809845, -0.0882415696978569, -1.0172752141952515, -0.05706583335995674, 0.38316380977630615, -0.38777226209640503, 0.0236788522452...
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) ...
[ -0.04858095943927765, 0.21268300712108612, 0.4639725983142853, -0.15713997185230255, -0.518235445022583, 0.45808830857276917, 0.5692303776741028, -0.7016701102256775, -0.46772539615631104, -0.7034891247749329, -0.25673115253448486, 0.12687455117702484, -0.2643788456916809, 0.10802327841520...
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) ``` New stack trace. ``` (404)Not Found at org.apache.axis.transport.http.HTTPSender.readFromSocket(H...
[ 0.03346995636820793, 0.024471910670399666, 0.669914960861206, -0.11196302622556686, -0.08131587505340576, 0.17507806420326233, 0.17049434781074524, -0.6263453364372253, -0.7368274331092834, -0.7643753886222839, -0.03158525750041008, 0.31971555948257446, -0.20375843346118927, 0.097923994064...
because I instantiate a TextField outside of the loop that draws the var i from the XML's many nodes. To correctly display a textfield for each node, I need to instantiate the TextField for each var i. Like this : ``` function callThumbsW():void { for (var i:Number = 0; i < my_totalW; i++) { var thumb_urlW = my_i...
[ 0.08451259881258011, -0.01672552339732647, 0.6797428727149963, -0.2930167019367218, 0.053887587040662766, -0.06044740229845047, 0.19848768413066864, -0.49325230717658997, 0.033149030059576035, -0.6570765376091003, -0.35548555850982666, 0.3959311246871948, -0.1911683976650238, 0.27553191781...
When I read some of the answers on here I notice that some people are aware of upcoming changes to Rails syntax and I'm not sure how they find out about them. What's a good source of the latest information on syntax changes or updates to Rails? The official [Riding Rails blog](http://weblog.rubyonrails.org/) regularly ...
[ 0.49207961559295654, -0.24120423197746277, 0.22291876375675201, 0.036953527480363846, -0.26082369685173035, -0.26548391580581665, 0.6457728743553162, 0.28517037630081177, -0.3125961720943451, -0.2999783456325531, -0.016297725960612297, 0.27916401624679565, 0.36537468433380127, 0.1381198465...
I am creating a HttpWebRequest object from another aspx page to save the response stream to my data store. The Url I am using to create the HttpWebRequest object has querystring to render the correct output. When I browse to the page using any old browser it renders correctly. When I try to retrieve the output stream u...
[ 0.15025411546230316, 0.13884347677230835, 0.41570770740509033, -0.2531980276107788, -0.21013455092906952, 0.12348991632461548, 0.4245956540107727, -0.32261645793914795, 0.11878029257059097, -0.7746202945709229, -0.028801551088690758, 0.5349512696266174, -0.3736404478549957, 0.2248579114675...
string.Empty; if(Request.Querystring["a"] != null) { //generate output output = "The query string value is " + Request.QueryString["a"].ToString(); } else { //generate message indicating the query string variable is missing output = "The query string value was not found"; } ...
[ -0.2884975075721741, 0.03358254209160805, 0.6388189196586609, -0.25772398710250854, -0.2515307366847992, -0.013747197575867176, 0.4815938472747803, -0.5017666220664978, -0.22822029888629913, -0.4239259660243988, -0.3227355480194092, 0.31569916009902954, -0.4292132556438446, 0.3415740728378...
= new NetworkCredentials("myaccount", "mypassword", "mydomain"); request.PreAuthenticate = true; } request.UserAgent = Request.UserAgent; HttpWebResponse response = (HttpWebResponse) request.GetResponse(); Stream resStream = response.GetResponseStream(); Encoding encode = System.Text.Encoding.GetEncoding("utf-8"...
[ 0.004442662000656128, -0.15702028572559357, 0.6195056438446045, -0.0529702752828598, 0.25543299317359924, 0.20736995339393616, 0.49361807107925415, -0.37222927808761597, -0.12680839002132416, -0.9685593843460083, -0.3799385130405426, 0.3886508047580719, -0.4836202561855316, 0.3665018975734...
the HttpWebRequest with the full page name. The page is still generating the error output. I updated the code sample of the target page to demonstrate exactly what I am doing. @Chris Lively - I am not redirecting to an error page, I generate a message indicating the query string value was not found. I updated the sour...
[ 0.33720117807388306, -0.08088376373052597, 0.6560361981391907, 0.0014609162462875247, -0.6084082126617432, -0.1456535905599594, 0.7078492641448975, -0.11939723789691925, -0.5203855633735657, -0.6175284385681152, 0.23844784498214722, 0.4095107316970825, -0.1885812133550644, -0.1257439255714...
following section of code in my example and it was culprit causing the issue. I was setting the `Credentials` property of the `HttpWebRequest` with a sevice account instead of my AD account which was causing the issue. I updated my source code example I need to replace the following line of code: ``` request.Credenti...
[ 0.13028034567832947, 0.10338404029607773, 0.7321847081184387, 0.023513298481702805, 0.17503592371940613, -0.22236789762973785, 0.6340510249137878, 0.0035100262612104416, -0.21937879920005798, -0.8955262303352356, 0.06579673290252686, 0.5242283344268799, -0.28570717573165894, 0.305268079042...
What are some reasons why I **wouldn't** want to disable IIS logging completely for a small use (100 user) intranet application? I'm not an Ops person (just pretending to be one for this app), so I've never had to be concerned with this stuff before. 1. Logs help you troubleshoot and diagnose problems quicker. This co...
[ 0.5198163986206055, -0.16788350045681, 0.047669194638729095, 0.35086706280708313, -0.11262114346027374, -0.3724939227104187, 0.42620179057121277, -0.0021657096222043037, -0.3872790038585663, -0.7448959946632385, 0.12896764278411865, 0.6049680709838867, -0.2906789779663086, -0.2650260329246...
I need to get the square root of a 210 digit number accurately, I thought GMP was the right tool for the job, what am I doing wrong? ``` #include <stdlib.h> #include <stdio.h> #include "gmp.h" int main (int argc, char *argv[]) { mpz_t sq_me, sq_out, test; mpz_init(sq_me); mpz_init(sq_out); mpz_init(test); m...
[ -0.7068208456039429, 0.4358304738998413, 0.3116127848625183, -0.0689215362071991, -0.0492439791560173, 0.5602995753288269, 0.40485116839408875, -0.8246605396270752, -0.33822593092918396, -0.5431588888168335, 0.19673344492912292, 0.2721976339817047, -0.11938224732875824, 0.2822359502315521,...
and final output are identical. ``` #include <stdlib.h> #include <stdio.h> #include "gmp.h" int main (int argc, char *argv[]) { mpf_t sq_me, sq_out, test; mpf_set_default_prec (10000); mpf_init(sq_me); mpf_init(sq_out); mpf_init(test); mpf_set_str (sq_me, argv[1], 10); mpf_sqrt(sq_out, sq...
[ -0.6024838089942932, 0.07932848483324051, 0.7004857063293457, -0.28700897097587585, -0.17390045523643494, 0.5990591645240784, -0.011634166352450848, -0.8962659239768982, -0.3503648638725281, -0.6784908771514893, -0.09239587187767029, 0.3460167646408081, -0.2040819525718689, 0.1559684872627...
root: 4952238331303110980924222615988628334869566046038127132471492 86806548130939472399634016783775955618921028.19202568258368255653837168412 92356432661548614332014106174638951390596672950394981098992388116308833260 04535647648563996144250924277757344248059826024201642748515325655438898558 17807282091590722890002 Re...
[ -0.8047690987586975, 0.31175345182418823, 0.2044033706188202, 0.34496328234672546, -0.001956569030880928, -0.012319933623075485, 0.6798239350318909, -0.6249134540557861, -0.5299229621887207, -0.6263620257377625, 0.011573892086744308, 0.41519683599472046, 0.0502636656165123, 0.6230158805847...
**Context** Let`s say i have: In layout Site.Master: ``` <div class="leftColumn"> <asp:ContentPlaceHolder ID="MainContent" runat="server" /> </div> <div class="rightColumn"> <% Html.RenderPartial("_Login"); %> <asp:ContentPlaceHolder ID="SideContent" runat="server" /> </div> ``` Login partialView ...
[ 0.01461224164813757, -0.03491263464093208, 0.7627261877059937, -0.20552504062652588, -0.08610115945339203, -0.183815136551857, 0.25167807936668396, -0.013764259405434132, -0.17975057661533356, -1.0435177087783813, -0.30868852138519287, 0.4518188536167145, 0.04476610943675041, 0.03145555406...
to the server. If your forms are nested then this won't work. The outer form will always post to the server. In the sample HTML below, clicking on the submit button on the first form will not send the values from the second form to the server. Likewise, clicking the second submit button won't post the values from th...
[ 0.38527435064315796, -0.07496483623981476, 0.5326141119003296, 0.06704585254192352, -0.24678732454776764, -0.03601614013314247, 0.30355629324913025, -0.3203544020652771, -0.004582309629768133, -0.7682681083679199, -0.26727837324142456, 0.25503695011138916, -0.3934870660305023, -0.038331992...
<input type="submit" name="login" value="Login" /> </form> <form action="/Login/AdminLogin" method="post"> <input type="text" name="username" value="" /> <input type="text" name="passowrd" value="" /> <input type="submit" name="login" value="Login Admin" /> </form> </div> ...
[ 0.15014779567718506, 0.14700916409492493, 0.3711082935333252, -0.02969348058104515, -0.3372829556465149, -0.11429962515830994, 0.19714024662971497, -0.5721560716629028, 0.06405294686555862, -0.7909108996391296, -0.422015905380249, 0.38442912697792053, -0.1359642744064331, -0.14250366389751...
I am wondering if I should continue to learn OCaml or switch to F# or Haskell. Here are the criteria I am most interested in: * **Longevity** + Which language will last longer? I don't want to learn something that might be abandoned in a couple years by users and developers. + Will Inria, Microsoft, University of...
[ 0.4934035837650299, 0.3589342534542084, 0.36564433574676514, -0.30940040946006775, -0.013451608829200268, -0.19417069852352142, 0.34202176332473755, 0.2173410803079605, -0.23154713213443756, -0.6513246297836304, -0.09388124197721481, 0.5051169395446777, 0.12303932011127472, -0.023985451087...
being tied to a bulky .NET framework unless the benefits are large. + I want to be able to develop more than just parsers and math programs. * **Well Designed** + I like my languages to be consistent. Please support your opinion with logical arguments and citations from articles. Thank you. > Longevity * Haskell i...
[ 0.45670604705810547, 0.20199386775493622, 0.634857714176178, 0.045967668294906616, -0.47274699807167053, -0.48753154277801514, 0.43121153116226196, 0.4252902865409851, -0.11756536364555359, -0.3792731463909149, -0.18385928869247437, 0.4065871834754944, -0.010247411206364632, -0.13413415849...
are hit by a bus tomorrow (the famous "bus error in Cambridge" problem), there are plenty of others who can step up to the plate. There are also other, less elaborate compilers. * Caml is controlled by a small group at INRIA, the French national laboratory. They also have a significant investment, Others are also inves...
[ 0.31963619589805603, 0.07574521005153656, 0.3133156895637512, 0.47208914160728455, 0.003390875179320574, -0.4856286942958832, 0.06964079290628433, 0.6107715368270874, -0.16337411105632782, -0.4922000467777252, -0.2649783492088318, 0.7351720929145813, 0.16474708914756775, -0.026748565956950...
it as a vehicle for exploring new language ideas (or at least they are doing so at a smaller rate than in the past). * Who knows what a company will do? If F# is successful, Microsoft could support it for 20 years. If it is not successful, they could pull the plug in 2012. I can't guess and won't try. > Practicality >...
[ -0.0509609580039978, -0.04008719325065613, 0.47362345457077026, 0.1584170162677765, -0.07706581801176071, -0.14132586121559143, 0.3057093620300293, 0.3655468821525574, -0.14925383031368256, -0.4838353395462036, -0.11835642904043198, 0.4388650357723236, -0.006571919657289982, 0.001151979784...
trees](http://www.cs.princeton.edu/~rs/strings/) are often faster than hash tables. When your keys are integers, Okasaki and Gill's [binary Patricia trees](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5452) are competitive with hashing. If you really want to, you can build a hash table in Haskell using th...
[ -0.05636304244399071, -0.026529833674430847, 0.19767439365386963, 0.24644698202610016, -0.20749609172344208, 0.05041421949863434, -0.008845817297697067, -0.0009661013027653098, -0.4718921184539795, -0.3997996151447296, 0.04751911386847496, 0.26994359493255615, -0.03981814906001091, -0.0949...
will do?). * It is hardest to predict the time and space behavior of Haskell programs. * Haskell has the best profiling tools, and in the long run, this is what yields the best performance. > I want to be able to develop more than just parsers and math programs. For an idea of the range of what's possible in Haskell,...
[ 0.3776877224445343, 0.037798985838890076, 0.021348848938941956, 0.020360060036182404, 0.05988316610455513, -0.2304607778787613, 0.24552586674690247, -0.0598420575261116, 0.08337580412626266, -0.8811734318733215, -0.03206956014037132, 0.7005242109298706, -0.2517842650413513, -0.329713195562...
consistent. Some points on which to evaluate consistency: * Haskell's concrete syntax is extremely well designed; I'm continually impressed at the good job done by the Haskell committee. OCaml syntax is OK but suffers by comparison. F# started from Caml core syntax and has many similarities. * Haskell and OCaml both ...
[ -0.039056047797203064, 0.07044947147369385, 0.4333731234073639, -0.007790601346641779, -0.2785913348197937, -0.30856209993362427, 0.39718446135520935, 0.22605977952480316, -0.24881583452224731, -0.50222247838974, 0.09871858358383179, 0.7473440170288086, -0.46846669912338257, -0.14794044196...
write functors if you're writing ML). Haskell's type system is ambitious and powerful, but it is continually being improved, which means there is some inconsistency as a result of history. F# essentially uses the .NET type system, plus ML-like Hindley-Milner polymorphism (See question ["What is Hindley-Milner"](https:/...
[ -0.22292333841323853, 0.018315507099032402, 0.5063083171844482, -0.2092885673046112, -0.23663046956062317, -0.09443794190883636, 0.010584953241050243, 0.16009166836738586, -0.16079305112361908, -0.37310272455215454, -0.2493591159582138, 0.4419005215167999, -0.651776909828186, -0.3838254511...
order of evaluation is officially undefined, which is a poor design choice in a language with side effects. Worse, the implementations are inconsistent: the bytecoded virtual machine uses one order and the native-code compiler uses the other.
[ -0.09289903938770294, 0.3346143364906311, -0.18736198544502258, -0.039029378443956375, -0.44795191287994385, 0.19463740289211273, 0.2593718469142914, -0.3972491919994354, -0.09569212049245834, -0.16476882994174957, -0.13158929347991943, 0.3192927837371826, -0.25624385476112366, 0.288976967...
I'm looking for a good, free C compiler for Windows. Where can I find it? There are plenty. [Borland C++ Builder](http://www.codegear.com/downloads/free/cppbuilder), [GCC](http://www.gnu.org/software/gcc/) (on Windows, often used in [Cygwin](http://www.cygwin.com/)), [DJGPP](http://www.delorie.com/djgpp/), [Visual C++ ...
[ 0.10770752280950546, 0.18589773774147034, 0.11445540189743042, -0.004862142726778984, -0.3339623808860779, 0.0225063506513834, -0.04973715543746948, 0.36280038952827454, -0.2528345286846161, -0.7020304799079895, 0.17985375225543976, 0.5156638026237488, -0.35866138339042664, -0.013869930990...
I've got this code in my socket class: ``` bool GSocket::Listen(int Port) { d->Socket = socket(AF_INET, SOCK_STREAM, 0); if (d->Socket >= 0) { sockaddr Addr; sockaddr_in *a = (sockaddr_in*) &Addr; ZeroObj(Addr); a->sin_family = AF_INET; a->sin_port = htons(Port); ...
[ 0.07581589370965958, 0.10907860100269318, 0.5644611716270447, -0.4035415053367615, -0.011518964543938637, 0.12200438231229782, 0.7653289437294006, -0.4717422127723694, -0.14756792783737183, -0.9055821895599365, 0.04959386587142944, 0.5374050736427307, -0.24414131045341492, 0.24227409064769...
0) { if (listen(d->Socket, SOMAXCONN) != SOCKET_ERROR) { return true; } else {
[ 0.31097739934921265, -0.22465626895427704, 0.25019434094429016, -0.3374364674091339, 0.19090482592582703, 0.018566127866506577, 0.6065223813056946, -0.3574390113353729, 0.3481031656265259, -0.3809566795825958, -0.49587881565093994, 0.9384636878967285, -0.23321035504341125, 0.25057286024093...
Error(); } } else { Error(); } } else { Error(); } return false; } ``` The "Error()" method just calls WSAGetLastError and passes the error
[ -0.12274135649204254, 0.1922980099916458, 0.13541744649410248, -0.1263953298330307, 0.06494837999343872, 0.09690559655427933, 0.46733707189559937, -0.06072349473834038, 0.007717219181358814, -0.3518420457839966, -0.06895540654659271, 0.9169458150863647, -0.2657517194747925, 0.3025518655776...
and it's description up to the app. Anyway it works fine on my machine (xp sp2) but fails on my friends xp sp3 machine. In particular the bind call fails and WSAGetLastError returns "2", which isn't even a valid socket error code. The value of "Port" passed in is 80, I'm running a simple HTTP server as UI for a service...
[ -0.23710058629512787, 0.17892856895923615, 0.6459736227989197, -0.1568298637866974, -0.194915309548378, -0.1641632467508316, 0.9174070358276367, -0.10965196788311005, -0.09644167125225067, -0.8453544974327087, 0.1536998301744461, 0.8037802577018738, -0.3161444664001465, 0.22067785263061523...
SOCKET\_ERROR which is -1 so that check should be ok. Have I missed something simple? Update: We just tried a different port number '8888' and everything works as expected. So it seems that the low port number is the issue. There is nothing actively listening on that port before we run my service, so I'm thinking tha...
[ 0.5947805047035217, 0.15712594985961914, 0.07500333338975906, -0.11754952371120453, -0.3204803466796875, 0.0653078481554985, 0.5404427647590637, 0.304269939661026, -0.3675630986690521, -0.6764532923698425, 0.035028085112571716, 0.8926734328269958, -0.07966228574514389, 0.30525916814804077,...
from 0 through 1023 are [well known ports](http://en.wikipedia.org/wiki/Well_known_ports) and the operating system can require administrative privileges in order to bind to them. Consequently, any application that attempts to use these ports must be privileged.
[ -0.027396267279982567, 0.24500969052314758, 0.1250726878643036, 0.19956454634666443, 0.29843762516975403, -0.3380473554134369, -0.02266797609627247, 0.24755284190177917, -0.1892911046743393, -0.46013036370277405, -0.473818302154541, 0.16966582834720612, -0.026226120069622993, 0.49075689911...
I have a class I'm unit testing that requires fairly extensive database setup before the individual test methods can run. This setup takes a long time: for reasons hopefully not relevant to the question at hand, I need to populate the DB programatically instead of from an SQL dump. The issue I have is with the tear-do...
[ 0.32137155532836914, 0.14289166033267975, 0.25282391905784607, -0.07662656903266907, -0.13078202307224274, -0.22349566221237183, 0.17477595806121826, -0.07421622425317764, -0.1170663833618164, -0.46135449409484863, -0.011484479531645775, 0.47597137093544006, 0.01382235437631607, 0.21079014...
such that the db setup would be rolled back automatically. However, the test methods would take forever to run since each method would need to re-prep the database. Any other ideas? Basically, I'm looking for a way to run my db setup, run my individual tests (each wrapped in a transaction which gets rolled-back after ...
[ 0.7080724835395813, -0.29710331559181213, 0.025099730119109154, 0.07265766710042953, -0.12775374948978424, -0.11137347668409348, 0.09475921094417572, -0.19985143840312958, -0.14596416056156158, -0.4976109266281128, 0.04535451531410217, 0.3660490810871124, -0.27900230884552, -0.199251219630...
such as [HSQLDB](http://hsqldb.org/). When you are done with the tests you just throw away the state. This is only appropriate if the tables can be empty at the start of the test suite (before your programmatic setup, that is). You still need to create tables, but if everything is neatly mapped using Hibernate you can...
[ 0.5084629058837891, 0.1749345064163208, 0.1263105571269989, -0.16889284551143646, -0.12119191884994507, -0.4196963310241699, 0.3074420988559723, -0.405911922454834, -0.18028028309345245, -0.8457951545715332, -0.12529227137565613, 0.3443116247653961, -0.2201976329088211, 0.08734597265720367...
I'm beginning to work on mailing-list software we use internally **(EDIT: though we send emails externally as well, so we can't enforce policy on mail clients)**. Is there any way to track whether, when I send an email to a particular user, that email has been opened as opposed to being marked as junk or being deleted ...
[ 0.8364108204841614, 0.03763677924871445, 0.32847797870635986, -0.015858478844165802, -0.1806647777557373, 0.07469071447849274, 0.08961569517850876, -0.011306717991828918, -0.47745367884635925, -0.7293326258659363, 0.2464446723461151, 0.1865447461605072, -0.17414291203022003, -0.03454998508...
clients block pretty much all of these kinds of attempts. The best idea is to give them an image that they would want to see if they read the message, and therefore they choose to display images in their mail client.
[ 0.44125208258628845, -0.10782541334629059, 0.25678300857543945, 0.1629997193813324, -0.022336812689900398, 0.16354602575302124, 0.39451324939727783, 0.2669070363044739, -0.4334447979927063, -0.7900726199150085, 0.03640966862440109, 0.2890964448451996, -0.33266371488571167, -0.0685131177306...
Why do many professional web developers always insist on developing sites that accommodate for browsers that have Javascript disabled? Besides tech heads and developers, most 'normal' users don't even know what it is. > Who uses browsers older than Firefox 2 or IE6? Wrong question. It's not the age of the browser tha...
[ 0.47899988293647766, 0.33871152997016907, 0.11266104876995087, 0.17748214304447174, 0.027310289442539215, -0.26594778895378113, 0.16061849892139435, 0.3697411119937897, -0.3998616635799408, -1.0896060466766357, 0.046566110104322433, 0.3780081272125244, -0.10371410101652145, -0.075761690735...
just like any other, and it won't run most of your javascript. Also, even if you have firefox you might use a plugin like NoScript. That's not the same thing as running with javascript disabled, but if you do things wrong you can really mess up for those users (ie, detect javascript state once at the start of a session...
[ 0.5940248966217041, 0.16144077479839325, 0.18373072147369385, 0.25062716007232666, 0.25827479362487793, -0.547751247882843, 0.4273512661457062, 0.14985433220863342, -0.30742260813713074, -0.5633636116981506, 0.027201589196920395, 0.5256916284561157, -0.3036593496799469, -0.0547477751970291...
certain accessibility standards that include working with javascript disabled.
[ 0.07606406509876251, 0.2916966378688812, -0.2906759977340698, 0.18322597444057465, -0.07336588203907013, -0.3623465895652771, 0.45068904757499695, 0.04611389338970184, -0.34251314401626587, -0.6045093536376953, -0.5858231782913208, 0.10445957630872726, -0.3351361155509949, -0.1848294883966...
According to [Apple documentation on debugging Core Data](http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html#//apple_ref/doc/uid/TP40002320-SW15) it says we should be able to pass an argument to the application which will output the SQL core data sends to SQLite. I have...
[ 0.18760482966899872, 0.5553786754608154, 0.2496359497308731, 0.0046601672656834126, 0.19006584584712982, 0.029184656217694283, 0.17602568864822388, -0.027053188532590866, -0.14981764554977417, -0.40505924820899963, 0.09659450501203537, 0.38264650106430054, -0.320076584815979, 0.25529477000...
Should I be looking someplace other than the console? Has anyone else had success with this argument? **UPDATE:** Apple has since fixed the output bug with newer releases of XCode; however, to be clear on the final solution: **The arguments are two separate arguments and should be entered in the arguments tab as such...
[ 0.023295890539884567, 0.3290044367313385, 0.2963957190513611, -0.30540451407432556, 0.036079950630664825, 0.1944849193096161, 0.41880983114242554, -0.18886716663837433, -0.001116814324632287, -0.7373393774032593, -0.014213548973202705, 0.6553074717521667, -0.33287566900253296, -0.010630711...
As a part of my development I'd like to be able to validate an entire folder's worth of XML files against a single XSD file. A PowerShell function seems like a good candidate for this as I can then just pipe a list of files to it like so: dir \*.xml | Validate-Xml -Schema .\MySchema.xsd I've considered porting C# code...
[ 0.5214883089065552, 0.0027152830734848976, 0.02963610179722309, 0.11958775669336319, -0.2864729166030884, 0.11499878019094467, 0.15348412096500397, -0.680366039276123, -0.07020782679319382, -0.377290278673172, 0.1841607242822647, 0.5078911185264587, -0.275129109621048, -0.00152124383021146...
$InputObject = $null, $Namespace = $null, $SchemaFile = $null ) BEGIN { $failCount = 0 $failureMessages = "" $fileName = "" } PROCESS { if ($InputObject -and $_) { throw 'ParameterBinderStrings\AmbiguousParameterSet' break } elseif ($InputObject) { $InputObject ...
[ -0.4887228310108185, -0.07418011873960495, 0.3557148873806, -0.18616586923599243, 0.09253869950771332, 0.2416614145040512, 0.3786694407463074, -0.35318827629089355, 0.048211269080638885, -0.687554657459259, -0.36429619789123535, 0.6220800876617432, -0.5117070078849792, -0.09199876338243484...
= New-Object -TypeName System.Xml.XmlReaderSettings $readerSettings.ValidationType = [System.Xml.ValidationType]::Schema $readerSettings.ValidationFlags = [System.Xml.Schema.XmlSchemaValidationFlags]::ProcessInlineSchema -bor [System.Xml.Schema.XmlSchemaValidationFlags]::ProcessSchemaLocatio...
[ -0.21133160591125488, 0.24577189981937408, 0.862448513507843, 0.016066867858171463, 0.00017605182074476033, 0.15765397250652313, 0.3414117395877838, -0.5980119109153748, -0.39381495118141174, -0.27072978019714355, -0.2752743065357208, 0.32701534032821655, -0.2511158287525177, 0.17279845476...
+ $_.Message $failCount = $failCount + 1 }); $reader = [System.Xml.XmlReader]::Create($_, $readerSettings) while ($reader.Read()) { } $reader.Close() } else { throw 'ParameterBinderStrings\InputObjectNotBound' } } END { $failureMessages "$failCount va...
[ -0.5180895924568176, 0.018938468769192696, 0.6058006286621094, -0.2439579963684082, 0.13097412884235382, 0.010431509464979172, 0.5678856372833252, -0.29550009965896606, 0.06208231672644615, -0.634164035320282, -0.5408860445022583, 0.5684939622879028, -0.6381166577339172, 0.1022613793611526...
Does anyone know how can I cut a string and then assign into an array with javascript? Example: var string = "15;24;67;34;56"; I hope tp cut this string into below format and assign into the array: a[0] = 15 a[1] = 24 a[2] = 67 a[3] = 34 a[3] = 56 `var a = string.split(';');`
[ 0.30354607105255127, 0.1479637771844864, -0.04427365958690643, -0.3169271647930145, -0.08265172690153122, 0.09144821763038635, 0.5727799534797668, -0.5156673789024353, -0.24476878345012665, -0.2603551149368286, -0.17789046466350555, 0.5135325193405151, -0.3099929690361023, -0.0081292502582...
I'm normally developing web apps, and a surprisingly large amount of my work time is spent doing "Ctrl + Alt + P", sorting by Process Name, and picking w3wp.exe to attach my debugger. To make matters worse, I'm working on an app that spans several application pools, so I normally have 2 or 3 instances of w3wp.exe, and...
[ 0.42365604639053345, 0.3170010447502136, 0.2759433388710022, -0.042848967015743256, -0.015517114661633968, 0.09258116036653519, 0.25866129994392395, -0.10880865156650543, -0.1887291669845581, -0.7672613859176636, -0.10446926206350327, 0.33693012595176697, -0.21680262684822083, 0.0501905679...
to w3wp.exe (he basically recorded this): ``` Sub AttachMacro() Try Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default") Dim dbgeng(3) As EnvDTE80.Engine dbgeng(0) = trans.Engines.Item("T-SQL") dbgeng(1) = trans.En...
[ -0.11000671982765198, -0.5344936847686768, 0.7988813519477844, -0.0760270431637764, -0.2830072343349457, 0.2358546406030655, 0.20611722767353058, -0.6038118600845337, -0.35079890489578247, -0.525799036026001, -0.3044704794883728, 0.5323336720466614, -0.49188175797462463, 0.2925906479358673...
proc2.Attach2(dbgeng) Catch ex As System.Exception MsgBox(ex.Message) End Try End Sub ``` I'm not really sure whether all that is necessary, or anything, I have never made a macro for VS, I don't really know where to start. Would there be a way to modify this macro so that instead of attachin...
[ -0.10131960362195969, -0.11008938401937485, 0.5131747722625732, -0.3731529414653778, -0.048191677778959274, -0.11220797151327133, 0.47744813561439514, -0.20650821924209595, -0.28555408120155334, -0.6155595779418945, -0.35384276509284973, 0.45077815651893616, -0.6835746169090271, 0.09600894...
= DTE.Debugger Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default") Dim dbgeng(3) As EnvDTE80.Engine dbgeng(0) = trans.Engines.Item("T-SQL") dbgeng(1) = trans.Engines.Item("T-SQL") dbgeng(2) = trans.Engines.Item("Managed") For Each theProcess As EnvDTE80.Pr...
[ -0.03716909885406494, -0.5031512975692749, 0.7497348189353943, -0.09109722822904587, -0.17097899317741394, 0.4216907322406769, -0.026624811813235283, -0.48057159781455994, -0.5011715292930603, -0.7290955185890198, -0.3274349272251129, 0.4011854827404022, -0.44449135661125183, 0.41027727723...
theProcess.Attach2(dbgeng) End If Next Catch ex As System.Exception MsgBox(ex.Message) End Try End Sub ```
[ -0.3438837230205536, 0.1468384861946106, 0.47713392972946167, -0.20110291242599487, 0.10368341952562332, -0.17411375045776367, 0.4048662781715393, -0.013621768914163113, -0.009205465205013752, -0.5515417456626892, -0.560603678226471, 0.30063575506210327, -0.645065426826477, 0.4073786437511...
I am using the Membership.Provider for security in my MVC Application. I have a forgot password page that asks for your username, and then gives you the secret question on file. My question is how to a check the secret answer against what is on file. I can't seem to find any method that does that besides ``` Membersh...
[ 0.5267336368560791, 0.2296072095632553, 0.4648713767528534, 0.00020675393170677125, 0.07117407023906708, -0.29241928458213806, 0.3229786455631256, -0.3834346532821655, -0.19463719427585602, -0.42194756865501404, 0.13172590732574463, 0.6189636588096619, -0.12352003157138824, 0.2297200858592...
- it should be "true"
[ 0.4928279519081116, 0.1362372487783432, 0.0408688560128212, 0.30680331587791443, -0.23095719516277313, -0.28534165024757385, 0.5371370911598206, 0.11352469027042389, 0.43220508098602295, 0.13334093987941742, -0.29694294929504395, 0.662294864654541, -0.03179487958550453, 0.24035513401031494...
We have a dev server running C# and talking to SQL server on the same machine. We have another server running the same code and talking to SQL server on another machine. A job does 60,000 reads (that is it calls a stored procedure 60,000 times - each read returns one row). The job runs in 1/40th of the time on the ...
[ 0.48527026176452637, 0.07336471229791641, 0.1929185688495636, 0.4447520673274994, -0.23977605998516083, 0.1034090593457222, 0.1882483959197998, -0.34353354573249817, -0.19035357236862183, -0.7342960834503174, 0.2503237724304199, 0.3621818423271179, -0.12716178596019745, 0.01206405833363533...
because it has to go over the network ? [rather confusingly I found a 'SQL Server Ping' tool but it doesn't actually attempt any timing measurement which, as far as I can see, is what we need] Open SQL Server Management Server on the remote machine. Start a new query. Click Query, Include Client Statistics. Run your ...
[ 0.585209310054779, -0.06556810438632965, 0.2576584815979004, 0.39259156584739685, 0.10284267365932465, -0.37022286653518677, 0.34677496552467346, 0.0661812573671341, -0.40988168120384216, -0.6940724849700928, 0.07298915088176727, 0.5509580969810486, -0.1876920610666275, 0.20760834217071533...
better idea, I'd try doing a plain select of 60,000 records (since you said it's returning 60,000 records one by one) over the network from your remote machine. Again, that doesn't give you an idea of the stored procedure overhead, but it'll give you a quick seat-of-the-pants idea of the network speed between machines.
[ 0.39787063002586365, -0.15223191678524017, 0.11942369490861893, 0.5715973973274231, 0.1226474717259407, 0.1832268387079239, 0.11454945057630539, 0.2341407835483551, -0.6887622475624084, -0.5206184387207031, 0.5529400706291199, 0.48857927322387695, 0.1348850280046463, -0.05969962850213051, ...
So I just got my site kicked off the server today and I think this function is the culprit. Can anyone tell me what the problem is? I can't seem to figure it out: ``` Public Function CleanText(ByVal str As String) As String 'removes HTML tags and other characters that title tags and descriptions don't like If ...
[ 0.31681475043296814, 0.01893559657037258, 0.6121563911437988, -0.04828183725476265, -0.02142101712524891, -0.16959737241268158, 0.407604455947876, -0.03686955198645592, -0.11999917775392532, -0.3254496455192566, -0.42391911149024963, 0.7430247664451599, -0.4768872857093811, 0.3656985461711...
"<span", "<p", "<ul", "<div", "<embed", "<object", "<param"} For i As Integer = 0 To indexChars.GetUpperBound(0) 'loop through indexchars array Dim indexOfInput As Integer = 0 Do 'get rid of links indexOfInput = str.IndexOf(indexChars(i)) 'find instance of indexChar ...
[ -0.11545635759830475, 0.0023301132023334503, 0.8085319399833679, -0.055084437131881714, -0.11344689130783081, 0.08974576741456985, 0.3318248391151428, -0.24358491599559784, -0.25656211376190186, -0.4741678237915039, 0.05582583323121071, 0.2523362338542938, -0.6332504749298096, 0.3846167325...
Then Dim indexNextLeftBracket As Integer = str.IndexOf("<", indexOfInput) + 1 Dim indexRightBracket As Integer = str.IndexOf(">", indexOfInput) + 1 'check to make sure a right bracket hasn't been left off a tag
[ 0.002787594683468342, -0.3820127248764038, 0.9718911647796631, -0.2255488634109497, -0.12476321309804916, -0.08811962604522705, -0.010699793696403503, -0.6480933427810669, 0.013640782795846462, -0.2462257593870163, -0.07705225050449371, 0.5919699668884277, -0.36467063426971436, 0.054815180...
If indexNextLeftBracket > indexRightBracket Then 'normal case str = str.Remove(indexOfInput, indexRightBracket - indexOfInput) Else 'add the right bracket right before the next left bracket, just remove everything
[ -0.18754687905311584, -0.1852240264415741, 0.6098708510398865, -0.153886079788208, 0.09874453395605087, 0.026708945631980896, -0.17671442031860352, -0.3502781391143799, 0.08173295110464096, -0.44875267148017883, -0.11012660712003708, 0.7201973795890808, -0.3071460425853729, 0.0269126016646...
'in the bad tag str = str.Insert(indexNextLeftBracket - 1, ">") indexRightBracket = str.IndexOf(">", indexOfInput) + 1
[ -0.00014329560508485883, 0.0754292830824852, 0.4427693486213684, -0.18299774825572968, -0.3796978294849396, 0.25272202491760254, 0.4537200927734375, -0.15350793302059174, 0.039843957871198654, -0.5105164051055908, -0.16990098357200623, 0.39703133702278137, -0.5637667179107666, 0.1034288182...
str = str.Remove(indexOfInput, indexRightBracket - indexOfInput) End If End If Loop Until indexOfInput = -1 Next End If Return str End Function ``` Wouldn't something like this be simpler? (OK, I know it's not identical to posted
[ 0.23957209289073944, -0.03215654566884041, 0.4890922009944916, -0.11627796292304993, -0.3355657160282135, -0.1301417499780655, 0.47487515211105347, -0.030214833095669746, -0.3093583583831787, -0.429728627204895, 0.06357240676879883, 0.35309308767318726, -0.5414228439331055, 0.3247269093990...
code): ``` public string StripHTMLTags(string text) { return Regex.Replace(text, @"<(.|\n)*?>", string.Empty); } ``` (Conversion to VB.NET should be trivial!) Note: if you are running this often, there are two performance improvements you can make to the `Regex`. One is to use a pre-compiled expression which ...
[ 0.3436002731323242, -0.2151643931865692, 0.55093914270401, -0.09918195009231567, -0.20732805132865906, -0.036836542189121246, 0.40235283970832825, -0.18698841333389282, -0.1256299614906311, -0.5069408416748047, -0.39839062094688416, 0.7218654155731201, -0.48844775557518005, 0.1072661429643...
Basically what I need to do is write a function that takes in a list of type `[(String, String)]` and prints out the contents so that, line-by-line, the output looks like this: ``` FirstString : SecondString FirstString : SecondString ``` ..etc, for every item in the list. I've got the following code and it prints ...
[ 0.09783779829740524, -0.12403234839439392, 0.40737107396125793, -0.2660878896713257, 0.07308175414800644, 0.0930211991071701, -0.08658439666032791, -0.37472087144851685, -0.11464522778987885, -0.6305772662162781, -0.1399390995502472, 0.3918116092681885, -0.351104199886322, 0.06827584654092...
xs } ``` Is there anything I'm doing wrong? The final print xs is unnecessary. sequence here is returning a bunch of ()s (the return value of putStrLn), and print is printing that out as well. While you're at it, now that print xs is gone, you can get rid of the xs variable binding, and make sequence into sequence\...
[ 0.12762123346328735, 0.2117270827293396, 0.5416746139526367, -0.4140743613243103, -0.014418589882552624, 0.11268160492181778, 0.1680772751569748, -0.18661123514175415, -0.21619229018688202, -0.5972236394882202, -0.10008785873651505, 0.4842776954174042, -0.48630812764167786, 0.2195462733507...
I have a C++ class `MyObject` and I want to be able to feed this data like I would to a osstream (but unlike a direct sstream, have the incoming data be formatted a special way). I can't seem to figure out how to overload a operator for MyObject to eat input given to it. ``` class MyObject { public: ostringstream...
[ -0.1648436188697815, -0.07961360365152359, 0.5072677135467529, -0.26635465025901794, 0.21598738431930542, -0.04562779888510704, 0.06543780863285065, 0.26190298795700073, -0.07694189995527267, -0.7994446158409119, -0.14928041398525238, 0.4838799834251404, -0.6432134509086609, 0.206057950854...
in be surrounded by : : So in the given example, s = ":Hello::12345" should be the final outcome. What my question is, how can I tell the object that when ever a `<<something`, put : : around the something. Is this possible? try this: ``` class MyObject { public: template <class T> MyObject &operator<<(con...
[ 0.001800884841941297, -0.31920984387397766, 0.4166431725025177, -0.45755207538604736, 0.15603655576705933, -0.33380234241485596, 0.26005426049232483, -0.25420936942100525, 0.005079367663711309, -0.5561420917510986, -0.3755945861339569, 0.5388742089271545, -0.4807271957397461, 0.08882936090...
std::ostringstream s; }; MyObject obj; obj << "Hello" << 12345; std::cout << obj.to_string() << std::endl; ``` There are certain things you won't be able to shove into the stream, but it should work for all the basics.
[ -0.26498374342918396, -0.27081426978111267, 0.5266342759132385, -0.2831144630908966, 0.2843594551086426, 0.02301555685698986, 0.358829140663147, 0.09910731017589569, 0.0749807134270668, -0.7660856246948242, -0.36297324299812317, 0.4294916093349457, -0.35582435131073, 0.050149545073509216, ...
I'm curious how the Python Ninjas around here would do the following, elegantly and pythonically: I've got a data structure that's a dict from unicode strings to dicts from unicode strings to unicode string lists. So: ``` >>> type(myDict) <type 'dict'> >>> type(myDict[u'myKey']) <type 'dict'> >>> type(myDict[u'myKey'...
[ 0.2181643694639206, -0.08354064077138901, -0.06578992307186127, -0.05990417301654816, -0.19337013363838196, 0.23913268744945526, 0.741798460483551, -0.31437718868255615, -0.2251758724451065, -0.451204776763916, -0.10616778582334518, 0.6003545522689819, -0.18289533257484436, -0.273045301437...
[s.lower() for s in v2]) for k2, v2 in v1.iteritems())) for k1, v1 in myDict.iteritems()) ```
[ -0.06840778887271881, 0.15908387303352356, 0.48604148626327515, -0.22047320008277893, -0.0706494152545929, 0.3200800120830536, 0.43390408158302307, -0.48922285437583923, -0.26211604475975037, -0.5748032331466675, -0.6428272724151611, 0.5710892677307129, -0.048068176954984665, 0.11452503502...
I tested: > rm \-\-remove-files but I am unable to remove it. How can I do it? `rm ./--remove-files`. Note that `--` isn't interpreted by the shell, and by extension, escaping it with `\` will have no effect.
[ 0.11083261668682098, 0.22774875164031982, 0.08257085084915161, -0.3260778486728668, 0.1938936561346054, -0.14350378513336182, 0.7740190625190735, -0.4616698920726776, 0.14009609818458557, -0.23129771649837494, -0.25754502415657043, 0.6282896399497986, -0.14532458782196045, 0.09253267943859...
Has anyone had this problem? I deleted a column in the table editor and then went back to MySql Query Browser but the edit button was disabled. Can't seem to figure it out and I hate MySql's forum format so i decided to ask here. Any help is greatly appreciated! `rm ./--remove-files`. Note that `--` isn't interpreted ...
[ 0.33266356587409973, 0.3332979679107666, 0.2758013606071472, -0.08186519891023636, -0.09239301830530167, -0.1936633586883545, 0.5419470071792603, 0.14198236167430878, -0.32277533411979675, -0.3875725567340851, -0.1284845769405365, 0.687341570854187, -0.10342491418123245, 0.1343098878860473...
i have an ASP.NET web service that returning a custom entity object (Staff): ``` [WebMethod] public Staff GetStaffByLoginID(string loginID){} ``` how would i consume this in Java? thanks! ASP.NET automatically generates a WSDL that contains the interface definitions for your web methods and the types they consume/r...
[ 0.6602417230606079, 0.01931004785001278, 0.29113975167274475, 0.0862385630607605, -0.2860442101955414, 0.0004782655159942806, 0.20547378063201904, -0.13874977827072144, -0.21780095994472504, -0.7497006058692932, 0.22995981574058533, 0.32272574305534363, -0.000629807764198631, 0.22312225401...
of them will be based on the interface of Staff. However, I would not use this class as your actual business object, and instead would wrap access to the web service through a service layer. This service layer would use the proxy Staff class to populate your real business object. This protects your consuming code fro...
[ 0.47380518913269043, 0.2930777072906494, 0.1610087901353836, 0.09220977127552032, -0.02045176923274994, 0.17628303170204163, 0.17685601115226746, -0.201978400349617, -0.13422930240631104, -0.7875425815582275, 0.17630267143249512, 0.45566749572753906, -0.2533566951751709, 0.1866667717695236...
downvoted? It's the only correct answer here.
[ 0.11071418225765228, -0.0050178938545286655, 0.3571406602859497, 0.25506213307380676, -0.15273600816726685, 0.17730094492435455, -0.12446904182434082, -0.018904389813542366, -0.3223158121109009, 0.17673395574092865, -0.048567257821559906, 0.418442040681839, -0.0798584371805191, -0.22995491...
Say I have a linq query select r in db.Roles where r.RoleName DOES NOT contain ("Administrator") select r; It is the does not contain part that has me confused. I realize I can do that .Contains call but how do you do the opposite? Thanks! **Update:** I found the Exclude method and here is how I used it: ``` var ro...
[ -0.022984126582741737, 0.005902382079511881, 0.3733014166355133, -0.23203474283218384, -0.01697647012770176, -0.24299092590808868, 0.23914574086666107, -0.5295246839523315, -0.0013464052462950349, -0.533564031124115, -0.2637711465358734, 0.5500213503837585, -0.39368247985839844, 0.02093783...
where r.RoleName == "Administrator" & r.RoleName == "DataEntry" select r ); ``` Try the following ``` var query = db.Roles.Where(x => !x.RoleName.Contains("Administrator")); ``` You can just use the C# not operator ! (exclamation point). Expanded LINQ syntax version ``` var query = ...
[ -0.1444501429796219, -0.08311688899993896, 0.659858226776123, -0.17615483701229095, 0.23819199204444885, -0.10295786708593369, 0.20356637239456177, -0.5233203172683716, -0.0391513891518116, -0.49537456035614014, -0.596753716468811, 0.8076596856117249, -0.39960527420043945, 0.04870672151446...
This is a bank simulation that takes into account 20 different serving lines with a single queue, customers arrive following an exponential rate and they are served during a time that follows a normal probability distribution with mean 40 and standard deviation 20. Things were working just fine till I decided to excl...
[ 0.43317776918411255, -0.2179812639951706, 0.5721527338027954, 0.0058463942259550095, 0.16780361533164978, 0.3536384701728821, -0.14325930178165436, 0.23415283858776093, -0.19685989618301392, -0.20200972259044647, 0.19665251672267914, 0.6671497225761414, -0.149136021733284, 0.24387191236019...
up the recursive call? I don't get why it wouldn't work. I have changed the getNormal() method to: ``` def getNormal(self): normal = normalvariate(40,20) while (normal <=1): normal = normalvariate (40,20) return normal ``` But I'm curious on why the previous recursive statement gets busted. T...
[ 0.0010881643975153565, -0.32995373010635376, 0.4849502742290497, 0.15108847618103027, 0.010412921197712421, 0.1695055216550827, 0.017084570601582527, -0.27204546332359314, -0.25897157192230225, -0.3369951844215393, -0.16624997556209564, 0.81670081615448, -0.4817643463611603, -0.14555160701...
for i in range(number): c = Customer(name = "Customer%02d"%(i,)) activate(c,c.visit(tiempoDeUso=15.0)) validateTime=now() if validateTime<=600: interval = getLambda(self)
[ 0.08812115341424942, -0.19776730239391327, 1.0034101009368896, -0.20054641366004944, 0.27130499482154846, 0.09500835835933685, 0.390985906124115, -0.38465601205825806, 0.04517931118607521, -0.3991968035697937, -0.2234257459640503, 0.7874417304992676, -0.06432346999645233, 0.239028990268707...
t = expovariate(interval) yield hold,self,t #esta es la rata de generación else: detenerGeneracion=999 yield hold,self,detenerGeneracion class Customer(Process): """ Customer arrives, is served and leaves """ def visit(self,tiempoDeUso=0):
[ -0.4590032398700714, -0.2971583902835846, 0.5450965166091919, 0.036667946726083755, 0.1344844400882721, 0.6400307416915894, -0.06088326871395111, -0.035097550600767136, -0.05776183307170868, -0.178745836019516, -0.12991619110107422, 0.7282989025115967, 0.23453646898269653, 0.10366858541965...
arrive = now() # arrival time print "%8.3f %s: Here I am "%(now(),self.name) yield (request,self,counter),(hold,self,maxWaitTime) wait = now()-arrive # waiting time
[ -0.21077671647071838, -0.34415367245674133, 0.8947340250015259, -0.3411857783794403, 0.20404493808746338, 0.42390456795692444, 0.23655538260936737, -0.14521701633930206, -0.03666507452726364, -0.5469837784767151, -0.13725602626800537, 0.5025604963302612, 0.042275264859199524, 0.12376660853...
if self.acquired(counter): print "%8.3f %s: Waited %6.3f"%(now(),self.name,wait) tiempoDeUso=getNormal(self) yield hold,self,tiempoDeUso yield release,self,counter
[ -0.4452100098133087, -0.31575438380241394, 0.7941076159477234, -0.12369359284639359, 0.07998986542224884, 0.27058106660842896, 0.0031626473646610975, -0.47583654522895813, -0.2204752415418625, -0.0789429098367691, -0.29482463002204895, 0.7190755605697632, 0.09935572743415833, 0.07390733063...
print "%8.3f %s: Completed"%(now(),self.name) else: print "%8.3f %s: Waited %6.3f. I am off"%(now(),self.name,wait) ## Experiment data ------------------------- maxTime = 60*10.5 # minutes
[ 0.45911768078804016, -0.07350195944309235, 0.7649305462837219, 0.01412961445748806, 0.402557373046875, 0.25010696053504944, 0.5388177633285522, -0.31521105766296387, -0.11260581016540527, -0.3475499749183655, 0.07053287327289581, 0.32824283838272095, 0.20906920731067657, 0.2351764738559723...
maxWaitTime = 12.0 # minutes. maximum time to wait ## Model ---------------------------------- def model(): global counter
[ 0.13106109201908112, -0.5372186303138733, 0.7748079895973206, 0.43093833327293396, 0.29001477360725403, -0.12020301073789597, 0.4433227777481079, -0.2587558627128601, -0.2995103597640991, -0.5041465163230896, -0.016720866784453392, 0.6676492094993591, 0.10791362076997757, -0.00950324907898...
#seed(98989) counter = Resource(name="Las maquinas",capacity=20) initialize() source = Source('Source') firstArrival= expovariate(20.0/60.0) #chequear el expovariate activate(source,
[ -0.09814419597387314, -0.0951906219124794, 0.17416995763778687, 0.3027043640613556, 0.30101004242897034, 0.0991312712430954, -0.19109146296977997, 0.022262202575802803, 0.20011332631111145, -0.40373000502586365, 0.18290305137634277, 0.3586130142211914, 0.0772455558180809, -0.10971363633871...
source.generate(number=99999),at=firstArrival) simulate(until=maxTime) def getNormal(self): normal = normalvariate(40,20) if (normal>=1): return normal else: getNormal(self) def getLambda (self): actualTime=now()
[ 0.013941003009676933, -0.6923379302024841, 0.6020965576171875, 0.03345092013478279, 0.22330571711063385, 0.09556873142719269, 0.47177958488464355, -0.18301227688789368, 0.014257301576435566, -0.5280112028121948, -0.06161239370703697, 0.6875253915786743, -0.12785452604293823, -0.09558926522...
if (actualTime <=60): return 20.0/60.0 if (actualTime>60)and (actualTime<=120): return 25.0/60.0 if (actualTime>120)and (actualTime<=180): return 40.0/60.0 if (actualTime>180)and (actualTime<=240): return 30.0/60.0 if (actualTime>240)and (a...
[ 0.1447313278913498, -0.5182399749755859, 0.9263780117034912, 0.11951028555631638, 0.48350197076797485, 0.4440457224845886, -0.09193802624940872, -0.3955625295639038, 0.14251728355884552, -0.8391672968864441, 0.09336402267217636, 0.7705183625221252, 0.13763415813446045, -0.14577244222164154...