text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
it's something along this line:
```
buffer_size = 720 * 288 * ctypes.sizeof(ctypes.c_float)
rgb_buffer = ctypes.create_string_buffer(buffer_size)
ctypes.memmove(rgb_buffer, getRgbBuffer(), buffer_size)
```
Key is the `ctypes.memmove()` function. From the [ctypes documentation](http://python.net/crew/theller/ctypes/... | [
0.21027828752994537,
-0.05564910173416138,
0.6207203269004822,
-0.12340454012155533,
-0.030671799555420876,
0.06823206692934036,
-0.019776446744799614,
-0.20165656507015228,
-0.33608901500701904,
-0.4980764389038086,
-0.1256076991558075,
0.5130392909049988,
-0.22502435743808746,
0.15639220... | |
In an answer to [Is it safe to store objects of a class which has an std::auto\_ptr as its member variable in std::vector?](https://stackoverflow.com/questions/700588/is-it-safe-to-store-objects-of-a-class-which-has-an-stdautoptr-as-its-member-v) I stated that a class that contained an auto\_ptr could be stored in a ve... | [
0.10166128724813461,
-0.2836492955684662,
0.04563640430569649,
-0.03242960944771767,
-0.02132573164999485,
0.0020174807868897915,
0.1202927902340889,
-0.37044572830200195,
-0.2573299705982208,
-0.04370772838592529,
-0.13504131138324738,
0.5831055641174316,
-0.6423310041427612,
-0.149608865... | |
A( const A & a )
: p( a.p.get() ? new Z( *a.p.get()) : 0 ) {}
// no assigment op or dtor defined by intent
auto_ptr <Z> p;
};
int main() {
vector <A> av;
Z z;
A a(z); | [
0.033093467354774475,
-0.23683762550354004,
0.5016372799873352,
-0.35239407420158386,
0.052618078887462616,
0.49477866291999817,
0.22339245676994324,
-0.30637821555137634,
-0.13357481360435486,
-0.02849624678492546,
-0.5431262850761414,
0.6400179862976074,
-0.49018147587776184,
-0.03461355... | |
av.push_back( a );
av.push_back( A(z) );
av.clear();
}
```
Please examine the above & in your reply indicate where undefined
behaviour in the meaning of the C++ Standard could occur for this particular class used in this particular way. I am not interested whe... | [
0.2268006056547165,
0.031426671892404556,
0.3397412598133087,
-0.4384027123451233,
-0.099615678191185,
-0.18129375576972961,
0.09434207528829575,
0.11231723427772522,
-0.2170303612947464,
-0.1715734899044037,
-0.4418146014213562,
0.7576325535774231,
-0.5114490985870361,
0.08137279748916626... | |
is useful, well-behaved, sortable, or how it performs under exceptions.
**Please also note that this is not a question about the validity of creating a vector of auto\_ptrs - I am well aware of the issues regarding that.**
> Thanks all for your inputs on what in
> retrospect is probably a rather silly
> question. I... | [
-0.13256794214248657,
0.21506810188293457,
0.5444746017456055,
0.4150540828704834,
0.012551149353384972,
-0.12535281479358673,
0.23598873615264893,
0.18129754066467285,
-0.22853049635887146,
-0.6310950517654419,
-0.3986852765083313,
0.3834940195083618,
0.19517958164215088,
-0.2105367928743... | |
together that makes the example undefined behavior.
```
#include <memory>
#include <vector>
using namespace std;
struct Z {};
struct A {
A( Z z )
: p( new Z(z) ) {}
A( const A & a )
: p( a.p.get() ? new Z( *a.p.get()) : 0 ) {}
// no assigment op or dtor defined by intent
auto_p... | [
0.024059252813458443,
0.05714380368590355,
0.3992016017436981,
-0.18116942048072815,
0.15652933716773987,
0.47320622205734253,
0.20300760865211487,
-0.5381425023078918,
-0.2709372341632843,
-0.49176082015037537,
-0.3141116499900818,
0.6737834215164185,
-0.5107627511024475,
-0.1180322170257... | |
lines up to the one where you instantiate the vector with your type `A`. The Standard has to say
In `23.1/3`:
> The type of objects stored in these components must meet the requirements of CopyConstructible types (20.1.3), and the additional requirements of Assignable types.
In `23.1/4` (emphasis mine):
> In Table ... | [
-0.3338240385055542,
-0.38823890686035156,
0.7675362825393677,
0.13055235147476196,
-0.01935538277029991,
0.14509980380535126,
-0.32726094126701355,
-0.04166695103049278,
-0.22498229146003723,
-0.5265989303588867,
-0.10457780957221985,
0.16914716362953186,
-0.5171123743057251,
0.1090773046... | |
|T& |t is equivalent to u |
> +-----------+---------------+---------------------+
>
> ```
>
> Table 64
In `12.8/10`:
> If the class definition does not explicitly declare a copy assignment operator, one is declared implicitly. The implicitly-declared copy assignment operator for a class X will have the ... | [
0.03228171169757843,
-0.05624804273247719,
0.1461287885904312,
-0.027609962970018387,
0.11834511905908585,
-0.007129724137485027,
0.061226751655340195,
-0.09068828076124191,
0.23788712918758392,
-0.38006162643432617,
-0.38277655839920044,
0.6316519975662231,
-0.6242496371269226,
0.03467110... | |
the nonstatic data members of X that are of a class type M (or array thereof), each such class type has a copy assignment operator whose parameter is of type const M&, const volatile M& or M.
>
>
> Otherwise, the implicitly declared copy assignment operator will have the form
>
>
>
> ```
> X& X::operator=(X&)
>
>... | [
0.3558520972728729,
-0.14097189903259277,
0.5905620455741882,
0.23115578293800354,
0.23059812188148499,
0.025341296568512917,
-0.40085849165916443,
-0.09734237194061279,
0.05632324516773224,
0.12933306396007538,
-0.24726305902004242,
0.7766332626342773,
-0.6272279024124146,
0.1518750190734... | |
not meet their requirements, the Standard places no requirements on the implementation.
>
>
> In particular, the effects are undefined in the following cases:
>
>
> * for types used as template arguments when instantiating a template component, if the operations on the type do not implement the semantics of the app... | [
0.4675218164920807,
0.08379176259040833,
0.1407763659954071,
-0.12205714732408524,
0.1275351494550705,
-0.23626965284347534,
0.42672058939933777,
-0.42557603120803833,
-0.0626891553401947,
-0.23631377518177032,
-0.4397064745426178,
0.5628191232681274,
-0.5494803190231323,
0.003218795172870... | |
operator of your class will *also* take a non-const type as its parameter. If you read the above places carefully, you will see how it says that instantiating a vector with your type as written is undefined behavior. | [
-0.3103691041469574,
-0.5510769486427307,
0.2664816379547119,
-0.017419397830963135,
-0.20119121670722961,
0.009668574668467045,
-0.02119484916329384,
-0.08399173617362976,
0.016378166154026985,
-0.6276271939277649,
0.04109416902065277,
0.5158624649047852,
-0.5440984964370728,
-0.105894096... | |
When creating a "forgotten password" mechanism, we might want to create a tempory password for the user which is stored using SHA1 (feel free to suggest other C# Cryptography mechanism).
How long should we make the tempory password? Too short, it could be brute forced. Too long and the unnecessary length is redundant ... | [
-0.019861284643411636,
-0.3094533681869507,
0.2790394723415375,
0.3540515899658203,
0.21929636597633362,
-0.15965117514133453,
0.21992899477481842,
0.0028672656044363976,
-0.33728763461112976,
-0.7443295121192932,
0.02671445906162262,
0.4448217749595642,
0.18951041996479034,
-0.02980035170... | |
mathematical reason to pick 13 rather than 12.
I think this is good advice regarding temp passwords:
[The definitive guide to form-based website authentication](https://stackoverflow.com/questions/549/the-definitive-guide-to-website-authentication-beta/477583#477583)
It talks about avoiding generating them in favour ... | [
0.07131607085466385,
-0.3125278949737549,
0.16521336138248444,
0.1707848757505417,
-0.051102831959724426,
-0.391853928565979,
0.27111732959747314,
-0.30589374899864197,
-0.005474942270666361,
-0.2526533901691437,
0.0012972973054274917,
0.5703145861625671,
-0.0760224312543869,
-0.4458888769... | |
Basically I have this which I know won't work but I it illustrates what I'm trying to do:
MessageBox.Show("Found these: " + keywords[i] + " keywords.");
And I need to see this:
Found these: Item1, Item2 keywords.
There may be 1 keyword there may be 4, how should I do this?
Many thanks.
You could use [string.Join](... | [
0.17478930950164795,
-0.020861618220806122,
0.4184846878051758,
0.10489937663078308,
-0.003371206810697913,
-0.10863563418388367,
0.2649513781070709,
-0.12612374126911163,
-0.38797059655189514,
-0.699508786201477,
0.0416477806866169,
0.40579622983932495,
-0.282796710729599,
0.0871269851922... | |
I'm using a try-catch block in the following Actionscript 3 code:
```
try {
this._subtitle = new SubtitleController(subtitlePath, _framerate);
this._subtitle.addEventListener(Event.COMPLETE, subtitleLoaded);
}
catch (e:Error) {
trace('subtitle not found');
}
```
The `SubtitleController` constructor then ... | [
0.033660754561424255,
-0.07607254385948181,
0.32110077142715454,
-0.2203533947467804,
0.14151643216609955,
-0.1741456389427185,
0.6081284880638123,
-0.27734142541885376,
-0.04568929970264435,
-0.5311233401298523,
-0.31986889243125916,
0.4096124470233917,
-0.5534248352050781,
-0.18052434921... | |
isn't the whole point of `try-catch` blocks to do that? Why does it not work with the `try-catch`, but it does work with a regular event listener?
IOErrors/NetworkErrors are asynchronous errors. They are not thrown when the method causing them is called as normal runtime errors. Otherwise the execution would have have ... | [
0.18933279812335968,
-0.037430912256240845,
-0.19487214088439941,
0.14704109728336334,
-0.2266669124364853,
-0.2883259356021881,
0.5625735521316528,
0.009462060406804085,
-0.3123297393321991,
-0.2893548905849457,
-0.16265395283699036,
0.30183568596839905,
-0.2655057907104492,
0.10112675279... | |
Could someone explain the difference between Software Design and Software Architecture?
More specifically; if you tell someone to present you the 'design' - what would you expect them to present? Same goes for 'architecture'.
My current understanding is:
* Design: UML diagram/flow chart/simple wireframes (for UI) ... | [
0.5765223503112793,
0.04744831100106239,
0.03194768726825714,
0.02140693925321102,
0.012141384184360504,
0.27193304896354675,
0.016942067071795464,
-0.29391032457351685,
-0.2620594799518585,
-0.7292306423187256,
0.06729550659656525,
0.3528248965740204,
-0.15845583379268646,
0.3300595879554... | |
correctly.
You're right yes. The architecture of a system is its 'skeleton'. It's the highest level of abstraction of a system. What kind of data storage is present, how do modules interact with each other, what recovery systems are in place. Just like design patterns, there are architectural patterns: MVC, 3-tier laye... | [
0.520117998123169,
0.20651917159557343,
-0.11369743198156357,
0.29870638251304626,
0.12873293459415436,
0.29071471095085144,
0.24905990064144135,
-0.1915028840303421,
-0.276436448097229,
-0.6490102410316467,
-0.29732534289360046,
0.6174613833427429,
-0.14099834859371185,
0.2503823339939117... | |
while software design emphasizes on module / component / class level. | [
0.16052713990211487,
0.19296878576278687,
-0.17528146505355835,
0.1847825050354004,
-0.009802458807826042,
-0.06766089051961899,
0.22859589755535126,
-0.23238058388233185,
-0.05196383222937584,
-0.6957058310508728,
-0.37764593958854675,
0.7306552529335022,
0.09848762303590775,
0.4045972824... | |
my background: i've been developing web applications using php and javascript for the past ten years. before that, i've developed applications using turbo pascal for DOS. in my opinion application and web application development are two different kinds of development (at least it's what i think when i remember back the... | [
0.5764809846878052,
0.5314708948135376,
-0.060355473309755325,
-0.004678093828260899,
0.12568093836307526,
0.04632728919386864,
0.10902999341487885,
0.35988959670066833,
-0.11485233902931213,
-0.743715763092041,
0.31602221727371216,
0.8426244258880615,
0.09184775501489639,
0.24041236937046... | |
me to get an application as result, that really feels like an osx application. i don't need any special UI components: an explorer/finder like tree, a datagrid and some form-elements would be enough for my needs.
now the problem is, that i don't know where to start: i would classify me as newbie, because it's that lon... | [
0.27458804845809937,
0.2541840374469757,
0.17387357354164124,
0.21331986784934998,
0.062384240329265594,
0.0927741751074791,
0.18136091530323029,
0.22095277905464172,
-0.22285053133964539,
-0.8258562684059143,
0.1735146939754486,
0.45294269919395447,
0.023142404854297638,
0.336103916168212... | |
thanks!
**thanks everyone!** i think i'll have a look at realbasic!
**Edit Nov 2011 - a retraction**
Most of what I say below is still true however I have now got serious reservations about recommending REALbasic for anyone trying to release commercial-quality applications. To save me remembering to edit this post la... | [
0.09980253875255585,
0.2916843295097351,
0.25544676184654236,
-0.2518961727619171,
-0.4716244041919708,
-0.11618822067975998,
0.6154067516326904,
0.5007365345954895,
-0.2425251454114914,
-0.6200830936431885,
0.05174650251865387,
0.7742416262626648,
0.15236572921276093,
-0.10807819664478302... | |
apparently one of under-capitalization and possibly a software development culture inside the company that consistently fails to deal with a bug regression problem. Many bugs are fixed each release but there appears to be a huge tax on the developers in the number of introduced bugs. They have a very small team for the... | [
0.389202356338501,
0.45968005061149597,
0.06659527122974396,
0.2262452393770218,
0.2689470052719116,
-0.14380024373531342,
0.3181884288787842,
0.256291002035141,
-0.19778946042060852,
-0.33587613701820374,
0.05901069566607475,
0.4430665075778961,
0.04685867205262184,
0.176668182015419,
-... | |
you can live with any bugs you find because they may be there for a while.
---
[REALbasic.](http://www.realsoftware.com)
The language is a powerful, modern OO language that won't be hard for you to adapt to from your vaguely remembered Pascal or current JavaScript. It has most of the power of C++ without the dangero... | [
0.3517031967639923,
-0.06990533322095871,
0.3282213509082794,
0.06641675531864166,
0.11178697645664215,
-0.07353866845369339,
0.30603528022766113,
0.3042866289615631,
0.011223978362977505,
-0.7484169006347656,
-0.14439797401428223,
1.015307903289795,
-0.4153807759284973,
-0.139670491218566... | |
debuggers I've used and it is easy to just work (say) on a Mac and develop for Windows and Linux, compiling and testing with one click.
There is also a thriving community including many people at your level of expertise so you won't be mocked for being a *newbie*.
I am a professional software developer with over 25 y... | [
0.7707427144050598,
0.41786372661590576,
-0.13776783645153046,
0.12315534055233002,
-0.16029608249664307,
0.07779975980520248,
0.3833061456680298,
0.189185231924057,
-0.1090623140335083,
-0.6654711961746216,
-0.061515290290117264,
0.8518335819244385,
-0.24365736544132233,
0.166703969240188... | |
why. I'd heard about prejudice against REALbasic but this is the first time I've encountered it. In what way was my answer inappropriate for this question?
Just to add to my cred, I've **implemented** [cross-platform frameworks](http://www.oofile.com.au/crossplat.html) used by systems deployed to tens of thousands of ... | [
0.6648093461990356,
0.20086026191711426,
-0.0637892633676529,
-0.048831816762685776,
-0.3164370357990265,
-0.0632900670170784,
0.07549745589494705,
-0.05169977992773056,
-0.24489186704158783,
-0.32968670129776,
0.09024863690137863,
0.4317699074745178,
-0.08987591415643692,
-0.0780202001333... | |
I am not sure how foolish I am being here!
I have a solution that packages up some master pages and layouts etc which I can deploy fine and the feature appears in the "Site Collection Features" list fine. However I would like to put a custom icon next to my feature. I would like the icon to be in the solution package ... | [
0.7175893187522888,
-0.12562428414821625,
0.41288885474205017,
0.18784043192863464,
-0.016711432486772537,
-0.42961299419403076,
0.3558958172798157,
-0.14034608006477356,
-0.3619570732116699,
-0.7445650100708008,
0.13164079189300537,
0.48779189586639404,
-0.09770815819501877,
0.11912159621... | |
possible and simple.
1. In your Feature.xml file, simply include the ImageUrl="" attribute and specify the location of your image. The best practice is to create a folder under the Template\Images folder with your images and then reference this location
2. Include the folder which contains your images in the solution... | [
0.33407342433929443,
-0.03632618859410286,
0.752055287361145,
0.11170899868011475,
0.27785804867744446,
-0.15588001906871796,
0.09321387112140656,
-0.37935206294059753,
-0.17221152782440186,
-0.9291118383407593,
-0.14570873975753784,
0.7698618769645691,
-0.169369637966156,
-0.1685880869626... | |
ImageUrl="ACMEImages\acmelogo.png"
xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- other feature file info omitted -->
```
DDF file sample:
```
.Set DestinationDir=IMAGES\AcmeImagesRootFiles\TEMPLATE\IMAGES\ACMEIMages\acmelogo.png
``` | [
-0.007244601845741272,
0.09027689695358276,
0.5511295199394226,
-0.04172743484377861,
-0.21194303035736084,
0.13751699030399323,
-0.02285950444638729,
-0.11581861972808838,
-0.1523863673210144,
-0.7369869351387024,
-0.4951563775539398,
0.4784902036190033,
-0.3418775796890259,
-0.0140020167... | |
Recently I was confused by [this question](https://stackoverflow.com/questions/700410/subtraction-without-minus-sign/700487#700487). Maybe because I didn't read language specifications (it's my fault, I know).
C99 standard doesn't say which negative numbers representation should be used by compiler. I always thought t... | [
0.26438212394714355,
0.24730736017227173,
-0.20115360617637634,
-0.13443803787231445,
-0.4808686077594757,
0.03911052271723747,
0.1849609762430191,
-0.10236427187919617,
-0.43792590498924255,
-0.5224551558494568,
0.10093335062265396,
0.414665162563324,
-0.3325696289539337,
0.13237704336643... | |
the compiler uses, but rather what representation the underlying machine uses. The compiler would be very stupid to pick a representation not supported by the target machine, since that would introduce loads of overhead for no benefit.
Some checksum fields in the IP protocol suite use one's complement, so perhaps dedi... | [
0.14982961118221283,
0.20295636355876923,
-0.13936565816402435,
0.31390276551246643,
-0.10716139525175095,
-0.13622933626174927,
0.06199685484170914,
-0.1168963760137558,
0.0824141576886177,
-0.646445095539093,
-0.27128010988235474,
0.33269041776657104,
-0.4510337710380554,
-0.154053896665... | |
i want a python program that given a directory, it will return all directories within that directory that have 775 (`rwxrwxr-x`) permissions
thanks!
Neither answer recurses, though it's not entirely clear that that's what the OP wants. Here's a recursive approach (untested, but you get the idea):
```
import os
import... | [
0.3717734217643738,
0.15423141419887543,
0.34180518984794617,
0.03146369010210037,
0.21459876000881195,
-0.04908118396997452,
0.2636486887931824,
-0.29045578837394714,
-0.24819961190223694,
-0.28786686062812805,
-0.3806585967540741,
0.9206079244613647,
-0.304043173789978,
-0.13950662314891... | |
# directory's) stat info.
filemode = stat.S_IMODE(os.stat(file).st_mode)
return filemode == mode
try:
top = sys.argv[1]
except IndexError:
top = '.'
try:
mode = int(sys.argv[2], 8)
except IndexError:
mode = MODE
# Convert mode to octal.
mode = int(mode, 8)
for dirpath, dirnames, filenames i... | [
-0.19595518708229065,
-0.4911069869995117,
0.8171048760414124,
-0.1770515888929367,
0.06732118129730225,
0.0519118569791317,
0.2393253892660141,
-0.28585395216941833,
-0.23642247915267944,
-0.8127228021621704,
-0.2657705247402191,
0.8542430996894836,
-0.5770238041877747,
0.0194724220782518... | |
in the stdlib documentation for
[stat](http://docs.python.org/library/stat.html). | [
0.05301572382450104,
-0.2903265655040741,
-0.09169255942106247,
0.009121633134782314,
0.02030739188194275,
-0.26176536083221436,
-0.05842066556215286,
0.1998027116060257,
-0.5744475722312927,
-0.7016360759735107,
-0.2783461809158325,
0.13705825805664062,
-0.46569809317588806,
-0.0719902962... | |
I'm working with a C++ class-library that provides a Thread base-class where the user has to
implement a `run()` method.
Is there a recommended way on how to pass parameters to that `run()` method? Right now
I prefer to pass them via the constructor (as pointers).
I'm not sure about C++, but that's how you would do i... | [
0.4860436022281647,
0.08812844008207321,
-0.0037935208529233932,
-0.14802509546279907,
-0.06502459198236465,
-0.15519008040428162,
-0.001840960350818932,
0.18164373934268951,
-0.15013130009174347,
-0.5713025331497192,
0.13888175785541534,
0.5700011849403381,
-0.45881515741348267,
0.3266468... | |
= new MyThread(args...);
t.start();
```
Must be the same in your case. | [
0.23350337147712708,
0.05522274971008301,
0.19895197451114655,
-0.1811642348766327,
0.09310159087181091,
-0.16807833313941956,
0.3282812833786011,
-0.002061956562101841,
-0.29301270842552185,
-0.5903905630111694,
-0.5267046689987183,
0.47963717579841614,
-0.2651292383670807,
0.060026064515... | |
In ASP.NET MVC it seems to be common practice not to use GET requests for calls to a controller that modify the model. For example, deleting a customer should not be possible by clicking a simple HTML link.
The only reason for this rule I am aware of is not safeguard against web-crawlers which might indavertently alt... | [
0.1848185956478119,
-0.3517827093601227,
0.6179827451705933,
-0.028937382623553276,
-0.05934124439954758,
-0.4961724281311035,
0.27776551246643066,
-0.11031904071569443,
-0.5251275897026062,
-0.3637503385543823,
-0.21998758614063263,
0.31769368052482605,
-0.2791345715522766,
0.194360420107... | |
use destructive GET requests?
This is generally part of HTTP. From [the HTTP 1.1 RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1)
> Implementors should be aware that the
> software represents the user in their
> interactions over the Internet, and
> should be careful to allow the user to
> b... | [
0.6059758067131042,
-0.03850124031305313,
0.19084709882736206,
0.18968020379543304,
-0.34269455075263977,
-0.5940823554992676,
0.5108147263526917,
-0.36017730832099915,
0.04251855984330177,
-0.28408196568489075,
-0.3855636715888977,
0.9174925684928894,
-0.42172548174858093,
-0.232894837856... | |
be considered "safe". This allows user
> agents to represent other methods,
> such as POST, PUT and DELETE, in a
> special way, so that the user is made
> aware of the fact that a possibly
> unsafe action is being requested.
>
>
> Naturally, it is not possible to
> ensure that the server does not
> generate si... | [
0.16486036777496338,
-0.30254217982292175,
0.08636762946844101,
0.1562705636024475,
0.0827888697385788,
-0.4118465185165405,
0.5925376415252686,
-0.3619483709335327,
-0.05484097823500633,
-0.5050374865531921,
-0.2938864231109619,
0.6418121457099915,
-0.5350690484046936,
-0.2906007468700409... | |
be held accountable for them.
In other words, it's not enforced, but it's really bad form for a GET request to have side-effects. Imagine if a user bookmarks a URL which does updates something, for example - they probably wouldn't expect that to happen. | [
0.7497879862785339,
0.08616115152835846,
0.3588901162147522,
0.40088340640068054,
-0.19171687960624695,
-0.7250549793243408,
0.3831443786621094,
-0.011416607536375523,
-0.21867716312408447,
-0.0860970988869667,
-0.07551354914903641,
0.3429912328720093,
-0.23310258984565735,
-0.133346170186... | |
I have two config-files
```
/app/config/database.yml
```
and
```
/app/config/userconfig.yml
```
i don't want to put the database credentials and userconfig in the svn-repository, so i have database.yml.dist and userconfig.yml.dist checked in.
What is the best way to get copys of the dist-files in the shared-dire... | [
0.10542746633291245,
0.30020031332969666,
0.9188914895057678,
0.04136540740728378,
0.32469308376312256,
-0.013539839535951614,
-0.11924820393323898,
-0.24688199162483215,
-0.4925987422466278,
-0.9130983352661133,
-0.16580693423748016,
0.908032238483429,
-0.35895541310310364,
-0.11842411756... | |
Just wondering if anyone has had any trouble using a BackgroundWorker Thread in a site running under IIS 7 in Integrated Pipeline mode?
I am trying to use such a beast to update the database schema (admin function, obviously), and it works perfectly in Cassini, but when I deploy to IIS 7, the thread gets about one lin... | [
0.3931712508201599,
0.03271055594086647,
0.2508947551250458,
0.10320111364126205,
0.1317468136548996,
-0.2395627498626709,
0.1773822009563446,
0.26610374450683594,
-0.33146780729293823,
-0.436814546585083,
-0.1014728844165802,
0.7759185433387756,
-0.13453416526317596,
0.2260158210992813,
... | |
base(...)
{
// ...
}
```
The base class *can* call abstract/virtual methods during the constructor, but it's generally frowned upon as the derived class's constructor body will not have been executed yet. (You'd want to document this really emphatically.)
Does this answer your question? I'm not entirely sure ... | [
0.33411166071891785,
0.0519232340157032,
-0.039292287081480026,
0.013308148831129074,
-0.04934082180261612,
-0.21370312571525574,
0.2512744963169098,
-0.03433103486895561,
-0.05742616951465607,
-0.38235604763031006,
-0.08351714164018631,
0.5695342421531677,
-0.3752533495426178,
0.147952482... | |
just call the base class constructor:
```
public Derived(string x) : base(x)
{
// Base constructor will do all the work
}
``` | [
0.1750342696905136,
0.02940971963107586,
-0.006364187691360712,
0.012973343022167683,
-0.06099007651209831,
-0.3576646149158478,
0.13530178368091583,
-0.009353339672088623,
0.1783772110939026,
-0.3005393445491791,
-0.4050053060054779,
0.5997680425643921,
-0.24714034795761108,
0.09906415641... | |
I am using VB6. The tool that i have created extracts few zip files and unzips them onto a folder that i create locally.In the clean up part of my code, i have deleted the folder using this code
```
If (f.FolderExists(path + "Extracted Files") = True) Then
f.DeleteFolder (path + "Extracted Files")
End If
``... | [
0.23252254724502563,
0.31302639842033386,
0.338101327419281,
-0.34086811542510986,
0.18944619596004486,
-0.12066075950860977,
0.6594520211219788,
-0.2814549505710602,
-0.37676987051963806,
-0.6864858269691467,
-0.21356482803821564,
0.6137847304344177,
-0.40986624360084534,
0.37868717312812... | |
permission ?
Perhaps one or more of the files is read-only? Use the optional force parameter to force deletion:
```
f.DeleteFolder (path + "Extracted Files"), True
``` | [
-0.0437341034412384,
-0.2817345857620239,
0.37554436922073364,
0.10337534546852112,
0.2523934841156006,
-0.12569251656532288,
0.29320967197418213,
-0.2930147647857666,
-0.011267832480370998,
-0.16546280682086945,
-0.5328547358512878,
0.7419761419296265,
-0.30286407470703125,
0.100971072912... | |
I have a datetime column in a table called 'createdDate' were the default value is set to getutcdate(). However when a row is added to the table the createdDate's time value is 1 hour behind the system time. So my question is how do I increase the current database system timestamp by 1 hour?
Thanks in advance.
It soun... | [
0.561843991279602,
-0.12606976926326752,
0.6632261872291565,
0.0772368311882019,
0.04105289652943611,
0.06990478932857513,
0.07338937371969223,
0.10605870932340622,
-0.23350152373313904,
-0.8488000631332397,
0.32104188203811646,
0.1676536202430725,
-0.0825127363204956,
0.25644001364707947,... | |
daylight saving changes" in the Date and Time properties on your server and continue to use GetUtcDate(). | [
0.5003789067268372,
-0.2758924663066864,
0.7148449420928955,
0.1561804860830307,
0.4042344391345978,
-0.2660084664821625,
0.2986117899417877,
0.00862309243530035,
-0.2870998978614807,
-1.2423487901687622,
-0.14832711219787598,
0.3053552210330963,
-0.23753149807453156,
-0.05925207957625389,... | |
When implementing a `COM` interface I always assign to the out parameters on success but should I do so also on error?
```
HRESULT CDemo::Div(/*[in]*/ LONG a, /*[in]*/LONG b, /*[out,retval]*/ LONG* pRet)
{
if (pRet == NULL)
return E_POINTER;
if (b == 0)
{
*pRet = 0; // is this redundant?
... | [
0.06220770627260208,
-0.024470778182148933,
0.547569990158081,
-0.32941630482673645,
-0.038626838475465775,
0.328408420085907,
0.22031757235527039,
-0.3508589565753937,
-0.11911185830831528,
-0.5516971945762634,
-0.47411882877349854,
0.848304271697998,
-0.5692248940467834,
0.12451118230819... | |
on the nose by not initializing an out parameter and assuming that if I initialized the variable it will remain that value if I don't change it inside the method. However I used this method from `.NET` and since the marshaller sees that this is an `[out]` parameter it discarded the initial value I placed on the call si... | [
0.249889075756073,
0.15259747207164764,
0.29431432485580444,
0.055913086980581284,
-0.18628637492656708,
0.09387008845806122,
0.33139899373054504,
-0.5330696702003479,
-0.1480494886636734,
-0.20501315593719482,
0.019302358850836754,
0.590495765209198,
-0.43892234563827515,
0.12913990020751... | |
function failed I often see (and sometimes write) code like this (using the example from [sharptooth's post](https://stackoverflow.com/questions/705093#705131)):
```
ISmth *pSmth = NULL;
pObj->GetSmth(&pSmth); // HRES is ignored
if (pSmth) // Assumes that if GetSmth failed then pSmth is still NULL
{
pSmth->Foo()... | [
0.01448974758386612,
0.09350291639566422,
0.38978636264801025,
-0.14742983877658844,
0.17035196721553802,
0.0451570525765419,
0.9088532328605652,
-0.38290828466415405,
-0.20013615489006042,
-0.163720041513443,
-0.2513066232204437,
0.7086184024810791,
-0.3873528242111206,
0.1386813223361969... | |
set all [out] parameters to NULL. This is not merely a matter of good style, it is required by COM and not adhering to it can cause random crashes when there is marshaling involved.
That said, the \*pRet = 0; in the original code is not redundant but correct and required. | [
0.2820080518722534,
-0.0701090544462204,
0.044112518429756165,
-0.0090657202526927,
0.20858411490917206,
-0.24640895426273346,
0.46382197737693787,
-0.2726074457168579,
0.005811580456793308,
-0.19111138582229614,
-0.3285762071609497,
0.5478602647781372,
-0.6469036340713501,
0.0081192376092... | |
The way DUnit normally works is you write some published methods, and DUnit runs them as tests. What I want to do is a little different. I want to create tests at run time based on data. I'm trying to test a particular module that processes input files to creates output files. I have a set of test input files with corr... | [
0.9022825360298157,
0.12459784746170044,
-0.3266988694667816,
0.15438212454319,
-0.1791037619113922,
-0.13393157720565796,
0.037747569382190704,
-0.31432396173477173,
0.3326365053653717,
-0.4936997890472412,
0.3571222722530365,
0.7971789240837097,
-0.14160074293613434,
0.04994046688079834,... | |
difficulty is making DUnit behave in a data-driven way. For the sake of this problem, suppose that the data source were just a random number generator. Here is an example concrete problem that gets to the heart of the difficulty:
Create some test objects (TTestCase or whatever) at runtime, say 10 of them, where each o... | [
-0.022162795066833496,
-0.08259528130292892,
-0.2840363085269928,
0.20134925842285156,
-0.24761512875556946,
-0.009892377071082592,
0.46123868227005005,
-0.3149680197238922,
0.11678804457187653,
-0.5491577386856079,
0.010411937721073627,
0.46953970193862915,
-0.08543961495161057,
0.0030328... | |
like it was designed with enough flexibility in mind to make such things possible. I'm not sure that it is though. I tried to create my own test class by inheriting from TAbstractTest and ITest, but some crucial methods weren't accessible. I also tried inheriting from TTestCase, but that class is closely tied to the id... | [
0.3156370520591736,
-0.1191907748579979,
-0.15777795016765594,
0.3586379587650299,
-0.2360684722661972,
-0.145917609333992,
0.1736598014831543,
0.10896728187799454,
-0.08997263759374619,
-0.4078664183616638,
0.09362868219614029,
0.12166400253772736,
-0.19164937734603882,
0.2145904004573822... | |
there some alternative to DUnit that could do what I want?
```
program UnitTest1;
{$IFDEF CONSOLE_TESTRUNNER}
{$APPTYPE CONSOLE}
{$ENDIF}
uses
Forms, Classes, SysUtils,
TestFramework,
GUITestRunner,
TextTestRunner;
{$R *.RES}
type
TIntTestCase = class(TTestCase)
private
FValue: Integer;
public
... | [
0.5290170311927795,
-0.20318961143493652,
0.3279178738594055,
-0.25911441445350647,
0.015076288022100925,
0.4545203447341919,
0.7932748198509216,
-0.637887179851532,
0.31322237849235535,
-0.5423611402511597,
-0.3031637668609619,
0.7766489386558533,
-0.3226628005504608,
0.15599325299263,
... | |
= 1000;
var
I: Integer;
begin
Randomize;
for I := 0 to TestCount - 1 do
RegisterTest(TIntTestCase.Create(Random(ValueHigh) + 1));
end;
begin
Application.Initialize;
RegisterTests;
if IsConsole then
TextTestRunner.RunRegisteredTests
else
GUITestRunner.RunRegisteredTests;
end.
``` | [
-0.050693947821855545,
-0.09396570920944214,
0.3233383595943451,
-0.15377311408519745,
0.08496293425559998,
0.26034611463546753,
0.5180153250694275,
-0.5058170557022095,
0.19975411891937256,
-0.6218625903129578,
-0.15293923020362854,
0.4741755723953247,
-0.19874125719070435,
0.239803597331... | |
I have two tables **poll** and **poll\_answers**, which represent a poll and the options to choose from to answer a question from the poll. EX:
> Am I poor at SQL?
>
>
> * yes
> * yes, you do
> * change craft
and the co-responding tables:
**poll**
```
pollID pollQuestion
1 | Am I poor at SQL?
```
---
**poll\... | [
-0.21951831877231598,
0.1963840126991272,
0.47966739535331726,
-0.06551766395568848,
-0.21251989901065826,
0.5393886566162109,
-0.13898614048957825,
-0.5555760860443115,
0.02140907198190689,
-0.771557629108429,
0.12634553015232086,
0.4601268768310547,
-0.1848546415567398,
-0.03061925061047... | |
$poll['id']=$poll_field['pollID'];
$poll['question']=$poll_field['pollQuestion'];
$tmp=$poll['id'];
//answers
$answers=$db->get_results("SELECT pollAnswerID, pollAnswerText FROM poll_answers WHERE pollID='$tmp'",ARRAY_A);
{
//and so on , I think you get the idea.
... | [
-0.25132468342781067,
0.19069863855838776,
0.19696173071861267,
-0.027947431430220604,
-0.19570541381835938,
0.20471975207328796,
0.4522912800312042,
-0.6121314764022827,
-0.10641337186098099,
-0.4939802289009094,
-0.18474595248699188,
0.2976277470588684,
-0.5981565713882446,
0.03750707954... | |
that it is possible to get the data with only one SQL query using INNER JOIN on the ID match...I just couldn't do it. Can you help? Keep in mind that there are multiple polls in my database.
---
**Edit:** thank you for the answers so far. I appreciate the help. But I didn't explain the question well. Is it possible ... | [
0.48436251282691956,
-0.08667441457509995,
0.0922970101237297,
0.5546137094497681,
-0.08182256668806076,
0.26297563314437866,
0.06534971296787262,
-0.23568522930145264,
-0.22152452170848846,
-0.4733327329158783,
0.41757163405418396,
0.664995551109314,
0.02781246043741703,
-0.13768213987350... | |
to do it or is it me not getting the answers?
```
SELECT pollQuestion, pollAnswerID, pollAnswerText
FROM poll_answers pa, poll p
WHERE p.pollID='$tmp'
AND pa.pollId = p.pollID
```
or, if you prefer `INNER JOIN` syntax,
```
SELECT pollQuestion, pollAnswerID, pollAnswerText
FROM poll p
INNER JOIN
po... | [
0.013363011181354523,
-0.28032028675079346,
0.13443593680858612,
0.2078365683555603,
-0.12684600055217743,
0.4727652072906494,
0.0980691984295845,
-0.3799908757209778,
-0.12217915803194046,
-0.06839210540056229,
-0.34688296914100647,
0.5407244563102722,
-0.3853611648082733,
-0.480133205652... | |
In my page source I put: `<!-- A comment -------->`
and ASP.Net converts it to: `<!-- A comment -------->`
so by the time it gets to the browser, my comment is visible.
It doesn't do it to all comments and if I add in another comment it sometimes makes the comment go away.
Anyone seen this before? How can I f... | [
0.025552276521921158,
0.04779784381389618,
0.606402575969696,
-0.04082954674959183,
-0.4594792127609253,
-0.044491223990917206,
0.45833826065063477,
0.4053724706172943,
-0.26632001996040344,
-1.0811444520950317,
-0.27358585596084595,
0.27601373195648193,
-0.2437886893749237,
-0.06255272030... | |
dashes** | [
0.11385156959295273,
0.18112227320671082,
-0.212921142578125,
0.1825769990682602,
-0.5218309760093689,
0.23280411958694458,
0.5573567748069763,
0.023554518818855286,
-0.5994666218757629,
-0.6304690837860107,
-0.031002096831798553,
0.28247424960136414,
0.08212637901306152,
0.207463383674621... | |
I'm using the following post build actions in a project, to merge a lib into my application:
```
IF $(ConfigurationName) == Debug GOTO end
cp $(TargetPath) $(TargetDir)app_unmerged.exe
del $(TargetPath)
"C:\Program Files\Microsoft\ILMerge\ilmerge.exe" /internalize $(TargetDir)MyApp_unmerged.exe $(TargetDir)someLib.dll... | [
0.2295292764902115,
0.15520545840263367,
0.5318357348442078,
-0.351085364818573,
0.07030566036701202,
-0.07338294386863708,
0.13746200501918793,
-0.12782283127307892,
-0.26140233874320984,
-0.8491528034210205,
-0.08079536259174347,
0.64986652135849,
-0.42867717146873474,
0.0672283545136451... | |
workaround exists. I created a ticket on Microsoft connect: <https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=428898>
Microsofts anwser:
Hi,
In order to execute those post build actions, you will need to put them in a batch file and then add the appropiate command to invoke the batch ... | [
0.3442480266094208,
-0.15002351999282837,
0.1885703057050705,
0.2655850052833557,
-0.337848961353302,
0.20087197422981262,
0.4702410101890564,
-0.11692482233047485,
-0.29394546151161194,
-0.5449161529541016,
0.19306743144989014,
0.4782370626926422,
0.015090489760041237,
0.01352620311081409... | |
I have an mvc app developed and tested with Cassini. Deployed to my site on GoDaddy, and the default page comes up fine. Click to log in, and I get a 404.
I'm running under IIS 7 there, so this is unexpected. My routes are pretty plain:
```
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.Map... | [
0.1127980574965477,
0.06146266683936119,
0.6600634455680847,
-0.01472797803580761,
0.32404574751853943,
-0.10316925495862961,
0.5778688788414001,
0.10120294243097305,
-0.4570273458957672,
-0.7588719725608826,
-0.2073037475347519,
0.2738310396671295,
-0.32514989376068115,
0.0944658964872360... | |
"{controller}/{action}/{id}",
new { controller = "Public", action = "Index", id = "" }
);
routes.MapRoute( | [
-0.25153398513793945,
-0.664110541343689,
0.46163564920425415,
0.05501176044344902,
0.06770550459623337,
0.17561937868595123,
-0.049286045134067535,
0.0016576196067035198,
-0.4017002284526825,
-1.163421630859375,
-0.4587936997413635,
0.012257502414286137,
-0.6879854798316956,
0.05979963019... | |
"Report1",
"Report/{action}/{start}/{end}",
new { controller = "Report", action = "Index" }
);
routes.MapRoute(
"Report2",
"Report/{action}/{start}/{end}/{idList}",
new { controller = "Report", action | [
-0.2612151801586151,
-0.5763225555419922,
0.47266265749931335,
0.12695640325546265,
-0.09487491101026535,
0.15038424730300903,
-0.03541369363665581,
-0.1656433790922165,
-0.29345861077308655,
-1.0952247381210327,
-0.33360791206359863,
0.17358896136283875,
-0.6365789175033569,
-0.2460259944... | |
= "Index" }
);
```
Any idea what might be going on or how I can troubleshoot this?
Are you running in IIS7 **integrated mode**?
Classic mode of IIS7 does **not** automatically map extensionless URLs to ASP.NET (much like IIS6).
Also make sure your `Web.config` `<system.webServer>` tag is configured correctl... | [
0.13349953293800354,
-0.2809697091579437,
0.5322323441505432,
0.07660820335149765,
0.21044133603572845,
-0.48834195733070374,
0.46578872203826904,
0.0953652635216713,
-0.37485870718955994,
-0.8584292531013489,
-0.318352609872818,
0.738716721534729,
-0.18441559374332428,
0.01782059110701084... | |
In this very simple ASP.NET application, **Visual Web Developer 2008 Express CAN debug** the JavaScript code fine, but the full version of **Visual Studio 2005 CANNOT debug it**, namely: when I click on a line in the main.js file **it gives me a red circle with a question** mark on it, the mouse hover revealing: "This ... | [
-0.38652878999710083,
0.0004528721619863063,
0.2890958786010742,
-0.14775095880031586,
-0.5279932618141174,
-0.23270222544670105,
0.7291623950004578,
-0.2423868477344513,
-0.2179764211177826,
-0.27718085050582886,
0.13319049775600433,
0.415054589509964,
-0.34121692180633545,
-0.03222533687... | |
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<script type="text/javascript" src="javascript/main.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
... | [
-0.08323124796152115,
-0.2900778353214264,
0.7063347697257996,
-0.2802632749080658,
-0.5629568099975586,
-0.36933010816574097,
-0.24834443628787994,
-0.3909037709236145,
-0.20872971415519714,
-0.4761875867843628,
-0.47759461402893066,
0.01298594195395708,
-0.6347492337226868,
-0.2340542823... | |
</div>
</form>
</body>
</html>
```
**javascript/main.js:**
```
function test() {
document.write("this is from javascript code2");
}
function doIt(element) {
alert("This is the javascript function2.");
}
```
Check if the following things are followed:
i. Enable script debugging in IE.
ii. Open... | [
0.3273010551929474,
-0.210537850856781,
0.3046228587627411,
-0.0026302780024707317,
-0.18625742197036743,
-0.5452141165733337,
0.2760383188724518,
-0.14974497258663177,
-0.13412480056285858,
-0.49528610706329346,
-0.31852659583091736,
0.6198780536651611,
-0.13515202701091766,
-0.0916780680... | |
Am I able to access an array component directly such as:
String x = args[1] ?
or do I have to use a loop and use args[i] ?
Yes, you can access an array component directly.
For example:
```
String[] test = new String[] { "first", "second" };
System.out.println(test[1]); // Prints second
```
(EDIT: For some reason ... | [
0.3398836851119995,
0.08277231454849243,
0.033804912120103836,
0.028033452108502388,
-0.11146505922079086,
-0.2297808974981308,
0.4568038582801819,
-0.5890474319458008,
-0.17089278995990753,
-0.5167944431304932,
-0.048184968531131744,
0.32185181975364685,
-0.3671889007091522,
0.00629025185... | |
I have a script that uses the cmd Python module. The cmd module uses a triple quoted multiline string as it's help text. Something like this
```
def x(self, strags = None):
"""class
help text here
and some more help text here"""
```
When running the script, the command 'help x' will print the string. It ... | [
0.05157852917909622,
0.13211983442306519,
0.5190743207931519,
-0.29057207703590393,
-0.22950223088264465,
0.15441443026065826,
0.48752161860466003,
-0.054850079119205475,
0.062143318355083466,
-0.529424786567688,
-0.015591316856443882,
0.8114116787910461,
-0.43570664525032043,
-0.179587513... | |
Python coders handle this?
Personally I try to follow [PEP 8](http://www.python.org/dev/peps/pep-0008/) which refers the reader to [PEP 257](http://www.python.org/dev/peps/pep-0257/) for Docstring Conventions. It has an entire section on multi-line docstrings. | [
0.28068697452545166,
0.08956383913755417,
0.03571632504463196,
-0.135151669383049,
-0.34352919459342957,
-0.3036692440509796,
0.13233144581317902,
-0.047886379063129425,
-0.21992099285125732,
-0.16595007479190826,
-0.24759627878665924,
0.4264753758907318,
-0.3592415750026703,
-0.5180844068... | |
I'm currently making a project where I need to print out a receipt on a receipt printer.
At the moment i'm using the CSS mechanism media=screen , media=print to indicate what to print.
Problem is of course the header and footer which can't be removed, as it is client browser specific.
So i'm wondering if anyone has a... | [
0.5748780965805054,
0.09196273237466812,
0.6139375567436218,
0.34481945633888245,
-0.05738500505685806,
-0.06477107107639313,
-0.3162391483783722,
-0.044183745980262756,
-0.3632000684738159,
-0.7209873199462891,
0.2306324690580368,
0.3482438921928406,
-0.0021888718474656343,
0.136557802557... | |
are controlled, and have word, than .doc (html with an output type) is the easiest method. There are a number of third party controls for generating PDF from server-side code as well. Hope this leads you in a usable direction, since you didn't specify if you controlled the client machines in use.
One benefit to PDF is... | [
0.1927998811006546,
-0.11296389251947403,
0.500359058380127,
0.6208251118659973,
-0.4031551480293274,
-0.5415385961532593,
-0.22373329102993011,
-0.01499209739267826,
-0.3126889169216156,
-0.6767468452453613,
-0.34099721908569336,
0.534522533416748,
-0.22111570835113525,
0.0292963795363903... | |
Is there any easy way to get the defines (at least the WM\_ stuff) from windows.h in C#?
Sure, you can copy them out of the code listing here at the Pinvoke website:
<http://www.pinvoke.net/default.aspx/Enums/WindowsMessages.html> | [
0.3366871178150177,
0.09504320472478867,
0.2790225148200989,
0.2096078097820282,
0.12046950310468674,
0.10074411332607269,
0.1719612181186676,
0.1514642983675003,
-0.4061275124549866,
-0.3461533486843109,
0.1437717229127884,
0.46590080857276917,
-0.17225369811058044,
-0.021691573783755302,... | |
I've been searching for intellisense in Visual Studio 2005 or Visual Studio 2008 when editing "*manifest.xml*" file in a SharePoint solution (wsp) with no result. Does anybody know if there is something similar to CAML intellisense but for "*manifest.xml*" files???
Thanks.
You can ensure intellisense by adding schema ... | [
0.06652894616127014,
-0.10054375231266022,
0.32824984192848206,
0.10833258926868439,
-0.1933942288160324,
-0.1879163533449173,
0.01966257393360138,
0.19512471556663513,
0.009588515385985374,
-0.8821563720703125,
0.24805046617984772,
0.5504010319709778,
-0.1387099176645279,
-0.0659992843866... | |
there are ways to force this to occur for every xml file as well. | [
0.2792727053165436,
0.06408816576004028,
0.18017327785491943,
0.241801455616951,
0.23276172578334808,
-0.42821377515792847,
-0.20925745368003845,
0.012728244997560978,
-0.11872655898332596,
-0.4374261498451233,
-0.38862344622612,
0.29918545484542847,
-0.11920211464166641,
0.015863973647356... | |
I am currently writing a C (not C++). It seems the Microsoft's C compiler requires all variables to be declared on top of the function.
For example, the following code will not pass compilation:
```
int foo(int x) {
assert(x != 0);
int y = 2 * x;
return y;
}
```
The compiler reports an error at the thir... | [
0.28524014353752136,
0.3046218454837799,
0.42750927805900574,
-0.4064500331878662,
-0.1082509383559227,
-0.15475735068321228,
0.4220677614212036,
-0.28219833970069885,
0.02786206640303135,
-0.33731740713119507,
-0.3040670156478882,
0.5534823536872864,
-0.2451360523700714,
0.309838891029357... | |
y = 2 * x;
return y;
}
```
If I change the source file name from `.c` to be `.cpp`, the compilation will also pass as well.
I suspect there's an option somewhere to turn off the strictness of the compiler, but I haven't found it. Can anyone help on this?
Thanks in advance.
I am using cl.exe that is shipped wit... | [
0.5922715663909912,
0.41364994645118713,
0.2022009938955307,
0.049555059522390366,
-0.18677513301372528,
-0.24049285054206848,
0.4269556999206543,
0.09632691740989685,
-0.18029235303401947,
-0.4261314272880554,
-0.17678231000900269,
0.6785930395126343,
-0.15020185708999634,
0.1576283276081... | |
may initialize them with literals, etc., but not mix code and variables.
There should be a compiler flag to enable C99 somewhere, which will get you the behavior you're used to.
**EDIT:** quick Googling does not look promising for enabling C99. You may have to live with C89 (which ain't so bad) or find a better C com... | [
0.3617607653141022,
-0.051963940262794495,
0.05607609823346138,
0.20522063970565796,
-0.23633433878421783,
-0.2646614909172058,
0.5546891093254089,
0.20444364845752716,
-0.13160653412342072,
-0.6371854543685913,
-0.17393802106380463,
0.6110199093818665,
-0.3039780259132385,
-0.099323593080... | |
I got a dataform partially working with RIA services (I can fetch and edit data).
The problem is that I added validation to my RIA service fields. Ex: from my metadata.cs file
[StringLength ( 50, ErrorMessage= "bad data dude!" , MinimumLength=4)]
public string Title;
In the dataform, when a user enters data violati... | [
0.6187890768051147,
0.20803649723529816,
0.2779731750488281,
-0.06835296750068665,
-0.2752170264720917,
-0.3566201329231262,
0.6296492218971252,
-0.23471495509147644,
-0.2496751993894577,
-0.271604061126709,
-0.016637276858091354,
0.32571327686309814,
-0.0951431542634964,
0.082705706357955... | |
If you just continue the program the error will be handled and the failed validation will show as expected.
You can tell VS not to stop on an user unhanded ValidationException using the Debug/Exceptions dialog in VS. | [
0.7541563510894775,
-0.12433647364377975,
0.29103216528892517,
0.17606644332408905,
0.21851783990859985,
-0.4847387969493866,
0.6729768514633179,
-0.016890710219740868,
-0.4137600064277649,
-0.3521043658256531,
-0.29176193475723267,
0.7298957705497742,
-0.3195314407348633,
-0.0552121996879... | |
Can a [set](http://dev.mysql.com/doc/refman/5.1/en/set.html) in MySQL be 0?
This seems to be a cross site scripting security restriction that webkit and opera impliment and IE and FF ignore. | [
0.4119803011417389,
-0.22060541808605194,
0.26090532541275024,
-0.14077812433242798,
-0.16983257234096527,
-0.3704456686973572,
0.2624790370464325,
-0.23982557654380798,
0.16650725901126862,
-0.3161681294441223,
-0.3880845904350281,
0.5389411449432373,
-0.5433390736579895,
-0.0818069055676... | |
**Duplicate of:**
> [What common web exploits should I know about?](https://stackoverflow.com/questions/23102/what-common-web-exploits-should-i-know-about)
This is a security question.
What should I look for in URL that prevents hacking?
Is there a way to execute javascript by passing it inside a URL?
As you can... | [
0.726094663143158,
0.28563815355300903,
-0.01012851856648922,
0.23729738593101501,
-0.1420307159423828,
-0.22289620339870453,
0.6527889966964722,
0.26580503582954407,
-0.4908130168914795,
-0.7762863039970398,
0.31463947892189026,
0.46704667806625366,
-0.2745198607444763,
0.1853881329298019... | |
aren't adding parameters to SQL or other script executions that were passed into the code from the browser without making sure the strings don't contain any script language. Search the next for details about injection attacks for the development platform you are working with, that should yield lots of good advice and e... | [
0.399676650762558,
-0.07989763468503952,
-0.24275651574134827,
0.3969154357910156,
-0.08744959533214569,
-0.3435570001602173,
0.28411322832107544,
0.13651978969573975,
-0.19568109512329102,
-0.5625911355018616,
0.08801340311765671,
0.5961241126060486,
-0.31320732831954956,
-0.3110316991806... | |
I got this code in a user control:
```
[DefaultValue(typeof(Color), "Red")]
public Color MyColor { get; set; }
```
How can I change `MyColor` to be its default value?
It is informal, but you can use it via reflection, for example, place in your constructor the following:
```
foreach (PropertyInfo p in this.GetType(... | [
0.3372686803340912,
-0.2617282271385193,
0.8711309432983398,
-0.3367477059364319,
0.11916793137788773,
0.10135584324598312,
0.14729516208171844,
-0.11997347325086594,
0.14522209763526917,
-0.6569470167160034,
-0.06415510922670364,
0.552388608455658,
-0.1460125893354416,
0.2994422912597656,... | |
p.SetValue(this, dv.Value);
}
}
}
``` | [
-0.2152734398841858,
-0.058193277567625046,
0.36614978313446045,
-0.24408374726772308,
0.19618742167949677,
-0.056064117699861526,
0.022986792027950287,
-0.24329052865505219,
-0.016179461032152176,
-0.4691174030303955,
-0.5234556794166565,
0.7779567241668701,
-0.6185859441757202,
0.0400346... | |
When executing the following block of code:
```
foreach($eventfiles as $eventfile)
{
if($eventfile['filename'])
{
$file = $eventfile['filepath'];
// Open File
if( !($fp = fopen($file, "r")))
{
echo '<br>CAN NOT READ FILE.';
exit;
} | [
0.03728827089071274,
-0.1012982651591301,
0.15615788102149963,
-0.614986002445221,
0.255629301071167,
-0.02534852735698223,
0.4155103266239166,
-0.4283454716205597,
-0.3051932454109192,
-0.09745648503303528,
-0.5251682996749878,
0.5332276821136475,
-0.44394707679748535,
0.05832778289914131... | |
// Read data from the file into $data
$data = "";
while (!feof($fp)) $data .= fread($fp,1024);
query("update event_rtab set html = '".escape($data)."' where id = {$eventfile[id]}");
}
if($eventfile['eventType']=='email')
{
query("INSERT INTO event_email_rtab (event_id,subject... | [
-0.3845474123954773,
0.027341187000274658,
0.4330109655857086,
-0.2370622307062149,
0.37500450015068054,
0.21728353202342987,
0.6906828880310059,
-0.6421900987625122,
0.044110458344221115,
-0.5180102586746216,
-0.4291408061981201,
0.686680018901825,
-0.2280508279800415,
0.03777466714382171... | |
on line 843
What causes this error and how can I correct it?
Where are the files located you are trying to open? Are they on the local filesystem or are you trying to access them via HTTP(S)?
If you're using some network protocol wrapper then, this error is most likely connected with too many (HTTP - in case of the H... | [
-0.0707082524895668,
-0.011673090048134327,
0.5354247689247131,
0.14982113242149353,
-0.033552803099155426,
0.03819948062300682,
0.6016210317611694,
-0.2691241502761841,
-0.3229408860206604,
-0.36229515075683594,
-0.19828321039676666,
0.5789597034454346,
-0.3827386498451233,
0.191503360867... | |
webserver on the other end to do some spellcheck-redirects) or the other server is misconfigured or there are some security measures in place or...
If you feel the need to extend the 20 redirects you could use a stream context.
```
$context = array(
'http'=>array('max_redirects' => 99)
);
$context = stream_conte... | [
-0.0165728572756052,
-0.10176049172878265,
0.8187367916107178,
0.0023931614123284817,
-0.056208886206150055,
0.0502643845975399,
0.2749403119087219,
-0.2389538735151291,
-0.1367521584033966,
-0.814360499382019,
-0.41126057505607605,
0.5086086988449097,
-0.442393958568573,
-0.04559439420700... | |
I'm having an issue with netbeans and Java. My program needs to be able to cope with large files being uploaded via an arraylist. So I used -Xmx512m to increase the maximum heap size via the netbeans.conf file.
I know that netbeans is catching the change, and I've restarted multiple times to make sure it is. Still, my... | [
0.11390690505504608,
0.05335308238863945,
0.0581883080303669,
-0.08885962516069412,
-0.10745696723461151,
-0.11390715092420578,
0.23277990520000458,
0.039858970791101456,
-0.6654067635536194,
-0.6836439967155457,
0.23998770117759705,
0.5398105978965759,
-0.2718878984451294,
0.2964404821395... | |
size of netbeans IDE itself and not your program.
Go to your project "**properties**", select "**Run**" category. In the "**VM Options**" text box put your arguments (`-Xmx512m`). | [
0.26851654052734375,
-0.13741245865821838,
0.16214844584465027,
0.07229599356651306,
-0.05873838812112808,
-0.26087477803230286,
-0.1715693473815918,
-0.24842536449432373,
-0.320989727973938,
-0.591433048248291,
-0.16794531047344208,
0.5804091095924377,
-0.10139656811952591,
0.173193410038... | |
ASP.NET 2.0, PageMethods.
Good day,
I'm using ASP.NET AJAX PageMethods to dynamically change the text of a Label when a dropdownlist is changed on my page.
I know that the text of Labels are not retained between postbacks when they are changed on client-side, which is my case. I've heard that a solution is to keep t... | [
0.1912616640329361,
-0.27026405930519104,
0.23724567890167236,
0.07143833488225937,
-0.22028356790542603,
-0.3328707814216614,
0.37751075625419617,
0.15749308466911316,
-0.5501187443733215,
-1.0008418560028076,
-0.025127019733190536,
0.47819656133651733,
-0.08641108870506287,
-0.1241481006... | |
get changed, I want, in a label, to put the telephone of that person. However, I thought that doing a full postback was not really the best alternative, so I decided to get the telephone with a PageMethod, passing the Id of the item selected in the dropdownlist to retrieve the telephone, and the put it in the label.
H... | [
0.6020165085792542,
-0.09915472567081451,
0.6464536786079407,
0.1252155303955078,
0.39144131541252136,
0.06178992986679077,
0.14866480231285095,
-0.12985967099666595,
-0.15919063985347748,
-0.4648153483867645,
0.024636810645461082,
0.40740537643432617,
-0.31333664059638977,
0.1701333522796... | |
I was wordering if there was another solution. Since WebMethods are marked as static, I cannot write Label.text = person.Telephone; in them.
As you seem to have ajax you could just do a partial postback, write the number to the label and into the viewstate, and in page\_load write the value from the viewstate to the la... | [
-0.1807243376970291,
-0.10538677126169205,
0.5231590867042542,
-0.14506413042545319,
0.02690816856920719,
-0.1911606788635254,
0.31405144929885864,
-0.12505501508712769,
-0.11154162138700485,
-0.6882568001747131,
-0.11614254117012024,
0.5776841044425964,
-0.29681432247161865,
0.07145424187... | |
and on Postback fill the label with the content.
On aspx:
```
<asp:HiddenInputField runat="server" ID="myHiddenInput" />
```
on PageLoad:
```
myLabel.Text = myHiddenInput.Value;
``` | [
-0.1622563749551773,
0.05723310634493828,
0.18808254599571228,
0.10082791745662689,
0.005006597377359867,
-0.2007509022951126,
0.25155937671661377,
0.38506338000297546,
-0.1705176681280136,
-0.6814334988594055,
-0.6587201356887817,
0.10551884025335312,
-0.11493698507547379,
0.1847155094146... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.