text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
} } public override bool CanSeek { get { return _backing.CanSeek; } } public override bool CanWrite { get { return _backing.CanWrite;
[ 0.14044255018234253, -0.024273810908198357, 0.23213976621627808, -0.1432901918888092, 0.2796269655227661, -0.293617844581604, 0.22781570255756378, 0.02182728424668312, 0.1262088567018509, -0.21558088064193726, -0.48955610394477844, 0.7189954519271851, -0.21959169209003448, -0.1234385520219...
} } public override void Flush() { _backing.Flush(); } public override long Length { get { return _backing.Length; } } public override long Position {
[ -0.0809023454785347, -0.6965068578720093, 0.3040698766708374, -0.1375146210193634, 0.31688565015792847, 0.21592020988464355, -0.03735624626278877, -0.23091809451580048, -0.1446780264377594, -0.13285113871097565, -0.060547031462192535, 0.6924371719360352, -0.07740563899278641, -0.1369532197...
get { return _backing.Position; } set { _backing.Position = value; } } public override int Read(byte[] buffer, int offset, int count) { return _backing.Read(buffer, offset,
[ -0.11273171752691269, -0.3685714304447174, 0.3276844322681427, -0.004018762148916721, 0.3305409550666809, 0.15614739060401917, 0.10896697640419006, -0.33089426159858704, -0.11102995276451111, -0.2690860629081726, -0.4543638229370117, 0.6255528330802917, -0.2287588119506836, -0.075958572328...
count); } public override long Seek(long offset, SeekOrigin origin) { return _backing.Seek(offset, origin); } public override void SetLength(long value) { _backing.SetLength(value); } public override void Write(byte[] buffer, int offset, int count) { _backi...
[ 0.4527588486671448, -0.20395243167877197, 0.5308259129524231, -0.2677091062068939, 0.26967567205429077, 0.23174944519996643, -0.09722928702831268, -0.46443697810173035, -0.09543924778699875, -0.041864264756441116, -0.17483316361904144, 0.6448582410812378, -0.3083425760269165, 0.27566874027...
to the stream. /// </summary> /// <typeparam name="T">The type of value.</typeparam> /// <param name="value">The value.</param> /// <returns>The number of bytes written to the stream.</returns> public int Write<T>(T value) { // An T[] would be a reference type, and alot easier to work wi...
[ 0.3732765316963196, -0.2568145990371704, 0.36421310901641846, 0.12538479268550873, -0.017186541110277176, 0.4044627547264099, 0.12498433142900467, -0.7580219507217407, -0.2635296881198883, -0.48357322812080383, -0.1003514751791954, 0.30105695128440857, -0.4115874171257019, 0.02893963083624...
fail with types of unknown size. Try and see... int s = Marshal.SizeOf(typeof(T)); // Create a temp array. byte[] target = new byte[s]; // Grab a handle of the array we just created, pin it to avoid the gc // from moving it, then copy bytes from our stream into the address ...
[ 0.3411358594894409, -0.057538218796253204, 0.22841522097587585, -0.07523525506258011, 0.21256360411643982, -0.08215437084436417, 0.568539023399353, -0.5330291986465454, -0.04159114509820938, -0.5971640348434448, -0.1060578003525734, 0.3819098472595215, -0.4198237359523773, 0.02400461211800...
GCHandle handle = GCHandle.Alloc(t, GCHandleType.Pinned); Marshal.Copy(handle.AddrOfPinnedObject(), target, 0, s); // ?? Problem // Write to the stream. Write(target, 0, s); return s; } /// <summary> /// Reads a value type from the stream. /// </summary> /// <typep...
[ 0.12693090736865997, -0.09557376056909561, 0.559232234954834, -0.28668421506881714, -0.3278421461582184, 0.09861812740564346, 0.4487762451171875, -0.5325756072998047, -0.25880828499794006, -0.5829377770423889, -0.06507950276136398, 0.10777299851179123, -0.6893044114112854, 0.26902833580970...
public T Read<T>() { // An T[] would be a reference type, and alot easier to work with. T[] t = new T[1]; // Marshal.SizeOf will fail with types of unknown size. Try and see... int s = Marshal.SizeOf(typeof(T)); byte[] target = new byte[s]; // Make sure there is eno...
[ 0.2879464030265808, -0.216403529047966, 0.01934158429503441, 0.12683281302452087, 0.2616373300552368, -0.20678506791591644, 0.5006657838821411, -0.5875725746154785, -0.18346427381038666, -0.6861207485198975, -0.3362697660923004, 0.48618173599243164, -0.43533825874328613, -0.028759902343153...
if (Read(target, 0, s) != s) throw new InvalidDataException("Not enough data."); // Grab a handle of the array we just created, pin it to avoid the gc // from moving it, then copy bytes from our stream into the address // of our array. GCHandle handle = GCHandle.Alloc(t, GCH...
[ 0.24274347722530365, -0.2721993923187256, 0.4894995391368866, -0.11830304563045502, 0.11316262930631638, -0.09708721935749054, 0.24410222470760345, -0.366521954536438, -0.046081408858299255, -0.5147018432617188, -0.11620211601257324, 0.2840867340564728, -0.5503895878791809, 0.2646020650863...
Marshal.Copy(target, 0, handle.AddrOfPinnedObject(), s); // Return the first (and only) element in the array. return t[0]; } protected override void Dispose(bool disposing) { if (disposing && _ownsStream) _backing.Dispose(); base.Dispose(disposing); } } ```
[ 0.6178385615348816, 0.02294733189046383, 0.2508104145526886, -0.022268515080213547, 0.48709017038345337, -0.4081980288028717, 0.18271924555301666, -0.9156643152236938, -0.22986456751823425, -0.18071605265140533, -0.15108801424503326, 0.5314251184463501, -0.24293354153633118, 0.164492711424...
I just did a `git init` on the root of my new project. Then I created a `.gitignore` file. Now, when I type `git status`, **.gitignore** file appears in the list of untracked files. Why is that? The `.gitignore` file should be in your repository, so it should indeed be added and committed in, as `git status` suggests...
[ 0.2872830927371979, 0.05574231222271919, 0.4032626450061798, 0.23822684586048126, 0.027429385110735893, -0.052397970110177994, 0.0752498134970665, 0.18331299722194672, -0.40679696202278137, -0.8562089204788208, -0.12397558242082596, 0.3845352530479431, -0.19889864325523376, 0.2144711166620...
want it to be committed. However, in that case it's probably better to add the ignores to `.git/info/exclude`, a special checkout-local file that works just like .gitignore but does not show up in "git status" since it's in the `.git` folder. See also <https://help.github.com/articles/ignoring-files>
[ 0.8250406980514526, 0.1658022701740265, 0.06611046940088272, 0.059361446648836136, 0.19347840547561646, -0.37152299284935, 0.5805587768554688, 0.37385040521621704, -0.5971120595932007, -0.21770642697811127, -0.09253515303134918, 0.29486700892448425, -0.7206838130950928, 0.14704085886478424...
Is there a way to elucidate an obfuscated javascript code block??? You can try these - <http://elfz.laacz.lv/beautify/> <http://www.brianfolts.com/un/> - Works only in FF
[ 0.23024903237819672, -0.01402205042541027, 0.4141328036785126, 0.058733027428388596, -0.19090506434440613, -0.021297015249729156, 0.626252293586731, -0.28015995025634766, -0.556084156036377, -0.43831488490104675, -0.0765199363231659, 0.6630001068115234, -0.21741154789924622, -0.32031881809...
How to redo the declaration of that C++ template function in C#? ``` template <class type> void ReadArray(type * array, unsigned short count) { int s = sizeof(type) * count; if(index + s > size) throw(std::exception("Error 102")); memcpy(array, stream + index, s); index += s; } ``` Whe...
[ 0.3323938250541687, -0.3755488693714142, 0.3283340036869049, -0.2879105806350708, 0.015622167848050594, 0.04623296484351158, 0.29335227608680725, -0.5440086722373962, -0.06412127614021301, -0.4909248948097229, -0.18704837560653687, 0.7937809228897095, -0.6238491535186768, 0.077074088156223...
ReadArray(<T> Array inputarray) // error { ... } ``` Thanks! Another conservative question - how to append the bytes into that array(memcpy()),should i use a pointer? You use it like this: ``` public static void ReadArray<T>(T[] inputArray) { ... } ``` You can use the `Array.Copy` method to cop...
[ 0.3938525319099426, -0.037177350372076035, 0.21916189789772034, 0.039518941193819046, -0.31893110275268555, -0.015765022486448288, 0.048471562564373016, -0.1925261914730072, -0.19223131239414215, -0.6473839282989502, 0.1705971509218216, 0.8061955571174622, -0.5113304853439331, 0.1488659828...
bytes from an array into a long. You could also use unsafe code with pointers to do the "blind copy", but you should save that until you actually run into performance problems using safe methods.
[ 0.3676195740699768, -0.2148054540157318, -0.08084873855113983, 0.2832720875740051, -0.08603747189044952, -0.17965498566627502, 0.0533301904797554, -0.1781223714351654, -0.2237212210893631, -0.37298133969306946, 0.18206778168678284, 0.3857190012931824, -0.27879586815834045, 0.21123753488063...
There are various ways to take screenshots of a running application in Windows. However, I hear that an application can be tailored such that it can notice when a screenshot is being taken of it, through some windows event handlers perhaps? Is there any way of taking a screenshot such that it is impossible for the appl...
[ 0.41826891899108887, -0.14425070583820343, 0.08051148802042007, 0.23392000794410706, -0.06705426424741745, -0.0746355876326561, -0.006565316114574671, 0.15539516508579254, -0.44263097643852234, -0.7050986886024475, 0.013967396691441536, 0.6085009574890137, -0.35384711623191833, -0.09437038...
being taken of it* Complete nonsense. Don't repeat what kids say... Read MSDN about screenshots.
[ 0.484738826751709, -0.4270898699760437, -0.1868220865726471, 0.40679922699928284, -0.050827834755182266, -0.3919537365436554, 0.2678694725036621, 0.3544158935546875, -0.05936786159873009, -0.22631695866584778, 0.29046717286109924, 0.14106103777885437, -0.24725723266601562, 0.01620207354426...
I'm trying to overwrite a `__init__` method, but when I call the super method the attributes created in that method are not available. I can see that it's not an inheritance problem since `class B` still has the attributes available. I think the code sample will explain it better :-) ``` Python 2.5.2 (r252:60911, Oct...
[ -0.02025456912815571, 0.326091468334198, 0.16942118108272552, -0.2268683761358261, -0.0042097438126802444, -0.06045157462358475, 0.480898380279541, -0.28685468435287476, -0.1945122629404068, -0.26383084058761597, -0.24924929440021515, 0.7731165289878845, -0.4527517557144165, 0.059140045195...
'value'} >>> class B(A): ... pass ... >>> b = B('b', 'c', key_b='value_b') >>> print b.args, b.kwargs ('b', 'c') {'key_b': 'value_b'} >>> class C(A): ... def __init__(self, *args, **kwargs): ... print 'class C' ... super(A, self).__init__(*args, **kwargs) ... >>> c = C('c', 'd', key_c='value_C') class C >...
[ -0.2593204379081726, 0.09418706595897675, 0.3797660768032074, -0.1164364144206047, 0.1799507737159729, 0.2476331740617752, 0.2904123067855835, -0.4364795982837677, -0.2720685303211212, -0.5110933780670166, -0.2522600293159485, 0.4746093451976776, -0.24347059428691864, 0.09535533934831619, ...
call last): File "<stdin>", line 1, in <module> AttributeError: 'D' object has no attribute 'args' >>> ``` Your call to the superclass needs to use its own type ``` super(D, self).__init__(*args,**kwargs) ``` rather than ``` super(A... ``` I believe calling `super(A, self).__init__` will call the superclass ...
[ -0.32990360260009766, -0.256924569606781, 0.5010749697685242, -0.2135661542415619, -0.20849229395389557, 0.08845531940460205, 0.46243956685066223, -0.1399529129266739, -0.1739674210548401, -0.4330862760543823, -0.4210003614425659, 0.6356222629547119, -0.415162056684494, 0.30231773853302, ...
When I start to learn a new language, I always feel like I'm not doing it the practical, standard way. So here's a question regarding jQuery and if what I'm doing is acceptable. I have 3 images. ``` <img src="del.png" class="delete user" /> <img src="del.png" class="delete event" /> <img src="del.png" class="delete r...
[ 0.09646283835172653, -0.11692580580711365, 0.5536596179008484, -0.16445253789424896, -0.09177622944116592, 0.05146448314189911, 0.32159391045570374, -0.4436171054840088, -0.3043987452983856, -0.8406537175178528, -0.03730760142207146, 0.7137325406074524, -0.28464019298553467, -0.29562279582...
if( $(this).hasClass('recipe') ) { action = 'recipe' } // I then use ajax, send the action as $_POST to the PHP script // and it tells PHP what to delete. // Doing it this way, I don't have to use 3 onclick functions and 3 ajax functions. }); ``` I agree with @Tommi, you are keeping yourself fr...
[ 0.19606517255306244, 0.026487011462450027, 0.309184730052948, -0.14661037921905518, 0.06147148087620735, 0.043725788593292236, 0.41772618889808655, -0.5427623391151428, -0.2399129718542099, -0.48557522892951965, 0.0035606485325843096, 0.5950976014137268, -0.15702760219573975, -0.1744633913...
ajax function and calling it from 3 separate locations). If this works for you and is not confusing, I don't think there's anything wrong with it. In fact, there are a number of ways to do what you're trying to do in an ugly and inelegant way, but this isn't one of them.
[ 0.21732297539710999, -0.02471451461315155, 0.08853183686733246, 0.33324262499809265, -0.21411453187465668, -0.20802225172519684, 0.40249043703079224, 0.16306297481060028, -0.035493720322847366, -0.7437089681625366, 0.2575826346874237, 0.5064713954925537, -0.22887670993804932, -0.1596131920...
I am using Socket communication in one of my Java applications.As I know if the program meets any abnormal termination the listening ports does not get closed and the program cannot be started back because it reports "Port already open.." Do I have anyway to handle this problem? What is the general way used to handle ...
[ 0.41096681356430054, 0.26488903164863586, 0.10918727517127991, 0.03154570981860161, -0.0028678136877715588, -0.42576271295547485, 0.5763552784919739, 0.06734684109687805, -0.14003564417362213, -0.6232824921607971, -0.13184431195259094, 0.8484766483306885, -0.10446621477603912, 0.5312178730...
your program exits so it can handle any outstanding connection attempts. You may notice that if you shut down your program abnormally, then come back some time later it will start up just fine. If you want to avoid this delay time, you can use `setsockopt()` to configure the socket with the SO\_REUSEADDR option. This ...
[ 0.09738839417695999, -0.09098141640424728, 0.425534725189209, -0.05021189898252487, 0.2443777322769165, -0.3092823624610901, 0.6432382464408875, -0.09037425369024277, -0.22030037641525269, -0.7080953121185303, -0.3230501413345337, 0.6586605310440063, -0.3831355571746826, 0.0445287004113197...
I am trying to do a mysql dump via php. This is the code ``` $backupFile = $table. "-". date("Y-m-d-H:i:s") . '.gz'; //Command nog aanpassen.... $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; //$status = system($command); echo $backupFile ."<br>"; $st...
[ 0.15252748131752014, 0.2767574191093445, 0.3027825951576233, -0.2506254315376282, 0.03730858117341995, 0.025930529460310936, 0.6046069264411926, -0.10022517293691635, -0.23979556560516357, -0.43245729804039, -0.10355355590581894, 0.48243898153305054, -0.3849301338195801, 0.2271609008312225...
but it looks like your password passing parameter is incorrect. If you use -p you need to have the password right next to it, without whitespace, like so: ``` $command = "mysqldump --opt -h $dbhost -u $dbuser -p$dbpass $dbname | gzip > $backupFile"; ``` Or use the long --password=$dbpass. For example: ``` $com...
[ -0.38753265142440796, 0.09608286619186401, 0.3060688078403473, -0.005870578344911337, 0.007492802105844021, 0.007530597038567066, 0.45813629031181335, -0.12211474031209946, -0.10586190223693848, -0.9044567346572876, -0.5794692635536194, 0.6123185753822327, -0.3529188930988312, 0.1159342303...
omit the password value following the --password or -p option on the command line, you are prompted for one.
[ 0.015902133658528328, 0.004674817435443401, 0.13529111444950104, 0.01944202370941639, 0.3883623480796814, -0.1284026950597763, 0.3208902180194855, 0.39802223443984985, -0.23340584337711334, -0.530595064163208, -0.676963746547699, 0.6197778582572937, -0.22911430895328522, 0.0697217583656311...
I'm writing a simple accounting program consists of several C# winform clients and a java server app that read/write data into a database. One of the requirement is that all C# clients should receive updates from the server. For example, if user a create a new invoice from his C# client, other users should see this new...
[ 0.5572372078895569, 0.48524364829063416, 0.37434396147727966, -0.2647522985935211, -0.20424170792102814, -0.032263852655887604, 0.1050466001033783, -0.10926192253828049, 0.06166103109717369, -0.4981493055820465, 0.258727490901947, 0.5200455784797668, -0.36970993876457214, -0.21245983242988...
method so that updates can be pushed to C# client. I will create different topics like newInvoice, cancelInvoice, etc in order to differentiate the message type. Each message will simply contains the object encoded in JSON. But it seems to me that this involves quite a lot of work. Given that my user base is very smal...
[ 0.2768918573856354, 0.007534617558121681, 0.28402623534202576, 0.03798505291342735, -0.29096922278404236, 0.0056845094077289104, 0.20117056369781494, -0.15780629217624664, -0.3422451317310333, -0.45150211453437805, 0.14222761988639832, 0.677304744720459, -0.46404021978378296, -0.0905380174...
to some simple solutions. The *simplest* approach here is often to simply use a poll - i.e. have the clients query for data every (your time interval). That avoids a whole family of issues (firewalls, security, line-of-sight, resolution, client-tracking, etc). With WCF, you can have callbacks on duplex channels (allow...
[ 0.37829291820526123, -0.2134263515472412, 0.5765312314033508, 0.34253954887390137, -0.3095199763774872, -0.11535423994064331, 0.2190476804971695, -0.3442581295967102, -0.3364122807979584, -0.8138502240180969, 0.18504510819911957, 0.5267901420593262, -0.2259175032377243, 0.07297340035438538...
details vary per project, of course. Another option that you might want to look at is ADO.NET Sync Services; this does much of what you ask for, for keeping a local copy of the database up to date with the server - but has a few complexities of its own. This is available (IIRC) in the "Local Database Cache" VS templat...
[ 0.5140234231948853, -0.020012561231851578, 0.18962301313877106, 0.1620502471923828, -0.04565799608826637, -0.2178661972284317, 0.12903007864952087, 0.13396704196929932, -0.10012305527925491, -0.7368518710136414, -0.0005580293945968151, 0.359955370426178, -0.07874363660812378, 0.09990085661...
What advantages do attributes have over the use of comments (or xml comments at the signature level)? I do remember seeing a thread in the C# section of this site somewhere, but I can't find it now. Also, is it possible to apply an attribute to a specific parameter in a method (this was an interview question I read so...
[ 0.48786869645118713, 0.03470531105995178, -0.19716215133666992, 0.43606066703796387, -0.3068186640739441, 0.06012079864740372, -0.09588486701250076, 0.13563594222068787, -0.2943609952926636, -0.6976738572120667, 0.30661463737487793, 0.7243411540985107, 0.10096429288387299, -0.2519866824150...
adding attributes to. Yes you can use attributes against parameters, but in my experience this makes for some complicated code, consider redesigning so your params can be grouped into a struct or class. Here's a link about attributes: <http://en.csharp-online.net/Attributes> Hope this helps
[ 0.35140296816825867, -0.007521271239966154, 0.005957384128123522, 0.3798597455024719, -0.2210243046283722, 0.10561414808034897, 0.2076074481010437, -0.07256415486335754, -0.5168752670288086, -0.655421257019043, 0.23375271260738373, 0.4755372405052185, -0.004117373377084732, -0.092498496174...
I am currently developing on an advertising system, which have been running just fine for a while now, apart from recently when our views per day have shot up from about 7k to 328k. Our server cannot take the pressure on this anymore - and knowing that I am not the best SQL guy around (hey, I can make it work, but not ...
[ 0.5091479420661926, 0.404760479927063, 0.4241959750652313, 0.07777535170316696, -0.13197505474090576, -0.176408588886261, 0.2500919699668884, 0.45161759853363037, -0.1984831839799881, -0.6894760131835938, 0.5032185912132263, 0.5320681929588318, 0.09594601392745972, 0.10289579629898071, 0...
just to see the light :). As it is at the moment, when an advert is supposed to be shown a PHP script is called, which in return calls a stored procedure. This stored procedure does several checks, it tests up against our customer database to see if the person showing the advert (given by a primary key id) is an actua...
[ 0.9649097919464111, 0.15817366540431976, 0.7258073091506958, -0.04357101023197174, -0.03938337415456772, -0.0907878652215004, 0.10684718191623688, 0.11803145706653595, -0.10594724863767624, -0.24241679906845093, 0.17837539315223694, 0.3090236186981201, -0.13387243449687958, -0.215123355388...
- and lest step calls a separate stored procedure to test if the advert is allowed to be shown (is the campaign expired by either date or number of adverts allowed to show?) and if the customer has access to it (we got 2 access systems running, a blacklist and a whitelist one) and lastly what type of campaign we're run...
[ 0.701424777507782, 0.12789379060268402, 0.6790912747383118, 0.1518811285495758, -0.002456202171742916, -0.22842898964881897, 0.08973570168018341, -0.36724644899368286, 0.2163897603750229, -0.23891396820545197, 0.10684406757354736, 0.34360405802726746, -0.26058173179626465, -0.0532701350748...
@advertId bigint, @localeId int, @ip varchar(15), @ipIsUnique bit, @success bit OUTPUT, @campaignId bigint OUTPUT, @advert varchar(500) OUTPUT, @advertWidth int OUTPUT, @advertHeight int OUTPUT ) AS BEGIN SET NOCOUNT ON; DECLARE @unique bit DECLARE @approved bit DECL...
[ 0.13670355081558228, 0.11601675301790237, 0.8393521904945374, -0.09668495506048203, -0.244316965341568, 0.04362339898943901, 0.018905021250247955, -0.46340593695640564, 0.18512220680713654, -0.16819100081920624, 0.10760021954774857, 0.6086236238479614, -0.4280623495578766, -0.1237682998180...
SELECT @success = 1, @advert = NULL, @advertHeight = NULL, @advertWidth = NULL --- Must be valid publisher, ie exist and actually be a publisher IF dbo.IsValidPublisher(@publisherId, @localeId) = 0 BEGIN SELECT @success = 0 RETURN 0 END --- Must be a valid advert ...
[ 0.11047715693712234, 0.1331377774477005, 0.9721837043762207, 0.20198026299476624, 0.006261585745960474, -0.41075369715690613, 0.1324595808982849, -0.31233271956443787, 0.12148033082485199, -0.20636068284511566, -0.25957751274108887, 0.459507018327713, -0.16938959062099457, 0.12506783008575...
@advert OUTPUT, @advertUrl OUTPUT, @advertWidth OUTPUT, @advertHeight OUTPUT IF @return = 0 BEGIN SELECT @success = 0 RETURN 0 END EXEC CanAddStatToAdvert 2, @advertId, @publisherId, @ip, @ipIsUnique, @success OUTPUT, @unique OUTPUT, @approved OUTPUT, @publisherEarning...
[ 0.14402717351913452, 0.17441655695438385, 0.8519678115844727, 0.011986086145043373, -0.36828842759132385, -0.15158025920391083, 0.0031453394331038, -0.24305285513401031, 0.28915515542030334, -0.40987828373908997, -0.15685656666755676, 0.3718092739582062, -0.3588554859161377, -0.29631799459...
INSERT INTO dbo.Stat (AdvertId, [Date], Ip, [Type], PublisherEarning, AdvertiserCost, [Unique], Approved, PublisherCustomerId, OriginalStatus) VALUES (@advertId, GETDATE(), @ip, 2, @publisherEarning, @advertiserCost, @unique, @approved, @publisherId, @originalStatus) END END ``` --- IsValidPublis...
[ -0.2520243227481842, -0.052454765886068344, 0.44511768221855164, -0.13010631501674652, 0.09492677450180054, 0.2561579644680023, -0.020090054720640182, -0.40101179480552673, 0.33881664276123047, -0.5307894945144653, -0.30933699011802673, 0.37563785910606384, -0.2253352701663971, 0.226443499...
AND Deleted = 0 AND IsApproved = 1 AND IsBlocked = 0 AND LocaleId = @localeId) IF @customerType = 2 SET @result = 1 ELSE SET @result = 0 RETURN @result END ``` -- Fetch advert details ``` CREATE PROCEDURE [dbo].[FetchAdvertDetails] ( @advertId bigint, @localeId in...
[ 0.3457696735858917, -0.0817561149597168, 0.8571193218231201, -0.17963308095932007, 0.16803652048110962, 0.19032397866249084, 0.17208817601203918, -0.4269271790981293, 0.21519775688648224, -0.31926462054252625, -0.2057369500398636, 0.5137296915054321, -0.29108673334121704, 0.101185865700244...
@advertUrl varchar(500) OUTPUT, @advertWidth int OUTPUT, @advertHeight int OUTPUT ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT @advert = T1.Advert, @advertUrl = T1.TargetUrl, @advertWidth = T1.Widt...
[ 0.3852742910385132, -0.23556756973266602, 0.8317824006080627, -0.33530956506729126, -0.32166650891304016, 0.45760467648506165, 0.15440191328525543, -0.5222523808479309, 0.23756909370422363, -0.3458712100982666, 0.04913856089115143, 0.6683614253997803, -0.2266291230916977, -0.31838104128837...
T2.Deleted = 0 AND T2.[Status] <> 1 IF @advert IS NULL RETURN 0 ELSE RETURN 1 END ``` --- CanAddStatToAdvert ``` CREATE PROCEDURE [dbo].[CanAddStatToAdvert] @type smallint, --- Type of stat to add @advertId bigint, @publisherId bigint, @ip varchar(15), @ipIsUnique bit, ...
[ -0.06204860657453537, -0.12482179701328278, 0.643890917301178, 0.09306591004133224, -0.146283820271492, 0.05879038944840431, -0.05264316126704216, -0.39937785267829895, -0.12698060274124146, -0.2475225180387497, -0.09658107906579971, 0.5449961423873901, -0.2914239764213562, -0.023082373663...
OUTPUT, @originalStatus smallint OUTPUT, @campaignId bigint OUTPUT AS BEGIN SET NOCOUNT ON; DECLARE @campaignLimit int DECLARE @campaignStatus smallint DECLARE @advertsLeft int DECLARE @campaignType smallint DECLARE @campaignModeration smallint DECLARE @count int SELECT @origina...
[ 0.30698296427726746, -0.09551876038312912, 0.5080373883247375, -0.2828686833381653, -0.37724873423576355, 0.15361642837524414, 0.05631164461374283, -0.679286003112793, 0.09251784533262253, -0.22140072286128998, -0.03479471802711487, 0.10177894681692123, -0.47806668281555176, -0.24341218173...
IF @campaignId IS NULL BEGIN SELECT @success = 0 RETURN END SELECT @campaignLimit = Limit, @campaignStatus = [Status], @campaignType = [Type], @publisherEarning = PublisherEarning, @advertiserCost = AdvertiserCost, @campaignModeration = ModerationType FROM dbo.Campaign W...
[ 0.13912361860275269, -0.12623758614063263, 0.8754435777664185, -0.09290783852338791, -0.18938572704792023, -0.011512048542499542, 0.0489557608962059, -0.44808703660964966, 0.1871480494737625, -0.4280136525630951, -0.14581653475761414, 0.29179924726486206, -0.3646763563156128, -0.1221692860...
@campaignType = 2) AND (@type = 1)) -- if not a click or view type, then type must match the campaign (ie, only able to do leads on lead campaigns, no isales or etc), click and view campaigns however can do leads too BEGIN SELECT @success = 0 RETURN END -- Take advantage of ...
[ 0.21398085355758667, -0.24844789505004883, 0.5363704562187195, 0.1814824789762497, -0.13092546164989471, -0.25927284359931946, 0.2997704744338989, -0.370085209608078, -0.06173503026366234, -0.15419305860996246, -0.13202248513698578, 0.5570065975189209, -0.30918553471565247, -0.139302536845...
touched if there is a record, -- which is supposed to override the existing one, if there is one SELECT @publisherEarning = Earning FROM dbo.MapCampaignPublisherEarning WHERE CanpaignId = @campaignId AND PublisherId = @publisherId IF @campaignStatus = 1 BEGIN SELECT @success = 0 ...
[ -0.08975879102945328, -0.08331998437643051, 0.8270573616027832, 0.10201280564069748, -0.13095158338546753, -0.1925777941942215, 0.12759025394916534, -0.3214394748210907, -0.03786731883883476, -0.6478990316390991, 0.12858562171459198, 0.18308044970035553, -0.23204977810382843, -0.2657943964...
BEGIN SELECT @advertsLeft = AdvertsLeft FROM dbo.Campaign WHERE Id = @campaignId IF @advertsLeft < 1 BEGIN SELECT @success = 0
[ 0.20118066668510437, 0.018202830106019974, 0.6443614959716797, -0.246730774641037, -0.32043397426605225, -0.045441292226314545, -0.01487958524376154, -0.5658109784126282, -0.037720926105976105, -0.3504036068916321, -0.33321529626846313, 0.18716219067573547, -0.3748292028903961, -0.30353581...
RETURN END END IF @campaignModeration = 0 -- blacklist BEGIN SELECT @count = COUNT([Status]) FROM dbo.MapCampaignModeration WHERE CampaignId = @campaignId AND PublisherId = @publisherId AND [Status] = 3 IF @count > 0
[ -0.1144963875412941, -0.13503816723823547, 0.6744053363800049, -0.05507812649011612, -0.2625196576118469, -0.2507864236831665, 0.0863092839717865, -0.5482202768325806, -0.04976119101047516, -0.4994341731071472, -0.16039599478244781, 0.2199261635541916, -0.34408333897590637, -0.040654357522...
BEGIN SELECT @success = 0 RETURN END END ELSE -- whitelist BEGIN SELECT @count = COUNT([Status])
[ 0.0717676505446434, -0.20460160076618195, 0.2741280794143677, -0.26557737588882446, 0.37437814474105835, -0.2645382285118103, 0.2814704477787018, -0.7057048082351685, 0.036952029913663864, -0.08179191499948502, -0.15504032373428345, 0.6914960741996765, -0.2792750895023346, -0.0750072374939...
FROM dbo.MapCampaignModeration WHERE CampaignId = @campaignId AND PublisherId = @publisherId AND [Status] = 2 IF @count < 1 BEGIN SELECT @success = 0 RETURN
[ -0.03418612852692604, -0.2343320995569229, 0.6991598010063171, 0.05563899129629135, -0.25451502203941345, -0.32381120324134827, 0.12196424603462219, -0.530521035194397, -0.1538684368133545, -0.6764134168624878, -0.23090963065624237, 0.16281749308109283, -0.3226296603679657, -0.228813380002...
END END IF @ipIsUnique = 1 BEGIN SELECT @unique = 1 END ELSE BEGIN IF (SELECT COUNT(T1.Id) FROM dbo.Stat AS T1
[ 0.30214744806289673, -0.2752636969089508, 0.1660643219947815, -0.01487114280462265, -0.030054135248064995, -0.3464984595775604, 0.37646913528442383, -0.7958828210830688, 0.05040399730205536, -0.5206469297409058, -0.06828512251377106, 0.03521987423300743, -0.21838682889938354, 0.37342000007...
INNER JOIN dbo.IQ_Advert AS T2 ON T1.AdvertId = T2.Id WHERE T2.CampaignId = @campaignId
[ 0.22308416664600372, -0.13582204282283783, 0.3917475640773773, -0.10308022797107697, -0.40118518471717834, 0.19160115718841553, 0.4133656322956085, -0.23116102814674377, 0.18133753538131714, -0.5855877995491028, -0.05907606706023216, 0.27826496958732605, -0.3627033829689026, -0.11686208099...
AND T1.[Type] = @type AND T1.[Unique] = 1 AND T1.PublisherCustomerId = @publisherId AND T1.Ip = @ip
[ -0.268999308347702, -0.08038150519132614, 0.45168375968933105, 0.39678797125816345, 0.006761654280126095, -0.13542570173740387, -0.3843643069267273, -0.08081778883934021, -0.19376860558986664, -0.33398547768592834, -0.027077428996562958, 0.018206724897027016, -0.4193497598171234, 0.3234357...
AND DATEADD(SECOND, 86400, T1.[Date]) > GETDATE() ) = 0 SELECT @unique = 1 ELSE BEGIN
[ 0.30021142959594727, -0.29653438925743103, 0.18860650062561035, -0.07612459361553192, 0.31199920177459717, -0.09383644163608551, 0.027512621134519577, -0.4121949076652527, -0.05618326738476753, -0.42577841877937317, -0.11085007339715958, 0.13384366035461426, -0.09610109776258469, 0.3044829...
SELECT @unique = 0, @originalStatus = 1 -- not unique, and set status to be ip conflict END END IF @unique = 0 AND @type <> 0 AND @type <> 2 BEGIN SELECT @unique = 1, @approved = 0 END IF @originalStatus = 0 SELECT @originalStatus =
[ 0.11002857238054276, -0.3298213481903076, 0.40163281559944153, 0.3227382302284241, 0.030391735956072807, -0.3990943133831024, -0.03280894458293915, -0.4414299428462982, 0.017798004671931267, -0.30026283860206604, -0.19130828976631165, 0.19924019277095795, -0.26898640394210815, 0.2369261980...
5 IF @approved = 0 OR @type <> @campaignType BEGIN SELECT @publisherEarning = 0, @advertiserCost = 0 END END ``` I am thinking this needs more than just a couple of indexes thrown in to help it, but rather a total rethinking of how to handle it. I have been heard that running this as a batch wou...
[ 0.42394107580184937, -0.01857554353773594, 0.6912079453468323, 0.06794814020395279, -0.04063405841588974, -0.4036814272403717, 0.0876179188489914, -0.3644161522388458, 0.0680762454867363, -0.5880768895149231, 0.15117189288139343, 0.3105792999267578, -0.08726169168949127, 0.0596018731594085...
nice checks before the actual insert or if I have to give up on some of this. Anyhow, all help would be appreciated, if you need any of the table layouts, let me know :). Thanks for taking the time to look at it :) Make sure to reference tables with the ownership prefix. So instead of: ``` INNER JOIN Campaign AS T2 ...
[ 0.06307774037122726, -0.021722257137298584, 0.33516862988471985, -0.23449023067951202, -0.08149798959493637, -0.03042910248041153, 0.014524238184094429, -0.2881712317466736, -0.48350170254707336, -0.6683486104011536, -0.02993798442184925, 0.5303197503089905, -0.5306364297866821, -0.0883192...
ON T1.CampaignId = T2.Id ``` Run a sample query in SQL Analyzer with "Show Execution Plan" turned on. This might give you a hint as to the slowest part of the query.
[ 0.5034001469612122, -0.143758162856102, 0.39215222001075745, -0.011621549725532532, -0.15716618299484253, -0.29311755299568176, 0.1472318470478058, 0.058987803757190704, 0.020372821018099785, -0.7163076996803284, -0.019809335470199585, 0.402313232421875, -0.5260434746742249, -0.24675016105...
On a page with Ajax event, I want to disable all actions until the Ajax call returns (to prevent issues with double-submit etc.) I tried this by prepending `return false;` to the current onclick events when "locking" the page, and removing this later on when "unlocking" the page. However, the actions are not active an...
[ -0.036305248737335205, -0.22296082973480225, 0.28391382098197937, 0.04271777719259262, -0.15492787957191467, -0.35974031686782837, 0.6957687735557556, 0.06251838803291321, -0.21964827179908752, -0.6347768306732178, -0.21599698066711426, 0.5749980211257935, -0.2794606387615204, -0.094461545...
event handler is the same as it was before, but doesn't work...?!? The code is meant to work with Trinidad in the end, but should work outside as well. ``` <html><head><title>Test</title> <script type="text/javascript"> function lockPage() { document.body.style.cursor = 'wait'; lockElements(document.getElement...
[ 0.17178185284137726, -0.3367360830307007, 0.6785276532173157, -0.22002705931663513, 0.15014803409576416, -0.08677573502063751, 0.17410524189472198, -0.6776211857795715, -0.11579147726297379, -0.29403218626976013, -0.2106369584798813, 0.6650241613388062, -0.27203187346458435, -0.09596268087...
newEvent); el[i].onclick = newEvent; } } } function unlockPage(state) { if (typeof TrRequestQueue == "undefined" || state == TrRequestQueue.STATE_READY) { //alert("unlocking for state: " + state); document.body.style.cursor = 'auto'; unlockElements(document.getElementsByTagName("a")); u...
[ -0.223444402217865, -0.13298872113227844, 0.8085483908653259, -0.31155121326446533, 0.4939230680465698, 0.14562056958675385, 0.5039964318275452, -0.8764824271202087, -0.2114223837852478, -0.6594842076301575, -0.7098920941352844, 0.6597957015037537, -0.11381205916404724, 0.16706052422523499...
el[i].onclick = newEvent; } } } </script> <style type="text/css"> </style> </head> <body> <h1>Page lock/unlock test</h1> <p>Use these actions to lock or unlock active elements on the page: <a href="javascript:lockPage()">lock</a>, <a href="javascript:unlockPage()">unlock</a>.</p> <p>And now some elements:</p...
[ -0.12133203446865082, -0.12619534134864807, 0.6516966223716736, 0.08053238689899445, -0.16547490656375885, -0.10906995087862015, 0.21885032951831818, -0.6862250566482544, -0.29597240686416626, -0.5620349049568176, -0.16963888704776764, 0.6298205852508545, -0.26301342248916626, -0.337174981...
synchronous Ajax etc. Moreover, Ajax is only one scenario where this code should be executed. It's purpose is to prevent the user to double-submit a page/action, which is also relevant for non-Ajax pages where you could kind of doulbe-click on a button. I know that this is not really safe, and it's only meant to be a ...
[ -0.1068427562713623, 0.08888554573059082, 0.1651630848646164, 0.14067034423351288, -0.18809548020362854, -0.31035205721855164, 0.6212211847305298, 0.20530706644058228, -0.021191835403442383, -0.5793492794036865, -0.0834120512008667, 0.647869884967804, -0.7025554180145264, -0.11618688702583...
All your "action" handlers can then start with ``` if (actions_disabled) return false; ``` Much simpler than debugging self-modifying code! Alternatively, to lock your controls you could set: ``` control.disabled="disabled" ``` which will have the bonus of greying them out, making it obvious to the user that th...
[ 0.07799983769655228, -0.20180433988571167, 0.12380820512771606, -0.030435802415013313, -0.05569923296570778, 0.00048370970762334764, 0.42996951937675476, -0.6316522359848022, -0.32125288248062134, -0.45480597019195557, -0.3049439489841461, 0.6194719076156616, -0.4119190275669098, -0.075444...
I am running my c++ application on an intel Xscale device. The problem is, when I run my application offtarget (Ubuntu) with [Valgrind](http://valgrind.org/), it does not show any memory leaks. But when I run it on the target system, it starts with 50K free memory, and reduces to 2K overnight. How to catch this kind o...
[ 0.1360204964876175, 0.20953457057476044, 0.36560437083244324, -0.17066773772239685, -0.0335598886013031, 0.012040741741657257, 0.34568846225738525, 0.1668919026851654, -0.1464979648590088, -0.5806782245635986, -0.21281923353672028, 0.41930142045021057, -0.228465735912323, 0.237938836216926...
you should go over your source by hand and see what might be causing the issue.
[ 0.6010851263999939, 0.28018033504486084, -0.28430795669555664, 0.14386719465255737, 0.049221642315387726, -0.19893650710582733, 0.007222708780318499, 0.15695872902870178, 0.03953446075320244, -0.3310016095638275, 0.28779304027557373, 0.3503243327140808, 0.17741015553474426, -0.001566363614...
I am trying to implement a template function with handles void differently using template specialization. The following code gives me an "Explicit specialization in non-namespace scope" in gcc: ``` template <typename T> static T safeGuiCall(boost::function<T ()> _f) { if (_f.empty()) throw GuiException("F...
[ 0.09413821250200272, -0.272288054227829, 0.27898240089416504, -0.31162029504776, 0.057795342057943344, 0.051179397851228714, 0.30200284719467163, -0.5180270075798035, 0.010843479074537754, -0.7852222323417664, -0.050291758030653, 0.8853153586387634, -0.3757847547531128, 0.18495260179042816...
if (_f.empty()) throw GuiException("Function pointer empty"); { ThreadGuard g; _f(); } } ``` I have tried moving it out of the class (the class is not templated) and into the namespace but then I get the error "Explicit specialization cannot have a storage class". I have read many disc...
[ 0.22249294817447662, -0.2610067129135132, 0.18435314297676086, -0.18324820697307587, 0.07578019797801971, -0.19947390258312225, 0.1026432067155838, -0.0884266123175621, -0.16915151476860046, -0.6089398860931396, -0.009484897367656231, 0.9091836214065552, -0.5781034231185913, 0.294195353984...
of the class brackets: ``` template <typename X> struct Test {}; // to simulate type dependency struct X // class declaration: only generic { template <typename T> static void f( Test<T> ); }; // template definition: template <typename T> void X::f( Test<T> ) { std::cout << "generic" << std::endl; } templat...
[ 0.2941589057445526, -0.09835131466388702, 0.20175471901893616, -0.08520263433456421, -0.2042836844921112, -0.10731036961078644, 0.21909989416599274, -0.5217726826667786, 0.024249522015452385, -0.33592677116394043, -0.3140050172805786, 0.3706301748752594, -0.5010321140289307, 0.371856927871...
outside of the class has a specific meaning different from what you probably want. ``` template <typename X> struct Test {}; // to simulate type dependency template <typename T> void f( Test<T> ) { std::cout << "generic" << std::endl; } template <> void f<void>( Test<void> ) { std::cout << "specific" << std::en...
[ 0.34550899267196655, -0.18271085619926453, 0.1966310441493988, -0.1004786416888237, -0.13289467990398407, -0.1250895857810974, 0.2584824562072754, -0.37360259890556335, 0.025551175698637962, -0.4810050129890442, -0.1663517951965332, 0.36946165561676025, -0.499314546585083, 0.22573442757129...
How do I check if a variable is an array in JavaScript? ``` if (variable.constructor == Array) ``` There are several ways of checking if an variable is an array or not. The best solution is the one you have chosen. ``` variable.constructor === Array ``` This is the fastest method on Chrome, and most likely all oth...
[ 0.14683952927589417, 0.16958226263523102, 0.5796651244163513, 0.05122433975338936, -0.13948258757591248, -0.4847838282585144, 0.3183346390724182, -0.5147523880004883, -0.22116239368915558, -1.040985107421875, -0.19518029689788818, 0.9913731813430786, -0.3531443178653717, -0.156715705990791...
using Chrome 75, shout out to @AnduAndrici for having me revisit this with his question** This last one is, in my opinion the ugliest, and it is one of the ~~slowest~~ fastest. ~~Running about 1/5 the speed as the first example.~~ This guy is about 2-5% slower, but it's pretty hard to tell. Solid to use! Quite impresse...
[ 0.3505217432975769, 0.11189214140176773, 0.3550778329372406, -0.054387178272008896, -0.6266849637031555, -0.07299459725618362, 0.05322772637009621, -0.450682669878006, -0.28134796023368835, -0.8520820140838623, 0.4947003126144409, 0.8603162169456482, -0.33207011222839355, -0.32205778360366...
on performance. Note that checking for numbers does not work as `variable instanceof Number` always returns `false`. **Update: `instanceof` now goes 2/3 the speed!** **So yet another update** ``` Object.prototype.toString.call(variable) === '[object Array]'; ``` This guy is the slowest for trying to check for an Ar...
[ 0.14332857728004456, -0.12154453992843628, 0.11161084473133087, 0.23658263683319092, -0.26651647686958313, -0.2852787375450134, 0.6449632048606873, -0.11843210458755493, -0.19233958423137665, -0.7320441007614136, 0.35378721356391907, 0.7914591431617737, -0.075812928378582, -0.0328871868550...
whenever jsperf comes back online.
[ 0.08633062988519669, -0.33109861612319946, 0.7183100581169128, -0.06371339410543442, -0.03793289512395859, -0.5306777954101562, 0.4011765420436859, 0.3783729374408722, -0.3964938819408417, -0.6347149014472961, -0.4271639883518219, 0.15660178661346436, 0.10927172005176544, 0.068380810320377...
If we need to write a program that works periodically, which way do we prefer? Writing a windows service or writing a console application which works as scheduled task? I would suggest running the process as a scheduled task if you can, and writing a service only if you need to. Services are quite a bit more difficult ...
[ 0.3238074481487274, -0.07801921665668488, 0.2955039441585541, 0.107186459004879, 0.07737481594085693, 0.010790044441819191, 0.16645130515098572, -0.03642332926392555, -0.3419349491596222, -0.7651895880699158, 0.06091916561126709, 0.7284982800483704, -0.084348663687706, 0.08727733045816422,...
home-made scheduler will be * The windows task scheduler offers a number of options that you almost certainly won't attempt to replicate, but may find useful later on * If you build a service, you'd have to recompile the program if you want to change the logic that determines what conditions to run the task under. If y...
[ 0.5738797783851624, 0.055932365357875824, 0.3340769112110138, 0.02438666857779026, 0.2463962584733963, 0.1538386046886444, 0.06603528559207916, 0.08858303725719452, -0.25778186321258545, -1.00004243850708, -0.15776844322681427, 0.5357308983802795, -0.03007529117166996, 0.2991759181022644, ...
is almost certainly the wrong choice.
[ 0.006726325489580631, 0.07567907124757767, 0.14709588885307312, -0.0027716029435396194, 0.22002708911895752, 0.147171288728714, 0.18783597648143768, 0.023242151364684105, 0.07826044410467148, -0.34467384219169617, -0.12900316715240479, 0.11655765771865845, 0.23540456593036652, 0.1469075083...
I have written a small program displaying sounds and images on the screen when pushing any button. I always start it when one of my little kids crawls onto my lap and start hitting the keys, of course, randomly. It works fine except for 2 keys, one of them being the ON/OFF switch, the other being the Windows-key. (the...
[ 0.08093013614416122, 0.07240277528762817, 0.5532218217849731, 0.01790234073996544, 0.2636311650276184, 0.07458840310573578, 0.005288365762680769, 0.2164636105298996, -0.2707996070384979, -0.6797739267349243, -0.2777632474899292, 0.533424973487854, 0.04061922803521156, 0.2226981818675995, ...
if (e.Key == Key.LWin) e.Handled = true; ``` but than the start window is already showing I'm afraid. I have already 1 answer but would very much like to know if there's any wpf-support? I suspect programming the main on/off switch might not be possible? Otherwise, any help there would be welcome too.. You'll need ...
[ 0.010619262233376503, 0.1371825933456421, 0.08556874841451645, 0.23066483438014984, 0.21020951867103577, 0.335064172744751, 0.1299866884946823, -0.004778430797159672, -0.0852644294500351, -0.6233368515968323, -0.2042466104030609, 0.28929686546325684, -0.019717048853635788, 0.18617583811283...
is similar.
[ -0.01958831585943699, -0.04975445196032524, 0.26147979497909546, 0.11783099919557571, 0.22887888550758362, 0.01647413708269596, 0.22442901134490967, -0.11879373341798782, 0.15544991195201874, -0.3234383463859558, 0.1416940987110138, 0.35362371802330017, 0.010629617609083652, -0.04928540438...
Can you elaborate on the current state of "blocks" (in the Ruby sense) in Python? What are the language constructs that exist in Python? How do they compare to other languages (like Ruby, Smalltalk, [insert more])? Or does Python lack such constructs? I have so far understood the `lambda` thing; it is only one-line, ...
[ 0.7553964853286743, 0.19015412032604218, -0.32507067918777466, 0.1783517301082611, -0.21223008632659912, -0.004048450384289026, 0.3023494780063629, -0.037034593522548676, -0.38246726989746094, -0.2850037217140198, 0.05029891058802605, 0.5350448489189148, -0.27684444189071655, -0.0491839870...
this stuff for Python and also comparing to other languages and could be interesting for someone who wants to extend basic Python knowledge? Functions are the first-class members in Python: ``` def add(x, y): return x + y a = add # Bind b = a(34, 1) # Call ``` So you can pass functions around all y...
[ 0.29326120018959045, -0.019567983224987984, 0.06377968937158585, -0.2798089385032654, -0.5684439539909363, -0.3612900674343109, 0.17346321046352386, -0.2079780250787735, -0.19051170349121094, -0.3337326645851135, -0.3110908269882202, 0.5243859887123108, -0.551310122013092, -0.1265423893928...
In Notepad++ I have set "replace tab with 2 spaces". When coding in Python I copy-pasted some code from the web and it appeared indented correctly. But running the code resulted in indentation errors, which I solved in the end by removing all "visible" spaces at line beginnings and inserting the same amount of spaces ...
[ -0.18157629668712616, -0.009577814489603043, 0.36748021841049194, -0.2374039888381958, -0.10824621468782425, 0.44354769587516785, -0.017457038164138794, 0.00380586925894022, -0.15477490425109863, -0.8223690390586853, -0.057298172265291214, 0.2573328912258148, -0.4946993589401245, -0.374013...
→ *Show Symbol* → \*Show All Characters` or Menu *View* → *Show Symbol* → *Show White Space and TAB* (Thanks to bers' comment and bkaid's answers below for these updated locations.) --- On older versions you can look for: Menu *View* → *Show all characters* or Menu *View* → *Show White Space and TAB*
[ -0.26530662178993225, 0.07139334827661514, 0.337916761636734, -0.23851080238819122, -0.23558685183525085, 0.2905976176261902, 0.24598343670368195, 0.017093835398554802, -0.25767990946769714, -0.6565907001495361, -0.49113649129867554, 0.166649729013443, -0.2711554169654846, -0.2063964158296...
Is it possible to deliver an Excel Spreadsheet via an Web Service. I believe not as ASP.NET web services seem only to deal in Serializable elements which the excel binary format isn't (I think). If the Excel is saved in XML format will this work? I have a number of reports that will be emailed, but the request has bee...
[ 0.4058517515659332, 0.09939546883106232, 0.2836667001247406, 0.22855013608932495, -0.06062167137861252, -0.07533267140388489, -0.36801016330718994, 0.08701810240745544, -0.3106960952281952, -0.5273639559745789, 0.045437783002853394, 0.5804646611213684, 0.11053240299224854, -0.2044892013072...
just save the file stream back to the local machine. MS have a knowledge base article on it. <http://support.microsoft.com/kb/318425>
[ 0.33758947253227234, 0.04028822109103203, 0.0665893480181694, 0.3212762475013733, 0.31016987562179565, -0.08389610797166824, 0.3618880808353424, 0.4131927788257599, -0.2908402979373932, -0.6532120108604431, -0.4533129334449768, 0.32822027802467346, -0.15959787368774414, 0.2341565042734146,...
Several days ago i setup some replication for our SQL Server 2005 database, the type of replication was a transactional with updateable subscription. The replication are working fine, lately i test the upgradeable subscription feature by modifying 1 data on subscriber server but then the error was raise and data are n...
[ 0.07958503067493439, 0.40051624178886414, 0.6307170987129211, 0.04893007129430771, -0.2557644546031952, -0.24748320877552032, 0.14866797626018524, -0.3476324677467346, -0.5706585049629211, -0.4583199620246887, 0.31060150265693665, 0.49164000153541565, -0.1414007544517517, 0.494057565927505...
the same username & password for publisher and subscriber it can't be wrong. My replication schema was like this: [Replication schema http://i.msdn.microsoft.com/ms151196.89217927-03fc-4ba0-8110-73ada9810b3f(en-us,SQL.100).gif](http://i.msdn.microsoft.com/ms151196.89217927-03fc-4ba0-8110-73ada9810b3f(en-us,SQL.100)...
[ 0.10068515688180923, 0.3731599748134613, 0.4421333074569702, 0.30167222023010254, -0.0826653391122818, -0.15110044181346893, 0.14242695271968842, 0.06120902672410011, -0.3212454617023468, -0.6040449142456055, 0.21860156953334808, 0.5122782588005066, -0.15177302062511444, 0.3815116286277771...
I am wondering if it is possible to have multiple Update statements in a store procedure Something like this: ``` Update Table1 set field1 = @new_value where id = @table1_id Update Table2 set field2 = @new_value where id = @table2_id Update Table3 set field3 = @new_value where id = @table3_id ``` Right now I am e...
[ 0.4979763925075531, 0.2465144246816635, 0.6753076314926147, -0.2558259069919586, -0.11133597791194916, -0.018848352134227753, -0.34648919105529785, -0.4505079388618469, -0.3018205463886261, -0.13659323751926422, 0.28170669078826904, 0.6469979882240295, -0.3225911557674408, -0.1601027846336...
field1 = @new_value WHERE id = @table1_id UPDATE Table2 SET field2 = @new_value WHERE id = @table2_id UPDATE Table3 SET field3 = @new_value WHERE id = @table3_id END ```
[ -0.20809626579284668, 0.012530750595033169, 0.5819407105445862, -0.34689006209373474, -0.06213238090276718, -0.17945070564746857, -0.29475000500679016, -0.35638856887817383, -0.17933186888694763, -0.33951810002326965, -0.3759194612503052, 0.4341696798801422, -0.27653056383132935, -0.223050...
When I am running CherryPy Hello World: ``` import cherrypy class HelloWorld: def index(self): return "Hello world!" index.exposed = True cherrypy.config.update({'server.socket_port': 8080,}) cherrypy.quickstart(HelloWorld()) ``` ... I get this: IOError: Port 8080 not bound on 'localhost'. What cou...
[ 0.24694888293743134, -0.13157102465629578, 0.2786322832107544, -0.041822921484708786, -0.010128202848136425, -0.34481486678123474, 0.41964516043663025, 0.46684709191322327, -0.11703231185674667, -0.7027891278266907, -0.18453989923000336, 1.0532629489898682, -0.17351049184799194, 0.26235860...
I'm installing Modx on windows with ISAPI Rewrite instead of apache with mod\_rewrite? How do you define the rewrite rules? I'm guessing not with an .htccess file? any Ideas? Thanks According to the [ISAPI\_Rewrite 2 documentation](http://www.isapirewrite.com/docs/) you need to write the [configuration](http://www.is...
[ 0.2770407497882843, -0.09116989374160767, 0.7299426198005676, 0.07489600777626038, 0.07334151864051819, -0.4915969669818878, 0.4622676968574524, -0.3770816922187805, 0.14215733110904694, -0.7797850966453552, -0.16478097438812256, 1.028670310974121, -0.39856162667274475, -0.2215778678655624...
Let me try to explain it. Please tell me if I am wrong. I am just 70% sure about it. Like I understand it, an UIView has a frame and an bounds rectangle. The job of the frame rectangle is to set the position of the UIView relative to it's superview. More precisely: Relative to the coordinate system of the superview. T...
[ 0.17906054854393005, -0.19596311450004578, 0.6185312271118164, 0.47574710845947266, -0.25813695788383484, 0.1311533898115158, -0.340111643075943, -0.1472223550081253, -0.01638694666326046, -0.7403290867805481, -0.15879766643047333, 0.20595629513263702, -0.14379145205020905, 0.0455266721546...
the UIView Are there any mistakes or important things I missed? Check out Apple's guide on [View Geometry](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaViewsGuide/Coordinates/Coordinates.html). They have pretty good examples on what happens when you change bounds and frame values.
[ 0.058674156665802, 0.05182831734418869, 0.48118650913238525, 0.29022330045700073, -0.2051459103822708, -0.13675646483898163, 0.20101867616176605, -0.03311507776379585, -0.40363749861717224, -0.8353103399276733, 0.10241487622261047, 0.45068633556365967, 0.013348342850804329, -0.207521870732...
I am retreiving a feild from a database, into $subcat. If $subcat is null, I want to show the form to add to a category, otherwise I want to display the category. $subcat definitly exists and is correctly retrieved. It is either null or a string. ``` if ($subcat != null) { $showCategory = "<p><strong>Auction Category:...
[ 0.18473391234874725, -0.08545050770044327, 0.763798713684082, -0.10430911928415298, -0.1379040777683258, -0.31727203726768494, 0.38639166951179504, -0.5754455924034119, -0.1107427105307579, -0.5062546730041504, -0.28464168310165405, 0.6413589715957642, -0.32466524839401245, 0.4233867526054...
form. When $subcat is definitly, without a doubt not null, the form is still shown. I tried swapping the else clauses around, but then the category was displayed, even when $subcat was verifiably null. is null works if the variable is actually NULL. If the variable is the empty string (""), zero, false, or an empty arr...
[ -0.017401203513145447, -0.16373851895332336, 0.11521900445222855, -0.2416759580373764, -0.31043651700019836, -0.2899240255355835, 0.8134336471557617, -0.32268908619880676, -0.04001032933592796, -0.48854151368141174, -0.4268876910209656, 0.5671316981315613, -0.5095142722129822, -0.273536622...
do something if the variable is NULL. Empty is generally better to check whether you're about to call a class method on something unexpected. Edit: Oh also, sometimes retrieving NULL from a database gives you the string "NULL" which is not the same as an actual NULL value. It depends on the db you're using and how you...
[ 0.6538755893707275, -0.3546496033668518, -0.37824130058288574, 0.03149828687310219, -0.21668007969856262, -0.2098958045244217, 0.7388919591903687, 0.07452663779258728, -0.3697727918624878, -0.3617631494998932, -0.07657655328512192, 0.40519091486930847, -0.3193829655647278, 0.13526198267936...