text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
and joins used. Very hard to describe it here.
I can recommend a good book on the subject, particularly Chapter 9.
[http://www.amazon.com/Professional-Server-Performance-Tuning-Programmer/dp/0470176393](https://rads.stackoverflow.com/amzn/click/com/0470176393)
I would discourage you from using the automated Index T... | [
0.3041839003562927,
0.09103210270404816,
0.4218725264072418,
0.10965067148208618,
-0.035506535321474075,
-0.24880413711071014,
0.2128458172082901,
-0.22260698676109314,
-0.41099289059638977,
-0.4554625451564789,
0.12568902969360352,
0.5679178237915039,
-0.46884119510650635,
0.1060156375169... | |
on your database overall when you look at all queries against that table. | [
0.35438257455825806,
0.20675204694271088,
0.2040151208639145,
0.1287052035331726,
-0.16358113288879395,
-0.12195099890232086,
-0.019374586641788483,
0.47631072998046875,
-0.2908458709716797,
-0.7873719334602356,
0.4451228678226471,
0.5790228247642517,
0.23638571798801422,
0.206045657396316... | |
I have installed the acts\_as\_versioned plugin from github.com in my rails application, and there was a block of code that I don't fully understand, I was hoping someone could clear this up for me
```
class_eval <<-CLASS_METHODS
def a_bunch_of_stuff
....
end
CLASS_METHODS
```
I get that the methods inside th... | [
0.170802503824234,
-0.002169694285839796,
0.31417739391326904,
-0.009642309509217739,
-0.20486849546432495,
0.09320683777332306,
0.40655750036239624,
-0.13003186881542206,
-0.6247867941856384,
-0.596846878528595,
-0.10075049847364426,
0.10056508332490921,
-0.4471763074398041,
0.28885725140... | |
lib/acts\_as\_versioned.rb. If someone would give me the lowdown here, I would be much-obliged.
thx
-C
It's a heredoc. <http://en.wikipedia.org/wiki/Heredoc#Ruby>
The matched CLASS\_METHODS tokens are essentially starting and ending quotes. If you use <<- instead of <<, the ending token can be indented with whitespa... | [
0.3001159727573395,
0.21128910779953003,
0.22255997359752655,
-0.2741412818431854,
-0.260202020406723,
-0.00025359258870594203,
0.33608683943748474,
-0.5407319068908691,
-0.015738246962428093,
-0.5471974611282349,
-0.11405868083238602,
0.41906973719596863,
-0.5336737632751465,
0.0918013900... | |
We are using NHibernate, and one of the common patterns we have for storing enum-like information is to define separate tables for the enum, and just make a reference to the ID in the main entity/table that uses the enum. A simple example:
```
Message
-------
ID (bigint PK)
MessageTypeID (bigint FK)
Body (varchar)
Me... | [
-0.002964189974591136,
-0.06816084682941437,
0.4428394138813019,
0.158735454082489,
-0.28746896982192993,
-0.13363109529018402,
0.11561813950538635,
-0.14096693694591522,
-0.2109849601984024,
-0.6332050561904907,
0.10917213559150696,
0.3832598030567169,
-0.3757639229297638,
-0.014207662083... | |
is that you have to do a join every time you fetch a Message. Is there a breaking point where you would choose one over the other?
Using enums implies to do not use another table as you are doing right now. It's also faster as you said and so much simpler.
In both cases you can add more options, but the question is: i... | [
0.26693400740623474,
-0.2693227529525757,
0.29580074548721313,
0.20410841703414917,
-0.15382197499275208,
-0.051887184381484985,
0.06246483698487282,
-0.3585617244243622,
-0.5974460244178772,
-0.8112348318099976,
0.18161584436893463,
0.30312487483024597,
-0.3405647873878479,
0.040879569947... | |
recompile (maybe because you need to include the SMS implementation), it's not worth it to have a separate table, and you should use enums
On the other side, if either your entity lacks of logic (such a Countries, or States table), or your application can plug in a new message type without recompile you should use ano... | [
-0.2149505466222763,
-0.40687626600265503,
0.4942903220653534,
0.24371206760406494,
0.04259943589568138,
-0.04337518289685249,
0.3744042217731476,
-0.28893497586250305,
-0.32997027039527893,
-0.5938100218772888,
-0.26284468173980713,
0.6308056116104126,
-0.5925227999687195,
-0.229649171233... | |
I've figured out how to use the NSBezierPath class to draw shapes in the drawRect function of my custom view class, however I can't seem to figure out how to draw text. The following code is what I have so far for drawing the text (located in the drawRect function):
```
NSText *text = [NSText new];
[text setTextColor:... | [
0.1011284813284874,
0.04256216064095497,
0.6076387763023376,
-0.3141426742076874,
-0.2681775689125061,
0.2133239060640335,
0.06280483305454254,
-0.047413550317287445,
-0.13626590371131897,
-1.1190146207809448,
0.18148277699947357,
0.5670580267906189,
-0.28673556447029114,
-0.22167637944221... | |
are using the convenience method, so we don't need to autorelease the object
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont fontWithName:@"Helvetica" size:26], NSFontAttributeName,[NSColor blackColor], NSForegroundColorAttributeName, nil];
NSAttributedString * currentText=[[NSAttributedS... | [
-0.05642743781208992,
-0.16941606998443604,
0.7544264793395996,
-0.02912568859755993,
0.1026136726140976,
0.18762508034706116,
0.15928982198238373,
-0.14955289661884308,
-0.17627552151679993,
-0.6936208009719849,
-0.31385737657546997,
0.5609331727027893,
-0.30057212710380554,
0.06777533143... | |
I have a c# windows form app in which we did a rapid prototype for the client. The extent of my c# experience has been with ASP.NET/C# so its a bit different when it comes to the actual structure of the software. Time is a factor in this project since it is a school project and we have a little under 2 months to be don... | [
0.37182536721229553,
0.23626653850078583,
0.09455348551273346,
0.21713896095752716,
-0.0597151480615139,
-0.19781114161014557,
0.3084377348423004,
0.30377548933029175,
-0.05372994393110275,
-0.8279537558555603,
0.07143151760101318,
0.34135064482688904,
0.07873901724815369,
-0.0154982823878... | |
the program will be in classes, should we just split the windows form up into a bunch of tiny windows forms with one main driver so to speak? or just leave it as one large form and try to have as little code as possible in the main win form?
**What are your suggestions on the design of a c# database driven windows for... | [
0.4502100646495819,
-0.006506312172859907,
0.1847929209470749,
0.4287480413913727,
-0.08462495356798172,
-0.11068029701709747,
0.05882766470313072,
0.1352674961090088,
0.012715279124677181,
-0.75816410779953,
-0.023035584017634392,
0.6332669854164124,
-0.06637208163738251,
-0.1962135136127... | |
for database driven apps because it reminds them of Microsoft Access. I also like the idea of breaking everything into classes. The rule of thumb that I use for deciding weather or not to make a class is "Will I ever in my programing career need to do X again?". In this case X is what you would put in that class (e.g. ... | [
0.5629143714904785,
0.04693390429019928,
0.044966138899326324,
0.2427564114332199,
0.10733460634946823,
-0.35351017117500305,
0.5723922252655029,
0.5447778105735779,
-0.2499837577342987,
-0.6120787262916565,
-0.04976314306259155,
0.23190636932849884,
0.015732374042272568,
-0.02246740087866... | |
I am building new site FF and IE compliant...what is best way to have sentences wrap to fill container in firefox?
This works in IE without any problem.
Currently I am using the following doctype
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`... | [
0.4170210063457489,
0.16242863237857819,
0.7255245447158813,
-0.27647536993026733,
-0.45010676980018616,
-0.08219471573829651,
0.2111988514661789,
-0.1591649204492569,
-0.42413291335105896,
-1.0291155576705933,
-0.3414866030216217,
0.4866618514060974,
-0.10654211044311523,
0.01410869322717... | |
</div> </td></tr></table>
</body>
</html>
```
Renders fine in FF/konq. Sounds like your CSS is getting overridden somewhere. | [
0.20740126073360443,
0.320376992225647,
0.05264728516340256,
-0.1778876781463623,
-0.2790399491786957,
0.0062020765617489815,
0.5769575834274292,
0.3013579547405243,
-0.10358922183513641,
-0.8025873303413391,
-0.11038834601640701,
0.49448996782302856,
-0.058281026780605316,
0.0658926069736... | |
I am relatively new to game development so I decided I wanted to create a hobby project from scratch for both experience and entertainment. The specific game is similar to poker known as [Three Card Brag](http://en.wikipedia.org/wiki/Three_card_brag). The game is played in the movie *Lock, Stock and Two Smoking Barrels... | [
0.563840389251709,
0.129385843873024,
-0.22436155378818512,
-0.04860933870077133,
0.22893348336219788,
-0.3345302641391754,
-0.3098548352718353,
-0.24146899580955505,
-0.35596683621406555,
-0.37321165204048157,
0.6701993346214294,
0.4620529115200043,
-0.12655963003635406,
0.002645518863573... | |
inside a `Player` class) but after reading the responses to the [question](https://stackoverflow.com/questions/361002/any-patterns-for-modelling-board-games) I mentioned previously, it seems as though all possible states of the game should be maintained within a `GameState` object. What I came up with is essentially th... | [
-0.17937719821929932,
-0.06036892533302307,
0.36132389307022095,
-0.09297207742929459,
0.3239990770816803,
-0.13406573235988617,
-0.35831671953201294,
-0.389529824256897,
-0.4186503291130066,
-0.4957798421382904,
-0.09603098779916763,
0.2913716733455658,
-0.3319934010505676,
0.191298171877... | |
{ get; }
CardGameState Apply(CardGameState state);
bool IsLegal(CardGameState state);
}
```
Now I'm feeling very strongly that this is defeating the purpose of object-oriented programming, because the data specifically related to the player (in this case, his chip stack, hand, and current status) is not enca... | [
-0.002174624241888523,
0.20204053819179535,
0.1835484653711319,
-0.17694862186908722,
0.22366052865982056,
-0.28804731369018555,
-0.07151956856250763,
-0.34495896100997925,
-0.18287992477416992,
-0.5030601620674133,
-0.08640189468860626,
0.7337304353713989,
-0.19896990060806274,
0.10547473... | |
class.
Basically, my question is: can I have the best of both worlds such that I can have an exact representation of the game state while simultaneously keeping all data related specifically to an object within the game state inside its given object?
In online-games using the [command-pattern](http://en.wikipedia.org/... | [
0.07804346084594727,
-0.130083367228508,
-0.2684113383293152,
0.34987208247184753,
-0.0038918652571737766,
-0.19654543697834015,
0.33939969539642334,
0.16983327269554138,
0.03990139812231064,
-0.7223792672157288,
-0.0991944894194603,
0.8404680490493774,
0.05327945202589035,
-0.219837546348... | |
it, but note that action games normally use very small discreet actions/packets, until it practically becomes a stream of sorts.
**Edit:**
A long time after I answering this, I came back here and realized another solution to this problem is to implement GameState's Players, Decks, etc... as derived from an **IState*... | [
0.2136130928993225,
-0.3278568387031555,
0.39135846495628357,
0.1936153918504715,
-0.08706268668174744,
-0.3338471055030823,
0.02643098123371601,
-0.2605922520160675,
-0.3378556966781616,
-0.5658937692642212,
-0.04896305873990059,
0.48803597688674927,
-0.3035030663013458,
0.087168946862220... | |
command is the easier solution with less encapsulation. | [
-0.25342005491256714,
-0.05186979100108147,
0.0743379071354866,
0.20618808269500732,
-0.21015167236328125,
-0.08043047040700912,
0.33172351121902466,
-0.12318992614746094,
-0.13762496411800385,
-0.5517953038215637,
-0.9330262541770935,
0.6317360401153564,
0.15557308495044708,
-0.1460686922... | |
I want to build a dlinq query that checks to see if a title has any number of items in it. I know you can do `.Contains()` with a list, but I need to check if the title contains any of the items, not if the items contain part of the title. For example: I have three items in the list *"bacon, chicken, pork"*. I need the... | [
0.8535023927688599,
0.19072675704956055,
0.2861537039279938,
-0.1550484448671341,
0.07510466128587723,
0.07216072827577591,
0.08538396656513214,
-0.2956961989402771,
-0.031265951693058014,
-0.7993366718292236,
-0.013048608787357807,
0.5167867541313171,
-0.12891830503940582,
0.4803771376609... | |
`"Local sequence cannot be used in LINQ to SQL implementation of query operators except the Contains() operator."`
The third solution gives me
> Method 'System.Object DynamicInvoke(System.Object[])' has no supported translation to SQL."
I finally figured it out. Thanks to my good buddy Cory for the help. There are tw... | [
0.046347323805093765,
-0.19448460638523102,
0.4132625162601471,
0.018012866377830505,
-0.06453705579042435,
0.011963656172156334,
0.5141149163246155,
-0.1407468169927597,
-0.2500118911266327,
-0.5679334402084351,
-0.28051674365997314,
0.6135885119438171,
-0.3777884542942047,
0.030216731131... | |
where b.site_title.Contains(k)
select b.ToBusiness()).ToList<Business>()).ToList();
List<Business> all = new List<Business>();
for (int i = 0; i < resultSets.Count; ++i)
{
all.AddRange(resultSets[i]);
}
```
This is a linq query that will successfuly do what is stated. As well, you... | [
0.2186879962682724,
0.1442360281944275,
0.7870833277702332,
-0.15835972130298615,
0.200264111161232,
-0.2470766007900238,
0.06894180178642273,
-0.4991869032382965,
-0.14556948840618134,
-0.400598406791687,
-0.4267093241214752,
0.47276681661605835,
-0.3656419813632965,
0.21696271002292633,
... | |
I have a C++ class that overloads `operator[]`, the array subscript/brackets operator. This is awfully convenient outside of my class, where I can write `foo[bar`]. However, I can't figure out how to use this notation when I'm implementing methods *inside* my class.
I know I can write `operator[](bar)` or `this->opera... | [
0.09172625094652176,
0.41145965456962585,
0.19634664058685303,
-0.26305994391441345,
-0.02990831434726715,
-0.15341198444366455,
0.2230503410100937,
-0.11742109805345535,
-0.027411669492721558,
-0.3878377079963684,
0.007891634479165077,
0.7921181321144104,
-0.44715815782546997,
-0.12442819... | |
I am using IETester to test multiple versions. Is there a tool to debug script errors for Internet Explorer?
Similarly, is there an equivalent tool for Firefox for checking multiple versions in one box, like IETester?
You could try [this Internet Explorer developer toolbar](http://www.microsoft.com/downloads/details.a... | [
0.604918360710144,
0.03157256171107292,
0.10058670490980148,
0.09997773915529251,
-0.2460957169532776,
-0.15411192178726196,
0.2592299282550812,
-0.22273863852024078,
-0.021373484283685684,
-0.9028604030609131,
0.3674022853374481,
0.6515793800354004,
-0.21470701694488525,
0.037136979401111... | |
- look under [legacy versions](http://portableapps.com/apps/internet/firefox_portable#legacy) low down here. | [
0.29954755306243896,
0.35347670316696167,
0.13662178814411163,
-0.009705474600195885,
0.473261296749115,
-0.39755287766456604,
-0.11340594291687012,
0.10730573534965515,
-0.30367162823677063,
-0.4246235191822052,
-0.1747216433286667,
0.549659013748169,
-0.0948055312037468,
-0.1964547038078... | |
Here's what the server is sending me (openfire) when I manually delete a contact from the roster on the server:
```
'<iq type="set" id="183-87" to="foo@edmund.local/hydra"><query xmlns="jabber:iq:roster"><item jid="bar@yahoo.edmund.local" name="baz" ask="unsubscribe" subscription="none"><group>Buddies</group></item></... | [
-0.10290773212909698,
0.13313297927379608,
0.41122257709503174,
-0.0576004683971405,
-0.48351964354515076,
0.20988647639751434,
0.35985705256462097,
-0.191966712474823,
-0.2800579369068146,
-0.4447532296180725,
-0.29505378007888794,
0.2930798828601837,
-0.43806517124176025,
0.1827653795480... | |
subscriber, then nothing:
According to [section 9.4](http://xmpp.org/rfcs/rfc3921.html#rfc.section.9.4), if the subscriber sends an `unsubscribe` request, or something else causes the client to be unsubscribed, the server must acknowledge the request/report the state change with an `unsubscribed` response. That's the ... | [
-0.007005053572356701,
-0.19484944641590118,
0.9036778807640076,
-0.06249625235795975,
-0.032331377267837524,
-0.39655688405036926,
0.38065624237060547,
0.2688831388950348,
-0.5782467126846313,
-0.3375096619129181,
-0.6427711248397827,
0.3507816791534424,
-0.39876025915145874,
0.5391950607... | |
stands when you're changing the roster outside of the normal mechanism I'm not sure.
My reading of the table in 9.4 is for the messages between subscribee and server during unsubscription is:
```
subscriber server subscribee
| -- unsubscribe --> | |
| | [
0.3336423635482788,
0.040903445333242416,
0.7749761343002319,
-0.41817769408226013,
-0.3793179988861084,
0.19943735003471375,
0.25695350766181946,
-0.13481226563453674,
-0.19818682968616486,
-0.5718196630477905,
-0.08425897359848022,
0.08096741139888763,
-0.22865082323551178,
0.33188641071... | |
| -- unsubscribe --> |
| | <- unsubscribed -- | (optional)
| | -- unsubscribed -> |
| <- unsubscribed -- | |
```
My reading of | [
-0.37784603238105774,
0.43081092834472656,
0.08099822700023651,
0.039945852011442184,
-0.05853785574436188,
0.04555211216211319,
0.4656763970851898,
-0.07260962575674057,
0.12705819308757782,
-0.45526260137557983,
-0.6253252029418945,
0.13176845014095306,
-0.12741529941558838,
0.0663078427... | |
[section 8.6](http://xmpp.org/rfcs/rfc3921.html#rfc.section.8.6), roster removal is this:
```
subscriber server subscribee
| ----- remove ----> | |
| | -- unsubscribe --> |
| | [
0.0240890271961689,
-0.13150669634342194,
0.33706846833229065,
-0.22249451279640198,
0.06574078649282455,
-0.02374650537967682,
0.24998044967651367,
-0.019058750942349434,
-0.5844399929046631,
-0.48660191893577576,
-0.38039329648017883,
0.2659805715084076,
-0.39865192770957947,
0.430928409... | |
| -- unsubscribed -> |
| | -- unavailable --> |
| <- unsubscribed -- | |
| <-- unavailable -- | |
```
With no | [
-0.31606313586235046,
0.37564557790756226,
0.17578527331352234,
0.11036631464958191,
0.15443582832813263,
-0.14217646420001984,
0.22534655034542084,
0.0827592983841896,
0.07798252999782562,
-0.3482896387577057,
-0.8656841516494751,
0.2416609525680542,
-0.2526915669441223,
0.554422914981842... | |
acknowledgement required by either client. | [
-0.27180013060569763,
0.19371426105499268,
0.5523913502693176,
-0.10162139683961868,
-0.0492037758231163,
-0.15320879220962524,
0.23119737207889557,
0.263460248708725,
0.01359522808343172,
-0.3963918089866638,
-0.2216513454914093,
0.16718947887420654,
0.37624067068099976,
-0.30294814705848... | |
Am trying to create a server application in c#.In the code am using the TcpListener class.
```
TcpListener t = new TcpListener(5555);
t.Start();
```
However it is providing an error saying: Invalid token '(' in class, struct, or interface member declaration.
Are there additional references required?.
P... | [
0.1150747612118721,
0.0163546334952116,
0.6584263443946838,
-0.20870858430862427,
0.01622190698981285,
-0.11182650178670883,
0.3476931154727936,
-0.6986255645751953,
-0.0374242328107357,
-0.6448238492012024,
-0.40399742126464844,
0.41273942589759827,
-0.3722868263721466,
0.1767164617776870... | |
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder(this.textBox1.Text); | [
-0.3513740301132202,
-0.4521232843399048,
0.4396724998950958,
-0.4233397841453552,
0.185157909989357,
0.14940781891345978,
0.5612397789955139,
-0.41930142045021057,
-0.15237297117710114,
-0.6489822268486023,
-0.5049923062324524,
0.41695261001586914,
-0.5809059739112854,
0.15923970937728882... | |
sb.AppendLine(this.textBox2.Text);
this.textBox1.Text = sb.ToString();
this.textBox2.Text = "\0";
HideCaret(this.textBox1.Handle);
}
private void textBox1_MouseClick(object sender, MouseEventArgs e)
{
HideCaret(this.textBox1.Handle);
}
... | [
0.06957416981458664,
-0.3041124641895294,
0.5555587410926819,
-0.434161514043808,
0.1598338782787323,
0.22272317111492157,
0.6850311756134033,
-0.2843902111053467,
0.22721731662750244,
-0.7261713743209839,
-0.07516142725944519,
0.5015620589256287,
-0.651017427444458,
0.05058460682630539,
... | |
StreamReader streamReader;
NetworkStream networkStream;
TcpListener t = new TcpListener(5555);
t.Start();
}
}
```
This is the full source code upto now. Am unable to find the error.
Providing you have a reference to System.dll in your project and have a using statement for the System.Net.... | [
0.20701433718204498,
-0.15067829191684723,
0.3091617226600647,
0.14180715382099152,
0.19896318018436432,
-0.14293181896209717,
0.4755731225013733,
0.13539600372314453,
-0.17135362327098846,
-0.8378479480743408,
-0.27156201004981995,
0.4781297445297241,
-0.5241968035697937,
0.31173530220985... | |
method of the class. This is wrong:
```
class lanmessenger
{
...
TcpListener t = new TcpListener(5555); // ok to initialize like this
t.Start(); // wrong...put this in a method
}
```
This is right:
```
class lanmessenger
{
TcpListener t = new TcpListener(5555); // ok to initialize like this
... | [
-0.2779041826725006,
-0.08909353613853455,
0.40020066499710083,
-0.03390379622578621,
0.10870115458965302,
-0.021926596760749817,
0.15462736785411835,
-0.4643271267414093,
-0.3615553081035614,
-0.4528402090072632,
-0.24249760806560516,
0.1729561686515808,
-0.37246569991111755,
0.1720701009... | |
I have a situation in a code where there is a huge function that parses records line-by-line, validates and writes to another file.
In case there are errors in the file, it calls another function that rejects the record and writes the reject reason.
Due to a memory leak in the program, it crashes with SIGSEGV. One s... | [
0.2077414095401764,
0.2611584961414337,
0.01293567381799221,
0.24729180335998535,
0.20037929713726044,
-0.21769991517066956,
0.2500547468662262,
-0.23802801966667175,
-0.26669034361839294,
-0.3885303735733032,
0.048795975744724274,
0.17069776356220245,
-0.22311994433403015,
0.3737648427486... | |
sure that the data is overwritten on the file within the loop?
Does using fseek to first position / rewind within a loop degrade the performance?
The number of records can be lot, at times (upto 500K).
Thanks.
EDIT: The memory leak has already been fixed. The restart solution was suggested as
an additional safety ... | [
0.41981643438339233,
-0.1307011991739273,
0.12102209031581879,
0.2747877538204193,
0.2146177887916565,
-0.05793611705303192,
0.3348255157470703,
-0.13765525817871094,
-0.758449137210846,
-0.2897222638130188,
-0.00034738422255031765,
0.5492684245109558,
-0.2449103146791458,
0.01352656260132... | |
the position returned by `ftell` on the input file) to a separate *bookmark* file. To ensure that you resume exactly where you left off, as to not introduce duplicate records, you must `fflush` after every write (to both `bookmark` and output/reject files.) This, and unbuffered write operations in general, slow down th... | [
-0.22382532060146332,
-0.03542425483465195,
1.0155388116836548,
-0.06067397817969322,
0.23231637477874756,
0.08869027346372604,
0.36897629499435425,
-0.2748386263847351,
-0.2229216992855072,
-0.5171060562133789,
-0.6121344566345215,
0.6768450140953064,
0.1562449187040329,
-0.09760676324367... | |
skip `truncate` since the record number (or `ftell` position) will always be as long or longer than the previous record number (or `ftell` position), and will completely overwrite it, provided you truncate the file once at startup **(this answers your original question)**
2. assume everything will go well *in most case... | [
0.3123691976070404,
-0.276077538728714,
0.47044044733047485,
-0.04434959217905998,
0.26597464084625244,
-0.20034480094909668,
0.22026896476745605,
-0.23783014714717865,
-0.5786020755767822,
-0.36299774050712585,
-0.4876241981983185,
0.7201324105262756,
-0.10824897885322571,
-0.243179664015... | |
files, or at least not so often. You still need to `fflush` the main output file before switching to writing to the rejects file, and `fflush` the rejects file before switching back to writing to the main output file (probably a few hundred or thousand times for a 500k-record input.) Simply remove the last unterminated... | [
0.10336347669363022,
-0.16012533009052277,
0.4120369255542755,
0.16257376968860626,
-0.08779773116111755,
0.15417037904262543,
0.5175783634185791,
-0.17520403861999512,
-0.05044277012348175,
-0.6046833992004395,
-0.16724632680416107,
0.36974480748176575,
-0.2308085560798645,
0.128041565418... | |
milliseconds; multiply that by 500k and you get minutes - whereas counting the number of lines in a 500k-record file takes mere seconds and, what's more, the filesystem cache is working *with, not against* you on that.)
---
**EDIT**
Just wanted to clarify the exact steps you need to implement method 2:
* when writin... | [
0.15291409194469452,
-0.15369918942451477,
0.3278194069862366,
0.35344094038009644,
-0.020663805305957794,
0.19585812091827393,
0.3788079619407654,
-0.264327734708786,
-0.39070528745651245,
-0.7821097373962402,
0.15623478591442108,
0.4068872332572937,
0.13581602275371552,
0.036137510091066... | |
to write 1 line to the rejects file, without manually flushing the main output file first, then
+ you write 200 more lines to the main output file, without manually flushing the rejects file first, then
+ the runtime *automatically* flushes the main output file for you because you have accumulated a large volume of d... | [
-0.006796426605433226,
-0.16649897396564484,
0.20930126309394836,
0.31324172019958496,
-0.13361579179763794,
0.35162830352783203,
0.5603151917457581,
-0.4485968351364136,
-0.07243509590625763,
-0.63820880651474,
0.04654789716005325,
0.13866573572158813,
-0.13878780603408813,
0.158596888184... | |
this point
+ you resume and count 1200 records in the main output file (the runtime flushed those out for you), but 0 (!) records in the rejects file (not flushed).
+ you resume processing the input file at record #1201, assuming you only had 1200 records successfully processed to the main output file; the rejected r... | [
0.12318349629640579,
-0.034037619829177856,
0.2822451889514923,
0.058203887194395065,
-0.00817427784204483,
0.02502949722111225,
0.2999812066555023,
-0.6310958862304688,
-0.22733505070209503,
-0.514132559299469,
-0.025271890684962273,
0.3646741509437561,
0.09732333570718765,
0.255273461341... | |
file; the last record was valid; this means you're switching to writing to the rejects file: flush the main output file before writing to the rejects file
+ you now write 1 line to the rejects file, then
+ you encounter one valid record which belongs to the main output file; the last record was invalid; this means yo... | [
0.08390242606401443,
-0.3247056007385254,
0.4216548204421997,
0.10515881329774857,
-0.08789665251970291,
0.3578662574291229,
0.5792025923728943,
-0.2568352520465851,
-0.05108224228024483,
-0.5824726223945618,
-0.13607043027877808,
0.1321471780538559,
-0.30280300974845886,
0.326384186744689... | |
automatically flush anything for you, because 200 records buffered since the last manual flush on the main output file are not enough to trigger an automatic flush
+ your program crashes at this point
+ you resume and count 1000 valid records in the main output file (you manually flushed those before switching to the... | [
-0.0564439631998539,
-0.27599042654037476,
0.35415118932724,
0.34034502506256104,
0.24365836381912231,
-0.004238327499479055,
0.5834528803825378,
-0.3298085629940033,
-0.22117403149604797,
-0.47544848918914795,
-0.16612353920936584,
0.462444543838501,
-0.13459278643131256,
-0.3248982429504... | |
records because they were not flushed, but you get no missing records and no duplicates either
* if you are not happy with the interval between the runtime's automatic flushes, you may also do manual flushes every 100 or every 1000 records. This depends on whether processing a record is more expensive than flushing or ... | [
0.23594233393669128,
-0.40129193663597107,
0.44620856642723083,
0.2402162253856659,
0.2311023771762848,
0.16592778265476227,
0.22821839153766632,
-0.12901842594146729,
-0.49324744939804077,
-0.6018922328948975,
0.0025775551330298185,
0.6465365290641785,
0.022312983870506287,
-0.07667330652... | |
until you reach the end of file
+ *unless you were flushing after **each** record you are outputting*, you will also need to perform a bit of special treatment for the last record in both the output and rejects file:
- before reading a record from the interrupted output/rejects file, remember the position you are at... | [
0.27026963233947754,
-0.2056199163198471,
0.6521982550621033,
0.06357573717832565,
0.10121440887451172,
-0.06342561542987823,
0.12476150691509247,
0.05671722814440727,
-0.3253609240055084,
-0.6189997792243958,
-0.24202051758766174,
0.374796599149704,
0.13848602771759033,
0.2673757970333099... | |
is easily verified by checking that the last character in the record is a carriage return or line feed (`\n` or `r`)*
* if the record is complete, increment the records counter and proceed with the next record (or end of file, whichever comes first.)
* if the record is partial, `fseek` back to `last_valid_record_... | [
0.16144537925720215,
0.049820370972156525,
0.6639870405197144,
-0.10566362738609314,
0.2476298213005066,
0.01517912931740284,
0.44801339507102966,
-0.1256874054670334,
-0.21382679045200348,
-0.49586158990859985,
-0.6306949257850647,
0.4088054895401001,
-0.18276336789131165,
0.3835873603820... | |
this will automatically append to the output/rejects file where you left off reading/counting already processed records
- if you had to perform special processing for partial record flushes, the next record you output will overwrite its partial information from the previous run (at `last_valid_record_ends_here`) - yo... | [
0.03138246759772301,
0.02234010025858879,
0.2523272633552551,
0.20802238583564758,
0.3162831962108612,
-0.1531725376844406,
0.2124401330947876,
0.021210184320807457,
-0.32497358322143555,
-0.5106518268585205,
-0.18007892370224,
0.22151637077331543,
-0.18598660826683044,
0.5214665532112122,... | |
When using class files in Ruby, do you put the 'requires' statements at the top of the file, or inside the class definition?
Technically, it doesn't really matter. `require` is just a normal method call, and the scope it's called in doesn't affect how it works. The only difference placement makes is that it will be exe... | [
0.6726006865501404,
-0.09572804719209671,
-0.10729013383388519,
0.22907771170139313,
0.028991900384426117,
-0.41949811577796936,
0.2791060507297516,
-0.3552396595478058,
-0.19033865630626678,
-0.2846258878707886,
-0.20195263624191284,
0.6133999824523926,
-0.29983043670654297,
-0.2232511341... | |
In a WPF page that I'm designing for my church, I have two ListBox controls bound to the results of two Linq-to-Entities queries: the first listbox/query contains all the folks who haven't yet pledged for the year, the second listbox/query contains all the folks who have pledged (and their associated pledges). Specific... | [
0.42020437121391296,
0.12628522515296936,
0.7732526659965515,
-0.15418413281440735,
0.16993176937103271,
-0.04772191867232323,
0.12641029059886932,
-0.797643780708313,
-0.3328266739845276,
-0.47236382961273193,
-0.02474639005959034,
0.34667256474494934,
0.07586175203323364,
0.2191680520772... | |
pledge };
```
When the user of the application selects a family from the first ListBox, the ListBox item expands slightly to show the fields for a pledge, so that it's easy to add the pledge details to the second ListBox. It looks something like this:
<http://wouldbetheologian.com/images/PledgeManager.jpg>
[(Offsite... | [
0.7432308793067932,
0.00024935376131907105,
0.19718621671199799,
-0.04950246959924698,
0.03153492137789726,
0.007063244003802538,
0.23770177364349365,
-0.6129977107048035,
-0.06387361884117126,
-0.5268560647964478,
-0.020389914512634277,
0.42516186833381653,
-0.36626046895980835,
0.1747483... | |
try to do it in the code-behind, it doesn't seem like the event handler for the (n-instances of the) "Add Pledge" button can reference the controls in question; and in XAML, if I try to bind the ListBoxItem DataTemplate controls to the Family.Pledge (or Family.Pledge.FirstOrDefault()) fields, those fields are still emp... | [
0.5071821808815002,
-0.15895310044288635,
0.28188833594322205,
0.07141967117786407,
0.1700218915939331,
-0.25266793370246887,
0.381239116191864,
-0.4885234236717224,
-0.14335112273693085,
-0.7500646710395813,
-0.11547812074422836,
0.5708521008491516,
-0.21332469582557678,
-0.00046380440471... | |
null then 'something'
else 'something else'
end
```
This is a "searched case expression" ([see MSDN](http://msdn.microsoft.com/en-us/library/ms181765.aspx)):
```
CASE
WHEN Boolean_expression THEN result_expression [ ...n ]
[ ELSE else_result_expression ] END
``` | [
-0.2102624624967575,
-0.21692487597465515,
0.3290828466415405,
-0.3079891800880432,
-0.04404378682374954,
-0.20420865714550018,
0.2681586742401123,
0.10652219504117966,
-0.1313016712665558,
-0.3926633894443512,
-0.66177898645401,
0.14238356053829193,
-0.3298282027244568,
0.2149146199226379... | |
I've noticed that Magento stores MySQL connection details in an XML file which isn't secured above the docroot. This seems.... well dangerous.
XML seems like a handy way to store config data, except for one thing, typing in <http://www.domain.com.au/library/config.xml> will show the world your private details!
I went... | [
0.24450021982192993,
0.10857903212308884,
0.511586606502533,
0.47053518891334534,
-0.13111554086208344,
-0.44698476791381836,
-0.012481625191867352,
0.035140812397003174,
-0.008485025726258755,
-0.4638049006462097,
0.014117908664047718,
0.5978195071220398,
-0.1142093762755394,
0.1307658553... | |
error) and what if one day I want to place the app on a non apache server... does every server have the equivalent to block XML files, and if they do, can they be altered on a folder level like the .htaccess can (and not just a httpd.conf file).
My question is... does the convenience of XML (easy to update, designers ... | [
0.44801750779151917,
0.37484169006347656,
0.40082916617393494,
0.23590794205665588,
0.162846639752388,
0.05205586552619934,
0.3882306218147278,
-0.06067692115902901,
-0.2992989718914032,
-0.3770712614059448,
0.012202851474285126,
0.6292102336883545,
-0.2494722604751587,
0.04664717987179756... | |
above the docroot or use the PHP $config['varname'] = 'value' format. The later method would just render a blank white page if called directly (so long as it's all PHP and contains no HTML and doesn't echo out).
Gallery, vBulletin, and Joomla all use the second method I mentioned. I know I've mentioned those projects ... | [
0.3595220148563385,
0.03861284628510475,
0.3505808413028717,
-0.15432967245578766,
-0.3587316870689392,
-0.1953747421503067,
-0.011485873721539974,
0.05189986526966095,
-0.23981663584709167,
-0.574083685874939,
-0.15429063141345978,
0.6678118109703064,
-0.28546077013015747,
0.0438930168747... | |
Where are the schemas (DTD or XML schema) for the XML files used on Android like AndroidManifest.xml or the layouts?
The schemas don't exist as an xml file. Schemas are dependent upon what UI classes your program uses. There's a slightly better discussion [here](http://groups.google.com/group/android-developers/browse_... | [
0.28013578057289124,
0.16296856105327606,
0.46156570315361023,
-0.0997098982334137,
0.03951261192560196,
0.21769022941589355,
0.0585138164460659,
-0.10405667871236801,
-0.35922300815582275,
-0.6598860621452332,
-0.10366355627775192,
0.5890244841575623,
-0.4292103946208954,
0.09005922824144... | |
I am maintaining a program that uses the DevShock SMPP component for .NET. I have noticed though that for a long time (at least 6 months) the [website](http://www.devshock.com/) has a "New Site Under Construction" notice, saying that it will be ready by September 2008.
Does anyone know if it will ever be back?
Do... | [
0.5660967826843262,
0.0821412056684494,
0.34713929891586304,
0.2016383707523346,
-0.19547590613365173,
-0.27279600501060486,
0.48522329330444336,
0.1908530592918396,
-0.1811106950044632,
-0.5936494469642639,
0.10294361412525177,
0.5151070952415466,
0.2527715265750885,
0.11203444004058838,
... | |
+1 571 434 4620 | [
0.07180389016866684,
0.24554471671581268,
0.09747645258903503,
0.04656733199954033,
-0.39221084117889404,
0.3655075132846832,
-0.1165115237236023,
-0.5062710046768188,
-0.0017989083426073194,
-0.37012869119644165,
-0.31574249267578125,
0.22867032885551453,
-0.41950637102127075,
0.456379473... | |
I'm new to jQuery and need some help to show and hide a div on click. Basically I need to show a div (containing a small menu) once the user click on a link, and as soon as the user click on a link inside the div just shown. Or clicks outside the div I need to hide the div again.my HTML looks something like this (I'll ... | [
0.24285753071308136,
-0.031713154166936874,
0.5904374122619629,
-0.12459933012723923,
-0.35420989990234375,
-0.14690694212913513,
0.3046188950538635,
-0.08465603739023209,
-0.017605377361178398,
-0.8860335350036621,
-0.16688548028469086,
0.35847359895706177,
-0.2402229607105255,
-0.0601832... | |
that wraps the whole page that I thought I'd set another click-event on to hide the div (to catch clicks outside of the actual menu).
Is this the right approach for solving this and how do I then remove the handlers on the wrapper div etc, etc. What else should I think of to get this right (if it it's the right appro... | [
0.3856252133846283,
-0.09006008505821228,
0.48459792137145996,
-0.30108627676963806,
0.07492941617965698,
-0.06787855178117752,
0.43896445631980896,
-0.484489381313324,
-0.004461562726646662,
-0.44472452998161316,
-0.05520385876297951,
0.6406702399253845,
-0.48326000571250916,
0.0351944863... | |
$('.menu-content').hide();});
$('.menu-content a').click(function() { alert($(this)); });
```
```
html:
<a class="menu" href="#">Menu</a>
<div class='a_menu' style="display: none; position: absolute; border: 1px solid black; background-color: White;padding: 5px;">
<div><a href="#">Menu option 1</a></div>
<div><a hr... | [
0.23343315720558167,
-0.0656944066286087,
0.8346705436706543,
-0.2898077666759491,
0.010838483460247517,
0.20905454456806183,
0.35248348116874695,
-0.5922579169273376,
-0.273571252822876,
-0.5176098942756653,
-0.5441558361053467,
0.4838150143623352,
-0.53644198179245,
-0.07868450880050659,... | |
I have three dlls ProjBL.dll , ProjDL.dll and ProjMC.dll.
ProjBL.dll is Business object dll
ProjDL.dll is Data Access layer method dll
ProjMC.dll is Master Class dll contains Properties
ProjDL.dll depends on ProjMC.dll and ProjBL.dll depends on ProjDL.dll
I have load ProjBL.dll in Memory using Assembly.Load() met... | [
-0.3733138144016266,
-0.11590460687875748,
0.8044037222862244,
0.09744513779878616,
-0.07338888198137283,
0.2556617856025696,
0.013203581795096397,
-0.49750855565071106,
-0.1611473113298416,
-0.8732122182846069,
-0.09231038391590118,
0.40255579352378845,
-0.318661093711853,
0.4064722955226... | |
if (dllCount > 0)
{
long streamLength = 0;
for (int fileCount = 0; fileCount < dllCount; fileCount++)
{
fs = new FileStream(dllFiles[fileCount].FullName, FileMode.Open);
streamLength += fs.Length; | [
-0.07158257067203522,
-0.8564903140068054,
0.9376218318939209,
-0.332518994808197,
0.3614445626735687,
-0.06400492042303085,
0.11760768294334412,
-0.22256748378276825,
0.054548636078834534,
-0.5760111808776855,
-0.5799927115440369,
0.5455241799354553,
-0.21076540648937225,
0.25423493981361... | |
fs.Close();
}
byte[] memory = new byte[streamLength];
byte[] memory1 = null;
byte[] memory2 = null;
byte[] memory3 = null;
fs = new FileStream(dllFiles[0].FullName, FileMode.Open);
BinaryReader br = new BinaryReader(fs);
memory1 = br.ReadBytes(Con... | [
-0.3216826617717743,
-0.21205145120620728,
0.45027342438697815,
-0.33483999967575073,
0.12158041447401047,
0.21933400630950928,
0.0008281805785372853,
-0.35166823863983154,
-0.4618862271308899,
-0.49937257170677185,
-0.4843893051147461,
0.48219695687294006,
-0.28315469622612,
0.23167346417... | |
ProjMC.dll
fs = new FileStream(dllFiles[1].FullName, FileMode.Open);
br = new BinaryReader(fs);
memory2 = br.ReadBytes(Convert.ToInt32(fs.Length)); // Loads ProjDA.dll
fs = new FileStream(dllFiles[2].FullName, FileMode.Open);
br = new BinaryReader(fs);
memory3 = ... | [
-0.5487329959869385,
-0.13569556176662445,
0.7660852074623108,
-0.3773377239704132,
-0.05453195050358772,
0.5838751196861267,
0.3290134370326996,
-0.45999786257743835,
-0.39827945828437805,
-0.5214946269989014,
-0.7410366535186768,
0.4899900555610657,
-0.3535296618938446,
0.113417468965053... | |
memory1.CopyTo(memory, 0);
memory2.CopyTo(memory, memory1.Length);
memory3.CopyTo(memory, (memory1.Length + memory2.Length));
assemblyUsed = Assembly.Load(memory);
}
return assemblyUsed;
```
try this:
```
def initialize():
global VAR
print('Content-type: te... | [
-0.28754332661628723,
-0.17031075060367584,
0.46779710054397583,
-0.2999756336212158,
0.029453441500663757,
0.15938685834407806,
0.4168712794780731,
0.010070067830383778,
-0.37445124983787537,
-0.4939173758029938,
-0.4662254750728607,
0.6025801301002502,
-0.616256058216095,
-0.005858159624... | |
variable VAR and give you "UnboundLocalError: local variable 'VAR' referenced before assignment" | [
0.0700991302728653,
-0.05416053533554077,
0.1947331577539444,
0.04452569782733917,
-0.09818760305643082,
-0.0751209482550621,
0.15790486335754395,
-0.09680122882127762,
0.11733604967594147,
-0.2375730723142624,
-0.18670731782913208,
0.7233662605285645,
-0.4811857342720032,
0.32472851872444... | |
I write an instance method in ClassName.m:
```
-(void)methodName:(paraType)parameter
{...}
```
And call it using
```
[self methodName:parameter];
```
A warning will pop up, but the code still runs successfully.
Is this because I haven't created an instance of the class? Why the method still runs normally? And what... | [
0.14441165328025818,
0.26378390192985535,
0.22004587948322296,
-0.08552460372447968,
0.08764742314815521,
-0.10125339776277542,
0.7578881978988647,
-0.16745993494987488,
-0.00984853133559227,
-0.4656747877597809,
-0.05393197387456894,
0.49456503987312317,
-0.6425796747207642,
0.33134916424... | |
object or not.
I would guess your code looks like;
```
-(void) someFunc
{
...
[self methodName:parameter];
...
}
-(void)methodName:(paraType)parameter
{
...
}
```
You can either;
a) Place the 'methodName' function earlier in the file so the compiler has seen it before it's used in calls.
b) declare it in ... | [
0.1577323079109192,
0.08124841749668121,
0.3069579005241394,
0.008168620057404041,
-0.06926348060369492,
0.07693761587142944,
0.43598175048828125,
-0.4036004841327667,
-0.06455463171005249,
-0.47661954164505005,
-0.08285097777843475,
0.5900556445121765,
-0.4169550836086273,
0.1183307543396... | |
Is it possible to use same working copy and to put the same into two different SVN servers(commit, update,...)?
[How to synchronize two Subversion repositories?](https://stackoverflow.com/questions/143130/how-to-synchronize-two-subversion-repositories)
[Can I have one project in two SVN repositories?](https://stackove... | [
0.15818890929222107,
-0.2280329465866089,
0.1299254596233368,
0.22404946386814117,
0.15672439336776733,
-0.06514187902212143,
0.047141171991825104,
-0.11177807301282883,
-0.42771023511886597,
-0.4811314344406128,
-0.09831801801919937,
0.3309757709503174,
-0.05642745643854141,
0.03147124871... | |
I use a default IDisposable implementation template (pattern) for my code.
snippet:
```
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool isDisposing)
{
if (!this.disposed)
{
if (isDisposing)
{
//cleanup managed resour... | [
0.6143763065338135,
-0.0647667869925499,
0.03676861897110939,
-0.1324564814567566,
0.2181674987077713,
-0.2827722728252411,
0.2517525255680084,
-0.2726050317287445,
-0.23926767706871033,
-0.6279758810997009,
-0.1467326432466507,
0.4915085732936859,
-0.294681191444397,
0.398438036441803,
... | |
the call "GC.SuppressFinalize(this)" in the Dispose public method? I would place "GC.SuppressFinalize(this)" in the "if (isDisposing)" section of the protected method, after disposing managed resources.
Like this:
```
protected virtual void Dispose(bool isDisposing)
{
if (!this.disposed)
{
if (isDispos... | [
0.311802476644516,
-0.3810010254383087,
0.1540830135345459,
-0.16754217445850372,
0.2513531744480133,
-0.5049910545349121,
0.18400049209594727,
-0.27363941073417664,
-0.30741196870803833,
-0.314376562833786,
-0.3536543548107147,
0.7054750323295593,
-0.4383518695831299,
0.27680617570877075,... | |
this.disposed = true;
}
}
```
I suppose its a clear case of Template Design pattern.
Your abstract class is Designed to take care of all important/necessary tasks required (Here, GC.SuppressFinalize(this)), and allowing a derived class to override only some part of the code.
There are 2 cases here:
Snippet... | [
0.3018794357776642,
-0.378634512424469,
0.22936232388019562,
-0.033004280179739,
0.014681734144687653,
-0.2137765735387802,
0.15176336467266083,
-0.5492051839828491,
-0.13396817445755005,
-0.6328297257423401,
-0.1141497939825058,
0.5530802011489868,
-0.45751792192459106,
0.0219667144119739... | |
always make sure that irrespective of whatever code written by derived classes, GC.SuppressFinalize will be executed.
This is only the benefit of writing SuppressFinalize in Dispose rather then Dispose(true). | [
0.5108635425567627,
-0.3070324659347534,
0.06570139527320862,
0.02705390937626362,
0.15798750519752502,
-0.7406949400901794,
0.46043306589126587,
-0.24862895905971527,
-0.17343027889728546,
-0.4049805700778961,
-0.22296658158302307,
0.9043784141540527,
-0.20776931941509247,
-0.433441549539... | |
I didn't really know how to formulate the title.
But this is my problem.
We are using SqlCacheDependencies to update out cache objects. But the query behind this is "complicated" that we would like to make it somewhat easier.
Our first thought was to add a fieldname like DateChanged and use the DateChanged to check if... | [
0.0690656527876854,
0.13771045207977295,
0.29150694608688354,
0.23783138394355774,
0.11873840540647507,
-0.11883962899446487,
-0.05939546227455139,
0.1742723137140274,
-0.24178491532802582,
-0.52973473072052,
0.2606129050254822,
0.23726250231266022,
-0.10555554926395416,
0.5071360468864441... | |
naming the column that indicates a change.
How are frameworks like "Entity framework" or "NHibernate" handle this?
It's usually called " timestamp"
ie in
* [LLBLGEN](http://davidhayden.com/blog/dave/archive/2006/10/24/ConcurrencyTimestampLLBLGenPro.aspx)
* [LINQTOSQL](http://mtaulty.com/CommunityServer/blogs/mike_ta... | [
-0.1846449077129364,
-0.1815272867679596,
0.40698474645614624,
-0.17870527505874634,
-0.13950446248054504,
-0.19013112783432007,
0.10182441771030426,
-0.14684027433395386,
-0.4996989369392395,
-0.531170129776001,
-0.05747687816619873,
0.07279908657073975,
-0.36301153898239136,
0.3963934779... | |
Is there any way to encrypt a bytearray without using a stream??
If you are concerned about disk I/O you can use a MemoryStream.
However, the RSACryptoServiceProvider class will operate on byte arrays. This class performs asymmetric encryption and decryption using an implementation of the RSA algorithm.
The examples ... | [
0.009962985292077065,
-0.07937327772378922,
0.22456367313861847,
0.2593269348144531,
-0.020338553935289383,
-0.11622390896081924,
0.0656978040933609,
-0.18894565105438232,
-0.28565871715545654,
-0.34426334500312805,
-0.10431666672229767,
0.5160717964172363,
-0.3001117408275604,
0.144813895... | |
I'm using git-svn with a couple of work projects and I've noticed that for just about every action I take, I get prompted for my Svn password. For some actions, I get prompted multiple times (presumably b/c there are several actions going on behind the scenes). For example, when cloning a repository, I'm prompted 5 tim... | [
0.581204354763031,
-0.006074588745832443,
0.19236887991428375,
0.13553543388843536,
-0.14677266776561737,
-0.15528663992881775,
0.21321986615657806,
0.03999830037355423,
-0.28843170404434204,
-0.6885465383529663,
0.1587071269750595,
0.41655272245407104,
-0.0048387302085757256,
0.4867300093... | |
me. Nothing else seemed to work. For anyone who doesn't know, the auth directory is in ~/.subversion (Mac/Linux). | [
0.39475566148757935,
-0.2341342568397522,
0.28297919034957886,
-0.08619753271341324,
-0.19768980145454407,
-0.0881049633026123,
0.20942866802215576,
0.7231723666191101,
-0.22313009202480316,
-0.3898932933807373,
-0.01011769287288189,
0.5036417245864868,
-0.0998104065656662,
0.5411386489868... | |
I'd like a `floor` function with the syntax
```
int floor(double x);
```
but `std::floor` returns a `double`. Is
```
static_cast <int> (std::floor(x));
```
guaranteed to give me the correct integer, or could I have an off-by-one problem? It seems to work, but I'd like to know for sure.
For bonus points, why the ... | [
0.3161484897136688,
0.27564531564712524,
0.15869496762752533,
-0.09830564260482788,
-0.0821855440735817,
0.02478763647377491,
0.28700757026672363,
-0.34008532762527466,
-0.2581210732460022,
-0.2974933683872223,
-0.16323356330394745,
0.22593700885772705,
-0.29953181743621826,
-0.05609791725... | |
all 64 bit integers exactly, so you may also end up with errors when you go beyond the point at which the accuracy of `double` is such that the difference between two consecutive doubles is greater than 1. | [
0.37863689661026,
0.38194602727890015,
0.22611011564731598,
-0.1044076457619667,
0.23734791576862335,
-0.15396255254745483,
0.4056495726108551,
-0.3242686688899994,
-0.3094558119773865,
-0.11272916942834854,
-0.21625956892967224,
0.3897017538547516,
-0.4898416996002197,
0.13101603090763092... | |
My Java application require a huge memory heap. I need to launch my application using
java -Xms32m -Xmx128m xyz.jar
Hence, I would like to create native launcher for my Java application, where I can pass the JVM heap size parameters in. I plan to use JSmooth <http://jsmooth.sourceforge.net/> for Windows platform.
Ho... | [
0.0983550101518631,
0.23551695048809052,
-0.07970346510410309,
0.3191716969013214,
-0.18615613877773285,
-0.12832283973693848,
0.07471193373203278,
0.08442363888025284,
-0.1490420699119568,
-0.7838393449783325,
0.049683693796396255,
0.415565550327301,
0.007525842636823654,
0.06219668313860... | |
shell script on linux/unix.
Only reason really is that the end user experience of using web start and or shell scripts on OSX just isn't that great, Mac users expect everything to work like a Mac app bundle. | [
0.03129925951361656,
-0.015202016569674015,
0.08540135622024536,
0.07779868692159653,
-0.15603351593017578,
-0.3162906765937805,
0.1426268368959427,
0.3132394850254059,
0.11190512031316757,
-0.8499529957771301,
-0.16751091182231903,
1.030028223991394,
-0.2501489222049713,
-0.24214859306812... | |
If my html looked like this:
```
<td class="controlCell">
<input class="inputText" id="SearchBag.CompanyName" name="SearchBag.CompanyName" type="text" value="" />
</td>
```
How could I select #SearchBag.CompanyName with JQuery?
I can't get it to work and I fear it's the dot that's breaking it all.
The annoying t... | [
0.2761063277721405,
0.23687444627285004,
0.3556462228298187,
-0.21301093697547913,
-0.3152354955673218,
-0.016666991636157036,
0.13746696710586548,
0.134836807847023,
-0.4889984726905823,
-0.6872923970222473,
0.0723629966378212,
0.21924172341823578,
-0.1623803824186325,
0.20922164618968964... | |
preceded by a hash #, there should be no ambiguity here
“#id.class” is a valid selector that requires both an id and a separate class to match; it's valid and not always totally redundant.
The correct way to select a literal ‘.’ in CSS is to escape it: “#id\.moreid”. This used to cause trouble in some older browsers ... | [
0.107382632791996,
-0.02504325844347477,
0.2121230512857437,
-0.18509966135025024,
-0.23110076785087585,
-0.27155235409736633,
0.04333893582224846,
0.044003818184137344,
-0.1554008275270462,
-0.6672855615615845,
-0.16466611623764038,
0.4060593247413635,
-0.31910040974617004,
0.089870050549... | |
In C#, i have created ArrayList using structures. so it creates multi dimensional array list.
```
public struct ParameterValues
{
public ArrayList al;
};
ArrayList alCombined = new ArrayList();
for(int i=0; i < CONDITION , i++)
alCombined.Add(obj.pValue.al);
```
The dimension of `ArrayList alCombined` depe... | [
-0.08913274109363556,
-0.00030445843003690243,
0.5705482363700867,
-0.3083539307117462,
-0.18525855243206024,
-0.02880629524588585,
0.1331384927034378,
-0.7231054902076721,
-0.20222100615501404,
-0.47337806224823,
-0.2387688159942627,
0.7963881492614746,
-0.6411386728286743,
-0.05620311945... | |
its a single/ multi dimensional arraylist.
FYI: it should not depend on CONDITION variable. like if d condition is more than one, then it will be multi dimensional for sure.
Thanks in advance.
There's really no such thing as a "multi-dimensional ArrayList". `ArrayLists` don't have a particular element type. You might ... | [
0.23622234165668488,
-0.30202966928482056,
0.04515388607978821,
0.17134444415569305,
-0.2805911600589752,
-0.1389879733324051,
0.2862546741962433,
-0.001022104173898697,
-0.33688029646873474,
-0.7800977826118469,
-0.1394239068031311,
0.3848436772823334,
-0.43557631969451904,
0.118275687098... | |
can cause all kinds of unexpected behaviour.
* Public fields are a bad idea. Avoid them. Fields are an implementation detail, and shouldn't be part of the API.
* `ArrayList` is effectively deprecated - use generic collections instead. That will make the type information much more clearer.
* You should design your data ... | [
0.5900757908821106,
0.016639726236462593,
0.055657874792814255,
0.017595982179045677,
-0.18218344449996948,
-0.2860572934150696,
0.6189850568771362,
0.11220381408929825,
-0.39212363958358765,
-0.7256443500518799,
-0.07066275179386139,
0.4155704975128174,
-0.4280187785625458,
-0.04059839248... | |
I have created a subclass of NSView to draw an image as a pattern:
```
@interface CePatternView : NSView
{
NSImage* image;
id observableObjectForImage;
NSString* keyPathForImage;
}
@end
```
I implemented the following to expose bindings:
```
+ (void)initialize
{
// Expose the "image" bind... | [
-0.09195862710475922,
-0.049107443541288376,
0.6886332035064697,
-0.1569642722606659,
-0.3997715711593628,
-0.0335906445980072,
0.2712611258029938,
-0.4516157805919647,
-0.04598869010806084,
-1.0429786443710327,
0.2217714786529541,
0.4588145911693573,
-0.4613177478313446,
0.135110065340995... | |
Builder.
**Do I really have to create an IBPlugin to expose bindings in Interface Builder?** That just seems way overkill for a custom view that I don't plan to reuse.
Answer to title: No, you can bind a custom view without an IB plug-in (by doing it in code).
Answer to question in question body: Yes, you do need a... | [
0.5432998538017273,
0.18340964615345,
0.4083608090877533,
-0.1510322242975235,
-0.39283180236816406,
-0.26847779750823975,
0.46843138337135315,
-0.3861719071865082,
-0.09926296770572662,
-0.709665834903717,
0.10750582814216614,
0.674608588218689,
-0.35458052158355713,
0.22151583433151245,
... | |
IB plug-in.
Also, IB plug-ins are not the same as the old IB palettes. Plug-ins require IB 3 and are much easier to create. Palettes require IB 2 and were painful to create. | [
0.042554449290037155,
-0.15265725553035736,
0.20258010923862457,
-0.016443520784378052,
-0.12134304642677307,
-0.0003976814332418144,
-0.10116435587406158,
-0.4643767774105072,
0.32266223430633545,
-0.704206645488739,
-0.25334587693214417,
0.5170972347259521,
-0.4766162931919098,
-0.270323... | |
If I have a drop down box, how can I have a default selection (know how to do this) which will change to another member in the drop down upon opening of the drop down?
For example: My drop down has 2 values - "Hello", and "Hello Back". "Hello" is the default (0) value, but how can I display "Hello Back" when the drop ... | [
0.4714718461036682,
-0.15029959380626678,
0.5028677582740784,
0.007834361866116524,
0.12592348456382751,
0.019009308889508247,
-0.05565933883190155,
-0.29814019799232483,
-0.08685240149497986,
-0.3349531590938568,
-0.05579567328095436,
0.5534713268280029,
-0.08822785317897797,
0.2364857792... | |
expose the binding in IB.
Your code doesn't run inside Interface Builder unless you put it into Interface Builder, and that `exposeBinding:` message is your code. Therefore, you need to put it into Interface Builder. That means writing an IB plug-in.
Also, IB plug-ins are not the same as the old IB palettes. Plug-ins... | [
0.3713677227497101,
0.13851520419120789,
0.1490788608789444,
-0.22426638007164001,
-0.4987630844116211,
-0.38690391182899475,
0.42667970061302185,
-0.5606561303138733,
0.18557108938694,
-0.8443059921264648,
-0.023122845217585564,
0.5122613310813904,
-0.6641488671302795,
0.09496593475341797... | |
So, i have the following script to use the google maps API, its all fine, but i need to create a map that has more than one Marker (the balloon shaped icon pointing to something) and i need each of those markers to point on a different area of the map (i.e. different coordinates), how can i do it?
```
<script type="te... | [
0.27196213603019714,
-0.036128103733062744,
0.86271071434021,
-0.013357712887227535,
0.008313940837979317,
-0.1355155110359192,
0.4260507822036743,
-0.34516724944114685,
-0.15661436319351196,
-0.7333083152770996,
-0.14328578114509583,
0.8295107483863831,
-0.36572012305259705,
0.03609736263... | |
var html="<img src='simplemap_logo.jpg' width='20' height='20'/> " +
"<%=maptitle%><br/>" +
"<%=text%>";
map.setCenter(new GLatLng(<%=coordinates%>), <%=zoom%>)
map.setMapType(G_HYBRID_MAP);
map.addOverlay(marker);
map.addControl(new GLargeMapControl());
... | [
-0.11726125329732895,
-0.5390395522117615,
1.039487361907959,
-0.30531004071235657,
-0.1119024008512497,
0.2544093728065491,
0.07799585163593292,
-0.5273823738098145,
-0.3368746340274811,
-0.8772948384284973,
-0.6478382349014282,
0.621811032295227,
-0.5255314111709595,
-0.15463757514953613... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.