text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
} else { alloc = 0; } } } /// Destructor ~GArray() {
[ -0.1525421142578125, -0.1672011911869049, 0.038322921842336655, -0.35787928104400635, 0.255307674407959, 0.02969612553715706, 0.5214223861694336, -0.046051785349845886, 0.09828829765319824, -0.5316176414489746, -0.5326107144355774, 0.8518542647361755, -0.49169325828552246, 0.40806663036346...
Length(0); } /// Returns the number of used entries uint32 Length() const { return len; } /// Sets the length of available entries bool Length(uint32 i) { if (i > 0) { if (i > len && fixed)
[ -0.06233848258852959, -0.2043660432100296, 0.47015315294265747, -0.21314728260040283, -0.061529725790023804, 0.28626659512519836, 0.10386908054351807, -0.3797270357608795, -0.3076973557472229, -0.2967270016670227, -0.21639448404312134, 0.5165650844573975, -0.0948014184832573, 0.19664083421...
return false; uint nalloc = alloc; if (i < len) { // Shrinking } else
[ 0.15580043196678162, -0.41092729568481445, 0.11815428733825684, -0.3501262366771698, 0.22321817278862, 0.3241577446460724, 0.44527682662010193, -0.053941212594509125, -0.2749949097633362, -0.22189100086688995, -0.19226758182048798, 0.6016005277633667, -0.18482662737369537, 0.17798236012458...
{ // Expanding int b; for (b = 4; (1 << b) < i; b++) ;
[ -0.006129749119281769, -0.16060949862003326, 0.30752265453338623, -0.6919349431991577, 0.46479275822639465, 0.31146180629730225, 0.26704004406929016, -0.3271002471446991, -0.087494857609272, -0.3089117705821991, -0.5621435642242432, 0.43187835812568665, -0.37070780992507935, -0.07280373573...
nalloc = 1 << b; LgiAssert(nalloc >= i); } if (nalloc != alloc) { Type *np = (Type*)malloc(sizeof(Type) * nalloc);
[ -0.2542485296726227, -0.17276211082935333, 0.29209503531455994, -0.3051108419895172, 0.2521805763244629, 0.24372334778308868, 0.09099523723125458, -0.26463747024536133, -0.3420085310935974, -0.29554247856140137, -0.5456347465515137, 0.5679574608802795, -0.3878457248210907, 0.20874352753162...
if (!np) { return false; } if (p) {
[ -0.29850855469703674, -0.03596222400665283, -0.07507174462080002, -0.049402814358472824, 0.0005882598925381899, 0.19518913328647614, 0.35292959213256836, -0.30013084411621094, 0.31616872549057007, 0.2749161720275879, -0.5747167468070984, 0.5929896235466003, -0.2662215232849121, -0.31955561...
// copy across common elements memcpy(np, p, min(len, i) * sizeof(Type)); free(p); } p = np;
[ -0.009987486526370049, -0.15050573647022247, 0.017077596858143806, 0.09400057792663574, 0.1292407363653183, 0.16159045696258545, 0.4011496901512146, -0.35604041814804077, -0.0646137148141861, -0.3044217824935913, -0.35711899399757385, 0.33042359352111816, -0.5591065883636475, -0.0100130941...
alloc = nalloc; } if (i > len) { // zero new elements memset(p + len, 0, sizeof(Type) * (i - len));
[ -0.14810271561145782, -0.23616217076778412, 0.14186277985572815, -0.17956846952438354, 0.19065579771995544, 0.14989447593688965, 0.21388931572437286, -0.3892980217933655, -0.2784407138824463, -0.3034273087978363, -0.30196547508239746, 0.4160325825214386, -0.3126640319824219, -0.00488543324...
} len = i; } else { if (p) { int Length = len;
[ -0.06090836599469185, -0.6023829579353333, 0.17033663392066956, -0.4195301830768585, -0.018413282930850983, 0.21148094534873962, 0.18719026446342468, -0.328125, -0.18913915753364563, -0.06109365448355675, -0.36528053879737854, 0.6492676138877869, -0.08919907361268997, -0.15648232400417328,...
for (uint i=0; i<Length; i++) { p[i].~Type(); } free(p); p = 0;
[ -0.09304675459861755, -0.32706689834594727, 0.40874168276786804, -0.2990383803844452, 0.1738407164812088, 0.15647929906845093, 0.509646475315094, -0.5660778880119324, 0.22798345983028412, -0.37972399592399597, -0.40713292360305786, 0.36267176270484924, -0.4396910071372986, -0.1230549737811...
} len = alloc = 0; } return true; } GArray<Type> &operator =(const GArray<Type> &a) { Length(a.Length()); if (p && a.p) { for (int i=0; i<len; i++)
[ -0.0621393658220768, -0.37174883484840393, 0.0843232125043869, -0.3962545394897461, 0.03344709798693657, 0.3377509117126465, 0.4492361843585968, -0.4562031626701355, -0.19577385485172272, -0.1779092699289322, -0.27846798300743103, 0.5702798366546631, -0.5296033620834351, 0.1626870036125183...
{ p[i] = a.p[i]; } } return *this; } /// \brief Returns a reference a given entry. /// /// If the entry is off the end of the array and "fixed" is false, /// it will grow to
[ 0.09511615335941315, 0.031852155923843384, 0.5898870229721069, -0.24076063930988312, 0.17936363816261292, 0.148811474442482, 0.05566756799817085, -0.12623831629753113, -0.1966010332107544, -0.4632636606693268, -0.21988838911056519, 0.3837195336818695, -0.24136191606521606, 0.49237200617790...
make it valid. Type &operator [](uint32 i) { static Type t; if ( i < 0 || (fixed && i >= len) ) {
[ 0.3072166442871094, -0.5559276342391968, 0.4380932152271271, -0.04442082718014717, 0.265070378780365, -0.09142238646745682, 0.19678546488285065, -0.26426565647125244, 0.17312829196453094, -0.08906202018260956, -0.44374212622642517, 0.6410126686096191, -0.34502464532852173, 0.07819468528032...
ZeroObj(t); return t; } #if 0 if (i > 15000000) { #if defined(_DEBUG) && defined(_MSC_VER) LgiAssert(0); #endif
[ 0.07961219549179077, -0.502627432346344, 0.549890398979187, -0.15534570813179016, 0.3119516968727112, -0.07744026184082031, 0.2862856388092041, -0.2891426980495453, -0.1771349459886551, -0.23300564289093018, -0.15281954407691956, 0.4635302424430847, -0.24722744524478912, 0.3108853399753570...
ZeroObj(t); return t; } #endif if (i >= alloc) { // increase array length uint nalloc = max(alloc, GARRAY_MIN_SIZE);
[ 0.15807488560676575, -0.5307618379592896, 0.21622993052005768, -0.3743271827697754, 0.1853933334350586, 0.10765556991100311, 0.5175285339355469, -0.23034414649009705, -0.11939053237438202, -0.27166858315467834, -0.2422674596309662, 0.654872715473175, -0.3225872814655304, 0.1815096288919448...
while (nalloc <= i) { nalloc <<= 1; } // alloc new array Type *np = (Type*) malloc(sizeof(Type) * nalloc); if (np)
[ -0.23218286037445068, -0.18468448519706726, 0.28558728098869324, -0.20278581976890564, 0.10633356124162674, 0.26400503516197205, 0.19363358616828918, -0.4047931432723999, -0.34922292828559875, -0.3437744081020355, -0.3598770499229431, 0.5021070241928101, -0.3420735001564026, 0.121399477124...
{ // clear new cells memset(np + len, 0, (nalloc - len) * sizeof(Type)); if (p) { //
[ -0.042163871228694916, -0.18817807734012604, 0.24175092577934265, -0.15003861486911774, 0.3618462383747101, 0.22838710248470306, 0.11333722621202469, -0.275307834148407, -0.3546920120716095, -0.31887850165367126, -0.43040376901626587, 0.2684626579284668, -0.25506922602653503, -0.1115488633...
copy across old cells memcpy(np, p, len * sizeof(Type)); // clear old array free(p); }
[ 0.10790488868951797, -0.04447959363460541, 0.2855972349643707, -0.10766217112541199, 0.30325454473495483, 0.02373654767870903, 0.2397749423980713, -0.272632360458374, -0.2966998219490051, -0.4467095732688904, -0.3390387296676636, 0.45343172550201416, -0.5469401478767395, 0.2139517366886139...
// new values p = np; alloc = nalloc; } else { static Type *t = 0;
[ -0.07565101236104965, -0.26766204833984375, 0.013712689280509949, -0.18442213535308838, 0.13015492260456085, 0.08396995067596436, 0.32525262236595154, -0.24063748121261597, -0.14993776381015778, -0.11259922385215759, -0.4914597272872925, 0.6945515871047974, -0.37635549902915955, -0.0278870...
return *t; } } // adjust length of the the array if (i + 1 > len) { len = i + 1; }
[ 0.10182322561740875, -0.657744288444519, 0.1632697433233261, -0.3082456588745117, -0.23475921154022217, 0.16637879610061646, 0.3706308603286743, -0.3411678373813629, -0.20112885534763336, -0.24735303223133087, -0.1130652204155922, 0.5414971113204956, -0.15389321744441986, -0.00873877666890...
return p[i]; } /// Delete all the entries as if they are pointers to objects void DeleteObjects() { for (uint i=0; i<len; i++) { DeleteObj(p[i]); } Length(0); } /// Delete all the entries as if they are pointers to arrays
[ -0.22100631892681122, -0.25910869240760803, 0.2731914520263672, -0.19885654747486115, -0.12045247852802277, 0.4015737771987915, 0.296526700258255, -0.17095457017421722, -0.38675379753112793, -0.1600109040737152, -0.39583146572113037, 0.47071579098701477, -0.41486743092536926, 0.32075905799...
void DeleteArrays() { for (int i=0; i<len; i++) { DeleteArray(p[i]); } Length(0); } /// Find the index of entry 'n' int IndexOf(Type n) { for (uint i=0; i<len; i++) {
[ -0.1294463723897934, -0.3228190839290619, 0.4618688225746155, -0.25166019797325134, 0.052358228713274, 0.5020903944969177, 0.30652162432670593, -0.3774934411048889, -0.2800498604774475, -0.2539481818675995, -0.11276189237833023, 0.4817459285259247, -0.24254180490970612, 0.3725913465023041,...
if (p[i] == n) return i; } return -1; } /// Returns true if the item 'n' is in the array bool HasItem(Type n) { return IndexOf(n) >= 0; } /// Deletes an entry bool DeleteAt ( /// The
[ -0.053651608526706696, 0.0784657821059227, 0.27802470326423645, -0.30192622542381287, 0.15829767286777496, 0.11560624837875366, 0.3044143617153168, -0.4666508436203003, -0.24743519723415375, -0.32930898666381836, -0.46812501549720764, 0.27582547068595886, -0.1992223709821701, 0.36156907677...
index of the entry to delete uint Index, /// true if the order of the array matters, otherwise false. bool Ordered = false ) { if (p && Index >= 0 && Index < len) { // Delete the object
[ -0.3220527768135071, -0.30408191680908203, 0.5460984706878662, -0.08275564759969711, 0.05181878060102463, 0.24120499193668365, 0.3030480444431305, -0.12446600943803787, -0.06844929605722427, -0.030176883563399315, -0.46214476227760315, 0.47614961862564087, -0.2713925540447235, 0.2388581782...
p[Index].~Type(); // Move the memory up if (Index < len - 1) { if (Ordered) {
[ -0.20913319289684296, -0.26990264654159546, 0.5283501148223877, -0.1891908496618271, 0.1860700100660324, 0.3600465953350067, -0.11218549311161041, -0.3784928619861603, -0.35069146752357483, -0.3028498888015747, -0.37255439162254333, 0.46640744805336, -0.23036712408065796, 0.050273429602384...
memmove(p + Index, p + Index + 1, (len - Index - 1) * sizeof(Type) ); } else { p[Index] = p[len-1];
[ -0.20862476527690887, -0.34168246388435364, 0.5079271793365479, -0.18218320608139038, 0.15739305317401886, 0.229768306016922, 0.09064580500125885, -0.288751482963562, -0.1839430183172226, -0.2169368416070938, -0.3511514961719513, 0.7079680562019348, -0.5993713736534119, -0.0314211174845695...
} } // Adjust length len--; return true; } return false; } /// Deletes the entry 'n' bool Delete ( ///
[ -0.06774991005659103, -0.20094236731529236, 0.06901413947343826, -0.33212384581565857, 0.11924852430820465, 0.15618111193180084, 0.3775043785572052, -0.17244800925254822, -0.2536170482635498, 0.06995522975921631, -0.2643962800502777, 0.5356258749961853, -0.19217243790626526, 0.302977234125...
The value of the entry to delete Type n, /// true if the order of the array matters, otherwise false. bool Ordered = false ) { int i = IndexOf(n); if (p && i >= 0) { return DeleteAt(i, Ordered);
[ -0.12572848796844482, -0.17480239272117615, 0.45089417695999146, -0.35354214906692505, 0.2842978537082672, 0.28833070397377014, 0.4232787489891052, -0.4080682694911957, -0.13290485739707947, -0.09666275233030319, -0.5025332570075989, 0.5134714841842651, -0.2984450161457062, 0.2090193182229...
} return false; } /// Appends an element void Add ( /// Item to insert const Type &n ) { (*this)[len] = n; } /// Appends multiple elements void Add (
[ 0.18098527193069458, -0.18513426184654236, 0.024806151166558266, -0.30920490622520447, -0.005736042745411396, 0.3839123249053955, 0.29651525616645813, -0.5416436195373535, -0.20346327126026154, -0.25087231397628784, -0.08238277584314346, 0.48396623134613037, -0.5914949774742126, -0.0026388...
/// Items to insert Type *s, /// Length of array int count ) { if (!s || count < 1) return; int i = len; Length(len + count); Type *d = p
[ -0.018181312829256058, -0.45803946256637573, 0.311737060546875, -0.17995338141918182, -0.02890310436487198, 0.39675554633140564, 0.22900617122650146, -0.6374573111534119, -0.1957850605249405, -0.34980544447898865, -0.5574597716331482, 0.2777470648288727, -0.211002379655838, 0.0506209209561...
+ i; while (count--) { *d++ = *s++; } } /// Inserts an element into the array bool AddAt ( /// Item to insert before int Index, /// Item to insert
[ -0.0468827486038208, -0.208332359790802, 0.277863085269928, -0.4347933828830719, -0.041093211621046066, 0.23403087258338928, 0.0712018758058548, -0.5838667154312134, 0.05098544433712959, -0.27968886494636536, -0.31753572821617126, 0.22257374227046967, -0.5065619349479675, -0.02258976176381...
Type n ) { // Make room if (Length(len + 1)) { if (Index < len - 1) { // Shift elements after insert point up one
[ -0.15855881571769714, -0.38291117548942566, 0.11895880103111267, -0.21264728903770447, -0.015208366326987743, 0.2638391852378845, -0.09306708723306656, -0.5255730152130127, -0.1904716193675995, -0.2823701798915863, 0.009033706970512867, 0.12424226105213165, -0.26931533217430115, 0.21741418...
memmove(p + Index + 1, p + Index, (len - Index - 1) * sizeof(Type) ); } else if (Index >= len) { // Add at the end, not after the end...
[ -0.1258135586977005, -0.254723459482193, 0.5666596293449402, -0.25482434034347534, 0.08699069172143936, 0.15660104155540466, 0.040296200662851334, -0.2819046080112457, -0.24501022696495056, -0.29229676723480225, -0.3040161728858948, 0.6322762370109558, -0.3341001272201538, -0.0550549253821...
Index = len - 1; } // Insert item p[Index] = n; return true; } return false; } /// Sorts the array void Sort(int (*Compare)(Type*, Type*))
[ -0.04076610133051872, -0.3576015830039978, 0.2854078412055969, -0.201187402009964, -0.15907029807567596, 0.4667002260684967, 0.001965535804629326, -0.4744158983230591, -0.1975744068622589, -0.3689161539077759, -0.16516779363155365, 0.2391699105501175, -0.30513304471969604, 0.21850694715976...
{ typedef int (*qsort_compare)(const void *, const void *); qsort(p, len, sizeof(Type), (qsort_compare)Compare); } /// \returns a reference to a new object on the end of the array Type &New() { return (*this)[len]; } /// Returns the memory held by the array and sets its...
[ 0.0626225546002388, 0.019403014332056046, 0.4429073631763458, -0.33429932594299316, 0.14553752541542053, 0.16092106699943542, 0.1411374807357788, -0.30202898383140564, -0.1684466302394867, -0.26951533555984497, -0.30850768089294434, 0.48569414019584656, -0.6159728765487671, 0.3537893891334...
Type *Ptr = p; p = 0; len = alloc = 0; return Ptr; } }; ``` I've reused this code in the EXE in several places. However when I use it in one particular file I start getting duplicate symbol link errors: ``` 2>lgi8d.lib(Lgi8d.dll) : error LNK2005: "public: int __thiscall GArray<char *>::Le...
[ 0.30824029445648193, -0.008333212696015835, 0.2824041247367859, -0.1781078279018402, 0.06046796217560768, 0.0326232835650444, 0.5418347120285034, -0.41540855169296265, -0.3529805541038513, -0.47890710830688477, 0.1367865949869156, 0.3484944701194763, -0.6146304607391357, 0.3851712644100189...
without error. e.g. in Camera.cpp I have: ``` void DeleteFromArray(GArray<char> &a, int Start, int Len) { assert(Len >= 0); int64 StartTs = LgiCurrentTime(); int Del = min(Len, a.Length() - Start); if (Del > 0) { int Remain = a.Length() - Start - Del; if (Remain > 0) { ...
[ 0.04055977612733841, -0.642940878868103, 0.6149337291717529, -0.4055367112159729, 0.34023651480674744, 0.2960622012615204, 0.3743234872817993, -0.22996088862419128, -0.5391474366188049, -0.3749232888221741, -0.3962094783782959, 0.5925160646438599, -0.19945283234119415, 0.323442280292511, ...
MoveBytes += Remain; a.Length(Start+Remain); } else a.Length(Start); } int64 End = LgiCurrentTime(); DeleteTime += End - StartTs; } ``` which compiles and links ok... but in FrameStore.cpp: ``` void Scan() { if (!Init) { Init = true; GAutoString Path =...
[ 0.016011616215109825, -0.5493910312652588, 0.8341488838195801, -0.35300835967063904, 0.341306209564209, 0.053348932415246964, 0.39464110136032104, -0.43140026926994324, -0.4311527907848358, -0.5729604363441467, -0.3139209449291229, 0.42080065608024597, -0.5189730525016785, 0.22843562066555...
GAutoPtr<GDirectory> Dir(FileDev->GetDir()); GArray<char*> k; int64 Size = 0; for (bool b = Dir->First(Path); b; b = Dir->Next()) { if (!Dir->IsDir()) { char *e = LgiGetExtension(Dir->GetName());
[ -0.2264592945575714, -0.5294330716133118, 0.4569151699542999, -0.34207719564437866, 0.3220168948173523, 0.12458157539367676, 0.05254945158958435, -0.31027859449386597, 0.16633015871047974, -0.5650117993354797, -0.40874043107032776, 0.6891096234321594, -0.4757881462574005, 0.091303139925003...
if (e && !stricmp(e, "mjv")) { char p[MAX_PATH]; Dir->Path(p, sizeof(p)); k.Add(NewStr(p));
[ -0.10958589613437653, -0.2886301875114441, 0.6303030848503113, -0.35863202810287476, 0.3876056671142578, 0.24014584720134735, 0.4417300224304199, -0.251404732465744, -0.015392331406474113, -0.5038584470748901, -0.5776686668395996, 0.5401170253753662, -0.39086902141571045, 0.097153887152671...
Size += Dir->GetSize(); } } } GAutoPtr<Prog> p(new Prog(Size)); for (int i=0; i<k.Length(); i++) { Files.Add(new FrameFile(k[i], p)); }
[ 0.0357268787920475, -0.4545610547065735, 0.6275021433830261, -0.4057839512825012, 0.077723927795887, 0.4188990592956543, 0.11657882481813431, -0.7695690989494324, -0.2692551910877228, -0.6424197554588318, -0.28984418511390686, 0.5935347676277161, -0.45653846859931946, -0.02108188159763813,...
k.DeleteArrays(); } } ``` Causes the link error on the line with "k.Length()" in it... if I comment out that it links! Yet I'm using other methods in the GArray class in the same code and they don't cause a problem. Why should a template class thats defined entirely in a header be having this issue in the first ...
[ 0.004088171292096376, -0.11843065172433853, 0.43075722455978394, -0.06017521396279335, -0.1816677451133728, -0.07979629188776016, 0.21006622910499573, -0.04352561756968498, -0.35860517621040344, -0.5794060826301575, -0.1396673023700714, 0.40234366059303284, -0.635201096534729, 0.4849973917...
__declspec(dllimport) #endif class LgiClass GToken : public GArray<char*> { /// stuff... }; ``` The solution: Include that GToken header in my EXE, specifically the FrameStore.cpp file that uses the GArray implementation, then the compile will import those symbols from the DLL instead of duplicate them. It wou...
[ 0.11017448455095291, 0.06640209257602692, 0.11631925404071808, 0.137602299451828, 0.1300799399614334, -0.15743638575077057, 0.20836187899112701, 0.1327964961528778, -0.2569507658481598, -0.5595406889915466, -0.10930044203996658, 0.3694024980068207, -0.6304578185081482, 0.33483487367630005,...
I have run into a problem wherein we keep having complex SQL queries go out with errors. Essentially this results in sending mail to the incorrect customers and other 'problems' like that. What is everyone's experience with creating SQL queries like that? We are creating new cohorts of data every other week. So here ...
[ 0.772715151309967, 0.47566279768943787, -0.09483928978443146, 0.007348467595875263, 0.03632887825369835, 0.13918665051460266, 0.40146753191947937, 0.06393816322088242, -0.12437234073877335, -0.3768949806690216, 0.4336698353290558, 0.2693994343280792, -0.04628881439566612, 0.332513391971588...
10 years ago; it wasn't documented and therefore we only know about it after the data is extracted. * **Create Venn diagrams and data maps** This seems to be a solid way to test the design of a query, however it doesn't guarantee that the implementation is correct. It gets the developers planning ahead and thinking of ...
[ 0.15380053222179413, 0.0003028578939847648, 0.2324807047843933, 0.15878091752529144, -0.2462366670370102, -0.1504712700843811, 0.3439403176307678, 0.14891394972801208, -0.4820457398891449, -0.4415302276611328, 0.26346075534820557, 0.1516929715871811, -0.21088439226150513, 0.359762400388717...
your queries,** just like you decompose your functions. This makes them shorter, simpler, easier to comprehend, *easier to test*, easier to refactor. And it allows you to add "shims" between them, and "wrappers" around them, just as you do in procedural code. How do you do this? By making each significant thing a quer...
[ 0.08028320223093033, 0.22047840058803558, -0.010520575568079948, 0.3508658707141876, -0.31826403737068176, 0.062192175537347794, 0.14732787013053894, -0.18410296738147736, -0.22082695364952087, -0.5921080112457275, -0.08703456819057465, 0.5686972737312317, -0.042085569351911545, -0.0448005...
some you won't; so what? Premature optimization is the root of all evil. Code correctly first, *then* optimize if you need to.) [Here's an example of using several view to decompose a complicated query.](https://stackoverflow.com/questions/702500/sql-query-to-collapse-duplicate-values-by-date-range/712309#712309) In...
[ 0.15990738570690155, 0.24631819128990173, 0.30966123938560486, -0.033110808581113815, -0.03259745240211487, 0.29278039932250977, 0.4498741328716278, -0.08098696917295456, -0.12013323605060577, -0.4343186318874359, 0.03607134521007538, 0.46201470494270325, 0.01184383500367403, 0.23462881147...
specification for the new, calculated column: > We'll do that as a linear transform, such that it sorts the same as (year, month), and such that for any (year, month) tuple there is one and only value, and all values are consecutive: ``` create view cm_absolute_month as select *, year * 12 + month as absolute_month ...
[ 0.07267721742391586, -0.05444921553134918, 0.7463831901550293, 0.26516616344451904, 0.012196126393973827, 0.1895994246006012, 0.0489543192088604, -0.31540390849113464, -0.09479990601539612, -0.4573822617530823, -0.15221107006072998, 0.31380003690719604, 0.08559586107730865, 0.1927694678306...
test name and a case statement catenated together. The test name is just an arbitrary string. The case statement is just `case when` test statements `then 'passed' else 'failed' end`. The test statements will just be SQL selects (subqueries) that must be true for the test to pass. Here's our first test: ``` --a sel...
[ 0.2766518294811249, 0.04862869158387184, 0.28771841526031494, 0.26741474866867065, 0.11232029646635056, -0.09229535609483719, 0.1584284007549286, 0.04659751057624817, 0.2846022844314575, -0.2881340980529785, -0.2098691612482071, 0.3456555902957916, 0.0862928256392479, 0.37042859196662903, ...
value -- that must be equal for the test to pass ( select count(distinct year, month) from month_value) --expected value, = ( select count(distinct absolute_month) from cm_absolute_month) -- actual value -- the then and else branches of the case statement then 'passed' else 'failed' end -- close the c...
[ 0.06586813181638718, 0.1997387856245041, 0.5483900308609009, 0.05648978427052498, 0.16777287423610687, 0.18733328580856323, 0.4401092231273651, -0.3819425702095032, 0.05202643945813179, -0.2148853838443756, -0.3675038814544678, 0.4318452775478363, 0.09621820598840714, 0.3823346197605133, ...
works. We can add a test for sufficient test data, too: ``` select concat( 'Sufficient and sufficiently varied month_value test data: ', case when ( select count(distinct year, month) from month_value) > 10 and ( select count(distinct year) from month_value) > 3 and ... more tests then 'passed' else ...
[ -0.0016335754189640284, 0.056843969970941544, 0.6161470413208008, 0.12827223539352417, 0.24703235924243927, 0.10723039507865906, 0.37071192264556885, -0.39006224274635315, -0.15146781504154205, -0.4259772002696991, -0.14524132013320923, 0.5311710834503174, 0.3340896666049957, 0.05572501197...
or (a.month = 12 and b.month = 1 and a.year + 1 = b.year) ) where a.absolute_month + 1 <> b.absolute_month ) = 0 then 'passed' else 'failed' end ); ``` Now let's put our tests, which are just queries, into a file, and run the that script against the database. Indeed, if we store our view definitions in a script (o...
[ 0.48072630167007446, 0.21563977003097534, 0.5454657077789307, -0.10555782169103622, 0.12565802037715912, 0.09139230847358704, 0.36512312293052673, -0.17648698389530182, 0.05741431936621666, -0.48895275592803955, 0.004964602179825306, 0.47469383478164673, 0.20195098221302032, 0.246807992458...
view's tests. That way, we both get regression tests when we re-create views, and, when the view creation runs against production, the view will will also be tested in production.
[ 0.28809043765068054, 0.03262663260102272, -0.035685762763023376, 0.3741607964038849, -0.13486087322235107, 0.4760902225971222, -0.13948442041873932, -0.29029878973960876, 0.07308712601661682, -0.4724768400192261, 0.04812546446919441, 0.7921230792999268, 0.026044199243187904, 0.230099305510...
I have the following code that uses 'paste' and AWK script inside Perl. ``` use strict; use Data::Dumper; use Carp; use File::Basename; my @files = glob("result/*-*.txt"); my $tocheck = $ARGV[0] || "M"; foreach my $file ( @files ) { my $base = basename($file,".txt"); my @res = `p...
[ 0.12786243855953217, -0.058617837727069855, 0.6363598704338074, -0.4107983112335205, -0.06730370968580246, 0.2762179374694824, 0.4470333755016327, -0.027497561648488045, 0.12517641484737396, -0.7272807955741882, -0.28894755244255066, 0.4258902668952942, -0.252177894115448, 0.47876775264739...
print "$base $res[0]\n"; } ``` Why it gives such error: ``` #sh: -c: line 1: syntax error near unexpected token `(' #sh: -c: line 1: `paste <(awk '$4 == "M" {sum += $2 }END{print sum}' result/9547_1-S_aureus.txt ) <(awk '$4 == "M" {sum += $3 }END{print sum}' #result/9547_1-S_aureus.txt) ``` What's the corre...
[ 0.20950450003147125, -0.07458063215017319, 0.4405132532119751, -0.18963000178337097, 0.006857574917376041, 0.09943754971027374, 0.6117503046989441, -0.32967695593833923, 0.04206981882452965, -0.48974964022636414, -0.23645532131195068, 0.6847904324531555, -0.25076961517333984, -0.0390108563...
warnings; use strict; use File::Basename; my @files = glob ("result/*-*.txt"); foreach my $file (@files) { open (FILE, $file) or die "open $file: $!\n"; # You seem to be summing the 2nd and 3rd columns if the 4th is "M" my ($col1, $col2) = (0, 0); while (<FILE>) { my @cols = split /\s+/; if ...
[ 0.09864885360002518, -0.18521584570407867, 0.44286441802978516, -0.3033071458339691, -0.04075483977794647, 0.15346865355968475, 0.47280362248420715, -0.2598199248313904, -0.2805781364440918, -0.3497351408004761, -0.16257858276367188, 0.4598311185836792, -0.5214618444442749, 0.0240978691726...
+= $cols[1]; $col2 += $cols[2]; } } close FILE; printf "%s %d\n", basename ($file), $col1; } ```
[ -0.34961453080177307, 0.12064441293478012, 0.48803359270095825, -0.46082010865211487, 0.11900074779987335, 0.13184979557991028, 0.06301635503768921, -0.1464356929063797, 0.020159244537353516, -0.4453904330730438, -0.6694818139076233, 0.36580896377563477, -0.5916816592216492, 0.100856035947...
I'm working on Cocoa Application that should be able to analyze and highlight a source code written in such languages as Objective-C, SQL, JavaScript, Python etc. The text should be editable too (by using NSTextView, for example). Please advise what is the best way to implement such feature in Mac OS X 10.5. There is...
[ 0.3113730251789093, 0.3554220199584961, 0.10633020102977753, 0.2101600617170334, -0.11754687875509262, -0.27200955152511597, 0.14430111646652222, 0.3100568354129791, -0.2895462214946747, -0.8500101566314697, -0.2424677163362503, 0.6916037797927856, -0.18205443024635315, -0.2149334996938705...
evaluated them in depth): * /Developer/Examples/OpenGL/Cocoa/GLSLEditorSample implements syntax highlighting. * [IDEKit](http://projects.gandreas.com/idekit/), “an open-source framework that provides programmer source code editing, including syntax coloring, popup functions, and split frames”. This hasn’t been updated...
[ 0.29612576961517334, -0.22031262516975403, 0.21969902515411377, 0.031321387737989426, -0.3683823347091675, 0.07883148640394211, 0.1433321088552475, -0.10837280750274658, -0.07149627059698105, -0.7772234082221985, -0.29582008719444275, 0.28323185443878174, -0.3540479242801666, -0.0039058597...
I am trying to pull data from DBF files into my program using C#. I am using the Visual FoxPro OLE DB Provider. It works fine on my local machine but I want to package up my program into dll that clients can use. The problem is when they run the program from their machine it says that the Visual FoxPro OLE DB Provider ...
[ 1.0048222541809082, 0.7376300692558289, -0.007247024215757847, 0.034575920552015305, -0.22660183906555176, -0.2189950942993164, 0.5742918848991394, 0.10929088294506073, 0.08355146646499634, -0.20370253920555115, 0.2278679758310318, 0.6835781931877136, -0.30299437046051025, 0.42193573713302...
can do that without installing the Visual FoxPro OLE DB Provider on each target machine. Even if you tried to use COM interop you would still have to install and register the original dll - vfpoledb.dll By far the easiest way to solve this issue is is to get the [FoxPro OleDb Driver install package](http://www.microso...
[ 0.3694816529750824, 0.23193992674350739, 0.09713972359895706, 0.2746117115020752, -0.24938423931598663, 0.002799337962642312, 0.20850610733032227, -0.1541469842195511, -0.07419253140687943, -0.6593742370605469, -0.00314857205376029, 0.5961699485778809, -0.3664809763431549, 0.00314110028557...
to the MSI Script. Add an 'Execute Program from Destination' custom action after InstallFinalize in the Execute Immediate tab. When the 'Execute Program From Destination' dialog appears enter: ``` Custom Action Name: <registerdll> Working Directory: SystemFolder EXE and Command Line: Enter the full path to regsvr32....
[ -0.057597871869802475, -0.28708338737487793, 0.7749884128570557, -0.08138914406299591, 0.171785369515419, 0.08252375572919846, 0.2920154333114624, -0.17659571766853333, -0.3650267720222473, -0.8590600490570068, -0.43976861238479614, 0.5070430040359497, -0.33164557814598083, 0.1641853153705...
I am developing a JSF web application on a Windows box using Emacs as my editor but I far prefer to use Emacs in a Linux environment. In the (somewhat distant) past it was a no-brainer to use a remote X display to accomplish this very useful programming aid. Cygwin helps out somewhat but true remote X is the preferred ...
[ 0.279581218957901, 0.2372300624847412, 0.47716569900512695, 0.19365088641643524, -0.4495454728603363, -0.10239521414041519, -0.021594755351543427, 0.41934922337532043, -0.31032249331474304, -0.6053985357284546, -0.019549952819943428, 0.39496910572052, -0.32740771770477295, 0.46250906586647...
xhost and the firewall configurations that make remote X more difficult than convincing Barry Kelley that this type of question is TRULY programming related. Now, I am running Fedora 10 with an XFCE environment and KDM as my display manager. I have turned the firewall off, selinux off, enabled XDMCP (in /etc/kde/kdm/k...
[ 0.038713619112968445, 0.4355565905570984, 0.77918940782547, -0.2876964211463928, -0.2500632703304291, -0.17796021699905396, 0.1905190646648407, 0.061416853219270706, -0.16651619970798492, -0.6903512477874756, -0.14318399131298065, 0.7056151628494263, -0.3851028084754944, 0.2535064518451690...
one from Bryan Childs. For once I confirmed that "$ ps -ef | grep X" showed the -nolisten tcp arguments on the X command it was a no-brainer to go from there to grep for "-nolisten" under /etc (Emacs' rgrep to be precise) where I found the culprit in /etc/kde/kdm/kdmrc:457 where "ServerArgsLocal=-br -nolisten tcp" was ...
[ -0.007120578084141016, 0.06391125172376633, 0.24989725649356842, 0.2540939748287201, -0.19501832127571106, -0.09370256960391998, 0.05384404584765434, 0.20425628125667572, -0.3878086805343628, -0.15830937027931213, -0.14990445971488953, 0.40903833508491516, -0.4468371868133545, 0.0787158831...
Is it possible to read a session value with Javascript? For example, if I assigned a value into a session in PHP: ``` $_SESSION['msg'] = "ABC Message"; ``` Is it possible to read `$_SESSION['msg']` with Javascript? $\_SESSION is a server-side construct. You would need to store that variable in $\_COOKIE to be able ...
[ 0.21357949078083038, 0.06739673018455505, 0.07913506031036377, -0.2012217491865158, -0.30616652965545654, -0.04788125306367874, 0.3131283223628998, 0.05908048897981644, -0.1391715556383133, -0.4516727030277252, 0.1853688359260559, 0.46202558279037476, -0.5141459107398987, 0.101045452058315...
I understand that 64-bit is the best. However, I've heard that there may be compatibility problem with 32-bit programs. Is this compatibility issue a major enough issue for me getting a 32-bit OS or is 64-bit Windows Vista still better, despite the compatibility issue? I will mostly be using this for development purpo...
[ 0.03937114030122757, 0.4509122371673584, 0.2651841640472412, 0.3032655417919159, 0.10611023753881454, -0.40623489022254944, 0.060267213732004166, 0.19907015562057495, 0.034684330224990845, -0.6790046691894531, -0.04820321500301361, 1.1700910329818726, -0.18138660490512848, 0.13391409814357...
How would you explain to some one how indexes improve the performance of the database when used judiciously ? I am looking for a good, clear explanation since it's too complex out there in the books. Bear with me, this will take awhile :-). Think of a simple address book where you just add records on the end as new fr...
[ 0.6101197004318237, 0.4486869275569916, -0.12430746853351593, 0.19591765105724335, 0.8968106508255005, 0.004023164045065641, 0.31900647282600403, 0.11565881222486496, -0.1903160810470581, -0.8431922197341919, -0.04379303380846977, 0.027078568935394287, -0.28300783038139343, -0.139702498912...
``` Now you need to find someone's address. No trouble, I hear you say, just scan the list looking for the name, then read off the address. Now, what if you're so stunningly popular that you have 1,024 friends like me (I'm such a geek, I only allocate friends in powers of two - I actually have 2,024 but 1,000 of them...
[ 0.5656169056892395, 0.25541380047798157, 0.3385017216205597, 0.21241985261440277, 0.21832238137722015, -0.232216015458107, 0.11957740783691406, 0.29395419359207153, -0.5289809107780457, -0.5335609316825867, -0.43386271595954895, 0.4397689700126648, -0.12918995320796967, 0.09343358129262924...
all 1,024 of them to find the last person you added. Now let's add that index. Every time you add a new friend/colleague (or delete them if they cause you too much trouble), you update this index which stores just the name in sorted order along with the line number of the full entry (the index pages in your address bo...
[ 0.5271944403648376, 0.5239051580429077, 0.42302629351615906, -0.03127097710967064, 0.12029283493757248, 0.32917287945747375, 0.26218381524086, 0.14155243337154388, -0.4318063259124756, -0.21830007433891296, -0.1705281138420105, 0.3937329947948456, -0.3658401072025299, -0.021188797429203987...
but the most important aspect is this. In order to find an entry, you only have to scan, worst case, 10 entries (log21024). First, you check index number 512. If the name you're looking for is greater than that, you only have to look at entries 513-1024. If it's less, you're now only interested in entries 1-511. In ei...
[ -0.008018857799470425, 0.20911020040512085, 0.32605522871017456, 0.16600482165813446, 0.0683857798576355, 0.28799065947532654, 0.0854327455163002, -0.10339564830064774, -0.7118604183197021, -0.7303629517555237, -0.17829880118370056, 0.23740153014659882, -0.00044820603216066957, 0.320979684...
used powers of two for the indexed method but it's slightly better than that): ``` +-----------+----------------+------------+ | Iteration | Indexed method | Old method | +-----------+----------------+------------+ | 0 | 1024 | 1024 | | 1 | 512 | 1023 | | 2 | ...
[ -0.6649640202522278, -0.018061131238937378, 0.6620197892189026, -0.02566632255911827, 0.062469154596328735, 0.17386041581630707, 0.003715619444847107, -0.5491328835487366, -0.4390004277229309, -0.5131325721740723, -0.10675592720508575, 0.4263245463371277, -0.4254296123981476, 0.14696870744...
| 1022 | | 3 | 128 | 1021 | | 4 | 64 | 1020 | | 5 | 32
[ -0.8434967398643494, 0.6246175765991211, 0.15464487671852112, -0.13749291002750397, 0.046205099672079086, 0.22681565582752228, 0.500639796257019, -0.2818145751953125, -0.16719147562980652, -0.2869834005832672, -0.44976606965065, 0.16449539363384247, -0.4811437726020813, -0.0032768361270427...
| 1019 | | 6 | 16 | 1018 | | 7 | 8 | 1017 | | 8 | 4 |
[ -0.534904956817627, 0.9093331694602966, 0.20728905498981476, -0.46531203389167786, -0.15990398824214935, 0.4425903558731079, 0.6157577633857727, -0.0856861099600792, -0.17197953164577484, 0.04219125583767891, -0.4571003317832947, 0.1670140027999878, -0.44313690066337585, -0.253437668085098...
1016 | | 9 | 2 | 1015 | | 10 | 1 | 1014 | +-----------+----------------+------------+ ``` Once you've found the index, extract the line number from it and, because you know you've got 16 entries per page, entry number 275 (for example) is on page
[ -0.5320206880569458, 0.6874913573265076, 0.7927510142326355, -0.2429535686969757, 0.14217257499694824, 0.5420418977737427, 0.1544623225927353, -0.2850140333175659, -0.41051867604255676, -0.5311954617500305, -0.43675917387008667, 0.08309479057788849, -0.31348907947540283, 0.1424322575330734...
18, line 4. You can go straight there without further searching. So, at the cost of a little more storage space and some time maintaining the index, you've *greatly* increased the speed of your searches. And that's what indexes do in databases as well.
[ 0.39235639572143555, 0.10499616712331772, 0.3687150180339813, 0.22667279839515686, 0.05910910665988922, -0.16742751002311707, 0.08093450218439102, 0.329193115234375, -0.24979089200496674, -0.6611362099647522, 0.0035538028459995985, 0.32249611616134644, -0.02448197454214096, 0.1066446006298...
I have 2 columns: "string" "int" I set both as primary keys for unique combination. Would searching based on the string column be poorer than normalizing further the string column and having 2 int columns instead? Do you expect to have lots of duplicate strings? If no, then normalizing will yield nothing. If yes, t...
[ -0.1100216954946518, 0.10337049514055252, 0.30114200711250305, 0.03515477851033211, -0.34654560685157776, 0.19204843044281006, 0.21819572150707245, -0.280902624130249, -0.09672725945711136, -0.5979286432266235, 0.25706711411476135, 0.38982683420181274, -0.3676720857620239, 0.36994320154190...
if you already have an index on both columns, and are comparing both of them, you are receiving the full benefit of the index.
[ 0.24782110750675201, 0.1477743238210678, 0.37280064821243286, 0.18609479069709778, 0.04239010065793991, 0.028680026531219482, -0.08990130573511124, -0.008162722922861576, -0.10180962085723877, -0.6577251553535461, -0.1188410148024559, 0.482661634683609, 0.11375627666711807, -0.019665839150...
I would like to create a url just like followings : * <http://localhost/news/announcement/index> * <http://localhost/news/health/index> * <http://localhost/news/policy/index> announcement, health, policy are controller so I make a new url route map like this : ``` routes.MapRoute( "News", "news/{controller}/{acti...
[ 0.2491292655467987, -0.12872475385665894, 0.5043439269065857, 0.26295772194862366, -0.5110394954681396, -0.2929857075214386, 0.22603219747543335, 0.07438737154006958, -0.1693536788225174, -1.0366867780685425, -0.07090447843074799, 0.2816275954246521, 0.06017367169260979, 0.0715505331754684...
"{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); ``` Or add a constraint: ``` routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" },
[ -0.3541489541530609, -0.46961840987205505, 0.6425468325614929, 0.23269861936569214, 0.25686198472976685, 0.21633589267730713, -0.07701263576745987, -0.1712428331375122, -0.39990735054016113, -0.8244670033454895, -0.5259789228439331, 0.15892815589904785, -0.656875729560852, 0.00251719844527...
new { controller = "(Home|Other)" } ); ``` The constraint will allow the default route to match only controllers Home and Other, but not Announcment, Health, or Policy (or anything else for that matter).
[ -0.1380753219127655, -0.32985931634902954, 0.7939904928207397, 0.08269309252500534, 0.3556750416755676, -0.1429896205663681, 0.14969539642333984, -0.20063097774982452, -0.27832773327827454, -0.8569076657295227, -0.4168406128883362, 0.26437607407569885, -0.35370656847953796, 0.3228667974472...
I have a fairly standard ASP.NET GridView that displays 2 columns that have a parent child relationship. Although the relationship exists in the database between column A and column B, the GridView does not implement it. I would like to do the following: When the user has elected to edit the row, 2 dropdown menus beco...
[ 0.19171108305454254, 0.23363494873046875, 0.4033450782299042, -0.2017638087272644, 0.039109617471694946, 0.30898723006248474, 0.181666299700737, -0.013844111002981663, -0.04976774379611015, -0.862959086894989, 0.09289130568504333, 0.18855085968971252, -0.2274528592824936, 0.218849420547485...
functionality outside of the grid, could even have a selected row event display a modal popup allowing me to edit the fields accordingly, but would like to keep this contained to the grid. This is how you should so It. 1.) Goto Column editor of the GridView. And convert the Column to Template which you want to display...
[ 0.18379110097885132, -0.33116695284843445, 0.5181885957717896, 0.03964785113930702, -0.12594027817249298, -0.1687796413898468, 0.07346232235431671, -0.33268722891807556, 0.0037115979939699173, -0.7496129274368286, -0.08174692094326019, 0.702213704586029, -0.23451848328113556, -0.2437247335...
have TextBox there. 4.) Remove the TxtBox and put a DropDownList there. You need to configure the DropDownList to populate the data from Foreign Table by using ObjectDataSource or SqlDataSource. The Value prop. of the DropDownList should be set to P.Key of the ForeginTable. 5.) Now, bind the SelectedValue field to th...
[ -0.14129163324832916, -0.24896714091300964, 0.8258088231086731, 0.08156609535217285, -0.19192905724048615, 0.06475947797298431, 0.3421843945980072, -0.3587275743484497, -0.19124670326709747, -0.7729098200798035, -0.3566376864910126, 0.641374409198761, -0.03517797216773033, 0.01141627505421...
How can I get a list (in the form of an `NSArray` or `NSDictionary`) of a given object properties in Objective-C? Imagine the following scenario: I have defined a parent class which just extends `NSObject`, that holds an `NSString`, a `BOOL` and an `NSData` object as properties. Then I have several classes which exte...
[ 0.05378357693552971, 0.03797672316431999, -0.14112073183059692, 0.09148849546909332, 0.014959427528083324, -0.024382807314395905, 0.041218023747205734, -0.026003679260611534, -0.22394639253616333, -0.43718063831329346, -0.05156322941184044, 0.4652586877346039, -0.3668498396873474, 0.083619...
*not* on the parent class, so I can later use these `NSString` for KVC? I just managed to get the answer myself. By using the Obj-C Runtime Library, I had access to the properties the way I wanted: ``` - (void)myMethod { unsigned int outCount, i; objc_property_t *properties = class_copyPropertyList([self class...
[ 0.1487647444009781, -0.1300184279680252, 0.42610660195350647, -0.10937084257602692, 0.11878466606140137, 0.08760146796703339, 0.34481245279312134, -0.5266491174697876, -0.12298854440450668, -0.6429334282875061, -0.3463698923587799, 0.8172112107276917, -0.11360432952642441, 0.39459729194641...
const char *propType = getPropertyType(property); NSString *propertyName = [NSString stringWithCString:propName encoding:[NSString defaultCStringEncoding]];
[ -0.22794029116630554, -0.5147407054901123, 0.20374761521816254, -0.19259357452392578, 0.13548323512077332, 0.13236843049526215, 0.5584622025489807, -0.41715049743652344, 0.10718753188848495, -0.44363099336624146, -0.5887851715087891, 0.7224627137184143, -0.26546406745910645, 0.109536834061...
NSString *propertyType = [NSString stringWithCString:propType encoding:[NSString defaultCStringEncoding]]; ... } }
[ -0.498047798871994, -0.4765811264514923, 0.0865638330578804, -0.14763976633548737, 0.16658902168273926, 0.1245754212141037, 0.4669748842716217, -0.19906005263328552, -0.15585140883922577, -0.5396762490272522, -0.33304473757743835, 0.7311919927597046, -0.2509036362171173, 0.0140178883448243...
free(properties); } ``` This required me to make a 'getPropertyType' C function, which is mainly taken from an Apple code sample (can't remember right now the exact source): ``` static const char *getPropertyType(objc_property_t property) { const char *attributes = property_getAttributes(property); char buff...
[ 0.29467540979385376, 0.04386172443628311, 0.30735352635383606, 0.016500916332006454, 0.11147148162126541, -0.09712369740009308, 0.42905393242836, -0.6918124556541443, -0.17065799236297607, -0.447342187166214, -0.622931957244873, 0.6683813333511353, -0.4405703544616699, 0.17478539049625397,...
break; } return (const char *)[[NSData dataWithBytes:(attribute + 3) length:strlen(attribute) - 4] bytes]; } } return "@"; } ```
[ -0.018692027777433395, -0.10365304350852966, 0.23720675706863403, -0.00852952804416418, 0.3252832591533661, -0.13216179609298706, 0.4266325831413269, -0.22250165045261383, -0.4857240915298462, -0.17538458108901978, -0.49713554978370667, 0.444143146276474, -0.1633184403181076, 0.19610916078...
I have an XML file of size 31 GB. I need to find the total number of lines in that file. I know the command `wc -l` will give me the same. However it's taking too long to perform this operation. Is there any faster mechanism to find the number of lines in a large file? 31 gigs is a really big text file. I bet it would ...
[ 0.2899567782878876, -0.001907261204905808, 0.8096041083335876, 0.06714043766260147, -0.14973418414592743, 0.24183663725852966, 0.28318339586257935, -0.12275810539722443, -0.22639207541942596, -0.7980003952980042, 0.10326513648033142, 0.45802420377731323, -0.18711213767528534, -0.0978915765...
reduce the amount of i/o and memory used to process this file. gzip can read and write compressed streams. But I would also make the following comments: * Line numbers are not really that informative for XML as whitespace between elements is ignored (except for mixed content). What do you really want to know about th...
[ 0.1929091513156891, -0.1411343812942505, 0.17687703669071198, 0.14390967786312103, -0.46863219141960144, -0.2601928114891052, 0.37183478474617004, 0.08909597247838974, -0.3028830885887146, -0.7651269435882568, 0.08523766696453094, 0.48197346925735474, -0.5530546307563782, 0.080459982156753...
looking into something like [Fast Infoset](http://en.wikipedia.org/wiki/Fast_Infoset "Fast Infoset")
[ -0.08598461002111435, -0.6840534806251526, -0.20500294864177704, 0.4568425714969635, 0.2053416669368744, -0.5249516367912292, 0.0019141797674819827, 0.5514077544212341, -0.4484250545501709, -0.700168788433075, -0.2693389058113098, 0.4720920920372009, -0.08891736716032028, -0.21756850183010...
What template do you use for comments on code commit? One example of a template is: 1. (change 1): (source file 1.1, 1.2): (details of change made), (why) 2. (change 2): (source file 2.1): (details of change made), (why) Ideally each change should be mapped to an issue in the issue tracker. Is this template alright...
[ 0.8991233706474304, -0.08595677465200424, -0.0766674056649208, -0.010387244634330273, -0.06978021562099457, -0.14424163103103638, -0.04008764028549194, -0.5222898125648499, -0.37638136744499207, -0.7801263928413391, 0.15108120441436768, 0.6771513819694519, -0.44004717469215393, -0.14496470...
a fan of posting the *what* in your comment, with the *why* and the *how* being detailed elsewhere (ideally in your bug tracking). The why should be the ticket, and upon closing the ticket, you should have some kind of note about how that particular issue was addressed. * A reference to your bug tracking system is good...
[ 0.559655487537384, -0.0638522282242775, 0.08215929567813873, 0.5732197165489197, -0.09495855867862701, -0.4455552101135254, 0.0787062719464302, 0.3152911961078644, -0.30711865425109863, -0.6359387636184692, -0.22043900191783905, 0.5424996614456177, -0.13507263362407684, -0.1411989480257034...
is needed. Even still, complex details probably belong in bug tracking with your implementation notes, not in version control. Files edited, diff details, etc, should hopefully be included with version control, and we don't want to spend time duplicating this. Given these ideas, an example commit comment for me would ...
[ 0.4804118573665619, -0.09403524547815323, 0.15815874934196472, 0.16722752153873444, 0.20083799958229065, -0.32724666595458984, 0.32143664360046387, 0.06234193965792656, -0.2895149290561676, -0.649318277835846, 0.06231614202260971, 0.5798208117485046, -0.22859127819538116, -0.12061374634504...
Does anyone know if/how I can convert a binary formatted Mac OS X plist file to a plain XML string in C#? I know there are some plist editors for Windows available that says they support binary formatted plist files, but I need to do this inline in my own application. I realize this is super old, but I'm posting my so...
[ 0.3820446729660034, 0.31578901410102844, 0.37780049443244934, 0.1410171240568161, -0.11373436450958252, -0.07050304859876633, 0.04527134820818901, 0.3757004737854004, -0.36942407488822937, -0.5942045450210571, 0.23182129859924316, 0.41798534989356995, -0.19715598225593567, 0.01518166158348...
my implementation at <https://github.com/ChadBurggraf/plists-cs>. Hopefully this helps some folks out.
[ 0.25142157077789307, 0.10581448674201965, 0.4509463310241699, -0.06431163102388382, 0.100657619535923, -0.07374230772256851, 0.41901886463165283, 0.4274553954601288, -0.3058156967163086, -0.7672532796859741, 0.07734651118516922, 0.27396684885025024, 0.23691022396087646, -0.0659100562334060...
Due to my feeble understanding of allocating type memory to pointers, the following causes a bus error on the call to barrier\_create ("hi" is never printed). ``` typedef struct barrier barrier_t; typedef struct barrier *barrier_p; barrier_p test_barrier_p; int main(int argc, char *argv[]) { barrier_create(*test...
[ -0.20321209728717804, -0.10948164016008377, 0.6690545082092285, -0.2236158847808838, 0.1867915838956833, 0.17320036888122559, 0.41265133023262024, -0.5444542765617371, 0.019973689690232277, -0.7702350616455078, -0.2904514670372009, 0.3375263214111328, -0.3466601073741913, 0.420221060514450...
new_barrier; return HAPPY_HAPPY_JOY_JOY; } ``` What am I missing or mis-typing? ``` barrier_create(*test_barrier_p); ``` Since `barrier_create` takes address of a `barrier_p`, this should be `&test_barrier_p`, not `*test_barrier_p`. ``` printf("hi\n"); ``` Inaccurate test of code reachability because stdout ...
[ 0.1297534555196762, 0.022330865263938904, 0.3531149625778198, -0.29847022891044617, 0.10007654875516891, 0.06414507329463959, 0.2183983325958252, -0.4096522927284241, -0.1595296710729599, -0.878640353679657, -0.3138984441757202, 0.6548088788986206, -0.2003304362297058, -0.1269582211971283,...