text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I would like to simulate that my ASP.NET application is hist by say simdomain.com.
How can i do that easily?
Ideally I would like some kind of filter, so requests to certain domains are routed to localhost, and it should be easy to turn it on and off.
Edit the [hosts file](http://en.wikipedia.org/wiki/Hosts_file).
1... | [
0.6084856390953064,
-0.010601037181913853,
0.5224089026451111,
-0.11150990426540375,
-0.06555850803852081,
-0.5990629196166992,
0.15339593589305878,
-0.025086281821131706,
-0.15029263496398926,
-0.8401513695716858,
-0.030578378587961197,
0.5593571066856384,
-0.43847495317459106,
0.24769884... | |
Isn’t a class with only static members a kind of singleton design pattern? Is there any disadvantage of having such a class? A detailed explanation would help.
This kind of class is known as a [monostate](http://jeremyjarrell.com/archive/2008/04/21/88.aspx) - it is somewhat different from a singleton.
Why use a monost... | [
0.00038874888559803367,
0.04314236342906952,
-0.5453817248344421,
0.2160579413175583,
-0.38000714778900146,
0.050690460950136185,
0.42328202724456787,
-0.08432548493146896,
-0.3667762279510498,
-0.2575339078903198,
-0.33665311336517334,
0.31377896666526794,
-0.45026540756225586,
0.41792544... | |
singleton. | [
-0.1051471009850502,
0.1219281554222107,
-0.21090693771839142,
-0.07306060194969177,
0.28801122307777405,
0.44695502519607544,
-0.18714185059070587,
0.17831707000732422,
-0.300687313079834,
-0.10908903181552887,
-0.1370609700679779,
0.43984031677246094,
-0.16718867421150208,
0.325424015522... | |
I want to read a list the names of files in a folder in a web page using php.
is there any simple script to acheive it?
The simplest and most fun way (imo) is [glob](http://is.php.net/manual/en/function.glob.php)
```
foreach (glob("*.*") as $filename) {
echo $filename."<br />";
}
```
But the standard way is to u... | [
0.22269584238529205,
0.22515769302845,
0.47481149435043335,
-0.2888670563697815,
-0.0047866590321063995,
0.012536736205220222,
0.3749238848686218,
-0.342793345451355,
-0.20468826591968536,
-0.56355220079422,
-0.20100630819797516,
0.30199506878852844,
-0.3973844051361084,
0.0363390780985355... | |
closedir($dh);
}
}
```
There are also the [SPL DirectoryIterator methods](http://is.php.net/manual/en/directoryiterator.construct.php). If you are interested | [
0.043362975120544434,
0.017332695424556732,
0.5410127639770508,
-0.07163932174444199,
-0.21600158512592316,
-0.21732668578624725,
0.10781729966402054,
-0.04346591606736183,
-0.26887276768684387,
-0.4669572412967682,
-0.3863983452320099,
0.5403768420219421,
-0.34502771496772766,
0.054367810... | |
I'm using site wide caching with [memcached](http://en.wikipedia.org/wiki/Memcached) as the backend. I would like to invalidate pages in the cache when the underlying database object changes.
If the page name changes then I would invalidate the whole cache (as it affects navigation on every page. Clumsy but sufficien... | [
-0.11173611879348755,
0.28785574436187744,
0.3288254737854004,
0.010134140960872173,
-0.15285566449165344,
-0.5175051689147949,
0.5334264039993286,
0.08606088906526566,
-0.13011568784713745,
-0.8032752871513367,
-0.11201708018779755,
0.460673451423645,
-0.3296428620815277,
0.48928895592689... | |
[this question](https://stackoverflow.com/questions/1995126/invalidating-a-path-from-the-django-cache-recursively) for an example. | [
-0.1701734960079193,
0.3879694938659668,
-0.08010660111904144,
-0.023436617106199265,
-0.025006035342812538,
-0.5527358651161194,
0.2850136458873749,
-0.10678578168153763,
-0.46331778168678284,
0.05135544389486313,
-0.21581080555915833,
0.3868138790130615,
-0.3248468041419983,
0.2042877078... | |
I'm looking for code of full applications that **(1) use the MVVM pattern** and **(2) are approachable for WPF/Silverlight/MVVM beginners**. So far I have only found:
* [Crack.NET](http://www.codeplex.com/cracknetproject/SourceControl/ListDownloadableCommits.aspx) - A runtime debugging and scripting tool (useful but q... | [
0.4692872166633606,
0.30273371934890747,
0.041324079036712646,
0.21519842743873596,
-0.023699304088950157,
-0.015845254063606262,
0.34434735774993896,
-0.04580136016011238,
-0.36726096272468567,
-0.4955451190471649,
-0.13051313161849976,
0.5254797339439392,
0.008830325677990913,
-0.1926290... | |
15+ MVVM code examples and posted the here:
**[Overview of WPF/Silverlight code examples that help you learn MVVM](http://tanguay.info/web/index.php?pg=notesItems&id=28)**.
Given the question, you may be interested in the current effort going on to create a "Pet Shop" type reference implementation for M-V-VM. You can... | [
0.6208974719047546,
0.18384407460689545,
0.5316585302352905,
0.09864293038845062,
-0.1998637318611145,
0.16757409274578094,
0.16309687495231628,
-0.17222844064235687,
-0.46387434005737305,
-0.3190441131591797,
-0.11170164495706558,
0.5974757671356201,
-0.15357264876365662,
0.16437721252441... | |
I have about 50 tables with created-by and changed-by referencing the user table. When I want to delete the user, I would like to create a list of what tables this user has data in, so one can go delete/edit everything belonging to said user. Is there any way of doing this in SQL?
Not exactly sure of what you're going ... | [
0.030439594760537148,
0.28368571400642395,
0.4220016598701477,
0.042015112936496735,
0.014782418496906757,
-0.10281678289175034,
-0.046307794749736786,
-0.155990868806839,
-0.5745276212692261,
-0.47481298446655273,
0.1655884087085724,
0.465162068605423,
-0.28456369042396545,
0.408256798982... | |
This is the iframe I'm trying to access:
```
<div class="mceBody" id="additionalTxt_b">
<iframe frameborder="0" id="additionalTxt_f" src='javascript:""' class="punymce"/>
</div>
```
Using this line:
```
frames['additionalTxt_f'].document.getElementsByTagName("body")[0].innerHTML
```
For some reason I'm ... | [
0.062171850353479385,
0.1805398017168045,
0.6427336931228638,
-0.4888635277748108,
-0.21528418362140656,
0.05344417318701744,
-0.04024915769696236,
-0.04738670960068703,
-0.17857371270656586,
-0.9021639823913574,
0.05941877141594887,
0.35580480098724365,
-0.452335387468338,
-0.205239817500... | |
often thinks names and ids are the same thing.
If you want to access a frame's content via ID, use the DOM Level 2 HTML `contentDocument` property instead of the old-school (“DOM Level 0”) `frames` array:
```
document.getElementById('additionalTxt_f').contentDocument.body.innerHTML
```
...but then, for compatibilit... | [
0.2843829095363617,
0.0635349377989769,
0.6488375067710876,
-0.021921208128333092,
0.005705591291189194,
-0.24634280800819397,
0.24296967685222626,
-0.6121731996536255,
-0.08775795996189117,
-0.7871015071868896,
-0.23326198756694794,
0.55919349193573,
-0.3180328607559204,
0.139778167009353... | |
I have the following property on a class persisted with NHibernate:
```
public virtual string Code
{
get { return Id.ToString("SP000"); }
}
```
However I've come to do this, which of course doesn't work:
```
Session.Linq<MyType>().Where(x => x.Code.Contains(searchTerm));
```
So, is it possible to store Code i... | [
0.05464571341872215,
0.1328735649585724,
0.4631912410259247,
-0.008427120745182037,
-0.2655436396598816,
-0.2475259155035019,
0.28257444500923157,
-0.34341347217559814,
-0.05592212826013565,
-0.610560953617096,
0.2066846638917923,
0.5537950396537781,
-0.3731745779514313,
0.2709882855415344... | |
that is a read-only string. If you had records with code "SP123" and "SP234", the query would return both records for the searchTerm "2".
Try using HQL (Hibernate Query Language) instead of Linq for this query. You can use SQL functions in HQL, so your query would look something like:
```
"from Table t where 'SP' + C... | [
0.11521247774362564,
-0.07629001885652542,
0.49694308638572693,
-0.021760329604148865,
-0.1795397251844406,
-0.10224100947380066,
0.21637289226055145,
-0.1971125453710556,
-0.18485845625400543,
-0.3449891209602356,
-0.021292587742209435,
0.3854321241378784,
-0.3743268549442291,
0.018488015... | |
I've chosen to move Form processing from Controller to *MyForm* class, in order to follow **ThinController/FatModel** rule. But some of my code in Zend\_Form class needs to perform
a redirect.
In Zend\_Controller\_Action my redirect was:
> $this->\_redirect('/');
What would it become in Zend\_Form?
```
$redirector ... | [
-0.28622519969940186,
-0.559280276298523,
0.7581403255462646,
-0.08486436307430267,
-0.17915627360343933,
0.15872225165367126,
0.03811716288328171,
-0.605487585067749,
-0.39223796129226685,
-0.6264627575874329,
-0.0673278197646141,
0.479545533657074,
-0.4224545955657959,
0.1745633780956268... | |
I have a .net 3.5 application that I'm running over an intranet and as far as I know it should "just run" over a mapped drive but I get a SecurityException type "FileIOPermission" this happens when I call
```
File.Open(mCurrentFile, FileMode.Create, FileAccess.Write, FileShare.Read)
```
I can create files on the ma... | [
0.29915866255760193,
0.024870317429304123,
0.49013105034828186,
-0.15135455131530762,
0.045297522097826004,
-0.4826134145259857,
0.48951223492622375,
0.12210544943809509,
-0.4697725176811218,
-0.7586337924003601,
0.05699177458882332,
0.5023195147514343,
-0.338168203830719,
0.55342566967010... | |
can't change it...
I think you need to clarify the issue here. I believe you are confusing two different, unrelated things:-
1) Your application encounters an exception when trying to open a network file
2) An application may not be executable if residing on a network share.
It seems from your question that 2) is no... | [
0.40738701820373535,
0.3571486175060272,
0.30926671624183655,
0.11646109819412231,
0.3643692135810852,
-0.233128622174263,
0.3359920084476471,
0.1276177167892456,
-0.570023238658905,
-0.4363401532173157,
-0.19146819412708282,
0.4013115167617798,
-0.484660804271698,
0.3485988676548004,
-0... | |
permission to read from the specified location. You need to confirm 2 things, a) that the path to the file is correct at the point of execution and b) that the account in which the process is running has the necessary permissions in that location. | [
0.314919650554657,
0.33575639128685,
0.3143216073513031,
0.3231734335422516,
0.5465750098228455,
-0.40278542041778564,
0.24379411339759827,
-0.12800870835781097,
-0.17615503072738647,
-0.3163273334503174,
-0.27894720435142517,
0.5055168271064758,
0.3342374265193939,
0.11171464622020721,
... | |
```
BASE_URL = 'http://foobar.com?foo=%s'
variable = 'bar'
final_url = BASE_URL % (variable)
```
I get this `'http://foobar.com?foo=bar'` # It ignores the inside string.
But i wanted something like this `'http://foobar.com?foo='bar''`
Thanks for the answer.
Can you help me out with almost the same problem:
```
... | [
0.40132370591163635,
0.5033379197120667,
0.32547104358673096,
-0.0019779186695814133,
-0.11984114348888397,
-0.11819182336330414,
0.11638420820236206,
-0.007279290352016687,
0.016345519572496414,
-0.1987328678369522,
-0.2447117269039154,
0.5578271746635437,
-0.4408382177352905,
0.010461863... | |
all that for you.
Regarding your 2nd question: If you absolutely also want to have the quotes in there, you still have to either escape them when appending the contained string, or (probably the safer way of doing it) would be using repr(...)
```
lst = ['foo', 'bar', 'foo bar']
lst2 = []
for l in lst:
if ' ' in ... | [
0.28700512647628784,
0.17816591262817383,
0.5065226554870605,
-0.24953323602676392,
0.05188789591193199,
0.15571986138820648,
0.11392194777727127,
-0.22212351858615875,
-0.14308011531829834,
-0.1907438486814499,
-0.3618730306625366,
0.7491694092750549,
-0.501552402973175,
-0.13707105815410... | |
I've created a mutable array containing NSRect values. I want to check whether the NSPoint I created is within this rectangle. What is the best way to do this in cocoa.
From the [Foundation Functions Reference](https://developer.apple.com/documentation/foundation/nsrect):
```
BOOL NSPointInRect (
NSPoint aPoint,
... | [
-0.20459529757499695,
0.1331651359796524,
0.4440334737300873,
-0.19053632020950317,
0.04837559536099434,
0.1277780383825302,
0.023735586553812027,
0.07632971554994583,
-0.4507746696472168,
-0.6514543890953064,
-0.23666590452194214,
0.08461640030145645,
-0.19790461659431458,
0.2406948208808... | |
I´ve lately been thinking about the things i´m returning from methods and I noticed that there are 4 different things i return when the method fails.
What bothers me about it, is that my code is not very consitent in this regard, so i wanted to ask about your "best practices".
So lets imagine a method that takes Foo... | [
0.12863731384277344,
0.09999638050794601,
0.1077202558517456,
-0.27697816491127014,
-0.28019294142723083,
0.04593605548143387,
0.3175140917301178,
-0.2882048785686493,
-0.04404135420918465,
-0.28919801115989685,
0.0001915645261760801,
0.7421923279762268,
-0.5913254022598267,
0.174862638115... | |
throw an exception
4. a special list value indicating failure like: new List{new FailureBar()}
I really hate option 4 so I´m mostly interessted to hear when you use the other 3 options and why
I'd choose between an empty list and an exception depending on the nature of the failure.
E.g.
If your database failed to co... | [
0.18676795065402985,
0.11304488033056259,
-0.0073849293403327465,
-0.07071331888437271,
-0.5770042538642883,
-0.1696842759847641,
0.5564623475074768,
0.10160733759403229,
-0.274041086435318,
-0.5180009007453918,
-0.07618965208530426,
0.5381433367729187,
-0.4176466166973114,
0.2807394266128... | |
I would like to merge one querysets related objects with another querysets related objects.
Some sample code to explain:
```
## Models
# sample models to illustrate problem
class PetShop(models.Model):
id = models.AutoField(primary_key=True)
shop_name = models.CharField(maxlength=255)
cats = models.ManyToM... | [
0.24863560497760773,
-0.06451461464166641,
0.4276450574398041,
-0.0037445982452481985,
0.09143495559692383,
0.08826645463705063,
0.2933928072452545,
-0.5134527683258057,
-0.09777047485113144,
-0.8909114003181458,
0.1558525711297989,
0.547732949256897,
-0.2547474205493927,
0.077803127467632... | |
take advantage of the fact that Django's many-to-many manager functions `add` and `remove` accept any number of positional arguments. In this case, I'd try:
```
destination_shop.cats.add(*source_shop.cats.all())
``` | [
-0.1441643089056015,
0.16267721354961395,
0.1505809724330902,
-0.2815314829349518,
0.07643520087003708,
-0.05653361603617668,
-0.22243106365203857,
0.21139876544475555,
-0.08728226274251938,
-0.4922828674316406,
-0.11213190853595734,
0.8206265568733215,
-0.4526176452636719,
-0.083673320710... | |
Do you have any recommendations of books or websites that would teach me mathematical notation. As a developer I work on a wide range of projects from .NET/SQL Server stuff through to Flash games and I often find myself referring to articles on the internet for guidance. Many of the articles contain mathematical formul... | [
0.6761191487312317,
0.33523356914520264,
-0.17522846162319183,
0.3717041015625,
0.35049936175346375,
-0.34450089931488037,
0.18223939836025238,
0.49592843651771545,
-0.11277493834495544,
-0.6238875389099121,
0.3042924404144287,
0.32252487540245056,
0.35405635833740234,
-0.18499796092510223... | |
by learning this notation I will be able to further my knowledge by actually being able to get stuck into more of it.
---
**Note**: *please, don't suggest I go back to school, and do a higher math course as, while I know this would be the best bet, it simply isn't an option. Other than that, any and all suggestions a... | [
0.6890228986740112,
0.18234793841838837,
0.13824419677257538,
0.3783312439918518,
-0.16222204267978668,
-0.2716326117515564,
0.04659954458475113,
0.487988144159317,
-0.1774909794330597,
-0.8203518986701965,
0.17275592684745789,
0.49014589190483093,
0.14765682816505432,
-0.07435332238674164... | |
math, mainly based around games
* Colour manipulation (programmatically fading from one colour to the next, adding and subtracting colours, making colours lighter / darker on the fly)
Hope this helps add a bit of context.
It sounds like a lot of your applications are in computer graphics.
One of the classic textbooks... | [
0.09053412824869156,
0.2269817441701889,
-0.28399792313575745,
0.02391827665269375,
-0.08271841704845428,
0.3184305429458618,
0.0022493465803563595,
-0.17209550738334656,
-0.2083570808172226,
-0.38999736309051514,
0.13003671169281006,
0.3853641748428345,
-0.12600263953208923,
-0.2133498042... | |
some basic searches on some of the linear algebra concepts, or check out a linear algebra book from the library.
It doesn't sound like you'd benefit a lot from a full "digestion" of a linear algebra course (which goes into eigenvalues, matrix factoring, & other stuff). I'd just take one concept at a time as it comes u... | [
0.3529568314552307,
-0.061455611139535904,
-0.00928844790905714,
0.3258310556411743,
0.33088910579681396,
-0.08342848718166351,
0.07172953337430954,
0.24240244925022125,
0.12044593691825867,
-0.6265316605567932,
0.2261013388633728,
0.5731465220451355,
0.18227694928646088,
-0.13473734259605... | |
I'm having trouble with Django templates and CharField models.
So I have a model with a CharField that creates a slug that replaces spaces with underscores. If I create an object, Somename Somesurname, this creates slug *Somename\_Somesurname* and gets displayed as expected on the template.
However, if I create an o... | [
0.15665894746780396,
0.14920221269130707,
0.17097851634025574,
-0.43701431155204773,
-0.3749496340751648,
-0.03233460709452629,
-0.04614376649260521,
0.08135140687227249,
-0.05202421918511391,
-0.7022011876106262,
0.30765846371650696,
0.6131716370582581,
-0.3016013503074646,
0.062934674322... | |
with its spaces?
Let me preface this by saying @DNS's answer is correct as to why the spaces are not showing.
With that in mind, this template filter will replace any spaces in the string with ` `
Usage:
```
{{ "hey there world"|spacify }}
```
Output would be `hey there world`
Here is the co... | [
0.11543785035610199,
-0.13920016586780548,
0.41542384028434753,
-0.3512879014015198,
-0.13906578719615936,
-0.04451975226402283,
0.34590256214141846,
-0.6553943157196045,
-0.2648157775402069,
-0.6851058006286621,
-0.3318958878517151,
0.33075428009033203,
-0.6044418215751648,
-0.09139526635... | |
work and how to install them, [check out the docs](http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#code-layout). | [
0.904629111289978,
0.35278165340423584,
0.22776077687740326,
-0.25348949432373047,
0.27945613861083984,
-0.4347120225429535,
0.0002995389804709703,
-0.40736687183380127,
-0.411088228225708,
-0.4677892327308655,
-0.33426615595817566,
0.6629796624183655,
-0.0413055382668972,
-0.4111712574958... | |
### Duplicate
> [What is the best CSS Framework and are they worth the effort?](https://stackoverflow.com/questions/203069)
>
> [Can someone Recommend a Bells and Whistles CSS framework?](https://stackoverflow.com/questions/322484)
>
> [Help me choose a CSS framework: 960 vs Blueprint vs ???](https://stackoverfl... | [
0.35563167929649353,
0.17557890713214874,
-0.033173736184835434,
0.042631033807992935,
-0.280875027179718,
0.08919815719127655,
0.270624041557312,
-0.205277681350708,
-0.08917181938886642,
-0.6746129989624023,
0.17539188265800476,
0.3204033076763153,
-0.07122749835252762,
-0.11583204567432... | |
for any advice about which grid system I should use. Ease of use, flexibility and code readability are important to me.
I've used YUI Grids on several sites and found it, in combination with the Fonts and Reset components, to provide very high quality cross browser compatible sites. It's design satisfies different goal... | [
0.608667254447937,
-0.059850338846445084,
0.16007865965366364,
0.08779039233922958,
-0.5359693765640259,
-0.05202007666230202,
0.05819898098707199,
0.05360725149512291,
0.07747896015644073,
-1.0882633924484253,
-0.039311815053224564,
0.48822832107543945,
0.1537046730518341,
-0.203164979815... | |
system you find most comfortable. | [
0.22978156805038452,
0.11967182159423828,
0.44431495666503906,
0.45751091837882996,
0.5116970539093018,
-0.16997039318084717,
0.1611999273300171,
0.21806377172470093,
-0.2805800437927246,
-0.723088800907135,
-0.26850682497024536,
0.3390956521034241,
-0.02752329222857952,
0.1129646822810173... | |
My server (an XServe xeon 8-core [harpertown arch]) has been spamming kernel warnings lately and I cannot seem to get any concrete information on what may be going wrong.
Has anybody encountered such errors before?
```
Apr 6 13:44:19 xserve kernel[0]: /!\ WARNING: 27006 recoverable class Fbd error(s) ( ferr = 0x300... | [
-0.31912946701049805,
0.428966224193573,
0.5927178263664246,
0.0662323459982872,
-0.3126516342163086,
0.16819176077842712,
0.7648293972015381,
0.17065316438674927,
-0.15074007213115692,
-0.8069837689399719,
0.056270234286785126,
0.502728283405304,
-0.42651480436325073,
0.11215135455131531,... | |
/!\ WARNING: 27009 recoverable class Fbd error(s) ( ferr = 0x30000800 nerr == 0x00000000 )
Apr 6 13:45:17 xserve kernel[0]: /!\ WARNING: 27010 recoverable class Fbd error(s) ( ferr = 0x30000800 nerr == 0x00000800 )
Apr 6 13:45:24 xserve kernel[0]: /!\ WARNING: 27011 recoverable class Fbd error(s) ( ferr = 0x30000200 ... | [
-0.26166173815727234,
0.35865435004234314,
0.32270076870918274,
-0.09966607391834259,
0.054053694009780884,
0.48930320143699646,
0.845996618270874,
-0.38618209958076477,
-0.2721581757068634,
-0.8265591859817505,
-0.4568484425544739,
0.6522191166877747,
-0.1780661642551422,
-0.0484980456531... | |
to me as well.
As an alternative, however, you could do this:
1. Make your `Channel` configurable as lazy loaded or non-lazy-loaded. You could use a [Strategy Pattern](http://en.wikipedia.org/wiki/Strategy_pattern) to achieve this.
2. Once `Channel` is configurable thusly, `ChannelProxy`, since it is only a subclass... | [
0.5863011479377747,
-0.23390235006809235,
0.26355382800102234,
-0.0544428713619709,
-0.07328498363494873,
-0.3902355134487152,
0.10707085579633713,
-0.047851234674453735,
-0.0385294184088707,
-0.34963053464889526,
-0.29952165484428406,
0.6474546790122986,
-0.39278748631477356,
0.1092620268... | |
I'm trying to write to the windows registry at HKEY\_CURRENT\_USER\Software\appname however I keep getting a permissions error when I attempt to write to the key, I have added the following to my assembly:
```
[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, Write = @"HKEY_CURRENT_USER\\Software")... | [
0.028295444324612617,
0.45671546459198,
0.4277227818965912,
0.22407950460910797,
0.4494416415691376,
-0.2506287395954132,
0.10428532212972641,
-0.11406995356082916,
-0.2654450833797455,
-0.5659800171852112,
-0.23516210913658142,
0.3241775333881378,
-0.05716955289244652,
0.35336557030677795... | |
are part of an Active Directory installation.
* Machine - policy for the current machine.
* User - policy for the logged on user.
* AppDomain - policy for the executing application domain.
The first 3 are configured in the configuration screen in the .NET Configuration tool, and the last is configured at runtime.
The... | [
0.04054337367415428,
0.01913480833172798,
0.9016485214233398,
0.026439791545271873,
0.3119492530822754,
-0.17496445775032043,
0.22781677544116974,
-0.2727130949497223,
-0.17988379299640656,
-0.7550776600837708,
-0.2845674455165863,
0.512139618396759,
-0.3933120369911194,
0.2048870176076889... | |
How can I create an anonymous hash from an existing hash?
For arrays, I use:
```
@x = (1, 2, 3);
my $y = [@x];
```
but I can't find how to do the same for a hash:
```
my %x = ();
my $y = ???;
```
Thanks
```
my $new_hash = { %existing_hash };
```
Note that this solution does not make a deep copy.
Read brian's a... | [
-0.03856298699975014,
0.36509233713150024,
0.1410069614648819,
-0.2429378777742386,
-0.055913571268320084,
-0.17102491855621338,
0.4287125766277313,
-0.09596262872219086,
-0.17776831984519958,
-0.4949292838573456,
-0.050551217049360275,
0.419825941324234,
-0.39100974798202515,
0.2920951843... | |
I have been wondering this and can't really find a straight answer. In .NET when you fill a DataTable with rows from the database using the SQL Server data adapter does it truly load into memory right then and there or does it still read data from the database as you are accessing it in some regard?
Value Types are cre... | [
0.2791586220264435,
-0.004607412498444319,
0.300578236579895,
0.2741357982158661,
0.0988522544503212,
-0.27662786841392517,
-0.07616474479436874,
0.10292918235063553,
-0.34972500801086426,
-0.3475472033023834,
0.07565952837467194,
0.38770225644111633,
-0.23208297789096832,
0.19974043965339... | |
zeroed out). Hence they must be written to before being read. Otherwise it's a security hole.
The struct's default ctor (which takes no parameters and which you're not allowed to explicitly specify) zeroes out all fields of a struct and hence you can use a struct after you do.
```
new BimonthlyPairStruct()
```
How... | [
0.020493658259510994,
0.26619386672973633,
0.5908637046813965,
-0.08293187618255615,
-0.015715500339865685,
-0.2315877228975296,
0.15203499794006348,
-0.00475214933976531,
0.04551741108298302,
-0.06360866129398346,
-0.4149886965751648,
0.559744119644165,
-0.43441590666770935,
0.03151424229... | |
I would like to do
```
svn commit -m "<message>"
```
But message should have two lines:
```
Commit by: firstuser
Bug track: 9283
```
How to add new line character into message? I've tried SHIFT+ENTER, CTRL+T but it does not work. I use MS cmd command line.
How about using the `-F` parameter to get the log messag... | [
0.04102534055709839,
-0.11968687921762466,
0.28057101368904114,
-0.32972922921180725,
-0.09986388683319092,
0.3745744228363037,
0.42726293206214905,
-0.3278844654560089,
-0.28983038663864136,
-0.6855297088623047,
-0.023850947618484497,
0.4844382107257843,
-0.6696036458015442,
0.00352400192... | |
Scenario: A user enters a string in the DateTime field. A \* appears when a postback occurs but no message in a ValidationSummary. I have tried implementing IDataErrorInfo but the code never falls through IDataErrorInfo.this[string columnName] for the EventDate field. I have tried implementing DataAnnotations attribute... | [
-0.15823319554328918,
-0.18977117538452148,
0.3412465751171112,
-0.09271804243326187,
0.061455197632312775,
0.1453622579574585,
0.5564737915992737,
-0.10237817466259003,
-0.13479511439800262,
-0.6474762558937073,
-0.0808572843670845,
0.4517710208892822,
-0.30423206090927124,
0.164683222770... | |
for="EventDate">EventDate:</label>
<%=Html.TextBox("Dinner", Model.EventDate)%>
<%= Html.ValidationMessage("EventDate", "*") %>
```
Controller:
```
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(Dinner item)
public ActionResult Edit(int ID, FormCollection coll)
{
//What would you recommend?
}
```
How ab... | [
0.09168030321598053,
-0.2726229131221771,
0.29608237743377686,
-0.14681139588356018,
0.0347096249461174,
0.09104888886213303,
0.18086139857769012,
-0.6758522391319275,
-0.2736464738845825,
-0.36027637124061584,
-0.24375493824481964,
0.6797199249267578,
-0.2992158830165863,
-0.1251741945743... | |
I try to kill all processes of a specified user.
i use
```
Try
Shell("C:\WINDOWS\system32\taskkill.exe /S localhost /U userx /P passwort /f /FI " & Chr(34) & "USERNAME eq userx" & Chr(34))
Catch ex As Exception
MessageBox.Show("LogoutException occurred. " + ex.Message)
End Try
```
But... | [
0.016310743987560272,
0.16069477796554565,
0.4230556786060333,
-0.21269071102142334,
0.26941952109336853,
0.12241300940513611,
0.6018114686012268,
0.12435570359230042,
0.08365938812494278,
-0.7457748055458069,
-0.222585529088974,
0.7594126462936401,
-0.6497880220413208,
0.2686537802219391,... | |
/p because the application it self runs under a different user.
has anyone an idea how i could kill truely all proccesses from that 1 user?
EDIT:
i forget a little information,
The application is started by a user with user-rights. thats the reason i use taskkill - there i can enter a different user with administrat... | [
0.032813090831041336,
0.14749924838542938,
0.49123507738113403,
-0.17453649640083313,
0.09377346932888031,
0.17775537073612213,
0.11680062860250473,
-0.4024686813354492,
-0.17999890446662903,
-0.552099347114563,
0.004835177678614855,
0.6706508994102478,
-0.4921621084213257,
0.0835219174623... | |
only first
```
or
```
Process.GetProcesses()
.Where(p => String.Equals(p.ProcessName, name))
.ToList()
.ForEach(p => p.Kill()); // kills all
``` | [
-0.10083369165658951,
0.12528254091739655,
0.3884114623069763,
-0.20434057712554932,
0.35899433493614197,
0.2373417168855667,
0.08035393059253693,
-0.3060528635978699,
-0.12903687357902527,
-0.623100996017456,
-0.3199004828929901,
0.5527119040489197,
-0.3168487250804901,
0.2278405874967575... | |
What functionality does the `stackalloc` keyword provide? When and Why would I want to use it?
From [MSDN](http://msdn.microsoft.com/en-us/library/cx9s2sy4.aspx):
> Used in an unsafe code context to allocate a block of memory on the
> stack.
One of the main features of C# is that you do not normally need to access m... | [
-0.11230068653821945,
0.1298939734697342,
0.2950868606567383,
-0.06174558773636818,
-0.0603555329144001,
-0.2621590793132782,
0.004052708391100168,
-0.16204223036766052,
-0.3852044939994812,
-0.34211868047714233,
-0.07423707097768784,
0.4672834873199463,
-0.25086134672164917,
-0.1261638104... | |
need to use it for writing managed code. It is feasible that in some cases you could write faster code if you access memory directly - it basically allows you to use pointer manipulation which suits some problems. Unless you have a specific problem and unsafe code is the only solution then you will *probably* never nee... | [
0.0020862421952188015,
0.06652005761861801,
-0.06679500639438629,
0.49546343088150024,
0.08857949823141098,
-0.15635521709918976,
0.08521228283643723,
0.17076954245567322,
-0.1979471892118454,
-0.7324897050857544,
0.11891262978315353,
0.6074979901313782,
0.035911452025175095,
-0.0195495113... | |
I want to know (for debugging and logging) the size of an object in bytes, but not like
```
Sizeof (Object)
```
but like a 'deep sizeof'. For example if the object contains a hash map or a list, the real size needed by that hash map or list should be added to the result. Is there any way to do this without having to... | [
0.10560568422079086,
-0.0011693028500303626,
0.305992066860199,
0.14634113013744354,
-0.03994646295905113,
-0.14340460300445557,
0.2853703200817108,
0.013792626559734344,
-0.29776516556739807,
-0.46840357780456543,
-0.12936344742774963,
0.47755640745162964,
-0.1386648565530777,
0.169869080... | |
Sorry about that!
Unfortunately, you need to write the code for this yourself.
Not sure of this works, but you can become very dirty:
* Find the object size in bytes. Using TObject.InstanceSize.
* Cast each group of 4 bytes to a pointer and then check if it is a TObject. You should be able to do that. If it is a TObj... | [
0.24870918691158295,
0.11724899709224701,
0.09686689078807831,
0.0661458671092987,
-0.12486950308084488,
-0.09908841550350189,
0.5918564796447754,
-0.028861550614237785,
-0.4078850746154785,
-0.681168794631958,
0.08464688807725906,
0.5553242564201355,
-0.25484806299209595,
0.00621570879593... | |
Hey there, I'm trying to perform a backwards regular expression search on a string to divide it into groups of 3 digits. As far as i can see from the AS3 [documentation](http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.html), searching backwards is not possible in the reg ex engin... | [
0.19581155478954315,
0.15022291243076324,
0.27313145995140076,
-0.19294825196266174,
-0.2558616101741791,
0.13305577635765076,
0.4115823209285736,
-0.2326190322637558,
-0.3341101109981537,
-0.37592190504074097,
0.00437953369691968,
0.3902551233768463,
-0.47817355394363403,
-0.0856709778308... | |
task using a loop.
UPDATE:
Due to AS3 not supporting lookahead this is how I have solved it.
```
public static function formatNumber(number:Number):String
{
var numString:String = number.toString()
var result:String = ''
while (numString.length > 3)
{
var chunk:String = numString.substr(-3)
... | [
-0.2265005111694336,
-0.22492341697216034,
0.2565843462944031,
-0.27263978123664856,
-0.03844213858246803,
0.026655251160264015,
0.4825429320335388,
-0.2670573592185974,
-0.34293800592422485,
-0.4672313332557678,
-0.12942637503147125,
0.5664347410202026,
-0.3512251377105713,
0.166938573122... | |
result = numString + result
}
return result
}
```
If your language supports postive lookahead assertions, then I think the following regex will work:
```
(\d)(?=(\d{3})+$)
```
Demonstrated in Java:
```
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class CommifyTest {
@T... | [
0.2362644374370575,
-0.09097184240818024,
0.07763273268938065,
-0.17230375111103058,
-0.03494710475206375,
0.016204791143536568,
0.4768441319465637,
-0.41249167919158936,
0.3193248510360718,
-0.42786118388175964,
-0.2827433943748474,
0.5510041117668152,
-0.18278279900550842,
0.051261782646... | |
String num4 = "123456789";
String regex = "(\\d)(?=(\\d{3})+$)";
assertEquals("1", num0.replaceAll(regex, "$1,"));
assertEquals("123,456", num1.replaceAll(regex, "$1,"));
assertEquals("1,234,567", num2.replaceAll(regex, "$1,"));
assertEquals("12,345,678", num3.replaceAll(regex,... | [
-0.17386633157730103,
0.09934481233358383,
0.2598121166229248,
-0.015419704839587212,
-0.20471689105033875,
0.11310645937919617,
0.3928638696670532,
-0.5005155801773071,
-0.027377193793654442,
0.028117679059505463,
-0.4295024275779724,
0.9740984439849854,
-0.1435202956199646,
0.23031325638... | |
Is there some command like "show columns from TABLENAME"? I only know that .dump command, but that's really dumb in this case. It puts out all the data, too.
I need something to just see the table structure.
You'll need to use a [PRAGMA](http://www.sqlite.org/pragma.html#schema).
`PRAGMA table_info(TABLENAME);` | [
0.20102255046367645,
0.2362888753414154,
0.4117218255996704,
0.03973948583006859,
-0.17203101515769958,
-0.1278001368045807,
-0.030776996165513992,
0.026801133528351784,
-0.3369153141975403,
-0.3184690773487091,
0.07787317037582397,
0.4228481650352478,
-0.4962126314640045,
0.04304865747690... | |
This does not work
```
int blueInt = Color.Blue.ToArgb();
Color fred = Color.FromArgb(blueInt);
Assert.AreEqual(Color.Blue,fred);
```
Any suggestions?
[Edit]
I'm using NUnit and the output is
failed:
Expected: Color [Blue]
But was: Color [A=255, R=0, G=0, B=255]
[Edit]
This works!
``... | [
-0.30516454577445984,
0.005775798112154007,
0.244182288646698,
-0.025560684502124786,
-0.15309029817581177,
0.111393503844738,
0.627140998840332,
-0.7652859091758728,
0.0719069242477417,
-0.6290246844291687,
-0.11870205402374268,
0.6894341707229614,
-0.3930334448814392,
0.04893874004483223... | |
It also does a comparison of some
> state flags. If you want to compare
> just the ARGB values of two Color
> structures, compare them using the
> ToArgb method.
I'm guessing the state flags are different. | [
0.16280190646648407,
0.02396799996495247,
-0.0188039168715477,
0.16444124281406403,
-0.18878744542598724,
-0.0803280919790268,
0.015053438022732735,
-0.029577812179923058,
-0.02405751869082451,
-0.841803252696991,
0.16529962420463562,
0.3014337122440338,
-0.341622918844223,
0.2180202454328... | |
While working with ASP.NET MVC, I have noticed that exception messages issued by the .NET framework installed on my System are in German. I'd really prefer English messages, so I can post them on SO.
I know this has been asked before on SO, but strangely enough none of the suggested workarounds seem to work in my cas... | [
0.14910651743412018,
0.15299977362155914,
0.014521524310112,
-0.30370596051216125,
-0.11041607707738876,
-0.2063635140657425,
0.8368121981620789,
0.5743871331214905,
-0.14815731346607208,
-0.7398011684417725,
-0.5007798075675964,
0.3130509853363037,
-0.22728969156742096,
0.1049295365810394... | |
thrown as follows:
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture ("en-US");
Thread.CurrentThread.CurrentUICulture=new CultureInfo("en-US");
//call my faulty method...
So, how can I make the .NET framework issue English language exception messages? And is there any approach that does this on... | [
0.3838444948196411,
0.24715350568294525,
0.10825661569833755,
-0.007636182941496372,
-0.2376045286655426,
-0.041247740387916565,
0.7015181183815002,
-0.0405130498111248,
-0.028926722705364227,
-0.43991929292678833,
0.0409732386469841,
0.2091948539018631,
-0.2945202589035034,
0.282916426658... | |
project, which is why the exception messages were still in German when looking at the test results.
Setting the UI language in the test method right before the exception is thrown did the trick for me. | [
0.21417754888534546,
-0.10037264972925186,
-0.17015773057937622,
0.22128964960575104,
-0.3447001874446869,
-0.25282374024391174,
0.8444296717643738,
-0.06358886510133743,
0.03679412603378296,
-0.3350367844104767,
-0.19792331755161285,
0.3509199023246765,
-0.0019491398707032204,
-0.31038188... | |
I'm trying to use [optparse](http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html) to parse command line arguments. I would like my program to accept arguments like that:
```
$ ./myscript.rb [options] filename
```
I can easily manage the `[options]` part:
```
require 'optparse'
options = {... | [
-0.13487306237220764,
-0.009379622526466846,
0.5189728736877441,
-0.32550665736198425,
0.3678003251552582,
0.21346192061901093,
0.3189070522785187,
-0.35259172320365906,
0.10120323300361633,
-0.42491069436073303,
-0.42147085070610046,
0.7792205810546875,
-0.49339890480041504,
-0.3996776640... | |
ARGV. So in your example, it will return a one element array with the filename in it. | [
-0.07823953032493591,
-0.13957113027572632,
0.09133251756429672,
-0.2697145938873291,
-0.24579279124736786,
-0.11261900514364243,
-0.1200607642531395,
-0.1171160340309143,
-0.3088912069797516,
-0.403982013463974,
0.06672313064336777,
0.32786041498184204,
-0.6114972829818726,
0.143241137266... | |
I'm new to Flex but need to generate some visualizations of some time-based data. Any recommendations for tools that would work well in Flex?
If you're willing to pay for it (I think it's in the USD $250 range), Flex Builder Pro is definitely the way to go. The graphing and charting power in the libraries is impressive... | [
0.7743035554885864,
-0.1841484010219574,
0.03366326168179512,
0.33337751030921936,
-0.04229196161031723,
-0.06744617968797684,
-0.10597728192806244,
0.23801080882549286,
-0.31233349442481995,
-1.0964632034301758,
0.4656619429588318,
0.8608593344688416,
0.18051090836524963,
-0.1181871145963... | |
While testing some functions to convert strings between wchar\_t and utf8 I met the following weird result with Visual C++ express 2008
```
std::wcout << L"élève" << std::endl;
```
prints out "ÚlÞve:" which is obviously not what is expected.
This is obviously a bug. How can that be ? How am I suppose to deal with ... | [
-0.430399090051651,
0.005803176201879978,
0.485659122467041,
-0.09062689542770386,
-0.28955936431884766,
-0.03343142569065094,
0.5270764827728271,
-0.09233391284942627,
0.0161720123142004,
-0.6776105165481567,
-0.052715860307216644,
0.6522330641746521,
-0.39419540762901306,
-0.002515124622... | |
does not support Unicode. | [
-0.2068982571363449,
0.207811638712883,
-0.06565297394990921,
-0.07661420106887817,
-0.13916683197021484,
0.22679299116134644,
0.3596678078174591,
0.8268901109695435,
0.2523941397666931,
-0.03404206782579422,
-0.30949878692626953,
-0.04156758636236191,
-0.30477234721183777,
-0.047883775085... | |
I'm working an project (pure hobby, "Sharping my skills") which has one unified back-end and multiple front-ends (ASP.NET MVC 1.0/JQuery and Silverlight 2). When I try to add reference to my business layer assembly in the Silverlight 2 project (VS2008); It gets rejected, because it's not a Silverlight assembly.
Is the... | [
0.7481289505958557,
0.41234737634658813,
0.4285091161727905,
-0.10981833934783936,
-0.23657062649726868,
-0.21014812588691711,
0.15184928476810455,
-0.21147632598876953,
-0.19964882731437683,
-0.3746701180934906,
0.12543100118637085,
0.5168033242225647,
-0.24819552898406982,
0.037365708500... | |
These two factors, among others, prevent assemblies compiled for the desktop CLR from running by default on the Silverlight CLR.
All assemblies must be compiled specifically for silverlight. | [
0.14069406688213348,
0.3235728442668915,
0.3198208212852478,
-0.027854876592755318,
0.10745195299386978,
-0.5081416964530945,
0.13555769622325897,
-0.1211194396018982,
-0.1556367725133896,
-0.25972652435302734,
-0.46693456172943115,
0.5460385680198669,
-0.4929913878440857,
-0.0001845088700... | |
I have a **Question** class that has public List property that can contain several **Answers**.
I have a question repository which is responsible for reading the questions and its answers from an xml file.
So I have a collection of Questions (List) with each Question object having a collection of Answers and I'd like... | [
0.5017033219337463,
0.2900945842266083,
0.3314952552318573,
0.3675715923309326,
-0.06565491110086441,
-0.16499826312065125,
-0.07067175954580307,
-0.2380426973104477,
-0.1962694525718689,
-0.5941436290740967,
0.00047678122064098716,
0.2845989465713501,
0.16444730758666992,
0.22465190291404... | |
answer.
```
questions.SelectMany(q => q.Answers).Where(a => a.Name == "SomeName")
```
To find the question of an answer.
```
questions.Where(q => q.Answers.Any(a => a.Name == "SomeName"))
```
In fact you will get collections of answers or questions and you will have to use `First()`, `FirstOrDefault()`, `Single()... | [
-0.11735398322343826,
-0.08986145257949829,
0.006970410235226154,
0.0920378565788269,
-0.142463818192482,
-0.034212250262498856,
0.127607524394989,
-0.3823710083961487,
-0.4804115891456604,
-0.7404861450195312,
-0.5581148266792297,
0.4300621449947357,
-0.1939249336719513,
-0.15438476204872... | |
I am using the WebBrowser control to browse local files and folders, but the control seems to be designed primarily to browse the Web (as its name implies).
I need to be able to do common tasks, like using the "Up one level" button, or put the control in "File Search" mode, get the active item, etc.
Is there a way t... | [
0.20854684710502625,
-0.09414704889059067,
0.5538819432258606,
0.3333633244037628,
0.013278697617352009,
-0.39552339911460876,
0.3394342362880707,
0.1365688294172287,
-0.11188827455043793,
-0.8172404170036316,
0.01547169592231512,
0.6144067645072937,
-0.26350483298301697,
0.128000304102897... | |
"SomeName"))
```
In fact you will get collections of answers or questions and you will have to use `First()`, `FirstOrDefault()`, `Single()`, or `SingleOrDefault()` depending on your needs to get one specific answer or question. | [
0.1129409521818161,
-0.19488617777824402,
0.02027345448732376,
0.06598716229200363,
-0.14470435678958893,
-0.07975932210683823,
0.08488644659519196,
-0.38079914450645447,
-0.25175029039382935,
-0.7302101850509644,
-0.5608319640159607,
0.4661945104598999,
-0.05601624399423599,
-0.0667798444... | |
The authentication system for an application we're using right now uses a two-way hash that's basically little more than a glorified caesar cypher. Without going into too much detail about what's going on with it, I'd like to replace it with a more secure encryption algorithm (and it needs to be done server-side). Unfo... | [
0.17341791093349457,
0.33704304695129395,
0.11937341094017029,
0.039194248616695404,
0.031831223517656326,
-0.12520043551921844,
0.053160931915044785,
0.24692679941654205,
-0.07730592042207718,
-0.6111087203025818,
0.1580677628517151,
0.20446151494979858,
-0.3364580571651459,
-0.1381905972... | |
of a 'salt' or 'cypher', *not* real encryption.) A hash is one-way *by definition*. So rather than something like MD5 or SHA1 you need to look for something more like PGP.
Secondly, can you explain the reasoning behind the 2-way requirement? That's not generally considered good practice for authentication systems any ... | [
-0.06178256869316101,
-0.0602114237844944,
0.06889317184686661,
0.08338386565446854,
-0.1430780440568924,
-0.44164514541625977,
0.2990688979625702,
0.19346646964550018,
-0.08938838541507721,
-0.5174030065536499,
-0.10839979350566864,
0.2942582964897156,
-0.21641667187213898,
-0.11039068549... | |
Our build script creates a HTML log with some embedded javascript. When I open that in Internet Explorer, I get the yellow warning bar that IE has blocked running "scripts or activex controls".
Since it is a local file, I cannot add it to trusted sites (IE expects a domain here).
I do not want to change security set... | [
0.5010361671447754,
0.36535122990608215,
0.46275821328163147,
-0.29480665922164917,
0.14711733162403107,
-0.2224183976650238,
0.4960572421550751,
-0.012991932220757008,
0.2022833526134491,
-1.113543152809143,
-0.18082085251808167,
0.38579684495925903,
-0.030735455453395844,
-0.042355101555... | |
I need to change the scope of a control from friend to public in my user control - what happened to the Modifiers property of a control? I don't see it in the property sheet. How am I supposed to change the scope of my controls now (besides going into the designer file and changing it in the auto-generated code)?
Best ... | [
0.16562522947788239,
0.000019456563677522354,
0.3431282639503479,
0.1156708374619484,
0.12838135659694672,
-0.2653999626636505,
0.222444087266922,
-0.0704977735877037,
-0.17612650990486145,
-0.4066234230995178,
-0.03234386071562767,
0.5807039737701416,
-0.2297496348619461,
0.26362201571464... | |
I've read a great [example](http://www.mnot.net/webdesc/) of a WADL file. I've also checked out the [WADL2Java](https://wadl.dev.java.net/wadl2java.html) tool.
But I can't seem to find a full spec of the WADL format. I have many unanswered questions, mostly dealing with how various parts of the file relate to one anot... | [
0.4691641628742218,
0.04542245343327522,
0.20932342112064362,
0.08728737384080887,
-0.1310969591140747,
-0.2312522977590561,
0.37323758006095886,
-0.11255473643541336,
-0.3335087299346924,
-0.593270480632782,
-0.014673949219286442,
0.3025401532649994,
-0.2801028788089752,
0.249150872230529... | |
Well im working agains a webservice that has a certificate that is not 100% correctly setup the certificate is setup for the domain \*.domain1.com and the api is located at soap.shop.domain1.com/SOAP now i cant connect to this webservice as i then get a WebException "Could Not establish trush relationship for the SSL/T... | [
0.26412326097488403,
0.055076178163290024,
0.73037189245224,
-0.054626017808914185,
-0.13476167619228363,
-0.1536024659872055,
0.6526454091072083,
-0.3147020637989044,
-0.2972904443740845,
-0.7437965869903564,
-0.019509924575686455,
0.4782504737377167,
-0.2959839105606079,
0.26237711310386... | |
YourNamespace
public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
{
public TrustAllCertificatePolicy() {}
public bool CheckValidationResult(ServicePoint sp, X509Certificate cert,WebRequest req, int problem)
{
return true;
}
}
}
``` | [
-0.1656571626663208,
0.04570036008954048,
0.446897029876709,
0.16609685122966766,
0.1306290626525879,
-0.15650402009487152,
0.6914475560188293,
-0.0538177527487278,
0.1329740583896637,
-0.9971458315849304,
-0.04589487984776497,
0.4378756284713745,
-0.23374129831790924,
0.19273428618907928,... | |
I am going to start a game in about 3 weeks and I would really like the game to run at least on another platform (linux, MacOS) but my team thinks that's a lot of work. I am up for it but wanted to know what are the things I should watch out for that won't port to linux (apart from Windows specific APIs like DirectXsou... | [
0.28582945466041565,
-0.2571406960487366,
0.1870766580104828,
0.1364646703004837,
0.3242779076099396,
-0.15723581612110138,
0.28239119052886963,
0.4241092801094055,
0.08850187063217163,
-0.9357648491859436,
0.18384356796741486,
0.4509947896003723,
0.10208281874656677,
-0.190041184425354,
... | |
gcc library.
(At least, grepping the include files for 'sprintf\_s' turns up nothing at all.)
It might be worth looking at cross platform libraries like [boost](http://www.boost.org/) and [apr](http://apr.apache.org/) to do some of the heavy lifting work.
A sample of specific things to look for:
* Input/Output (Dire... | [
-0.03711733594536781,
-0.03540177643299103,
0.23528988659381866,
-0.0061843302100896835,
-0.3358977437019348,
-0.39763909578323364,
-0.10772837698459625,
-0.09818178415298462,
-0.2990594804286957,
-0.50787752866745,
-0.373565673828125,
0.5169145464897156,
-0.6552090644836426,
0.03278632089... | |
Given a piece of Xml Like the one below. How would I write an XPATH Query to get the value of the 'leaf2' child where the 'key' value has a particular values (say 2)
I'm working in C# .NET. At the moment I'm just looking at getting the Xpath for key using SelectNodes , finding the right value then navigating back up t... | [
0.04562106356024742,
0.07242631167173386,
0.01074519008398056,
-0.06466414034366608,
0.1807360202074051,
-0.053377483040094376,
-0.17418272793293,
0.07977057248353958,
-0.055853378027677536,
-0.8331311345100403,
0.27507486939430237,
0.15388084948062897,
0.08623805642127991,
0.1524813473224... | |
<leaf1>X</leaf1>
<leaf2>Y</leaf2>
<leaf3></leaf3>
</child>
<child>
<anotherChild>
<key>2</key>
</anotherChild>
<leaf1>A</leaf1>
<leaf2>B</leaf2>
<leaf3></leaf3>
</child>
</root>
```
You want:
```
/root/child[anotherChild/key = '2']/leaf2
... | [
-0.5733546018600464,
0.08715623617172241,
-0.3981192409992218,
-0.09085708856582642,
0.11419942229986191,
0.08141988515853882,
0.1844370812177658,
-0.3788032531738281,
-0.23328028619289398,
-0.4247047007083893,
-0.34511929750442505,
-0.4999604821205139,
-0.3472324013710022,
-0.357726961374... | |
`child` is being filtered by its child named `anotherChild` with a child named `key` whose value is `2`." | [
-0.20822350680828094,
-0.2546190619468689,
0.33159399032592773,
0.19129015505313873,
0.5279402732849121,
0.23808489739894867,
-0.18544386327266693,
0.03347751498222351,
0.17123094201087952,
-0.4895155429840088,
-0.16935954988002777,
-0.07972791790962219,
-0.11895616352558136,
0.43579301238... | |
1) Can you recommend me a PHP accelerator for PHP V5.2.6?
2) Do you know about any recent test comparation/review of those modules(Alternative PHP Cache, eAccelerator, XCache, Zend Optimizer, Zend Platform, ionCube PHP Accelerator, Turck MMCache, Nusphere PhpExpress)?
[**APC**](http://www.php.net/manual/en/book.apc.... | [
0.24556218087673187,
-0.10369572043418884,
0.32144856452941895,
0.307328462600708,
-0.06574375182390213,
-0.20722545683383942,
-0.27725088596343994,
-0.23824115097522736,
0.07204639911651611,
-0.6380860805511475,
0.15121158957481384,
0.5688800811767578,
-0.17316949367523193,
-0.08426813036... | |
eAccelerator was forked from it.
ionCube — dead. | [
0.3345983028411865,
0.062267012894153595,
0.19344405829906464,
0.26006942987442017,
-0.36702975630760193,
-0.0691283717751503,
-0.5919371843338013,
0.05542019382119179,
0.14129029214382172,
-0.0900382548570633,
0.1401926726102829,
0.3123463988304138,
-0.538246750831604,
0.451803058385849,
... | |
I have deployed a clickonce application, in my application i have 10 external dlls. Since the code inside my dll files keeps changing and it's tough to redistribute i went with clickonce deployment strategy. But i wanted to know a thing, if i make a change to one of the dll files and upgrade it's assembly version from ... | [
0.2551102936267853,
-0.03895929455757141,
0.6232580542564392,
-0.29966360330581665,
-0.003593041794374585,
-0.19808217883110046,
0.24049754440784454,
0.018949519842863083,
-0.3326994478702545,
-0.959942638874054,
0.07043199241161346,
0.7383899092674255,
-0.5435676574707031,
0.0466083697974... | |
wrong?
I'm using VS2008 and C#.NET 2.0
ClickOnce only cares about publish version for the whole project. Increment this in your "My Project" Publish tab and publish again. | [
0.6606699824333191,
0.3772011995315552,
0.18268264830112457,
0.07620537281036377,
-0.02851150557398796,
-0.4382231533527374,
0.49906864762306213,
0.42965418100357056,
-0.07615278661251068,
-0.4925575256347656,
0.06928244978189468,
0.3637882173061371,
-0.3030235767364502,
0.3464606702327728... | |
I am using a "web site" in visual studio 2008, and i would like to add a post-build event which would append the build time to the web.config file. Is it possible?
I'm afraid this isn't supported for web sites, you'll need to use a web application project. | [
0.5129975080490112,
0.1558699607849121,
0.26634374260902405,
-0.10565032809972763,
0.030057698488235474,
-0.27189576625823975,
0.065963514149189,
0.160840705037117,
-0.1555015742778778,
-0.6028392910957336,
0.34729865193367004,
0.5628264546394348,
0.03997572138905525,
-0.15478730201721191,... | |
I have a panel control with a picture box in it. How can I maintain the aspect ratio of the panel control when Resizing the form it's on?
You'll need to store off the aspect ratio somehow, whether it's something known to you at design time or if you just want to calculate it in the constructor of the form after `Initia... | [
0.4824606776237488,
0.14508432149887085,
0.7236778736114502,
0.14259567856788635,
0.17782093584537506,
0.1505817025899887,
-0.21805305778980255,
-0.3357211947441101,
-0.08065381646156311,
-0.8117613196372986,
0.14459162950515747,
0.6490429043769836,
0.05339067801833153,
0.07508949935436249... | |
How can i retrieve the current CPU usage in c# using WMI? I've seen plenty of posts using performance counters, but I need a solution that can work with remote machines. I've also found a VB solution [here](http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/hey0421.mspx), but I'd prefer to accomplish t... | [
-0.04175886884331703,
0.06494010239839554,
0.36129382252693176,
0.1266239583492279,
0.1766531616449356,
-0.03271383047103882,
0.15088169276714325,
0.0824536681175232,
-0.3180359899997711,
-0.9090399742126465,
-0.029965870082378387,
0.6004725098609924,
-0.15066809952259064,
0.08398662507534... | |
I mean the small exit/cancel button marked with an X in the top right hand corner. I want to implement a Logon dialog box that accepts a username/password so obviously I don't want the user to be able to dismiss the modal pop up. If it is not possible to remove or disable the button then is there some way I can interce... | [
0.2902354896068573,
0.37711670994758606,
0.553382158279419,
0.4010450541973114,
0.31379902362823486,
-0.0436914823949337,
-0.22012561559677124,
0.06197275593876839,
0.08051276952028275,
-0.5589612722396851,
-0.16542720794677734,
0.40642470121383667,
-0.09429596364498138,
0.0285817049443721... | |
I have to create variable number of Labels and next to them TextBox controls - arranging the whole thing into a column, each line a Label and a TextBox. If the my Main window is smaller than the total height of all the TextBox controls, somehow I need a scrollbar which can scroll the list of TextBoxes. Pressing the ent... | [
0.4518095850944519,
0.22258615493774414,
0.4605252742767334,
0.10180280357599258,
-0.05928267911076546,
0.16189400851726532,
0.19833669066429138,
0.23886261880397797,
-0.2555880546569824,
-0.8054518103599548,
0.30733996629714966,
0.3385191857814789,
0.03443319350481033,
0.2547784149646759,... | |
container for controls (Labels and TextBoxes) and create them dynamicaly in code.
Example:
```
void Form1_Load( object sender, EventArgs e ) {
const int COUNT = 10;
TableLayoutPanel pnlContent = new TableLayoutPanel();
pnlContent.Dock = DockStyle.Fill;
pnlContent.AutoScroll = true;
pnlContent.Aut... | [
-0.39612439274787903,
-0.2547985017299652,
0.8211800456047058,
-0.04172931984066963,
0.3047402501106262,
0.2707974910736084,
-0.0590503104031086,
-0.4506218731403351,
-0.49262529611587524,
-0.5059083700180054,
-0.16987402737140656,
0.38786178827285767,
-0.2571875751018524,
0.10986834019422... | |
pnlContent.ColumnStyles.Add( new ColumnStyle() );
}
pnlContent.ColumnStyles[0].Width = 100;
pnlContent.ColumnStyles[1].Width = 5;
pnlContent.ColumnStyles[2].SizeType = SizeType.Percent;
pnlContent.ColumnStyles[2].Width = 100;
this.Controls.Add( pnlContent );
for ( int i = 0; i < COUNT; i++... | [
-0.1129494234919548,
-0.2591032385826111,
0.704626202583313,
-0.21199548244476318,
0.1880241334438324,
0.2786131203174591,
0.2836553156375885,
-0.7378232479095459,
-0.1265290379524231,
-0.4745461046695709,
-0.2103976458311081,
0.62446129322052,
-0.2750563621520996,
-0.15906020998954773,
... | |
lblTitle.TabIndex = (i * 2);
lblTitle.Margin = new Padding( 0 );
lblTitle.Dock = DockStyle.Fill;
pnlContent.Controls.Add( lblTitle, 0, i );
TextBox txtValue = new TextBox();
txtValue.TabIndex = (i * 2) + 1;
txtValue.Margin = new Padding( 0 );
txtValue.Dock = Dock... | [
-0.07753787934780121,
-0.5058505535125732,
1.0855239629745483,
-0.16842710971832275,
-0.036503490060567856,
0.45208245515823364,
-0.03497700393199921,
-0.49246203899383545,
-0.36917421221733093,
-0.6875807642936707,
-0.26722952723503113,
0.7460970282554626,
-0.3214057385921478,
-0.06527218... | |
+= new KeyEventHandler( txtValue_KeyDown );
pnlContent.Controls.Add( txtValue, 2, i );
}
}
void txtValue_KeyDown( object sender, KeyEventArgs e ) {
if ( e.KeyCode == Keys.Enter ) {
SendKeys.Send( "{TAB}" );
}
}
``` | [
-0.0047609549947083,
-0.20080290734767914,
0.7310234308242798,
-0.3732733130455017,
0.057654548436403275,
-0.08307673037052155,
0.3824852705001831,
-0.3567463159561157,
-0.07049579918384552,
-0.36231350898742676,
-0.6369941234588623,
0.8144242763519287,
-0.4341919422149658,
0.2149392664432... | |
Is there anyway to get glassfish to delete some of the old log files automatically? Yesterday we had a disk full issue due to glassfish logging. There is not apparent way to do this in the Admin Console, unless we are just ignorant.
You can get Glassfish to delete the log files, in the Log Rotate Manager:
<http://blogs... | [
0.29157754778862,
-0.036063868552446365,
0.004344672430306673,
0.3465966582298279,
0.03942965716123581,
-0.11214817315340042,
0.3712957799434662,
0.17369338870048523,
-0.5674550533294678,
-0.22737587988376617,
0.017168108373880386,
0.8525839447975159,
-0.06175428628921509,
0.11929360777139... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.