text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
After developing a WPF application without Source Control, I decided to add the solution to TFS.
After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event would be logged in the Application Event log:
> .NET Runtime version 2.0.50727.3053 - Fatal E... | [
0.1450909823179245,
0.018510427325963974,
0.45151957869529724,
-0.30526015162467957,
0.01639990136027336,
-0.04272792115807533,
0.5987265110015869,
-0.4146496057510376,
-0.34637680649757385,
-0.7579575181007385,
-0.23330388963222504,
0.47083696722984314,
-0.4487348198890686,
0.058889832347... | |
because the XAML is loading on start up, delete the suo. | [
-0.3927951455116272,
-0.1793546974658966,
0.5264832377433777,
0.11347267776727676,
0.3840240240097046,
-0.17109529674053192,
0.013857528567314148,
0.4843900203704834,
0.23487193882465363,
-0.3213001787662506,
-0.6626904010772705,
0.4382610023021698,
-0.24553312361240387,
0.1605274081230163... | |
Is SQL case sensitive? I've used [MySQL](https://en.wikipedia.org/wiki/MySQL) and [SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server) which both seem to be case insensitive. Is this always the case? Does the standard define case-sensitivity?
The SQL keywords are case insensitive (`SELECT`, `FROM`, `WHERE`,... | [
-0.2746036648750305,
0.1822761446237564,
0.21198056638240814,
0.007813865318894386,
-0.2218450903892517,
-0.15455105900764465,
-0.019164368510246277,
-0.00795668363571167,
0.11329984664916992,
-0.4509761929512024,
-0.28257909417152405,
0.7523754835128784,
-0.34679466485977173,
0.1870571374... | |
the database's collation setting.
Here is the [MySQL page about name case-sensitivity](http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html)
Here is the [article in MSDN about collations for SQL Server](http://msdn.microsoft.com/en-us/library/ms143503(SQL.90).aspx) | [
-0.17583422362804413,
0.1753522902727127,
0.45974868535995483,
0.2930435240268707,
-0.012361039407551289,
0.0016825019847601652,
-0.1336742788553238,
-0.2484804093837738,
-0.21148516237735748,
-0.3066960871219635,
-0.10817668586969376,
0.19829651713371277,
-0.17812854051589966,
0.209937170... | |
I have a link that I dynamically create which looks something like the following:
```
<a onclick="Edit('value from a text column here')" href="javascript:void(null);">Edit</a>
```
with the Edit function then taking the passed in value and putting it into a Yahoo Rich Text Editor. This works well except for when ther... | [
0.5672035217285156,
0.27058687806129456,
0.39642614126205444,
-0.1363961100578308,
-0.08608206361532211,
-0.12291402369737625,
0.13534775376319885,
0.27639609575271606,
-0.06911484152078629,
-0.7185580134391785,
0.0567597933113575,
0.25942087173461914,
-0.34906715154647827,
0.2958848774433... | |
standard sucks, but that's another question altogether).
Note: I am using ASP as my server side language.
Convert quote charaters to their HTML equivalents, `"` etc. before you insert them into the HTML. There's a [long list](http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references) of HTML/X... | [
0.7943095564842224,
0.12865221500396729,
0.37620142102241516,
-0.006552431266754866,
-0.5369440317153931,
-0.2441854476928711,
0.33210909366607666,
0.20880606770515442,
-0.24842216074466705,
-0.45639702677726746,
-0.05968381464481354,
0.6117643117904663,
-0.2235109955072403,
-0.14536286890... | |
My Django app has a Person table, which contains the following text in a field named `details`:
`<script>alert('Hello');</script>`
When I call `PersonForm.details` in my template, the page renders the script accordingly (a.k.a., an alert with the word "Hello" is displayed). I'm confused by this behavior because I alw... | [
0.009926613420248032,
0.2028021514415741,
0.12118950486183167,
-0.226401686668396,
-0.19864408671855927,
-0.13390077650547028,
0.2935726046562195,
-0.007747838739305735,
0.002146795392036438,
-0.40856021642684937,
0.15307193994522095,
0.7435605525970459,
-0.12282399088144302,
-0.2647819221... | |
the value from the database here(?)):
```
{{ value|safe }}
```
Could you post a sample of the template? Might make it easier to see what's wrong
**[Edit]** ..or are you saying that you *want* it to escape the values (make them safe)? Have you tried manually escaping the field:
```
{{ value|escape }}
```
**[Edit2... | [
0.13388589024543762,
0.192529559135437,
0.15347298979759216,
-0.20649152994155884,
-0.12298589199781418,
-0.28050923347473145,
0.43129730224609375,
-0.6093999147415161,
-0.33264240622520447,
-0.26114362478256226,
0.10863662511110306,
0.4666022062301636,
-0.4593294858932495,
-0.121004022657... | |
it's an obvious one, but you're absolutely certain you've not got any caching going on in your browser? I've tripped over that one a few times myself ;-) | [
0.6784501075744629,
0.10468891263008118,
0.06021358445286751,
0.21180737018585205,
0.033474117517471313,
-0.2194119542837143,
0.30732375383377075,
0.4797191023826599,
-0.20330317318439484,
-0.38986465334892273,
0.05647047609090805,
0.08554039150476456,
-0.23888905346393585,
-0.007050770800... | |
```
Pattern pattern = Pattern.compile("^[a-z]+$");
String string = "abc-def";
assertTrue( pattern.matcher(string).matches() ); // obviously fails
```
Is it possible to have the character class match a "-" ?
Don't put the minus sign between characters.
```
"[a-z-]"
``` | [
0.15189671516418457,
0.10750243067741394,
0.03545511141419411,
-0.4131191372871399,
0.132644385099411,
-0.12591387331485748,
0.4582596719264984,
-0.2207891345024109,
-0.0735875740647316,
-0.43750298023223877,
-0.28438201546669006,
0.47880521416664124,
-0.6024006009101868,
-0.12639661133289... | |
When using the ObsoleteAtribute in .Net it gives you compiler warnings telling you that the object/method/property is obsolete and somthing else should be used. I'm currently working on a project that requires a lot of refactoring an ex-employees code. I want to write a custom attribute that I can use to mark methods o... | [
0.38595399260520935,
0.32007965445518494,
0.2771740257740021,
-0.28803062438964844,
-0.06573700904846191,
-0.2518948018550873,
0.37864428758621216,
0.04804317653179169,
-0.017651699483394623,
-0.6807491779327393,
-0.17809174954891205,
0.4123387336730957,
-0.504757285118103,
0.2714673876762... | |
and should be looked at". I know how to create a custom attribute, the question is how do I cause it to generate compiler warnings in visual studio.
Update
------
This is now possible with Roslyn (Visual Studio 2015). You can [build](https://johnkoerner.com/csharp/creating-your-first-code-analyzer/) a [code analyzer](... | [
0.15830160677433014,
0.20971375703811646,
0.3260696530342102,
-0.058342136442661285,
-0.29616183042526245,
-0.16768653690814972,
0.34047627449035645,
-0.2992628216743469,
-0.25883230566978455,
-0.678442656993866,
-0.13921129703521729,
0.752500593662262,
-0.3475521206855774,
-0.170972332358... | |
up the warnings generated by ObsoleteAttribute on the fly too, which is very useful.
Don't mean to be unhelpful, just wondering why you're not keen on using it...
Unfortunately ObsoleteAttribute is sealed (probably partly due to the special treatment) hence you can't subclass your own attribute from it.
From the C# ... | [
0.33608105778694153,
0.4151152968406677,
0.18476426601409912,
0.0901915654540062,
-0.13666823506355286,
-0.4415450692176819,
0.3329509496688843,
0.110624298453331,
-0.3070693016052246,
-0.5307265520095825,
-0.3547518253326416,
0.35029223561286926,
-0.5461815595626831,
0.34709399938583374,
... | |
error
> parameter is provided, or if the error
> parameter is provided and has the
> value false. The compiler issues an
> error if the error parameter is
> specified and has the value true.
Doesn't that sum up your needs?... you're not going to do better than that I don't think. | [
0.2493707686662674,
0.3359598219394684,
0.02003631182014942,
0.11340942978858948,
0.112745501101017,
0.10394685715436935,
0.7199058532714844,
-0.17763325572013855,
0.28371891379356384,
-0.8244268894195557,
-0.2093881368637085,
0.8097288012504578,
-0.2518520653247833,
-0.3017134666442871,
... | |
Is there a way to execute a full ASPX source file where the page source is from a string/database/resource and not a file on the file system? It's straightfoward to render dynamic content/images/etc using HTTP Handlers and Modules and writing to the Response, but there doesn't seem to be a way to execute/compile ASPX s... | [
0.31125906109809875,
-0.1798606961965561,
0.45302748680114746,
0.11986780166625977,
-0.39404842257499695,
0.04106514900922775,
0.12702548503875732,
-0.24029797315597534,
-0.2585356533527374,
-0.6540043950080872,
-0.07682747393846512,
0.5020816326141357,
-0.13294991850852966,
-0.12121802568... | |
file on the file system (but get the source from another location):
```
<%@ Page language="C#" MasterPageFile="~/Shared/Site.Master" Inherits="System.Web.UI.Page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/... | [
0.2598143517971039,
-0.02608441188931465,
0.6064054369926453,
0.02512812428176403,
0.15514034032821655,
0.12403834611177444,
-0.2582603394985199,
-0.5815087556838989,
-0.28386515378952026,
-0.7449429631233215,
-0.4276658594608307,
0.12719936668872833,
0.13532914221286774,
0.312768250703811... | |
media - RDBMS, xml file etc. | [
0.34795352816581726,
0.23456311225891113,
0.047351665794849396,
0.30645695328712463,
-0.14786942303180695,
-0.5195756554603577,
-0.19380581378936768,
0.11997576802968979,
-0.40557166934013367,
-0.6801871061325073,
-0.51244056224823,
0.49981561303138733,
-0.407870888710022,
0.18086183071136... | |
What are the most common browser compatibility issues across the major desktop browsers?
No dups please. Up-vote problems you've run into. I'm hoping for the list to self-sort. "IE sux" is not a pitfall, but a call for down-vote.
[Edit] Yes, I know it's a poll - I'm not posting answers in this to gather points - I'm ... | [
0.41922467947006226,
-0.01604286953806877,
0.4208541512489319,
0.2155652493238449,
-0.23954425752162933,
-0.3888764977455139,
0.4455982744693756,
0.3740260601043701,
-0.434724897146225,
-0.5256037712097168,
-0.18276725709438324,
0.366547167301178,
-0.2291548252105713,
0.1312728226184845,
... | |
major bugs and inconsistencies ... | [
-0.008580662310123444,
0.6640476584434509,
-0.07608110457658768,
0.47838327288627625,
0.17596638202667236,
0.0963144525885582,
0.15739348530769348,
0.18859104812145233,
-0.09495667368173599,
-0.9310449957847595,
-0.18983310461044312,
0.4623428285121918,
-0.39333635568618774,
0.141125410795... | |
I need to detect whether my application is running within a virtualized OS instance or not.
I've found [an article](http://www.codeproject.com/KB/system/VmDetect.aspx) with some useful information on the topic. The same article appears in multiple places, I'm unsure of the original source. [VMware](http://www.vmware.c... | [
0.3819202780723572,
0.2252761870622635,
-0.011318033561110497,
0.14838427305221558,
0.18723689019680023,
-0.1765647530555725,
0.34785792231559753,
-0.005066139157861471,
-0.21228329837322235,
-0.315988153219223,
-0.2827408015727997,
0.5821629166603088,
-0.2584247887134552,
0.39874491095542... | |
product?
Similarly, is there a way to detect [Xen](http://www.xen.org/) or [VirtualBox](http://www.virtualbox.org/)?
I'm not concerned about cases where the platform is deliberately trying to hide itself. For example, honeypots use virtualization but sometimes obscure the mechanisms that malware would use to detect i... | [
0.491879403591156,
0.13780005276203156,
0.15223008394241333,
-0.17488841712474823,
0.11212015897035599,
0.0567353256046772,
0.18085326254367828,
0.013688755221664906,
0.058337241411209106,
-0.4938797056674957,
-0.2913716435432434,
0.4258321523666382,
-0.1792323887348175,
0.1169947311282157... | |
don't rely on any particular OS facility.
Have you heard about [blue pill, red pill?](http://web.archive.org/web/20100725003848/http://www.redlightsecurity.com/2008/04/virtualization-red-pill-or-blue.html). It's a technique used to see if you are running inside a virtual machine or not. The origin of the term stems fro... | [
0.651763916015625,
-0.12412679195404053,
-0.1743198037147522,
0.1680050641298294,
0.3622167408466339,
-0.12869201600551605,
0.16837666928768158,
-0.017733527347445488,
-0.3706803619861603,
-0.1250993013381958,
0.26865845918655396,
0.6458341479301453,
-0.3964458405971527,
0.3707249760627746... | |
() {
unsigned char m[2+4], rpill[] = "\x0f\x01\x0d\x00\x00\x00\x00\xc3";
*((unsigned*)&rpill[3]) = (unsigned)m;
((void(*)())&rpill)();
return (m[5]>0xd0) ? 1 : 0;
}
```
The function will return 1 when you are running inside a virutal machine, and 0 otherwise. | [
-0.00435725599527359,
-0.17051969468593597,
0.7266971468925476,
-0.3658618628978729,
0.32410943508148193,
0.1980494111776352,
0.631500780582428,
-0.4379711151123047,
0.08529739826917648,
-0.3170536458492279,
-0.3861461579799652,
0.7579044103622437,
-0.4838596284389496,
0.37029680609703064,... | |
I have heard this concept used frequently, but I don't have a really good grasp of what it is.
Converting an object in memory into a format that can be written to disk, or sent over the wire, etc.
[Wikipedia's description](http://en.wikipedia.org/wiki/Marshalling_(computer_science)). | [
0.5620279312133789,
0.0022351196967065334,
-0.383577823638916,
0.36757931113243103,
0.32607683539390564,
0.0603194423019886,
-0.31747177243232727,
0.10883968323469162,
-0.5124865174293518,
-0.42265987396240234,
-0.05873158946633339,
0.26256343722343445,
0.15419140458106995,
0.5704468488693... | |
I am trying to use a DynamicResource in Storyboard contained within a ControlTemplate.
But, when I try to do this, I get a 'Cannot freeze this Storyboard timeline tree for use across threads' error.
What is going on here?
No, you can't use a DynamicResource in a Storyboard that is contained within a Style or ControlT... | [
0.37807172536849976,
-0.20785975456237793,
-0.07451054453849792,
0.24822425842285156,
0.2033158242702484,
-0.2852247953414917,
0.2537420988082886,
0.16473068296909332,
-0.4552129805088043,
-0.4603829085826874,
0.1000802293419838,
0.5173320770263672,
-0.42316874861717224,
0.3247760236263275... | |
or data binding expression is present, it is unable to freeze them.
For more info see: [MSDN Link](http://msdn.microsoft.com/en-us/library/ms742868.aspx). Check out the 'Animate in a Style' and the 'Animate in a ControlTemplate' sections (this documentation page is rather long).
And for a workaround (at least for my ... | [
0.5331483483314514,
-0.19868528842926025,
0.26308876276016235,
0.26749658584594727,
0.30753031373023987,
0.035487763583660126,
0.34648674726486206,
-0.39460474252700806,
-0.2587258219718933,
-0.6202659606933594,
0.1923319548368454,
0.19755390286445618,
0.21593554317951202,
0.08554527908563... | |
I know this is somewhat of a server question, but I wanted to ask anyways in case someone has done this before.
I have a web service that is on our internal 172.x.x.x subnet and a web server that is on our internal 10.x.x.x subnet. The webserver needs to hit the 172 web service, but is unable to route there. The real ... | [
0.6446800231933594,
0.24429702758789062,
0.47902485728263855,
0.06320619583129883,
-0.03811727836728096,
0.08501416444778442,
0.11649533361196518,
-0.032583121210336685,
-0.21240359544754028,
-0.864647388458252,
0.23224598169326782,
0.24079091846942902,
-0.10105490684509277,
0.222451075911... | |
connects to both networks, so I can then program my web service calls to hit the proxy server. However, I am a developer and have little knowledge on how to set this up.
I have friends that have had good luck with Squid Proxy Server in Nix, but the only box that is available for me is a Windows Server 2003 box. Ideal... | [
0.40794116258621216,
0.0733669251203537,
0.3185104429721832,
0.3142686188220978,
0.04459763690829277,
-0.3021445870399475,
0.20996107161045074,
0.25926128029823303,
-0.05629292130470276,
-0.7591364979743958,
0.4876578450202942,
0.4380744695663452,
0.05138049274682999,
0.08077901601791382,
... | |
corporate budget since we only need it for this one web service.
As you mentioned, the best option is to cram the web server into the DMZ. That being impossible, see if the wiremonkeys can open up the appropriate port in the firewall *just between the server and the web service (and just for http/https traffic)*. If bo... | [
0.5490376949310303,
0.14523470401763916,
0.1942805051803589,
0.257099449634552,
0.2752090394496918,
-0.21803247928619385,
-0.09923816472291946,
0.10012675821781158,
-0.2630651891231537,
-0.5940322279930115,
0.2507532835006714,
0.5790626406669617,
0.11751150339841843,
0.06961023807525635,
... | |
you're not allowed to expose it on the 'Z? Are your wiremonkeys so resistant to change that you can't get your job done? If so, jump ship, man! Life's too short. | [
0.9698076844215393,
-0.12395133078098297,
-0.2272675782442093,
0.41853436827659607,
0.3800283968448639,
-0.2249632328748703,
0.058441393077373505,
0.23642560839653015,
-0.3530879318714142,
-0.01578870229423046,
0.30573904514312744,
0.48473843932151794,
-0.24651256203651428,
0.0389817059040... | |
I have written a watir script that downloads files. One of the files it downloads has a .dcf extension. Months ago, on my machine, I changed a setting somewhere so that .dcf files prompt for download ("Do you want to open or save this file?") instead of opening in the browser. This is the behavior that I desire. I am u... | [
0.3527602255344391,
0.14046652615070343,
0.4741714596748352,
-0.015473772771656513,
0.0683269128203392,
-0.17891184985637665,
0.2728118598461151,
0.14615124464035034,
-0.05089743807911873,
-0.9133182168006897,
-0.13223128020763397,
0.6513239741325378,
-0.09278406202793121,
0.11542316526174... | |
the solutions that I am finding now are either about changing the download itself or modifying the registry. I am looking for something from the client perspective at the browser/IE level.
[tloach](https://stackoverflow.com/users/14092/tloach "tloach's profile")'s link provided direction towards the answer I needed:
1... | [
0.2677682042121887,
-0.1180029883980751,
0.4764446020126343,
-0.03053976222872734,
0.13494504988193512,
0.054483264684677124,
0.23030997812747955,
-0.13444407284259796,
-0.18987801671028137,
-0.8094814419746399,
-0.021462321281433105,
0.5499706864356995,
-0.30140239000320435,
0.13319918513... | |
to be ***checked*** (not cleared)
5. There need to be Actions - there aren't always. I found that one called **edit** and another called **open** were enough. I tied them to notepad (C:\WINDOWS\system32\NOTEPAD.EXE %1). I also needed to ***check*** the **Use DDE** checkbox and fill in *NOTEPAD* for **Application:** and... | [
0.4806932806968689,
-0.3160679340362549,
0.4885420799255371,
-0.08957219123840332,
-0.028679247945547104,
0.2019529640674591,
0.4733598232269287,
-0.48426005244255066,
-0.13973937928676605,
-0.7467494010925293,
-0.19368594884872437,
0.7210589051246643,
-0.355511337518692,
-0.25510951876640... | |
I have a need to run a relatively large number of virtual machines on a relatively small number of physical hosts. Each virtual machine isn't doing to much - each only needs to run essentially one basic network service - think SMTP or the like. Furthermore, the load on each is going to be extremely light.
Unfortunate... | [
0.5296672582626343,
0.3034166395664215,
0.09011492133140564,
0.13662849366664886,
-0.02542394958436489,
0.02513875998556614,
0.13027925789356232,
0.30240651965141296,
-0.2900055944919586,
-0.678066074848175,
-0.009133043698966503,
0.2847227454185486,
-0.1316319704055786,
0.1948064714670181... | |
machine wont get me anywhere near 100 instances and would be something closer to 20.
So, is there any hope for this ratio of images to hosts? Also, which implementation of virtual machine would be best suited for this purpose - ie has efficient overall usage of resources? We mostly use vmware here, but if there is a s... | [
0.5295366644859314,
0.042368724942207336,
0.5508638620376587,
0.36994823813438416,
-0.22321459650993347,
-0.1728864461183548,
0.44101428985595703,
0.1942378580570221,
-0.15958280861377716,
-1.0504008531570435,
0.08981387317180634,
0.7256547808647156,
-0.23092316091060638,
0.038049411028623... | |
ubuntu template let us run about 40 instances per machine.
there are three main fronts to make those fit:
1. lower overhead. OpenVZ, Vserver, chroot, would be ideal if applicable. if you really need each instance be a real VM with it's own kernel, try KVM/Xen instead of VMWare. may be less mature, but you'll have a lo... | [
0.3560296297073364,
-0.06692423671483994,
0.2038956880569458,
0.14968673884868622,
-0.3267870247364044,
-0.015396674163639545,
0.07436321675777435,
0.14759737253189087,
-0.16858097910881042,
-0.9577443599700928,
-0.08554735034704208,
0.3718425929546356,
-0.49778977036476135,
0.123323284089... | |
If you call `LoadLibrary` without a path (e.g., `LoadLibrary("whatever.dll")`, Windows will generally follow its standard search algorithm, the same one it uses to find EXEs.
My question is this: suppose that an application manifest specifies specifies a particular version of a system DLL, say, comctl32.dll 6.0. In th... | [
0.0899825468659401,
-0.2256755381822586,
0.46210238337516785,
-0.08613947778940201,
-0.06366483122110367,
-0.14604409039020538,
0.05741564929485321,
0.03822619095444679,
-0.31516727805137634,
-0.6601066589355469,
-0.45287469029426575,
0.4294346868991852,
-0.32105931639671326,
0.17331424355... | |
searches for the DLL at load time as described in this topic.
So yes, if a manifest is present, it will directly go to the SxS folder. | [
0.06279713660478592,
-0.3793528974056244,
0.40415671467781067,
0.44826385378837585,
-0.10087035596370697,
-0.42404496669769287,
-0.092697374522686,
0.2862766683101654,
-0.39242953062057495,
-0.9455952644348145,
-0.43846869468688965,
0.3361479341983795,
-0.17668858170509338,
0.0853688791394... | |
Given the following canvas:
```
<Canvas>
<Canvas.LayoutTransform>
<ScaleTransform ScaleX="1" ScaleY="1" CenterX=".5" CenterY=".5" />
</Canvas.LayoutTransform>
<Button x:Name="scaleButton" Content="Scale Me" Canvas.Top="10" Canvas.Left="10" />
<Button x:Name="dontScaleButton" Content="DON'T Scal... | [
0.10623198002576828,
-0.5361707210540771,
0.7342894077301025,
-0.2268204540014267,
-0.3202291429042816,
0.427645206451416,
0.1408408135175705,
-0.5992206931114197,
-0.38377317786216736,
-0.8533814549446106,
0.1538592427968979,
0.3706299960613251,
-0.045170217752456665,
0.13468311727046967,... | |
XAML to any object you don't want to be transformed by any parent transforms. This dependency property will take the transform of the parent, build a reverse transform and apply it to the object it's attached to. | [
0.06442399322986603,
-0.2188098281621933,
0.3786356449127197,
0.0735519528388977,
-0.03364715725183487,
-0.28669288754463196,
-0.10409090667963028,
-0.1378718763589859,
0.19485138356685638,
-0.4856061339378357,
-0.3041759431362152,
0.30930301547050476,
-0.5340960621833801,
0.31906279921531... | |
I just saw this behaviour and I'm a bit surprised by it...
If I add 3 or 4 elements to a Dictionary, and then do a "For Each" to get all the keys, they appear in the same order I added them.
The reason this surprises me is that a Dictionary is supposed to be a HashTable internally, so I expected things to come out in... | [
0.4719322621822357,
0.13468171656131744,
-0.001585954218171537,
-0.0954391285777092,
-0.32894161343574524,
0.050340425223112106,
0.4534226655960083,
-0.12756754457950592,
-0.3790081739425659,
-0.20472463965415955,
-0.054686058312654495,
0.3811025023460388,
-0.05259467661380768,
-0.01454016... | |
separate list to entries, whether this is a coincidence, etc).
My question is, does anyone **know** how this really works?
If you use .NET Reflector on the 3.5 class libraries you can see that the implementation of Dictionary actually stores the items in an array (which is resized as needed), and hashes indexes into th... | [
0.30223822593688965,
-0.025939730927348137,
0.27124497294425964,
0.10756464302539825,
-0.0635567381978035,
-0.21041719615459442,
0.364975243806839,
-0.128639817237854,
-0.1782090812921524,
-0.7844611406326294,
0.08684263378381729,
0.5709840655326843,
-0.17842888832092285,
0.186254307627677... | |
1
add 2
add 3
add 4
remove 2
add 5
```
you will get back 1 5 3 4 because it reuses empty slots.
It is important to note, like many others have, you cannot count on this behavior in future (or past) releases. If you want your dictionary to be sorted then there is a [SortedDictionary](http://msdn.microsoft.com/en-us/l... | [
0.05251394212245941,
-0.1100197285413742,
0.21132023632526398,
-0.024329856038093567,
-0.08557167649269104,
-0.06061232089996338,
0.15566116571426392,
-0.14726361632347107,
-0.21046650409698486,
-0.5772529244422913,
-0.1816447377204895,
0.4380747675895691,
-0.4328012466430664,
0.0482626631... | |
One of our programs is sometimes getting an `OutOfMemory` error on one user's machine, but of course not when I'm testing it. I just ran it with JProfiler (on a 10 day evaluation license because I've never used it before), and filtering on our code prefix, the biggest chunk both in total size and number of instances is... | [
0.18510019779205322,
0.12608157098293304,
-0.23079752922058105,
0.12182700634002686,
-0.14206533133983612,
0.06990285217761993,
0.5612217783927917,
0.029336316511034966,
-0.11401666700839996,
-0.4871050715446472,
0.18810053169727325,
0.26899755001068115,
-0.25710803270339966,
0.10945149511... | |
created 4000+ more instances of the class, but when I clicked "Garbage Collect", those went away leaving the 8000+ original ones.
These instances do get stuck into various Collections at various stages. I assume that the fact that they're not garbage collected must mean that something is holding onto a reference to on... | [
0.3330971896648407,
-0.14419463276863098,
-0.10158798843622208,
0.4325803816318512,
-0.18716800212860107,
0.1461671143770218,
0.2639918923377991,
0.19626784324645996,
-0.40817761421203613,
-0.5674636363983154,
0.1878078132867813,
0.2951395809650421,
-0.15306809544563293,
0.3495804965496063... | |
are.
Dump the heap and inspect it.
I'm sure there's more than one way to do this, but here is a simple one. This description is for MS Windows, but similar steps can be taken on other operating systems.
1. Install the JDK if you don't already have it. [It comes with a bunch of neat tools.](http://java.sun.com/javase/... | [
0.31341099739074707,
0.17900781333446503,
0.13442584872245789,
-0.066273033618927,
-0.32706382870674133,
-0.3221897482872009,
0.4710284471511841,
-0.38838765025138855,
-0.19131042063236237,
-1.2097787857055664,
-0.33541804552078247,
0.4816901981830597,
-0.42513737082481384,
0.1630188077688... | |
file you generated and open your browser to *<http://localhost:7000>* (the default port is 7000). Now you can browse the type you're interested in and information like the number of instances, what has references to them, etcetera.
Here is an example:
```
C:\dump>jmap -dump:format=b,file=heap.bin 3552
C:\dump>jhat h... | [
-0.04859524220228195,
0.09386099874973297,
0.44496187567710876,
-0.3165547251701355,
-0.20111769437789917,
0.035770855844020844,
0.12395096570253372,
-0.2978959381580353,
-0.5440673828125,
-0.8144509792327881,
0.043685007840394974,
0.3265729248523712,
-0.320210337638855,
0.303827702999115,... | |
I'm using **mysqldump** to replicate a database between accounts on a particular machine. Everything works just great, except when we get to our defined views. Because the dump includes a line like the following ...
```
/*!50013 DEFINER=`user_a`@`localhost` SQL SECURITY DEFINER */
```
... when loading the dump into ... | [
0.3458773195743561,
0.221169576048851,
0.024567952379584312,
0.07099240273237228,
-0.010370210744440556,
-0.1130339652299881,
0.5379009246826172,
0.20403194427490234,
-0.37482118606567383,
-0.5793197154998779,
0.1476307213306427,
0.5738166570663452,
-0.2988857924938202,
0.44114387035369873... | |
manual on this point. Do I have to actually parse the dumpfile to replace the usernames? Or am I missing something?
same problem. I solved it that way:
```
mysqldump -uuser1 -ppassword1 database1 > backup.sql
sed '/^\/\*\!50013 DEFINER/d' backup.sql > backup_without_50013.sql
mysql -u user2 -ppassword2 -D database2 ... | [
-0.08095433562994003,
0.01138210203498602,
0.5065345168113708,
0.21394653618335724,
-0.04194102808833122,
-0.10234560072422028,
0.06589052826166153,
0.050831642001867294,
-0.3688387870788574,
-0.5244638919830322,
-0.2532350718975067,
0.5432078838348389,
-0.19153566658496857,
-0.03057775087... | |
I need to store the summer time (daylight saving time) change-over rules for different world regions in a database. I already have a way of storing regions and sub-regions (so the whole ["half of Australia"/Arizona/Navaho](http://en.wikipedia.org/wiki/Image:DaylightSaving-World-Subdivisions.png) problem is taken care o... | [
0.6508610844612122,
0.15728385746479034,
0.34244057536125183,
-0.0299166738986969,
0.09408731758594513,
0.13852402567863464,
0.3834313750267029,
-0.14483699202537537,
-0.3532967269420624,
-0.7072089910507202,
-0.04151749238371849,
-0.005026584956794977,
0.0192257072776556,
0.29191282391548... | |
each region (effective range required for regions like Israel)
The advantage to the first is flexibility, since literally *anything* is possible. Unfortunately, it also requires (a) more space, and correspondingly (b) a lot of work to get the data input. The second is nice because one row could correspond to one regio... | [
0.040991850197315216,
-0.11831612139940262,
0.3486276865005493,
0.4006098210811615,
0.22533661127090454,
-0.2599821984767914,
-0.05963559076189995,
0.12176195532083511,
-0.33366820216178894,
-0.8524965047836304,
-0.4559372663497925,
-0.02728816121816635,
-0.11518698930740356,
0.33938521146... | |
like that, but unfortunately that's not an option in this case. Likewise, I cannot normalize the dates, timezone and summer time info *must* be in the database to satisfy certain use cases.
Does anybody have any experience doing something similar? Likewise, does anyone have any brilliant options that I may have missed... | [
0.6195996999740601,
-0.11765165627002716,
0.290683776140213,
0.5639451146125793,
0.46048951148986816,
-0.41948845982551575,
0.04219711199402809,
0.44434234499931335,
-0.7517956495285034,
-0.4565696716308594,
0.18675746023654938,
-0.03401650860905647,
-0.19807545840740204,
0.438185334205627... | |
so until this year).
This is why all OS vendors roll out timezone file changes once or twice a year -- they have to, because they cannot generate a 100% accurate file programatically. | [
0.29564252495765686,
-0.004903792403638363,
0.8557039499282837,
0.0917958915233612,
0.5243534445762634,
-0.21841658651828766,
0.14649854600429535,
0.4279966652393341,
-0.3114808201789856,
-0.5626897215843201,
-0.321355938911438,
0.153367280960083,
-0.08246246725320816,
0.18564221262931824,... | |
I need to test some HTTP interaction with a client I'd rather not modify. What I need to test is the behavior of the server when the client's requests include a certain, static header.
I'm thinking the easiest way to run this test is to set up an HTTP proxy that inserts the header on every request. What would be the s... | [
0.04714002460241318,
-0.026573898270726204,
0.2986983060836792,
0.08989918231964111,
-0.21540726721286774,
-0.24712403118610382,
0.19381006062030792,
0.04704640060663223,
-0.1738150417804718,
-0.7288914322853088,
0.22108404338359833,
0.5183765292167664,
-0.23043063282966614,
0.300569385290... | |
http://127.0.0.1:8080/*>
Allow from all
</Proxy>
<LocationMatch "/myapp">
ProxyPass http://127.0.0.1:8080/myapp
ProxyPassReverse http://127.0.0.1:8080/myapp
Header add myheader "myvalue"
RequestHeader set myheader "myvalue"
</LocationMatch>
</VirtualHost>
```
See [LocationMat... | [
-0.09650523215532303,
0.02978701703250408,
0.8408793807029724,
0.13310599327087402,
0.027811504900455475,
0.04354554042220116,
0.2366219013929367,
-0.15093247592449188,
-0.1376127451658249,
-1.107131838798523,
-0.03533996641635895,
0.3987603783607483,
0.11432307958602905,
0.388674229383468... | |
I'm having issues with color matching css background colors with colors in images on the same html page. What gives?
I'm guessing that you use a PNG image? This is a gamma correction “feature”. Mark Ransom has posted a [useful text](https://stackoverflow.com/questions/115818/which-format-for-small-website-images-gif-or... | [
0.3661312460899353,
-0.06722766160964966,
-0.2017374187707901,
0.1511833816766739,
-0.0043114605359733105,
-0.17845472693443298,
0.03268004208803177,
0.1369604915380478,
-0.46548840403556824,
-0.465663343667984,
-0.28066912293434143,
0.5684446096420288,
-0.2722412049770355,
0.0530978962779... | |
What is the best way to bind WPF properties to ApplicationSettings in C#? Is there an automatic way like in a Windows Forms Application? Similar to [this question](https://stackoverflow.com/questions/18421/best-way-to-bind-windows-forms-properties-to-applicationsettings-in-c), how (and is it possible to) do you do the ... | [
0.13675375282764435,
0.022250011563301086,
0.853809118270874,
-0.002625491935759783,
-0.12921297550201416,
-0.24156206846237183,
-0.11349426954984665,
-0.5691336393356323,
-0.3280014991760254,
-0.8810692429542542,
-0.20745036005973816,
0.5701629519462585,
-0.14785537123680115,
-0.165120586... | |
application:
```
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
Properties.Settings.Default.Save();
base.OnClosing(e);
}
``` | [
-0.08453642576932907,
-0.1453550010919571,
0.5079779624938965,
-0.07192239910364151,
0.6901038885116577,
-0.026716409251093864,
0.3281835615634918,
-0.30435943603515625,
0.11768195033073425,
-0.47227516770362854,
-0.5436903238296509,
0.8963832855224609,
-0.4821005165576935,
0.2093464732170... | |
I have used Photoshop CS2's "Save for Web" feature to create a table of images for my site layout.
This HTML appears fine in a web browser, however when imported into Visual Studio and viewed in the site designer, the metrics are wrong and there are horizontal gaps between images (table cells).
The output from Photos... | [
0.3908390998840332,
0.15502525866031647,
0.5965434312820435,
-0.23699511587619781,
-0.11245211213827133,
-0.02973826415836811,
-0.047831594944000244,
-0.35809770226478577,
-0.2532961070537567,
-0.7143394947052002,
0.24618475139141083,
0.4113728702068329,
-0.31440672278404236,
-0.1787391901... | |
bug in Visual Studio 2005?
You can directly bind to the static object created by Visual Studio.
In your windows declaration add:
```
xmlns:p="clr-namespace:UserSettings.Properties"
```
where `UserSettings` is the application namespace.
Then you can add a binding to the correct setting:
```
<TextBlock Height="{Bin... | [
-0.09991168975830078,
-0.0550735667347908,
0.49505773186683655,
-0.16244901716709137,
0.1460779756307602,
0.0769885927438736,
0.36088448762893677,
-0.13014072179794312,
-0.21982654929161072,
-0.7395604848861694,
-0.22015319764614105,
0.7177475690841675,
-0.9391869902610779,
0.1754067093133... | |
How important is it to make a website layout fit on 640 x 480 and 800 x 600 displays? For some time I have been designing with the assumption of *at least* 1024 x 768, but I haven't been doing it professionally (just on my site which is just a blog that only 10-15 friends read). Does anyone have any non-anecdotal stati... | [
0.633580207824707,
0.10265808552503586,
0.23932893574237823,
0.14646488428115845,
0.09381923079490662,
-0.09605035185813904,
0.1156034767627716,
0.4329540431499481,
-0.4524330794811249,
-0.9461361765861511,
0.24462710320949554,
0.4071708619594574,
0.023238949477672577,
0.19836591184139252,... | |
rather have actual data (or links to actual data), especially if it is data about general users (rather than geeks).*
***Note 2:** I'm not concerned with extremely-small displays like those on PDAs and cell phones (at least not at the moment). I'm just talking about desktop/laptop monitors.*
I think the general assump... | [
0.8308281302452087,
-0.20267370343208313,
0.44541674852371216,
0.18646855652332306,
0.033087726682424545,
-0.3105735182762146,
-0.041295867413282394,
0.7497685551643372,
-0.6268932223320007,
-0.6752434968948364,
-0.004036103840917349,
0.3680762052536011,
0.09462130069732666,
-0.01577928289... | |
just so the content doesn't look pathetic :o)
Here is the source I often use for web statistics with its [august 2008 stats](http://www.thecounter.com/stats/2008/August/res.php) showing 800x600 at 7%. | [
0.054898347705602646,
-0.32621777057647705,
0.4038464426994324,
0.2436857968568802,
-0.023224622011184692,
0.15548987686634064,
0.4247303307056427,
0.18078188598155975,
-0.44694167375564575,
-0.28266605734825134,
0.09321533143520355,
0.45554137229919434,
0.28875336050987244,
0.107652433216... | |
I've been beating myself over the head with this app migration for a few days now. What I have is an old MSSQL Server 2000-backed application that is being upgraded to a Windows 2003 Server running SMSQL Server 2005. I know little about SQL Server but obviously not enough.
I tried backing up the database on the old se... | [
-0.09088737517595291,
0.3453804552555084,
0.5118430256843567,
-0.2179546356201172,
0.25129255652427673,
0.12913651764392853,
0.47931143641471863,
-0.022065388038754463,
-0.42170074582099915,
-0.5908662676811218,
0.2296941578388214,
0.7834219336509705,
-0.30974629521369934,
0.08917669951915... | |
it was on the old server.
So then I tried to do an Export Data, selected the local SQL 2000 database, pointed it to the new SQL 2005 database on the other machine, and it gets all the way to the end and dies complaining about the way one of the tables is being joined.
I tried then doing a 'Generate SQL' command on th... | [
0.29480797052383423,
0.10103870183229446,
0.4752603769302368,
-0.15042005479335785,
-0.1233125627040863,
-0.28893667459487915,
0.22054964303970337,
-0.06480627506971359,
-0.3780304193496704,
-0.28944408893585205,
0.32552531361579895,
0.4061534106731415,
-0.49458014965057373,
0.546378910541... | |
no idea what their true intentions were when they set up these tables.
Is there any other way I can try migrating this database over?
The backup file has the "hard" location of the data files stored in it. You just need to update them:
When you restore in 2005, before you click the final "ok" to restore (after you ha... | [
0.10415703803300858,
0.11528651416301727,
0.4966064691543579,
0.1365887075662613,
0.09518937766551971,
-0.14358803629875183,
0.19777221977710724,
0.23341934382915497,
-0.5227968692779541,
-0.5965738892555237,
-0.07715992629528046,
0.7365483641624451,
-0.02949640341103077,
0.231212794780731... | |
Let's say that a class has a `public int counter` field that is accessed by multiple threads. This `int` is only incremented or decremented.
To increment this field, which approach should be used, and why?
* `lock(this.locker) this.counter++;`,
* `Interlocked.Increment(ref this.counter);`,
* Change the access modifie... | [
-0.017939329147338867,
-0.08065202832221985,
-0.03251272812485695,
0.09026851505041122,
-0.08153299987316132,
-0.16248562932014465,
0.5642873644828796,
-0.05077135190367699,
-0.3212897479534149,
-0.4849883019924164,
-0.021628977730870247,
0.541025698184967,
-0.38181087374687195,
0.55393087... | |
`volatile` is that multiple threads running on multiple CPUs can and will cache data and re-order instructions.
If it is **not** `volatile`, and CPU A increments a value, then CPU B may not actually see that incremented value until some time later, which may cause problems.
If it is `volatile`, this just ensures the ... | [
0.03439187631011009,
0.04533322900533676,
0.1888366937637329,
0.10191462188959122,
0.24204018712043762,
-0.10212576389312744,
0.3597450256347656,
-0.14618003368377686,
-0.4227568805217743,
-0.42116525769233704,
-0.009403602220118046,
0.5768453478813171,
-0.26575788855552673,
0.308762222528... | |
you access `this.counter`). It prevents any other threads from executing any other code which is guarded by `locker`.
Using locks also, prevents the multi-CPU reordering problems as above, which is great.
The problem is, locking is slow, and if you re-use the `locker` in some other place which is not really related th... | [
0.0014954396756365895,
0.009575298987329006,
0.2959864139556885,
0.30131810903549194,
0.0946565717458725,
-0.33021196722984314,
0.47822073101997375,
-0.2221301943063736,
-0.5919515490531921,
-0.6101815700531006,
-0.12757712602615356,
0.637145459651947,
-0.21232903003692627,
0.2069321572780... | |
elsewhere either. It's also very fast (as MSDN says, on modern CPUs, this is often literally a single CPU instruction).
~~I'm not entirely sure however if it gets around other CPUs reordering things, or if you also need to combine volatile with the increment.~~
InterlockedNotes:
1. INTERLOCKED METHODS ARE CONCURREN... | [
0.10645201802253723,
-0.1645241677761078,
0.030853644013404846,
0.32231438159942627,
0.003944046795368195,
-0.24784977734088898,
0.3624074161052704,
-0.15747441351413727,
-0.3926810920238495,
-0.1809774488210678,
-0.052827656269073486,
0.22164997458457947,
-0.22303086519241333,
0.017474191... | |
is using the full fence.
### Footnote: What volatile is actually good for.
As `volatile` doesn't prevent these kinds of multithreading issues, what's it for? A good example is saying you have two threads, one which always writes to a variable (say `queueLength`), and one which always reads from that same variable.
I... | [
0.4051443338394165,
-0.3562192916870117,
0.0789751261472702,
0.054563555866479874,
-0.08321867138147354,
-0.280756413936615,
0.23644940555095673,
0.0600305050611496,
-0.47331586480140686,
-0.3293301463127136,
0.1290322095155716,
0.6292571425437927,
-0.4020934998989105,
-0.08258417993783951... | |
the most up-to-date thing that thread A has written. Note however that this logic *only* works if you have writers who never read, and readers who never write, *and* if the thing you're writing is an atomic value. As soon as you do a single read-modify-write, you need to go to Interlocked operations or use a Lock. | [
0.32430118322372437,
0.0688919946551323,
0.03957740589976311,
0.2198217511177063,
0.1850557178258896,
-0.2664559781551361,
0.2578619420528412,
0.27719250321388245,
-0.25849777460098267,
-0.44375118613243103,
-0.12470083683729172,
0.4206558167934418,
-0.11389857530593872,
0.1564346849918365... | |
In terms of Java, when someone asks:
> what is polymorphism?
Would **overloading** or **overriding** be an acceptable answer?
I think there is a bit more to it than that.
*IF you had a abstract base class that defined a method with no implementation, and you defined that method in the sub class, is that still ove... | [
0.003428182564675808,
0.0018756615463644266,
-0.4494513273239136,
-0.1768590360879898,
-0.3626141846179962,
-0.270065575838089,
0.3568304181098938,
-0.15402276813983917,
-0.06672472506761551,
-0.6670548319816589,
-0.1528157889842987,
0.45322751998901367,
-0.8447458148002625,
-0.02991311065... | |
Humans. It is only definable for the subclasses Male and Female. Also, Human is an abstract concept — You cannot create a human that is neither Male nor Female. It’s got to be one or the other.
So we defer the implementation by using the abstract class.
```
public class Male extends Human{
...
@Override
publi... | [
0.205081969499588,
0.16890712082386017,
0.00921670626848936,
0.034628987312316895,
-0.31662094593048096,
0.19948936998844147,
0.40655428171157837,
-0.3998916447162628,
-0.1276194006204605,
-0.6937198638916016,
-0.3174339234828949,
0.5026243925094604,
-0.598314106464386,
0.21955189108848572... | |
we can tell an entire room full of Humans to go pee.
```
public static void main(String[] args){
ArrayList<Human> group = new ArrayList<Human>();
group.add(new Male());
group.add(new Female());
// ... add more...
// tell the class to take a pee break
for (Human person : group) person.goPee();
... | [
0.8106746673583984,
-0.09123948216438293,
0.16108159720897675,
-0.2957366406917572,
0.16991592943668365,
-0.03376053646206856,
0.4582376182079315,
-0.5139269828796387,
-0.1066666692495346,
-0.5560399293899536,
-0.2928890585899353,
0.5858342051506042,
-0.6396291851997375,
-0.023352134972810... | |
I've noticed that sometimes wrapper scripts will use `${1:+"$@"}` for the parameters rather than just `"$@"`.
For example, <http://svn.macosforge.org/repository/macports/trunk/dports/editors/vim-app/files/gvim.sh> uses
```
exec "$binary" $opts ${1:+"$@"}
```
Can anyone break `${1:+"$@"}` down into English and expla... | [
0.295316219329834,
0.17394818365573883,
-0.13186778128147125,
-0.023337556049227715,
-0.21782788634300232,
0.19853079319000244,
0.42427346110343933,
0.1049438863992691,
-0.0961546078324318,
-0.273409366607666,
-0.11887677013874054,
0.7320919632911682,
-0.18905602395534515,
-0.0074192527681... | |
were no arguments, instead of the correct, current behaviour of substituting nothing. Whether any such systems are still in use is open to debate.
[Hmm: that expansion would not work correctly for:
```
command '' arg2 arg3 ...
```
In this context, the correct notation is:
```
${1+"$@"}
```
This works correctly w... | [
0.006551639176905155,
0.13246773183345795,
0.22386333346366882,
-0.20868180692195892,
0.3897916078567505,
-0.015575709752738476,
0.45791348814964294,
0.020475445315241814,
-0.3304041624069214,
-0.19618578255176544,
-0.3301839530467987,
0.6420449614524841,
-0.32864904403686523,
0.1391144096... | |
Is anyone out there still using DataFlex? If so, what are you favorite tips and tricks for this venerable 4GL?
It all depends on the version of DF you're using, but here's a couple:
1. Do not use "While" when traversing record sets. Always use repeat. (see example at bottom)
2. The dataflex newsgroups (news.dataacces... | [
0.47216638922691345,
-0.2362198680639267,
0.34753671288490295,
0.040138646960258484,
-0.11430404335260391,
-0.3642781972885132,
0.4280205965042114,
0.02950768545269966,
-0.36248576641082764,
-0.488021582365036,
-0.0559031218290329,
0.723545491695404,
-0.04541356861591339,
-0.23124942183494... | |
to have to go and lie down. I can't believe someone asked a dataflex question.
```
clear orders
move const.complete to orders.status
find ge orders by index.2
repeat
if orders.status ne const.complete indicate finderr true
if (not(finderr)) begin
send doYourStuffHere
find gt orders by index.2
... | [
-0.4033302962779999,
0.13998235762119293,
0.5385732054710388,
-0.23626579344272614,
-0.023263508453965187,
-0.07558773458003998,
0.4553186893463135,
-0.4018062651157379,
-0.1962563544511795,
-0.6629353761672974,
-0.631694495677948,
0.6075426340103149,
-0.2593800127506256,
-0.00835243519395... | |
We have a VXML project that a 3rd party parses to provide us with a phone navigation system. We require them to enter an id code to leave a message, which is later reviewed by our company.
We currently have this working as follows:
```
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Stream m = new MemoryStr... | [
0.13975417613983154,
0.12456056475639343,
0.889426589012146,
0.06912693381309509,
0.17714732885360718,
-0.1311556100845337,
0.290554940700531,
-0.25043919682502747,
-0.18439553678035736,
-0.48074445128440857,
-0.12003237009048462,
0.5162675380706787,
-0.23418106138706207,
0.006840100977569... | |
taking the output stream and feeding the written XML into it...but why is it first reading the entire string? Isn't that inefficient?
Is there a better way to write the above code?
Yes, just write directly to the Response `Output` (IO.StreamWriter) or `OutputStream` (IO.Stream):
```
XmlTextWriter XML_Writer = new Xml... | [
0.012921137735247612,
-0.36615297198295593,
0.6251760721206665,
-0.07774759829044342,
-0.14200837910175323,
0.045903075486421585,
-0.04646513983607292,
-0.2846401631832123,
-0.03319374471902847,
-0.6613171696662903,
-0.18989978730678558,
0.6015098690986633,
-0.28411054611206055,
-0.1120655... | |
In java, I could do this with the 'final' keyword. I don't see 'final' in C#. Is there a substitute?
You're looking for the `sealed` keyword. It does exactly what the `final` keyword in Java does. Attempts to inherit will result in a compilation error. | [
0.026843875646591187,
-0.14806053042411804,
-0.07040359079837799,
-0.027452651411294937,
-0.30895957350730896,
-0.39016711711883545,
0.23058654367923737,
-0.03517571836709976,
-0.2278662621974945,
-0.5339643359184265,
-0.18409429490566254,
0.3611425459384918,
-0.20329664647579193,
-0.02774... | |
I want to store a large number of sound files in a database, but I don't know if it is a good practice. I would like to know the pros and cons of doing it in this way.
I also thought on the possibility to have "links" to those files, but maybe this will carry more problems than solutions. Any experience in this direct... | [
0.6417279243469238,
0.41908320784568787,
0.398025244474411,
0.0971432700753212,
0.2446518987417221,
-0.2872018814086914,
0.06052470952272415,
0.03559364005923271,
-0.11600621789693832,
-0.44138458371162415,
0.008400127291679382,
0.8860707879066467,
-0.07852911204099655,
0.3523852825164795,... | |
artist, length, etc) in the database, along with a partial path to the file. When it's time to retrieve the file, you extract the file's path, prepend some file root (or URL) to it, and return that.
So, you'd have a "location" column, with a partial path in it, like "a/b/c/1000", which you then map to:
"<http://myserv... | [
0.30230948328971863,
-0.13736242055892944,
0.5570045709609985,
0.27467861771583557,
0.18448200821876526,
0.030802471563220024,
-0.24687908589839935,
-0.316228449344635,
-0.398453027009964,
-0.779701828956604,
-0.05427788197994232,
0.3000274896621704,
-0.035137541592121124,
0.18431501090526... | |
have thousands of media files, don't store them all in one giant directory - that's a performance bottleneck on some file systems. Instead,break them up into multiple balanced sub-trees. | [
0.44717684388160706,
0.1369476169347763,
0.06420742720365524,
0.6031379103660583,
0.14355923235416412,
-0.3628082275390625,
-0.16183364391326904,
-0.0623888298869133,
-0.46401289105415344,
-0.5032400488853455,
-0.01979331485927105,
0.22681811451911926,
-0.245014026761055,
0.244875058531761... | |
Ok, Regex wizards. I want to be able to search through my logfile and find any sessions with the word 'error' in it and then return the entire session log entry.
I know I can do this with a string/array but I'd like to learn how to do it with Regex but here's the question. If I decide to do this with Regex do I [have ... | [
0.6220647096633911,
0.017138022929430008,
-0.053043901920318604,
0.08388015627861023,
-0.23985859751701355,
-0.1727946400642395,
0.47322773933410645,
-0.09238483011722565,
-0.279161274433136,
-0.8108269572257996,
0.17220325767993927,
0.7768706679344177,
-0.3734196126461029,
-0.253478616476... | |
solutions below but, since I've confused the issue by stating that I was using a Perl engine, many of the answers were in Perl (which cannot be used in my case). I did however post my solution below.
---
```
2008.08.27 08:04:21 (Wed)------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build :... | [
-0.0774848535656929,
0.1202402263879776,
0.7769597172737122,
-0.27687159180641174,
-0.17256219685077667,
0.0235491544008255,
0.6634960174560547,
-0.23796384036540985,
-0.2518913149833679,
-0.4685211777687073,
-0.08475765585899353,
0.46736806631088257,
-0.3179825246334076,
0.126127764582633... | |
correctly?
2008.08.27 08:04:24 (Wed)-------------End of Session------------------
2008.08.27 08:05:56 (Wed)------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Error: Wait a bit (possible timeout).
SMTP server error
Error: Not a socket.
Error: Not a so... | [
0.09866143018007278,
0.3033841848373413,
0.6507861018180847,
-0.17385387420654297,
0.11693037301301956,
-0.023518607020378113,
0.9023195505142212,
-0.28667157888412476,
0.030007420107722282,
-0.1110592633485794,
-0.10301920026540756,
0.8314421772956848,
-0.16895650327205658,
-0.00233883317... | |
a string then went through line by line and added each line to a third variable until the line contained "--End of Session--". I then added that line to the 3rd var as well and then searched that 3rd var for the word "error". If it contained it, I added the 3rd var to a forth and then cleared the 3rd var and started go... | [
0.2814837098121643,
0.04971220716834068,
0.5552035570144653,
-0.48756083846092224,
-0.08993658423423767,
0.11607031524181366,
0.38523659110069275,
-0.4030573070049286,
-0.07096237689256668,
-0.27543267607688904,
0.017724324017763138,
0.5221623778343201,
-0.6506350636482239,
0.0235104095190... | |
gp.from(gp "[]" a)
if(find(gp "error" 0 1)>-1)
gp.trim
email.from(email gp "[]")
gp=""
continue
gp.from(gp "[]" a)
email.trim
```
It turns out that regex can really be a bear-cat to implement when it doesn't fit well. Kind of like using a screwdriver instead of a ha... | [
0.27545052766799927,
0.2917463183403015,
0.583215594291687,
-0.24225632846355438,
-0.167499378323555,
-0.09388124942779541,
0.3404592275619507,
-0.5669535994529724,
-0.06258722394704819,
-0.5837864875793457,
0.028133772313594818,
0.7965817451477051,
-0.27085575461387634,
0.1153363138437271... | |
break the screwdriver, and probably hurt you in the process. | [
0.5276575684547424,
0.4376716613769531,
-0.20283499360084534,
0.1991063803434372,
0.025924859568476677,
0.12647148966789246,
0.13713426887989044,
-0.30213218927383423,
-0.13858354091644287,
0.04389890655875206,
0.4240548014640808,
0.27483224868774414,
0.18187999725341797,
-0.22096675634384... | |
I want to talk to a flash server which uses RTMP, but I don't want to use Flash, but rather c# or java.
I was looking at Red5 but their client API seems to be a bit wobbly.
Does anyone have any other ideas?
["RTMP: Flash video streaming protocol"](http://captsolo.net/info/blog_a.php/2009/01/19/rtmp_flash_video_stream... | [
0.4595417380332947,
0.14160484075546265,
0.4008212387561798,
0.0037226092536002398,
-0.35962316393852234,
-0.2692154347896576,
0.10045745223760605,
-0.10358055680990219,
-0.35914379358291626,
-0.6613661646842957,
-0.09638608247041702,
0.7743348479270935,
-0.42897701263427734,
0.02914631925... | |
XBMC project. | [
-0.09438540041446686,
0.019151054322719574,
0.10349642485380173,
0.3017330467700958,
-0.08153288811445236,
-0.4225934147834778,
-0.24906276166439056,
-0.008823412470519543,
-0.11083398759365082,
-0.29984939098358154,
-0.4271290600299835,
0.2608596980571747,
-0.5207026600837708,
0.054081294... | |
I would find out the *floppy inserted state*:
* no floppy inserted
* unformatted floppy inserted
* formatted floppy inserted
Can this determined using "WMI" in the System.Management namespace?
If so, can I generate events when the *floppy inserted state* changes?
Using Bob Kings idea I wrote the following method.
I... | [
0.04935906454920769,
-0.09090840816497803,
0.245682954788208,
0.07110624760389328,
0.3496592938899994,
-0.5287734270095825,
0.3092397153377533,
-0.32337498664855957,
-0.1031981036067009,
-0.47160604596138,
0.04330688714981079,
1.097912073135376,
-0.22864967584609985,
0.2734019458293915,
... | |
using( var logicalDisks = searcher.Get() ) {
foreach( ManagementObject logicalDisk in logicalDisks ) {
var fs = logicalDisk[ "FreeSpace" ];
Console.WriteLine( "FreeSpace = " + ( fs ?? "Not Available" ) );
logicalDisk.Dispose(); | [
-0.3381558358669281,
-0.1213483214378357,
0.31912246346473694,
-0.20574040710926056,
0.5053326487541199,
-0.18405047059059143,
0.24121329188346863,
-0.423380970954895,
0.13530005514621735,
-0.49879172444343567,
-0.5369663834571838,
0.7242032289505005,
-0.38916686177253723,
0.19370561838150... | |
}
}
}
``` | [
0.033695679157972336,
0.4034728407859802,
0.1949702352285385,
-0.15257494151592255,
0.4299153685569763,
-0.20141436159610748,
0.07711705565452576,
0.4467844069004059,
0.3091506361961365,
-0.5090379118919373,
-0.3048633635044098,
0.5600791573524475,
-0.33611243963241577,
0.3141762912273407,... | |
I need to create XML in Perl. From what I read, [XML::LibXML](http://search.cpan.org/dist/XML-LibXML) is great for parsing and using XML that comes from somewhere else. Does anyone have any suggestions for an XML Writer? Is [XML::Writer](http://search.cpan.org/dist/XML-Writer) still maintained? Does anyone like/use it?... | [
0.5079788565635681,
0.17363671958446503,
0.37037625908851624,
0.1735921949148178,
-0.10558386892080307,
-0.15835951268672943,
-0.07020100951194763,
0.003668968565762043,
-0.17993547022342682,
-0.36711978912353516,
0.04017220810055733,
0.3331681191921234,
0.0665237307548523,
0.0201721061021... | |
maintained (at least, as of February of this year), and it's indeed one of the favorite Perl XML writers out there.
As for describing the syntax, one is better to look at the module's documentation (the link is already in the question). To wit:
```
use XML::Writer;
my $writer = new XML::Writer(); # will write to s... | [
0.0907822772860527,
0.15658117830753326,
0.7889861464500427,
-0.28024086356163025,
-0.3235149681568146,
0.03582248464226723,
0.2538244128227234,
0.0534113347530365,
-0.20490369200706482,
-0.48638230562210083,
-0.2683793306350708,
0.31897464394569397,
0.03116905316710472,
0.0331123471260070... | |
I have an application where the contents of e-mails that get sent are stored in a .resx file.
This is an ASP.Net application, the .resx file lives in /App\_GlobalResources
When I need to send an e-mail, i'm reading this using:
```
HttpContext.GetGlobalResourceObject("MailContents", "EmailID").ToString
```
Now... | [
0.18053124845027924,
0.19480696320533752,
0.4111253023147583,
0.08595521003007889,
-0.026859883219003677,
-0.05160604044795036,
0.24681679904460907,
0.06986195594072342,
-0.34602081775665283,
-0.9568201303482056,
-0.06293035298585892,
0.5014626979827881,
-0.02886306867003441,
0.27943742275... | |
if so, use a separate method.
The separate method I'm looking at right now (after resigning myself to the fact that there's nothing better) is to have the path to the .resx file of the website stored in the app.config file, and somehow read that file.
I started trying with System.Resources.ResourceReader, but it ... | [
0.37819164991378784,
-0.1718919426202774,
0.5984790921211243,
0.3600228428840637,
0.25329920649528503,
-0.10891597718000412,
0.3829479217529297,
-0.07811501622200012,
-0.34610047936439514,
-0.9807586073875427,
-0.07310223579406738,
0.6302348375320435,
-0.13250833749771118,
0.32464894652366... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.