text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
if (!_productPropertyValues.Contains(valueToAdd)) { _productPropertyValues.Add(valueToAdd); } } } /// <summary> /// Delete property from current product /// </summary> /// <param name="valueToDelete">Value to delete</param> public virtual void Del...
[ 0.06423484534025192, -0.065243661403656, 0.5056909322738647, -0.12063512951135635, 0.31613972783088684, 0.3243080675601959, 0.06384679675102234, -0.7229623794555664, -0.31676241755485535, -0.3720266819000244, -0.5390753746032715, 0.4460572600364685, -0.09622776508331299, 0.5549960732460022...
if (valueToDelete != null) { if (_productPropertyValues.Contains(valueToDelete)) { _productPropertyValues.Remove(valueToDelete); } } } /// <summary> /// Adds rate to current product. ///
[ 0.2374810427427292, -0.10753914713859558, 0.5708395838737488, -0.20186680555343628, 0.23532748222351074, 0.1487428843975067, -0.023705406114459038, -0.4689749479293823, -0.046847667545080185, -0.6337581276893616, -0.14729444682598114, 0.5105512738227844, -0.09032772481441498, 0.35349696874...
</summary> /// <param name="rate">The rate.</param> public virtual void AddRate(Rate rate) { if (rate != null) { if (!_rates.Contains(rate)) { _rates.Add(rate); } }
[ 0.43633994460105896, -0.11492234468460083, 0.37301725149154663, -0.08923548460006714, 0.0592399463057518, 0.34217706322669983, -0.10684224963188171, -0.5811112523078918, -0.12643197178840637, -0.5888736844062805, -0.16936755180358887, 0.5939823389053345, -0.319486141204834, 0.1514202803373...
} /// <summary> /// Deletes rate from product. /// </summary> /// <param name="rate">The rate.</param> public virtual void DeleteRate(Rate rate) { if (rate != null) { if (_rates.Contains(rate)) {
[ 0.40621432662010193, -0.22222168743610382, 0.2941522002220154, -0.10532332956790924, 0.16073724627494812, 0.4886471927165985, -0.1425752192735672, -0.5797073841094971, -0.10514930635690689, -0.40383288264274597, -0.16539090871810913, 0.328604519367218, -0.3082880675792694, 0.62406224012374...
_rates.Remove(rate); } } } } ``` and a Rate entity like this: ``` [Class(0, Name = "Rate", Table = "Rates")] public class Rate { [CompositeId(1)] [KeyManyToOne(2, Name = "Product", Class = "Product", Column = "ProductId")] [KeyManyToOne(3, Name = "User", Class = "User", Column = "...
[ 0.28488582372665405, -0.10249271988868713, 0.3850805163383484, -0.17665527760982513, 0.17190133035182953, 0.3320379853248596, -0.32691237330436707, -0.4058123528957367, -0.0050279926508665085, -0.777578592300415, -0.07079187780618668, 0.5003712773323059, -0.2727746069431305, 0.467945933341...
Type = "Int32")] public virtual Int32 Value { get; set; } ``` } And I need to fetch all products with average rating in DESC order. Also it should be filterable by any field from `Product`, e.g. price: from $1000 to $5000. Thanks. Look at [triggers](http://dev.mysql.com/doc/refman/5.0/en/triggers.html) to delete...
[ 0.3176420032978058, -0.15248516201972961, 0.47525110840797424, -0.15179581940174103, 0.0721103847026825, 0.22869960963726044, -0.029964791610836983, -0.5051470994949341, -0.0013602635590359569, -0.49848809838294983, -0.009443838149309158, 0.8210355639457703, -0.06722100079059601, 0.1469557...
I'm currently tinkering at an OpenBSD system with a view to building myself a firewall and some other bits and bobs. As this is fairly experimental (I'm an OpenBSD n00b, and I've already trashed my system 3 or 4 times), I wonder what experience others have of making part or all of the file system (I'm thinking in part...
[ 0.7881207466125488, 0.3351583182811737, -0.1945793628692627, 0.006780506577342749, -0.17327022552490234, -0.054741013795137405, 0.20386002957820892, 0.2492951899766922, -0.46215176582336426, -0.4562813341617584, 0.025800246745347977, 0.3067239224910736, 0.13539935648441315, 0.5032459497451...
interested in the basic vcs functionality than the distributed-or-not argument. * I'd also like to hear about imagined or actual pitfalls people have found. I can imagine the preservation of file ownership and permissions needs careful thought! * And, of course, any alternative approaches not involving VCS [Here](http:...
[ 0.20921756327152252, 0.056950103491544724, 0.035872187465429306, -0.036230579018592834, -0.012670564465224743, -0.20245261490345, 0.1904955506324768, -0.19514702260494232, -0.35895052552223206, -0.4733867943286896, -0.13774703443050385, 0.6319803595542908, 0.10636702179908752, 0.1569106429...
I have a project that compiles and runs fine on my development machine but when I run it on the web server I get the following error. > Parser Error Message: The file '/Views/Shared/Main.master.cs' does not exist. The file mentioned does not exist on the server but the file '/Views/Shared/Main.master' does. I use th...
[ 0.29231467843055725, 0.346689909696579, 0.15506190061569214, -0.08291113376617432, -0.25133466720581055, -0.24365390837192535, 0.4523768126964569, -0.060643214732408524, -0.3771488070487976, -0.8232584595680237, 0.026808857917785645, 0.497408002614975, -0.3669668138027191, 0.38950574398040...
came from an older web application but I don't know what the difference means. If someone else can come up with a better explanation I will accept their answer instead of this one.
[ 0.5200525522232056, 0.166358083486557, 0.17028096318244934, 0.3377991020679474, 0.0724533274769783, 0.16567771136760712, 0.013482638634741306, 0.15874823927879333, 0.2590954601764679, -0.3654341697692871, 0.4377376437187195, 0.14305973052978516, 0.08740302920341492, 0.36827537417411804, ...
I have coordinates from some source and want to tag my jpg files with them. What is the best python library for writing geotags into exif data? [pexif](https://github.com/bennoleslie/pexif) was written with geotags as a goal (my emphasis): > pexif is a Python library for parsing and more importantly editing EXIF data ...
[ 0.391557902097702, 0.06670583039522171, 0.2245868295431137, 0.188154399394989, -0.08748157322406769, -0.08378370851278305, 0.07089690864086151, 0.09523595124483109, 0.04544522240757942, -0.9026479125022888, 0.11445323377847672, 0.19849924743175507, -0.37564903497695923, -0.1445332467555999...
writing this was to provide an easy way for geo-tagging my photos, and the library now seems mature enough to do that.
[ 0.3293306529521942, 0.24299828708171844, 0.42897269129753113, 0.23806151747703552, 0.288847416639328, -0.4109555184841156, -0.06751679629087448, 0.15230660140514374, -0.1404765248298645, -0.48401615023612976, 0.18445466458797455, -0.14802499115467072, 0.21246430277824402, -0.18408158421516...
I heard that AS **boxes** and un-boxes values every time arguments are passed into/out of functions. **A.** Therefore, would this be faster? ``` var val = doWork(50,"hello", 2048); function doWork (param1,param2,param3){ t.text = param2; return param1+param3; } ``` **B.** Or this? ``` var val:Number = doWor...
[ -0.028702322393655777, 0.16833104193210602, 0.47536081075668335, -0.1613270789384842, -0.2110474407672882, 0.4386199116706848, 0.46227744221687317, -0.7333780527114868, -0.331754207611084, -0.3605998754501343, -0.1954999566078186, 0.30089864134788513, -0.4709356725215912, 0.029625933617353...
the same bytecode. AS 3 is run by AVM2, which supports both dynamic and static typing, so declaring types in the code eliminates some runtime lookup, which makes it faster to execute.
[ 0.09610579162836075, 0.06409333646297455, 0.3065979480743408, -0.3959938585758209, -0.3582349419593811, 0.09882732480764389, 0.4387865662574768, -0.40630903840065, -0.0218768659979105, -0.17303773760795593, -0.34316346049308777, 0.4481256604194641, -0.5149160027503967, -0.11369945853948593...
Is there a way to adjust all image sizes in a directory? If I set the max size to 800x600 it will make larger ones smaller and leave smaller ones at their original size. ``` for img in *.png; do convert "$img" "800x600>" $(basename "$img" .png)_new.png done ``` `convert` is from ImageMagick. ">" says it's only r...
[ 0.22585411369800568, -0.24590076506137848, 0.9168769717216492, -0.13840439915657043, 0.10799477994441986, 0.24218714237213135, -0.06919406354427338, -0.27633726596832275, -0.4213123917579651, -0.7927213907241821, -0.027251891791820526, 0.759468674659729, -0.24675218760967255, 0.11133288592...
In c (or maybe c++) , what's the difference between ``` char myarr[16]={0x00}; ``` and ``` char myarr[16]; memset(myarr, '\0', sizeof(myarr)); ``` ?? edit: I ask this because in vc++ 2005 the result is the same.. edit more : and ``` char myarr[16]={0x00,}; ``` ? maybe can get more comprehensive answer ...
[ -0.27337974309921265, -0.016820499673485756, 0.406156986951828, -0.3831043839454651, -0.38043323159217834, 0.11711250990629196, 0.1053876131772995, -0.44124966859817505, -0.18624313175678253, -0.1835387945175171, -0.18874050676822662, 0.5803658366203308, -0.2955377399921417, -0.19566035270...
*false*. If the element type is a class type that's not a so-called *POD* (plain old data-type), then you can only do the first one, because the second one only works for the simplest cases (where you don't have *virtual functions*, user defined constructors and so on). In contrast, the second way using the memset sets...
[ 0.1633875072002411, -0.2013903111219406, -0.016904041171073914, -0.022104492411017418, -0.12392227351665497, -0.061337701976299286, 0.5844235420227051, -0.12598656117916107, -0.014642898924648762, -0.5272550582885742, -0.003549139015376568, 0.5065595507621765, -0.41452106833457947, 0.06869...
which is set to 0 explicitly. If the array is local and on the stack (that is, not a static), the compiler internally often does a memset to clear the array out. If the array is non-local or static, the first version can be *considerably more efficient*. The compiler can put the initializers already, at compile time, i...
[ 0.0017177510308101773, -0.017894534394145012, 0.17227280139923096, -0.17428280413150787, -0.028831036761403084, 0.10018833726644516, 0.23504507541656494, -0.2845168709754944, -0.28630873560905457, -0.36491870880126953, -0.4936251938343048, 0.2230393886566162, -0.3020757734775543, -0.043894...
fast manner (i.e page-wise). The second does a memset explicitly over the whole array. Optimizing compilers will usually replace a memset for smaller regions with inline machine code that just loops using labels and branches. Here is assembler-code generated for the first case. My gcc stuff isn't much optimized, so...
[ -0.15970556437969208, -0.009321840479969978, 0.38844966888427734, 0.14013533294200897, 0.08050030469894409, 0.14407257735729218, 0.353687584400177, -0.20406849682331085, -0.43236255645751953, -0.5525172352790833, -0.240982323884964, 0.2793477177619934, -0.35014358162879944, -0.081075951457...
$31, $29, 84 ; save return address add $4, $29, 16 ; 1st argument is destination, the array. add $5, $0, 0 ; 2nd argument is value to fill add $6, $0, 64 ; 3rd argument is size to fill: 4byte * 16 jal memset ; call memset add $2, $0, 42 ; set first element, a[0], to 42 stw $2, $29,...
[ -0.1705581396818161, 0.06297571957111359, 0.4440286457538605, -0.3344159424304962, 0.2595296800136566, 0.6487669944763184, 0.3864658772945404, -0.2814030051231384, 0.021411629393696785, -0.32649004459381104, -0.4434353709220886, 0.45067694783210754, -0.47012412548065186, 0.0875761434435844...
$31, $29, 84 ; restore return address add $29, $29, 88 ; destroy stack-frame jr $31 ; return to caller ``` The gory details from the C++ Standard. The first case above will default-initialize remaining elements. `8.5`: > To zero-initialize storage for an object of type T means: > > > * if T is ...
[ -0.03250568360090256, -0.19025270640850067, 0.6443111896514893, -0.033539291471242905, 0.33215686678886414, 0.24363915622234344, 0.2215542197227478, -0.3508773446083069, -0.16309714317321777, -0.17373354732990265, -0.27528971433639526, 0.455430269241333, -0.34365880489349365, 0.20170709490...
data member and each base-class subobject is zero-initialized; > * if T is a union type, the storage for its first data member is zero-initialized; > * if T is an array type, the storage for each element is zero-initialized; > * if T is a reference type, no initialization is performed. > > > To default-initialize an ...
[ -0.26549768447875977, -0.5114895701408386, 0.03830728307366371, 0.15362250804901123, 0.21642084419727325, 0.12701725959777832, -0.04655066132545471, -0.2844896912574768, 0.020525870844721794, -0.6100154519081116, -0.4631914794445038, 0.17342190444469452, -0.49788302183151245, 0.34808641672...
initializers in the list than there are members in the aggregate, > then each member not explicitly initialized shall be *default-initialized* (8.5).
[ -0.1789487600326538, -0.006653836462646723, 0.19361214339733124, -0.09201723337173462, -0.011248420923948288, 0.08937639743089676, 0.24904128909111023, -0.1641276776790619, -0.05603107437491417, -0.6336871385574341, -0.2615569531917572, 0.4433651566505432, -0.2759496867656708, -0.165540114...
Java EE 6 looks exciting. It will include the Servlet 3.0 spec, EJB3.1 Lite, Profiles, JSF2.0 Restful API, JPA2.0 and the WebBeans. I tried to google the scheduled release date for the platform but could not find anything official. Anyone? Or is it just the way it works? As soon as all the JCP expert groups finish the...
[ 0.45688310265541077, -0.2302103489637375, 0.49648475646972656, -0.26424941420555115, -0.31388258934020996, -0.33305126428604126, 0.40567994117736816, 0.1223825141787529, -0.06046081334352493, -0.25053220987319946, -0.19002829492092133, 0.45065104961395264, -0.3683338761329651, -0.268708109...
is a class type that's not a so-called *POD* (plain old data-type), then you can only do the first one, because the second one only works for the simplest cases (where you don't have *virtual functions*, user defined constructors and so on). In contrast, the second way using the memset sets all elements of the array to...
[ -0.19076748192310333, -0.4023389518260956, -0.02721417136490345, 0.09489086270332336, -0.16905471682548523, -0.021246107295155525, 0.0660817101597786, -0.042505696415901184, -0.04086581990122795, -0.7078394889831543, -0.017275141552090645, 0.30386626720428467, -0.47577527165412903, 0.06800...
explicitly. If the array is local and on the stack (that is, not a static), the compiler internally often does a memset to clear the array out. If the array is non-local or static, the first version can be *considerably more efficient*. The compiler can put the initializers already, at compile time, into the generated ...
[ 0.12280578166246414, 0.13465704023838043, 0.04368647187948227, -0.041391097009181976, -0.0956990122795105, -0.041789546608924866, 0.3155481815338135, -0.2873322665691376, -0.1339268684387207, -0.4089326560497284, -0.43638214468955994, 0.33036908507347107, -0.46418288350105286, -0.278207749...
second does a memset explicitly over the whole array. Optimizing compilers will usually replace a memset for smaller regions with inline machine code that just loops using labels and branches. Here is assembler-code generated for the first case. My gcc stuff isn't much optimized, so we got a real call to memset (16 b...
[ -0.061611637473106384, -0.05571800470352173, 0.23679259419441223, 0.005678889807313681, -0.02013312838971615, 0.24768757820129395, 0.30261480808258057, -0.2390829175710678, -0.329441100358963, -0.40747755765914917, -0.10405851155519485, 0.19576461613178253, -0.4110775291919708, 0.111361108...
84 ; save return address add $4, $29, 16 ; 1st argument is destination, the array. add $5, $0, 0 ; 2nd argument is value to fill add $6, $0, 64 ; 3rd argument is size to fill: 4byte * 16 jal memset ; call memset add $2, $0, 42 ; set first element, a[0], to 42 stw $2, $29, 16 ; ldw...
[ -0.1258457452058792, 0.24710451066493988, 0.47162172198295593, -0.5187845230102539, 0.27269911766052246, 0.606916069984436, 0.2962679862976074, -0.33072027564048767, -0.04155497997999191, -0.17774325609207153, -0.4075956642627716, 0.4692290723323822, -0.4732668697834015, 0.0128127383068203...
$29, 84 ; restore return address add $29, $29, 88 ; destroy stack-frame jr $31 ; return to caller ``` The gory details from the C++ Standard. The first case above will default-initialize remaining elements. `8.5`: > To zero-initialize storage for an object of type T means: > > > * if T is a sca...
[ 0.003102140035480261, -0.20259343087673187, 0.61928790807724, -0.010880894027650356, 0.3179246187210083, 0.21635666489601135, 0.2383171170949936, -0.38891422748565674, -0.15014876425266266, -0.22666405141353607, -0.29111742973327637, 0.4646209478378296, -0.414852499961853, 0.21644744277000...
subobject is zero-initialized; > * if T is a union type, the storage for its first data member is zero-initialized; > * if T is an array type, the storage for each element is zero-initialized; > * if T is a reference type, no initialization is performed. > > > To default-initialize an object of type T means: > > > ...
[ -0.4768211245536804, -0.619782567024231, 0.03454411402344704, -0.02673581801354885, 0.16765861213207245, 0.1442321240901947, 0.2603979706764221, -0.1946108043193817, -0.0467560850083828, -0.6477177143096924, -0.5545001029968262, 0.02705567516386509, -0.6776878833770752, 0.3009982407093048,...
there are members in the aggregate, > then each member not explicitly initialized shall be *default-initialized* (8.5).
[ 0.04338959977030754, 0.16827096045017242, -0.0381673164665699, -0.001251816749572754, -0.06472548842430115, 0.19462674856185913, 0.3574944734573364, -0.22109301388263702, -0.028567351400852203, -0.41046276688575745, -0.16703341901302338, 0.12886406481266022, -0.2926974296569824, -0.0693966...
What are my options for rendering graphics encoded by Java2D to vector graphics formats such as EPS, SWF, SVG, VML, PDF and others I might not have heard of yet with open source libraries? [Batik](http://xmlgraphics.apache.org/batik/) is the most widely-used library for rendering SVG. What other options are there? [i...
[ 0.16696950793266296, -0.31347501277923584, 0.21412509679794312, -0.05520494282245636, -0.5384519696235657, 0.10868722200393677, -0.19628676772117615, -0.18619981408119202, -0.01819414272904396, -0.905290424823761, 0.003392646322026849, 0.662098228931427, -0.17946824431419373, -0.3067461550...
but I don't think it has support for Java2D. Regarding iText, although it has extensive capabilities, you can still use it for simple Java2D rendering tasks by way of the [PdfGraphics2D](http://www.1t3xt.info/api/com/lowagie/text/pdf/PdfGraphics2D.html) class. For a short example of how straightforward this is, see th...
[ 0.018283845856785774, -0.3050234317779541, 0.43499600887298584, 0.1409088522195816, -0.2957575023174286, -0.07372651249170303, -0.17196515202522278, 0.09152429550886154, -0.12562578916549683, -0.595598042011261, 0.0705859512090683, 0.5611382722854614, 0.03546009212732315, -0.20781001448631...
In Unix, can I run `make` in a directory without `cd`'ing to that directory first? `make -C /path/to/dir`
[ 0.33377817273139954, -0.04365670308470726, -0.14736346900463104, -0.24640271067619324, 0.35303574800491333, -0.24141792953014374, -0.030200837180018425, 0.31041574478149414, 0.2518664300441742, -0.3131571114063263, -0.0952657088637352, 0.7348634600639343, -0.13303308188915253, -0.008233636...
Two Questions: Will I get different sequences of numbers for every seed I put into it? Are there some "dead" seeds? (Ones that produce zeros or repeat very quickly.) By the way, which, if any, other PRNGs should I use? Solution: Since, I'm going to be using the PRNG to make a game, I don't need it to be cryptograph...
[ -0.02317364700138569, -0.34762898087501526, -0.105547696352005, 0.4508610665798187, -0.05702419579029083, 0.1412741094827652, -0.23635809123516083, -0.020513219758868217, -0.29382050037384033, -0.24796222150325775, 0.2083098590373993, 0.26057547330856323, 0.0655764490365982, 0.220653250813...
bits are not equally random (see my article on [randomness of bit positions](http://www.javamex.com/tutorials/random_numbers/lcg_bit_positions.shtml)) * will only generate a small fraction of *combinations* of values (the famous problem of "[falling in the planes](http://www.javamex.com/tutorials/random_numbers/lcg_pla...
[ 0.07733271270990372, -0.2709082365036011, -0.07953187078237534, 0.36723238229751587, -0.21395711600780487, 0.07730387151241302, -0.1911718249320984, -0.28142157196998596, -0.22326001524925232, -0.3585425317287445, -0.07636917382478714, 0.34077897667884827, -0.2559840977191925, 0.0000357156...
>>> 35); x ^= (x << 4); return x; } ``` For some very cheap operations, this has a period of 2^64-1 (zero is not permitted), and is simple enough to be inlined when you're generating values repeatedly. Various shift values are possible: see George Marsaglia's paper on XORShift Generators for more details. You can...
[ 0.06337669491767883, -0.5573798418045044, 0.10518637299537659, -0.18522827327251434, -0.08163991570472717, -0.09816651791334152, 0.1891842633485794, -0.3915391266345978, -0.4137292802333832, -0.40342435240745544, -0.07440599054098129, 0.29909324645996094, -0.42766132950782776, 0.4554079174...
combine different generators (e.g. feed the output from an XORShift generator into an LCG, then add the result to the output of an XORShift generator with different parameters): this generally allows the weaknesses of the different methods to be "smoothed out", and can give a longer period if the periods of the combine...
[ 0.19039654731750488, -0.5314229130744934, 0.08343295753002167, -0.06534595787525177, 0.09200575947761536, -0.15568487346172333, 0.33165550231933594, -0.6008719205856323, -0.3786209523677826, -0.3398403823375702, -0.1199190691113472, 0.1184844970703125, -0.3248603641986847, 0.13565172255039...
period longer than you really need (some have a period greater than the number of atoms in the universe-- you really don't usually need that). And note that "long period" doesn't necessarily mean "high quality generator" (though 2^48 is still a little bit low!).
[ 0.5322414636611938, -0.35323143005371094, 0.04485613852739334, 0.06174732744693756, 0.09127984195947647, -0.36182668805122375, 0.11675428599119186, 0.017054053023457527, -0.23379294574260712, -0.38926777243614197, -0.1774231642484665, 0.32397952675819397, 0.3105078339576721, 0.315460473299...
Where can I find critical analysis of OpenSource projects? ie: in-depth analysis of methods within the source, a comparison of projects with others, and performance metrics ... I'd like to read something about existing projects that would give me an overview of its design, implementation, strengths and weaknesses, so...
[ 0.4840206205844879, 0.2810918986797333, 0.16383332014083862, 0.3968474864959717, -0.08310960978269577, -0.22456490993499756, 0.0963466614484787, 0.1389530450105667, -0.1059831753373146, -0.4726395905017853, -0.34083232283592224, 0.10740557312965393, 0.10381905734539032, -0.0233491789549589...
of any service/site that does automated method analysis at the code level. Ohloh might eventually convey something like "Mostly OOP", but that would be in the distant future. Almost all reports like the type you mention are done by hand, in a lab and testing a very targeted group .. i.e. comparing performance and codi...
[ 0.702056884765625, -0.004697529133409262, 0.0513959638774395, 0.43120965361595154, -0.041059646755456924, -0.3497560918331146, 0.17856401205062866, 0.43628597259521484, -0.37536853551864624, -0.36456671357154846, -0.21321739256381989, 0.0627618134021759, 0.11238274723291397, -0.07751385122...
compare yourself, but I know of nothing that will do it for you with any degree of reliability.
[ 0.5017867684364319, 0.3366447985172272, -0.23660553991794586, 0.23602205514907837, -0.17678451538085938, 0.4122999310493469, 0.4117218554019928, 0.07185833901166916, 0.1780766248703003, -0.608668327331543, 0.5030775666236877, 0.42889806628227234, 0.20662899315357208, -0.03368275612592697, ...
So I'm just starting out with WPF, and I'm really annoyed by the fact that if I lay two Grids on top of one another, the top Grid isn't opaque. It makes designing extremely annoying. Can this be turned off somehow? I'm just building your standard Winforms STYLE application, but in WPF. I'm just trying to start bridgin...
[ 0.7062426805496216, -0.0763513371348381, 0.4677436649799347, -0.12448684126138687, -0.21317650377750397, -0.04115157574415207, -0.23604543507099152, -0.0513470321893692, -0.1742154359817505, -0.8996617197990417, 0.23499201238155365, 0.31986579298973083, -0.14126509428024292, 0.015547122806...
things must be true here: A) This is not the recommended way to design Windows going forward with WPF, but I don't understand what you're supposed to do B) There is some property to make the Grids opaque so I can build the Window in the style that I'm used to. I'm fine with answers that solve either A or B. If I'm n...
[ 0.8070745468139648, 0.18583548069000244, 0.3508642315864563, 0.08073505759239197, 0.2250499725341797, -0.16299976408481598, 0.4211938679218292, 0.06562967598438263, -0.20922064781188965, -0.5366435647010803, 0.14344941079616547, 0.5466676950454712, 0.06286697089672089, 0.3356949985027313, ...
opposed to sticking with the system colors. You could use [`SystemColors`](http://msdn.microsoft.com/en-us/library/system.windows.systemcolors.aspx) to make the control background colour match (rather than being white). I don't understand why you want to put one grid on top of another though. In WPF you generally use ...
[ 0.5177197456359863, -0.45929980278015137, 0.3818717300891876, 0.12967021763324738, -0.13834813237190247, -0.1770520955324173, -0.11431866884231567, -0.37872180342674255, -0.39049801230430603, -0.7051375508308411, 0.20529089868068695, 0.29421693086624146, -0.2433268278837204, 0.121802680194...
have found that in doing so it's taken some readjustment. WPF has a completely different way of laying things out and now that I'm more comfortable with it, I think it's superior. I'm guessing you just need to ride the learning curve a little longer. Hope that helps. **EDIT:** In response to your comment, I imagine y...
[ 0.5594514012336731, -0.1471671313047409, 0.2926497459411621, 0.4009372293949127, -0.18443088233470917, -0.32006439566612244, 0.04275577887892723, 0.24040499329566956, -0.33967164158821106, -0.4927459955215454, 0.08792717754840851, 0.4439667761325836, -0.035656578838825226, 0.06690531969070...
button, the content is the page item. You can specify a `ControlTemplate` that details how these items should be displayed relative to one another. Interestingly, many other types of common GUI element are also headered controls: * *Menu items* - The menu item text/icon is the header, and the optional submenu is the ...
[ -0.3899918794631958, -0.26614683866500854, 0.45331913232803345, 0.37042757868766785, -0.07248511910438538, 0.2893334627151489, -0.07505334168672562, -0.01994038000702858, -0.11368902772665024, -0.6177780628204346, -0.35129040479660034, 0.3716357946395874, -0.26873525977134705, -0.128785446...
itself. This is quite elegant and can give some wildly different presentation options over the same logical model with only changes to the control template. For more information read about [`HeaderedContentControl`](http://msdn.microsoft.com/en-us/library/ms742541.aspx) and [`HeaderedItemsControl`](http://msdn.microso...
[ -0.10338059067726135, -0.10555852204561234, 0.48711106181144714, 0.3160172402858734, 0.104909248650074, -0.16134652495384216, 0.035207778215408325, -0.19859814643859863, -0.01490388810634613, -0.5454933643341064, -0.37121260166168213, 0.4654289186000824, -0.4337465167045593, 0.035748880356...
Java is supposed to be "write once, run anywhere" and it really can be, but in some cases it turns into "write once, debug everywhere". What are the most common reasons for problems when moving a Java application from one platform to another? What are un-common but interesting reasons? * Don't make assumptions about ...
[ 0.24310007691383362, 0.018285982310771942, -0.2257612943649292, -0.11809802800416946, -0.08790081739425659, -0.5403122901916504, 0.5674300193786621, 0.24845390021800995, -0.3190571069717407, -0.774037778377533, -0.1288304328918457, 0.2718665897846222, -0.39228636026382446, -0.0853032916784...
seen it cause problems)
[ 0.25260862708091736, 0.12963023781776428, 0.03674403578042984, -0.1943982094526291, 0.10186507552862167, 0.02982211485505104, 0.4054885506629944, 0.26229748129844666, -0.3920048475265503, -0.09297075867652893, 0.17564177513122559, 0.5820525288581848, -0.3061951994895935, 0.1493664532899856...
### Duplicate > [Unable to remove everything else in a folder except FileA](https://stackoverflow.com/questions/635378/unable-to-remove-everything-else-in-a-folder-except-filea) I guess that it is slightly similar to this: delete [^Music] However, it does not work. Put the following command to your ~/.bashrc ``` sh...
[ 0.02201385423541069, 0.16040802001953125, 0.4050711989402771, -0.06250357627868652, 0.15783916413784027, -0.11607800424098969, 0.48152127861976624, -0.218888521194458, -0.5377771258354187, -0.37109705805778503, -0.34010523557662964, 0.8501018285751343, -0.5205860733985901, 0.34996870160102...
If I have changed a CSS rule via javascript, do I need to do anything to "refresh" the browser to redisplay the current page using the updated rules? No--a refresh isn't necessary--and if it did occur it would restore the document to its original state. The change should take place immediately (setting display: none,...
[ 0.5246108174324036, 0.022929269820451736, 0.7212235927581787, -0.21767453849315643, 0.06946828216314316, -0.33873045444488525, 0.6184653043746948, -0.285447895526886, -0.12601688504219055, -0.8772673606872559, -0.3323745131492615, 0.7325472831726074, -0.28155121207237244, -0.20607142150402...
Please pardon my C#.Net newbie status. If this is obvious and I missed it from the docs, a link to the relevant page or sample code would be appreciated. I am working on an application that will accept a TCP socket connection from a Java application. (Yes, Java is required on that part. It's a Sun SPOT device and Java...
[ 0.42078039050102234, 0.2521759569644928, 0.3538269102573395, 0.12292449176311493, 0.10502581298351288, -0.1379229575395584, 0.09556829929351807, 0.13301092386245728, -0.2584608197212219, -0.7587026357650757, -0.12140236794948578, 0.528311550617218, -0.0650234967470169, 0.006039664149284363...
data on to another computer running a similar C#.NET app. Here's what I've done so far: Right now the app spins up a thread on launch that opens a socket. The Java app can successfully connect to the socket so that is working. I was looking at the NetworkStream's `beginRead` method and the `dataAvailable`, `length`, a...
[ 0.44663992524147034, -0.016074202954769135, 0.3501673936843872, 0.20184412598609924, 0.13522376120090485, -0.09980301558971405, 0.09632186591625214, 0.16021443903446198, -0.2398410588502884, -0.6749604940414429, -0.15937425196170807, 0.4874110817909241, -0.05486135929822922, 0.257199943065...
passing data rather quickly.) how can I make sure that I am reading only one packet of data at a time? If the Java app null terminates the data when it writes, will that help? Is it enough? Lastly, the socket will only receive one connection, but I need to keep it open until there is an error or the connection is term...
[ 0.15184374153614044, -0.21775895357131958, 0.5101763010025024, 0.1396346241235733, -0.4625333249568939, -0.028488220646977425, 0.5600116848945618, -0.06234696879982948, -0.2281833440065384, -0.7579796314239502, 0.18892210721969604, 0.38661429286003113, -0.36848121881484985, 0.0515810810029...
the Sun SPOT base station. Right now, when the base station terminates, my app dies a loud and painful death. :) Thanks for reading and for any help you can offer. The way we've solved this is to have a combination of sentinel characters and fixed width fields. The first two bytes are a length header for the entire pa...
[ 0.4205188453197479, 0.18809068202972412, 0.7106548547744751, 0.15684419870376587, -0.12277384102344513, -0.05030388757586479, 0.07123854011297226, 0.013123204931616783, 0.005896883551031351, -0.8569235801696777, 0.03459889441728592, 0.465943306684494, -0.28635701537132263, 0.04224454239010...
\n character (0x0A if you're scoring at home). Then, long data fields are processed by reading in 8 consecutive bytes, etc. It seems to be working pretty well for us, but it's obviously a solution for a situation where one has control over both ends of the socket and not where one is only able to control the one end. H...
[ 0.07957738637924194, -0.0959598571062088, 0.13718929886817932, 0.025382984429597855, -0.04899285361170769, 0.2296113520860672, -0.04012607783079147, -0.08388447761535645, -0.29967454075813293, -0.3608150780200958, 0.23667266964912415, 0.2878238260746002, 0.02591678313910961, 0.035243149846...
Here is my script: ``` #!/bin/bash echo "Digite o local em que deseja instalar o IGRAFU(pressione enter para instalar em ${HOME}/IGRAFO):" read caminho if test -z $caminho then caminho="${HOME}/IGRAFO" fi echo "O IGRAFU será instalado no diretório: $caminho" mkdir -pv $caminho mv -v ./* $caminho echo "Pronto!" ``...
[ -0.17375853657722473, 0.3765912353992462, 0.5780529379844666, -0.24253548681735992, 0.20111991465091705, -0.06683731079101562, 0.3112916350364685, -0.2762048840522766, 0.15687067806720734, -0.5537755489349365, 0.019880296662449837, 0.6539527773857117, -0.23526470363140106, 0.05431147664785...
it substituted correctly. One example would be to simply do ``` caminho=`eval "echo $caminho"` ``` Keep in mind that this will break if `caminho` contains semicolons or quotes, it will also treat backslashes as escaping, and if the data is untrusted, you need to take care that you're not the target of an injection a...
[ 0.23864008486270905, 0.16145631670951843, 0.1755801886320114, 0.03818710893392563, -0.039286207407712936, -0.21737690269947052, 0.33388254046440125, -0.14990980923175812, 0.08083193749189377, -0.17481032013893127, 0.010789229534566402, 0.5372426509857178, -0.4733930826187134, -0.1112548708...
**Background:** I want to use the Delphi translation of mysql.c in a project but the original maintainer Matthias Fichtner (<http://www.fichtner.net/delphi/mysql/>) appears to have taken it down. **Question:** Does anyone know of a similar wrapper (or an updated version of Matthias Fichtner's wrapper) around *libmySQL...
[ 0.09445135295391083, 0.2832950949668884, 0.1656022071838379, -0.12122340500354767, -0.3055514097213745, -0.23079559206962585, 0.452985942363739, 0.1575845330953598, -0.2429088056087494, -0.6673097014427185, -0.34246236085891724, 0.2863405644893646, -0.4593910574913025, 0.09320154041051865,...
and some other C header files needed > for writing clients for the MySQL > database server. > > > The unit is tested with: > > > * Delphi Versions: (3), (4), 5, 6, 2007, 2009, 2010. > * LibMySql.dll Versions: 3.23, 4.0, 4.1, 5.0, 5.1, 6.0 > * MySQL-Server Versions: 3.23, 4.0, 4.1, 5.0, 5.1
[ 0.05361589044332504, -0.09534194320440292, 0.8162757754325867, 0.1815636307001114, 0.07539661228656769, 0.20716412365436554, 0.20575003325939178, -0.3674941658973694, 0.003232445102185011, -0.6476355791091919, 0.02714228257536888, 0.4758836030960083, 0.08875373005867004, 0.1962421089410781...
I really like the format and type of links from [RubyFlow](http://rubyflow.com) for Ruby related topics. Is there an equivalent for Python that's active? There is a [PythonFlow](http://pythonflow.com), but I think it's pretty much dead. I don't really like <http://planet.python.org/> because there's lots of non-Python...
[ 0.5677638053894043, 0.213914692401886, -0.09703953564167023, -0.16700854897499084, -0.6839786767959595, -0.25050148367881775, 0.37438228726387024, 0.736911416053772, -0.5579512715339661, -0.2881776690483093, 0.13693571090698242, 0.6355450749397278, -0.018251128494739532, 0.1326484680175781...
I'm building a app that needs to perform calculations on money. I wonder how to properly use NSDecimalNumber, especially how to initialize it from integers, floats & doubles? I only found it easy to use the `-decimalNumberWithString:` method. The `-initWith...` methods are discouraged so that only left the ones with ...
[ -0.15301109850406647, 0.5566388368606567, 0.27430376410484314, -0.03743770718574524, -0.16830876469612122, 0.35594019293785095, 0.19200141727924347, -0.156845822930336, -0.4354086220264435, -0.426359087228775, 0.12974831461906433, 0.5600175857543945, 0.0116896852850914, -0.0050399783067405...
by Bill Bumgarner, a developer at Apple. I would encourage you to file a bug against this behavior, referencing bug rdar://6487304. As an alternative these are all of the appropriate methods to use to create an `NSDecimalNumber`: ``` + (NSDecimalNumber *)decimalNumberWithMantissa:(unsigned long long)mantissa ...
[ 0.12693604826927185, 0.20953328907489777, -0.07304177433252335, -0.02525695413351059, 0.3351741135120392, 0.12278895080089569, 0.537717342376709, -0.16034990549087524, -0.2979182302951813, -0.5258068442344666, -0.03380521759390831, 0.5383613109588623, -0.35044926404953003, -0.0805757269263...
[[NSNumber numberWithFloat:2.75f] decimalValue]; ```
[ -0.09985696524381638, 0.35638532042503357, 0.4056915044784546, -0.026907576248049736, -0.008522983640432358, 0.16469471156597137, -0.003048511454835534, -0.06813081353902817, -0.2369336634874344, -0.29404395818710327, -0.14361277222633362, 0.5172126293182373, 0.2029292732477188, 0.28681826...
When I design classes and have to choose between inheritance and composition, I usually use the rule of thumb: if the relationship is "is-a" - use inheritance, and if the relationship is "has-a" - use composition. Is it always right? Thank you. No - "is a" does not always lead to inheritence. A well cited example is...
[ 0.2850939631462097, -0.04566245153546333, -0.5302212238311768, 0.04421796649694443, -0.08901657909154892, -0.30611202120780945, 0.012229399755597115, -0.4148590564727783, 0.05357622355222702, -0.5895536541938782, -0.15393014252185822, 0.3785685896873474, -0.006745847407728434, 0.1634117960...
Principle](https://en.wikipedia.org/wiki/Liskov_substitution_principle). To check whether an inheritence relationship complies with the Liskov Substitution Principle, ask whether clients of a base class can operate on the sub class without knowing that it is operating on a sub class. Of course, all the properties of th...
[ -0.011577261611819267, -0.3035241663455963, 0.061786044389009476, 0.04074912890791893, 0.007211736403405666, -0.20573009550571442, 0.07206999510526657, -0.6827750205993652, -0.2750551998615265, -0.2803596258163452, 0.048295456916093826, 0.5497640371322632, -0.5323065519332886, 0.3662409186...
a rectangle leaves the height unchanged. ``` void g(Rectangle& r) { r.SetWidth(5); r.SetHeight(4); assert(r.GetWidth() * r.GetHeight()) == 20); } ``` This assumption is true for a rectangle, but not for a square. So the function cannot operate on a square and therefore the inheritence relationship viola...
[ -0.097502201795578, -0.058088112622499466, 0.42172905802726746, -0.16293351352214813, 0.10027658939361572, 0.028450636193156242, 0.11331427842378616, -0.7588793039321899, -0.4056650400161743, -0.19153396785259247, -0.5073604583740234, 0.48961129784584045, -0.4805246889591217, 0.23574720323...
When I first started looking into Rails and Django I was steered away from Rails by Django developers who felt that Rails was a black box which uses an excess of "magic" (leaky abstractions). Upon exploring Rails further I wonder whether this is an uninformed assumption based on not knowing how to achieve customization...
[ 0.6918414235115051, -0.07863686233758926, -0.3067410886287689, 0.225076824426651, -0.16173161566257477, -0.18012650310993195, 0.096735380589962, -0.024708682671189308, -0.23856306076049805, -0.2861824035644531, 0.19377543032169342, 0.23757599294185638, -0.3511078357696533, 0.15814729034900...
part of Rails' 'magic' critics? Rails makes extensive use of Ruby's metaprogramming facilities to do a lot of the grunt work for you, but there's no magic—in the end it's all just code and can be understood given enough time and effort. Scaffolding was always intended just as a way of getting up and running with perfo...
[ 0.8107854127883911, -0.07232833653688431, -0.1937674880027771, 0.5269744992256165, -0.24369676411151886, 0.06605716794729233, 0.4499814212322235, 0.003625639481469989, -0.06953715533018112, -0.32509201765060425, 0.06490153819322586, 0.17536288499832153, -0.10236059129238129, 0.099478513002...
I'm trying to use the PYTHONSTARTUP environmental variable. I set it to be "c:\python25\pythonstartup.py" in My Computer --> Advanced etc., and it doesn't seem to work. Opening IDLE doesn't run the script, although it recognized the variable: ``` >>> import os >>> os.environ['PYTHONSTARTUP'] 'c:\\python25\\pythonstar...
[ 0.2592178285121918, 0.3576473593711853, 0.3464060425758362, -0.3710600733757019, 0.005208666902035475, -0.11175014078617096, 0.45951658487319946, -0.03047480434179306, -0.10093607753515244, -0.5969380140304565, 0.03412012383341789, 0.9570991396903992, -0.3519003987312317, -0.14638505876064...
I am using parameterized queries in my C# code to interact with an Oracle database. What can I do to log the statements in a more readable fashion? Suppose I have a parameterized query like: ``` INSERT INTO PERSON (ID, NAME, BIRTHDATE) VALUES (:id, :name, :birthdate) ``` Ideally I would like to see the log entry wi...
[ 0.10507896542549133, 0.3116895258426666, 0.17549900710582733, -0.004324071574956179, 0.008816046640276909, 0.27030861377716064, 0.12244052439928055, -0.06146242469549179, -0.09701002389192581, -0.3808591067790985, -0.03596993163228035, 0.46272599697113037, -0.26489347219467163, 0.231414332...
bit hard to read, if there are many parameters. It would yield something like: ``` INSERT INTO PERSON (ID, NAME, BIRTHDATE) VALUES (:id, :name, :birthdate) [:id=23, :name=Mike, birthdate=2004/07/09 00:00:00] ``` Another approach I am planning would be to use the string.Replace() function to replace the parameter pla...
[ 0.19806556403636932, 0.02272525057196617, 0.11410914361476898, 0.03477377071976662, -0.018650071695446968, 0.23019397258758545, 0.4780009090900421, -0.169794499874115, -0.1038745790719986, -0.3743470311164856, -0.08847030997276306, 0.3178807497024536, -0.2985217869281769, 0.270601600408554...
connection)) { command.Parameters.AddWithValue(":id", id); command.Parameters.AddWithValue(":name", name); command.Parameters.AddWithValue(":birthdate", birthdate); command.Connection.Open(); log.DebugFormat("Executing statement: {0}.", command.Command...
[ 0.021080994978547096, -0.15359103679656982, 0.5775902271270752, -0.08523400127887726, 0.39249637722969055, 0.2622734010219574, 0.45590469241142273, -0.29136577248573303, -0.3201078772544861, -0.4570387899875641, -0.2789264917373657, 0.4008122384548187, -0.35822775959968567, 0.6404780745506...
// the parameters and print them out command.ExecuteNonQuery(); command.Connection.Close(); } ``` I am looking for a way to log out the statement, which the oracle command object is using. My current approaches (see question) are yet not very satisfying, because not very readable. I h...
[ 0.34977778792381287, 0.20025257766246796, 0.08047064393758774, 0.001966628711670637, 0.016318082809448242, -0.1878185272216797, 0.3222368061542511, 0.08299519121646881, -0.02864527702331543, -0.29690659046173096, -0.07858286798000336, 0.7056475877761841, -0.2858097553253174, 0.118155777454...
for me. I could do some more sophisticated string replacement or regex, but I wanted to collect some knowledge. I have already done some reasearch on it, but didn't found something. Maybe it's worth looking at the way its done in the NHibernate [source](https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nh...
[ -0.16688776016235352, -0.1302606165409088, 0.6003580689430237, -0.144387349486351, -0.040835000574588776, -0.02695457823574543, 0.2729095220565796, -0.2203410267829895, -0.2247983068227768, -0.605492115020752, 0.051032908260822296, 0.6365521550178528, -0.36052873730659485, 0.00105573667678...
StringBuilder output = new StringBuilder(); output.Append(command.CommandText); output.Append("; "); IDataParameter p; int count = command.Parameters.Count; for (int i = 0; i < count; i++) { p = (IDataParameter) command.Parameters[i]; output.Appen...
[ -0.2694287598133087, -0.25480979681015015, 0.8025227189064026, -0.29620465636253357, -0.23654665052890778, 0.7866660952568054, 0.4471045136451721, -0.940011203289032, 0.06703588366508484, -0.4098740220069885, -0.11132446676492691, 0.4678075909614563, -0.39858269691467285, 0.172998294234275...
if (i + 1 < count) { output.Append(", "); } } outputText = output.ToString(); } return outputText; } ```
[ -0.2098398208618164, 0.02631053701043129, 0.588352382183075, -0.5053694844245911, -0.001715337741188705, -0.07977095991373062, 0.33718907833099365, -0.5476486682891846, 0.16370894014835358, -0.40490591526031494, -0.4762081205844879, 0.5272246599197388, -0.5075188279151917, 0.06405583769083...
What tips can you give a person who is looking to write a programming or script language? I am not worried about how to program nor design a compiler but how to develop one quickly using tools and code generators. Last time i tried i coded it in c++ and the states and syntax took almost as long as writing the actual l...
[ 0.7705899477005005, 0.1279435008764267, 0.011243821121752262, 0.31447547674179077, 0.10692978650331497, -0.2146679162979126, -0.09110134840011597, 0.11653998494148254, -0.0703253224492073, -0.3347231447696686, 0.43083590269088745, 0.7568390965461731, 0.2414644956588745, -0.2403460592031479...
this question have been asked repeatedly, as far back as [Learning to write a compiler](https://stackoverflow.com/questions/1669/learning-to-write-a-compiler). [Here is an incomplete list of SO resources](https://stackoverflow.com/questions/365602/creating-your-own-language#365636) on the topic. Estimating how long som...
[ 0.12246691435575485, 0.0487690195441246, -0.2792970836162567, 0.20923388004302979, -0.07974943518638611, -0.060899920761585236, 0.5530874133110046, -0.269821435213089, -0.29820042848587036, -0.5227857828140259, 0.009742307476699352, 0.5060124397277832, 0.37963443994522095, -0.1576355099678...
As Jeff and Joel were discussing with Eric Sink on a [recent Stack Overflow podcast](https://blog.stackoverflow.com/2009/01/podcast-36/), writing a compiler is an excellent way to learn about many different aspects of programming. I've built a few compilers and they are among my most memorable programming projects. So...
[ 0.38566121459007263, 0.5613146424293518, -0.37989291548728943, 0.26808539032936096, -0.22905586659908295, -0.09728196263313293, 0.2708802819252014, -0.019128337502479553, -0.20487329363822937, -0.5439758896827698, -0.05814278870820999, 0.255092591047287, -0.004641797859221697, -0.439349830...
A medical office that I do work for uses MIS that does not have ODBC. There is an export function, however, and it seems to dump it into a "export.DB" file. In Windows, that is traditionally a Paradox database; however, in snooping around the directory architecture, it looks like there's a portable Sybase server. Is th...
[ 0.3255375325679779, 0.28558844327926636, 0.4084319770336151, -0.08363877236843109, -0.01652785949409008, 0.015337958000600338, 0.31224021315574646, -0.251664400100708, 0.25854331254959106, -0.6324432492256165, 0.122662752866745, 0.5541957020759583, -0.3926156163215637, 0.5827097296714783, ...
be stored **without** the quotes.
[ 0.77308589220047, 0.39697787165641785, -0.02093222551047802, 0.40360018610954285, -0.055673979222774506, -0.1633528172969818, 0.008878268301486969, 0.08314791321754456, 0.2012554407119751, -0.26528382301330566, -0.18226657807826996, 0.15117204189300537, -0.13924798369407654, 0.184558466076...
I need to profile a java application launched by the JNI invocation API from a C application, and naturally the TPTP tools seemed like a good place to start. However, I can start the application, but I have no idea how to connect to it for profiling. I realize this falls into the 'dumb newbie' bucket, but I really am k...
[ 0.602597713470459, 0.313204288482666, 0.17213881015777588, -0.0976775586605072, -0.2222503274679184, -0.4031219184398651, 0.14581476151943207, 0.074647456407547, 0.02539757452905178, -0.7378601431846619, 0.10515651106834412, 0.43994274735450745, -0.3187503516674042, 0.10913534462451935, ...
that contains the code I wish to profile. I've got no profiling launch configurations, nor do I really know what needs to go into them. It is at this point that my knowledge comes to an end; when I start my JNI-based application, it simply stops during VM startup and sits awaiting, presumably, an agent controller conn...
[ 0.11925317347049713, -0.20641927421092987, 0.024362390860915184, -0.05399847775697708, 0.05141264200210571, -0.1736324429512024, 0.10143774002790451, 0.039364755153656006, -0.2497846484184265, -0.3156393766403198, -0.2907760739326477, 0.4381359815597534, -0.32817161083221436, 0.12141564488...
the event. In the case of a `Button`'s click event, the sender will be that `Button`. ``` void digitButton_Click(object sender, EventArgs e) { Button ButtonThatWasPushed = (Button)sender; string ButtonText = ButtonThatWasPushed.Text; //the button's Text //do something //If you store the button's numer...
[ -0.4895552396774292, -0.39374595880508423, 0.4672452509403229, -0.09150940179824829, 0.11097973585128784, 0.004993920214474201, 0.3489339351654053, -0.26611822843551636, -0.36050525307655334, -0.6380716562271118, -0.6071685552597046, 0.6662391424179077, -0.3458443284034729, -0.077618800103...
There have been a few timely posts about IP security and the like, but none that I can find that specifically address an algorithm. In one of my current projects, we've decided to go the route of an offline registration key system. I imagine most of our eventual user base will be honest, so I don't think we have *too*...
[ 0.6991188526153564, 0.23079679906368256, -0.00884585827589035, 0.4052097201347351, 0.2964736223220825, -0.21085917949676514, 0.21283209323883057, 0.0115176010876894, -0.19490870833396912, -0.3413116931915283, -0.08814013004302979, 0.5897650122642517, 0.17471788823604584, -0.208935648202896...
likely out because the install model is to run from a samba share on an intranet server. Also, how long should the key be? Secondly, how big is the danger of the verification algorithm simply being Reflected out, even if it is obfuscated? Would it be better to write the algorithm in unmanaged code instead? In my opini...
[ 0.309430867433548, 0.11413446813821793, 0.041841618716716766, 0.245204359292984, 0.32524359226226807, 0.028311999514698982, 0.20625562965869904, -0.17915721237659454, -0.271209180355072, -0.411909818649292, 0.05223090201616287, 0.4566292464733124, -0.16830478608608246, 0.169756218791008, ...
and tweaking this decision point. Everything else - obfuscation, strong signing, tamper detection - is oriented to make this more difficult, but it can't make it *that* much harder.
[ 0.4683833718299866, 0.07725798338651657, 0.013653187081217766, 0.20948125422000885, 0.23880937695503235, 0.02207782119512558, 0.042039353400468826, -0.23859570920467377, -0.09373709559440613, -0.3893507122993469, 0.05239516869187355, 0.6506890654563904, -0.12998107075691223, -0.12726135551...
In SSMSE 2005, once you successfully connect to a SQL Server instance, that server appears in the drop down box in the Connect To Server dialog box. Does anyone know how to *remove* an entry from this list? I haven't found anything in the registry or in any local files. I like the use of [custom configuration section...
[ -0.19279882311820984, -0.1261826902627945, 0.5752430558204651, -0.03111581690609455, -0.1379561871290207, -0.2844387888908386, 0.22896340489387512, -0.08727454394102097, -0.5819031000137329, -0.5630795359611511, -0.10724872350692749, 0.5099482536315918, -0.3930691182613373, 0.1571059226989...
So I'm trying to build a script that automagically prepends valid column names with its appropriate table prefix (e.g. "t." or "r.") ``` $t_columns = array('id', 'name', 'label'); $r_columns = array('related_value'); ``` INPUT: ``` id > 1 AND (name = 'Hello' OR label IN ('World', 'Planet name AND label')) AND (rela...
[ -0.29610058665275574, 0.24470371007919312, 0.34715479612350464, -0.02226448617875576, -0.031103162094950676, 0.10584665834903717, 0.0026773272547870874, -0.3832489252090454, -0.18782034516334534, -0.6141760349273682, -0.2839805483818054, 0.5969387888908386, -0.3687174320220947, 0.075009666...
in a lot of ways, and also using regex. I'd personally use an array approach. First of all, I'd define the mangling table this way: ``` $table = array( 'id' => 't.id', 'name' => 't.name', 'label' => 't.label', 'related_value' => 'r.related_value' ); ``` This will make a lot easier the str\_replace() ...
[ -0.35696256160736084, 0.13465850055217743, 0.4962608218193054, -0.07196231186389923, -0.21027253568172455, 0.07472632825374603, 0.22819027304649353, -0.6206501722335815, -0.4781593084335327, -0.578610360622406, -0.284969300031662, 0.4352434575557709, -0.41693606972694397, 0.213254943490028...
Having read Fowler's "Refactoring" for a while, I still often catch myself thinking "I should have done this in smaller steps." -- even when I did not broke my code. Refactoring in small steps is safe, but cost time. It's a trade off between speed and risk -- I try to be strategic in choosing the way how I am refactor...
[ 0.5945338010787964, 0.4346745014190674, -0.1624567061662674, 0.005052653606981039, 0.0031842123717069626, 0.09504985064268112, 0.291074275970459, -0.557453453540802, -0.12584005296230316, -0.7731144428253174, 0.5128234028816223, 0.5849519371986389, 0.10136297345161438, -0.1319568157196045,...
not mean that I am a refactoring guru. My code maybe stay for 5 - 60 minutes broken or uncompilable. Do you refactor in smaller steps and try to produce unbroken code in shorter frequencies? And: Are you successful in doing this? Martin Fowler seems to lean towards the small, gradual refactoring approach. However, aft...
[ 0.6477299332618713, 0.3864263892173767, -0.3069343864917755, -0.1167697161436081, -0.2566196322441101, -0.00008696952136233449, 0.7605810165405273, -0.43911120295524597, -0.14125677943229675, -0.5303133726119995, -0.09552120417356491, 0.47482287883758545, -0.29388922452926636, -0.092791751...
"too small to be worth doing". However the cumulative effect of each of these transformations is quite significant. By doing them in small steps you reduce the risk of introducing errors. You also avoid having the system broken while you are carrying out the restructuring - which allows you to gradually refactor a syst...
[ -0.22259044647216797, -0.08345333486795425, -0.11990342289209366, -0.07811244577169418, 0.3461352288722992, 0.04562804475426674, 0.43283209204673767, -0.32123327255249023, -0.6937185525894165, -0.5061994194984436, -0.2842442989349365, 0.4098525047302246, -0.032418690621852875, 0.3081352412...
I have an application that runs on Windows Mobile 6 Professional PDA devices. The application is installed by browsing a url from the device and downloading a cab. Users capture information in the application and this is then replicated back to a SQL 2005 server using merge replication and IIS v6. Although the user n...
[ 0.38747215270996094, 0.4243365526199341, 0.6051466464996338, 0.03633813560009003, 0.0037877499125897884, -0.166931614279747, 0.23685170710086823, -0.12460985779762268, 0.17744769155979156, -0.6452716588973999, 0.2988927364349365, 0.38106635212898254, -0.23239606618881226, 0.381918460130691...
(or both). Is it possible to authenticate a device based on serial number or IMEI (mobile phone ID) number? Is there a way to load a certificate onto the device so only certificated devices are allowed to connect? I want a system that is not too hard to implement and support. The users must be able to update their o...
[ 0.2849249839782715, -0.35188597440719604, 0.3817615211009979, 0.49394285678863525, 0.2023126780986786, -0.3230019211769104, 0.46756377816200256, -0.0856948122382164, -0.3355174958705902, -0.7834843993186951, -0.014775356277823448, 0.5813761353492737, 0.0938742533326149, 0.254182368516922, ...
this unique id when the user first connect to the server and verify it prior to each merge. This approach helps to ensure that the user logging in is doing so from their own phone. It solves the problem of a remote intruder downloading your program to their own phone and logging into a legitimate users account. Of cou...
[ 0.303994745016098, 0.001580458483658731, 0.24016965925693512, 0.20439407229423523, 0.3041382133960724, -0.3343687951564789, 0.17831820249557495, -0.16400355100631714, -0.2974645495414734, -0.681135892868042, -0.11343563348054886, 0.360417902469635, 0.0020649477373808622, 0.2013885974884033...
I have a database that has a vessel pressure that is trended every 30 seconds. I would like to be able to retrieve a recording at a specific time of day for a number of days in the past. I am not able to base this on the server as a Stored Procedure or a View – I only have read access. I have created a routine that wor...
[ 0.6678605079650879, 0.10923997312784195, 0.6212259531021118, 0.128138467669487, 0.23590578138828278, -0.035815056413412094, 0.2726619243621826, 0.20194488763809204, -0.3626951575279236, -0.3588075041770935, 0.5080500841140747, 0.4029814600944519, -0.05788274481892586, 0.22218573093414307, ...
app, but that seems even more inefficient than the method I am using now. Does anyone have any recommendations. Brad ``` declare @DeadBand DateTime declare @EndDate DateTime declare @End varchar(50) declare @Start varchar(50) declare @Temp varchar(50) declare @NumberDays int declare @dec int declare @InnerSqlQry as ...
[ 0.0009484572801738977, -0.12571540474891663, 0.953572690486908, -0.2429797649383545, 0.07845430076122284, 0.2893133759498596, 0.37700164318084717, -0.5708209276199341, -0.2986389994621277, -0.46232712268829346, -0.15193019807338715, 0.6480717062950134, -0.16682107746601105, 0.0665552392601...