text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Do certain spiders/robots remove spaces from filenames and hence should spaces in filenames be avoided in websites?
I once learned that I should avoid mixing upper and lowercase as well as special chars (use only ASCII) and spaces. Since in the URL they may need to be escaped - hard to type manually (for testing) and l... | [
0.419453889131546,
0.3648962080478668,
-0.105202317237854,
0.25390276312828064,
-0.10899532586336136,
-0.1867140680551529,
0.24840682744979858,
0.5642602443695068,
-0.3615879416465759,
-0.5418639183044434,
-0.0861128643155098,
0.00522299250587821,
-0.14813309907913208,
0.28143060207366943,... | |
if i am running my application i want to know where the mouse pointer is located(whether in the application or not ),i mean the position.
suppose if mouse is located in the application then i want to raise a event,
if mouse in my application then only i want to raise an event not if i am in any other sub window or in a... | [
-0.1215091422200203,
-0.13616380095481873,
0.5933107137680054,
0.04657943546772003,
0.20658206939697266,
-0.10458126664161682,
0.017430230975151062,
-0.17955799400806427,
-0.5083150863647461,
-0.6257811188697815,
-0.12569189071655273,
0.4579657018184662,
-0.03567437827587128,
-0.1447809636... | |
forms and controls in order to do whatever you need to when the mouse is moved on (or off) your form. | [
0.307699978351593,
-0.2986750602722168,
0.4142569899559021,
0.34241539239883423,
0.17136791348457336,
-0.02369716577231884,
-0.12238436937332153,
-0.24870549142360687,
-0.22561150789260864,
-0.5609736442565918,
-0.23017770051956177,
0.38584208488464355,
-0.18624654412269592,
-0.14524081349... | |
Hi i'm loading a FLV into a blank video holder and would like to display a button when the video reaches a certain point. Is this at all possible?
Define namespaces with the XML Serialisation (or, better) Data Contract definition attributes.
e.g. with XML Serialisation:
```
[Serializable, XmlRoot(namespace="http://ex... | [
0.06820953637361526,
-0.2644325792789459,
0.9867493510246277,
-0.03981973975896835,
0.027026373893022537,
-0.09064260125160217,
0.030362162739038467,
-0.2790617346763611,
-0.07051343470811844,
-0.49610912799835205,
-0.33407437801361084,
0.4337088465690613,
-0.42747756838798523,
0.151896655... | |
on the message itself.
`OperationContractAttribute` offers no control of namespaces, and I can't see any other WCF attributes at a method level.
Two possibilities: (1) You may have enough control by dropping a level of abstraction and using a Message Contract. (2) Get the current WSDL for the service (using `svcutil.... | [
0.22294984757900238,
-0.4123021364212036,
0.4486037790775299,
-0.01634473353624344,
-0.06938395649194717,
-0.11630397289991379,
0.14472196996212006,
-0.1983337551355362,
-0.24731101095676422,
-0.5004342794418335,
-0.2564670145511627,
0.6070094108581543,
-0.4136015474796295,
0.1205969974398... | |
Adding a script to a view generally involves something like this:
```
<script src="../../Scripts/jquery-1.3.1.min.js" type="text/javascript"></script>
```
Unfortunately, this doesn't work if the app is deployed in a virtual directory under IIS 6. The alternatives discussed [here](https://stackoverflow.com/questions/... | [
0.054171122610569,
-0.08243759721517563,
0.45427823066711426,
-0.1130375862121582,
-0.21282261610031128,
0.1180059015750885,
0.4247084856033325,
-0.09013160318136215,
-0.15889574587345123,
-0.6988399624824524,
-0.08668644726276398,
0.6769936084747314,
-0.1565835326910019,
-0.03242080286145... | |
Is there any sort of interactive debugger for JavaScript? I'm imagining something like a web page on the left, and a REPL interface on the right.
Or maybe even without having a web page, so I can just play around with the JavaScript language.
Something that doesn't require I refresh the web page with breakpoints in F... | [
0.45093047618865967,
0.008922119624912739,
0.28814494609832764,
0.23002056777477264,
-0.30736732482910156,
0.03095574676990509,
0.36506444215774536,
0.043813616037368774,
-0.7146446704864502,
-0.5281490087509155,
0.030484307557344437,
0.7971718907356262,
-0.19741716980934143,
-0.0723472833... | |
the [Rhino](http://www.mozilla.org/rhino/) project. | [
0.13179120421409607,
0.004327950067818165,
-0.3490777313709259,
-0.25407665967941284,
0.15990394353866577,
-0.1440570205450058,
-0.002786101773381233,
0.24109011888504028,
-0.9568052291870117,
0.18757382035255432,
-0.2758963406085968,
0.22312839329242706,
-0.3898247182369232,
0.21250177919... | |
How can I implement seeking (timeline feature) in a streamed audio on the iPhone?
The AudioFileStreamSeek method takes in the byte offset from which I want to start seeking. I want to be able to get the current position of the mp3 which is playing and let the user come back (seek) to the same position at a later point... | [
0.14463327825069427,
0.10713589191436768,
0.4536469578742981,
0.18407101929187775,
0.07217666506767273,
-0.02899092063307762,
0.01743592880666256,
-0.4528965651988983,
0.14636662602424622,
-0.6771638989448547,
0.12611427903175354,
0.908563494682312,
-0.03407840430736542,
-0.138666018843650... | |
am using Matt Gallagher's audio streaming example as the base.
Any help is greatly appreciated.
Thanks.
**Might just be able to find a solution. AudioFileStreamSeek documentation says**
> After you call this function, the
> parser assumes the next data passed to
> the AudioFileStreamParseBytes function
> starts ... | [
0.418962299823761,
0.09631455689668655,
0.6046765446662903,
0.08214113861322403,
-0.04895379766821861,
-0.2997896671295166,
0.3197554051876068,
-0.3227594792842865,
0.09764573723077774,
-0.5014001131057739,
-0.17529426515102386,
0.8607428669929504,
-0.037909653037786484,
0.2971411645412445... | |
appreciated. Thanks.
AudioFileStreamSeek works with packets, not number of bytes. So, what you really need to track is the packet count.
The MyEnqueueBuffer method in Matt's code is where the buffers are sent to AudioQueue for playback. Grab packetsfilled and increment your index variable before packetsfilled is reset... | [
0.1387024223804474,
-0.10691865533590317,
0.6849600672721863,
0.20342572033405304,
-0.17258965969085693,
-0.2694016098976135,
0.37973499298095703,
-0.17564821243286133,
-0.12240252643823624,
-0.6578730344772339,
0.11181770265102386,
0.9697655439376831,
-0.08974975347518921,
0.1203897595405... | |
I thought that the purpose of using Linq2Nibernate was to return IQueryable and build up an expression tree. I am not sure if this is correct or not.
Why would anyone use Linq2Nibernate if they are not going to return IQueryable?
What else would it be used for?
**I would love some more input on this topic**
[Lin... | [
-0.16699185967445374,
0.16269634664058685,
0.4213818311691284,
0.05177042633295059,
-0.43109601736068726,
-0.22988061606884003,
0.20567727088928223,
-0.15146468579769135,
-0.04918598756194115,
-0.48762717843055725,
0.07191404700279236,
0.3510608673095703,
-0.3721117675304413,
0.21995900571... | |
database query.
FYI there is an [alpha version available](http://groups.google.com/group/nhusers/browse_thread/thread/b7a3f537f4cbf46d/90e24322340268c5). | [
-0.5755599141120911,
-0.1166655570268631,
0.41401657462120056,
0.24524909257888794,
0.015815097838640213,
-0.04736332967877388,
0.21498872339725494,
0.06452886015176773,
-0.28690868616104126,
-0.40594062209129333,
-0.0684884563088417,
-0.05561138316988945,
-0.5443477630615234,
0.4841836392... | |
Does anyone know if there exists a color scheme for Visual Studio 2008 so it would look more like the new Visual Studio 2010? If not the whole IDE then at least the "Fonts-Colors" part.
Found - it is the Ant [FixCRLF task](http://ant.apache.org/manual/Tasks/fixcrlf.html). | [
0.05475073307752609,
-0.004432159010320902,
0.21188129484653473,
-0.02412332408130169,
-0.16466014087200165,
0.0430307500064373,
0.04797615483403206,
-0.00851601641625166,
-0.37409064173698425,
-0.4283815026283264,
0.03376389294862747,
0.47994065284729004,
-0.13984070718288422,
-0.54880034... | |
Lets say i have a listbox with many items so that a vertical scroll comes up, but i have hidden the scroll bar with
```
ScrollViewer.VerticalScrollBarVisibility="Hidden"
```
Is there any way i can add a button that would scroll down for me? iv tryed to add
```
Command="ScrollBar.LineDownCommand"
```
to a button... | [
0.15990868210792542,
-0.19408829510211945,
0.6460071802139282,
-0.027665872126817703,
-0.1414785236120224,
-0.11423924565315247,
0.23548360168933868,
-0.26362210512161255,
-0.1905539631843567,
-0.7342177629470825,
0.22073230147361755,
0.5128359794616699,
-0.1119782105088234,
0.111088745296... | |
of its template, so WPF still won't find it.
Setting it to one of the `ListBoxItem`s is naff, but works:
```
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width... | [
-0.1461307853460312,
-0.26714256405830383,
0.7142742872238159,
-0.21772323548793793,
-0.18051166832447052,
-0.010944735258817673,
-0.026145048439502716,
-0.5360309481620789,
-0.05272636190056801,
-0.44400686025619507,
-0.03987326845526695,
0.3878277838230133,
-0.10107046365737915,
0.077922... | |
<ListBoxItem x:Name="_listBoxItem">One</ListBoxItem>
<ListBoxItem>Two</ListBoxItem>
<ListBoxItem>Three</ListBoxItem>
<ListBoxItem>One</ListBoxItem>
<ListBoxItem>Two</ListBoxItem>
<ListBoxItem>Three</ListBoxItem>
<ListBoxItem>One</ListBoxItem>
... | [
-0.2244526892900467,
0.3781350553035736,
0.04419899359345436,
-0.561941385269165,
-0.48669952154159546,
0.6347666382789612,
0.2529798448085785,
-0.4414345324039459,
-0.15861865878105164,
-0.7017608880996704,
-0.14016953110694885,
0.4681917726993561,
-0.5947648882865906,
0.1334279179573059,... | |
<ListBoxItem>One</ListBoxItem>
<ListBoxItem>Two</ListBoxItem>
<ListBoxItem>Three</ListBoxItem>
</ListBox>
<Button Grid.Row="1" Command="ScrollBar.LineDownCommand" CommandTarget="{Binding ElementName=_listBoxItem}">Scroll Down</Button>
</Grid>
</Window>
```
A better way to d... | [
-0.07609347254037857,
-0.28139469027519226,
0.3991224765777588,
-0.37446099519729614,
-0.2707791030406952,
0.16476792097091675,
0.09197451174259186,
-0.9180423021316528,
-0.16504397988319397,
-0.7015975713729858,
-0.0650884285569191,
0.612524151802063,
-0.43906745314598083,
-0.087834589183... | |
I am using a simple TABLE to display tabular data where the rows need to line up but when it comes to selecting the table contents, I only want users to be able to select within each column. Default browser behaviour is to select as rows across all columns but we NEED somehow allow selection only within columns.
I was... | [
0.2701641023159027,
0.18789386749267578,
0.243247851729393,
-0.026869826018810272,
-0.17084717750549316,
0.08409035205841064,
0.018725110217928886,
0.17204944789409637,
-0.33676689863204956,
-0.7816847562789917,
0.06815603375434875,
0.14778563380241394,
-0.4277810752391815,
0.1886776983737... | |
selection way to override browser selection. Obviously javascript spreadsheet widgets like Google Spreadsheets allow selection within rows and columns as I require but I am hoping to find a grid-type widget built on Prototype or write my own functionality.
Any tips or links to widgets with this column selection builti... | [
0.2585667073726654,
0.10525460541248322,
0.3100838363170624,
0.35252365469932556,
-0.28767046332359314,
0.06489601731300354,
0.08054149150848389,
-0.20512081682682037,
-0.22314810752868652,
-0.6290445327758789,
0.300706684589386,
0.4733475148677826,
-0.3928160071372986,
0.16887028515338898... | |
copy the argument passed into the parameter object, and what you get is an object of type `A` - but which is actually not allowed!
```
// the reference parameter will reference the actual argument
void setInstance(A &newInstance) {
// assign the address of the argument to the pointer member
... | [
0.13997286558151245,
0.059547439217567444,
0.4953197240829468,
0.0380096510052681,
0.18971244990825653,
-0.13980109989643097,
0.28930091857910156,
-0.2301066517829895,
-0.1822964996099472,
-0.4807468056678772,
-0.22740767896175385,
0.7590778470039368,
-0.5705766677856445,
0.176578700542449... | |
will have to change the member in your class to be a pointer. It can't be a reference because `setInstance` will change what it references - a reference can only reference one object during its entire lifetime, while a pointer can be set to point do different things just by reassigning it a different address. The remai... | [
0.06974348425865173,
-0.22343358397483826,
0.42766377329826355,
0.0914900153875351,
0.2265041619539261,
-0.04890746995806694,
0.35004499554634094,
-0.3318212628364563,
-0.2734212875366211,
-0.7215012311935425,
0.03588459640741348,
0.4702925682067871,
-0.4519483149051666,
0.4239119291305542... | |
instance->action();
}
private:
// a pointer to some object derived from A
A *instance;
```
Also note that you have to compile C++ programs using `g++`, because it additionally links the C++ standard library to your code
```
g++ -o test test.cpp # instead of gcc!
``` | [
0.08366983383893967,
0.07671844214200974,
0.06553898751735687,
-0.07381141930818558,
-0.0587543323636055,
0.06979574263095856,
0.1509140580892563,
-0.0964510440826416,
-0.3426291048526764,
-0.38306039571762085,
-0.2627648115158081,
0.5896714925765991,
-0.4085265100002289,
-0.08852751553058... | |
I'm sure this question has been answered already, however I was unable to find an answer using the search tool.
Using c# I'd like to run a .sql file. The sql file contains multiple sql statements, some of which are broken over multiple lines. I tried reading in the file and tried executing the file using ODP.NET ... h... | [
0.6737329363822937,
0.20854192972183228,
0.24927735328674316,
0.08006362617015839,
-0.014688811264932156,
0.13948827981948853,
0.16803774237632751,
-0.046466927975416183,
-0.36664602160453796,
-0.6672179698944092,
0.4338812232017517,
0.4238860309123993,
-0.3398006856441498,
0.4961392581462... | |
p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "sqlplus";
p.StartInfo.Arguments = string.Format("xx/xx@{0} @{1}", in_database, s);
p.StartInfo.CreateNoWindow = true;
bool started = p.Start();
p.WaitForExit();
```
WaitForExit never returns ...... | [
-0.0768863633275032,
-0.03631714731454849,
0.5568619966506958,
0.08078904449939728,
0.06568136066198349,
0.13556413352489471,
0.38726913928985596,
-0.4991290271282196,
-0.38590994477272034,
-0.5458902716636658,
-0.5091627836227417,
0.34030574560165405,
-0.362140953540802,
0.452795684337615... | |
SqlConnection conn = new SqlConnection(sqlConnectionString);
Server server = new Server(new ServerConnection(conn));
server.ConnectionContext.ExecuteNonQuery(script);
}
}
``` | [
-0.29461920261383057,
-0.01304221898317337,
0.6185300350189209,
0.0418049655854702,
-0.05608662962913513,
-0.13171835243701935,
0.2136051505804062,
0.06402810662984848,
-0.25219422578811646,
-0.6732773184776306,
-0.274650901556015,
0.19450964033603668,
-0.3928907811641693,
0.54871451854705... | |
**Objective was:**
To change pages like **details.aspx?GUID=903901823908129038** to clean ones like **/adrian\_seo**
Achieved:
Now using Response.AddHeader("Location", url);
I am able to remove all uppercase urls. I use the following function:
```
protected void Page_Load(object sender, EventArgs e)
{
string ur... | [
-0.12450957298278809,
-0.09984392672777176,
1.0257023572921753,
-0.0976828932762146,
0.12751899659633636,
0.15453824400901794,
0.4797470271587372,
-0.3321166932582855,
-0.45213788747787476,
-0.48724785447120667,
-0.4958168864250183,
0.4615544080734253,
-0.17859867215156555,
0.0199207589030... | |
coming to /adrian\_seo and how do I show my old pages with new urls.
Do I need to use Global.asax?
Have a look into [ASP.NET routing](http://msdn.microsoft.com/en-us/library/cc668201.aspx). | [
0.1557881087064743,
-0.09233036637306213,
0.5123299360275269,
0.07778526842594147,
0.06084777042269707,
-0.43609100580215454,
0.39835894107818604,
0.373679518699646,
-0.3835146725177765,
-0.6422408819198608,
-0.15942096710205078,
0.04367697983980179,
-0.19146984815597534,
-0.04474845528602... | |
I am trying to implement a "underline\fix while you type spell checker" can anyone point me to some examples.
You don't need to WPF has a built in spell checker.
```
<TextBox Name="x" SpellCheck.IsEnabled="True" Language="en-us"></TextBox>
```
When a word is misspelled in the textbox it will:
* Underlines the mis... | [
-0.17610806226730347,
0.2224128544330597,
0.4238181412220001,
-0.07237513363361359,
-0.013868041336536407,
0.023530369624495506,
0.5508888363838196,
-0.1356462687253952,
0.04840568080544472,
-0.8364483714103699,
-0.01251373440027237,
0.39936134219169617,
-0.3427996337413788,
-0.03064400516... | |
I know it's possible, but I can't seem to figure it out.
I have a mySQL query that has a couple hundred thousand results. I want to be able to send the results, but it seems the response requires content-length header to start downloading.
In phpMyAdmin, if you go to export a database, it starts the download right aw... | [
0.28742411732673645,
0.0005119062261655927,
0.500592827796936,
0.20070523023605347,
-0.2500365972518921,
-0.09799029678106308,
0.43668386340141296,
0.16042964160442352,
-0.31769949197769165,
-0.6349180340766907,
-0.16762825846672058,
0.16232119500637054,
-0.0687408596277237,
0.323327392339... | |
this is prohibited by the rules in section 4.4*. This means it DOESN'T have to be sent if you can't say the size of it.
Just don't send it.
If you want to send parts of data to the browser before all data is available, do you **flush** your output buffer? Maybe that's what is the problem, not lack of a header?
The w... | [
0.2147441953420639,
-0.3278225064277649,
0.24541597068309784,
0.08355411142110825,
-0.2345457375049591,
-0.4359886348247528,
0.07583317160606384,
0.020640183240175247,
-0.4871204197406769,
-0.6654486060142517,
-0.05946715176105499,
0.34442785382270813,
-0.39047616720199585,
-0.017767161130... | |
generate the output for, lets say, 100 or 1000 of them, then flush, and so on.
Also, to tell the client browser to attempt to save a file instead of displaying it in window, you can try using the *Content-disposition: attachment* header as well. See the [specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19... | [
0.30251815915107727,
-0.29679030179977417,
0.3810960650444031,
0.1556224822998047,
0.09474924951791763,
-0.14401425421237946,
-0.17533722519874573,
-0.16652049124240875,
-0.1446414291858673,
-0.7671403288841248,
-0.293022483587265,
0.4479748010635376,
-0.15853826701641083,
-0.0703000351786... | |
I have a javascript call to a C# WebMethod. The same page has another call and it is working. I debugged the javascript code, this is called:
```
function userUpdReq_onOk()
{
...
var clientValidationPassed =Page_ClientValidate();
if( clientValidationPassed )
{
PageMethods.RequestUserUpdate(username, email, sex, zipCo... | [
0.08448786288499832,
0.24021762609481812,
0.7309527397155762,
-0.2246425747871399,
0.03693216294050217,
0.060134157538414,
0.3313227593898773,
-0.14750057458877563,
-0.1995609998703003,
-0.7293453216552734,
0.008097948506474495,
0.18179833889007568,
-0.3992171287536621,
0.33959007263183594... | |
other reason. The error message passed to your OnError method should be able to guide you to the reason for the failure.
To get the error message, you can define the error handler as follows:
```
function userUpdReq_OnError(error){}
```
The error parameter will have a message indicating the reason for the failure. | [
-0.12908993661403656,
-0.019195016473531723,
0.2011309713125229,
0.08813738822937012,
-0.13765299320220947,
-0.11072700470685959,
0.13565407693386078,
0.18421000242233276,
-0.03402294963598251,
-0.48473018407821655,
0.08168662339448929,
0.6896271109580994,
-0.41177839040756226,
0.036854542... | |
I have a Web Service Application Project in Visual Studio 2008. This is supposed to be an ASP.Net 2.0 project and at some point this has been rebuilt using 3.5.
VS has kindly added in project level imports to System.Linq and System.Xml.Linq, but when I have re-targeted the project at 2.0 these project level imports ha... | [
0.3099530339241028,
0.2767394185066223,
0.4245190918445587,
-0.21083533763885498,
-0.44668856263160706,
-0.07846111059188843,
0.26335734128952026,
-0.06903520971536636,
-0.36419928073883057,
-0.7477151155471802,
0.13836997747421265,
0.3977496027946472,
-0.4476739466190338,
0.04818087443709... | |
it fails, even though I only get warnings (no errors reported) such as this:
*Namespace or type specified in the project-level Imports 'System.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported eleme... | [
0.17394383251667023,
0.3185756206512451,
0.11531596630811691,
0.1324499547481537,
0.08724205195903778,
-0.2697508633136749,
0.8768919110298157,
0.05466512218117714,
-0.05635249242186546,
-0.5350440144538879,
-0.08587426692247391,
0.5116206407546997,
-0.26563650369644165,
-0.105875261127948... | |
I want to find all the names that start with numbers, weird chars (.,-#$, etc) and everything else that isn't a letter.
For example, i have 3 names: John, #1 John and 2John. What I want to get is the last 2 names. (and I don't know what weird chars the names can start, so it must be something like ![a-Z])..
I'm using... | [
0.056312233209609985,
0.5749181509017944,
-0.051836032420396805,
0.020240968093276024,
-0.058130357414484024,
0.04955596104264259,
0.3898674249649048,
0.602962076663971,
-0.09291808307170868,
-0.5193153619766235,
-0.19486647844314575,
0.061906322836875916,
0.00013871039845980704,
0.2507302... | |
What is the best database schema to represent an NCAA mens basketball bracket? Here is a link if you aren't familiar: <http://www.cbssports.com/collegebasketball/mayhem/brackets/viewable_men>
I can see several different ways you could model this data, with a single table, many tables, hard-coded columns, somewhat dyna... | [
0.3637674152851105,
-0.07592695951461792,
0.10387906432151794,
0.3955131471157074,
0.005722828209400177,
-0.4170699417591095,
-0.07382156699895859,
-0.0011903649428859353,
-0.23453624546527863,
-0.6802186965942383,
0.7643289566040039,
0.596113383769989,
-0.02970745973289013,
0.108136907219... | |
There are some obvious answers here, and the main goal of this question is to see all of the different ways you could answer it. Which way is best could be subjective to the language you are using or how exactly you are working with it, but try to keep the answers db agnostic, language agnostic and fairly high level. I... | [
0.10344420373439789,
0.2801379859447479,
-0.19819200038909912,
0.334501177072525,
-0.3990679979324341,
-0.031068379059433937,
0.3715343773365021,
-0.07200610637664795,
0.10890590399503708,
-0.443157821893692,
0.04410485178232193,
0.39207929372787476,
-0.3053534924983978,
-0.178795441985130... | |
majority of situations is to do the following:
* **Teams** has *[team-id (PK)]*, *[name]*, *[region-id (FK to **Regions**)]*, *[initial-seed]*. You will have one entry for each team. (The regions table is a trivial code table with only four entries, one for each NCAA region, and is not listed here.)
* **Participants**... | [
-0.5074666738510132,
-0.15467335283756256,
0.3260868787765503,
0.3210609555244446,
0.10421732813119888,
-0.182390034198761,
0.4204072058200836,
0.11293090879917145,
-0.7911420464515686,
-1.0526111125946045,
-0.0981522873044014,
-0.22136671841144562,
0.03657081723213196,
0.29258590936660767... | |
in the Participants table. (Remember, there might be more than two teams if someone dropped out or was disqualified.)
To set up the initial bracket, match the appropriate seeds to each other. As games are played, note which team has *outcome = Winner* for a particular game; this team is matched up against the winner o... | [
-0.33235928416252136,
-0.28798744082450867,
0.11840029060840607,
0.18423515558242798,
0.27612921595573425,
-0.3686397671699524,
-0.10566475987434387,
-0.023105449974536896,
-0.1446320116519928,
-0.7601051926612854,
-0.07222271710634232,
0.09103479981422424,
-0.07853411883115768,
-0.1305930... | |
Is there a way to call method inside a running .NET assembly.
The problem is that I have a .NET application that is run on system startup and puts itself in the system tray. The user can open the application dialog by double-clicking on the tray icon but I want to show the form even when the user start the application... | [
0.20430752635002136,
0.17233806848526,
0.4288230240345001,
-0.07847823202610016,
-0.09480887651443481,
-0.2128160446882248,
0.18508204817771912,
-0.14553754031658173,
-0.3432910442352295,
-0.40100765228271484,
0.10077204555273056,
0.35900259017944336,
-0.22700585424900055,
0.06976492702960... | |
want to know how to call methods from the process handle that I have.
When its the second instance, I check all the running processes and get a pointer to my already running process. I was wondering if there is a way in .NET (thorough reflection or something else) that will use this process handle and return me a point... | [
0.40962424874305725,
0.05880873277783394,
0.34035396575927734,
0.26593145728111267,
-0.03656281158328056,
0.100143201649189,
0.17900937795639038,
0.01716584712266922,
-0.4636918008327484,
-0.7520487308502197,
0.1863972693681717,
0.40678927302360535,
-0.03759760037064552,
0.2242631912231445... | |
running application with some parameters.
This is not really the solution of the question (calling a specific method) but it could solve your problem of opening the form.
The solution is too complex to copy it here so check it out :
<http://www.codeproject.com/KB/cs/SingleInstanceAppMutex.aspx>
What does this code do... | [
0.29811856150627136,
-0.20732614398002625,
0.5341504812240601,
-0.05233437940478325,
-0.09650419652462006,
-0.12249649316072464,
0.5501394867897034,
-0.14148730039596558,
-0.48153913021087646,
-0.7123868465423584,
-0.07867789268493652,
0.41401466727256775,
-0.72720867395401,
0.256894022226... | |
from there.
You may even jump to the end of the page if you need to pass parameters between instances (I really like the VB solution... It's sad that it is not designed for any language. But you are still able to use it by referencing the VisualBasic namespace in your C# app.)
Hope this helps. | [
0.663285493850708,
-0.0791868343949318,
0.15971633791923523,
0.2517656087875366,
-0.24418224394321442,
-0.16503563523292542,
0.3170517385005951,
0.44577309489250183,
-0.41143250465393066,
-0.5796631574630737,
0.12302712351083755,
0.6081427335739136,
-0.0591861866414547,
0.07966789603233337... | |
I'm using Wix v3.0 (which boils down to an MSI installer) and I'm trying to author a condition to ensure that Excel 2003 is installed. What is the best (most robust) way to detect the presence of Excel 2003 on a machine?
I've seen lots of different suggestions, but no definitive or authoritative answer.
I found a file... | [
0.037702929228544235,
0.4897041618824005,
0.34805071353912354,
-0.09499888122081757,
0.010524308308959007,
-0.30851423740386963,
0.2102457582950592,
-0.05086210370063782,
0.18496739864349365,
-0.6894204020500183,
-0.01831866428256035,
0.6972422003746033,
-0.30430689454078674,
0.01654158160... | |
<Property Id="EXCEL2003INSTALLED">
<!-- This is the Component Id of Global_Excel_Core -->
<ComponentSearch Id="DetectExcel2003" Guid="{A2B280D4-20FB-4720-99F7-40C09FBCE10A}" Type="file"/>
</Property>
<Condition Message="This application requires Excel 2003 to be installed."><. There are several other scripts that do this, for example a [jquery plugin](http://... | [
0.4489442706108093,
0.05918937921524048,
0.5920194983482361,
-0.1442924439907074,
-0.058709170669317245,
-0.22152024507522583,
-0.2395067811012268,
-0.0908094197511673,
-0.2629881203174591,
-0.7564283609390259,
0.06196153163909912,
0.38764405250549316,
0.1283261924982071,
-0.07796013355255... | |
Background: I developed a web app in ASP.Net 3.5 in C#. It runs great but now a few users have reported that they recieve an error sometimes. I have tried to duplicate the error but it has been hard. One time though when I let the app sit I came back later and tried to move it along and it errored out. I would think th... | [
0.5894420146942139,
-0.1178484633564949,
-0.04803643003106117,
0.062166597694158554,
-0.036228638142347336,
0.06730228662490845,
0.20810799300670624,
0.664749801158905,
-0.5376120209693909,
-0.5944810509681702,
0.26973482966423035,
0.38716548681259155,
-0.056560907512903214,
-0.18852373957... | |
ideas!
John
---
My event log has the following errors:
Event code: 4005
Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired.
Event time: 14/03/2008 13:19:26
Event time (UTC): 14/03/2008 13:19:26
Event ID: d9f0333c2eed46e0b0207da69d2ea70e
Event sequence: 154 ... | [
-0.3819011449813843,
0.10294133424758911,
0.51646488904953,
0.27168938517570496,
0.5106226801872253,
0.09611339867115021,
0.1384160965681076,
-0.32438820600509644,
-0.6542966961860657,
-0.48464739322662354,
-0.13897502422332764,
0.23445917665958405,
-0.1277955025434494,
0.22310474514961243... | |
ID: 6912
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
```
---
Here is the latest error:
Event code: 4009
Event message: Viewstate verification failed. Reason: The viewstate supplied failed integrity check.
Event time: 3/15/2009 10:26:27 PM
Event time (UTC): 3/16/2009 2:26:27 AM
Event I... | [
-0.531516969203949,
0.32762789726257324,
0.5612443089485168,
-0.15037116408348083,
0.0813385620713234,
0.22830380499362946,
0.33087584376335144,
-0.26446086168289185,
-0.4029839038848877,
-0.4109085500240326,
-0.24308571219444275,
0.6502165794372559,
0.1608506143093109,
0.29238343238830566... | |
path: /application.aspx
User host address: 74.160.64.222
User:
Is authenticated: False
Authentication Type:
Thread account name: 169349-WEB2\ucpga
ViewStateException information:
Exception message: Invalid viewstate.
Client IP: 74.160.64.222
Port: 1251
User-Agent: Mozilla/4.0 (compatible; MSIE 7... | [
-0.17198485136032104,
0.09318661689758301,
0.7082237005233765,
0.08959806710481644,
0.14430592954158783,
0.01658366434276104,
0.6270802021026611,
-0.1409204602241516,
-0.38199225068092346,
-0.8568905591964722,
-0.2297789752483368,
0.3648732304573059,
-0.5625509023666382,
0.3829118609428406... | |
following link for more information:
> [How To: Configure MachineKey in ASP.NET 2.0 (MSDN)](http://msdn.microsoft.com/en-us/library/ms998288.aspx) | [
-0.4295074939727783,
-0.01986927166581154,
0.1996297985315323,
0.1674100160598755,
0.09364669770002365,
-0.025165120139718056,
0.35103994607925415,
0.039816901087760925,
-0.45188847184181213,
-0.9203321933746338,
-0.5747170448303223,
0.36202964186668396,
-0.15951338410377502,
0.03853533044... | |
I have a page:
```
<%@ Page Inherits="System.Web.Mvc.View<DTOSearchResults>" %>
```
And on it, the following:
```
<% Html.RenderPartial("TaskList", Model.Tasks); %>
```
Here is the DTO object:
```
public class DTOSearchResults
{
public string SearchTerm { get; set; }
public IEnumerable<Task> Tasks { get... | [
-0.09056008607149124,
0.05500885471701622,
0.5074627995491028,
-0.14475826919078827,
-0.031725071370601654,
0.05248468741774559,
0.28357452154159546,
-0.35692447423934937,
-0.028412997722625732,
-0.9197561144828796,
-0.19334624707698822,
0.2907743752002716,
-0.302918404340744,
0.2096747159... | |
to be explicit, but I still get the same issue!
```
<% Html.RenderPartial("TaskList", (object)Model.Tasks, null); %>
```
I know I can work around this by checking for null, or not even passing null, but that's not the point. Why is this happening?
Andrew I think the problem you are getting is a result of the RenderP... | [
-0.10180873423814774,
0.1322069615125656,
0.24874503910541534,
-0.10503304749727249,
-0.19846628606319427,
-0.022952431812882423,
0.42130082845687866,
0.0285751111805439,
-0.2613964378833771,
-0.5522024631500244,
0.033189788460731506,
0.6515290141105652,
-0.5127850770950317,
0.171882912516... | |
I am in the process of converting several queries which were hard-coded into the application and built on the fly to parameterized queries. I'm having trouble with one particular query, which has an `in` clause:
```
UPDATE TABLE_1 SET STATUS = 4 WHERE ID IN (1, 14, 145, 43);
```
The first parameter is easy, as it's ... | [
-0.032654061913490295,
0.2982924282550812,
0.6676376461982727,
-0.06742879003286362,
0.11088144779205322,
-0.024295860901474953,
0.3322087526321411,
-0.3404749929904938,
-0.23410193622112274,
-0.6995832324028015,
0.04843645915389061,
0.347486674785614,
-0.33581098914146423,
0.1676630526781... | |
single parameter? Alternatively, how would you go about setting up this query so that you don't have to completely build it each and every time you call it, and can prevent SQL injection attacks?
You could build up the parametrised query "on the fly" based on the (presumably) variable number of parameters, and iterate ... | [
0.22915129363536835,
-0.12687085568904877,
0.24566981196403503,
-0.015929678454995155,
-0.15259641408920288,
-0.033581849187612534,
0.0695812925696373,
-0.38427817821502686,
-0.39051181077957153,
-0.45022261142730713,
-0.04544619098305702,
0.4021635949611664,
-0.6524946093559265,
0.2812321... | |
int i = 1; i++; i < foo.Count )
{ // Bit naive
query.Append( ", ?" );
}
query.Append( " );" );
MySqlCommand m = new MySqlCommand(query.ToString());
for( int i = 1; i++; i < foo.Count )
{
m.Parameters.Add(new MySqlParameter(...));
}
``` | [
-0.027748430147767067,
-0.2373405545949936,
0.7517091631889343,
-0.163321390748024,
0.14436277747154236,
0.3549266457557678,
0.66058349609375,
-0.7790774703025818,
-0.029975183308124542,
-0.31424468755722046,
-0.3219486176967621,
0.8645782470703125,
-0.4854177236557007,
0.27299007773399353... | |
In our legacy code, as well as our modern code, we use macros to perform nifty solutions like code generations, etc. And we make use of both the `#` and `##` operators.
I am curious how other developers use macros to do cool things, if they use them at all.
In C, it's common to define macros that do some stuff gettin... | [
0.24042928218841553,
0.3617909848690033,
0.0018397440435364842,
0.026196258142590523,
0.10689865052700043,
-0.16421833634376526,
-0.02738269232213497,
0.13472749292850494,
-0.18036888539791107,
-0.6037021279335022,
-0.18347987532615662,
0.6595989465713501,
-0.22508004307746887,
-0.12849105... | |
the macro
double (sin)(double arg) {
return sin(arg); // uses the macro
}
int main() {
// uses the macro
printf("%f\n", sin(3.14));
// uses the function
double (*x)(double) = &sin;
// uses the function
printf("%f\n", (sin)(3.14));
}
``` | [
0.049441251903772354,
0.14113770425319672,
0.13294842839241028,
-0.7962808609008789,
0.011540811508893967,
0.27911141514778137,
0.38249969482421875,
-0.25600335001945496,
0.08564325422048569,
-0.34227362275123596,
-0.2859467566013336,
0.7331103682518005,
-0.8125523328781128,
-0.19288162887... | |
I'm new to mocks and am deciding on a mock framework. The [Moq home](http://code.google.com/p/moq/) quotes
> Currently, it's the only mocking
> library that goes against the
> generalized and somewhat unintuitive
> (especially for novices) Record/Reply
> approach from all other frameworks.
Can anyone explain simp... | [
0.5953763127326965,
0.45752400159835815,
0.03849584236741066,
0.02342909760773182,
-0.3375749886035919,
0.21538391709327698,
0.5064784288406372,
-0.2834714949131012,
-0.11934025585651398,
-0.5015624165534973,
0.30740323662757874,
0.582301914691925,
0.05072910338640213,
0.0444888100028038,
... | |
bit more concrete
```
var repo = new MockRepository();
var dependency = repo.DynamicMock<IDependency>();
With.Mocks(repo).Expecting(delegate {
Expect.Call(dependency.AMethod(1)).Return(result);
}).Verify(delegate {
var sut = new Sut(wrappee);
sut.DoStuffThatCallsAM... | [
0.29873141646385193,
-0.40448400378227234,
0.4001525938510895,
0.07363378256559372,
-0.051249612122774124,
0.28737789392471313,
0.731216311454773,
-0.633838415145874,
-0.18843543529510498,
-0.1844264268875122,
-0.3351198434829712,
0.6401793360710144,
-0.04659164324402809,
0.192090764641761... | |
Moq variant of this code would be
```
var dependency = new Mock<IDependency>();
dependency.Expect(dep => dep.AMethod(1)).Returns(result);
var sut = new Sut(wrappee.Object);
sut.DoStuffThatCallsAMethod();
Assert.IsTrue(sut.ResultState);
```
Which as you can see is much nicer to read. I used to use RhinoMock... | [
-0.05649681016802788,
-0.31132495403289795,
0.5605507493019104,
-0.16229036450386047,
-0.12503837049007416,
0.13334250450134277,
0.5019843578338623,
-0.3654279410839081,
-0.11320312321186066,
-0.7158960700035095,
-0.2814549207687378,
0.7691160440444946,
-0.3783114552497864,
-0.214254856109... | |
I have class that I believe should not be a singleton or static class. It has state, albeit state that *could* be shared by consumers. I like to stay away from singletons when there is shared state, but the argument I'm hearing is that I will reap performance benefits from only ever having 1 instance of the object exis... | [
0.3321070075035095,
0.21628735959529877,
0.009555122815072536,
0.25601503252983093,
-0.2204522043466568,
0.1036917045712471,
0.22722603380680084,
0.19776590168476105,
-0.013411331921815872,
-0.7459367513656616,
0.12639503180980682,
0.4008987843990326,
0.2503196597099304,
0.5276925563812256... | |
- I'm using .NET.
Thanks!
No. The performance argument does NOT hold any merit.
You should benchmark and confirm/identify a performance problem, before assuming you have one. 9 times out of 10 it won't be where you thought.
If a Singleton is required, it simply is. | [
0.31677910685539246,
0.03161754831671715,
0.19792334735393524,
0.3207319676876068,
-0.08049581944942474,
-0.05419226735830307,
0.42630910873413086,
0.11260193586349487,
-0.20340938866138458,
-0.7174838185310364,
-0.08361882716417313,
0.660165548324585,
-0.020830873399972916,
0.134750947356... | |
Is there any site/analysis about what Java version most people are using on WWW ? It seems this data is not available on webserver logs (vs. Flash versions)
Can we safely set e.g. Java 1.4.2 as minimum requirement for our applet, or are there still many users using Java 1.1 (MS one) or Java 1.2-1.3 ?
It's still a bit... | [
0.42982688546180725,
0.20463243126869202,
0.11762271076440811,
-0.2262563705444336,
-0.14958244562149048,
0.09343253821134567,
0.5180263519287109,
-0.020208703354001045,
-0.48187509179115295,
-0.8495489954948425,
-0.08671462535858154,
0.44462916254997253,
0.011272456496953964,
0.1864755600... | |
6% had 1.4,
* 16% had 1.5
* 50% had 1.6
<http://weblogs.java.net/blog/editors/archives/2009/03/bedbugs_and_bal.html> is an article that talks about the chart. | [
0.19342006742954254,
-0.14100311696529388,
0.5591394901275635,
-0.03384118154644966,
-0.14592482149600983,
0.2902893126010895,
0.5214089155197144,
0.05661096051335335,
-0.4483422338962555,
-0.4896678626537323,
0.048618413507938385,
-0.35704827308654785,
-0.14808911085128784,
0.264872580766... | |
I have a bunch of rows in a table with columns `a`, `b`, `c`. I'd like to be able to SELECT all rows where say a = 1, and reinsert them with a = 2. Essentially keeping all the rows where column a exist as is, and having a new batch of rows having as a = 2. What's the best query to establish such a multi-INSERT query? T... | [
0.0862790197134018,
0.5403463244438171,
0.3141186237335205,
-0.13040469586849213,
0.18567273020744324,
0.3771914839744568,
-0.2243625670671463,
-0.23507598042488098,
-0.39827167987823486,
-0.7680763006210327,
0.08000694215297699,
0.33818596601486206,
-0.37434643507003784,
0.327379584312438... | |
We are experiencing random intermittent slow-downs in our ASP.NET application. Most pages take between 100-500ms to render (depending on which modules are used on the page). Occasionally however - perhaps 1 in 100 requests, these figures are more like 5000-10000ms. This is not a database related issue - I have checked ... | [
0.12893162667751312,
-0.08488547056913376,
0.43924611806869507,
0.21717771887779236,
-0.13254007697105408,
0.07481101155281067,
0.48478907346725464,
0.10814104229211807,
-0.4914308190345764,
-0.8783100247383118,
0.011656972579658031,
0.37326085567474365,
0.07024942338466644,
-0.25034683942... | |
possibly be GC? Any ideas? The w3wp application usually uses a steady 800MB-1GB of memory at all times.
Thanks
Marcus
The best thing I can tell you to do is to attach a profiler (search this site for a good .NET profiler, I personally use [ANTS](http://www.red-gate.com/Products/ants_profiler/index.htm)) to identify bo... | [
0.23647010326385498,
0.030464693903923035,
-0.002139618620276451,
0.2298087328672409,
-0.04712541401386261,
-0.1386367827653885,
0.1586311310529709,
0.13843290507793427,
-0.28798285126686096,
-0.6091390252113342,
0.17893268167972565,
0.4901908040046692,
-0.1910644769668579,
0.0471220575273... | |
**Update 3:** the restrict access, using the security tab works now. (that's manually)
now looking to do it programatically (using Visual C#) and also how to access a file using administrator account in a simple user account.
hint - I noticed this feature in Windows, right click and use 'Execute as', enter the administ... | [
0.05571454390883446,
-0.15049569308757782,
0.6964418888092041,
-0.11107238382101059,
-0.07453610002994537,
-0.2677003741264343,
0.3756844699382782,
-0.037385374307632446,
-0.315557062625885,
-0.746370792388916,
-0.38815319538116455,
0.69130939245224,
-0.1342795342206955,
-0.005659624468535... | |
On the View tab, under Advanced
> settings, clear Use simple file
> sharing [Recommended].
**Update 1:** I found the following [article](http://technet.microsoft.com/en-us/library/bb456977.aspx), which suggests how to give permissions to files, however I don't find the security tab when I click properties, do you ha... | [
0.4719872772693634,
0.007517623249441385,
0.24558307230472565,
0.1502169519662857,
0.09788937866687775,
-0.43912258744239807,
0.46461454033851624,
0.12785682082176208,
-0.39521580934524536,
-0.6492046117782593,
-0.39069998264312744,
0.703009307384491,
-0.10825777798891068,
0.21611821651458... | |
about authentication, but some Windows files are inaccessible like 'ntuser.dat.LOG' in the user profile. When I try to open this file it doesn't open.
I want something like that, for this file it seems because Windows is using it. Right.
But what about if my program shutdown, I don't want the file to be changed in thi... | [
0.49532827734947205,
0.2366456687450409,
0.1713586002588272,
0.1600678712129593,
0.049055326730012894,
-0.3541216552257538,
0.29755309224128723,
0.0365743488073349,
-0.2459060549736023,
-0.24502182006835938,
0.2311428189277649,
0.4246048927307129,
-0.08396472036838531,
0.13806188106536865,... | |
is this? Are you an administrator of the computer?
You should be able to take ownership of a file, and then set the permissions so that you're the only one that can access that file. On Windows XP (Vista is similar) Right-click on the file and view `Properties`. Select the `Security` tab and then you can set specific ... | [
0.2944633662700653,
0.007554727140814066,
0.4187977910041809,
0.10618852078914642,
0.061208561062812805,
-0.6054899096488953,
0.18224260210990906,
-0.040891051292419434,
-0.2728983461856842,
-0.5430819988250732,
-0.3548441529273987,
0.6848176717758179,
-0.20742405951023102,
0.2146750390529... | |
working in a workgroup, the Security tab is hidden by default. This behavior occurs because in Windows XP Home Edition and Windows XP Professional, guests are forced to log on to a workgroup.
So if you want to pursue this, you can boot your computer into Safe mode and then you'll see the `Security` tab.
You can also ... | [
0.12925194203853607,
0.013118498027324677,
0.14932236075401306,
-0.026221565902233124,
0.3188113570213318,
-0.7193387150764465,
0.500916600227356,
-0.021742021664977074,
-0.5507610440254211,
-0.2581784725189209,
-0.4288840889930725,
0.6097047924995422,
-0.08776545524597168,
-0.090553604066... | |
Twice this week, I've read people write that an event (.net) was "thrown". I've always thought that the verb to use with events is either "fire" or "raise". I thought that "thrown" was used for exceptions, but not events ("raise" can be used for either).
Does anyone else find it confusing for events to be "thrown"?
Th... | [
0.23180244863033295,
0.08294598013162613,
-0.18141812086105347,
-0.343858927488327,
-0.8761953115463257,
-0.34349191188812256,
0.4665222764015198,
-0.20590859651565552,
-0.7293521165847778,
-0.30336523056030273,
0.004942780360579491,
0.14974232017993927,
0.027454296126961708,
0.06238010153... | |
Let's say that I'm new to JBoss Seam, is there a way to get my skills up to speed? Are there any good tutorials?
You might want to pick up a book called '[Seam In Action](https://rads.stackoverflow.com/amzn/click/com/1933988401)' by Dan Allen. It walks you through all the frameworks that Jboss Seam glues together, not ... | [
0.34212201833724976,
-0.34187039732933044,
-0.43223825097084045,
0.08158720284700394,
-0.18910454213619232,
-0.07613053917884827,
0.19069167971611023,
0.13121777772903442,
-0.4295462667942047,
-0.8192882537841797,
-0.1853606104850769,
0.5454638004302979,
0.024715177714824677,
-0.5172747969... | |
for the book. | [
-0.19223684072494507,
-0.03262099251151085,
0.1287866085767746,
0.26890885829925537,
-0.058967795222997665,
0.01764945313334465,
0.20959508419036865,
0.24796320497989655,
0.065055251121521,
-0.07573370635509491,
0.12256727367639542,
0.2048661857843399,
0.215457484126091,
0.1087066754698753... | |
I'm new to interfaces and abstract classes. I want to create a couple of interfaces to define core methods and variables for the objects for a shopping cart system. Then I want to create abstract classes which implement the core functions. The idea is that they can be used by other classes in slightly different ways fo... | [
0.13823078572750092,
-0.17914171516895294,
0.6012703776359558,
0.6109846234321594,
0.012476461939513683,
0.2818755507469177,
-0.45414650440216064,
0.21130411326885223,
-0.0014435250777751207,
-0.7355523109436035,
0.261262446641922,
0.6056381464004517,
-0.23168744146823883,
0.29371535778045... | |
my abstract Cart class (again, only showing relevant lines) which implements ICart:
```
public abstract class Cart : ICart
{
private List<CartItem> _cartItems = new List<CartItem>();
public List<CartItem> CartItems
{
get
{
return _cartItems;
}
}
}
```
And my Car... | [
-0.4856969118118286,
0.15622565150260925,
0.5394424200057983,
0.3235468864440918,
-0.13815590739250183,
0.16217964887619019,
-0.19553115963935852,
0.15166537463665009,
-0.05373559519648552,
-0.6146022081375122,
-0.138864204287529,
0.6532930135726929,
-0.4805809557437897,
0.1640444695949554... | |
get an error saying: 'Cart' does not implement interface member 'CartItems'. 'Cart.CartItems' cannot implement 'ICart.CartItems' because it does not have the matching return type of System.Collections.Generic.List<ICartItem>.
I thought that the idea here is that the interface can be implemented by a number of classes ... | [
0.08013902604579926,
-0.06362222135066986,
0.10315819084644318,
0.3950025141239166,
-0.26127371191978455,
-0.17316171526908875,
0.014443912543356419,
0.011648356914520264,
-0.11899960041046143,
-0.5134831666946411,
0.006975837983191013,
0.5630340576171875,
-0.578938364982605,
0.30387714505... | |
...
List<T> CartItems { get; set; }
}
public abstract class Cart : ICart<CartItem>
{
// ...
public List<CartItem> CartItems { get; set; }
}
``` | [
-0.23133447766304016,
-0.05775899067521095,
0.5481647253036499,
0.6702466011047363,
0.07987555116415024,
0.04646952822804451,
-0.37648412585258484,
0.32994383573532104,
-0.2818763256072998,
-0.3326036036014557,
-0.46132367849349976,
0.6258773803710938,
-0.3647128641605377,
0.31982478499412... | |
```
int main()
{
char myString = NULL;
realloc(&myString, 5);
strncpy((char *)&myString, "test", 5);
}
```
Seems to work fine but I'm still slightly confused about stack vs heap. Is this allowed? If it is allowed, does `myString` need to be freed manually or will it be released when it goes out of scope?
--... | [
0.01630656234920025,
-0.02921655960381031,
0.4734286963939667,
-0.06830678880214691,
0.2568210959434509,
-0.012505126185715199,
0.48987534642219543,
-0.03472394123673439,
-0.12714385986328125,
-0.44179022312164307,
-0.19113917648792267,
0.7195309996604919,
-0.14213387668132782,
0.109264239... | |
doing works only by accident, and will eventually crash horribly
```
char *myString = malloc(x);
myString = realloc(myString,y);
free(myString)
```
You are better off using new and delete, and even better off using std::string, however. | [
0.11216648668050766,
0.19916288554668427,
0.3909863531589508,
-0.056050751358270645,
0.03611502796411514,
-0.07538194954395294,
0.4477262496948242,
-0.1401953101158142,
-0.08003511279821396,
-0.30279770493507385,
-0.3547096252441406,
0.45411330461502075,
-0.184872567653656,
0.1541151553392... | |
I personally find that makes the life of a developer who has recently joined the project a very sad one. Without almost perfect understanding of the framework mechanisms it makes developing and debugging like a torture, since whenever I get an error or an unexpected behavior I have not a slightest idea where to look. I... | [
0.38072213530540466,
0.2500382959842682,
0.1329953521490097,
0.11799807101488113,
0.11575011909008026,
-0.32744649052619934,
0.4585626721382141,
0.057899437844753265,
-0.15308311581611633,
-0.3913709223270416,
-0.09756306558847427,
0.5064051747322083,
0.2522667348384857,
0.1594889611005783... | |
customers have to check it.
I think that putting queries in stored procedures or at least in one place in code could help.
Is this dynamic approach to queries a standard practice in business applications? I'm personally quite discomfortable with it.
If its a nightmare to debug, then you already have your answer: its ... | [
0.3428155481815338,
0.051057759672403336,
0.06084008142352104,
0.25772300362586975,
0.0043067606166005135,
-0.3090084493160248,
0.3684161901473999,
0.41522789001464844,
-0.3302592933177948,
-0.20378363132476807,
0.023801930248737335,
0.8059921860694885,
-0.14347100257873535,
0.132365465164... | |
access transparent to the programmer. For example, when you request an object like `User.GetByID(12)`, the ORM will dynamically construct the SQL, execute it, map the fields to your object, and return it. As a programmer, a huge amount of your time is freed up because you don't need to write SQL queries anymore, you ca... | [
0.054850514978170395,
0.07798482477664948,
0.408655047416687,
0.42063358426094055,
-0.024014506489038467,
-0.025641880929470062,
0.10154083371162415,
0.1895652860403061,
-0.4707610011100769,
-0.5907780528068542,
-0.14693930745124817,
0.47538337111473083,
-0.11983812600374222,
0.33066850900... | |
dynamically constructed SQL is well-abstracted, then you can swap out databases without changing your data access logic. NHibernate, for example, generates correct SQL based on whatever database vendor is listed in your config file, and it simply just works. **You can, in principle, use the same data access logic with ... | [
0.09552960097789764,
-0.3269890248775482,
0.10010413080453873,
0.33891069889068604,
-0.20907750725746155,
0.13002076745033264,
-0.05805876478552818,
0.0008145327446982265,
-0.2898251414299011,
-0.4142909049987793,
0.09484658390283585,
0.5392286777496338,
-0.5015451908111572,
0.116866476833... | |
functions (i.e. a function where you pass a tablename and some params). ORMs already provide this abstraction for you, so changes to your database schema do not require changes to your application code (unless you want to add that new field to your business object, of course). **You can change your database schema (add... | [
0.14016829431056976,
-0.006093090400099754,
0.6087011098861694,
0.33966195583343506,
-0.060700733214616776,
0.01558597106486559,
0.011202679015696049,
-0.140670046210289,
-0.5022594928741455,
-0.4125134348869324,
-0.19277168810367584,
0.5477097034454346,
-0.34799671173095703,
-0.0091091310... | |
is built up programmatically, its always in source control.
* There are lots of myths about the advantages of stored procedures over dynamic SQL:
+ "Dynamic SQL is prone to SQL injection, stored procedures are not" - simply not true. Dynamic SQL is trivial to parameterize, and in fact parameterized dynamic SQL is eas... | [
0.18059730529785156,
0.26808884739875793,
0.019238175824284554,
0.13978531956672668,
-0.1258912831544876,
-0.1832982897758484,
0.5022147297859192,
-0.1843879520893097,
-0.05141010135412216,
-0.14327934384346008,
-0.07448511570692062,
0.6356874704360962,
-0.5475171208381653,
0.0244030375033... | |
so they run faster. SQL Server can't cache the execution plan of dynamic SQL" - at least with SQL Server, this is absolutely wrong. Since SQL Server 7.0, "[a stored procedure is compiled at execution time, like any other Transact-SQL statement. SQL Server 2000 and SQL Server 7.0 retain execution plans for all SQL state... | [
-0.08958308398723602,
-0.22305385768413544,
0.4320231080055237,
0.025306200608611107,
0.07414428144693375,
-0.031184135004878044,
0.23397299647331238,
0.004292528610676527,
-0.7088243365287781,
-0.47673922777175903,
-0.05640551820397377,
0.7650458216667175,
-0.4764689803123474,
0.055637970... | |
se*, but there are lots of warning signs which indicate when you're doing it wrong:
* You should *never* see regex to dissect an SQL statement.
* You should *never* pass chunks of SQL to your data access layer. For example, a method with the signature `User GetUser(string whereclause)` is very fragile. If your databas... | [
0.3482259511947632,
0.20777742564678192,
0.14294785261154175,
0.03018028475344181,
-0.09562009572982788,
-0.5239216089248657,
0.5905193090438843,
0.014542085118591785,
-0.08599838614463806,
-0.7287852764129639,
-0.3227638304233551,
0.3110523819923401,
-0.2719407379627228,
0.385771781206131... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.