text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I am looking for a good API documentation for Javascript especially related to browsers and DOM. I am not looking for any kind of Javascript tutorial, but simply a documentation for all standard Javascript classes and for classes used in web browsers. Something similar to Java's Javadoc ( <http://java.sun.com/j2se/1.4...
[ 0.1334613859653473, 0.2730069160461426, 0.32891127467155457, -0.1675499826669693, -0.33599433302879333, -0.24616120755672455, 0.40063220262527466, -0.456787645816803, -0.3608490228652954, -0.4869520962238312, -0.15485048294067383, 0.5107054710388184, -0.06424133479595184, -0.19017963111400...
In my C++ project, I've chosen to use a C library. In my zeal to have a well-abstracted and simple design, I've ended up doing a bit of a kludge. Part of my design requirement is that I can easily support multiple APIs and libraries for a given task (due, primarily, to my requirement for cross-platform support). So, I ...
[ 0.059146009385585785, -0.1375480443239212, -0.15176907181739807, -0.23773077130317688, -0.09929470717906952, 0.10782212764024734, 0.23191572725772858, -0.24663282930850983, 0.10945644974708557, -0.4991949200630188, 0.14713847637176514, 0.49277690052986145, -0.6831631660461426, 0.0980948880...
bool run() { return doWork(); } void shutdown() { destroy(); } private: virtual bool doInit() = 0; virtual bool doWork() = 0; virtual void destroy() = 0; }; ``` And a class that inherits from it: ``` class LibrarySupportClass : public BaseClass { public: LibrarySupportClass() : BaseClass(...
[ 0.22280184924602509, -0.20256808400154114, 0.10408776998519897, -0.3127431571483612, 0.12767748534679413, -0.07079353928565979, 0.580448567867279, -0.23990564048290253, -0.12606841325759888, -0.18010711669921875, -0.2573208510875702, 0.5819523930549622, -0.4864090085029602, 0.5880848765373...
if (!libraryInit()) return false; // the issue is that I can't do this: libraryCallbackA(&LibrarySupportClass::callbackA); return true; } // ... and so on ``` The problem I've run into is that because this is a C library, I'm required to provide a C-compatible callback of the form `int (*)(int, int)`, b...
[ 0.07602427899837494, 0.022979523986577988, 0.25990206003189087, -0.16789430379867554, 0.10241521894931793, -0.20164982974529266, 0.38889211416244507, -0.3047715425491333, 0.031255919486284256, -0.3710959851741791, -0.1879880726337433, 0.6141243577003479, -0.39686164259910583, 0.41371631622...
b) { _inst_ptr->callbackA(a, b); } bool LibrarySupportClass::doInit() { _inst_ptr = this; if (!libraryInit()) return false; // the issue is that I can't do this: libraryCallbackA(&callbackADispatch); return true; } ``` This will clearly do Bad Things(TM) if LibrarySupportClass is instantia...
[ 0.2529906630516052, -0.002311169169843197, -0.019226865842938423, -0.27245980501174927, 0.02362917922437191, -0.22523333132266998, 0.6537967920303345, -0.42619386315345764, 0.0018304098630324006, -0.49905866384506226, -0.1593674272298813, 0.7635920643806458, -0.4775197207927704, 0.31687971...
a singleton, and inheritance just complicates matters. I'll take another look at this approach. Here's how I'd do it. **LibrarySupportClass.h** ``` class LibrarySupportClass : public BaseClass { public: LibrarySupportClass(); ~LibrarySupportClass(); static int static_callbackA(int a, int b); int call...
[ -0.3115573227405548, -0.26987260580062866, 0.14228306710720062, -0.05467398837208748, 0.08772504329681396, -0.0486772395670414, 0.2670857310295105, -0.3556954562664032, -0.1175948828458786, -0.48429739475250244, -0.3348263204097748, 0.5729324221611023, -0.4619828164577484, 0.17857895791530...
else { return singleton_instance->callback(a, b); } } LibrarySupportClass::LibrarySupportClass() { if (singleton_instance) { WHAT? unexpected creation of a second concurrent instance throw some kind of exception here } singleton_instance = this; } LibrarySupportClass::~LibrarySupportClass() { ...
[ -0.12301361560821533, -0.1343279480934143, -0.12607060372829437, -0.059371255338191986, -0.03923686593770981, -0.2758427560329437, 0.3962324261665344, -0.2196185290813446, -0.1397811323404312, -0.7721418738365173, -0.023388417437672615, 0.45822975039482117, -0.3927749991416931, 0.205855727...
assuming that the application code is already such that it will not try to create more than one instance of this class. Having an API like this (instead of the more canonical 'singleton' API) means that you can for example create an instance of this class on the stack if you want to (provided you don't try to create m...
[ 0.36467957496643066, -0.23325389623641968, -0.10817483067512512, 0.08212074637413025, 0.015070653520524502, -0.32433032989501953, 0.1567009687423706, -0.04466201737523079, -0.37563663721084595, -0.7245712876319885, -0.03571188822388649, 0.4295215606689453, -0.3712380826473236, 0.1682710647...
I am accessing a httpwebrequest that returns a pdf file as the response. I am reading that response into a memory stream, and later on converting to a file. The problem is, is that hundreds of files are being created. Not sure why, I've tried many ways, and all do the same... This is the first method which returns the ...
[ 0.04837694391608238, -0.07284363359212875, 0.6928291320800781, 0.14893558621406555, 0.07250802963972092, -0.06020073592662811, 0.062124401330947876, -0.008378496393561363, -0.07792379707098007, -0.800108015537262, -0.18829020857810974, 0.5720283389091492, -0.10032136738300323, 0.2574939727...
do { bytesRead = _ResponseStream.Read(buffer, 0, buffer.Length); memStream.Write(buffer, 0, bytesRead); } while (bytesRead != 0); ``` Second to convert to FileStream... ``` byte[] data = stream.ToArray(); FileStream fs = new FileStream(newFile, FileMod...
[ -0.014433396980166435, -0.2916613817214966, 0.4882430136203766, -0.46758103370666504, 0.4637325406074524, 0.08682166785001755, 0.2423730343580246, -0.4228839576244354, -0.0589766651391983, -0.6876177191734314, -0.5326829552650452, 0.4877351224422455, -0.269358366727829, 0.1792251467704773,...
fs.Write(data, 0, data.Length); ``` Any ideas? **EDIT TO ADD MORE CODE...** ``` public MemoryStream GetToStream() { if (_Req == null) throw new Exception("HttpWebRequest is not initialised"); GetResult(_Req); MemoryStream memStream = new MemoryStream(); byte[] b...
[ -0.20311374962329865, -0.285283625125885, 0.707411527633667, -0.13297200202941895, 0.4133073389530182, -0.11557219922542572, 0.4204092025756836, -0.11179912090301514, -0.29913458228111267, -0.6739874482154846, -0.5444397330284119, 0.5410550236701965, -0.36082687973976135, -0.01318388804793...
{ bytesRead = _ResponseStream.Read(buffer, 0, buffer.Length); memStream.Write(buffer, 0, bytesRead); } while (bytesRead != 0); _ResponseStream.Close(); if (memStream.Length > 0) return memStream; else return null; } ``` newFile is the mapped pa...
[ -0.074894480407238, -0.13340458273887634, 0.8090031147003174, -0.22943276166915894, 0.4175368547439575, 0.1364458054304123, 0.4219542443752289, -0.1438722014427185, -0.15303757786750793, -0.8930562734603882, -0.2731633186340332, 0.44173645973205566, -0.2370293140411377, 0.3456021249294281,...
of the file to create. ``` byte[] data = stream.ToArray(); FileStream fs = new FileStream(newFile, FileMode.Create); fs.Write(data, 0, data.Length); fs.Close(); ``` I've tried stream.WriteTo(fs), and same thing occurs. Quite bizzare. It's not at all clear why you'd ge...
[ 0.3779905140399933, 0.12729403376579285, 0.4868222773075104, -0.16477376222610474, 0.2204517275094986, 0.12301934510469437, 0.16612477600574493, -0.26182469725608826, -0.46428635716438293, -0.6406955122947693, -0.1388237476348877, 0.4050118029117584, -0.5612863302230835, 0.3106909692287445...
value of `newFile`. I note that you're not closing your file stream, by the way. Using [`File.WriteAllBytes`](http://msdn.microsoft.com/en-us/library/system.io.file.writeallbytes.aspx) is a much simpler way of achieving your goal, and doesn't require you to close anything: ``` byte[] data = stream.ToArray(); File.Wri...
[ 0.10364282876253128, 0.020662181079387665, 0.7118591666221619, -0.15947502851486206, 0.263276070356369, -0.1595013290643692, 0.29574427008628845, -0.20680145919322968, -0.3696882426738739, -0.6679061651229858, -0.44341880083084106, 0.6269690990447998, -0.18686336278915405, 0.30003926157951...
I need to validate an IP range that is in format 000000000 to 255255255 without any delimiters between the 3 groups of numbers. Each of the three groups that the final IP consists of should be 000 (yes, 0 padded) to 255. As this is my 1st stackoverflow entry, please be lenient if I did not follow etiquette correctly....
[ 0.04942050203680992, 0.2727687656879425, 0.5859410762786865, 0.08615308254957199, -0.11281494051218033, -0.07315859943628311, 0.28263190388679504, -0.6067438125610352, -0.21502795815467834, -0.5410555601119995, 0.10548040270805359, 0.33601343631744385, -0.07273612171411514, -0.008325673639...
In a upcoming project I'm going to write an application in C# which partly has to communicate with a HTTP server. I'm very fond of writing my code TDD-style, and I would just love it if I could mock all of the HTTP requests in my tests. Does any one here know about an easly mockable HTTP client framework? Ps. I usual...
[ 0.5847809910774231, 0.08015505224466324, 0.13701272010803223, 0.2937396168708801, -0.11693672835826874, 0.04719908908009529, 0.2852272093296051, 0.35983899235725403, -0.23606714606285095, -0.9347806572914124, 0.34469863772392273, 0.48375043272972107, -0.04069945216178894, -0.03633211925625...
which all calls are made. During testing, a mock HTTP handler is injected so that the responses can be programmatically set before the call is made. It has another mode where it hosts its own ASP.NET site so that the full actual stack can be exercised. This works well, although it hasn't been pulled out as a standalo...
[ 0.23091548681259155, 0.09187428653240204, 0.483137845993042, -0.0061623635701835155, -0.17369601130485535, 0.18148620426654816, 0.5495325326919556, -0.8651650547981262, -0.2618350386619568, -0.46895548701286316, -0.09516700357198715, 0.49254080653190613, -0.4680623710155487, -0.24685472249...
I work in an office which has been doing Agile for a while now. We use Scrum for project management and mix in the engineering practices of XP. It works well and we are constantly learning lessons and refining our process. I would like to tell you about our usual practices for testing and get feedback on how this coul...
[ 0.8496184945106506, 0.43277642130851746, -0.1814887374639511, 0.000030857318051857874, -0.23513129353523254, 0.07105948776006699, 0.4012435972690582, -0.12273412942886353, 0.31507399678230286, -0.6642622351646423, 0.13409997522830963, 0.8510822653770447, 0.4342119097709656, -0.031478263437...
same as the unit tests just without using the mocks. This tends to catch a few issues which slipped through the unit tests. These tests tend to be difficult to read as they usually involve a lot or work in the `before_each` and `after_each` sections of the spec framework as the system has to often reach a certain state...
[ 1.0334945917129517, -0.06961367279291153, -0.09687098115682602, 0.40930402278900146, 0.03362549841403961, -0.26635169982910156, 0.09747759252786636, -0.14078256487846375, -0.030246635898947716, -0.37189731001853943, 0.4651814103126526, 0.963695228099823, 0.316502183675766, 0.00446673529222...
how anyone else is doing things. Do you think that if Integration Tests or Functional Testing are being done well enough the other can be disregarded? Unit, integration and functional testing, though exercising the same code, are attacking it from different perspectives. It's those perspectives that make the difference...
[ 0.6366302371025085, 0.25574448704719543, -0.09189607948064804, 0.11619649082422256, -0.11561649292707443, -0.2712421715259552, 0.5367614030838013, -0.41087886691093445, -0.0949937105178833, -0.4223298728466034, -0.037787191569805145, 0.6667430400848389, 0.07745131850242615, -0.216579943895...
of tests at the end of it. You haven't mentioned whether you have a continuous integration server running. I would strongly recommend setting one up ([Hudson](http://hudson-ci.org/) is easy to set up). Then you can have your integration and functional tests run against every check in of the code.
[ 0.6036670804023743, 0.02343737706542015, -0.1794217824935913, -0.04085727408528328, 0.41380029916763306, -0.19941435754299164, 0.1442684531211853, -0.08699727803468704, -0.03960710018873215, -0.41275444626808167, 0.3593750298023224, 0.7414807081222534, -0.043044839054346085, -0.11679161339...
I have a `DataGridView` and I am writing integers in to one of the columns, I would like these values not to have a comma in them when the value >= 1000. But at the moment, when i enter a value which is >= 1000 they appear in the form '1,000', the comma could be translated incorrectly in certain areas so I would prefer...
[ 0.054684847593307495, 0.19787684082984924, 0.5866104364395142, 0.23357343673706055, 0.09028468281030655, 0.08608309179544449, 0.017142944037914276, 0.133196622133255, -0.27539992332458496, -0.6058682799339294, -0.08952704817056656, 0.03586692735552788, -0.030856793746352196, 0.133619368076...
incorrect. Your numbers are being formatted according to the rules of the current user's locale, so a comma in one locale would become a dot in other etc. Other than that specify "D" or "d" as DataFormatString to format it without any punctuation.
[ 0.4273061752319336, 0.14281527698040009, 0.46239811182022095, 0.15857675671577454, -0.007358446717262268, -0.06908594071865082, 0.253564715385437, 0.34907346963882446, -0.13970398902893066, -0.6740640997886658, -0.29433193802833557, 0.056668493896722794, -0.24745523929595947, 0.29974362254...
Nowadays, I'm working on a database, with no "Relations, PKs and FKs", just raw data. I can say that database is just set of papers. When I asked about this, I had this; "Hide the Business". Also, one of my friends said, this always happens in "Large systems". In large systems, they are tyring to hide thier business ...
[ 0.15988858044147491, 0.21024052798748016, -0.06606001406908035, 0.17591269314289093, 0.1721753180027008, -0.1695445328950882, 0.04781242087483406, 0.06143848970532417, -0.23263125121593475, -0.409321129322052, 0.043555546551942825, 0.48670604825019836, -0.10567913949489594, 0.3608120679855...
you rely on database's way to ensure integrity, you hardly can optimize it. There is also thing called `SQL/PLSQL context switching` in `Oracle`: if you create an **empty** trigger on the table, it will slow down `DML` about 20 times — with the mere fact that the trigger exists. In Oracle, when you write a `ON UPDATE...
[ 0.06685980409383774, 0.17738376557826996, 0.07789046317338943, 0.36060789227485657, -0.04299832135438919, -0.1886289268732071, 0.1304275542497635, -0.081070676445961, -0.32494601607322693, -0.4284164309501648, 0.19024430215358734, 0.5129116177558899, -0.14652439951896667, 0.169416278600692...
results you want to update into a temporary table, issue a `MERGE`, check integrity before and after, and apply the business rules. A single query that processes `50,000` rows works faster than a loop of `50,000` queries processing single row. Of course, it's very hard to implement and only pays for itself when you ha...
[ -0.009744245558977127, 0.2718138098716736, 0.2797681391239166, 0.2573102116584778, -0.0286793801933527, -0.09235639870166779, -0.011194108985364437, -0.23802849650382996, -0.2962300777435303, -0.5421029925346375, -0.22125831246376038, 0.48758870363235474, -0.0687837079167366, 0.03626247867...
and this index may be efficiently used in the queries. A `UNIQUE INDEX` is also a natural and most efficent way to enforce uniqueness. But of course, as any index, is slows down `INSERTS` and those `UPDATES` and `DELETES` whose `WHERE` condition is not selective. I. e. if you need to `UPDATE` or `DELETE` `1` row of `...
[ -0.5087009072303772, 0.2116382122039795, 0.40922605991363525, 0.32559677958488464, 0.017691323533654213, -0.24759985506534576, 0.09968837350606918, 0.007183450739830732, -0.22459952533245087, -0.600969135761261, -0.17187640070915222, 0.5029215812683105, -0.2361554354429245, 0.1398250311613...
``` function DeleteData(ID) { var ctrlId=ID.id; var divcontents=document.getElementById(ctrlId).innerHTML; var tabid=ctrlId.replace(/div/,'tab'); var tabcontents=document.getElementById(tabid).innerHTML; alert(document.getElementById(tabid).innerHTML); document.getElementById(tabid).innerHTML="<TBody><tr><td></t...
[ -0.053439415991306305, 0.15014241635799408, 0.37781083583831787, -0.24256595969200134, 0.20599541068077087, 0.26522892713546753, 0.3786783218383789, -0.14766670763492584, -0.2841760814189911, -0.6737951636314392, -0.34871384501457214, 0.3135527968406677, -0.492879718542099, 0.2185845226049...
I have an array: ``` $array = array("apple", "banana", "cap", "dog", etc..) up to 80 values. ``` and a string variable: ``` $str = "abc"; ``` If I want to check whether this string (`$str`) exists in the array or not, I use the `preg_match` function, which is like this: ``` $isExists = preg_match("/$str/", $arra...
[ 0.19913068413734436, 0.33900395035743713, 0.35387104749679565, -0.25964435935020447, 0.05921478942036629, 0.1743396669626236, 0.18226537108421326, -0.31101059913635254, -0.21689960360527039, -0.6190348267555237, 0.14320550858974457, 0.46968477964401245, -0.5489915609359741, 0.1652090698480...
how can I do that? ```php bool in_array ( mixed $needle , array $haystack [, bool $strict ] ) ``` <http://php.net/manual/en/function.in-array.php>
[ 0.2950497567653656, 0.15216365456581116, 0.08959153294563293, -0.12299234420061111, -0.05102665722370148, -0.10726755857467651, 0.5394574999809265, -0.5043333172798157, -0.13451912999153137, -0.24044233560562134, -0.04942883923649788, 0.3596666753292084, -0.16584616899490356, 0.19955106079...
I have a very funny problem on my application, I get an error as follow: System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'. However, when I tried to speicify the provider on my connection as Provider=SQLOLEDB.1 or Provider=SQLOLEDB, then I...
[ 0.020913662388920784, 0.20102396607398987, 0.1941334456205368, -0.0659460723400116, -0.3879609704017639, 0.03968280553817749, 0.27639201283454895, 0.15746435523033142, -0.137754887342453, -0.7654699087142944, 0.16829927265644073, 0.4487839937210083, -0.6984215378761292, 0.5493166446685791,...
too, not only the connection string. Note that you can't use an `SqlConnection` for OLEDB, you need to use `System.Data.OleDb.OleDbConnection` instead.
[ -0.13057450950145721, -0.13905945420265198, 0.18457168340682983, 0.29154902696609497, 0.10566988587379456, -0.35196202993392944, 0.009697150439023972, 0.3114314377307892, -0.2936054468154907, -0.41862601041793823, -0.16323162615299225, 0.31714269518852234, -0.5018022060394287, 0.4416703283...
I need to create a group of `DropDownList`s to show and allow change of a property group for an item. I have the following code on my ASP page. ``` <asp:Repeater runat="server" ID="repeaterProperties"> <ItemTemplate> <p><asp:DropDownList runat="server" ID="ddProperty" OnInit="ddProperty_OnInit" /><p> ...
[ 0.168221116065979, -0.015681197866797447, 0.5746302008628845, -0.009822523221373558, 0.08124867081642151, 0.34836170077323914, -0.004502861760556698, -0.3795663118362427, -0.25982865691185, -0.5481594800949097, -0.03736637532711029, 0.4292639493942261, -0.21517427265644073, 0.2217696756124...
the `Repeater` contains two of those values, `A` and `B`, the `Repeater` outputs two `DropDownList`s, both with all 3 values availabla and the first one with `A` as selected value and the second one with `B` as selected value. **Edit:** It seems that adding `OnItemDataBound="repeater_ItemDataBound"` to the `Repeate...
[ 0.01748010329902172, -0.14223569631576538, 0.5095887780189514, -0.0024347801227122545, 0.027638889849185944, 0.29943376779556274, 0.24664855003356934, -0.20623183250427246, -0.054126180708408356, -0.23240970075130463, -0.16559430956840515, 0.5849168300628662, -0.37730899453163147, 0.406121...
old values before the new selections can be saved. Any suggestion on how to work around this? *Current code:* ``` <asp:Repeater runat="server" ID="repeaterJako" OnItemDataBound="repeater_ItemDataBound"> <ItemTemplate> <asp:DropDownList id="ddJako" runat="server" OnInit="ddJako_OnInit"> </asp:DropDownList><br...
[ -0.24194040894508362, -0.15490874648094177, 0.3461984395980835, 0.06477730721235275, -0.025390325114130974, 0.3175934851169586, 0.03735283017158508, -0.3926354646682739, -0.2307436168193817, -0.45566102862358093, -0.3341386616230011, 0.4140884280204773, -0.2580985724925995, -0.184689745306...
sure the item is not the header/footer. The example from MSDN does both these things: <http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.repeater.onitemdatabound.aspx>
[ 0.329134464263916, -0.33925101161003113, 0.41339173913002014, 0.33009421825408936, 0.20669575035572052, -0.28566688299179077, 0.2066577672958374, -0.02954971417784691, -0.32271137833595276, -0.3949069678783417, 0.12428157776594162, 0.2188902050256729, -0.20700643956661224, 0.23610904812812...
What I want is something similar to STL vector when it comes to access complexity, reallocation on resize, etc. I want it to support arbitrary index range, for example there could be elements indexed from -2 to +7 or from +5 to +10. I want to be able to push\_front efficiently. Also I want two-way resize... I know I c...
[ 0.007914320565760136, -0.42395615577697754, 0.34840479493141174, 0.23914015293121338, -0.2130371332168579, 0.1681596040725708, -0.25749802589416504, -0.01859303191304207, -0.07058696448802948, -0.9029538631439209, 0.10128727555274963, 0.6860493421554565, -0.33319252729415894, 0.13070523738...
efficient insertion at the beginning. Map supports access based on arbitrary keys, you can have any range you want, or even a sparsely populated array. Iteration over the collection is slow. Unordered map (tr1) is similar to map except it supports better iteration. As a general rule of thumb, use a vector (in your c...
[ -0.46924424171447754, -0.5414021015167236, -0.09737417846918106, 0.044529564678668976, -0.011506629176437855, 0.15901827812194824, -0.02710476517677307, -0.23226720094680786, -0.36449167132377625, -0.8684015870094299, -0.08794339746236801, 0.6861143112182617, -0.5303494930267334, -0.413292...
I'm working on a website for a client, in PHP/MySQL. They are a publisher, and the site needs to show whether the book you are looking at is in stock with their distributor. The stock file is a CSV file on the distributor's FTP. This file is updated at a certain time every evening. So far I've written a script in PHP ...
[ 0.8485531210899353, 0.388977974653244, 0.37913963198661804, 0.08754020184278488, 0.21950629353523254, -0.19687636196613312, -0.3494114875793457, 0.03820151835680008, -0.06051892787218094, -0.18379056453704834, 0.30571427941322327, 0.4165990352630615, 0.20846889913082123, 0.0425797104835510...
a day, after the file has updated on the distributor's FTP? Is this the best way to do this? The conventional way to automate repeating tasks is to use **cron**. You can edit your cron configuration from the command line using `crontab -e`. The file follows the following format: ``` # .---------------- minute (0 - 59)...
[ 0.2733701467514038, 0.011871046386659145, 0.8686341047286987, 0.15251344442367554, 0.1862514168024063, 0.10495615750551224, 0.15541456639766693, 0.08515800535678864, -0.4667161703109741, -0.4049437344074249, -0.19594226777553558, 0.4537292420864105, -0.19804704189300537, 0.2452135533094406...
- 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | * * * * * command to be executed ```
[ 0.5349400043487549, 0.12857083976268768, 0.48798397183418274, -0.4900807738304138, -0.16709016263484955, 0.21738670766353607, 0.483841210603714, -0.012324702925980091, -0.13639669120311737, -0.23394352197647095, -0.7493873238563538, 0.627737283706665, -0.10308238863945007, 0.16852021217346...
This is a .NET question for C# (or possibly VB.net), but I am trying to figure out what's the difference between the following declarations: ``` string hello = "hello"; ``` vs. ``` string hello_alias = @"hello"; ``` Printing out on the console makes no difference, the length properties are the same. It marks the...
[ 0.13092391192913055, 0.15638300776481628, 0.4779711961746216, -0.016546500846743584, -0.14975091814994812, -0.20139646530151367, 0.31220483779907227, -0.14834341406822205, -0.15631963312625885, -0.16707763075828552, -0.2977091073989868, 0.45688965916633606, -0.303741991519928, 0.1470618247...
row. For instance, `@""""` evaluates to `"`.
[ -0.29118749499320984, 0.293439656496048, 0.3128477931022644, -0.07253331691026688, -0.03462774306535721, 0.08456835895776749, -0.1343337446451187, -0.0704372450709343, 0.14611820876598358, -0.47105780243873596, -0.18005765974521637, 0.4998299777507782, -0.49548566341400146, 0.0592940263450...
I have a class that dispatches a Success and a Failure event and I need to maintain a statistic on the average number of failure/total number of events in the last X seconds from that class. I was thinking something along the lines of using a circular linked list and append a success or failure node for each event. T...
[ 0.22308917343616486, -0.055503759533166885, -0.0408935621380806, 0.32240045070648193, -0.3297272026538849, 0.13124977052211761, 0.35107627511024475, 0.11699757725000381, -0.32416120171546936, -0.3405081629753113, 0.17196184396743774, 0.4371277391910553, -0.19179357588291168, 0.302989453077...
second can change) 2. I need to constantly loop over the list and count all the events (potentially expensive as I will probably have 100s of such events per second) Does anyone know of another way to compute average values from a list of samples received in the last X seconds? You should use a sampling frequency (a-l...
[ 0.3127937912940979, -0.22598613798618317, 0.23957481980323792, 0.35481253266334534, -0.18803612887859344, -0.024045201018452644, 0.1632116734981537, -0.18251876533031464, -0.19298943877220154, -0.49654075503349304, 0.16880394518375397, 0.21287953853607178, -0.2976432740688324, 0.2445331811...
of an average value and a number of events. Every entry starts at 0 for both value. When you receive a new event, you change the current and the global entry like that: ``` average = ((number * average) + 1) / (number + 1) number = number + 1 ``` At each sampling interval you change the global entry using the olde...
[ -0.06605803966522217, -0.03171641007065773, 0.2863461375236511, 0.10683616250753403, 0.06545659899711609, 0.3124042749404907, 0.0013175838394090533, 0.1579940915107727, -0.22790099680423737, -0.8587766885757446, 0.11212830245494843, 0.17007902264595032, -0.11011834442615509, 0.282862484455...
I don't have whois installed on my server (apparently it's in the works but no real news on it). I was wondering if anybody knew a way to emulate the functionality of it though. I figured I'd be posting some data to a url but I don't know what, or where. Basically I'm at a complete loss, and would appreciate any help ...
[ 0.5834437608718872, 0.037413738667964935, -0.031176123768091202, 0.09166491031646729, -0.07213127613067627, 0.012876368127763271, 0.4167315363883972, 0.5064464211463928, -0.2823898494243622, -0.5309950113296509, 0.2323586642742157, 0.11143507808446884, 0.0738682821393013, 0.323885858058929...
[a class](http://www.phpclasses.org/browse/package/360.html). Make sure you include that too.
[ 0.32297152280807495, -0.3134706914424896, -0.22580978274345398, 0.23458857834339142, -0.1953473836183548, -0.0795975849032402, 0.3919466435909271, 0.24560701847076416, -0.6099015474319458, -0.3626897931098938, -0.1438741236925125, 0.15733160078525543, 0.08192868530750275, 0.131862640380859...
I need to run a bash script as root (passwordless sudo or su not viable) and since you cannot setuid a script in Linux, I thought about calling it from an executable and making *it* setuid: ``` $ cat wrapper.c int main(void) { system("/bin/bash ./should_run_as_root.sh"); } $ gcc -o wrapper wrapper.c $ sudo cho...
[ 0.09400219470262527, 0.19293783605098724, 0.5573323369026184, -0.2311094105243683, -0.03441917151212692, -0.2374969869852066, 0.5735719203948975, -0.11387978494167328, -0.28718456625938416, -0.6841441988945007, -0.21263094246387482, 0.8476129174232483, -0.13158877193927765, 0.1992730498313...
changes the effective UID (EUID) the executable will run as, and not the real UID (RUID) which `getuid()` returns, and in addition to the restriction on `suid` interpreted scripts (any executable beginning with "`#!`"), some shells like `bash` as an extra safety measure will set the EUID back to the RUID in this case, ...
[ 0.010550066828727722, -0.07524674385786057, 0.3883511424064636, -0.20562373101711273, 0.14445999264717102, -0.26358938217163086, 0.5455065369606018, -0.06485076248645782, -0.10937079042196274, -0.7786311507225037, -0.7758435606956482, 0.767106831073761, -0.3640941083431244, 0.1001919955015...
that the restriction on `suid` scripts in many Unix systems, shells and interpreters, are there for a reason, which is that if the script is not very careful about sanitizing its input and the state of environment when it is executed, they are dangerous and can be exploited for security escalation. So be very careful w...
[ 0.37875857949256897, 0.3357844054698944, -0.03030850552022457, 0.12185541540384293, 0.4514559209346771, -0.44933804869651794, 0.2541792392730713, 0.03952854126691818, -0.2373649775981903, -0.15883252024650574, -0.3665008246898651, 0.7146480083465576, -0.20571088790893555, 0.124539546668529...
`PATH` to contain exactly what is necessary in the right order and no directories that are writable to others.
[ 0.3027207553386688, -0.09986855089664459, 0.2604168951511383, 0.3239758312702179, 0.11630277335643768, -0.26476970314979553, 0.2495281994342804, 0.009588753804564476, 0.03236131742596626, -0.7017415761947632, -0.6392964124679565, 0.42279523611068726, -0.23621709644794464, -0.16335552930831...
I have a com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException in my code (using Hibernate and Spring) and I can't figure why. My entities are Corpus and Semspace and there's a many-to-one relation from Semspace to Corpus as defined in my hibernate mapping configuration : ``` <class name="xxx.entities.S...
[ -0.08936504274606705, 0.12976665794849396, 0.2048649787902832, -0.09598943591117859, -0.0736396387219429, 0.35502058267593384, 0.03951277956366539, -0.28986647725105286, -0.18149620294570923, -0.7385387420654297, 0.02185698226094246, 0.368594229221344, -0.07951094955205917, -0.009134576655...
[...] </class> <class name="xxx.entities.Corpus" table="Corpus" lazy="false" batch-size="30"> <id name="id" column="idCorpus" type="java.lang.Integer" unsaved-value="null"> <generator class="identity"/> </id> <property name="name" column="name" type="java.lang.String" not-null="true" unique="true" /...
[ -0.34001925587654114, 0.34472131729125977, 0.2144557386636734, -0.0262933149933815, 0.37165072560310364, 0.4202336370944977, 0.1248808428645134, -0.43791529536247253, -0.4359387457370758, -0.397578626871109, -0.3050030469894409, 0.21663103997707367, -0.32547906041145325, 0.3862508535385132...
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440) at or...
[ -0.34008440375328064, 0.021587321534752846, 0.3708406388759613, -0.3442850708961487, -0.1430470049381256, 0.6608028411865234, 0.3179952800273895, -0.6862744092941284, -0.24717748165130615, -0.6375311613082886, -0.21550172567367554, 0.2120182365179062, -0.22384467720985413, 0.03999489173293...
[...]) ``` So it looks like it does not try to insert the idCorpus and as it is not null it uses the default value "0" which does not refers to an existing entry in Corpus table... I get confused w/ the association mappings all the time. Review the association needed and the hibernate mapping config used to create th...
[ 0.17575347423553467, 0.25232186913490295, 0.29393911361694336, -0.01000793557614088, -0.29797327518463135, -0.4792892038822174, 0.30571654438972473, -0.22932524979114532, -0.07376433163881302, -0.46757975220680237, 0.14366446435451508, 0.2042115032672882, -0.32654547691345215, 0.1396159529...
I heard you should never throw a string because there is a lack of information and you'll catch exceptions you dont expect to catch. What are good practice for throwing exceptions? do you inherit a base exception class? Do you have many exceptions or few? do you do MyExceptionClass& or const MyExceptionClass& ? etc. Al...
[ 0.45652270317077637, -0.041062131524086, -0.131779745221138, 0.09425750374794006, -0.2875690758228302, -0.4546458125114441, 0.5241156816482544, -0.051848407834768295, -0.21195928752422333, -0.41379398107528687, 0.07208362221717834, 0.36351537704467773, -0.24561239778995514, 0.0889981091022...
it has to break its "contract". The function's signature (name and parameters) determine its contract. Given these two member functions: ``` const Apple* FindApple(const wchar_t* name) const; const Apple& GetApple(const wchar_t* name) const; ``` The names of these functions as well as their return values indicate t...
[ -0.08597293496131897, -0.014210056513547897, 0.3791254162788391, -0.3094298541545868, 0.20028004050254822, 0.15195058286190033, 0.30877745151519775, -0.05338631942868233, -0.2609593868255615, -0.2267363965511322, -0.4291590452194214, 0.5546748042106628, -0.2826683819293976, -0.060864165425...
other way of reporting these conditions. If you decide to make it a part of the promise (read: function signature) then it can report that condition without throwing an exception. Note that in the case of **FindApple**, it's up to the caller to decide how to handle the condition of "not finding the right apple" becaus...
[ 0.10877877473831177, 0.010310793295502663, -0.11597219109535217, -0.05157439038157463, 0.4638698101043701, 0.04547616466879845, 0.6702668070793152, 0.16798879206180573, -0.12745389342308044, -0.5994351506233215, -0.35006406903266907, 0.7951852083206177, -0.0776887908577919, -0.433961689472...
an exception needs to be handled, but only by the caller that **knows how to handle a particular condition in a useful way**. And I mean this in the widest possible interpretation: a service that gives up will try again later, a UI that provides a helpful error message, a web app that presents a "oops" screen but that ...
[ 0.32941707968711853, 0.309950053691864, 0.2810620069503784, -0.28561702370643616, 0.04338851571083069, -0.06006014347076416, 0.5726621150970459, 0.25737228989601135, -0.24623659253120422, -0.530582070350647, -0.3098837435245514, 0.37648501992225647, -0.2588261365890503, -0.0639019235968589...
Can anyone suggest a way of stripping tab characters ( "\t"s ) from a string? CString or std::string. So that "1E10      " for example becomes "1E10". [hackingwords' answer](https://stackoverflow.com/questions/556277/trim-remove-a-tab-t-from-a-string/556293#556293) gets you halfway there. But [`std::remove()`](http://...
[ -0.018651820719242096, -0.03283291310071945, 0.32219359278678894, -0.13571570813655853, 0.24676872789859772, -0.11113452911376953, 0.3082176446914673, 0.009951857849955559, -0.10354583710432053, -0.5148687958717346, -0.527886688709259, 0.27640432119369507, -0.0600053146481514, 0.0925103425...
I'm running a VBScript that may run under x64 Windows. I need to read a registry key from the 32-bit part of the registry. For that I use path `HKLM\Software\Wow6432Node\xyz` instead of `HKLM\Software\xyz`. How can I check if the script is executed under x64? I'm not sure you need to check if the script is executing un...
[ 0.32788240909576416, 0.37461188435554504, 0.36282023787498474, 0.022120434790849686, -0.022025397047400475, -0.23109179735183716, 0.4471220374107361, 0.053505558520555496, -0.05405905470252037, -0.7239232063293457, 0.012350914999842644, 0.48599401116371155, -0.40812423825263977, 0.22025673...
it doesn't exist) then that suggestion won't work. Here is a VBScript for examining the operating system. You'll probably also need explanation of the [Properties available from the Win32\_OperatingSystem Class](http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx) ``` strComputer = "." Set objWMIService = Ge...
[ -0.18086223304271698, -0.0391080416738987, 0.7078642249107361, 0.23852774500846863, 0.4645758271217346, -0.060283634811639786, 0.16326230764389038, 0.013668449595570564, -0.14061567187309265, -0.8342936635017395, -0.4262945055961609, 0.5360052585601807, -0.25117337703704834, 0.127643749117...
objOperatingSystem.OSArchitecture msgbox msg Next ``` Note that for Windows XP and 2003, `OSArchitecture` is not available, in which case you will probably have to examine either the `Caption` or `Version` to determine whether your OS is 64-bit. You could also use something like [this](http://blogs.msdn.com/garr...
[ -0.671484649181366, 0.11928467452526093, 0.28084611892700195, -0.02430110052227974, 0.012500195764005184, -0.009332039393484592, 0.22840097546577454, 0.49468106031417847, -0.2811315953731537, -0.735647439956665, -0.2301766574382782, 0.6303449869155884, -0.4762760102748871, 0.00974999554455...
I have a database where each row has an id, a URL, and an XML. The IDs are unique, but URLs column can have duplicates. I need all the URLs, without duplicates, and for each URL I need the id and XML. If I ask only for the URL and the Id, I use the following query: ``` select URL, max(ID) as ID from T1 group by URL ...
[ 0.07529464364051819, 0.41157403588294983, 0.17630207538604736, 0.13714471459388733, -0.013486883603036404, 0.17929625511169434, 0.0692238137125969, -0.42835143208503723, -0.11794517189264297, -0.582311749458313, -0.06680794060230255, 0.46237361431121826, -0.2233014702796936, 0.319627672433...
code = -104 user name required ``` What am I doing wrong? Thanks, Dikla Thanks for the answers. I want to add an explanation: In case of duplicate URLs, I don't care which of them will be returned. But I need to get them without duplicates, even if the XML is different between the rows. Is it possible? Thank...
[ 0.25984352827072144, 0.3473813533782959, -0.07276729494333267, 0.3733101785182953, -0.03257512301206589, 0.1455913633108139, 0.20490708947181702, -0.16632391512393951, -0.17217716574668884, -0.4461406469345093, 0.027966096997261047, 0.524761438369751, -0.18078860640525818, 0.09765570610761...
I was wondering why ad's still use the document.write approach to inserting the add into the page ``` <script language="javascript" type="text/javascript"> document.write("<script type='text/javascript' src='http://addomain/someadd.js'><\/sc" + "ript>"); </script> ``` Why is it that I can't just put ``` <scri...
[ 0.5251002907752991, 0.18569692969322205, 0.2733019292354584, -0.2170356810092926, -0.27745193243026733, -0.18268251419067383, -0.06897619366645813, -0.2525240182876587, 0.12182191759347916, -0.5984435677528381, -0.0430833101272583, 0.3315560817718506, -0.4928646683692932, -0.05188696831464...
Moving from Oracle to PostgreSQL, what (preferably free/OSS) software/tools are available that replace Oracle Enterprise Manager? I'm aware of pgAdmin, as well as some tools bundled into EnterpriseDB's Postgres Plus AS, but am looking for more context and a better overview of the PostgreSQL ecosystem. Specifically I'm...
[ 0.3316316306591034, 0.0903172716498375, 0.21572861075401306, -0.1931038349866867, -0.30255547165870667, -0.2678661048412323, -0.09834231436252594, 0.12424839287996292, 0.013301428407430649, -0.7067879438400269, -0.15924231708049774, 0.5250115990638733, -0.30887019634246826, 0.2567550539970...
been through before. Postgres comes with excellent command-line tools, and they're the focus of the core developer team. I personally leverage those via custom site-specific scripts for db admin, upgrade, replication. For monitoring I use nagios to script psql to query vitals. That said, there are some other options o...
[ 0.21361146867275238, -0.023698078468441963, 0.2522087097167969, 0.0365740992128849, -0.25890544056892395, 0.046283137053251266, 0.22803257405757904, 0.19762100279331207, -0.0864327922463417, -0.7110661268234253, 0.006806396413594484, 0.6392261385917664, 0.14958815276622772, 0.1973265707492...
Manager for PostgreSQL](http://www.ems-hitech.com/pgmanager) This wiki page also has links to many other postgres tools: [Community Guide to PostgreSQL GUI Tools](http://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools) Being a CLI-zealot myself I cannot given any specific recommendations but hopeful...
[ 0.10060625523328781, 0.0988256186246872, -0.04380578175187111, -0.04851329326629639, -0.4167770445346832, -0.25950559973716736, 0.563277006149292, 0.17881368100643158, -0.07658321410417557, -0.4407084584236145, 0.3021288216114044, 0.7508143782615662, -0.08756852895021439, 0.086668998003005...
I wrote a twitter application in Python. Following is the code I used for a module where I find if x is following y. This code can be obviously improved upon. A pythonic way to do that? ``` import urllib2 import sys import re import base64 from urlparse import urlparse import simplejson def is_follows(follower, follo...
[ 0.34070155024528503, 0.16172678768634796, 0.7649303674697876, -0.4856327474117279, -0.34342333674430847, -0.04222310334444046, 0.5635361671447754, -0.14732161164283752, 0.02968536503612995, -0.44879037141799927, 0.12008260190486908, 0.21029895544052124, -0.49812304973602295, -0.09494078904...
try: fol = simplejson.load(urllib2.urlopen(handle)) except IOError, e: # here we shouldn't fail if the username/password is right print "It looks like the username or password is wrong." return fol ``` Update: Indentation fixed. From your code it looks like you are trying to do a Basic...
[ 0.059116262942552567, -0.030593933537602425, 0.33871278166770935, -0.20167437195777893, 0.03962372988462448, -0.043124232441186905, 0.4820692241191864, -0.4444311559200287, 0.0880071148276329, -0.7927641272544861, -0.3847523629665375, 0.6369659900665283, -0.538741409778595, -0.320165485143...
support for Basic HTTP Authentication... auth_handler = urllib2.HTTPBasicAuthHandler() auth_handler.add_password(realm='PDQ Application', uri='https://mahler:8092/site-updates.py', user='klem', passwd='kadidd!ehopper') opener = urllib2.build_...
[ 0.016239745542407036, 0.023424088954925537, 0.4426582455635071, -0.19034449756145477, -0.1123206689953804, 0.055073853582143784, 0.49665847420692444, -0.15981772541999817, -0.03327891603112221, -0.8901572823524475, -0.41896748542785645, 0.6080262064933777, -0.37677666544914246, 0.064452402...
I have a Flex movie that contains a text input box and an (optional) dropdown. The design requires that this dropdown fall below the lower edge of the movie, overlapping the HTML below it. I can set wmode to transparent and can get the dropdown to overlap the HTML fine but then the HTML below is unselectable, even whe...
[ 0.5863064527511597, -0.4972166121006012, 0.6607954502105713, -0.15659217536449432, -0.11611490696668625, -0.3213185667991638, -0.06823492050170898, -0.41716742515563965, -0.18944332003593445, -0.6701182723045349, -0.019501592963933945, 0.8446304798126221, -0.2112622857093811, -0.1408717930...
doesn't give you activate / deactivate events so I can't change the div's size at the correct time. Am I on the right track with this solution? If so, how can I detect if the user is currently using my Movie. If I'm barking up the wrong tree, a little pointer in the right direction would be much appreciated :) Thank...
[ 0.42321109771728516, -0.18540939688682556, 0.3106919527053833, 0.06967955827713013, 0.18390484154224396, -0.1940670609474182, 0.3294715881347656, -0.11773589998483658, -0.1904682070016861, -0.6989104747772217, -0.016504179686307907, 0.7372254729270935, -0.1515951305627823, -0.2679225206375...
`Options` / `Debugging` / `Symbols`. Add "<http://msdl.microsoft.com/download/symbols>" to the `Symbol file (.pdb) locations` list. You'll need to enter a cache directory in `Cache symbols from symbol servers to this directory:`. I use C:\WebSymbols. You'll plenty of space (I've got about 600Mb in mine), although you c...
[ 0.006088649854063988, -0.11149773746728897, 0.38697630167007446, -0.08904958516359329, 0.1789388507604599, 0.1875055879354477, 0.233724445104599, -0.1483594924211502, -0.3885706663131714, -0.8557986617088318, -0.2654381990432739, 0.3187364935874939, -0.001559209544211626, -0.16329093277454...
files, using SYMSTORE.EXE (from [Debugging Tools for Windows](http://www.microsoft.com/whdc/devtools/debugging/default.mspx)), and add that directory to this list. ### Source Server The .PDB files can have an (optional) reference to the source files that they were built from. As you mention, you can use this feature ...
[ 0.6092440485954285, 0.01298720296472311, 0.34712859988212585, 0.09744533151388168, -0.2091466784477234, -0.21239271759986877, 0.028065437451004982, 0.1931420862674713, -0.123435840010643, -0.8791670799255371, -0.41209447383880615, 0.5117491483688354, -0.2814754843711853, -0.053055267781019...
need the tools from the `srcsrv` directory in the Debugging Tools for Windows.
[ 0.22594872117042542, 0.3164532780647278, 0.15697774291038513, 0.1560741513967514, 0.0982608050107956, -0.46168118715286255, 0.08447562158107758, 0.1808749884366989, 0.13057005405426025, -0.6532867550849915, -0.3570678234100342, 0.5324676036834717, 0.22354912757873535, 0.13457448780536652, ...
I have 2 tables like which I would like to query to form a new table. table 1 ``` number type serial index 1000001 613 3 1 1000001 613 3 1 1000001 613 3 1 1000001 613 3 1 1000001 613 4
[ 0.11459657549858093, 0.3374043107032776, 0.5363741517066956, 0.24536295235157013, -0.12839630246162415, 0.5185093879699707, 0.08969412744045258, -0.22647617757320404, -0.4015985429286957, -0.7209299206733704, 0.145481675863266, -0.20411697030067444, -0.25187987089157104, 0.4960778355598449...
1 1000001 613 3 1 ``` table 2 ``` number type serial index 1000001 613 3 2 1000001 613 3 3 1000001 613 3 4 1000001 613 3 4 1000001 613
[ -0.14695541560649872, 0.3730676770210266, 0.0525241419672966, 0.04088759794831276, -0.3580302894115448, 0.6004152894020081, 0.5062576532363892, -0.10381026566028595, -0.3607107102870941, -0.5862417817115784, -0.12470731139183044, -0.3064785599708557, -0.2624622583389282, 0.3969767987728119...
4 2 1000001 613 3 1 ``` I am looking for a query which gives a resultant of indexes and numbers like this, and adds the index, and gives the result: ``` output table number index 1000001 3 1000001 4 1000001 5 1000001 5 1000001 3 1000001 2 ``` I want to prevent ...
[ 0.09315225481987, 0.29772934317588806, 0.3916999101638794, -0.07160557061433792, -0.30491381883621216, 0.19888615608215332, 0.18399927020072937, -0.3310907781124115, -0.2046332061290741, -0.5766817331314087, -0.018054025247693062, 0.04125624895095825, -0.5812749862670898, 0.246836826205253...
where clause because the numbers are same in both tables only the index varies. How can I execute this one-to-one and not one-to-many. I don't think it's possible to do what you are asking. You would have to be able to distinguish each row uniquely to guarantee a 1-to-1 result (this is normally the job of your index co...
[ 0.14816847443580627, -0.13807412981987, 0.28393056988716125, -0.00775223970413208, -0.1305638998746872, 0.04990410432219505, 0.08842700719833374, -0.5957744121551514, -0.23827284574508667, -0.49729594588279724, 0.005178910680115223, 0.5932517051696777, -0.41165873408317566, -0.144914925098...
one table.
[ -0.2968008816242218, 0.20980806648731232, -0.48167654871940613, 0.14029423892498016, -0.2833014130592346, -0.0691714733839035, -0.6390595436096191, 0.44923287630081177, -0.2967914640903473, -0.783729612827301, 0.16900764405727386, 0.17551739513874054, -0.3375989496707916, 0.238772600889205...
Is there any way to take a StreamWriter and output the file (in this case a .txt file) to the user with the option to open/save without actually writing the file to disk? If it is not saved it will basically go away. I am looking for the same functionality of ``` HttpContext.Current.Response.TransmitFile(file); ``` ...
[ 0.09927763789892197, -0.13589800894260406, 0.6814014315605164, 0.12200088053941727, 0.23439674079418182, 0.08097127825021744, 0.3249947428703308, 0.18478766083717346, -0.1388903707265854, -0.8739699125289917, -0.006938960403203964, 0.8230646848678589, -0.3373555541038513, 0.213559508323669...
It obviously is possible to write almost any kind of application in almost any programming language, especially in such a powerful one as Lisp (be it Scheme or Common Lisp). But is it practical to use it for web development? If so, what should be a good starting point? Where can be found the proper resources (tools, li...
[ 0.022939452901482582, 0.45513108372688293, -0.24041332304477692, 0.29522278904914856, 0.029693176969885826, -0.17543604969978333, 0.18581552803516388, -0.009051701985299587, 0.2377385050058365, -0.4774709641933441, 0.04458300769329071, -0.0075255767442286015, -0.4025545120239258, -0.294470...
using mod\_proxy as a reverse proxy, or as a stand-alone server. * Various HTML generation solutions are available, from PHP-style templates to Lisp macro hacks to XSLT. Just take your pick. [HTML-TEMPLATE](http://weitz.de/html-template/) is one example. * [Closure XML](http://common-lisp.net/project/cxml) is availabl...
[ 0.21548298001289368, 0.07975160330533981, 0.44096294045448303, -0.14631953835487366, -0.4561617374420166, -0.14090989530086517, 0.4004998803138733, 0.04091404750943184, -0.36278000473976135, -0.6957231163978577, -0.017068127170205116, 0.590936541557312, -0.4880884289741516, -0.099634274840...
to add continuation support. * Web service projects might require an HTTP client in addition to a server. [Drakma](http://weitz.de/drakma/) is the library to use for that today. [PURI](http://www.cliki.net/Puri) is useful for URI manipulation. And there is more! One starting point is cliki, for example [cliki.net/we...
[ 0.2693794071674347, -0.25112175941467285, 0.245093435049057, 0.3092949390411377, -0.16009290516376495, -0.3590572476387024, 0.08138512074947357, 0.0733875185251236, -0.3050152361392975, 0.015831980854272842, -0.11793038249015808, 0.1859893649816513, -0.434918612241745, -0.11556500196456909...
Is there an API to clear anonymous cookie? Yes! ``` System.Web.Security.AnonymousIdentificationModule.ClearAnonymousIdentifier() ``` See this [useful article](http://odetocode.com/articles/440.aspx) : (Migrating Anonymous User Settings) Also [Best way to Migrate Anonymous Profile](https://stackoverflow.com/questio...
[ -0.03960447385907173, -0.005558884236961603, 0.33595728874206543, 0.052525825798511505, 0.23951639235019684, -0.07425228506326675, 0.07952208071947098, -0.07783757150173187, -0.3588463366031647, -0.5670567750930786, -0.18472732603549957, 0.42677274346351624, -0.34216246008872986, -0.011585...
Imagine the following sql query: ``` UPDATE MYTABLE SET COL2 = (SELECT COL2 + 1 FROM (SELECT MAX(COL2) FROM MYTABLE) AS X) WHERE ID IN (1,2,3,4,5) ``` Assume that before the update is executed MAX(COL2) is 1. My intention is that for the update where ID=1 COL2 is updated to 'max(COL2) + 1' (i.e. 2), and that for su...
[ -0.1891612708568573, 0.22621281445026398, 0.6020346879959106, -0.11580934375524521, -0.04627538472414017, 0.20292644202709198, -0.1758524477481842, -0.21871256828308105, -0.1449442058801651, -0.6366212368011475, -0.10271583497524261, 0.5655368566513062, -0.34638941287994385, -0.06262976676...
be performance issues with doing this, but I am curious none-the-less! Is there a better alternative (that does not involve multiple update statements) ? BTW: incase you are wondering about the syntax used for the above query (the nested inner table) see here: [SQL : Using the target table in an UPDATE statement in a ...
[ 0.05504106730222702, 0.14254990220069885, 0.39124596118927, -0.08831261098384857, -0.07995503395795822, -0.18056000769138336, 0.05761513113975525, -0.28964129090309143, -0.23125310242176056, -0.4667576849460602, -0.06360557675361633, 0.6705039739608765, -0.27743858098983765, 0.067077621817...
col1 = col2 + 1 WHERE col1 > col2 ``` would never end.
[ -0.4383299648761749, -0.0272940956056118, 0.6758887767791748, -0.2959373891353607, -0.38989314436912537, -0.1522301733493805, 0.10097365081310272, 0.13610562682151794, -0.016294730827212334, -0.31559741497039795, -0.4964532256126404, 0.11172434687614441, -0.5025818943977356, 0.125878781080...
``` declare begin for i in (select * from emp) loop if i.sal=1300 then update emp set sal=13000; end if; end loop; end; ``` This code is updating all the records with salary 13000. Instead i want to update records having salary 1300 to the value 13000. Can you tell where I made a mista...
[ 0.029974110424518585, 0.04487147554755211, 0.4050370156764984, -0.10885675996541977, 0.17069436609745026, 0.021250635385513306, 0.2109915316104889, -0.5403113961219788, -0.4475364685058594, -0.505939781665802, 0.4172217845916748, 0.6973772048950195, -0.030800431966781616, 0.376880019903183...
to update it to 15000.. Whenever you can do the update with one single statement, you should do that instead of using a loop. You'll get a very huge performance gain that way; or, the other way round, updates in a loop cost you a lot of performance. If you really really have to use a loop, of course you need a where c...
[ 0.25964540243148804, 0.04574983939528465, 0.20973359048366547, 0.0503867082297802, 0.07004322111606598, 0.01716119982302189, 0.1880878210067749, -0.3704100251197815, -0.13521765172481537, -0.5983270406723022, 0.07494200021028519, 0.7555972933769226, -0.345091313123703, 0.017205359414219856...
(select rowid, emp.* from emp) loop if i.sal=1300 then update emp set sal=13000 where rowid=i.rowid; end if; end loop; end; ``` Another possibility would be using an explicit cursor and the "update ... where current of *cursorname*" syntax.
[ -0.4110492467880249, -0.19782251119613647, 0.7607190608978271, -0.28253650665283203, -0.0609591118991375, 0.022993747144937515, 0.20571354031562805, -0.6436653733253479, -0.27485260367393494, -0.5135228037834167, -0.10328582674264908, 0.5385810136795044, -0.20385417342185974, 0.16647230088...
I am just starting out on Silverlight using version 2.0. I wanted to show a few data grids on the page and got this going OK by dropping each into a grid cell. I then thought I would try adding a grid splitter using the following markup: ``` <UserControl xmlns:basics="clr-namespace:System.Windows.Controls;assembly=Sys...
[ 0.09044000506401062, 0.06811832636594772, 0.6340299248695374, -0.28205007314682007, -0.331523060798645, -0.2007354497909546, -0.28451207280158997, -0.2742072641849518, -0.30336374044418335, -0.589285671710968, 0.2557080388069153, 0.207952618598938, -0.4201401174068451, -0.09673063457012177...
<ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <basics:GridSplitter Grid.Ro...
[ -0.2716424763202667, -0.31002867221832275, 0.3931026756763458, -0.1958627998828888, -0.08185780048370361, 0.35486504435539246, -0.21010760962963104, -0.5757957100868225, -0.5234277248382568, -0.9049844741821289, -0.19012802839279175, 0.49819350242614746, 0.07162056863307953, 0.058217987418...
<data:DataGrid Name="TRGrid" Grid.Row="0" Grid.Column="2"> </data:DataGrid> <data:DataGrid Name="BLGrid" Grid.Row="1" Grid.Column="0"> </data:DataGrid> <data:DataGrid Name="BRGrid" Grid.Row="1" Grid.Column="2"> </data:DataGrid> </Grid> </UserControl> ``` I expected to be ab...
[ -0.4047892689704895, -0.13002927601337433, 0.6073184609413147, -0.23679286241531372, -0.17739278078079224, 0.3026348054409027, -0.12071031332015991, -0.5530205965042114, -0.23155172169208527, -0.7405087947845459, -0.0464329719543457, 0.47699472308158875, -0.4153423011302948, 0.201097726821...
the right edge of column 0 if you put the splitter in column 0. You can add a small margin to the grids in the left-hand side so that you don't lose the last 5 pixels. ``` <Grid x:Name="LayoutRoot" Background="White"> <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"/> <!--<ColumnDefinition Wid...
[ -0.4649761915206909, -0.3528333008289337, 0.58291095495224, -0.18209750950336456, 0.008165296167135239, 0.23588071763515472, -0.18183647096157074, -0.32871147990226746, -0.02955377846956253, -0.8648797273635864, -0.04332984238862991, 0.44116756319999695, -0.04861332103610039, -0.0869221612...
<data:DataGrid Name="TLGrid" Grid.Row="0" Grid.Column="0" /> <data:DataGrid Name="BLGrid" Grid.Row="1" Grid.Column="0"/> <!-- Moved the grid splitter to column 0 --> <basics:GridSplitter Grid.RowSpan="2" Grid.Row="0" Grid.Column="0" Width="5" /> <data:DataGrid Name="TRGrid" Grid.Row="0" Grid.Column="2...
[ -0.6501781344413757, -0.4600197672843933, 0.6960811018943787, -0.05416829138994217, -0.043600697070360184, 0.26767483353614807, -0.24626463651657104, -0.5294935703277588, -0.5237066745758057, -0.8348290920257568, -0.1757138967514038, 0.6358476281166077, -0.03528305143117905, 0.134346485137...
I have a C# web service which currently communicates with a Flex app using XML. It's not streaming data or anything, but still I'd like to lower the overhead involved. I have two questions: 1) would I see any benefit from using a technology like FluorineFX or WebORB in terms of reducing load **on the server**? The Fle...
[ 0.5711929202079773, -0.015049357898533344, 0.02090364322066307, 0.1394384354352951, 0.02912287227809429, 0.05523136630654335, -0.1764141023159027, 0.04102228954434395, -0.26734286546707153, -0.8318765163421631, 0.16033799946308136, 0.4014732241630554, -0.1341610997915268, 0.007444917224347...