text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
p = class->pick_next_task(rq); if (p) return p; } BUG(); /* the idle class will always have a runnable task */ } ``` Is this because each function pointer in the `sched_class` has the same name as the actual implemented function, so every time a call is made via a function poi...
[ -0.40758800506591797, -0.3435051739215851, 0.26592665910720825, -0.17037807404994965, 0.20039485394954681, 0.17650872468948364, -0.021170537918806076, -0.09391950070858002, -0.18458296358585358, -0.6302669048309326, -0.21326155960559845, 0.45944932103157043, -0.5516660809516907, -0.0070879...
definition of `for_each_class` should clear it up for you ``` #define for_each_class(class) \ for (class = sched_class_highest; class; class = class->next) ``` If you go on tracing, `sched_class_highest` wil end up something like this ``` #define sched_class_highest (&stop_sched_class) extern const struct s...
[ -0.12797993421554565, -0.4841371774673462, 0.1846776157617569, 0.12118231505155563, 0.13734140992164612, -0.26125138998031616, 0.2573740482330322, -0.21647173166275024, -0.28421154618263245, -0.8168430924415588, -0.0037911003455519676, 0.13761231303215027, -0.3076033890247345, -0.069687105...
enqueue_task_stop, .dequeue_task = dequeue_task_stop, .yield_task = yield_task_stop, .check_preempt_curr = check_preempt_curr_stop, .pick_next_task = pick_next_task_stop, .put_prev_task = put_prev_task_stop, #ifdef CONFIG_SMP .select_task...
[ -0.45756733417510986, -0.16393287479877472, 0.3527696132659912, -0.04905451834201813, 0.06647981703281403, 0.4300473928451538, -0.03941790387034416, -0.1473170816898346, -0.20007310807704926, -0.8982847929000854, -0.2965519428253174, 0.5961225032806396, -0.03410594165325165, 0.189922541379...
select_task_rq_stop, #endif .set_curr_task = set_curr_task_stop, .task_tick = task_tick_stop, .get_rr_interval = get_rr_interval_stop, .prio_changed = prio_changed_stop, .switched_to = switched_to_stop, }; ``` Now are you happy? :)
[ -0.0268655177205801, -0.0678616613149643, 0.7823306918144226, -0.24080142378807068, 0.17688465118408203, 0.24156337976455688, 0.2060796469449997, 0.17107953131198883, -0.507051944732666, -0.13527092337608337, -0.3425394892692566, 0.9469083547592163, -0.46181291341781616, -0.031290248036384...
I have two notepads and each notepad contains some data. Let's say Notepad 1 and Notepad 2 `Notepad 1 contains: A, B, C` `Notepad 2 contains: C, D, E` I want to ask that **how can i find data in Notepad 2 that contains notepad 1 data**. Here answer is `C`. But i have lots of data in notepad 1 and notepad2. It is not...
[ 0.10632967948913574, 0.25339698791503906, 0.5615310668945312, 0.019350774586200714, -0.1215740293264389, 0.3215941786766052, -0.2787858843803406, -0.18046079576015472, -0.29839444160461426, -0.7840721607208252, 0.23143123090267181, 0.3044504225254059, -0.17508666217327118, 0.05136813968420...
to have a look on diff/merge tools. [WinMerge](http://winmerge.org/) is a free one. Another good option is [Araxis Merge](http://www.araxis.com/merge/), it is commercial. Also you can just use [Notepad++](http://notepad-plus-plus.org/) editor with its [Compare plugin](http://sourceforge.net/projects/npp-compare/). Thes...
[ 0.18356627225875854, -0.12805584073066711, 0.06852789223194122, 0.13457365334033966, -0.42923420667648315, 0.1444803923368454, 0.010913665406405926, 0.006933544762432575, 0.06819963455200195, -0.7777766585350037, 0.14124493300914764, 0.5221039652824402, -0.2443029135465622, 0.0756629183888...
``` <?php $a = 'abc'; if($a among array('are','abc','xyz','lmn')) echo 'true'; ?> ``` Suppose I have the code above, how to write the statement "if($a among...)"? Use the [`in_array()`](http://php.net/manual/en/function.in-array.php) function. Manual says: > Searches haystack for needle using loose comparison...
[ 0.5041611790657043, 0.3814559876918793, 0.15349328517913818, -0.30202019214630127, -0.030667632818222046, 0.22564229369163513, 0.5594305396080017, -0.6130030751228333, -0.15653669834136963, -0.15742412209510803, 0.04296795651316643, 0.39984849095344543, -0.46351903676986694, 0.227052539587...
Im am using a pattern from the book Learning Cocos2D. I have a GameState class that is a singleton that can be saved as a state. The BOOL soundOn gets init as false the first time the class gest created, but the array levelProgress dosent. I made comments on all the lines on which I have tried to init the array. The cl...
[ 0.2017192393541336, 0.09276511520147324, 0.21606023609638214, -0.2780745029449463, -0.06092121824622154, -0.17672571539878845, 0.3045446574687958, -0.5751634836196899, 0.08876289427280426, -0.82069993019104, -0.05024755373597145, 0.7055001258850098, -0.41441619396209717, 0.3067590594291687...
NSMutableArray *levelProgress; } + (GameState *) sharedInstance; - (void)save; @property (assign) BOOL soundOn; @property (nonatomic, retain) NSMutableArray *levelProgress; @end #import "GameState.h" #import "GCDatabase.h" @implementation GameState @synthesize soundOn; @synthesize levelProgress; static GameState...
[ 0.03115181438624859, -0.17881423234939575, 0.40654048323631287, -0.14941078424453735, 0.29216450452804565, -0.051253776997327805, 0.1743437945842743, -0.627361536026001, -0.1669943630695343, -0.35500407218933105, -0.2037583440542221, 0.721790611743927, -0.2739490866661072, 0.35155829787254...
// 1. levelProgress = [[NSMutableArray alloc] init]; } } return sharedInstance; } return nil; } +(id)alloc { @synchronized ([GameState class]) { NSAssert(sharedInstance == nil, @"Attempted to allocate a \
[ 0.08622630685567856, -0.48730871081352234, 0.02296488545835018, 0.12899360060691833, 0.42144230008125305, -0.2936984896659851, 0.4358932375907898, -0.2334962636232376, -0.2460639625787735, -0.3980555534362793, 0.08482817560434341, 0.6266764402389526, -0.37506258487701416, 0.081351637840271...
second instance of the GameState singleton"); sharedInstance = [super alloc]; // 2. levelProgress = [[NSMutableArray alloc] init]; return sharedInstance; } return nil; } - (void)save { saveData(self, @"GameState"); } - (void)encodeWithCoder:(NSCoder *)encoder { // 3. levelP...
[ -0.21151766180992126, -0.24544967710971832, 0.3951619863510132, -0.1860571652650833, 0.22535192966461182, 0.030963435769081116, 0.3428914546966553, -0.5274252891540527, 0.09566062688827515, -0.7281971573829651, -0.16191299259662628, 0.6485640406608582, -0.2350841462612152, 0.22965775430202...
{ // 4. levelProgress = [[NSMutableArray alloc] init]; soundOn = [decoder decodeBoolForKey:@"soundOn"]; levelProgress = [decoder decodeObjectForKey:@"levelProgress"]; } return self; } @end ``` **Solution:** \**I just added av init method...*\* ``` -(id)init { self = [super ini...
[ -0.1474621742963791, -0.014485607855021954, 0.7383584976196289, -0.08097093552350998, 0.18238776922225952, 0.05013001337647438, 0.4348372220993042, -0.5410119891166687, -0.13887840509414673, -0.5256811380386353, -0.1693730354309082, 0.8387203216552734, -0.19040648639202118, -0.066488794982...
errors - I wrote it in notepad): ``` @interface GameState : NSObject <NSCoding> @property (nonatomic, readwrite) BOOL soundOn; @property (nonatomic, retain) NSMutableArray *levelProgress; + (GameState *)sharedState; - (void)writeDataToCache; @end ``` // ``` @implementation GameState @synthesize soundOn, levelPr...
[ -0.23628146946430206, 0.18821457028388977, 0.22252888977527618, -0.26733025908470154, 0.1914893239736557, 0.47743478417396545, 0.5437777638435364, -0.38800176978111267, 0.024188613519072533, -0.4915727376937866, -0.013210367411375046, 0.7286660075187683, -0.1846163272857666, 0.064338810741...
data = [NSKeyedUnarchiver unarchiveObjectWithData:encodedObject]; } else data = [[GameState alloc] init]; } } + (GameState *)sharedState { return sharedState; } #pragma mark - Initialization - (id)init { if (self = [super init]) { // will be inited while application first run ...
[ -0.04782808572053909, -0.24963457882404327, 0.5379592776298523, -0.1061692163348198, 0.2740069031715393, -0.2082076072692871, 0.6655030846595764, -0.5133479237556458, 0.11865200847387314, -0.4254419803619385, -0.3218550682067871, 0.7583718299865723, -0.08176015317440033, 0.2397516667842865...
return self; } return nil; } #pragma mark - Coding Implementation - (void)writeDataToCache { // use this method to save current state to cache NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:self]; if([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/...
[ -0.2615091800689697, -0.028194867074489594, 0.3267006278038025, -0.28811007738113403, 0.16960646212100983, 0.2763870358467102, 0.6187072396278381, -0.7149242162704468, -0.0697551965713501, -0.5436044335365295, -0.12214597314596176, 0.7113548517227173, -0.07816470414400101, 0.05054143071174...
self.soundOn = [decoder decodeBoolForKey:@"soundOn"]; self.levelProgress = [decoder decodeObjectForKey:@"levelProgress"]; NSLog(@"GameState was inited successfully"); return self; } return nil; } @end ```
[ -0.1272108554840088, 0.026544982567429543, 0.17850613594055176, -0.19349616765975952, 0.29149430990219116, -0.13224142789840698, 0.4281178116798401, -0.37075111269950867, 0.10588881373405457, -0.4114444851875305, -0.2889986038208008, 1.168820858001709, -0.12047722935676575, 0.2112679183483...
I am developing a system with Java EE and JPA where users can make changes to entities. It is needed to trace back to the changes when needed. So the all the changes and the user have to be recorded for each occasion when en update is made. What is the best way to record the changes. For example, there is an Entity ca...
[ 0.47592195868492126, -0.06939507275819778, 0.3089863657951355, 0.25215578079223633, -0.03971581906080246, -0.0810771957039833, -0.2250688672065735, -0.24786750972270966, -0.2867877781391144, -0.593565046787262, 0.18787343800067902, 0.4536566436290741, 0.06131979823112488, 0.236478075385093...
with the change done and the user who did it is needed to be traced back when needed. One method described in this [link](https://stackoverflow.com/questions/2631959/best-approach-to-optimize-a-record-history-database) is that to label objects as old edited and create a new object with updated values, but the problem...
[ 0.19541746377944946, 0.04122474417090416, 0.23908568918704987, 0.0721372589468956, 0.17292730510234833, -0.31694385409355164, -0.046153511852025986, -0.28221645951271057, -0.7480980157852173, -0.4095592498779297, -0.1088336929678917, 0.31320953369140625, -0.23945054411888123, 0.18448279798...
other optimized way to keep the record editing history in Java Persistence? Try this (this code may contain syntax or logic errors - I wrote it in notepad): ``` @interface GameState : NSObject <NSCoding> @property (nonatomic, readwrite) BOOL soundOn; @property (nonatomic, retain) NSMutableArray *levelProgress; + (Ga...
[ -0.0340261273086071, -0.1265895515680313, 0.34463462233543396, -0.1766095757484436, 0.24962006509304047, -0.025888929143548012, 0.21128985285758972, -0.6477323174476624, -0.12080705165863037, -0.6000032424926758, 0.04656754806637764, 0.7375729084014893, -0.3085041046142578, 0.2338334470987...
NSData *encodedObject = [[NSData alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/gameState", pathCache]]; data = [NSKeyedUnarchiver unarchiveObjectWithData:encodedObject]; } else data = [[GameState alloc] init]; } } + (GameState *)sharedState { return shared...
[ -0.1385655701160431, -0.3167656660079956, 0.1606532782316208, -0.18208420276641846, 0.028617339208722115, 0.17722727358341217, 0.44585150480270386, -0.601288914680481, 0.06517640501260757, -0.5002933144569397, -0.19496606290340424, 0.6335508823394775, -0.0850687325000763, 0.334065794944763...
= NO; levelProgress = [[NSMutableArray alloc] init]; return self; } return nil; } #pragma mark - Coding Implementation - (void)writeDataToCache { // use this method to save current state to cache NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:self]; if([[NSFileMan...
[ -0.26820042729377747, -0.08223745971918106, 0.2788574993610382, -0.0994962826371193, 0.3074435591697693, 0.1902681440114975, 0.5730516314506531, -0.5277526378631592, -0.1011071503162384, -0.47847798466682434, -0.3235628306865692, 0.4673016667366028, -0.036610692739486694, 0.102454118430614...
encodeBool:self.soundOn forKey:@"soundOn"]; [encoder encodeObject:self.levelProgress forKey:@"levelProgress"]; } - (id)initWithCoder:(NSCoder*)decoder { if ((self = [super init])) { self.soundOn = [decoder decodeBoolForKey:@"soundOn"]; self.levelProgress = [decoder decodeObjectForKey:@"levelProg...
[ -0.18383879959583282, 0.06694582849740982, 0.34507864713668823, -0.20427294075489044, 0.46851015090942383, -0.09374485909938812, 0.1749081164598465, -0.7380753755569458, 0.17579957842826843, -0.462126761674881, -0.5243963003158569, 0.8486865162849426, -0.21866373717784882, 0.11664380878210...
I want to insert an user and get its id e.g. last insert id. through sql. ``` CREATE OR REPLACE FUNCTION create_user(registration_ip inet) RETURNS integer AS insert into users(registration_ip) values($1); select max(id) from users; LANGUAGE sql VOLATILE ``` Is this function secure ? I meant is it concurrency sa...
[ 0.17291153967380524, 0.203603133559227, 0.3951059877872467, -0.04737125337123871, 0.23538483679294586, 0.077643483877182, -0.07535333931446075, -0.3486667573451996, 0.045871272683143616, -0.3826747536659241, -0.14109021425247192, 0.48942825198173523, -0.46087464690208435, 0.277760535478591...
I have links like this: ``` <li><a href="#" data-value="Codes">Get codes</a></li> <li><a href="#" data-value="Product">Get products</a></li> ``` How can I make it so that when I click on the link then a function gets called passing the value that's contained in data-value? ``` function refreshGrid(value) { } ``` T...
[ 0.06637469679117203, 0.1388421505689621, 0.7351580262184143, -0.16191983222961426, 0.010170080699026585, -0.06625670939683914, 0.2370222508907318, -0.4360359013080597, -0.05684598162770271, -0.7344403266906738, -0.19525127112865448, 0.46368497610092163, -0.41087621450424194, 0.301990091800...
I create a new page using HTMl and I whant when user clicks on one of my Links ,one div slide down at the bottom of it. the problem is when I using this code in my page it silde down in left side of my header and then it jump beneath my link.I save the code in `jSfiddle` : <http://jsfiddle.net/GMSvk/1/> in `jsFiddle` ...
[ 0.31178227066993713, 0.22578038275241852, 0.4537737965583801, -0.06323741376399994, -0.3497239649295807, -0.10331637412309647, 0.3153007924556732, -0.11481370776891708, -0.41270482540130615, -0.912592887878418, 0.1129424199461937, 0.31046879291534424, -0.43138256669044495, 0.10006079077720...
Apparently, my use of Twitter oAuth (token request) doesn't work in iOS 5... how can I keep this code for anything below iOS 5 and use the new Twitter Framework for iOS 5+? Is it possible to detect iOS versions? Thanks! You (almost) never want to query iOS (or even framework) versions. That (usually) means you're sol...
[ 0.42741233110427856, 0.03908895328640938, 0.3923197090625763, 0.14626672863960266, -0.029649551957845688, -0.30726104974746704, 0.7741424441337585, 0.10858828574419022, -0.20000796020030975, -0.6616013646125793, 0.24331572651863098, 0.38682305812835693, -0.39970365166664124, -0.10955870151...
for lower level framework components, e.g.: ``` if ([TWRequest class]) { // Do something } else { // Use your original code } ``` (Obviously you will need to link against Twitter.framework and include the requisite headers.)
[ 0.5286579728126526, -0.21025952696800232, -0.009877773933112621, 0.013403058052062988, -0.1953042596578598, -0.5619905591011047, 0.48635557293891907, -0.08250375092029572, 0.008098560385406017, -0.49258333444595337, -0.19921603798866272, 0.3203536570072174, -0.42361101508140564, -0.0693814...
``` UPDATE table1 SET col = 1 WHERE col2 = 'xyz' UPDATE a SET col = 1 FROM table1 a WHERE col2 = 'xyz' ``` Which is preferred ? One difference I could find out was that the second statement allows to use WITH NO LOCK near the 'FROM' statement. But when used near the update statement, it gives the same error message...
[ -0.3291211426258087, 0.026225071400403976, 0.52789705991745, -0.13111494481563568, -0.2629890441894531, -0.1084827333688736, -0.03556970879435539, -0.1464553326368332, -0.2437906116247177, -0.6212925910949707, -0.2830581068992615, 0.37216639518737793, -0.5169525146484375, -0.11285196244716...
a JOIN, then assigning an alias per your 2nd example is (IMO) cleaner, like: ``` UPDATE a SET a.Col = 1 FROM TableA a JOIN TableB b ON a.Id = b.Id WHERE b.Something = '123' ``` BTW, there is no point specifying a NOLOCK hint on the table being updated, so don't count that as a reason for one over the other.
[ 0.1633932739496231, -0.15478967130184174, 0.35025081038475037, -0.0625937283039093, 0.025420045480132103, -0.45814409852027893, 0.2969651222229004, -0.17818798124790192, -0.22778485715389252, -0.6191153526306152, -0.20646432042121887, 0.33393996953964233, -0.5121978521347046, 0.07409892976...
OpenJPA 1.2.2, WebSphere 7 (Java EE 5) I'm trying to map a table to a POJO (Not entity !) using a named-native-query defined in orm.xml: ``` <named-native-query name="myNativeQuery" result-class="foo.bar.PojoBean"> <query> SELECT col_one AS colOne, col_two AS colTwo, col_three AS colThree FROM my...
[ -0.49791964888572693, 0.16182129085063934, 0.6966670751571655, -0.30780673027038574, 0.1486290842294693, 0.31058114767074585, -0.019811054691672325, 0.09997247904539108, -0.2536701560020447, -0.3734482228755951, -0.2141423374414444, 0.3101205825805664, -0.40625321865081787, -0.060685422271...
} public void setColOne(String colOne) { ... } ... } ``` When I create the query: ``` EntityManager myEntityManager = ... myEntityManager.createNamedQuery("myNativeQuery"); ``` I got an exception (Formatted for readability): ``` <openjpa-1.2.2-r422266:898935 nonfatal user error> org.apache.openjpa.persi...
[ -0.14408883452415466, -0.010690231807529926, 0.5544233918190002, -0.1015976145863533, 0.2598070502281189, -0.1341336965560913, 0.17039750516414642, 0.18343886733055115, -0.16448745131492615, -0.3440287411212921, -0.16719412803649902, 0.3655431568622589, -0.4779129922389984, 0.0996639877557...
the query from java using EntityManager.createNativeQuery(...) works, but it's not an option. Thank you, see this example it may help to you . ``` public void unzip() { try { FileInputStream fin = new FileInputStream(_zipFile); ZipInputStream zin = new Zip...
[ 0.20444777607917786, -0.543182373046875, 0.6825084090232849, 0.024896664544939995, 0.24914878606796265, -0.27017030119895935, 0.22014299035072327, -0.291608989238739, -0.2144397348165512, -0.7991520166397095, -0.18196693062782288, 0.6032463312149048, -0.6104524731636047, 0.2453437596559524...
ZipEntry ze = null; while ((ze = zin.getNextEntry()) != null) { Log.v("Decompress", "Unzipping " + ze.getName()); System.out.println("^^^^^^UnzippingFile^"+ze.getName());
[ 0.004043562337756157, -0.33695802092552185, 0.5921121835708618, -0.18261362612247467, 0.43961045145988464, 0.17918826639652252, 0.3145790696144104, -0.36993035674095154, -0.18744231760501862, -0.41504785418510437, -0.768338143825531, 0.30062341690063477, -0.5718643665313721, 0.367422521114...
///code to search is given string exists or not in a Sentence String haystack = ze.getName(); String needle1 = ".DS_Store";
[ 0.28432780504226685, -0.1655171811580658, 0.10815737396478653, -0.029031410813331604, 0.19050702452659607, 0.06320573389530182, 0.7810760140419006, -0.1650349646806717, 0.13322381675243378, -0.24680930376052856, -0.3530653417110443, 0.2820030748844147, -0.4763374626636505, 0.37921875715255...
int index1 = haystack.indexOf(needle1); if (index1 != -1) { System.out.println("The string contains the substring " + needle1);
[ -0.002393757924437523, -0.20935915410518646, 0.5906168818473816, -0.2782776653766632, 0.2430807203054428, 0.28783753514289856, 0.31740742921829224, -0.5267669558525085, -0.09348982572555542, -0.16151665151119232, 0.06614915281534195, 0.4060479700565338, -0.6479871273040771, 0.3209181427955...
continue; } /*else System.out.println("The string does not contain the substring " + needle1);*/
[ 0.20523515343666077, -0.24109163880348206, 0.45004624128341675, -0.43251651525497437, 0.5141270160675049, 0.1311165988445282, 0.6307962536811829, -0.18217523396015167, -0.2201867699623108, -0.08624236285686493, -0.40097475051879883, 0.5555756688117981, -0.23868365585803986, 0.1976444274187...
if(ze.isDirectory()) { _dirChecker(ze.getName()); } else { FileOutputStream fout = new
[ 0.06213619187474251, -0.49358171224594116, 0.30955812335014343, -0.1971316784620285, 0.5122650861740112, -0.2730259895324707, 0.4176483750343323, -0.37060484290122986, 0.1189541220664978, -0.6048963665962219, -0.24250608682632446, 0.8864365816116333, -0.12626484036445618, 0.337841898202896...
FileOutputStream(_location + ze.getName()); // replace for loop with: byte[] buffer = new byte[1024]; int length;
[ 0.25432178378105164, -0.3856843411922455, 0.2461424022912979, -0.2057628184556961, 0.3312183618545532, -0.04459834098815918, 0.2412293553352356, -0.18978729844093323, -0.18363410234451294, -0.5298754572868347, -0.1244766041636467, 0.30903318524360657, -0.40554848313331604, 0.25620973110198...
while ((length = zin.read(buffer))>0) { fout.write(buffer, 0, length); } zin.closeEntry();
[ -0.23287349939346313, -0.1221906840801239, 0.6363658308982849, -0.3977713882923126, 0.6042919158935547, 0.08462519198656082, 0.30778968334198, -0.11767213046550751, 0.15416698157787323, -0.3467118442058563, -0.5099985003471375, 0.4860246181488037, -0.217948317527771, 0.39183253049850464, ...
fout.close(); } }////Outer While zin.close(); } catch(Exception
[ -0.09217780828475952, -0.29549258947372437, 0.2556520700454712, -0.492038369178772, 0.40974828600883484, -0.16226255893707275, 0.2356598675251007, -0.2586979269981384, -0.15752290189266205, -0.21229222416877747, -0.41376209259033203, 0.651473879814148, -0.3048871159553528, 0.17675366997718...
e) { Log.e("Decompress", "unzip", e); } } private void _dirChecker(String dir) {
[ -0.21139444410800934, -0.12454897165298462, 0.1607326716184616, -0.3217937648296356, 0.34802743792533875, 0.018159352242946625, 0.2827475070953369, -0.44079911708831787, 0.23676127195358276, -0.18914780020713806, -0.5908106565475464, 0.778907299041748, -0.5902262926101685, 0.23921228945255...
File f = new File(_location + dir); if(!f.isDirectory()) { f.mkdirs(); } } ```
[ -0.1812201291322708, -0.17219914495944977, 0.6565594673156738, -0.37178847193717957, 0.3393462896347046, -0.04074866697192192, 0.1273103505373001, -0.35387277603149414, -0.08895329385995865, -0.6103078722953796, -0.6039586663246155, 0.49592867493629456, -0.34150850772857666, 0.403410434722...
In my `init` I have set some variables and one animate that uses those variables. --- What if I want to use that same animate/variables in my `clickSlide`? <http://jsfiddle.net/lollero/4WfZa/> ( This obviously wouldn't work. ) I could make it global <http://jsfiddle.net/lollero/4WfZa/1/> ( by removing the `var` ) ...
[ -0.003210762981325388, 0.02846967615187168, 0.47302380204200745, -0.10980908572673798, -0.12322965264320374, 0.056244514882564545, 0.5601008534431458, -0.13395342230796814, 0.026630055159330368, -0.6261905431747437, -0.10740391165018082, 0.564054012298584, -0.6324235200881958, -0.040426462...
{ sb = this, getBox = sb.gb, getWidth = getBox.width(), getHeight = getBox.height(); getBox.animate({ marginLeft: '+='+getWidth }, 600 );
[ 0.15507017076015472, -0.3433518707752228, 0.6429852247238159, -0.30032533407211304, -0.08750292658805847, 0.2968209683895111, 0.45878058671951294, -0.5088456869125366, -0.14119531214237213, -0.6159303784370422, -0.2651543617248535, 0.24960602819919586, -0.003633237211033702, 0.208033680915...
$("#button").on("click", this.clickSlide); }, clickSlide: function() { getBox.animate({ marginLeft: '+='+getWidth }, 600 ); } }; slideBox.init(); }); ``` than make use in the function so that you can get the vlue in you clickside function
[ 0.2636500298976898, -0.3369137942790985, 0.8900805115699768, -0.24797329306602478, 0.18386320769786835, 0.36591291427612305, 0.1635013371706009, -0.2456509917974472, -0.19160522520542145, -0.5893059372901917, 0.027322106063365936, 0.6707011461257935, -0.45895814895629883, 0.374764800071716...
I am trying to get at least three words separated by two commas.I have so far managed to match two words with one comma with ``` /([A-z]|[0-9])(,{1})([A-z]|[0-9])/ ``` but how can I add a comma and a word to this.I have tried repeating the same but did not work. `/^(?:\w+,){2,}(?:\w+)$/` This will get you a comma...
[ 0.0268758125603199, 0.03793872147798538, 0.5323003530502319, -0.26146799325942993, -0.42779871821403503, 0.45254793763160706, 0.3947922885417938, -0.1260027438402176, -0.22288264334201813, -0.8044165372848511, -0.15510950982570648, 0.33074942231178284, -0.21453671157360077, -0.016645168885...
I am looking for a way to encode 100 byte on paper and hope to find a more room-saving way to do this than QR-Codes. Now this may sound a little strange, as the information needs room, but e.g. something wider and less tall would be cool. Any suggestions? (Also, C++ libraries would be nice.) **EDIT**: Keep in mind I...
[ 0.8105059862136841, 0.209282785654068, 0.08170773833990097, 0.06114254519343376, -0.15533895790576935, 0.2607956528663635, -0.0004440613556653261, 0.08769986033439636, -0.2962205410003662, -0.8080752491950989, 0.16030353307724, 0.04895954206585884, 0.022007644176483154, 0.00406022276729345...
I have a WCF service method that calls a SQL stored proc. I'm developing using IIS 5 (can't do much about that, II6/7 not available) To get some gains, I'm doing a number of async calls to this stored proc by putting the call into a c# TPL Task. When run as a Task, I'm getting an SQL Exception... "Login failed. The ...
[ 0.08464061468839645, 0.11426407843828201, 0.3841477036476135, -0.03383251279592514, 0.039963498711586, -0.22396844625473022, 0.34758296608924866, -0.11750725656747818, -0.19823656976222992, -0.4770682156085968, 0.037909895181655884, 0.5881726741790771, -0.4195360541343689, 0.32864934206008...
IIS Virtual folder (WCF) are not being delegated to the Task? Any ideas how I can specificy credentials for the TPL Task thread, ie to use the same as the parent etc ? I am using Windows Authentication (sspi), and impersonation to be able to connect to the seperate SQL box. Your help appreciated. You have two choices...
[ 0.0667838305234909, -0.3748953640460968, 0.3737756907939911, 0.1305602639913559, -0.023428041487932205, -0.33632275462150574, 0.37438464164733887, -0.22448676824569702, -0.04317382350564003, -0.887825608253479, -0.0695917010307312, 0.6429299712181091, -0.33340001106262207, 0.01596972346305...
personally avoid this and go with #2 where you explicitly opt-in. 2) Capture the [`WindowsIdentity`](http://msdn.microsoft.com/en-us/library/system.security.principal.windowsidentity.aspx) before setting up your TPL tasks and explicitly impersonate where you need to make the calls using [`Impersonate`](http://msdn.mic...
[ 0.04418565705418587, 0.09872456640005112, 0.7796214818954468, 0.11903207749128342, 0.24744778871536255, -0.0500916950404644, 0.16076768934726715, -0.24633333086967468, -0.37937822937965393, -0.6738452315330505, -0.19034956395626068, 0.5956650376319885, -0.24122753739356995, 0.0159760657697...
will execute with the priviledges of the caller } // some more unpriviledged code here }); } ```
[ -0.1647357940673828, 0.04069753736257553, 0.38198715448379517, -0.08271986246109009, 0.32979854941368103, -0.17203094065189362, 0.6413421630859375, -0.08853227645158768, 0.1696929782629013, -0.6159265637397766, -0.5183914303779602, 0.747526228427887, -0.41838836669921875, 0.072251185774803...
Is it possible to change the "src" attribute of an existing `<script>` element using Jquery.attr()? It seemed like a simple way to get JSONP to work but I am not able to make this work for me. It turns out that a script's `src` can **only be set once**! It is not possible to change the `src` attribute of an existing `<...
[ -0.049993228167295456, -0.1884004920721054, 0.4711548686027527, -0.14066548645496368, -0.013441863469779491, -0.13461658358573914, 0.0736633688211441, -0.19150879979133606, -0.2812608778476715, -0.4190681278705597, 0.01701761968433857, 0.7273956537246704, -0.220299631357193, 0.048304423689...
I have created a seven-by-seven array of pointers to "Timeslot" objects in my constructor, using new, like so: ``` Timeslot ***schedule; Schedule::Schedule(void) { schedule = new Timeslot**[DAYS](); for(int day = 0; day < DAYS; day++){ schedule[day] = new Timeslot*[TIMESLOTS](); for(int time =...
[ 0.2624160647392273, 0.08316162973642349, 0.47291299700737, -0.1924830824136734, 0.20089556276798248, 0.4261467754840851, 0.16082504391670227, -0.11869051307439804, -0.5054718255996704, -0.9381558895111084, -0.11635160446166992, 0.6281209588050842, -0.4028901755809784, 0.14939860999584198, ...
all of them. I have tried to google this problem, but all instances i could find were people not using `new`. Since i was asked, the change i'm making to the timeslot object that is being propagated to all of them is i'm flagging a bit in a bitmask, using a method of the Timeslot class. ``` void Timeslot::book(int ...
[ 0.34482404589653015, 0.17418621480464935, 0.39996570348739624, 0.24812346696853638, 0.058158889412879944, -0.02546112798154354, 0.27186575531959534, -0.12527510523796082, -0.27389779686927795, -0.6011674404144287, -0.2733207643032074, 0.37195950746536255, -0.2866126000881195, 0.16291189193...
now. There's no *technical* problem with your code. No buffer overflows or etc. And, obviously, `operator new` should return distinct addresses for different objects unless they were explicitly freed. Then the problem is most probably in the rest of your code. * Are you using a standard heap (`new/delete`)? * Is `bit...
[ 0.17722280323505402, -0.13842183351516724, 0.07202458381652832, 0.13384495675563812, 0.042229145765304565, -0.2893912196159363, 0.16103069484233856, -0.03627447783946991, -0.33224743604660034, -0.6251258850097656, -0.2844099998474121, 0.4617992043495178, -0.2868683636188507, 0.039519630372...
objects, and don't want to demand long contiguous memory blocks. But you say you have in total 7x7 = 49 objects, which are (supposedly) tiny. Then just use one "static" array: ``` Timeslot schedule[DAYS][TIMESLOTS]; ```
[ 0.06579936295747757, 0.06771949678659439, 0.17671620845794678, 0.10219509899616241, 0.11481472104787827, 0.24610544741153717, -0.022380542010068893, 0.1870058923959732, -0.6251963973045349, -0.650571346282959, -0.16377253830432892, 0.3669281005859375, -0.21472486853599548, 0.24163652956485...
Hi i trying manny time but i can't created this. I should be as like this below images in pure css without any images ![enter image description here](https://i.stack.imgur.com/rjAOp.jpg) and now i want to used only single div . Thanks advanced . see you can make this in css3 easily you can use the before and after ...
[ 0.29283982515335083, -0.00510442303493619, 0.33679071068763733, 0.027594519779086113, -0.529359757900238, 0.008294099941849709, 0.20254185795783997, -0.34231334924697876, -0.19182893633842468, -0.6566156148910522, 0.3505082428455353, 0.6284017562866211, -0.15963254868984222, -0.02016003616...
for better understanding:- <http://jsfiddle.net/4Y9D5/37/>
[ 0.20953316986560822, -0.10819368064403534, 0.10987874865531921, 0.042547211050987244, -0.15731969475746155, -0.039717331528663635, 0.05926543101668358, 0.11609864234924316, -0.5249211192131042, -0.6153380870819092, -0.33259737491607666, 0.013279278762638569, -0.0438046008348465, 0.19945102...
How can I find subsets of data over multiple rows in sql? I want to count the number of occurrences of a string (or number) before another string is found and then count the number of times this string occurs before another one is found. All these strings can be in random order. This is what I want to achieve: I hav...
[ 0.12881900370121002, 0.2372315227985382, 0.3374459743499756, -0.008525926619768143, -0.1620665043592453, 0.11655095219612122, 0.0018225364619866014, -0.2989915609359741, -0.33074700832366943, -0.5892356634140015, 0.07882318645715714, 0.2691071033477783, -0.5797040462493896, 0.1187188625335...
to do this? I dont think you can do it with a single select. You can use AdventureWorks cursor: ``` create table my_Strings ( my_string varchar(50) ) insert into my_strings values('A'),('A'),('B'),('C'),('A'),('B'),('B') -- this method will only work on SQL Server 2008 --select my_String from my_strings declare @t...
[ -0.16661806404590607, -0.13893656432628632, 0.6512666344642639, -0.10062236338853836, -0.02031247690320015, -0.1503533571958542, 0.2250984162092209, -0.6984803080558777, -0.14539851248264313, -0.5565298199653625, 0.26758357882499695, 0.7467851042747498, -0.19846732914447784, 0.001258856384...
set @myLastString=@myString end else begin insert into @temp_result values (@myLastString, @nr) set @myLastString=@myString set @nr=1 end FETCH NEXT FROM string_cursor into @myString END insert into @temp_result values (@myLastString, @nr) CLOSE string_cursor; DEALLOCATE string_curso...
[ -0.15072482824325562, -0.27740278840065, 1.0565071105957031, -0.25543326139450073, 0.15778891742229462, 0.21693307161331177, -0.05780908092856407, -0.4607647955417633, -0.22198380529880524, -0.6140298247337341, 0.012855762615799904, 0.46450868248939514, -0.33733701705932617, -0.01444722246...
I use socket. IO to do a chat application, the client is 0.8.4 and running normally. But when I put the socket. 0.9.4 IO upgrade to find the cross domain problem, other documents did not change, the following is wrong content: ``` XMLHttpRequest cannot load http://localhost:8000/socket.io/1/? T = 1333528698474. http:/...
[ 0.16324691474437714, 0.23595985770225525, 0.3677615821361542, -0.019419148564338684, 0.02077706903219223, -0.054589830338954926, 0.25284385681152344, 0.0328863188624382, 0.01104820892214775, -0.8643338680267334, -0.19754758477210999, 0.4112117886543274, -0.2908746600151062, 0.5176374316215...
this is what i am trying to do : ``` $allwinnersarra = array(26809,26805,24279,4839,20939,17678,4999,17745,1); $results_query = mysql_query("SELECT username FROM table_users WHERE userid IN('".join("','", $allwinnersarra)."')"); while ($row = mysql_fetch_array($results_query)) { $usernamesFound.= $row['u...
[ -0.18739236891269684, 0.2791731357574463, 0.5817203521728516, -0.17298437654972076, 0.09133469313383102, 0.25559836626052856, 0.02706718072295189, -0.5463567972183228, -0.3057290315628052, -0.42769506573677063, -0.14616912603378296, 0.41305673122406006, -0.5536159873008728, 0.1699002981185...
(" . mysql_real_escape_string( $allwinnersarra ) . ");"; ``` Hope it helps...
[ 0.004399236291646957, 0.09081658720970154, 0.20539522171020508, -0.12526234984397888, 0.620099663734436, -0.08752678334712982, 0.8091503381729126, -0.056325435638427734, -0.0431387722492218, -0.5278276205062866, -0.42276597023010254, 0.5562382340431213, -0.3994235396385193, -0.049518056213...
I'm trying to make my tumblr posts link directly to the source when clicked rather than going to the post page and having the source link there to click. Here's the code I have for the photo posts. `{block:Photo} <div class="permalink"><a href="{Permalink}">{MonthNumber}.{DayOfMonthWithZero}.{ShortYear}</a></div> <...
[ 0.3830762505531311, 0.04100075364112854, 0.9500337839126587, -0.3247765600681305, -0.14838995039463043, 0.07490310817956924, 0.43331652879714966, -0.07940708100795746, -0.14781071245670319, -0.6485519409179688, -0.23878756165504456, 0.36722713708877563, -0.08421224355697632, 0.148001894354...
I am having trouble outputting an SQL Select Statement to my XML to be used for my Graph I have these results `December 2011` `470` `FRESENIUS` `January 2012` `434` `FRESENIUS` `February 2012` `278` `FRESENIUS` `February 2012` `2` `STORESID` I need to output them like this so I can loop my Code and generate the X...
[ -0.23782002925872803, 0.4160260260105133, 0.636243999004364, -0.08975816518068314, -0.4254359006881714, 0.1907351016998291, 0.22112268209457397, -0.27640002965927124, -0.40113765001296997, -0.46352317929267883, -0.006670593284070492, 0.26625847816467285, -0.2308875024318695, 0.075199797749...
the second one to generate the XML properly thru PHP which I already have. Or are there any other proper way. Thanks. query below for the output i was talking about ``` SELECT DATENAME(month, orderdate) + ' ' + CAST(Year(orderdate) AS VARCHAR(4)) AS 'Month Year' , count(*) 'Number of Orders', ...
[ 0.04285036772489548, 0.11446980386972427, 0.6969267129898071, -0.05592580512166023, -0.2677866220474243, 0.2625560462474823, 0.06313177943229675, -0.13029082119464874, -0.34007179737091064, -0.25614458322525024, -0.04329198971390724, -0.005406931042671204, 0.2019416242837906, 0.14066220819...
AS VARCHAR(4)), CAST(Year(orderdate) AS VARCHAR(4)) + RIGHT('0' + CAST(Month(orderdate) AS VARCHAR(2)),2) ORDER BY storerkey, CAST(Year(orderdate) AS VARCHAR(4)) + RIGHT('0' + CAST(Month(orderdate) AS VARCHAR(2)),2) ``` Do the testing in your development environment, not on the live site.
[ 0.6050723791122437, 0.38527312874794006, 0.2131754606962204, -0.08840475976467133, 0.169205904006958, 0.06581080704927444, 0.4953024685382843, -0.5172342658042908, 0.08996151387691498, -0.19245560467243195, -0.5262472629547119, 0.24487756192684174, -0.025865769013762474, 0.1623539328575134...
In sql, how to get the starting and ending date of week for the particular month. Can you help me. The following will work whatever you consider the first day of the week (sunday, monday etc), just ensure you use `SET DATEFIRST` if you want to change from the default. `SET DATEFIRST 1` will make the first day of the we...
[ 0.22479556500911713, -0.17225593328475952, 0.49589529633522034, 0.024745041504502296, 0.007517312187701464, -0.16351550817489624, 0.10523127764463425, -0.14094886183738708, -0.14805836975574493, -0.35058295726776123, -0.11812586337327957, 0.3391893804073334, -0.18811553716659546, -0.028831...
different to what I have given above. If you want the day of the week of the first and last of the month this will do the trick: ``` SELECT DATENAME(WEEKDAY, DATEADD(DAY, 1 - DATEPART(DAY, GETDATE()), GETDATE())) [FirstDayOfMonth], DATENAME(WEEKDAY, DATEADD(DAY, - DATEPART(DAY, DATEADD(MONTH, 1, GETDATE())), ...
[ -0.03480677306652069, -0.023254211992025375, 0.7567657232284546, -0.14748510718345642, 0.0754682868719101, 0.1988244652748108, -0.010281805880367756, -0.12024801224470139, -0.2555204927921295, -0.5672687292098999, -0.22149716317653656, 0.34302085638046265, -0.022920051589608192, 0.14839820...
When i enter another activity to insert new item into the database,return and then go in that activity it gives me an error: ``` 04-03 18:53:26.914: E/Database(18134): Leak found 04-03 18:53:26.914: E/Database(18134): java.lang.IllegalStateException: /data/data/com.app.myapp/databases/BabyApp.db SQLiteDatabase created...
[ 0.10042938590049744, 0.39985641837120056, 0.5322546362876892, -0.11753425002098083, 0.13582448661327362, 0.4589155614376068, 0.6461372375488281, -0.6290690302848816, -0.3694138526916504, -0.59825199842453, -0.20550331473350525, 0.4613874852657318, -0.48246002197265625, 0.21113696694374084,...
db.open(); ``` Make sure you do execute `db.close();` in order to close your database before switching to another activity ``` @Override protected void onStop() { super.onStop(); //closing database connection if(db != null) db.close(); } ```
[ 0.11923884600400925, 0.04352644830942154, 0.5529242157936096, -0.26082971692085266, 0.20644138753414154, -0.3235807716846466, 0.5712777376174927, -0.2560822069644928, 0.012205551378428936, -0.516899824142456, -0.49682798981666565, 0.45073214173316956, -0.6596556305885315, 0.546371996402740...
I'm looking for a way to attach some specific build parameter to a scheduled trigger. The idea is that we are continuously building debug versions of our products. Our nightly build has to be a release build, though. The build configurations for most of our projects is absolutely the same. It even has a configuration ...
[ 0.6349897384643555, 0.14377209544181824, 0.3481908142566681, 0.2596080005168915, 0.28518643975257874, -0.4062165915966034, 0.0028176167979836464, 0.005471135023981333, -0.1856052279472351, -0.3639908730983734, -0.06737830489873886, 0.710759699344635, -0.4291069507598877, -0.039113260805606...
I just don't seem to get a solution for my problem! I need to import this into SQL Server. The 2nd column (and a few more) from a .CSV MySQL export contains the tstamp field, which I need converted. I created the table, but the bulk import did not work. Got the following error message Msg 4864, Level 16, State 1, Line...
[ -0.1273987889289856, 0.2178804725408554, 0.4594474732875824, -0.04774134233593941, -0.10749982297420502, 0.0698244720697403, 0.3876452147960663, -0.0365440659224987, -0.34115028381347656, -0.44057711958885193, 0.012671761214733124, 0.47551581263542175, -0.5137246251106262, 0.00331903179176...
row 3, column 1 (tstamp). Herewith the code. ``` -- Recreate the table CREATE TABLE [Majestic].[dbo].hdiyouth (tstamp datetime NOT NULL ) GO -- Bulk insert the data from csv file -- Ensure the file(s) is/are closed! BULK INSERT [Majestic].[dbo].hdiyouth FROM 'C:\Path\CSV\hdiyouth.csv' WITH ( FIRSTROW = 2, FIELDTERM...
[ -0.35348910093307495, -0.141310453414917, 0.7851817607879639, 0.18786025047302246, -0.026325510814785957, 0.16742680966854095, 0.4764563739299774, -0.41021549701690674, -0.14426010847091675, -0.7345985174179077, -0.17008787393569946, 0.5033138394355774, -0.15782365202903748, -0.14117249846...
dt unique_day speed 1 1990-01-01 00:00:00 01-01 7.054124 2 1990-01-01 01:00:00 01-01 2.202591 3 1990-01-01 02:00:00 01-01 4.111633 4 1990-01-01 03:00:00 01-01 2.687808 5 1990-01-01 04:00:00 01-01 8.643168 6 1990-01-01 05:00:00 01-01 5.499421 ``` To calculate the daily normalen (30 yea...
[ -0.012216895818710327, -0.04791868105530739, 0.6316636800765991, 0.4154360294342041, -0.5711483955383301, 0.1498226672410965, 0.48563843965530396, -0.17067942023277283, -0.35298556089401245, -0.3268108069896698, 0.23610597848892212, 0.5289228558540344, -0.009286484681069851, 0.324488222599...
summarise, mean_speed = mean(speed), .progress = "text") > head(res) unique_day mean_speed 1 01-01 5.314061 2 01-02 5.677753 3 01-03 5.395054 4 01-04 5.236488 5 01-05 5.436896 6 01-06 5.544966 ``` This takes just a few seconds on my humble two core AMD, so I suspect just go...
[ 0.19880475103855133, 0.25615382194519043, 0.6809748411178589, 0.37575384974479675, 0.08571448177099228, -0.23990434408187866, 0.4433409571647644, -0.27230238914489746, 0.019640084356069565, -0.8124542236328125, 0.1896568238735199, 0.6879676580429077, 0.3911019563674927, 0.00006402113649528...
`ddply` calls for different aggregations (month, season etc) can be done separately.
[ 0.4600425958633423, -0.26979538798332214, 0.5053743720054626, -0.17354048788547516, -0.2516634166240692, 0.07981119304895401, 0.23479364812374115, -0.3608156740665436, -0.45717692375183105, -0.4059624969959259, -0.01876014843583107, -0.12622638046741486, -0.35955533385276794, 0.14036700129...
I have 2 projects in my solution: project A and B. I added a dll reference to my project A. Now when i build the project A the dll is copied to the project A output directory. Now if i reference project to project A from project B, the dll is newer copied to projects B output folder. Why is that? Is this by design fro...
[ 0.6169042587280273, 0.1231699213385582, 0.3491039276123047, 0.05675448104739189, -0.17705129086971283, 0.14755897223949432, 0.20418274402618408, -0.3896729052066803, -0.29058682918548584, -0.7101230025291443, -0.0009185278904624283, 0.41784659028053284, -0.16991546750068665, 0.532059073448...
that the app wouldn't run. The other projects (components and so on) are bulding to a central binary folder and are not copying their references, becuase they were taken from there. This saves a huge amount of build time.
[ 0.4897586703300476, 0.16728372871875763, 0.2771139144897461, 0.25804632902145386, 0.3249775469303131, -0.007360018324106932, 0.4266814887523651, -0.032868921756744385, -0.06645495444536209, -0.35869333148002625, -0.13661064207553864, 0.547822117805481, -0.28831425309181213, 0.0787673220038...
I am currently learning Java and I have faced this problem where I want to load a file that consists a huge number of lines (I am reading the file line by line ) and the thing I want to do is skip certain lines (pseudo-code). ``` the line thats starts with (specific word such as "ABC") ``` I have tried to use ``` ...
[ 0.3111928403377533, 0.07393212616443634, 0.2202308475971222, -0.16470666229724884, -0.12323874235153198, -0.08530749380588531, 0.340844988822937, -0.1404566615819931, -0.09735038876533508, -0.5369084477424622, -0.03816251456737518, 0.26912277936935425, -0.4425896406173706, 0.01629083044826...
File data= new File(dataFile); if (data.exists()) { br = new BufferedReader(new FileReader(dataFile)); while ((thisLine = br.readLine()) != null) { if (thisLine.length() > 0) {
[ -0.013798038475215435, -0.17213311791419983, 0.7589555978775024, -0.40279489755630493, 0.4294237196445465, 0.000544012407772243, -0.034507185220718384, -0.4882003664970398, -0.2719689905643463, -0.49838656187057495, -0.4109935462474823, 0.47446203231811523, -0.2604425251483917, 0.434326171...
tmpLine = thisLine.toString(); tmpLine2 = tmpLine.split(......); [...] ``` Try ``` if (line.toUpperCase().startsWith(­"ABC")){ //skip line } else { //do something } ``` This will converts the `line` to all the Upper Characters by using function `toUpperCase()` and wil...
[ 0.16799022257328033, -0.6041760444641113, 0.8254746198654175, -0.3200285732746124, 0.11913612484931946, 0.1761893481016159, 0.3926624059677124, -0.5230598449707031, -0.3866312503814697, -0.3822641372680664, -0.44260746240615845, 0.3453463613986969, -0.5623629689216614, -0.24296145141124725...
will do nothing(skip the line) and go into the `else` part. You can also use `startsWithIgnoreCase` which is a function provided by the [Apache Commons](http://commons.apache.org/) . It takes the two string arguments. ``` public static boolean startsWithIgnoreCase(String str, ...
[ 0.16442297399044037, -0.39793872833251953, 0.37768611311912537, 0.1468932330608368, 0.2550837993621826, -0.2190200686454773, 0.058867111802101135, -0.05651792883872986, 0.09624291211366653, -0.6164425611495972, -0.3570738732814789, 0.5491934418678284, -0.28744664788246155, -0.1972266286611...
, case insensitive.
[ -0.5008875131607056, 0.0242867860943079, -0.10222901403903961, -0.2122371345758438, -0.31162795424461365, 0.347627192735672, 0.5826573967933655, 0.4143521189689636, -0.11346866190433502, -0.4729680120944977, -0.48955267667770386, 0.4911697208881378, -0.22374333441257477, 0.0069485562853515...
I am trying to assign an array of unsigned short depending on a condition. The problem I encounter is the following (according to the code below) : error C2057: constant expression expected error C2466: impossible to allocate array with constant size 0 error C2133: 'packet' : unknown size ``` unsigned int lengt...
[ 0.2185477614402771, 0.07552078366279602, 0.02482370287179947, -0.3645866811275482, -0.1265949308872223, 0.2490350604057312, 0.6085165143013, -0.6108970046043396, -0.2101074457168579, -0.4290635585784912, 0.060681138187646866, 0.5115720629692078, -0.5033256411552429, 0.23880459368228912, ...
can't use vectors to replace my array. Do you have any idea ? Yup, dynamically allocated arrays: ``` unsigned short* packet = new unsigned short[length/2]; ``` You can't specify the size of an automatic-storage allocated array at run-time. You also have to free up the memory yourself: ``` delete[] packet; ```
[ 0.1552027463912964, -0.12334603816270828, 0.08918898552656174, 0.13680951297283173, -0.04461618885397911, 0.038394320756196976, 0.24455532431602478, -0.15275728702545166, -0.4101533889770508, -0.4983415901660919, 0.06590506434440613, 0.5335692763328552, -0.4315181076526642, 0.2290724217891...
I have written this code in javascript however I have to make it work using JQuery, I have included both the javascript function and the jquery attempt but i can't figure out what is wrong with my jquery attempt could someone please help me? Javascript working: ``` function done() { var valid = document.getElemen...
[ 0.4166969656944275, 0.14798885583877563, 0.5384009480476379, 0.028755608946084976, 0.2759529948234558, -0.24621140956878662, 0.2840815782546997, -0.614765465259552, -0.12872323393821716, -0.5112705826759338, -0.21887929737567902, 0.8379141092300415, -0.25406140089035034, 0.1599801033735275...
at least 5 characters long. $("#text2").done(function(){ var value = $(this).val(); if (value.length >= 5) { $("#one").append("<div class='done'></div>"); } }); ``` Yup, dynamically allocated arrays: ``` unsigned short* packet = new unsigned short[length/2]; ``` Y...
[ -0.050656069070100784, -0.20433303713798523, 0.3859676718711853, -0.18109095096588135, 0.1075386106967926, 0.41368478536605835, 0.34290337562561035, -0.46924102306365967, -0.3271162211894989, -0.4408140480518341, -0.24495333433151245, 0.4681348502635956, 0.09415965527296066, -0.02360450476...
I have declared a static string "drivePath" in Gloabal.asax.cs. In Onstart event of webrole I am assigning a value to it. I am accessing this value on my web page but it shows as if the variable is just declared. The value I get for the My code is as follows **Global.asax.cs** ``` public static string drivePath = str...
[ -0.045011747628450394, 0.06766994297504425, 0.7315574288368225, -0.3110702931880951, -0.015482485294342041, 0.036906566470861435, -0.009388591162860394, 0.19074831902980804, -0.21877829730510712, -0.4306865930557251, -0.19799533486366272, 0.8015642166137695, -0.5428089499473572, 0.45987904...
getting value as string.Empty. My question is Why is not preserving the value of drive path? What do I have to do, if I want to preserve the value of drivepath and get it? Please help me Thanks in advance. OnStart (Role) is in another process than your web page (pages, Global.asax ..). At least when using [Full IIS ...
[ -0.12592297792434692, -0.35767459869384766, 0.6312593221664429, 0.13213957846164703, 0.0033550849184393883, -0.25508514046669006, 0.37408772110939026, 0.11907581984996796, -0.18243364989757538, -0.6851561665534973, -0.1671181321144104, 0.9185211062431335, -0.017884094268083572, 0.137957930...
I have the following delegate method which is listening for when text changes in an editable field: -(void)controlTextDidEndEditing:(NSNotification \*)aNotification{ Say, I have two NSTextFields declared, how can I find out which is the NSTextField that generated the notification? I want to perform some code when one...
[ -0.020758194848895073, -0.07406344264745712, 0.17379038035869598, -0.0632467195391655, -0.30345606803894043, -0.0410015769302845, 0.4096384346485138, -0.031109865754842758, -0.27250078320503235, -0.7787908911705017, -0.14053875207901, 0.45036861300468445, -0.17719122767448425, 0.0704499483...
I am developing a webapp and am using [**jQuery fullcalendar plugin**](http://arshaw.com/fullcalendar/). I need to somehow disable certain time-slots. The current method I am using is to add events for the time-slots I want to disable and disallow event overlapping. Is there a better way to do this? I rather not dis...
[ 0.43887344002723694, 0.15601174533367157, 0.23195810616016388, 0.02310328371822834, 0.10554884374141693, -0.11407118290662766, 0.14187438786029816, 0.1586271971464157, -0.2114519476890564, -0.9514505863189697, 0.01114677544683218, 0.6024251580238342, -0.40677177906036377, 0.122307874262332...
in the same way as the eventSources; just point to an url and send the to be colored ranges back with ajax/json. The bounty I am about to add is for this last problem (colourized slot ranges, as well in day and week view). If someone can suggest me to another solution then full calendar that can do this, that's also f...
[ 0.4184761643409729, -0.17571580410003662, 0.4804883897304535, 0.22768479585647583, -0.24667800962924957, 0.008016981184482574, -0.11557821184396744, 0.3365739583969116, -0.5508891344070435, -0.8079628944396973, 0.18963183462619781, 0.4565249979496002, -0.04944828152656555, -0.1365532577037...
able to add background colors to timeslot ranges. I changed the method freeBusyRender as follows: ``` freeBusyRender: function(freeBusy, $freeBusy, calendar) { if(freeBusy.free == 't_red') { $freeBusy.css("backgroundColor", "red"); } else if(freeBusy.free == 't_green') { $freeBusy.css("backgrou...
[ 0.19113947451114655, -0.5351126194000244, 0.41929903626441956, -0.20500615239143372, 0.16568417847156525, 0.07496943324804306, 0.1270810216665268, 0.07628494501113892, -0.3138122260570526, -0.7470281720161438, -0.4765377938747406, 0.5106735229492188, -0.7550933361053467, -0.039151035249233...
return $freeBusy; } ``` Then, I can initialize the calendar as follows: ``` (function($) { d = new Date(); d.setDate(d.getDate() - (d.getDay() - 3)); year = d.getFullYear(); month = d.getMonth(); day = d.getDate(); var eventData2 = { options: { timeslotsPerHour: 4, ...
[ 0.42598533630371094, -0.3358467221260071, 0.6454859375953674, -0.2802455425262451, 0.22781437635421753, 0.1723119169473648, 0.14029861986637115, -0.18602442741394043, -0.005989508703351021, -0.4786693751811981, -0.233364075422287, 0.553927481174469, -0.01163480244576931, 0.3414085507392883...
} }, events: [ { 'id': 1, 'start': new Date(year, month, day, 12), 'end': new Date(year, month, day, 13, 00), 'title': 'Lunch with Sarah'}, { 'id': 2, 'start': new Date(year, month, day, 14), 'end': new Date(year, month, day, 14, 40), 'title': 'Team Meeting'}, { 'id':...
[ -0.15784595906734467, 0.026057438924908638, 0.39937692880630493, 0.19552403688430786, 0.5130828619003296, 0.4562336504459381, 0.3535034656524658, 0.369088739156723, -0.3770742416381836, -0.4775375425815582, -0.19367578625679016, 0.17958353459835052, 0.2288954257965088, 0.24955108761787415,...
18), 'end': new Date(year, month, day + 1, 18, 40), 'title': 'Meet with Joe'}, { 'id': 4, 'start': new Date(year, month, day - 1, 8), 'end': new Date(year, month, day - 1, 9, 20), 'title': 'Coffee with Alison'}, { 'id': 5, 'start': new Date(year, month, day + 1, 14), 'end': new Date(year, month,...
[ 0.6826257705688477, 0.0074901399202644825, 0.6308448314666748, 0.3789001703262329, 0.32223087549209595, 0.19021067023277283, 0.336547315120697, 0.35540375113487244, 0.0832018330693245, -0.4268975555896759, -0.429728239774704, 0.40474778413772583, 0.17622670531272888, 0.5088394284248352, ...
{ 'start': new Date(year, month, day - 1, 8), 'end': new Date(year, month, day - 1, 18), 'free': 't_red'}, { 'start': new Date(year, month, day, 8), 'end': new Date(year, month, day + 0, 18), 'free': 't_green' }, { 'start': new Date(year, month, day + 1, 8), 'end': new Date(year, month, day + 1,...
[ 0.21421846747398376, -0.07208412885665894, 0.2661512792110443, 0.16807566583156586, 0.24261707067489624, 0.42956995964050293, 0.30900266766548157, 0.014996088109910488, -0.5087726712226868, -0.3391991853713989, -0.6223911046981812, 0.17693407833576202, 0.0039758640341460705, 0.506550967693...
{ 'start': new Date(year, month, day + 2, 14), 'end': new Date(year, month, day + 2, 18), 'free': 't_black'}, { 'start': new Date(year, month, day + 3, 8), 'end': new Date(year, month, day + 3, 18), 'free': 't_red' } ] }; $(document).ready(function() { var $calendar = $('#calendar')....
[ 0.11913828551769257, -0.18068107962608337, 0.8598560094833374, -0.04709766432642937, 0.6213648915290833, 0.15709161758422852, 0.09080999344587326, -0.2606296241283417, -0.31135424971580505, -0.4521996080875397, -0.48569291830062866, 0.6092095375061035, -0.20902322232723236, 0.2442108541727...