text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have a case where a 3rd party ad is bleeding through my modal window implementation. I'd like to up the z-index of the modal overlay as high as possible so the ad won't show on top of it. Is there a limit to z-index values? I'm sure if there is it varies by browser. Anyone know?
Keep in mind that `z-index` doesn't wo... | [
0.44194144010543823,
0.21078723669052124,
0.39296770095825195,
0.006659884471446276,
-0.16324956715106964,
-0.1793307065963745,
0.14777323603630066,
0.0014842349337413907,
-0.3765653073787689,
-0.5759315490722656,
-0.04090673848986626,
0.4917312562465668,
-0.27446937561035156,
0.1784271597... | |
likely it's an issue of "windowed" Flash (object without `wmode=transparent` attribute), which browsers render on top of everything, as if was a window *above browser's window*. In such case `z-index` won't help at all. You'll need to force ad[-provider] to use `wmode=transparent` or use some crazy hacks with iframes. | [
0.35420235991477966,
0.29210206866264343,
0.14073602855205536,
0.1395987719297409,
-0.20887374877929688,
-0.28840482234954834,
0.18996131420135498,
0.18350665271282196,
-0.17732949554920197,
-0.6744341850280762,
-0.1377411186695099,
0.5411818027496338,
-0.13627101480960846,
0.3124249577522... | |
I am working on an embedded systems project and have run into an issue of the compiler being programatically embedded in the Paradigm C++ IDE. I would like to be able to automate building.
The processor is the AMD186ES. I am not working with the OS - just baremetal stuff.
I need to generate real-mode 16-bit 8086 machi... | [
0.44489559531211853,
0.28847968578338623,
-0.027064045891165733,
-0.07131815701723099,
-0.13643473386764526,
0.07452379167079926,
0.18803812563419342,
-0.03980318456888199,
-0.10424741357564926,
-0.5707219243049622,
-0.08291256427764893,
0.755638599395752,
-0.530485987663269,
0.08137792348... | |
assembler used for gcc) and I have successfully been assembling 16bit assembly code with the following:
```
as <file>
ld --oformat binary -Ttext 0x0 -e start <file>
```
with my assembly files starting out with:
```
.code16
.globl start
.text
start:
```
since its plain binary omitting the lines,
```
.globl start
... | [
0.028560884296894073,
0.26702237129211426,
0.37337616086006165,
-0.26690858602523804,
-0.14117172360420227,
-0.004372654482722282,
0.264748215675354,
0.07041934132575989,
-0.2644786834716797,
-0.6462242007255554,
-0.19474542140960693,
0.9589395523071289,
-0.4725490212440491,
-0.07740750908... | |
will offset your memory addresses by `0x7c00` since boot code is usually loaded at `0x7c00` by the BIOS. | [
0.1414843648672104,
0.08994613587856293,
0.3835759460926056,
0.08768945932388306,
0.4611959457397461,
0.004528735298663378,
0.0653216764330864,
0.17367561161518097,
-0.05050335451960564,
-0.7103369832038879,
-0.17780126631259918,
0.7512922883033752,
0.02042626589536667,
-0.1228933855891227... | |
In my cross-platform architecture, I would like to act on a context menu click (right button click) during a mouse click event. In Cocoa, can you detect that the user either Ctrl-Clicked or double-tapped on touchpad (right-click equivalent) DURING the mouseDown event? I am aware of NSView's menuForEvent but do not wish... | [
-0.08683279901742935,
0.1943613588809967,
0.1415327787399292,
-0.03022325597703457,
0.09524530917406082,
-0.2745341956615448,
0.03674892336130142,
0.14784598350524902,
-0.2434358149766922,
-0.7088890075683594,
-0.006834978703409433,
0.8530423641204834,
-0.2686297297477722,
0.02333959564566... | |
I have a Rails app that sets a cookie and does a redirect to another server once the user is logged in. However, the cookie that the Rails app sets isn't seen by the server for some reason. I've tried setting http\_only to false but I still can't even see the cookie unless the domain is the same as my Rails app. Here's... | [
0.18721996247768402,
0.1638997495174408,
0.47932353615760803,
-0.07675673812627792,
-0.046425435692071915,
-0.1808805912733078,
0.533331573009491,
-0.1704336702823639,
-0.11287395656108856,
-0.9903204441070557,
0.07426121085882187,
0.6027207374572754,
-0.33667293190956116,
0.10122194886207... | |
Developer extension](https://addons.mozilla.org/en-US/firefox/addon/60) in Firefox it works fine, but not when Rails does it. Any ideas?
What are the redirecting and redirected-to servers? You can only set ‘domain’ to the current hostname or a parent domain, so if you're on a.example.com and you're redirecting to b.exa... | [
0.4440045654773712,
-0.17297115921974182,
0.16840237379074097,
-0.06787551939487457,
0.18920035660266876,
-0.14066411554813385,
0.06231041997671127,
0.10874082893133163,
-0.3199561536312103,
-0.8079817891120911,
0.04846908524632454,
0.4023228883743286,
-0.44651973247528076,
0.3512644171714... | |
I was just writing some quick code and noticed this complier error
> Using the iteration variable in a lambda expression may have unexpected results.
>
> Instead, create a local variable within the loop and assign it the value of the iteration variable.
I know what it means and I can easily fix it, not a big dea... | [
0.24453188478946686,
-0.08843079954385757,
0.16169840097427368,
-0.30527493357658386,
-0.017820386216044426,
0.285537451505661,
0.34544745087623596,
-0.23128807544708252,
-0.2980988025665283,
-0.48023003339767456,
0.14950819313526154,
0.29393088817596436,
-0.596299409866333,
0.024363491684... | |
i++)
{
actions.Add(() => Console.WriteLine(i));
}
foreach (Action action in actions)
{
action();
}
```
What would you expect this to print? The obvious answer is 0...9 - but actually it prints 10, ten times. It's because there's just one variable which is captured by all the delegates. It's this kind of beha... | [
0.05927515774965286,
-0.18563179671764374,
0.12091062217950821,
-0.14400295913219452,
-0.10717079043388367,
0.1380850225687027,
0.4112350344657898,
-0.5424144864082336,
-0.4761495590209961,
-0.1379798799753189,
-0.25573354959487915,
0.2951566278934479,
-0.6155802607536316,
-0.1692930608987... | |
it's back from 2007, so the actual behaviour may have changed since then. | [
0.11786606907844543,
-0.11213967949151993,
0.3549117147922516,
-0.5249393582344055,
0.001987090799957514,
-0.1621505618095398,
0.4270476698875427,
0.6116329431533813,
-0.47846218943595886,
-0.03509795293211937,
0.3049178123474121,
-0.1586141437292099,
0.24489769339561462,
0.183621600270271... | |
I need to compare 2 strings as equal such as these:
> Lubeck == Lübeck
In JavaScript.
Why? Well, I have an auto-completion field that's going out to a Java service using Lucene, where place names are stored naturally (as Lübeck), but also indexed as normalized text,
```
import sun.text.Normalizer;
oDoc.setNameLC =... | [
0.17787030339241028,
-0.06923738867044449,
0.7469537854194641,
0.12643274664878845,
-0.03402646258473396,
0.017310667783021927,
0.0022599592339247465,
0.2799987494945526,
-0.27274787425994873,
-0.4883953332901001,
-0.17674247920513153,
0.17748591303825378,
-0.0800502598285675,
0.2141941338... | |
on the server side, therefore I am highlighting on the client JavaScript side with something like:
```
return result.replace( input.replace(/[aeiou]/g,"."), "<b>$1</b>");
```
It's a little more fancy because I am escaping special regex characters in the input. This is fine for simple one word matches at the beginnin... | [
0.23992979526519775,
0.2369433492422104,
0.43656259775161743,
-0.056237440556287766,
-0.0379301942884922,
0.3351752460002899,
0.38063913583755493,
-0.05360890552401543,
-0.027757758274674416,
-0.7338610291481018,
-0.12268935143947601,
-0.22823521494865417,
-0.45494863390922546,
-0.10865426... | |
Dawson <b>Ci</b>ty, <b>Ca<b/>nada"` [note the "ck" and "Ci" particularly]
Therefore I'm sort of looking for something that's not as crazy as:
```
input = input.strip().toLowerCase();
input = input.replace(/a/g,"[ÀàÁáÂâÃãÄäÅ寿ĀāĂ㥹]");
input = input.replace(/e/g,"[ÈèÉéÊêËëĒēĔĕĖėĘęĚě]");
// ditto for i, o, u, y, c, n... | [
0.3336248993873596,
0.0863499864935875,
0.3606334328651428,
-0.005019632633775473,
-0.07944796979427338,
0.4813199043273926,
0.34493300318717957,
0.030118875205516815,
-0.5178734660148621,
-0.1736924797296524,
-0.1678677797317505,
0.22184744477272034,
-0.3853064179420471,
0.061210699379444... | |
Before I started a bounty there were two answers, the one pointing me to doing it in Ruby, and [the one](https://stackoverflow.com/questions/227950/programatic-accent-reduction-in-javascript-aka-text-normalization-or-unaccenting/228006#228006) that [MizzardX](https://stackoverflow.com/users/22364/mizardx) wrote which w... | [
0.5110284686088562,
0.07821721583604813,
0.1366165727376938,
-0.06344546377658844,
-0.2764032185077667,
0.39839377999305725,
0.08377785235643387,
-0.19852840900421143,
-0.5716482996940613,
-0.27457550168037415,
0.4281102120876312,
0.4953276515007019,
-0.09906718879938126,
-0.56824105978012... | |
a different approach, and if it simply isn't available before the bounty closes, MizzardX will win the bounty (though in a cruel twist, his edits mad it a community wiki answer, so I'm not sure if he'll get the bounty!)
```
/**
* Creates a RegExp that matches the words in the search string.
* Case and accent insensit... | [
-0.09473122656345367,
-0.15367700159549713,
0.4724760949611664,
-0.14674264192581177,
0.3255719542503357,
0.3765634298324585,
0.5573559403419495,
-0.5060989856719971,
-0.41915634274482727,
-0.4403601586818695,
-0.32124224305152893,
0.5095174908638,
-0.5313456654548645,
0.05352870747447014,... | |
function (a,b) {
return b.length - a.length;
};
words.sort(length_comp);
// replace characters by their compositors
var accent_replacer = function(chr) {
return accented[chr.toUpperCase()] || chr;
}
for (var i = 0; i < words.length; i++) {
words[i] = words[i].replace(/\S... | [
-0.2965717613697052,
-0.06000221520662308,
0.49733659625053406,
-0.32677045464515686,
-0.0537138357758522,
0.7050130367279053,
0.49008771777153015,
-0.4397597312927246,
-0.20359370112419128,
-0.489114373922348,
-0.6212387084960938,
0.6100019812583923,
-0.27274200320243835,
0.06494814902544... | |
RegExp(regexp,'g');
}
var accented = {
'A': '[Aa\xaa\xc0-\xc5\xe0-\xe5\u0100-\u0105\u01cd\u01ce\u0200-\u0203\u0226\u0227\u1d2c\u1d43\u1e00\u1e01\u1e9a\u1ea0-\u1ea3\u2090\u2100\u2101\u213b\u249c\u24b6\u24d0\u3371-\u3374\u3380-\u3384\u3388\u3389\u33a9-\u33af\u33c2\u33ca\u33df\u33ff\uff21\uff41]',
'B': '[Bb\u1d2e... | [
-0.545409619808197,
-0.18536148965358734,
0.7695759534835815,
-0.12018479406833649,
0.013110249303281307,
0.9028541445732117,
0.328688383102417,
-0.14201022684574127,
0.03433939814567566,
-0.527194082736969,
-0.22841264307498932,
0.7731850743293762,
-0.2115405797958374,
-0.0870100408792495... | |
'T': '[Tt\u0162-\u0165\u021a\u021b\u1d40\u1d57\u1e6a-\u1e71\u1e97\u2121\u2122\u24af\u24c9\u24e3\u3250\u32cf\u3394\u33cf\ufb05\ufb06\uff34\uff54]',
'U': '[Uu\xd9-\xdc\xf9-\xfc\u0168-\u0173\u01af\u01b0\u01d3\u01d4\u0214-\u0217\u1d41\u1d58\u1d64\u1e72-\u1e77\u1ee4-\u1ee7\u2106\u24b0\u24ca\u24e4\u3373\u337a\uff35\uff55... | [
0.3468530774116516,
0.17563840746879578,
0.462527334690094,
-0.05056608468294144,
-0.09044847637414932,
0.7021350860595703,
0.4149528741836548,
-0.2656881511211395,
0.006565643474459648,
-0.4954654574394226,
-0.09798670560121536,
0.6248010993003845,
-0.29465609788894653,
0.1035368368029594... | |
I think there is a wealth of natural language data associated with sites like reddit or digg or news.google.com.
I have done a little bit of research with text mining, but can't find how I could use those tools to parse something like reddit.
What kind of applications can you come up with?
I have found in the past th... | [
0.7705419063568115,
0.09452839940786362,
-0.21066047251224518,
0.4875829219818115,
-0.07711440324783325,
-0.18637429177761078,
0.16527028381824493,
0.6911875605583191,
-0.13062278926372528,
-0.2535650432109833,
0.1861843317747116,
0.5220130681991577,
-0.04146484658122063,
-0.06647906452417... | |
through an established public interface. You can also parse feeds, and combine them both to uncover 90% of what you would want to know. If you want to do deep research on data not available through an API, then you should be prepared to spend a significant amount of time writing custom wrappers around a tool like cURL.... | [
0.8465352654457092,
-0.19348955154418945,
-0.14159239828586578,
0.4632931351661682,
-0.2267504185438156,
-0.3472570776939392,
0.12681856751441956,
-0.024447903037071228,
-0.2392423152923584,
-0.8574255108833313,
-0.21886694431304932,
0.30677738785743713,
0.06041242182254791,
0.117848463356... | |
Reading [this blog post about HttpOnly cookies](http://www.codinghorror.com/blog/archives/001167.html) made me start thinking, is it possible for an HttpOnly cookie to be obtained through any form of XSS? Jeff mentions that it "raises the bar considerably" but makes it sound like it doesn't completely protect against X... | [
0.6290366649627686,
0.17046484351158142,
0.0845237746834755,
0.2956523597240448,
0.1350545883178711,
-0.35026615858078003,
0.34884023666381836,
-0.00298875174485147,
-0.2282867729663849,
-0.37820422649383545,
0.11768759787082672,
0.22875633835792542,
-0.09071534126996994,
0.205072760581970... | |
always amazed at how easily some people can work around many security layers.
In the environment I work in, we use IE exclusively so other browsers aren't a concern. I'm looking specifically for other ways that this could become an issue that don't rely on browser specific flaws.
First, as some others mentioned, XSS *... | [
0.4474393129348755,
-0.10483869910240173,
0.11405035108327866,
-0.13390153646469116,
-0.42411932349205017,
-0.5748024582862854,
0.21182803809642792,
0.11969213932752609,
-0.16978907585144043,
-0.6247876286506653,
-0.0896715596318245,
0.23910732567310333,
-0.4435195028781891,
0.232766821980... | |
the XSS payload send an HTTP TRACE request to the web server (or [proxy](http://www.securityfocus.com/archive/1/423028), forward OR reverse), which will echo back to the client the full request - INCLUDING YOUR COOKIES, httpOnly or not. The XSS payload can then parse the returned info, and retrieve those delicious cook... | [
0.28458172082901,
-0.22341951727867126,
0.33282339572906494,
0.040370065718889236,
-0.20266906917095184,
-0.1906483918428421,
0.24362309277057648,
-0.12350653856992722,
-0.12111873924732208,
-0.38206392526626587,
-0.4039824306964874,
0.37056055665016174,
-0.45994099974632263,
-0.0922319889... | |
wished. | [
0.1929192841053009,
0.2831169068813324,
0.23408040404319763,
0.22324800491333008,
0.038935866206884384,
0.06034569442272186,
0.2538858950138092,
-0.13100233674049377,
-0.16941526532173157,
-0.4725698232650757,
-0.20928213000297546,
0.03207681328058243,
-0.22268880903720856,
0.5684534907341... | |
I stumbled across my rather ancient photo objects disks, and sadly found out the company (hemera) doesn't provide support for it anymore. this has left me with a whole pile of .hpi files. Luckily, I found [this information](http://www.halley.cc/ed/linux/interop/hemera.html) on extracting the jpg and png components of t... | [
0.4142516553401947,
0.30191895365715027,
0.3936002850532532,
0.017712639644742012,
-0.10060960799455643,
-0.12392155826091766,
0.422995388507843,
-0.23964066803455353,
-0.17080186307430267,
-0.37052053213119507,
-0.2756635248661041,
0.32814040780067444,
-0.5276656746864319,
0.5023455023765... | |
$j; close J; };
open(P, ">$name.png") &&
do { binmode(P); print P $p; close P; };
```
The hexdump of the current test file I snagged off a CD is here, if it helps at all:
```
0000000 89 48 50 49 0d 0a 1a 0a 64 00 00 00 20 00 00 00
0000010 45 89 00 00 65 89 00 00 0a 21 00 00 00 d0 d0 00
```
It seems the regexp i... | [
0.2743847370147705,
0.1042131558060646,
0.43348053097724915,
-0.016701864078640938,
0.2952096462249756,
-0.0891944020986557,
0.525422990322113,
-0.31132933497428894,
-0.034358397126197815,
-0.33473920822143555,
-0.18148745596408844,
0.4208804666996002,
-0.17603567242622375,
-0.019785957410... | |
int j_off, j_len, p_off, p_len;
FILE *fp, *jp, *pp;
fp = fopen (argv[1], "r");
if (!fp) goto error;
if (fseek (fp, 12, SEEK_SET)) goto error;
if (!fread (&j_off, 4, 1, fp)) goto error;
if (!fread (&j_len, 4, 1, fp)) goto error;
if (!fread (&p_off, 4, 1, fp)) goto error;
if (!frea... | [
-0.4173126816749573,
-0.12134243547916412,
0.2369721382856369,
-0.5575057864189148,
0.08255903422832489,
0.6173778176307678,
0.6118116974830627,
-0.4934658110141754,
-0.06062910705804825,
-0.20876958966255188,
-0.6145391464233398,
0.7593817710876465,
-0.4077371656894684,
-0.352890461683273... | |
%d\n",
argv[1], j_off, j_len, p_off, p_len);
if (j_len > MAX_SIZE || p_len > MAX_SIZE) {
fprintf (stderr, "%s: Chunk size too big!\n", argv[1]);
return EXIT_FAILURE;
}
jp = fopen (argv[2], "w");
if (!jp) goto error;
if (fseek (fp, j_off, SEEK_SET)) goto error;
if (... | [
-0.3837854564189911,
0.03539389744400978,
0.41198065876960754,
-0.47841471433639526,
0.040620241314172745,
0.3389129936695099,
0.5542252659797668,
-0.3232794404029846,
0.022983022034168243,
-0.28507769107818604,
-0.7870416641235352,
0.6331285834312439,
-0.3190489411354065,
0.00544216716662... | |
if (!fwrite (stuff, j_len, 1, jp)) goto error;
fclose (jp);
pp = fopen (argv[3], "w");
if (!pp) goto error;
if (fseek (fp, p_off, SEEK_SET)) goto error;
if (!fread (stuff, p_len, 1, fp)) goto error;
if (!fwrite (stuff, p_len, 1, pp)) goto error;
fclose (pp);
fclose (fp);
r... | [
-0.4300333261489868,
0.05313757807016373,
0.6999956369400024,
-0.5045028328895569,
0.19935479760169983,
0.12576383352279663,
0.4858100116252899,
-0.5203370451927185,
-0.15195700526237488,
-0.3035556674003601,
-0.7030889391899109,
0.6128506660461426,
-0.30062136054039,
-0.145597442984581,
... | |
parameters input.hpi output.jpg output.png.
The error handling is not 100% correct, but it is good enough to always tell you if something's wrong, and most times what it is. **For large files, you will have to enlarge MAX\_SIZE.**
Here is a shell script which you can call with \*.hpi:
```
#!/bin/bash
dest=<destinati... | [
0.12928394973278046,
-0.03527721390128136,
0.3139682114124298,
-0.11231404542922974,
-0.3514924943447113,
0.47235167026519775,
0.30039793252944946,
-0.6614265441894531,
-0.2902604341506958,
-0.6407293677330017,
-0.031168850138783455,
0.7425885200500488,
-0.39917826652526855,
-0.26022061705... | |
than the original files.
Note that some HPI files come without mask. In this case, my program will still work, but give an empty PNG file. | [
0.36392396688461304,
-0.027256367728114128,
0.3705205023288727,
0.3914125859737396,
0.1425168514251709,
-0.234309121966362,
0.054339710623025894,
-0.14711295068264008,
-0.1464781016111374,
-0.4219086170196533,
-0.23537012934684753,
0.675881564617157,
-0.16891801357269287,
-0.00979072973132... | |
Visual Studio 2008 doesn't appear to be loading symbols for MFC dlls when I debug my application. This used to work fine in 2005 - ie. when it loaded the dll it said "Symbols loaded" and can then debug it. In 2008 (having upgraded to MFC 9, so they are different libraries) it doesn't say that it's loaded symbols for th... | [
-0.18060176074504852,
0.145990252494812,
0.34765323996543884,
-0.23416240513324738,
-0.49642086029052734,
-0.2073918581008911,
0.5663651823997498,
0.12435660511255264,
-0.21581827104091644,
-0.39430028200149536,
0.0017551747150719166,
0.5632258057594299,
-0.5744132399559021,
0.073919929563... | |
with MFC 9.0...
Edit: Okay, so further research indicates that I have some kind of symbols in c:/windows/symbols/dll, but VS says they don't match (and they look about six months older than they should be).
Use the Microsoft Symbol Server. Scott Hanselman shows how to [do this globally](http://www.hanselman.com/blog/S... | [
0.13616229593753815,
-0.06251844763755798,
0.5883707404136658,
0.0017360401106998324,
0.2256985753774643,
-0.22112931311130524,
0.5498002767562866,
-0.2553611993789673,
-0.37288546562194824,
-0.8254726529121399,
-0.1430797576904297,
0.3386054039001465,
-0.27164360880851746,
-0.171252816915... | |
downloads a metric shed-load of symbol files the first time.
Oh, and make sure you've got plenty of space; I've got a couple of hundred MB of symbol files on one of my PCs. | [
0.18876458704471588,
-0.0008068212191574275,
0.19707413017749786,
0.22166597843170166,
0.08918584138154984,
-0.11646851152181625,
0.23273532092571259,
0.19989515841007233,
-0.28397706151008606,
-0.6707209348678589,
-0.008585309609770775,
0.4424377381801605,
0.32306578755378723,
-0.15565824... | |
I'm hoping this question isn't too obscure *cross fingers*
I'm looking for a decent reference for [netsuite](http://netsuite.com) scripting and api (both of which are based on ASP)
does anybody know where to find this stuff? The netsuite help pages are mediocre at best, and the forums aren't very active. (I suppose t... | [
0.7244304418563843,
0.11063802242279053,
-0.03386795520782471,
0.3735026717185974,
-0.09999919682741165,
-0.49679315090179443,
0.3366592526435852,
0.4082118272781372,
-0.33473917841911316,
-0.6846288442611694,
0.278648316860199,
0.4103183448314667,
0.23150397837162018,
0.019717637449502945... | |
of how to do things is the NS User Groups as well as the not so good sample apps.
A lot of it is done with trial and error. I have found developing web services a little lest frustrating than the client and server side scripting.
B | [
0.817345142364502,
0.015765665099024773,
-0.15624745190143585,
0.15101288259029388,
0.004659889731556177,
-0.21492689847946167,
0.6058003306388855,
0.02001076005399227,
-0.14906206727027893,
-0.7041018009185791,
0.11888014525175095,
0.32789772748947144,
0.017648493871092796,
-0.32926806807... | |
I have a block of code intended to pull text descriptions from a database table and save them to a text file. It looks like this (C# .NET):
```
OdbcCommand getItemsCommand = new OdbcCommand("SELECT ID FROM ITEMS", databaseConnection);
OdbcDataReader getItemsReader = getItemsCommand.ExecuteReader();
... | [
0.1460389792919159,
0.08342546969652176,
0.5679962635040283,
-0.16732415556907654,
0.18752506375312805,
-0.06622375547885895,
0.04088333249092102,
-0.4924583435058594,
-0.02155715972185135,
-0.6855719089508057,
-0.08025609701871872,
0.31857818365097046,
-0.3289298415184021,
0.3947229981422... | |
long id = getItemsReader.GetInt64(0);
String outputPath = "c:\\text\\" + id + ".txt";
if (!File.Exists(outputPath))
{
getDescriptionCommand.Parameters.Clear();
getDescriptionCommand.Parameters.AddWithValue("id", id); | [
-0.015839623287320137,
-0.4346874952316284,
0.7386225461959839,
-0.35063645243644714,
0.4714416563510895,
-0.18204717338085175,
0.2616492211818695,
-0.35808002948760986,
0.22268058359622955,
-0.27617111802101135,
-0.5449084043502808,
0.7687204480171204,
-0.4859296679496765,
0.0769539326429... | |
String description = (String)getDescriptionCommand.ExecuteScalar();
StreamWriter outputWriter = new StreamWriter(outputPath);
outputWriter.Write(description);
outputWriter.Close();
}
}
getItemsReader.Close();
```
This code has successfully sa... | [
0.01864326000213623,
-0.05503775551915169,
0.6912055611610413,
-0.3097153604030609,
0.4913169741630554,
0.02921811118721962,
0.35760122537612915,
-0.3819694221019745,
0.003484482178464532,
-0.5221824645996094,
-0.1999138593673706,
0.6528562307357788,
-0.3550676107406616,
0.3099815845489502... | |
to .txt files, but for many rows, an AccessViolationException is thrown on the following line:
```
String description = (String)getDescriptionCommand.ExecuteScalar();
```
The Exception text is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt".
Th... | [
0.276837021112442,
0.17393812537193298,
0.26647770404815674,
-0.01290067471563816,
0.37491700053215027,
-0.31250423192977905,
0.507910966873169,
-0.18657884001731873,
-0.3744528889656067,
-0.554104208946228,
-0.19495446979999542,
0.7188695669174194,
-0.39649027585983276,
0.1766013503074646... | |
ITEMS in the getItemsCommand and skip the second query. Actually, I did it that way initially, and I was encountering the same error with getItemsCommand.GetString(). I was afraid that perhaps the dataset was taking up too much memory and maybe that was causing the error. So I decided to try this method to see if it wo... | [
-0.041144248098134995,
-0.03748536854982376,
0.31514105200767517,
0.30553144216537476,
-0.20328618586063385,
-0.019266927614808083,
0.28125885128974915,
-0.28990408778190613,
-0.35345253348350525,
-0.5158146619796753,
-0.10524404793977737,
0.19660677015781403,
-0.3063081204891205,
0.388282... | |
the exception was being thrown!! ARGH!! Fixed now. Also, I've tried the things suggested so far, but they didn't help. However, I found that only very old records in the database were causing this error, which is strange. If I change the query to only pull records inserted in the last 5 years, there are no problems. So... | [
0.2848648726940155,
0.29921820759773254,
0.16597002744674683,
0.018256790935993195,
-0.03925100713968277,
-0.19654284417629242,
0.2762569487094879,
0.25833025574684143,
-0.49054622650146484,
-0.5209989547729492,
-0.0013499112101271749,
0.43179821968078613,
-0.28954774141311646,
0.259947896... | |
understand, the first time you run D\* it finds the same path as A\* with nearly the same runtime. However, when a node changes it's edge value or nodes are added A\* recomputes ALL of the path while D\* simply recomputes the inconsistent nodes the second time around rather than the whole thing.
Anthony Stentz's D\* a... | [
-0.11636221408843994,
0.09907881915569305,
-0.2877119183540344,
0.01903860829770565,
0.07986859977245331,
0.05007728561758995,
0.243088036775589,
-0.3146681487560272,
-0.20312650501728058,
-0.5669426321983337,
-0.37889334559440613,
0.47659313678741455,
-0.5615577697753906,
-0.0692932978272... | |
version of Field D\* using elements of D\* Lite on the mars rovers "Spirit" and "Opportunity" (slideshow of rovers using D\* [here](http://www.ceng.metu.edu.tr/~erogul/ceng585/13_DEC_2007_Presentation/d-star-hidden-slides-deleted.ppt)). In Feburary 2007 it was used to fully navigate the mars rover autonomously.
[alt ... | [
-0.12369009852409363,
-0.009064270183444023,
0.45820295810699463,
0.049396902322769165,
-0.2765951454639435,
-0.08957818895578384,
0.10129159688949585,
-0.30481693148612976,
-0.007875540293753147,
-0.4562828242778778,
-0.07295086234807968,
0.689369797706604,
-0.005057474132627249,
-0.18488... | |
significant increase in complexity I would say that D\* (or D\* Lite) should only be used in cases where there is a significant and frequent changes in the graph. You described your situation as being similar to that so I would say definately go for D\* Lite. If NASA uses it you could safely bet it has been thoroughly ... | [
0.1743496060371399,
0.0102508794516325,
0.2139916568994522,
0.1776244193315506,
0.14822058379650116,
-0.06782470643520355,
0.11198871582746506,
0.22412768006324768,
-0.6366675496101379,
-0.9120833277702332,
-0.07292217761278152,
0.6143515110015869,
-0.32311809062957764,
0.09452202916145325... | |
Is it possible to subscribe to a Windows event that fires when Windows is going into or coming out of Sleep or Hibernate state?
I need my application to be made aware when the computer is going to sleep to do some cleanup and avoid timing issues when it comes out of sleep.
[`Microsoft.Win32.SystemEvents.PowerModeChang... | [
0.31520530581474304,
-0.13207437098026276,
0.21406657993793488,
0.10607437789440155,
0.13574495911598206,
-0.6011437177658081,
0.37691348791122437,
-0.009202072396874428,
-0.13783448934555054,
-0.5931104421615601,
-0.37762096524238586,
0.6240251660346985,
-0.27569323778152466,
-0.082539819... | |
I want to read all thumbnails from a folder with images in Windows XP.
But if I read image file to get thumbnail, it seems a bit slow, so I wish I can first read the windows image thumbnail cache:thumb.db.
Is there any lib in c++ or c to read thumbnails from thumb.db.
You might find this useful:
ThumbsDBLib in C++
<h... | [
0.12225132435560226,
0.2563001811504364,
0.4274943768978119,
0.17460522055625916,
0.13982242345809937,
0.07451969385147095,
-0.032606031745672226,
0.0819571390748024,
-0.26668986678123474,
-0.6562923192977905,
0.4478722810745239,
0.4183509945869446,
0.13254113495349884,
-0.0879478976130485... | |
I am using a navigation controller, and I have the style set to :
```
navController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
```
But when I run my program, the navigation controller looks like it is on top of a white background, not my background. When I push a controller, left or right, all my view, the... | [
0.2736761271953583,
0.1571284681558609,
0.7129318118095398,
-0.30025699734687805,
0.14858627319335938,
0.01022955309599638,
0.12058809399604797,
0.33087095618247986,
-0.17954358458518982,
-0.8615468144416809,
0.05690275877714157,
0.7021719813346863,
-0.32504260540008545,
0.0351618528366088... | |
value, but I think there should a more elegant way.
I believe the UINavigationController assumes that your controller view frames don't include the area beneath the navigation bar.
UIBarStyleBlackTranslucent is more often used for UIToolbar, so Apple probably didn't make it easy to use it nicely with UINavigationBar. ... | [
0.28689929842948914,
-0.0834600180387497,
0.7739123106002808,
0.10181663930416107,
-0.1459309160709381,
-0.18955564498901367,
0.4130530059337616,
-0.001229183399118483,
-0.138034388422966,
-0.4092814326286316,
0.015138514339923859,
0.5047922134399414,
-0.11797728389501572,
-0.0064058885909... | |
instead of trying to slide it up (like Mobile Safari). Trust me on that one... that took me a *lot* of time to learn the hard way. | [
0.3091430366039276,
-0.16422151029109955,
-0.01663157343864441,
0.1455448418855667,
-0.11547572910785675,
-0.10607751458883286,
0.2401505410671234,
0.4483782947063446,
-0.30446937680244446,
-0.3342271149158478,
0.4553028345108032,
0.6261115670204163,
0.08431897312402725,
-0.292664587497711... | |
On an embedded target I use far pointers to access some parts of the memory map.
near pointer (without explicitely specifying \_\_near):
```
unsigned int *VariableOnePtr;
```
Pointer to near pointer:
```
unsigned int **VariableOnePtrPtr;
```
far pointer:
```
unsigned int *__far VariableTwoPtr;
```
What is the c... | [
-0.15465949475765228,
0.2094184160232544,
0.5435808300971985,
-0.272786945104599,
0.02025798335671425,
0.09189580380916595,
-0.22902949154376984,
-0.08581177890300751,
0.39969947934150696,
-0.5273391008377075,
-0.06948934495449066,
0.7548839449882507,
-0.07606291770935059,
0.01269862148910... | |
Drop-down lists, menus and combo boxes are all very common user interface elements. Users are accustomed to seeing these elements in native applications and sometimes web apps, but there are a few problems with them.
1. You have to aim the mouse. Some menus collapse when you mouse out, and some have submenus that you... | [
-0.0038488295394927263,
-0.006432443391531706,
0.010429248213768005,
0.15388311445713043,
0.011018267832696438,
-0.03909076750278473,
0.30256563425064087,
0.1799228936433792,
-0.4022376537322998,
-0.5752765536308289,
-0.10942251235246658,
0.32272422313690186,
-0.3988490104675293,
-0.127957... | |
is that I sometimes want to present a long list of options in limited space. Issue 2 is a sacrifice I'm willing to make, but I'm wanting to know if anyone has any tricks to make these drop menus easier to use. Maybe someone has invented a new style of list control.
I'm sure that if these types of controls annoy me, th... | [
0.47226864099502563,
-0.2578205466270447,
0.17912761867046356,
0.33059364557266235,
-0.03483399376273155,
-0.003039310220628977,
-0.3135528266429901,
0.22235354781150818,
-0.4537592828273773,
-0.2297762632369995,
0.20938071608543396,
0.41646456718444824,
-0.29898905754089355,
-0.1266514509... | |
as the mouse rolls over them, but shrink back down to such a size that all items are visible when the mouse is not over the control. | [
-0.05157361552119255,
-0.019301094114780426,
0.739909827709198,
0.1373869925737381,
0.4173021912574768,
-0.03183642402291298,
0.28517359495162964,
0.03876547887921333,
-0.5737068057060242,
-0.5467236042022705,
-0.26798126101493835,
0.26205116510391235,
0.1111440658569336,
0.268170416355133... | |
Following on from [this question](https://stackoverflow.com/questions/223832/check-a-string-to-see-if-all-characters-are-hexadecimal-values) what would be the best way to write a Char.IsHex() function in C#. So far I've got this but don't like it:
```
bool CharIsHex(char c) {
c = Char.ToLower(c);
return (Char.... | [
-0.19332726299762726,
0.24359413981437683,
0.47696396708488464,
-0.011093669570982456,
0.06627865135669708,
0.08969563990831375,
0.1739027053117752,
-0.07327526062726974,
-0.021774448454380035,
-0.4115341305732727,
-0.15820838510990143,
0.4590931236743927,
-0.30154746770858765,
-0.05325863... | |
(c >= 'a' && c <= 'f') ||
(c >= 'A' && c <= 'F');
``` | [
-0.36055126786231995,
0.2679236829280853,
0.14351366460323334,
-0.31953954696655273,
0.3035086989402771,
-0.15871267020702362,
0.29260990023612976,
-0.2206328809261322,
0.07246456295251846,
-0.17551204562187195,
-0.8284780979156494,
0.7583075165748596,
-0.305019348859787,
0.063997991383075... | |
A legacy backend requires the email body with a .tif document, no tif and it fails. So i need to generate a blank .tif, is there a fast way to do this with ghostscript?
---
edit: make once in project installation use when i need it.
The following line will produce a 1 pixel Tiff file (340 bytes). That's the smallest... | [
0.13400426506996155,
-0.004017853643745184,
0.6600795388221741,
-0.2041737586259842,
-0.10107319056987762,
-0.031752943992614746,
0.48359692096710205,
-0.3779953420162201,
-0.13969114422798157,
-0.7664024233818054,
0.008714715950191021,
0.4883929491043091,
-0.31788137555122375,
0.112458117... | |
Can anybody explain the idea behind JSP custom tag libraries and the JSP 2 tag files?
Are they just different ways to do the same thing?
How do they compare? What are their pros and cons, and which is better?
I <3 tag files, but that lead developer of JSTL is smoking crack if they really said that. You CANNOT re-writ... | [
0.31418323516845703,
-0.058388978242874146,
0.19680581986904144,
0.14747002720832825,
-0.43143805861473083,
-0.208330437541008,
0.38396528363227844,
-0.14937475323677063,
-0.2186051607131958,
-0.6793239116668701,
-0.08371761441230774,
0.6075646281242371,
-0.49832332134246826,
-0.3000788986... | |
ok, but not <someTag><p><%= helloWorld.toString() %></p></someTag>
**tagdependent:** you can have JSP inner content, but it won't be processed as such; instead you have to parse/render it however you see fit
But with the old style tag library tags, you can have:
<body-content>JSP</body-content>
(in the tld file) and ... | [
0.5378986597061157,
-0.03594856336712837,
0.40861591696739197,
-0.03643181174993515,
0.06494341045618057,
-0.4240739345550537,
0.491767019033432,
-0.27050137519836426,
-0.17352300882339478,
-0.732869029045105,
-0.37279075384140015,
0.765561580657959,
-0.33248645067214966,
-0.23430876433849... | |
to work inside the tag, because they are a million times cleaner, easier for a non-programmer to work with, don't require a tld (well, if you keep them in a seperate namespace from your tag library tags).
But if you want JSP content inside your tag, your only option is tag library tags. Hopefully, someday, the JSP peo... | [
0.5785815715789795,
-0.18036256730556488,
0.43985864520072937,
0.2850192189216614,
-0.11057551205158234,
-0.6887560486793518,
0.2767203450202942,
-0.06568398326635361,
-0.15614281594753265,
-0.6804832220077515,
-0.18953587114810944,
0.6676557660102844,
-0.36685213446617126,
-0.344769775867... | |
making custom tags for every last piece of logic (since that's the only way to do logic without using JSP directives). | [
0.7367818355560303,
-0.3082459568977356,
0.009053380228579044,
0.33434444665908813,
0.019812457263469696,
-0.36608442664146423,
0.057736627757549286,
-0.35993701219558716,
-0.24366681277751923,
-0.19778166711330414,
-0.3244723081588745,
0.44799622893333435,
-0.5454444289207458,
-0.38038408... | |
I need a cross platform solution for clearing the console in both Linux and Windows written in C++. Are there any functions in doing this? Also make note that I don't want the end-user programmer to have to change any code in my program to get it to clear for Windows vs Linux (for example if it has to pick between two ... | [
0.30677229166030884,
-0.04695344716310501,
0.3672683537006378,
0.2932506203651428,
0.09553463011980057,
-0.28210902214050293,
0.1843634396791458,
-0.2805474102497101,
-0.19085848331451416,
-0.6939164996147156,
-0.15432895720005035,
0.6080798506736755,
-0.07184148579835892,
0.13532178103923... | |
ncurses and pdcurses have the exact same interface (pdcurses can also create windows independently from the console that behave like console windows).
Most difficult answer: Use `#ifdef _WIN32` and stuff like that to make your code act differently on different operating systems. | [
0.041531749069690704,
-0.18333116173744202,
0.2770425081253052,
0.48465821146965027,
-0.04778169095516205,
-0.46801844239234924,
-0.1411353498697281,
-0.045999735593795776,
-0.19875061511993408,
-0.657230019569397,
0.14216062426567078,
0.4625747501850128,
-0.37391194701194763,
0.2689354717... | |
I keep hearing people complaining that C++ doesn't have garbage collection. I also hear that the C++ Standards Committee is looking at adding it to the language. I'm afraid I just don't see the point to it... using RAII with smart pointers eliminates the need for it, right?
My only experience with garbage collection w... | [
0.573358416557312,
0.27607303857803345,
-0.204087495803833,
0.09725907444953918,
-0.11278626322746277,
-0.3608948290348053,
0.27675801515579224,
0.28362494707107544,
-0.3856925964355469,
0.004426187369972467,
0.05323295295238495,
0.4025290310382843,
-0.44975805282592773,
-0.106996491551399... | |
advantages could garbage collection offer an experienced C++ developer?
I keep hearing people complaining that C++ doesn't have garbage collection.
---------------------------------------------------------------------------
I am so sorry for them. Seriously.
C++ has RAII, and I always complain to find no RAII (or a c... | [
-0.04797106608748436,
0.11153002828359604,
-0.07600840926170349,
0.3270619511604309,
-0.4557135999202728,
-0.10628888756036758,
0.02482542395591736,
-0.0657404437661171,
-0.1454199105501175,
-0.6135995388031006,
0.07288099825382233,
0.7654075622558594,
0.07125220447778702,
-0.0309775546193... | |
developer: I don't care about GC. I tried both RAII and GC, and I find RAII vastly superior. As said by Greg Rogers in his post ([Garbage Collection in C++ -- why?](https://stackoverflow.com/questions/228620/garbage-collection-in-c-why#228670)), memory leaks are not so terrible (at least in C++, where they are rare if ... | [
0.5087346434593201,
0.15535572171211243,
-0.26800116896629333,
-0.039380110800266266,
-0.27537813782691956,
-0.15673699975013733,
0.20255480706691742,
0.10127674788236618,
0.011517788283526897,
-0.3970847427845001,
-0.20219647884368896,
0.5277079343795776,
-0.6035332083702087,
0.1163601577... | |
RAII we don't care about ressource freeing because RAII do it for us, or for object initialization because constructor do it for us, it is sometimes important to just code without caring about who is owner of what memory, and what kind pointer (shared, weak, etc.) we need for this or this piece of code. **There seems t... | [
0.2629128098487854,
0.0770520344376564,
0.039163537323474884,
0.20277658104896545,
-0.37020936608314514,
-0.17352283000946045,
-0.11823750287294388,
-0.04840877652168274,
-0.14330439269542694,
-0.3688502311706543,
-0.21511074900627136,
0.499300479888916,
-0.4519512355327606,
-0.17111504077... | |
the data (and no one really cares about when exactly it will be destroyed). Multiple objects can use it, and then, discard it. You want it to be freed when no one is using it anymore.
The C++ approach is using a smart pointer. The boost::shared\_ptr comes to mind. So each piece of data is owned by its own shared point... | [
0.13396140933036804,
-0.010785536840558052,
0.425630122423172,
0.5099158883094788,
-0.06154898554086685,
-0.2758883535861969,
-0.08365984261035919,
-0.06442547589540482,
-0.34103843569755554,
-0.36580976843833923,
-0.06364387273788452,
0.46379736065864563,
-0.29944658279418945,
0.118108123... | |
points to A). So you must know think a lot about where to use weak pointers (boost::weak\_ptr), and when to use shared pointers.
With a GC, you just use the tree structured data.
The downside being that you must not care **when** the "floating data" will really be destroyed. Only that it **will be** destroyed.
Concl... | [
-0.028839383274316788,
0.053845565766096115,
0.4203642010688782,
0.18119454383850098,
-0.3611500859260559,
-0.4252602159976959,
-0.14244018495082855,
-0.1933157742023468,
-0.33858925104141235,
-0.2826111912727356,
-0.31664684414863586,
0.352079838514328,
-0.5853075981140137,
0.053346320986... | |
be a good idea, and I guess the C++ Standards Comitee won't let this kind of major feature break the language, so we can trust them to make the necessary work to enable a correct C++ GC that won't interfere with C++: **As always in C++, if you don't need a feature, don't use it and it will cost you nothing.** | [
0.38427990674972534,
0.14263327419757843,
0.10018527507781982,
0.14069877564907074,
0.0745919868350029,
-0.03783189877867699,
0.5533550977706909,
0.0930490642786026,
-0.24496570229530334,
-0.4770081639289856,
-0.26973068714141846,
1.0204203128814697,
0.0274420864880085,
-0.2960166037082672... | |
I am part of a team creating a web application using PHP and MySQL. The application will have multiple users with different roles. The application will also be used in a geographically distributed manner. Accordingly we need to create an access control system that operates at the following two levels:
1. Controls user... | [
0.6072656512260437,
0.16279372572898865,
0.26580506563186646,
0.06539440155029297,
0.14844758808612823,
-0.4062761068344116,
0.17755340039730072,
-0.3367403447628021,
0.0616287887096405,
-0.43771591782569885,
-0.05162991210818291,
0.03529166430234909,
0.14987191557884216,
0.311415225267410... | |
modifies database queries so that only specific records are displayed. For example, for a user at the city level, only those records should be displayed that relate to the user's particular city, while for a user at the national level, records for ALL CITIES in the country should be displayed.
I need help on designing... | [
0.038188636302948,
-0.1483609676361084,
0.29086634516716003,
0.4238792955875397,
-0.1108170747756958,
-0.27591627836227417,
0.23282590508460999,
0.01622922532260418,
-0.2448926568031311,
-0.5985671281814575,
0.08211114257574081,
0.03884190320968628,
-0.33502456545829773,
0.1556905061006546... | |
in advance
Vinayak
I was in similar situation few months ago. I found that tools like Zend\_ACL work great if you just check access level to single item (or reasonably low number of them). It fails when you need to get a huge list of items the user is allowed to access. I crafted custom solution to this problem using ... | [
0.02441248670220375,
0.006972696632146835,
0.10136757791042328,
-0.023975299671292305,
-0.012968947179615498,
-0.0372590497136116,
0.12999871373176575,
-0.4747644364833832,
-0.3656032681465149,
-0.38923895359039307,
-0.07204417139291763,
0.2814701199531555,
-0.3427680432796478,
0.154978871... | |
calls order:
[](https://i.stack.imgur.com/eDvrv.png)
(source: [epsi.pl](http://gruz.epsi.pl/g/uml/permissions-s2.png))
[I blogged about this solution](http://stronger.epsi.pl/2008/04/02/prawa-dostepu-the-ultimate-edition/), unfortunately it's all in Polish, but you ... | [
-0.10831006616353989,
-0.14047542214393616,
0.5393285751342773,
0.26547446846961975,
-0.09415438026189804,
-0.13082095980644226,
0.29640114307403564,
-0.5124503374099731,
-0.20094944536685944,
-0.6201525926589966,
-0.5747158527374268,
0.4595772325992584,
-0.32255759835243225,
-0.0029529228... | |
I would like to send some keystrokes from a C++ program into another window.
For that reason I would like to have the user select the target window similar to how it is done in the Spy++ utility that comes with Visual Studio (drag a crosshair cursor over target window and have target window highlighted by a frame).
H... | [
0.37666550278663635,
-0.28506386280059814,
0.34546297788619995,
-0.07068440318107605,
-0.0953737124800682,
-0.09616603702306747,
0.07080195844173431,
-0.24616312980651855,
-0.17195500433444977,
-0.7895604372024536,
0.1552901268005371,
0.5217423439025879,
-0.5110353827476501,
-0.09622358530... | |
be routed toward your app's window.
2. Handle the [WM\_MOUSEMOVE](http://msdn.microsoft.com/en-us/library/ms645616.aspx) message. In your handler code, grab the window underneath the mouse using [WindowFromPoint](http://msdn.microsoft.com/en-us/library/ms633558.aspx). That will get you the HWND of the window the mouse ... | [
0.1578054577112198,
-0.41257143020629883,
0.5544912815093994,
0.15738444030284882,
-0.06417330354452133,
-0.1751100718975067,
0.13398908078670502,
-0.22078077495098114,
-0.08930966258049011,
-0.8848963379859924,
-0.07392013818025589,
0.624839723110199,
-0.48718520998954773,
-0.155466392636... | |
DC to do this, but in any case you'll need the window handle in order to get the window rect.
If you Google around Spy++ source code you'll see a few examples of this technique. | [
0.5964540839195251,
-0.529133677482605,
0.4268764555454254,
0.412637323141098,
-0.15763145685195923,
-0.5618197917938232,
0.0057652853429317474,
-0.17432788014411926,
-0.23847529292106628,
-0.45237356424331665,
0.060103319585323334,
0.7269377708435059,
-0.2707080543041229,
-0.0848761722445... | |
Say I have the classic 4-byte signed integer, and I want something like
```
print hex(-1)
```
to give me something like
> 0xffffffff
In reality, the above gives me `-0x1`. I'm dawdling about in some lower level language, and python commandline is quick n easy.
So.. is there a way to do it?
This will do the trick:... | [
0.10215488076210022,
0.33847302198410034,
0.5866835713386536,
-0.01957574672996998,
0.015027418732643127,
-0.07837945222854614,
0.48021575808525085,
-0.2251429408788681,
-0.2786257565021515,
-0.15612979233264923,
-0.20250310003757477,
0.5798987746238708,
-0.22515778243541718,
-0.0513038598... | |
return "0x%s"%("00000000%x"%(n&0xffffffff))[-8:]
``` | [
-0.14284253120422363,
0.22616732120513916,
0.38556939363479614,
-0.3721506595611572,
0.1665836125612259,
0.14440162479877472,
0.35748282074928284,
0.09065079689025879,
0.10545089095830917,
-0.28705424070358276,
-0.4105515778064728,
0.4480328857898712,
-0.2990347146987915,
0.263840168714523... | |
which are the best tutorials, books, software and practices to start and manage a new .net based Development Project in an Agile way with no experience with it. which methodology is easier to adopt XP|Scrum?
I first learned about XP in 2004, and it completely changed my programming world-view. XP is very approachable, ... | [
0.12698101997375488,
0.08475019037723541,
-0.2659807801246643,
0.022640826180577278,
-0.4785560369491577,
-0.26844921708106995,
0.21246327459812164,
-0.21139372885227203,
-0.09805139154195786,
-0.1541575938463211,
0.3240762948989868,
0.634638786315918,
-0.103660449385643,
-0.54505264759063... | |
not suggesting any engineering practices and tries to be purely a management technique, ostensibly leaving the engineering decisions up to the team.
I'd suggest you get a copy of the [seminal XP book](https://rads.stackoverflow.com/amzn/click/com/0201616416) which you can easily read through in a couple days, after wh... | [
0.7425189018249512,
0.22758519649505615,
0.045594222843647,
0.1462235450744629,
-0.2830730676651001,
-0.37736421823501587,
0.005669329781085253,
0.016375761479139328,
0.005696749314665794,
-0.37702250480651855,
0.0352666899561882,
0.6721795201301575,
0.0028538284823298454,
-0.0477372296154... | |
cash for the book just yet, go google "extreme programming" and read through the material on the INET -- there's *tons* of it online.
<http://www.extremeprogramming.org/> rivals Kent Beck's book for essential info on XP. | [
0.6549910306930542,
0.006678661331534386,
0.04298664629459381,
0.6246533989906311,
0.006132252048701048,
-0.5352036952972412,
0.33584991097450256,
-0.0623982697725296,
0.02303418330848217,
-0.23694956302642822,
0.25186362862586975,
0.7209100723266602,
0.2153000384569168,
-0.117770202457904... | |
Now that Silverlight 2 has finally shipped. I'm wondering if anyone has put together any logging frameworks for it, maybe something like [enterprise library logging](http://msdn.microsoft.com/en-us/library/ff647183.aspx) or [log4net](http://logging.apache.org/log4net/)? I'm interesting in something that can perform tra... | [
0.46478700637817383,
-0.2658880650997162,
0.27883368730545044,
-0.0321187786757946,
-0.3850504755973816,
-0.5765305161476135,
0.038219332695007324,
0.17084459960460663,
-0.464853435754776,
-0.7079549431800842,
0.16094225645065308,
0.29264035820961,
-0.3635925352573395,
-0.2607651352882385,... | |
under the full .NET Framework and the Compact Framework so I'll most likely take the existing framework code and add some logging targets:
* A standard System.Diagnostics target to enable capturing using DebugView, etc.
* An asynchronous Web service target similar to the one in NLog.
* An isolated storage target with ... | [
0.4228895902633667,
-0.07804933190345764,
0.2635628581047058,
0.22704045474529266,
-0.2676398456096649,
-0.18315044045448303,
0.35866284370422363,
-0.0030732147861272097,
-0.43493184447288513,
-0.724012553691864,
-0.03388770669698715,
0.5339682102203369,
-0.3727657198905945,
-0.24339668452... | |
data is all lost and might even crash your application. | [
0.20523189008235931,
0.2341267466545105,
0.20642107725143433,
0.6843608617782593,
0.38820672035217285,
-0.5010681748390198,
0.1738785058259964,
0.4499206840991974,
-0.26295703649520874,
-0.2644832730293274,
0.10756266862154007,
0.3184521496295929,
-0.07947501540184021,
0.2916051745414734,
... | |
As an example, lets say I wanted to list the frequency of each letter of the alphabet in a string. What would be the easiest way to do it?
This is an example of what I'm thinking of... the question is how to make allTheLetters equal to said letters without something like allTheLetters = "abcdefg...xyz". In many other ... | [
0.28496333956718445,
0.007035667076706886,
0.3035406172275543,
-0.2577197551727295,
-0.3645852208137512,
-0.11461565643548965,
0.2764142155647278,
-0.39412885904312134,
-0.2517613172531128,
-0.7316375374794006,
0.09716704487800598,
0.692709743976593,
-0.47353991866111755,
-0.09164505451917... | |
letter + ":", lowertext.count(letter)
```
The question you've asked (how to iterate through the alphabet) is not the same question as the problem you're trying to solve (how to count the frequency of letters in a string).
You can use string.lowercase, as other posters have suggested:
```
import string
allTheLetters ... | [
0.16958312690258026,
-0.0023414138704538345,
0.5334406495094299,
-0.2629393935203552,
-0.34198006987571716,
-0.09099861979484558,
0.26092472672462463,
-0.38204947113990784,
-0.20527277886867523,
-0.5835826396942139,
-0.26798880100250244,
0.5733282566070557,
-0.2542283833026886,
-0.19514419... | |
ord(end)
for number in xrange(beginNum, endNum+1):
yield chr(number)
```
You can tell it does the right thing because this code prints `True`:
```
import string
print ''.join(getAllTheLetters()) == string.lowercase
```
But, to solve the problem you're actually trying to solve, you want to use a diction... | [
0.054971445351839066,
0.1446087807416916,
0.6740216016769409,
-0.25902649760246277,
0.19942837953567505,
-0.04186449572443962,
0.09599100798368454,
-0.2103869915008545,
0.057280201464891434,
-0.534487247467041,
-0.411673903465271,
0.5251137018203735,
-0.26584285497665405,
0.055249247699975... | |
will print '3' and '1' respectively.
Note that this works for unicode as well:
```
# -*- coding: utf-8 -*-
occs = letterOccurrances(u"héĺĺó, ẃóŕĺd!")
print occs[u'l']
print occs[u'ĺ']
```
If you were to try the other approach on unicode (incrementing through every character) you'd be waiting a long time; there are ... | [
-0.2615019381046295,
0.206400528550148,
0.5895835161209106,
-0.31678521633148193,
0.028059156611561775,
0.2909959554672241,
0.27759331464767456,
-0.20266534388065338,
-0.16768667101860046,
-0.560538649559021,
-0.41964274644851685,
0.3307799994945526,
-0.2304551899433136,
-0.087054796516895... | |
My application hangs. Pressing the home button doesn't return to the springboard anymore. Additionally pressing the power button for 10 seconds doesn't turn the iphone off at all.
Is there any way to force a shutdown?
1 - To 'Force Quit' an iPhone application, hold down the Home button for up to 5 seconds.
2 - To for... | [
0.3563503623008728,
-0.1148800328373909,
0.929146945476532,
-0.26929962635040283,
0.25643807649612427,
-0.25257647037506104,
0.7260450720787048,
-0.3158644437789917,
-0.2501109540462494,
0.12001624703407288,
-0.4703991115093231,
0.9474055767059326,
-0.2130223959684372,
-0.24996034801006317... | |
Recently, I noticed some people mentioning that `std::list::size()` has a linear complexity.
According to [some](http://www.cplusplus.com/reference/stl/list/size.html) [sources](http://bytes.com/forum/thread60248.html), this is in fact implementation dependent as the standard doesn't say what the complexity has to b... | [
-0.2223527431488037,
-0.08337476849555969,
0.45374563336372375,
-0.22773906588554382,
-0.34131038188934326,
0.1476404368877411,
0.1424185037612915,
-0.5090729594230652,
-0.6274640560150146,
-0.6719620823860168,
0.09531496465206146,
0.39925330877304077,
-0.2878038287162781,
0.17787317931652... | |
the VC++ crowd `size()` has constant complexity as Dinkumware
probably won't have changed that fact since VC6. Am I right there?
2. What does it look like currently in `gcc`? If it is really O(n), why did the
developers choose to do so?
Pre-C++11 answer
----------------
You are correct that the standard does not state... | [
0.04521822929382324,
0.06926702708005905,
0.38164979219436646,
-0.25749343633651733,
-0.38591262698173523,
-0.02787855826318264,
0.05481299012899399,
-0.34784913063049316,
-0.626477062702179,
-0.2568131983280182,
0.1599608063697815,
0.670393168926239,
-0.3116960823535919,
0.213499203324317... | |
complexity) and why an O(1) `list::size()` is be a good idea (in the author's opinion):
* <http://howardhinnant.github.io/On_list_size.html>
I think the main points in the paper are:
* there are few situations where maintaining an internal count so `list::size()` can be O(1) causes the splice operation to become lin... | [
0.05058712512254715,
-0.13371051847934723,
0.13450446724891663,
-0.176051527261734,
0.23075011372566223,
-0.15727853775024414,
0.042627185583114624,
-0.5688541531562805,
-0.5985532999038696,
-0.2180223912000656,
-0.12517990171909332,
0.46329498291015625,
-0.2985790967941284,
0.238559156656... | |
container that implements `size()` to implement it in an O(1) fashion. If a container cannot do this, it should not implement `size()` at all. In this case, the user of the container will be made aware that `size()` is unavailable, and if they still want or need to get the number of elements in the container they can s... | [
0.008184905163943768,
0.10271529853343964,
0.06756997108459473,
-0.0788642019033432,
0.2699335217475891,
-0.32716602087020874,
-0.04490580037236214,
-0.11182284355163574,
-0.23724384605884552,
-0.5124409794807434,
-0.1794486790895462,
0.11092299222946167,
-0.377728670835495,
0.374155551195... | |
overloads. Having to pass in an `n` that must be equal to `distance( first, last)` to get correct behavior seems like a recipe for hard to diagnose bugs.
I'm not sure what should or could be done moving forward, as any change would have a significant impact on existing code. But as it stands, I think that existing cod... | [
0.11432758718729019,
0.13067524135112762,
-0.06781405955553055,
0.19547225534915924,
0.15268422663211823,
-0.038786113262176514,
0.3571983575820923,
0.03277311474084854,
-0.46830660104751587,
-0.4752325713634491,
-0.00918619055300951,
0.42784175276756287,
-0.3512532413005829,
0.14134524762... | |
- the only time you get O(N) behavior is when the list is modified by some splice() operations. The nice thing about this is that it can be done by implementors today without a change to the standard (unless I'm missing something).
~~As far as I know, C++0x is not changing anything in this area.~~ | [
0.3727758824825287,
0.09061227738857269,
0.2889830768108368,
-0.022576672956347466,
0.09175591915845871,
-0.11231669038534164,
0.36037519574165344,
-0.08561533689498901,
-0.38120347261428833,
-0.5808383226394653,
0.02481829933822155,
0.7406880259513855,
-0.09702970087528229,
0.097806349396... | |
Using SQLite3 with Python 2.5, I'm trying to iterate through a list and pull the weight of an item from the database based on the item's name.
I tried using the "?" parameter substitution suggested to prevent SQL injections but it doesn't work. For example, when I use:
```
for item in self.inventory_names:
self.c... | [
0.1829598993062973,
0.14957061409950256,
0.35747823119163513,
-0.4499891698360443,
-0.1268666833639145,
0.09785356372594833,
0.044061340391635895,
-0.7593173384666443,
-0.2587532103061676,
-0.3722727298736572,
0.22404208779335022,
0.5546759366989136,
-0.4910533130168915,
-0.042803436517715... | |
made that actually creates the DB does have 8 bindings.
```
cursor.execute("""CREATE TABLE Equipment
(id INTEGER PRIMARY KEY,
name TEXT,
price INTEGER,
weight REAL,
info TEXT,
ammo_cap INTEGER,
availability_west TEXT,
availability_east TEXT)""")
```
However, when I use the less-... | [
0.4226424992084503,
0.08836236596107483,
0.6395637392997742,
-0.03233889862895012,
-0.06605931371450424,
0.21288256347179413,
0.10659510642290115,
-0.6788414716720581,
0.021337244659662247,
-0.7623690962791443,
0.07483123987913132,
0.5227720737457275,
-0.18598663806915283,
0.21647721529006... | |
why it thinks I have 8 bindins when I'm only calling one. How can I fix it?
The `Cursor.execute()` method expects a sequence as second parameter. You are supplying a string which happens to be 8 characters long.
Use the following form instead:
```
self.cursor.execute("SELECT weight FROM Equipment WHERE name = ?", [it... | [
0.150138720870018,
0.06243506819009781,
0.3352401852607727,
-0.33675137162208557,
0.01706254668533802,
0.22802110016345978,
0.016422457993030548,
-0.3525027930736542,
-0.31498754024505615,
-0.2881428897380829,
-0.05192424729466438,
0.45837143063545227,
-0.6058370471000671,
-0.2672734856605... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.