text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm trying to debug an MSBuild task, and I know there is some way to write to the MSBuild log from within a custom task but I forget how.
The base [Task](http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.task.aspx) class has a `Log` property you can use:
```
Log.LogMessage("My message");
``` | [
0.1540258228778839,
-0.1376333087682724,
0.16224190592765808,
-0.07954903692007065,
0.10032013803720474,
-0.08380256593227386,
0.44250574707984924,
0.33444744348526,
-0.25505295395851135,
-0.808971107006073,
-0.30034974217414856,
0.30379584431648254,
-0.4971182644367218,
0.1253309845924377... | |
If I do the following:
```
import subprocess
from cStringIO import StringIO
subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]
```
I get:
```
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/build/toolchain/mac32/pyth... | [
-0.1073869839310646,
0.21276874840259552,
0.4225245416164398,
-0.24730992317199707,
0.07672826200723648,
-0.10924286395311356,
0.21387462317943573,
-0.21976469457149506,
-0.04674604535102844,
-0.8756110072135925,
-0.30590882897377014,
0.4320557713508606,
-0.2423475831747055,
0.242552086710... | |
None in the result tuple,
> you need to give stdout=PIPE and/or
> stderr=PIPE too.
>
>
> **Replacing os.popen\***
```
pipe = os.popen(cmd, 'w', bufsize)
# ==>
pipe = Popen(cmd, shell=True, bufsize=bufsize, stdin=PIPE).stdin
```
> **Warning** Use communicate() rather than
> stdin.write(), stdout.read() ... | [
-0.15572874248027802,
0.01598021388053894,
0.3259822726249695,
-0.2878606617450714,
0.16211795806884766,
0.14726530015468597,
0.47046735882759094,
-0.29661211371421814,
-0.04586251452565193,
-0.8743880987167358,
-0.3205042779445648,
0.6448056101799011,
-0.4935871958732605,
-0.1044501885771... | |
`encoding`), you could use [`subprocess.run`](https://docs.python.org/3/library/subprocess.html#subprocess.run), to pass input as a string to an external command and get its exit status, and its output as a string back in one call:
```
#!/usr/bin/env python3
from subprocess import run, PIPE
p = run(['grep', 'f'], std... | [
0.1950463503599167,
0.0027456707321107388,
0.2655823826789856,
-0.10012336075305939,
0.005164030939340591,
0.5287006497383118,
0.07349703460931778,
-0.3052577078342438,
-0.23101603984832764,
-0.6332110166549683,
-0.33385977149009705,
0.4210672974586487,
-0.46680277585983276,
-0.09749561548... | |
I'm looking for some kind of text-parser for ASP.NET that can make HTML from some style of text that uses a special format. Like in Wiki's there is some special syntax for headings and such. I have tried to look on google, but I did not found anything for .NET.
Do someone know about a library for .NET that can parse t... | [
0.9165477156639099,
0.15171249210834503,
-0.08014793694019318,
0.39986854791641235,
-0.3304874300956726,
-0.2558770775794983,
0.34835532307624817,
0.014676122926175594,
-0.049542780965566635,
-0.6148209571838379,
0.4399160146713257,
0.39996108412742615,
0.17556460201740265,
-0.003157835220... | |
home page:
> Thus, “Markdown” is two things: (1) a
> plain text formatting syntax; and (2)
> a software tool, written in Perl, that
> converts the plain text formatting to
> HTML. | [
-0.029020627960562706,
0.14646947383880615,
0.7133231163024902,
-0.0718630775809288,
-0.057975705713033676,
-0.17961740493774414,
0.2303587794303894,
0.19362521171569824,
-0.11522094905376434,
-0.8669764995574951,
-0.5570197701454163,
0.30277031660079956,
-0.07531626522541046,
0.0950246602... | |
As a follow-up to another [question](https://stackoverflow.com/questions/162991/selecting-proper-toolkit-for-a-2d-simulation-project-in-java), I was wondering what would be the best way to use SVG in a Java project.
The Apache [Batik](http://xmlgraphics.apache.org/batik/) project is an open source SVG renderer written ... | [
0.3380548059940338,
-0.0011033019982278347,
0.2575233578681946,
0.05514770746231079,
-0.49193158745765686,
-0.23926115036010742,
0.2757151126861572,
-0.04045981541275978,
0.021624606102705002,
-0.6420001983642578,
-0.1649322658777237,
0.391977995634079,
-0.3121882975101471,
-0.077598072588... | |
I guess I need to know what I need in the classpath (what jar) in order to execute WebSphere 6.1 ant tasks. If someone can provide an example that would be perfect.
For Websphere 6.1, you can use the jar com.ibm.ws.runtime\_6.1.0.jar to access the ant tasks.
On Windows, the jar is located in the plugins directory (for... | [
0.17559069395065308,
0.1920461654663086,
0.10511549562215805,
-0.1853030025959015,
0.03086071088910103,
0.11273888498544693,
0.258657306432724,
0.32932049036026,
-0.1765362024307251,
-0.8382099866867065,
0.32356610894203186,
0.3078266382217407,
-0.30924665927886963,
0.25346484780311584,
... | |
I frequently need to debug .NET binaries on test machines (by test-machine, I mean that the machine doesn't have Visual Studio installed on it, it's frequently re-imaged, It's not the same machine that I do my development on, etc).
I love the Visual Studio debugger, but it's not practical for me to install visual stu... | [
0.6741803884506226,
0.31866654753685,
-0.3045625388622284,
0.2862512171268463,
-0.016510268673300743,
-0.29209697246551514,
0.4217345416545868,
-0.05546330660581589,
0.012297161854803562,
-0.6548756957054138,
-0.1536037176847458,
0.53764408826828,
-0.10277734696865082,
-0.04364150017499924... | |
code, and let me jump right into debugging. For native binaries, windbg works great, but I haven't found anything similiar for managed binaries. Any recommendations?
(as a side note, I am aware of visual studios remote debugging capabilities, but for some reason it never seems to work consistently for me... I often ha... | [
0.3275853097438812,
0.0897768884897232,
0.1852288693189621,
-0.1202142983675003,
-0.2372177392244339,
-0.2623822093009949,
0.6568522453308105,
0.3648822605609894,
-0.1304497867822647,
-0.7389272451400757,
-0.17209352552890778,
0.4326932430267334,
-0.12055673450231552,
-0.14314547181129456,... | |
I want to be able to specify the file name stem for the log file in a Specman test. I need to hard-code the main \*.elog filename so that I don't get variance between tests and confuse the post-processing scripts. Is there a constraint or command line I can pass into Specman?
You can control the \*.elog filename with s... | [
0.487124502658844,
-0.09689665585756302,
0.23319116234779358,
0.1533370167016983,
0.3348628282546997,
-0.11377475410699844,
-0.2971096634864807,
-0.1607963740825653,
-0.12367275357246399,
-0.43355241417884827,
0.07868529111146927,
0.9087863564491272,
-0.2157273143529892,
0.0239843707531690... | |
What would you recommend for class that needs to keep a list of unique integers?
I'm going to want to Add() integers to the collection and also check for existence e.g. Contains().
Would be nice to also get them in a list as a string for display, ie. "1, 5, 10, 21".
[HashSet](http://msdn.microsoft.com/en-us/library/b... | [
0.10081777721643448,
-0.004077505320310593,
0.018940865993499756,
0.2674185633659363,
0.05909139662981033,
-0.05172957852482796,
0.00515010068193078,
-0.33425435423851013,
-0.5276637673377991,
-0.515239417552948,
-0.1060103327035904,
0.3814959228038788,
-0.4133360981941223,
0.1372393965721... | |
elements are added to the object.
>
>
> The `HashSet<T>` class is based on the model of mathematical sets and provides high-performance set operations similar to accessing the keys of the [`Dictionary<TKey, TValue>`](https://msdn.microsoft.com/en-us/library/xfhwa508.aspx) or [`Hashtable`](https://msdn.microsoft.com/e... | [
-0.27910563349723816,
0.052012696862220764,
0.1677575707435608,
0.3230830132961273,
0.04833415895700455,
0.0028677547816187143,
0.03694033622741699,
-0.4160643219947815,
-0.3443293869495392,
-0.4627573788166046,
-0.3914925158023834,
0.13743753731250763,
-0.46587666869163513,
0.194686472415... | |
I have a Form being launched from another form on a different thread. Most of the time it works perfectly, but I get the below error from time to time. Can anyone help?
```
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at System.... | [
0.1171063706278801,
-0.04820260405540466,
0.6110486388206482,
0.06460557878017426,
-0.08136194944381714,
0.028378687798976898,
0.5405890345573425,
-0.6532430648803711,
-0.12306973338127136,
-0.8727800846099854,
-0.25546330213546753,
0.4666197597980499,
-0.3309256434440613,
0.16458971798419... | |
to see multiple open accounts simultaneously, right? So you need multiple instances of a form?
Unless I'm misreading something, I don't think you need threads for this scenario, and I think you are just introducing yourself to a world of hurt (like these exceptions) as a result.
Assuming your account form is called A... | [
0.48610720038414,
0.12496809661388397,
0.6300135850906372,
-0.07574154436588287,
-0.0880812481045723,
-0.15256285667419434,
0.4361885190010071,
0.09049876779317856,
-0.39322054386138916,
-0.6101465821266174,
0.07990705966949463,
0.7874893546104431,
-0.26921969652175903,
0.07604824006557465... | |
nicely so that each instance has its own data, and they don't share anything between instances.
Using threads for this is not only overkill, but likely to introduce bugs like the exception at the top. And my experience in debugging multi-threaded WinForms apps has shown that these bugs are often very difficult to repl... | [
0.383690744638443,
0.12809161841869354,
0.15752840042114258,
0.17873035371303558,
0.1626698225736618,
0.015901440754532814,
0.3998250663280487,
-0.08420857042074203,
-0.2885604202747345,
-0.4004700183868408,
-0.13777071237564087,
0.9724088907241821,
-0.3142481744289398,
-0.156831756234169,... | |
Is there any alternative for WPF (windows presentation foundation) in python?
<http://msdn.microsoft.com/en-us/library/aa970268.aspx#Programming_with_WPF>
Here is a list of [Python GUI Toolkits](http://wiki.python.org/moin/GuiProgramming).
Also, you can [use IronPython to work with WPF directly](http://stevegilham.b... | [
0.08355490863323212,
-0.05926387757062912,
-0.023423945531249046,
-0.04229406639933586,
-0.29852405190467834,
0.12517410516738892,
0.15605810284614563,
-0.1022455021739006,
-0.400826632976532,
-0.36442112922668457,
-0.032170481979846954,
0.8049217462539673,
-0.20765139162540436,
-0.2452497... | |
Suppose I have a "tags" table with two columns: **tagid** and **contentid**. Each row represents a tag assigned to a piece of content. I want a query that will give me the contentid of every piece of content which is tagged with tagids 334, 338, and 342.
The "easy" way to do this would be (*pseudocode*):
```
select c... | [
0.15749068558216095,
-0.13448502123355865,
0.385247141122818,
0.22309434413909912,
0.0670521929860115,
0.1182512566447258,
-0.26709824800491333,
-0.3220990300178528,
0.21117255091667175,
-0.8526483774185181,
-0.07571513950824738,
0.13589270412921906,
-0.4517260789871216,
0.1389501690864563... | |
my gut tells me that there's a better, faster, more extensible way to do this. For example, what if I needed to find the intersection of 12 tags? This could quickly get horrendous. Any ideas?
**EDIT**: Turns out that this is also covered in [this excellent blog post](http://weblogs.sqlteam.com/jeffs/jeffs/archive/2007... | [
0.09129485487937927,
0.026625733822584152,
0.24678726494312286,
0.12074080109596252,
-0.16044002771377563,
0.11333934217691422,
0.13644957542419434,
-0.5715607404708862,
-0.293611615896225,
-0.7390738129615784,
0.004563273396342993,
0.3014732897281647,
-0.4456242620944977,
0.07159826159477... | |
I'm putting together a little tool that some business people can run on their local filesystems, since we don't want to setup a host for it.
Basically, its just HTML + Javascript (using jQuery) to pull some reports using REST from a 3rd party.
The problem is, FF3 and IE don't allow the ajax call, I get:
```
Access t... | [
0.32882511615753174,
0.23471854627132416,
0.4131854772567749,
-0.07086322456598282,
0.057089224457740784,
-0.42588916420936584,
0.11695728451013565,
0.03892936930060387,
-0.09963493794202805,
-0.7097010016441345,
-0.24558666348457336,
0.44773438572883606,
-0.33521702885627747,
0.1730013489... | |
for this(Way to much red tape), and we CANNOT host this externally due to the data being retrieved.
**EDIT #2**: A little testing shows that I can use an IFRAME to make the request. Does anyone know if there any downsides to using a hidden IFRAME?
In a similar situation, my solution was to use Mark Of The Web, which i... | [
0.30938029289245605,
0.05840190127491951,
0.5006775259971619,
0.06043307110667229,
-0.0038545122370123863,
-0.34138935804367065,
0.3985133469104767,
0.1182720959186554,
-0.3465608060359955,
-0.8631333708763123,
-0.17659011483192444,
-0.09576863795518875,
0.0016424708301201463,
0.2131174653... | |
What are some good algorithms for automatically labeling text with the city / region or origin? That is, if a blog is about New York, how can I tell programatically. Are there packages / papers that claim to do this with any degree of certainty?
I have looked at some tfidf based approaches, proper noun intersections,... | [
0.377718061208725,
0.0046296026557683945,
0.49176904559135437,
0.37753406167030334,
-0.09762508422136307,
-0.24456526339054108,
0.05247054994106293,
0.5212565064430237,
-0.4020707607269287,
-0.4207148551940918,
-0.1921141892671585,
-0.03071827068924904,
0.003965421579778194,
0.015303103253... | |
or short NER. There are [several](http://nltk.sourceforge.net/index.php/Main_Page) [good](http://opennlp.sourceforge.net/index.html) [toolkits](http://alias-i.com/lingpipe) available to help you out. LingPipe in particular has a very [decent tutorial](http://alias-i.com/lingpipe/demos/tutorial/ne/read-me.html). [CAGEcl... | [
0.001249093795195222,
0.0022773954551666975,
-0.07696682214736938,
-0.06098472326993942,
-0.4264156222343445,
0.19751234352588654,
0.14047910273075104,
-0.005164876580238342,
0.11883660405874252,
-0.4088206887245178,
0.043584760278463364,
0.27525413036346436,
0.17933712899684906,
-0.262556... | |
When designing a collection class, is there any reason not to implement locking privately to make it thread safe? Or should I leave that responsibility up to the consumer of the collection?
> is there any reason not to implement locking privately to make it thread safe?
It depends. Is your goal to write a collection c... | [
0.4388654828071594,
-0.12595722079277039,
-0.3514942526817322,
0.46247848868370056,
0.0038838598411530256,
-0.10365907102823257,
0.1723742038011551,
-0.0965975821018219,
-0.4256090223789215,
-0.4397273063659668,
-0.003166716080158949,
0.8420265316963196,
-0.3418559432029724,
0.126938551664... | |
think you may have some years in the future, because you can't see the future, and you'll invariably be wrong.
Note: You still need to write your code in a maintainable way, such that if you *did* need to come along and add locking to the collection, it wouldn't be terribly hard. My point is "don't implement features ... | [
0.5983384251594543,
0.17439666390419006,
0.07538171112537384,
0.07061991840600967,
0.46101194620132446,
-0.20862294733524323,
0.5219438672065735,
0.23231075704097748,
-0.30131545662879944,
-0.36758148670196533,
-0.0638878121972084,
0.34469670057296753,
0.06899432092905045,
0.20890818536281... | |
I'm working on an RSS feed for a custom tasking system we use, and I'm still wrapping my head around how things should work. What I want to have is a feed for each user that shows tasks assigned to them, and additionally a feed for each task that shows updates for the task.
What I want to know right now concerns the u... | [
0.5804882049560547,
-0.023267626762390137,
0.32923564314842224,
-0.06523279845714569,
0.13766030967235565,
0.1574610471725464,
-0.13026244938373566,
-0.022826997563242912,
-0.39803987741470337,
-0.7252362370491028,
0.26519355177879333,
0.5359821915626526,
-0.11323141306638718,
0.0235891789... | |
as unread in readers so that the user would know to look at the item again, but this seems not to be the case. Should I be changing the guid, even though it's really the same items? What would the side-effects of that be?
Is there anything I'm missing? How can I solve this?
Changing the <pubDate> does indicate that th... | [
0.4754669666290283,
0.2534841001033783,
0.6473520994186401,
0.008225467056035995,
-0.14175285398960114,
-0.11833427101373672,
0.32696372270584106,
0.09799828380346298,
-0.5661964416503906,
-0.34552881121635437,
0.007801984436810017,
0.30574366450309753,
-0.06733302026987076,
0.398450762033... | |
example Bloglines.com can *optionally* detect changes in the <description> and mark entries as new again if that case.
Depending on your reader, changing the <title>, <description>, or <pubDate> might give you the behavior you want. But as GateKiller mentions above, your safest option is to make it an entirely new ent... | [
0.7584049105644226,
-0.2520076036453247,
0.3023500144481659,
0.23595169186592102,
-0.09784266352653503,
-0.47245293855667114,
0.40807878971099854,
0.276633083820343,
-0.438340961933136,
-0.6795528531074524,
-0.07496096938848495,
0.34742313623428345,
-0.3140917420387268,
0.15158401429653168... | |
set of assigned tasks, just updating the <pubDate> will work just fine. | [
0.29876768589019775,
0.219741091132164,
0.4895334839820862,
-0.19112469255924225,
-0.14873714745044708,
0.2180578112602234,
0.032150860875844955,
0.005102284252643585,
-0.3837014138698578,
-0.6486430168151855,
0.07534989714622498,
0.32437533140182495,
0.0366760715842247,
-0.239170372486114... | |
Which is a better format to store graphic assets for a Flex application, SWF or SWC?
Are there any real differences, and if so what are they?
Assets in a seperate SWF are loaded and included at runtime.
Assets in a SWC are loaded and included / compiled at compile time.
You can also directly embed assets within the ... | [
0.0974331870675087,
-0.30877256393432617,
0.5112000703811646,
0.16036921739578247,
-0.2503303289413452,
0.10974404960870743,
-0.017064642161130905,
-0.11849310994148254,
-0.3350186049938202,
-0.7769190669059753,
-0.5660763382911682,
0.6012868881225586,
-0.1625932902097702,
-0.1933135688304... | |
are used.
mike | [
0.22599820792675018,
0.6235041618347168,
-0.04979091137647629,
-0.21464721858501434,
0.29006800055503845,
0.29903629422187805,
0.11077384650707245,
0.15266287326812744,
-0.3132580518722534,
-0.5179707407951355,
-0.4762955904006958,
0.7540311217308044,
-0.21447603404521942,
-0.0199452619999... | |
I want to write a windows service which the user can schedule. i.e, the user can choose to run the service from 9:00 AM to 6 PM daily, or he could run it every night, starting from night 12 o clock at night to next day morning 6, etc. Is there any out of the box .NET API that will help me do this? I know I can do this ... | [
0.6937123537063599,
-0.06181425228714943,
0.321256160736084,
-0.04431885853409767,
0.05647503212094307,
-0.16225939989089966,
0.5033243894577026,
0.22266246378421783,
-0.01676725037395954,
-0.8146055936813354,
0.005684038158506155,
0.575509786605835,
-0.0714515820145607,
0.1921116709709167... | |
use the powerful scheduler that is provided by the operating system?
That said, a windows service is pretty much just a thread that your application runs in. You could ship it in two parts, the first is the service itself which executes on a timer. The startup of the service could check a registry value to determine h... | [
0.594262421131134,
-0.11566571146249771,
0.14989273250102997,
0.1819528341293335,
0.21065324544906616,
-0.11682082712650299,
0.0507035106420517,
0.15721285343170166,
-0.2989691495895386,
-0.466839998960495,
0.16787470877170563,
0.4717944860458374,
-0.30500859022140503,
0.22061264514923096,... | |
need. | [
-0.11111244559288025,
0.3568730056285858,
-0.12111796438694,
0.21866324543952942,
-0.20474907755851746,
0.0006210501305758953,
-0.3928278386592865,
-0.2663509249687195,
0.08287559449672699,
-0.9067088961601257,
0.04478773847222328,
0.5442390441894531,
-0.3654240071773529,
0.601727247238159... | |
I would like to set the MSMQ message label using the NetMsmqBinding. I understand [it’s easy when using the MsmqIntegrationBinding](http://blogs.msdn.com/skaufman/archive/2007/12/17/msmq-label-property-and-wcf.aspx), but I would like to continue to use the NetMsmqBinding (**even call private methods**, if possible)
I t... | [
0.22622591257095337,
0.06624487787485123,
0.4046124517917633,
0.04182988777756691,
-0.26621535420417786,
-0.43575519323349,
0.222577765583992,
-0.22228942811489105,
-0.3659123480319977,
-0.5429545640945435,
0.01781962811946869,
0.39239007234573364,
-0.28218403458595276,
0.47488492727279663... | |
can be easily swapped out for another binding without any code changes. Like you said, the MsmqIntegrationBinding is tightly coupled to System.Messaging concepts, so you get access to all the System.Messaging stuff at the expense of interchangability with other bindings. If setting the Label is important, the easiest r... | [
0.17259208858013153,
-0.23011097311973572,
0.6377919912338257,
0.5468862652778625,
-0.11878761649131775,
-0.551426351070404,
0.12635579705238342,
-0.24864616990089417,
-0.25963693857192993,
-0.5120010375976562,
0.04914093390107155,
0.36547210812568665,
-0.24970361590385437,
0.1716899126768... | |
I have code from PowerBuilder 5 that can't be built. The compiler just stops before it is done without any error codes.
I would like to upgrade the code to the recent version of PowerBuilder but there are some intermediate versions of PowerBuilder that have binary dependencies to an old Microsoft java dll that Microso... | [
0.48420828580856323,
0.026847446337342262,
0.07890529930591583,
-0.05831095203757286,
0.03211617469787598,
-0.12233100831508636,
0.30026665329933167,
-0.20729105174541473,
0.20557808876037598,
-0.7741245627403259,
0.2542704641819,
0.6154876351356506,
-0.3093411326408386,
0.0877225175499916... | |
questionable to me (at least it doesn't ring a bell), it's irrelevant unless it affects the target version of PowerBuilder.
For migrating, you might want to check out this [migration guide](http://www.techno-kitten.com/PowerBuilder_Help/PowerBuilder_Migration/powerbuilder_migration.html "PB Migration Guide"), as well... | [
0.601813793182373,
0.12898340821266174,
0.2968371510505676,
-0.1154671162366867,
-0.023430148139595985,
-0.020868852734565735,
-0.07185269892215729,
-0.07538845390081406,
-0.25576141476631165,
-0.31153589487075806,
-0.06643140316009521,
0.2475101202726364,
-0.2386099100112915,
0.0633141100... | |
I'm using CodeSynthesis XSD C++/Tree Mapping utility to convert an existing xsd into c++ code we can populate the values in. This was we always make sure we follow the schema.
After doing the conversion, I'm trying to get it to work so I can test it. Problem is, I'm not used to doing this in c++ and it's my first time... | [
0.31131795048713684,
0.07506389170885086,
0.3972198963165283,
-0.23717112839221954,
-0.06179526448249817,
-0.06471981108188629,
-0.16290846467018127,
-0.25226616859436035,
0.03324101120233536,
-0.901885986328125,
0.3026002049446106,
0.49018585681915283,
-0.4295230507850647,
-0.002564843744... | |
the ABSTRACTNETWORKMODEL class and the definitions for double\_ and time are:
```
typedef ::xsd::cxx::tree::time<char, simple_type> time;
typedef double double_;
```
where the definition for time is a class with multiple constructors:
```
template<typename C, typename B>
class time: public B, public time_zone
{
p... | [
0.3603518307209015,
-0.10549548268318176,
0.23770520091056824,
-0.1473877876996994,
0.2677513360977173,
0.11651500314474106,
-0.08867418020963669,
-0.19291602075099945,
-0.19257645308971405,
-0.7337743043899536,
0.2951204776763916,
0.39754974842071533,
-0.3859363794326782,
0.21001350879669... | |
that is incorrect? Or at least point me down the right path, as one of the things I'm trying to do right now is learn more c++.
I've been bitten by this before. If the line:
```
::xml_schema::time t();
```
is exactly as it appears in your code (that is, with the parens) then the problem is that you didn't actually i... | [
0.05359366908669472,
0.07346475124359131,
0.13855285942554474,
0.06011418625712395,
-0.1956927329301834,
-0.05642063543200493,
0.36716845631599426,
0.12952160835266113,
0.13337565958499908,
-0.4713270962238312,
0.03603848069906235,
0.6377580165863037,
-0.46373575925827026,
-0.0110933864489... | |
later. It is perfectly legal C++, and it's something that people do a lot (say, in header files) so the compiler accepts it, does not issue a warning because it has no way of knowing that's not what you meant, and does something you weren't expecting.
And when you pass that function to the `ABSTRACTNETWORKMODEL` const... | [
0.23453278839588165,
-0.15320639312267303,
0.4809727668762207,
-0.08635660260915756,
0.21886833012104034,
-0.39138609170913696,
-0.14185704290866852,
-0.15962298214435577,
-0.1378072202205658,
-0.6508775353431702,
-0.36717525124549866,
0.4870077669620514,
-0.45292818546295166,
-0.077854454... | |
the temporary to the constructor
```
So the reason "the instantiation of time didn't cause an error" is that a time object was never instantiated. The time class doesn't have a default constructor either, and attempting to instantiate t with the correct syntax would have thrown the error you were expecting.
For the ... | [
-0.05799929425120354,
-0.05932754650712013,
0.4973541498184204,
-0.010086780413985252,
0.03710862249135971,
0.057968731969594955,
0.20685024559497833,
0.11296821385622025,
-0.2607724368572235,
-0.5429105162620544,
-0.3351035714149475,
0.37957021594047546,
-0.19491758942604065,
0.1699051111... | |
error: there is a time class, but no object named "time"
```
Believe me, I really like C++, but the syntax can get really difficult to keep straight some times. | [
0.14118653535842896,
0.43146196007728577,
-0.19292892515659332,
0.11505334079265594,
0.09165109694004059,
-0.04927812144160271,
0.47726842761039734,
0.29927006363868713,
0.03344270959496498,
-0.45727023482322693,
-0.017871052026748657,
0.3926035463809967,
-0.2712630033493042,
0.14376759529... | |
For example, if I were to write a calendar app on top of AIR, say with Flex, could this app pop up reminder windows for approaching appointments, just like Microsoft Outlook can?
Clarification: Can those windows be actual dialogs where I can enter and save information?
See [Creating toast-style windows](http://www.ado... | [
0.4139837324619293,
0.1675306260585785,
0.39825814962387085,
-0.030459634959697723,
0.05238579586148262,
-0.17550596594810486,
0.07156672328710556,
0.18983761966228485,
-0.2794664204120636,
-0.7800029516220093,
-0.056677430868148804,
0.44421207904815674,
-0.2449510097503662,
-0.40182545781... | |
I learned something simple about SQL the other day:
```
SELECT c FROM myTbl GROUP BY C
```
Has the same result as:
```
SELECT DISTINCT C FROM myTbl
```
What I am curious of, is there anything different in the way an SQL engine processes the command, or are they truly the same thing?
I personally prefer the dist... | [
0.013969209045171738,
0.17921499907970428,
-0.039770614355802536,
0.017761165276169777,
-0.5207595825195312,
-0.04987308755517006,
-0.12381692975759506,
-0.23550884425640106,
-0.3070853352546692,
-0.1416112780570984,
0.07262381911277771,
0.5159298777580261,
-0.3033462166786194,
-0.04482157... | |
enough to realize that if you are using "Group By" and not using any aggregate functions, then what you actually mean is "Distinct" - and therefore it generates an execution plan as if you'd simply used "Distinct."
However, I think it's important to note [Hank](https://stackoverflow.com/questions/164319/is-there-any-d... | [
0.17203615605831146,
0.37556684017181396,
-0.2577378749847412,
0.07712113857269287,
-0.3606913387775421,
0.08376584947109222,
0.30543115735054016,
-0.2390718162059784,
-0.3592361807823181,
-0.10244463384151459,
-0.05959151312708855,
0.17980504035949707,
-0.05452100187540054,
0.107898466289... | |
be used with aggregates** and one of which is not.
A hammer can work to drive in a screw sometimes, but if you've got a screwdriver handy, why bother?
(for the purposes of this analogy, `Hammer : Screwdriver :: GroupBy : Distinct` and `screw => get list of unique values in a table column`) | [
0.14140214025974274,
0.3111943006515503,
-0.24140565097332,
0.041279327124357224,
-0.19370274245738983,
0.23728929460048676,
0.13135303556919098,
-0.306962788105011,
-0.401522159576416,
-0.29119160771369934,
0.2630061209201813,
0.5541995167732239,
-0.21363531053066254,
-0.05930613726377487... | |
I know there is done some research on TDD at the North Carolina State University. They have published a paper called '[An Initial Investigation of Test Driven Development in Industry](http://collaboration.csc.ncsu.edu/laurie/Papers/TDDpaperv8.pdf)'. Other publications by NCSU can be found [here](http://collaboration.cs... | [
0.499828040599823,
0.08487351983785629,
-0.378034770488739,
0.28259003162384033,
-0.18074524402618408,
-0.22999577224254608,
0.19952121376991272,
-0.516240656375885,
0.1057184711098671,
-0.13933323323726654,
-0.04280439764261246,
0.17006759345531464,
0.059741850942373276,
0.183452993631362... | |
>
> This paper describes a controlled
> experiment for evaluating an important
> aspect of TDD: In TDD, programmers
> write functional tests before the
> corresponding implementation code. The
> experiment was conducted with
> undergraduate students. While the
> experiment group applied a test-first
> strategy... | [
0.19524164497852325,
0.03066750057041645,
-0.30223777890205383,
0.09130921214818954,
-0.325107604265213,
0.20387905836105347,
0.11751098930835724,
-0.5939894318580627,
0.36742743849754333,
-0.5564274787902832,
-0.184073805809021,
0.4045279622077942,
0.07036850601434708,
-0.2063566744327545... | |
and, in turn, students who wrote more
> tests tended to be more productive. We
> also observed that the minimum quality
> increased linearly with the number of
> programmer tests, independent of the
> development strategy employed. | [
-0.009002757258713245,
0.2372487187385559,
-0.2047051042318344,
0.3899998366832733,
-0.29352205991744995,
0.2651174068450928,
0.7271943092346191,
-0.14251254498958588,
0.16271206736564636,
-0.7070726752281189,
0.010522251017391682,
0.7716873288154602,
0.0013306958135217428,
-0.376712501049... | |
[This article](http://blogs.msdn.com/larryosterman/archive/2004/09/10/228068.aspx) gives a good overview on why structured exception handling is bad. Is there a way to get the robustness of stopping your server from crashing, while getting past the problems mentioned in the article?
I have a server software that runs ... | [
0.253791868686676,
0.22423794865608215,
-0.22562184929847717,
0.12400638312101364,
-0.22142261266708374,
-0.3572356104850769,
0.4247322082519531,
0.13344527781009674,
-0.5429644584655762,
-0.14189666509628296,
0.18486137688159943,
0.4715326428413391,
-0.28178489208221436,
0.190480545163154... | |
With SEH: only 1 user of the 400 get a problem for most crashes
* Without SEH: If any user gets a crash, all 400 are affected.
* But sometimes with SEH: Server hangs, all 400 are affected and future users that try to connect.
Break your program up into worker processes and a single server process. The server process wi... | [
0.28867658972740173,
0.16718165576457977,
0.11590667068958282,
0.24277803301811218,
0.05521392822265625,
-0.1653762310743332,
0.24939189851284027,
-0.28146979212760925,
-0.3544217646121979,
-0.6285962462425232,
-0.5690450072288513,
-0.0025757495313882828,
-0.4038419723510742,
0.05031538754... | |
leave you wide open to deadlocks, and you can still crash anyway. | [
0.3864480257034302,
0.2536408305168152,
0.23075103759765625,
0.4328722059726715,
0.47452136874198914,
-0.39215168356895447,
-0.06680885702371597,
0.21327164769172668,
-0.38297465443611145,
0.06510379910469055,
0.07437422126531601,
0.2776229679584503,
-0.003679930465295911,
-0.0803991109132... | |
I'm wondering if its possible to add new class data members at run-time in PHP?
Yes.
```
$prop = 'newname';
$obj->$prop = 42;
```
will do the same thing as:
```
$obj->newname = 42;
```
Either one will add "newname" as a property in $obj if it does not yet exist. | [
0.1023636981844902,
0.09172660857439041,
0.24699321389198303,
-0.02405402436852455,
0.03451862558722496,
-0.014897883869707584,
0.28693467378616333,
-0.02782338112592697,
-0.12374719232320786,
-0.667430579662323,
0.03228310868144035,
0.4895177185535431,
-0.20199541747570038,
0.284217625856... | |
I'm running SqlServer 2005 express edition on my laptop for development purposes. It seems that when I open a connection to the database, the setup time is REALLY slow. It can take up to 10 seconds to get a connection. I usually have multiple connections open at the same time (Profiler, Development environment, Query A... | [
-0.5381937623023987,
-0.002632973250001669,
0.2889798879623413,
-0.010206271894276142,
-0.33727675676345825,
-0.15903766453266144,
0.8073880672454834,
0.12206515669822693,
-0.2985377013683319,
-0.7698681354522705,
0.49640002846717834,
0.47887122631073,
-0.4910763204097748,
0.12181293964385... | |
and SQL is running mixed mode security. I will try the login with sql authentication. I am not using user instances.
Update2:
I setup a trace to try and figure out what is going on. When the connection to the database is opened the follow command is executed:
```
master.dbo.sp_MShasdbaccess
```
This command takes 6... | [
0.38386550545692444,
0.1965176910161972,
0.5294027924537659,
-0.09620216488838196,
-0.10925626009702682,
-0.5824029445648193,
0.7360268831253052,
-0.276561439037323,
-0.20177410542964935,
-0.3896453380584717,
0.048955585807561874,
0.5595542788505554,
-0.5173170566558838,
0.1366973668336868... | |
There are times when I want to use *mootools* for certain things and Prototype & *`script.aculo.us`* for others but within the same site. I've even considered adding others, but was concerned about conflicts. Anyone have experience, or am I just trying to make things too complicated for myself?
If you really, really wa... | [
0.35409265756607056,
0.06144947558641434,
-0.011045927181839943,
0.13293549418449402,
0.019447896629571915,
-0.27606192231178284,
0.06498321145772934,
0.08764054626226425,
-0.17419734597206116,
-0.6170103549957275,
-0.12060340493917465,
0.5236978530883789,
0.06622927635908127,
-0.280188053... | |
are constrained within the jQuery namespace. As a general rule, "global" objects are stored inside the jQuery namespace as well, so you shouldn't get a clash between jQuery and any other library (like Prototype, MooTools, or YUI).
>
>
> That said, there is one caveat: By default, jQuery uses "$" as a shortcut for "jQ... | [
0.1898547112941742,
-0.12145498394966125,
0.42737531661987305,
0.12353125214576721,
0.19137273728847504,
-0.2512075901031494,
0.30490842461586,
0.07343641668558121,
-0.4168068468570709,
-0.6775078773498535,
-0.25788751244544983,
0.5748178362846375,
-0.08292599767446518,
0.0686209499835968,... | |
whole other story! So I would recommend keeping it as simple as you can, and having as few different frameworks (preferrably 1!) as you can in your codebase. | [
0.42868897318840027,
-0.4344019293785095,
-0.1693129688501358,
0.3693639934062958,
0.11086883395910263,
-0.22602204978466034,
0.19522160291671753,
0.24097469449043274,
-0.15763074159622192,
-0.31211531162261963,
-0.009764469228684902,
0.6574577689170837,
-0.10846797376871109,
-0.1833230406... | |
I am building a fun little app to determine if I should bike to work.
I would like to test to see if it is either Raining or Thunderstorm(ing).
```
public enum WeatherType : byte
{ Sunny = 0, Cloudy = 1, Thunderstorm = 2, Raining = 4, Snowing = 8, MostlyCloudy = 16 }
```
I was thinking I could do something like:
... | [
0.5100221037864685,
0.13162128627300262,
0.42378124594688416,
-0.061721496284008026,
-0.0350499153137207,
0.009124216623604298,
0.47883960604667664,
-0.0354001522064209,
-0.29218044877052307,
-0.6631869077682495,
0.14228802919387817,
0.606497049331665,
-0.40412211418151855,
-0.120453119277... | |
separate may be useful in other situations (IE, Invoice not paid reason's etc...).
I would also rather not do: (this would remove the ability to be configured for multiple people)
```
if(WeatherType.Thunderstorm)
{
return false; //don't bike
}
etc...
```
Your current code will say whether it's *exactly* "raining an... | [
0.4857059419155121,
-0.17574521899223328,
0.1580062359571457,
0.2315477877855301,
0.12209880352020264,
-0.1387743502855301,
0.4171912968158722,
-0.39631858468055725,
-0.2309660017490387,
-0.16181205213069916,
-0.15814730525016785,
0.431265264749527,
-0.4778403639793396,
-0.3133090734481811... | |
the sake of this bitwise logic, but affects how `ToString()` behaves. The C# compiler ignores this attribute (at least at the moment; the C# 3.0 spec doesn't mention it) but it's generally a good idea for enums which are effectively flags, and it documents the intended use of the type. At the same time, the convention ... | [
0.3887069821357727,
-0.015397632494568825,
0.12123708426952362,
-0.05793913081288338,
-0.16585659980773926,
-0.43989652395248413,
0.30659693479537964,
-0.05020863935351372,
-0.026338521391153336,
-0.3723183572292328,
-0.13711704313755035,
0.3847430944442749,
-0.18421748280525208,
-0.025683... | |
of 0, which means it's the absence of everything else; you couldn't have it sunny and raining at the same time (which is physically possible, of course). Please don't write code to prohibit rainbows! ;) On the other hand, if in your real use case you genuinely want a value which means "the absence of all other values" ... | [
0.5530003905296326,
-0.11142665892839432,
0.20732153952121735,
-0.1945304423570633,
-0.16030935943126678,
-0.4657430052757263,
0.9075120091438293,
0.14762108027935028,
-0.26143980026245117,
-0.3547390401363373,
-0.13601133227348328,
0.44541674852371216,
-0.43442264199256897,
0.111949570477... | |
I've made a Django site, but I've drank the Koolaid and I want to make an *IPhone* version. After putting much thought into I've come up with two options:
1. Make a whole other site, like i.xxxx.com. Tie it into the same database using Django's sites framework.
2. Find some time of middleware that reads the user-agent... | [
0.507480800151825,
0.2457488775253296,
0.09687619656324387,
-0.22251713275909424,
-0.11759711802005768,
-0.2349165827035904,
0.13223794102668762,
0.18778149783611298,
-0.27547547221183777,
-0.6996726393699646,
0.10758786648511887,
0.45885854959487915,
-0.23523519933223724,
-0.1978836357593... | |
as possible, I'd like it to be automagic and transparent to the user.
Has anyone else come across the same issue? Would anyone care to share about how they've tackled making IPhone versions of Django sites?
**Update**
I went with a combination of middleware and tweaking the template call.
For the middleware, I used... | [
0.4815569221973419,
0.10866573452949524,
0.546603798866272,
-0.26885107159614563,
-0.06324600428342819,
-0.17914117872714996,
0.30855125188827515,
-0.1780288964509964,
-0.35819345712661743,
-0.6975818872451782,
0.23393595218658447,
0.4874393343925476,
-0.3638181686401367,
-0.19307719171047... | |
return template_name
```
I use this for any view that I know I have both versions.
**TODO:**
* Figure out how to access *request.mobile* in an extended version of render\_to\_response so I don't have to use check\_mobile('template\_name.html')
* Using the previous automagically fallback to the regular template if n... | [
0.19445063173770905,
-0.14079435169696808,
0.5663776397705078,
-0.32012656331062317,
-0.1889229565858841,
-0.0052635851316154,
0.3551601767539978,
-0.31877246499061584,
-0.05928554758429527,
-0.9338296055793762,
-0.009259906597435474,
0.6481713056564331,
-0.3490781784057617,
-0.08520928025... | |
html version if they are using an iphone. | [
-0.2584517300128937,
-0.33052870631217957,
0.5856066346168518,
-0.3373691141605377,
-0.19135813415050507,
-0.2797662615776062,
0.49155911803245544,
0.4417644739151001,
-0.3458165228366852,
-0.7746936082839966,
-0.5879220962524414,
0.06681708246469498,
-0.38549044728279114,
-0.3532872498035... | |
When I debug a C# program and I get an exception throwed (either thrown by code OR thrown by the framework), the IDE stops and get me to the corresponding line in my code.
Everything is fine for now.
I then press "F5" to continue. From this moment, it seams like I'm in an infinite loop. The IDE always get me back to ... | [
0.3138519823551178,
0.05716174840927124,
0.3644183874130249,
-0.07885218411684036,
-0.14270207285881042,
-0.11103662103414536,
0.4340519309043884,
0.17499695718288422,
-0.2781921625137329,
-0.29185932874679565,
-0.18876202404499054,
0.5053483247756958,
-0.3211928904056549,
0.29387271404266... | |
is un-handled and Visual Studio can not move past that line without it being handled in some manner. Simply put, it is by design.
One thing that you can do is drag and drop the execution point (yellow line/arrow) to a previous point in your code and modify the in memory values (using the Visual Studio watch windows) s... | [
0.22479194402694702,
-0.14484025537967682,
-0.21575124561786652,
-0.03875149041414261,
-0.24269767105579376,
-0.125582754611969,
0.3696269392967224,
-0.18365666270256042,
-0.46502256393432617,
-0.578470766544342,
-0.07084520906209946,
0.1943398267030716,
-0.515953779220581,
-0.216083273291... | |
This can have unintended consequences since you are essentially re-executing some code (not rewinding the execution). | [
0.4134071171283722,
-0.0013770381920039654,
-0.06050252914428711,
0.1394806057214737,
0.015121842734515667,
-0.07642380893230438,
0.5887061953544617,
-0.14055988192558289,
-0.40867164731025696,
-0.3044703006744385,
-0.30025729537010193,
0.3002963960170746,
-0.002696719253435731,
0.19116207... | |
I've been reading about thread-safe singleton patterns here:
<http://en.wikipedia.org/wiki/Singleton_pattern#C.2B.2B_.28using_pthreads.29>
And it says at the bottom that the only safe way is to use pthread\_once - which isn't available on Windows.
Is that the **only** way of guaranteeing thread safe initialisation?
... | [
0.023440705612301826,
-0.05207797512412071,
-0.025588029995560646,
-0.05820927768945694,
0.07018078863620758,
-0.12397757172584534,
0.26203563809394836,
0.318408340215683,
-0.42415550351142883,
-0.7397038340568542,
0.05081762745976448,
0.2950055003166199,
-0.33972927927970886,
0.2092030346... | |
(and he described a singleton as an anti-pattern) - how can it be an "anti-pattern"?
**Accepted Answer:**
I've accepted [Josh's answer](https://stackoverflow.com/questions/164496/how-can-i-create-a-thread-safe-singleton-pattern-in-windows#164640) as I'm using Visual Studio 2008 - NB: For future readers, if you aren... | [
-0.017624933272600174,
0.06551305949687958,
-0.04924030601978302,
-0.04777754098176956,
-0.2635411322116852,
-0.06102699413895607,
0.49489402770996094,
-0.17403097450733185,
-0.07398305088281631,
-0.5608894228935242,
-0.12132129818201065,
0.4966587722301483,
-0.27518585324287415,
-0.083629... | |
use the double checked locking pattern, since "[volatile variables behave as fences](http://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Microsoft_Visual_C.2B.2B)". This is the most efficient way to implement a lazy-initialized singleton.
From [MSDN Magazine:](http://msdn.microsoft.com/en-us/magazine/cc163405... | [
0.3236059248447418,
-0.09802474826574326,
0.177316814661026,
0.0015628808178007603,
0.05690208077430725,
-0.21397724747657776,
0.33281898498535156,
-0.4120328426361084,
-0.4289746880531311,
-0.2179669737815857,
-0.5461527109146118,
0.3441627323627472,
-0.4649905860424042,
0.095427289605140... | |
pSingleton = new Singleton();
}
catch (...)
{
// Something went wrong.
}
}
LeaveCriticalSection(&cs); | [
0.2499190717935562,
-0.31154030561447144,
0.40700528025627136,
-0.17383107542991638,
0.14227695763111115,
0.0164109505712986,
0.3727532625198364,
-0.038931649178266525,
-0.21342572569847107,
-0.17587707936763763,
-0.32643380761146545,
-0.028516646474599838,
-0.41444098949432373,
-0.0289368... | |
}
return const_cast<Singleton*>(pSingleton);
}
```
Whenever you need access to the singleton, just call GetSingleton(). The first time it is called, the static pointer will be initialized. After it's initialized, the NULL check will prevent locking for just reading the pointer.
*DO NOT* use this on just any com... | [
-0.16076792776584625,
0.012246550992131233,
0.3304343819618225,
-0.15296927094459534,
-0.05139908567070961,
-0.20555582642555237,
0.18627385795116425,
-0.018314044922590256,
-0.23332062363624573,
-0.3125244081020355,
-0.2922315299510956,
0.7835383415222168,
-0.32611626386642456,
-0.0197516... | |
not important. | [
-0.0234058890491724,
0.03622538596391678,
-0.018164433538913727,
0.0835808515548706,
-0.08265871554613113,
-0.20524966716766357,
-0.13064628839492798,
0.2929178774356842,
-0.10299448668956757,
-0.036385904997587204,
0.0026392582803964615,
0.01627626270055771,
-0.22796161472797394,
-0.03679... | |
In .NET, if a class contains a member that is a class object, should that member be exposed as a property or with a method?
If all you are doing is exposing an object instance that is relevant to the state of the current object you should use a property.
A method should be used when you have some logic that is doing m... | [
0.17725719511508942,
-0.24802975356578827,
-0.5102725028991699,
0.32430413365364075,
-0.18206214904785156,
-0.3517744839191437,
0.2133307009935379,
-0.04627491161227226,
-0.24407359957695007,
-0.6453143954277039,
-0.14727269113063812,
0.24109652638435364,
-0.4644905626773834,
0.22070093452... | |
My server has both Subversion and Apache installed, and the Apache web directory is also a Subversion working copy. The reason for this is that the simple command `svn update /server/staging` will deploy the latest source to the staging server.
Apache public web directory: `/server/staging` *— (This is an SVN working ... | [
0.3253244459629059,
0.20310227572917938,
0.2788920998573303,
-0.20826637744903564,
0.0612952746450901,
-0.17314894497394562,
0.26347610354423523,
-0.1523989588022232,
-0.01780620589852333,
-0.5860813856124878,
-0.14920972287654877,
0.3692936301231384,
0.002296456601470709,
0.15536515414714... | |
'austin' should now be able to use the `svn update /server/staging` command? However, when he tries, he gets the error:
```
svn: Can't open file '/server/staging/.svn/lock': Permission denied
```
If I recursively change the owner of /server to austin:developers, he can run the command just fine, but then 'richard' c... | [
0.2609960436820984,
-0.0035319423768669367,
0.37993863224983215,
-0.13539832830429077,
0.36434921622276306,
0.046840112656354904,
0.06567700952291489,
-0.22450321912765503,
-0.09971354156732559,
-0.44276413321495056,
-0.1739814579486847,
0.4870493710041046,
-0.3083858788013458,
0.268296390... | |
acceptable solution, and I'm not aware of any way to run the command inside the hook as 'root'.
Any help is appreciated!
Directory Set Group ID
If the setgid bit on a directory entry is set, files in that directory will have the group ownership as the directory, instead of than the group of the user that created the ... | [
0.10447937250137329,
-0.24040959775447845,
0.1871233433485031,
0.16309592127799988,
-0.004217491019517183,
-0.17269200086593628,
0.08793438971042633,
-0.44668713212013245,
-0.028271635994315147,
-0.6336326003074646,
-0.08593732863664627,
0.3790436387062073,
-0.009859776124358177,
-0.043353... | |
example, the administrator can create a group called spcprj and add the users Kathy and Mark to the group spcprj. The directory spcprjdir can be created with the set GID bit set and Kathy and Mark although in different primary groups can work in the directory and have full access to all files in that directory, but sti... | [
-0.08529981970787048,
0.0537988655269146,
0.4993853271007538,
-0.07893188297748566,
-0.47479963302612305,
-0.20141927897930145,
0.1625797152519226,
-0.49434924125671387,
-0.3898513913154602,
-0.5848760008811951,
-0.2719491422176361,
0.4118608832359314,
-0.3103789687156677,
0.15322354435920... | |
execute bit in the group permissions causes all files written to the directory "spcprjdir" to belong to the group "spcprj" .
edit: source = [Linux Files and File Permissions](http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html) | [
0.06099604815244675,
-0.11434901505708694,
0.3655465543270111,
-0.23490843176841736,
-0.11273469030857086,
-0.19679996371269226,
0.42035120725631714,
-0.42841559648513794,
-0.23070155084133148,
-0.1549103558063507,
-0.4669420123100281,
0.43199196457862854,
-0.4013338088989258,
0.1437820345... | |
I am building an ontology-processing tool and need lots of examples of various owl ontologies, as people are building and using them in the real world. I'm not talking about foundational ontologies such as Cyc, I'm talking about smaller, domain-specific ones.
There's no definitive collection afaik, but these links all ... | [
0.5704733729362488,
-0.06301409006118774,
-0.01526355929672718,
-0.037263769656419754,
-0.2780006229877472,
-0.25796839594841003,
0.21744917333126068,
-0.22240765392780304,
-0.3624739646911621,
-0.5551531314849854,
-0.1509249061346054,
0.16518613696098328,
-0.27875813841819763,
0.158649474... | |
What happens when the Office 2003 PIA prerequisite and launch condition in a Windows installer are run against an Office 2007 system?
Yes, it will fail unless for the simple reason that Office 2003 is not installed. We create separate installers for Office 2007 and Office 2003.
Also, there is a difference in the struc... | [
0.2209751307964325,
0.11171451956033707,
0.22283999621868134,
0.19000940024852753,
0.21085987985134125,
-0.1549619734287262,
0.19206997752189636,
0.019355198368430138,
-0.025241665542125702,
-0.17069290578365326,
-0.24583815038204193,
0.7508916854858398,
-0.2924925982952118,
-0.05787579342... | |
I just want to know the best way to emulate a C# style enumeration in Ruby.
> Specifically, I would like to be able to perform logical tests against the set of values given some variable. Example would be the state of a window: "minimized, maximized, closed, open"
If you need the enumerations to map to values (eg, you... | [
0.30725982785224915,
0.04812759906053543,
0.06523607671260834,
0.29247018694877625,
0.005934501066803932,
0.11492981761693954,
0.33867138624191284,
-0.15851794183254242,
-0.12576670944690704,
-0.5838249325752258,
0.14703340828418732,
0.29725855588912964,
-0.1202189102768898,
-0.00804412644... | |
check if something is valid by doing this
```
WINDOW_STATES.keys.include?(window_state)
```
Alternatively, if you don't need any values, and just need to check 'membership' then an array is fine
```
WINDOW_STATES = [:minimized, :maximized].freeze
```
Use it like this
```
WINDOW_STATES.include?(window_state)
```... | [
0.3886541724205017,
0.011056490242481232,
0.07775846123695374,
-0.14050571620464325,
0.10792931914329529,
-0.3818790912628174,
0.5150115489959717,
-0.3187718093395233,
-0.26784586906433105,
-0.6144980788230896,
0.16543631255626678,
0.5724427103996277,
-0.4326702952384949,
-0.13650421798229... | |
complicated because of the .in?(1, 2, 3) case:
```
class Object
# Lets us write array.include?(x) the other way round
# Also accepts multiple args, so we can do 2.in?( 1,2,3 ) without bothering with arrays
def in?( *args )
# if we have 1 arg, and it is a collection, act as if it were passed as a s... | [
-0.0607990026473999,
-0.050291698426008224,
-0.04028116539120674,
-0.11642833799123764,
-0.16712941229343414,
-0.08341334760189056,
0.43150123953819275,
-0.5366949439048767,
-0.2002353072166443,
-0.4034791886806488,
-0.0898732990026474,
0.5084267258644104,
-0.6290138959884644,
-0.178471639... | |
for self.kind_of?Array is deliberate, otherwise
# arrays of strings break and ranges don't work right
args.length == 1 && args.first.respond_to?(:include?) && !self.kind_of?(Array) ?
args.first.include?( self ) :
args.include?( self )
end
end
end
```
This lets you t... | [
-0.11976389586925507,
0.023285923525691032,
0.16300615668296814,
-0.49233660101890564,
0.07304979860782623,
0.03147848695516586,
0.4246557652950287,
-0.45257508754730225,
-0.06546041369438171,
-0.7348983883857727,
-0.20577338337898254,
0.35380804538726807,
-0.6510362029075623,
0.0551029369... | |
I have a dialog that resizes. It also has a custom background which I paint in response to a WM\_ERASEBKGND call (currently a simple call to FillSolidRect).
When the dialog is resized, there is tremendous flickering going on. To try and reduce the flickering I enumerate all child windows and add them to the clipping ... | [
0.5363808274269104,
0.12981745600700378,
0.4944417178630829,
0.08314690738916397,
0.18587282299995422,
0.5233011841773987,
0.2260047346353531,
0.0041344137862324715,
-0.31654343008995056,
-0.9054424166679382,
0.11136310547590256,
0.4547828137874603,
-0.03378821536898613,
0.1915594488382339... | |
that with a dialog with child controls (without making all child controls owner-draw or something like that).
I should note that I'm using C++ (not .NET), and MFC, although pure Win32-based solutions are welcomed :)
NOTE: One thing I tried but which didn't work (not sure why) was:
```
CDC memDC;
memDC.CreateCompatib... | [
0.3235408365726471,
-0.12682385742664337,
0.6258525252342224,
0.015432128682732582,
0.2957295775413513,
0.08092302083969116,
0.08948618918657303,
-0.09918620437383652,
-0.10576177388429642,
-0.7274489998817444,
0.019626658409833908,
0.48123350739479065,
-0.3686198890209198,
0.1178897470235... | |
I have a an HTML form which contains the YAHOO rich text editor on it.
When I display the form I want the YAHOO editor to have focus so that the cursor is ready to accept input without the user having to click on it or tab into it
I got this from the documenation over at the [YUI library](http://developer.yahoo.com/yu... | [
0.09809882193803787,
0.07488105446100235,
0.7448989152908325,
-0.2831827700138092,
-0.3749276399612427,
0.0429859459400177,
-0.07521937787532806,
-0.00545037304982543,
0.21856403350830078,
-0.710928201675415,
-0.2921673655509949,
0.6247988343238831,
-0.16298037767410278,
-0.118583820760250... | |
The following snippet of C# code:
```
int i = 1;
string result = String.Format("{0},{1},{2}", i++, i++, i++);
Console.WriteLine(result);
```
writes out: 1,2,3
Before I tried this in the compiler I was expecting the assignments to take place and then the evaluations, so my expected output was: 1,1,1
So my que... | [
0.04734077677130699,
0.11704008281230927,
0.16151055693626404,
-0.2605507969856262,
-0.10833849012851715,
-0.008145248517394066,
0.2489568144083023,
-0.3948879539966583,
-0.009821111336350441,
-0.23505808413028717,
-0.07729559391736984,
0.4571440517902374,
-0.385530948638916,
0.08429474383... | |
if the parameter was say (i + j) then we know that it would be evaluated before it was assigned. When using the word evaluate in that context I'm referring to the incrementing of i.)
The **order of evaluation** of arguments is strictly left-to-right in C#. When you evaluate the expression `i++`, what happens is the val... | [
-0.23498569428920746,
0.055928461253643036,
0.2990366518497467,
-0.35447201132774353,
-0.2536311149597168,
0.0585881769657135,
0.19874289631843567,
-0.328082799911499,
0.25874122977256775,
-0.27627113461494446,
-0.03771134093403816,
0.7307626008987427,
-0.24827377498149872,
-0.133220806717... | |
++.
So in effect, what you wrote is
```
// assume this function is defined:
int Inc(ref int i)
{
var old = i;
i = i + 1;
return old;
}
...
int i = 1;
string result = String.Format("{0},{1},{2}", Inc(ref i), Inc(ref i), Inc(ref i));
Console.WriteLine(result);
...
```
Since arguments are evaluated left-to-righ... | [
0.03491182625293732,
0.07132913172245026,
0.8057206869125366,
-0.47814589738845825,
-0.11738592386245728,
0.15358857810497284,
0.492277055978775,
-0.6185089945793152,
0.22983860969543457,
-0.34808582067489624,
-0.05719086527824402,
0.6355767250061035,
-0.23847158253192902,
0.05998915061354... | |
Currently I am hosting a Django app I developed myself for my clients, but I am now starting to look at selling it to people for them to host themselves.
My question is this: How can I package up and sell a Django app, while protecting its code from pirating or theft? Distributing a bunch of .py files doesn't sound li... | [
0.8260243535041809,
0.3950446844100952,
0.04533165693283081,
0.02635100670158863,
-0.10093681514263153,
-0.44417664408683777,
-0.05521169677376747,
0.25492000579833984,
-0.4305410385131836,
-0.4006117582321167,
0.14615420997142792,
0.2911708354949951,
-0.18592767417430878,
0.29796355962753... | |
be running the same (LAMP) setup.
Don't try and obfuscate or encrypt the code - it will never work.
I would suggest selling the Django application "as a service" - either host it for them, or sell them the code *and support*. Write up a contract that forbids them from redistributing it.
That said, if you were determi... | [
0.8134520053863525,
0.2737387716770172,
0.29525455832481384,
-0.018418345600366592,
-0.19171802699565887,
-0.2733948528766632,
0.07896564155817032,
0.1230536699295044,
-0.36917755007743835,
-0.09910223633050919,
-0.16353954374790192,
0.3991869390010834,
-0.3940976560115814,
0.2105909734964... | |
stuff, and not have it foiled by a few `#`s..
As I said, I don't think you'll succeed in anti-piracy via encryption or obfuscation etc.. Depending on your clients, a simple contract, and maybe some really basic checks will go a long much further than some complicated decryption system (And make the experience of using... | [
0.4248736500740051,
0.09664696455001831,
0.07109235972166061,
0.44916293025016785,
0.4179728627204895,
-0.5575457811355591,
0.4765389859676361,
0.10892126709222794,
-0.4586314857006073,
-0.1936788260936737,
-0.10992120951414108,
0.6959883570671082,
-0.09658090770244598,
-0.1749697625637054... | |
What is the best way to find out if a primary key with a certain value already exists in a table?
I can think of:
```
SELECT key FROM table WHERE key = 'value';
```
and count the results, or:
```
SELECT SQL_CALC_FOUND_ROWS key FROM table WHERE key = 'value' LIMIT 1;
SELECT FOUND_ROWS();
```
I think either of your... | [
0.2409474402666092,
0.13947159051895142,
0.1665249764919281,
-0.031023696064949036,
0.2938719093799591,
0.008157123811542988,
0.130030557513237,
-0.27055156230926514,
-0.21281078457832336,
-0.43550363183021545,
0.07948042452335358,
0.7095369100570679,
-0.20072446763515472,
-0.0342565551400... | |
normal.
Other similar options depending on your usage include using the REPLACE or the INSERT ON DUPLICATE KEY UPDATE types of inserts. This allows you to update the existing entry if the primary key already exists, otherwise it just inserts your new entry. | [
0.1682763695716858,
-0.2219911366701126,
0.37710145115852356,
0.290901780128479,
0.3324988782405853,
-0.2200324982404709,
0.2437630295753479,
0.0031736036762595177,
-0.3354913294315338,
-0.3933545649051666,
-0.2901354134082794,
0.6575665473937988,
-0.2655774652957916,
0.2982521951198578,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.