text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
not meet your needs as stated, but I find those choices of interval a little peculiar. Perhaps you could explain how you determined them? | [
0.6537343859672546,
0.011322061531245708,
-0.2240055799484253,
0.19588501751422882,
0.18352460861206055,
0.20789656043052673,
-0.06106787547469139,
-0.0824589729309082,
0.018503926694393158,
-0.47291386127471924,
0.29729774594306946,
0.25566017627716064,
-0.042246874421834946,
0.0998715162... | |
Does anyone know of a working fix for the ie z-index bug? I have come across a few solutions but interested to see if anyone here knows of a better fix.
Thanks!
If you mean the [problem of IE6 not respecting the z-index on select controls](http://blogs.msdn.com/ie/archive/2006/01/17/514076.aspx), then yes.
There is ... | [
0.5509041547775269,
0.22759562730789185,
0.17246969044208527,
0.2215944528579712,
0.10440899431705475,
-0.24445176124572754,
0.38424643874168396,
0.4809611737728119,
-0.2750867009162903,
-0.4036581218242645,
-0.14251746237277985,
0.6360079050064087,
0.020704058930277824,
-0.003806229680776... | |
this luxury, in which case, you should try using the select free or a few others that turn up in google results. It sucks, but you will have to try one of them. | [
0.627616822719574,
-0.0945524349808693,
0.1410701423883438,
0.7105863094329834,
0.28981631994247437,
-0.32375970482826233,
0.06272381544113159,
0.4389303922653198,
-0.10740125179290771,
-0.6111404895782471,
0.32160186767578125,
0.5467031598091125,
0.19419953227043152,
0.10335540026426315,
... | |
Say I have some windows method and a struct:
```
struct SomeStruct{
int foo;
int bar;
int baz;
int bat;
}
SomeMethod(int a,int wParam, int lParam)
{
SomeStruct s;
// get lParam into SomeStruct
}
```
How to I get the lParam into a SomeStruct variable? I'm thinking that I need something like this (but feel fre... | [
0.20977585017681122,
0.22218099236488342,
0.5281181931495667,
-0.16036689281463623,
0.04497745633125305,
0.07077430933713913,
0.20089390873908997,
-0.13390474021434784,
0.05532194301486015,
-0.3432200253009796,
-0.16231335699558258,
0.5591582655906677,
-0.379878968000412,
0.014355893246829... | |
then you get at it by 'casting':
```
SomeStruct* s; //declare pointer-to-struct variable
s = (SomeStruct*) lParam; //assign integer value as pointer to struct
printf("the value of s->foo is %d", s->foo); //print result
``` | [
0.05866827815771103,
0.0038688669446855783,
0.4141940772533417,
-0.21981951594352722,
-0.08427368849515915,
0.12519018352031708,
0.06624548882246017,
-0.23813091218471527,
-0.08309444785118103,
-0.3686159551143646,
-0.2098040133714676,
0.5906941890716553,
-0.2778777778148651,
-0.1106030195... | |
I was wondering whether SVN actually compresses the binary content on the server during Commits? I know that the binary store the diffgrams for comparison and versioning but wondered whether a new file commited would occupy the same volume on the server as it does on the client pc?
I believe so.
From here: <http://sv... | [
0.413614958524704,
-0.01026440504938364,
0.5736151933670044,
-0.1140805184841156,
-0.3596043884754181,
-0.030914833769202232,
0.24055927991867065,
0.03972327336668968,
-0.37638983130455017,
-0.4641425311565399,
-0.24866648018360138,
0.5331306457519531,
-0.28914156556129456,
0.3038791418075... | |
in the client's working copy.
``` | [
0.554982602596283,
0.6205155849456787,
0.17005524039268494,
-0.08724844455718994,
0.4610294997692108,
-0.01662716083228588,
-0.14514966309070587,
0.14616070687770844,
-0.07874374836683273,
-0.49832668900489807,
-0.18139509856700897,
0.7706115245819092,
-0.1617378145456314,
0.12465701997280... | |
Using ASP.NET MVC Preview 5 (though this has also been tried with the Beta), it appears that querystring defaults in a route override the value that is passed in on the query string. A repro is to write a controller like this:
```
public class TestController : Controller
{
public ActionResult Foo(int x)
{
... | [
-0.214240163564682,
-0.6816839575767517,
0.4990529417991638,
0.0625777617096901,
-0.10200432687997818,
-0.09684815257787704,
0.25773561000823975,
-0.5479427576065063,
-0.42377418279647827,
-0.38418838381767273,
-0.2443213164806366,
0.3730256259441376,
-0.39222005009651184,
0.11695922166109... | |
new { controller = "Test", action = "Foo", x = 1 });
```
And then invoke it with this relative URI:
```
/Test/Foo?x=5
```
The trace output I see is:
```
1
5
```
So in other words the default value that was set up for the route is always passed into the method, irrespective of whether it was actually supplied on... | [
-0.03965495526790619,
-0.3898339867591858,
0.631195604801178,
-0.07341799139976501,
0.27337101101875305,
-0.27028903365135193,
0.04054122045636177,
-0.31332090497016907,
-0.021358350291848183,
-0.7953395843505859,
-0.11798928678035736,
0.3602147400379181,
-0.24286115169525146,
0.0308428630... | |
is passed in as the parameter value, giving the trace output:
```
5
5
```
This looks to me like a bug, but I would find it very surprising that a bug like this could still be in the beta release of the ASP.NET MVC framework, as querystrings with defaults aren't exactly an esoteric or edge-case feature, so it's almos... | [
0.26584598422050476,
-0.0643102303147316,
0.37209051847457886,
-0.12623003125190735,
0.0730024054646492,
-0.33645331859588623,
0.3104451894760132,
0.1330590695142746,
-0.23180945217609406,
-0.3449332118034363,
0.09281948953866959,
0.3548361659049988,
-0.5397573113441467,
0.1610090732574463... | |
you should keep what you are passing as a query string separate from the route values.
A way to work around them is to create default values yourself in the action if the values passed from the QueryString are null.
In your example, the route knows about x, therefore your url should really look like this:
```
/Test/... | [
0.06096827983856201,
-0.37779930233955383,
0.25093188881874084,
0.12201201170682907,
-0.12119461596012115,
-0.13079093396663666,
0.27868667244911194,
-0.1615239977836609,
-0.3230511248111725,
-0.7994340062141418,
-0.1051613837480545,
0.10973378270864487,
-0.44162893295288086,
-0.1244739890... | |
change like this:
```
public ActionResult Foo(int x, int? page)
{
Trace.WriteLine(x);
Trace.WriteLine(page.HasValue ? page.Value : 1);
return new EmptyResult();
}
```
Now the test:
> ```
> Url: /Test/Foo
> Trace:
> 1
> 1
>
> Url: /Test/Foo/5
> Trace:
> 5
> 1
>
> Url: /Test/Foo/5?page=2
> Trace:
> 5... | [
0.03404043987393379,
-0.20229481160640717,
0.6195052862167358,
-0.40562763810157776,
0.08695027232170105,
-0.07490769773721695,
0.34608790278434753,
-0.2933284640312195,
-0.15517212450504303,
-0.784583330154419,
-0.28399795293807983,
0.3370712697505951,
-0.21412576735019684,
0.190666317939... | |
I have a table which uses three columns as a composite key.
One of these column values is used as a sequence tracker for ordered related records. When I insert a new record I have to increment the sequence numbers for the related records that come after the new record.
I can do this directly in SQL Server Management ... | [
0.10522235929965973,
0.3311174213886261,
0.3698156177997589,
-0.19331619143486023,
0.08603531867265701,
0.029856327921152115,
0.07126857340335846,
-0.3656681776046753,
-0.3539596199989319,
-0.4797164499759674,
0.17158140242099762,
0.3803386390209198,
-0.3557796776294708,
0.2804984748363495... | |
existing one instead.
```
Can anyone suggest a way around this limitation?
(Adding a new record (as suggested by the error message) isn't really an option as the table with the composite key has a relationship with another table.)
The fix we implemented was as follows
* Deleted the relationship that used the compos... | [
0.13382162153720856,
0.055807024240493774,
0.3073723018169403,
0.07270237058401108,
0.30825650691986084,
0.3010714650154114,
0.09188590943813324,
-0.3127245306968689,
-0.02515789307653904,
-0.41649022698402405,
0.06685230880975723,
0.9181387424468994,
-0.42592281103134155,
-0.1294724345207... | |
I was trying to solve an LP with CPLEX.
It throws an exception "CPLEX Error 1001: Out of memory" when I am building the model.
Please note that I am getting this error while modelling and not while optimizing.
There are google results for Out of memory scenarios during optimization.
Your help is highly appreciated
Th... | [
-0.17683075368404388,
0.10475573688745499,
0.3199142515659332,
-0.050580672919750214,
0.12448738515377045,
0.11502151936292648,
0.02070128545165062,
-0.009398721158504486,
-0.5774670839309692,
-0.652145504951477,
-0.04372907429933548,
0.4243737757205963,
-0.20029687881469727,
0.11337412148... | |
a lot of space in the server memory; leaving no room for the CPLEX process.
After numerous trial and error experiments with different CPLEX parameters (all of them failed!), we attempted start the optimizer with `java -Xms512M -Xmx750M` and it worked!!! | [
-0.0711936429142952,
0.016023091971874237,
0.3451796770095825,
0.058100830763578415,
0.3055821359157562,
0.03140675649046898,
0.21036924421787262,
-0.021939389407634735,
-0.11882396042346954,
-0.31275951862335205,
-0.05993706360459328,
0.41925033926963806,
-0.24895907938480377,
-0.19618056... | |
I am running Redmine on Apache 2 with mod\_rails (passenger) 2.0.3 and Enterprise Ruby 1.8.6. Every so often I get a segfault from Apache when I try to login. Anyone know how I can debug this issue? I see something like this in Apache's error.log:
[Mon Jan 19 17:09:48 2009] [notice] child pid 8714 exit signal Segmenta... | [
0.04898960888385773,
0.41564345359802246,
0.17435865104198456,
-0.1047709509730339,
0.06703513860702515,
-0.2650611400604248,
1.0047637224197388,
0.050849441438913345,
-0.26059475541114807,
-0.4481510519981384,
-0.18139687180519104,
0.7629960775375366,
-0.24781131744384766,
-0.103240914642... | |
on the resulting core file. This will probably say "... generated by httpd", but it's as well to check.
3. Fire up `gdb` against the executable name from (2) and the core file from (1), and start digging. The command `where` (or `bt`) is a good place to start: this will give you a stack trace at the time the process du... | [
0.3576015532016754,
0.18661516904830933,
-0.09628454595804214,
-0.028189867734909058,
-0.1802477240562439,
-0.3131144344806671,
0.5408396124839783,
-0.10142215341329575,
-0.1921198070049286,
-0.564007580280304,
-0.13158439099788666,
0.6240770220756531,
-0.32751819491386414,
-0.086057983338... | |
your breath whilst waiting for an answer. At best, the failing function name might be a good string to feed to Google. | [
0.38340654969215393,
-0.20312240719795227,
0.07956274598836899,
0.2115316241979599,
0.029526708647608757,
0.2226705104112625,
0.5463916063308716,
0.19883057475090027,
0.11270646750926971,
-0.29364901781082153,
0.05883743241429329,
0.12497564405202866,
-0.14101804792881012,
-0.0623222999274... | |
today I was looking for a free collaborative code editor for Mac OS X, I don't really need it but I find the idea pretty charming. So I want to know you opinion about that: is there someone in real world who is using a collaborative code editor and gets some benefits out of it?
First steps are:
1. Find out where the c... | [
0.35602059960365295,
0.022022731602191925,
-0.0303900595754385,
0.2486753612756729,
-0.11619860678911209,
-0.3948684334754944,
0.237583190202713,
-0.0397782102227211,
0.037830423563718796,
-0.7177683711051941,
-0.06452043354511261,
0.7805448174476624,
-0.335569828748703,
-0.089325793087482... | |
executable name from (2) and the core file from (1), and start digging. The command `where` (or `bt`) is a good place to start: this will give you a stack trace at the time the process dumped core.
It sounds like you don't have a mass of C coding experience, so good luck! Tracking down this kind of error can be a real... | [
0.24815209209918976,
0.09572570025920868,
-0.16611741483211517,
0.07832669466733932,
0.12046559900045395,
-0.1906224638223648,
0.4682041108608246,
0.18582506477832794,
-0.08797162771224976,
-0.6976707577705383,
-0.22786767780780792,
0.3656328618526459,
-0.17399469017982483,
0.0335835777223... | |
I'm currently working on a program that has many of those "the user SHOULD read it but he'll click OK like a stupid monkey" dialogs... So I was thinking of adding something like a captcha in order to avoid click-without thinking...
My ideas were:
* Randomly change buttons
* Randomly position buttons somewhere on the ... | [
0.3348897695541382,
0.20742489397525787,
-0.08607223629951477,
0.04226899892091751,
-0.01594051718711853,
0.08816227316856384,
0.13859030604362488,
0.28885555267333984,
-0.38947492837905884,
-0.45018622279167175,
0.17803795635700226,
0.3324323296546936,
-0.3699699342250824,
0.1542458683252... | |
mine, but I don't think this is what you would like to hear...
Users like programs that they can depend on. They don't like when things change and they don't like to do extra work.
Randomly change buttons and Randomly position buttons somewhere on the form will only make them either press the wrong button or become a... | [
0.5167596340179443,
0.21189013123512268,
0.39609289169311523,
0.12834879755973816,
0.22908872365951538,
0.017568353563547134,
0.012135380879044533,
-0.09973426163196564,
-0.036360595375299454,
-0.4376322627067566,
0.0988694280385971,
0.6545906662940979,
-0.0685165673494339,
0.1590739637613... | |
press it without reading it. It Will happen exactly the same with your users.
* The user must click on a randomly colored word within the text he should read
* add captcha
* add captcha that includes the message for the user
With these 3 option you will add extra work to your application, your users will curse you fo... | [
0.3669228255748749,
0.0005403092945925891,
0.7275404334068298,
-0.011029946617782116,
0.016463110223412514,
0.26433897018432617,
0.16654179990291595,
-0.08452438563108444,
-0.16215525567531586,
-0.5735486149787903,
0.10354916006326675,
0.8045332431793213,
-0.34669581055641174,
-0.185325682... | |
for each file you try to check in?
I think it's our jobs to make the lives of the people that use our software easier. If they must read some kind of text and they don't want to, there is absolutely no way you can make them do it.
You can´t make people work right, all you can do is provide them with the best possibl... | [
0.6010437607765198,
0.3688751459121704,
0.08604243397712708,
0.1319211721420288,
0.3497270941734314,
-0.2911108136177063,
0.2986266016960144,
0.08068642765283585,
-0.009824048727750778,
-0.3795560896396637,
0.06281834840774536,
0.6571211814880371,
-0.1175340786576271,
-0.11766471713781357,... | |
should talk to them and EXPLAIN WHY this is important.
You would be surprised on how people commit to things they understand. | [
0.6382339596748352,
0.17619694769382477,
-0.2820688486099243,
0.3544085621833801,
-0.010024222545325756,
-0.30129799246788025,
0.3388979434967041,
0.21784500777721405,
-0.1860409677028656,
-0.45728546380996704,
0.014596495777368546,
0.6278599500656128,
0.1942003071308136,
-0.11511426419019... | |
What is a good javascript (book or site) that is not just focused on syntax but does a good job explaining how javascript works behind the scenes? Thanks!
If you don't want a book that starts with explaining JavaScript syntax, then:
* Watch the **video lectures of Douglas Crockford** in [YUI Theater](http://developer.... | [
0.40675732493400574,
0.20869530737400055,
0.029720477759838104,
0.056193895637989044,
-0.11613258719444275,
-0.22694168984889984,
0.05169510096311569,
-0.34913700819015503,
0.07170543819665909,
-0.314066082239151,
-0.18230439722537994,
0.7718119025230408,
0.09348897635936737,
-0.4133363962... | |
in your life with JavaScript. It teaches you what goes on under the hood of a JavaScript library like jQuery and how you would go to implement your own. | [
0.3796687722206116,
-0.1602928191423416,
-0.1434493064880371,
-0.05277370661497116,
0.12392228096723557,
-0.47025009989738464,
0.08267012983560562,
0.12963873147964478,
-0.07103720307350159,
-0.6253416538238525,
0.08146554976701736,
0.39890632033348083,
-0.007565501146018505,
-0.5640519857... | |
How do i get the location of the file that i used to open my programs with?
Example: if i create a new extention ".xyz" say and i tell windows that i want to open the file type .xyz with myapplication, then it starts my aplication. Great, but how does my application get a handle on the file path of the file that was ... | [
0.32709577679634094,
0.3215106725692749,
0.6777098774909973,
0.26226067543029785,
-0.04061909019947052,
-0.15372198820114136,
0.2096947580575943,
-0.13766857981681824,
-0.3533352017402649,
-0.5974167585372925,
-0.19702468812465668,
0.30572864413261414,
-0.17315427958965302,
0.2719475328922... | |
a torrent and you open 5 .torrent files they all just get passed to one application.
Side question: are all file extensions 3 letters long and is there a list of ones that are publicly used? If im creating a file extension I don't want to use one that is already used.
When you created your file association, you specif... | [
0.37249043583869934,
0.10277731716632843,
0.5060136914253235,
-0.14304667711257935,
-0.2074606567621231,
-0.30106350779533386,
0.4839067757129669,
-0.24573668837547302,
-0.2713809311389923,
-0.6434820890426636,
-0.09529734402894974,
0.570347011089325,
-0.30930066108703613,
0.36215272545814... | |
development environment. In Delphi, use the [`ParamCount`](http://delphibasics.co.uk/RTL.asp?Name=ParamCount) and [`ParamStr`](http://delphibasics.co.uk/RTL.asp?Name=ParamStr) functions.
When you create the file association, you can specify exactly where on the command line the document file name should go. Use `%1` s... | [
0.040300045162439346,
-0.019744185730814934,
0.18355585634708405,
-0.1339625120162964,
0.07731926441192627,
-0.10250810533761978,
0.20028150081634521,
-0.20195485651493073,
-0.03991038724780083,
-0.7061496376991272,
-0.5056387782096863,
0.6265396475791931,
-0.41819658875465393,
-0.08918918... | |
of the already-running instance, then you can write code to make your program look for already-running instances when it starts up. If it finds one, then it can communicate with that instance to tell it what file to open. You can effect that communication any number of ways, including mailslots, sockets, named pipes, m... | [
0.1249459758400917,
0.1383788138628006,
0.04249933734536171,
0.0887736901640892,
0.0038585348520427942,
0.04255248233675957,
0.2971380352973938,
0.17795293033123016,
-0.34914931654930115,
-0.7769800424575806,
-0.3313677906990051,
0.6690922975540161,
-0.3376542031764984,
0.3881036043167114,... | |
way. However, DDE seems to be falling out of favor nowadays, so check out some of the other options first.
For your side question, no, extensions are not always three characters long. Look around, and that should be obvious: C code goes in *.c* files, Adobe Illustrator graphics go in *.ai* files, and new Microsoft Wor... | [
0.3353565037250519,
0.10744479298591614,
0.5106918215751648,
-0.05363297462463379,
0.1608111411333084,
-0.14767764508724213,
0.21599633991718292,
-0.04233787581324577,
-0.23255345225334167,
-0.7839139103889465,
-0.15761886537075043,
0.6518496870994568,
-0.06152202561497688,
0.1214700862765... | |
Can [Shor's algorithm](http://en.wikipedia.org/wiki/Shor%27s_algorithm) be used for encryption, more specifically WEP encryption?
Why would you iterate and not use the standard copy algorithm?
```
std::copy( vector.begin(), vector.end(), std::back_inserter( list ) );
``` | [
0.12102886289358139,
0.31357771158218384,
0.30857548117637634,
0.1190350204706192,
0.2678070664405823,
-0.24978365004062653,
-0.07101663947105408,
-0.32815080881118774,
-0.19733281433582306,
-0.24512360990047455,
-0.26784148812294006,
0.6869125962257385,
-0.43861016631126404,
0.04419091343... | |
I am currently working on a REST library for .net, and I would like to hear some opinions about an open point I have: REST and authentication.
Here is an example of an RESTful interface used with the library:
```
[RestRoot("/user")]
public interface IUserInterface
{
[RestPut("/")]
void Add(User user);
[RestGet... | [
-0.020997989922761917,
-0.005720337387174368,
0.4586016833782196,
-0.23910757899284363,
-0.005507634952664375,
0.08562338352203369,
0.20058488845825195,
-0.14147835969924927,
-0.024967888370156288,
-0.9605618119239807,
-0.12429264187812805,
0.6524569988250732,
-0.4570240378379822,
-0.01615... | |
the major ways of either using HTTP Basic Auth or sending a token to requests requiring authenticated users.
The first method (HTTP Basic Auth), has the following issues (partly web browser specific):
* The password is transmitted with every request - even with SSL this has some kind of "bad feeling".
* Since the pas... | [
-0.14257027208805084,
-0.25753071904182434,
0.21642032265663147,
0.03382117301225662,
-0.4085198938846588,
-0.1852867603302002,
0.6452344655990601,
-0.07709065079689026,
-0.15854012966156006,
-0.7804319262504578,
-0.316892147064209,
0.5272625088691711,
-0.2974225878715515,
0.03958636149764... | |
of a page.
The issues for the second method are more focused on implementation and library use:
* Each request URI which needs authentication must have a parameter for the token, which is just very repetitive.
* There is a lot more code to write if each method implementation needs to check if a token is valid.
* The ... | [
-0.0830116719007492,
-0.03834710270166397,
0.43301624059677124,
0.2435654103755951,
-0.3254295885562897,
-0.08501189202070236,
0.2057250589132309,
-0.16526572406291962,
-0.2687907814979553,
-0.8322229385375977,
-0.0229877270758152,
0.050623081624507904,
-0.3802160620689392,
0.2180698513984... | |
as an HTTP header, but this would complicate usage with plain HTTP clients I guess.
The token would get passed back to the client as a custom HTTP header ("X-Session-Id") on each request.
This then could be completely abstracted from the interface, and any implementation needing authentication could just ask which us... | [
0.5613874197006226,
0.060677506029605865,
0.19858837127685547,
0.19595541059970856,
-0.1810947060585022,
-0.28287824988365173,
0.16449962556362152,
0.023202737793326378,
-0.20874539017677307,
-0.5277034044265747,
0.04346609488129616,
0.15564562380313873,
-0.2999589443206787,
0.264108479022... | |
application will need to be encoded to include the token. It would also negatively impact caching. Resources with a token that is constantly changing will no longer be able to be cached. Resource related information belongs in the URI, not application related data such as credentials.
It seems you must be targeting we... | [
0.054261334240436554,
0.06342726945877075,
0.0724889487028122,
0.3523918688297272,
-0.2304714471101761,
-0.21557211875915527,
0.18828438222408295,
0.030790362507104874,
-0.4582414925098419,
-0.9291636347770691,
-0.037984441965818405,
0.254658043384552,
-0.30972033739089966,
0.2080874890089... | |
with a browser. As long as you isolate the cookie handling code and make the rest of the application not rely on it you would be fine. The key is only store the user's identity in the session, nothing else. Do not abuse server side session state.
If you are targeting clients other than the browser then there are a num... | [
0.27007973194122314,
-0.06989344209432602,
0.17094813287258148,
-0.05937470868229866,
-0.28871670365333557,
-0.46914923191070557,
0.8630643486976624,
-0.22734344005584717,
-0.0505082905292511,
-0.5993495583534241,
-0.11305395513772964,
0.7175419926643372,
-0.04489042982459068,
-0.288690596... | |
isolate such behavior, the core of your application can still be RESTful. I highly recommend [RESTful Web Services](http://oreilly.com/catalog/9780596529260/ "RESTful Web Services") as a great source of REST information and approaches. | [
0.24391964077949524,
0.2624485194683075,
-0.03380186855792999,
-0.10075734555721283,
0.1874941885471344,
-0.20002658665180206,
0.4361181855201721,
0.22790463268756866,
-0.05299670994281769,
-0.45632150769233704,
-0.26184192299842834,
0.5486689209938049,
-0.03631850704550743,
0.050947923213... | |
I have a class that has a vector of another class objects as a member. In many functions of this class I have to do same operation on all the objects in the vector:
```
class Small
{
public:
void foo();
void bar(int x);
// and many more functions
};
class Big
{
public:
void foo()
{
fo... | [
0.006187143735587597,
-0.34476548433303833,
0.670892596244812,
-0.43432551622390747,
0.0508025586605072,
0.1904870569705963,
0.0030363635160028934,
-0.355989933013916,
-0.27801719307899475,
-0.6240243315696716,
-0.23420684039592743,
0.603786826133728,
-0.5457145571708679,
0.278843432664871... | |
}
void bar(int x)
{
for (size_t i = 0; i < VectorOfSmalls.size(); i++)
VectorOfSmalls[i]->bar(x);
}
// and many more functions
private:
vector<Small*> VectorOfSmalls;
};
```
I want to simplify the code, and find a way not to duplicate going other the vector in every function... | [
0.05146913602948189,
-0.029803022742271423,
0.5071038603782654,
-0.4050779640674591,
0.09515459835529327,
0.1417919099330902,
0.09835110604763031,
-0.10047759115695953,
-0.08701091259717941,
-0.6355852484703064,
0.0664757490158081,
0.6346566677093506,
-0.516951322555542,
0.1904870867729187... | |
But I am not sure that using pointers to functions in C++ is a good idea.
I have also been thinking about functors and [functionoids](http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.10), but it will force me to create a class per each function and it sounds like an overkill.
Another possible sol... | [
0.11625269055366516,
-0.0611095130443573,
0.36202242970466614,
-0.2238769680261612,
-0.16292230784893036,
0.13398997485637665,
0.1898314207792282,
-0.4158208966255188,
-0.24188508093357086,
-0.42147311568260193,
-0.02519768290221691,
0.655346155166626,
-0.5864123106002808,
0.15546262264251... | |
VectorOfSmalls[i]->foo();
else if (command == "bar")
VectorOfSmalls[i]->bar();
}
}
void Big::foo()
{
call_command("foo");
}
```
But it might work slow (unneeded creation of a string instead of just a function call), and also creates a problem if functions have different signature.
So what ... | [
0.18678832054138184,
-0.1763647347688675,
0.48535361886024475,
-0.20170284807682037,
-0.30187949538230896,
-0.0035705571062862873,
0.17073088884353638,
-0.2114809900522232,
-0.26942917704582214,
-0.5664958953857422,
0.23538602888584137,
0.9364442229270935,
-0.6128717064857483,
-0.081715434... | |
{
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::mem_fun(&Small::foo));
}
void bar() {
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::mem_fun(&Small::bar));
}
```
beyond that, you could use some macros to avoid retyping that a lot, but I'm not a huge fan of that. Personall... | [
0.06251775473356247,
-0.2503904104232788,
0.4477394223213196,
-0.2494194060564041,
-0.13291388750076294,
0.2157813459634781,
-0.013815715909004211,
-0.2266542911529541,
-0.3111415505409241,
-0.5187047123908997,
-0.045838721096515656,
0.639449417591095,
-0.5474716424942017,
-0.0741710960865... | |
your example you have the if to decide which to do inside the loop. It is more efficient to check outside the loop and have redundant copies of the loop since "which command" only needs to be decided once per call. (NOTE: you can make the command a template parameter if it is known at compile time, which it sounds like... | [
0.7060960531234741,
-0.02759402059018612,
0.20261183381080627,
-0.2632569670677185,
0.22079144418239594,
-0.2855960726737976,
0.21343675255775452,
-0.4151018261909485,
-0.4065558612346649,
-0.5847991108894348,
-0.006155914627015591,
0.41722217202186584,
-0.5918222665786743,
0.0542162805795... | |
case DO_FOO:
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::mem_fun(&Small::foo));
break;
case DO_BAR:
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::mem_fun(&Small::bar));
break;
}
};
```
Also, as you mentioned, it is fairly trivial to repla... | [
0.12557989358901978,
-0.1442018747329712,
0.5536715388298035,
-0.1391916424036026,
0.04883042350411415,
-0.014952065423130989,
0.0025755714159458876,
-0.41674724221229553,
-0.3357778489589691,
-0.324206680059433,
-0.1511555016040802,
0.5946714878082275,
-0.6874797940254211,
0.0437643826007... | |
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::mem_fun(fn));
}
};
```
Then you can do:
```
Big b;
b.doit<&Small::foo>();
b.doit<&Small::bar>();
```
The nice thing about both this and the regular parameter methods is that Big doesn't need to be altered if you change small to have more routines... | [
0.08848422020673752,
-0.21224039793014526,
0.69761723279953,
-0.25392428040504456,
0.04125513881444931,
0.028842903673648834,
0.08436328172683716,
-0.3139714002609253,
-0.5008370876312256,
-0.5737357139587402,
-0.35427188873291016,
0.6153233051300049,
-0.6330159306526184,
-0.13800999522209... | |
template<void (Small::*fn)()>
void doit() {
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::mem_fun(fn));
}
template<class T, void (Small::*fn)(T)>
void doit(T x) {
std::for_each(VectorOfSmalls.begin(), VectorOfSmalls.end(), std::bind2nd(std::mem_fun(fn), x));
}
pub... | [
0.2074860781431198,
-0.5006617903709412,
0.7566474676132202,
-0.07938610762357712,
0.11826806515455246,
0.13863351941108704,
0.023749656975269318,
-0.5525063276290894,
-0.29638442397117615,
-0.5678426027297974,
-0.27824386954307556,
0.4940163791179657,
-0.7606573104858398,
0.06960013508796... | |
I have a website which uses PHP and HTML pages, I want to create a session which stores a username from the login page. But the login pages are php and the next pages are html.
Is this a problem or can I just add a small statement of php into the html page saying
```
<?PHP session_start();
$_session['loginid']=$_pos... | [
0.5533417463302612,
0.3643343448638916,
-0.0150954844430089,
0.09651955962181091,
-0.3349961042404175,
-0.32393044233322144,
0.45007801055908203,
-0.048176027834415436,
-0.3934682011604309,
-0.5322179794311523,
0.2965700030326843,
0.5311620831489563,
-0.23860511183738708,
0.113877102732658... | |
.html file. You can do this by creating an **.htaccess** file (remember the . (dot) as the first character in that filename) on the document root of the site (probably public\_html/) and putting this into it:
```
# Add this to public_html/.htaccess file
AddHandler application/x-httpd-php .html
AddHandler application/x... | [
0.2922264337539673,
0.2840816080570221,
0.49832651019096375,
0.07724364101886749,
-0.03756897151470184,
-0.3253026306629181,
0.445801317691803,
0.05262285843491554,
-0.03955478221178055,
-0.747778594493866,
-0.40541329979896545,
0.2686045467853546,
-0.34992122650146484,
-0.1597523987293243... | |
I'm working on Linux system (Ubuntu 7.04 server with a 2.6.20 kernel).
I've got a program that has a thread (thread1) waiting on a select for a UDP socket to become readable.
I'm using the select (with my socket as the single readfd and the single exceptfd) instead of just calling recvfrom because I want a timeout.
... | [
0.366446316242218,
-0.07162195444107056,
0.4167473614215851,
-0.21944484114646912,
0.07730744034051895,
-0.13721443712711334,
0.14109651744365692,
0.23806096613407135,
-0.19349777698516846,
-0.8618423938751221,
-0.2805465757846832,
0.4255235195159912,
-0.36296001076698303,
0.55535382032394... | |
NOT terminate immediately, but will eventually timeout properly.
Can anyone tell me why it is that the select doesn't exit as soon as the socket is closed? Isn't that an exception? I can see where it isn't readable (obviously), but it's closed, which seems to be to be exeptional.
Here's the opening of the socket (all... | [
0.2903749942779541,
-0.29595619440078735,
0.7253317832946777,
-0.30226945877075195,
0.44908595085144043,
-0.13015934824943542,
0.5961537957191467,
-0.15087132155895233,
-0.2660895586013794,
-0.5855119824409485,
-0.48113036155700684,
0.5119146108627319,
-0.1429884433746338,
0.19396413862705... | |
portion
to.tv_usec = (timeout_ms%1000)*1000;// just the milliseconds
// converted to microseconds
// watch our one fd for readability or
// exceptions.
fd_set readfds, exceptfds;
FD_ZERO(&readfds);
FD_SET(m_sockfd, &readfds);
FD_ZERO(&exceptfds);
FD_SET(m_sockfd, &exceptfds);
int... | [
0.35839134454727173,
-0.3827918767929077,
0.7160892486572266,
-0.11719697713851929,
0.23618236184120178,
0.17785732448101044,
0.19381296634674072,
-0.19043110311031342,
0.02836599200963974,
-0.717638373374939,
-0.23279845714569092,
0.584101140499115,
-0.12236373871564865,
0.465538889169693... | |
the thinking behind this select behavior because it seems counter to my expectations. Thus, I obviously need to adjust my thinking on how the TCP stack works. Please explain it to me.
Maybe you should use something else to wake up the select. Maybe a pipe or something like that. | [
0.613080620765686,
-0.2515665590763092,
0.07569365948438644,
0.2505989968776703,
-0.16448315978050232,
-0.22964948415756226,
0.04273805022239685,
-0.027519050985574722,
-0.111903116106987,
-0.6195518374443054,
0.3829945921897888,
0.3266977369785309,
-0.28783610463142395,
0.2456450760364532... | |
I'm internationalizing an application into many different languages, and the following languages must be supported:
1. English
2. Spanish
3. German
4. French
5. Russian
6. Mandarin Chinese
7. Thai
We're also probably going to add support for:
1. Hindi
2. Portuguese
3. Any other language people at work speak and can ... | [
0.1761779934167862,
0.1713181585073471,
0.2721000909805298,
0.008241615258157253,
0.08295513689517975,
0.03293691202998161,
0.37354162335395813,
0.47372502088546753,
-0.08081405609846115,
-0.4666139483451843,
-0.17401982843875885,
0.33377864956855774,
-0.35043174028396606,
-0.2590677440166... | |
following route:
For latin-based character sets, we're going to use the [Gentium-based fonts](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium). These fonts are covered under the [Open Font License](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL), which means that we have to in... | [
0.2808522880077362,
0.3468421995639801,
0.10681559890508652,
-0.04549894854426384,
-0.2182684689760208,
0.34615400433540344,
0.1240055114030838,
0.36887127161026,
-0.0017494575586169958,
-0.737067461013794,
-0.12146027386188507,
-0.04838332533836365,
-0.007763117551803589,
-0.2430574297904... | |
than screen-based). | [
-0.14431919157505035,
-0.25122860074043274,
0.20785750448703766,
0.1524745672941208,
0.1993953138589859,
-0.11166346073150635,
-0.08548081666231155,
-0.19740717113018036,
-0.20308645069599152,
-0.412502259016037,
-0.07636522501707077,
0.6702510118484497,
-0.07111310958862305,
0.10780936479... | |
I support a web site which generates content XML that is then translated into web pages using XSLT. I have been asked to create a new stylesheet which will transform the output of the "archive" page into Atom for syndication. The problem I'm running into is that the archive page contains a rather large number of items ... | [
0.7279772162437439,
0.12161245197057724,
0.2200135439634323,
-0.10293149203062057,
-0.06909777224063873,
-0.16640855371952057,
0.015599321573972702,
0.031574688851833344,
-0.22000475227832794,
-0.6325781941413879,
-0.005451916716992855,
-0.029683394357562065,
-0.3004283905029297,
0.2065702... | |
<day>
<day>
...
</month>
...
</year>
...
</archive>
```
The `year` and `month` tags are used by the HTML transform but are completely irrelevant for an Atom feed. I had hoped that using the `position()` function with the descendant axis would work (`//day[position()>l... | [
0.2313031703233719,
-0.13826929032802582,
0.5530319809913635,
-0.06379232555627823,
-0.02072407864034176,
0.04098348692059517,
0.2680354714393616,
0.03768918290734291,
-0.002747422084212303,
-0.5430342555046082,
-0.3297756016254425,
-0.09751083701848984,
-0.261765718460083,
0.0087632769718... | |
all what I need. :-)
Is there a way to do this with XSLT or XPath? Having to modify the XML generator to add, say, a `feed="true"` attribute to the last thirty days seems like a pretty nasty kludge.
position()/last() returns position/last position within the current context, so when the navigator is positioned in one ... | [
0.3249818980693817,
-0.08091360330581665,
0.6564121246337891,
0.12611132860183716,
0.04970891773700714,
0.1336246132850647,
-0.03657341003417969,
-0.11645819246768951,
0.0218347180634737,
-0.4806946814060211,
0.08264761418104172,
0.7280612587928772,
-0.11935126036405563,
0.0181697774678468... | |
name="days" select="//day"/>
<xsl:apply-templates select="$days[position()>last()-30]" />
``` | [
0.4076387882232666,
-0.02619967609643936,
0.4182738661766052,
0.03235494717955589,
0.2701476216316223,
0.006941317580640316,
0.11823718249797821,
-0.049782563000917435,
-0.11120939999818802,
-0.5361745953559875,
-0.32326391339302063,
0.340880811214447,
-0.32378995418548584,
0.3133321106433... | |
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object.
This is my sample class:
```
Class Test
Private strText
P... | [
0.19514434039592743,
0.08010302484035492,
0.5315394401550293,
-0.06385486572980881,
-0.12008865177631378,
-0.033314406871795654,
0.40229520201683044,
-0.40218788385391235,
0.2880602777004242,
-0.4804079532623291,
-0.04741572588682175,
0.6198470592498779,
-0.12687233090400696,
0.17978541553... | |
End Property
Private Sub Class_Initialize()
Init
End Sub
Private Sub Class_Terminate()
End Sub
Private Function Init
strText = "Start Text"
End Function
End Class
```
And I create it
```
Set objTest = New Test
```
But would like to do something like this
``... | [
-0.008539552800357342,
-0.0026261163875460625,
0.3465779423713684,
0.12826715409755707,
0.04047645628452301,
-0.3641573488712311,
0.29551416635513306,
-0.30638939142227173,
0.29604852199554443,
-0.36423930525779724,
-0.33862587809562683,
0.45681971311569214,
-0.07124833762645721,
0.2126011... | |
two setps?
Just to alter slightly on svinto's method...
```
Class Test
Private m_s
Public Default Function Init(s)
m_s = s
Set Init = Me
End Function
Public Function Hello()
Hello = m_s
End Function
End Class
Dim o : Set o = (New Test)("hello world")
```
Is how I do it. Sadly no overloading th... | [
0.07671485841274261,
-0.32360804080963135,
0.3646543323993683,
-0.21393145620822906,
0.025387873873114586,
-0.033569395542144775,
0.26125624775886536,
-0.29076212644577026,
-0.1066199392080307,
-0.5822077989578247,
-0.10973499715328217,
0.7470235228538513,
-0.4830000102519989,
0.0419471748... | |
Select Case UBound(parameters)
Case 0
Set Init = InitOneParam(parameters(0))
Case 1
Set Init = InitTwoParam(parameters(0), parameters(1))
Else Case | [
-0.41068822145462036,
-0.5512678623199463,
0.31315067410469055,
0.07710345834493637,
-0.06334942579269409,
0.3619500994682312,
0.09201183915138245,
-0.5148552060127258,
0.1759205460548401,
-0.3943149149417877,
-0.1371031254529953,
0.3647700548171997,
-0.4389820992946625,
0.0122744422405958... | |
Set Init = Me
End Select
End Function
Private Function InitOneParam(parameter1)
If TypeName(parameter1) = "String" Then
m_s = parameter1
Else
m_i = parameter1
End If
Set InitOneParam = Me
End Function | [
-0.3173285722732544,
-0.4212034344673157,
0.31777042150497437,
-0.09396693855524063,
-0.1660720705986023,
0.2649857997894287,
0.1434321105480194,
-0.24926303327083588,
0.20645040273666382,
-0.2887642979621887,
-0.15166543424129486,
0.40681326389312744,
-0.5248169302940369,
0.28497132658958... | |
Private Function InitTwoParam(parameter1, parameter2)
m_s = parameter1
m_i = parameter2
Set InitTwoParam = Me
End Function
End Class
```
Which gives the constructors...
```
Test()
Test(string)
Test(integer)
Test(string, integer)
```
which you can call as:
```
Dim o : Set o = (New Test)... | [
-0.0002693331043701619,
-0.11962350457906723,
0.3864480257034302,
-0.04459083080291748,
-0.14054736495018005,
0.2986120879650116,
0.4743504822254181,
-0.31084299087524414,
0.021926505491137505,
-0.4249621033668518,
-0.09750468283891678,
0.6886456608772278,
-0.2858426570892334,
0.1306452900... | |
I have a semi-large web application that we run locally and I need to deploy it at another location. The second location will require some slight modifications to the project (especially cosmetic). How do you manage these differences and what do you use to distribute the site and updates to a customer like this?
Edit:... | [
0.44032278656959534,
-0.030282873660326004,
0.5603086352348328,
0.20216535031795502,
0.40019530057907104,
-0.07832954078912735,
0.06716126203536987,
0.042485132813453674,
-0.45765817165374756,
-0.6327471137046814,
0.14221684634685516,
0.5335413813591003,
-0.008739338256418705,
-0.071439750... | |
deploy and update is desirable.
Branch your code.
Hopefully your code is source controlled (if not, start now!), you should branch from the base to the "Customer X" branch and just make the slight cosmetic modifications in that branch. Then just build and deploy off of that branch for that customer.
Additionally, if ... | [
0.5554166436195374,
-0.208614781498909,
0.48725253343582153,
-0.04614945128560066,
0.3331708312034607,
-0.07315295189619064,
0.1846020668745041,
0.06088723987340927,
-0.2248920500278473,
-0.6364814043045044,
-0.3038829267024994,
0.6641092300415039,
-0.07356120645999908,
-0.0917654186487197... | |
Its good to note that configuration is practical, but ONLY if the # of changes are minor, otherwise you will pollute your code with configuration logic. (Thanks commenters)
So: Lots of changes --> Branch (more maintainable), few minor changes --> Make configurable (more practical). | [
0.2774539291858673,
-0.13412781059741974,
0.002079722471535206,
0.30038270354270935,
0.2061004787683487,
-0.24267806112766266,
0.5602778196334839,
0.3338108956813812,
-0.2884272336959839,
-0.8259602189064026,
-0.31121549010276794,
0.8623859286308289,
0.007318747229874134,
-0.09303786605596... | |
I want to turn a program I have into a service so I can use it without logging it. Basically what it does is it backs up specified folders to a specified location using SSH. However the problem I'm running into is I don't know how to tell it these items. I only know how to start, stop, and run a custom command with onl... | [
0.6626937985420227,
0.00823229644447565,
0.3212306797504425,
0.08328796923160553,
0.03366347774863243,
-0.053478799760341644,
0.5656157732009888,
0.03452252596616745,
-0.20616960525512695,
-0.7351067662239075,
-0.07537637650966644,
0.5077932476997375,
-0.1142522394657135,
0.371316879987716... | |
command line arguments at start-up. | [
-0.2756606340408325,
-0.04993026331067085,
-0.0651438757777214,
0.19334861636161804,
-0.2630522549152374,
0.1420849859714508,
-0.22151684761047363,
0.29860880970954895,
-0.07802523672580719,
-0.294789582490921,
-0.45588523149490356,
0.8669925332069397,
-0.014844058081507683,
-0.21266321837... | |
How can I find out how many rows a MySQL query returns in Java?
From the [jdbc faq](http://java.sun.com/products/jdbc/faq.html#18):
> .18. There is a method getColumnCount in the JDBC API. Is there a similar method
> to find the number of rows in a result set?
>
>
> No, but it is easy to find the number of rows. If... | [
0.1983826905488968,
0.14810289442539215,
0.5927286148071289,
0.06326554715633392,
0.06543517857789993,
-0.01226863730698824,
-0.0969875231385231,
-0.4348292350769043,
-0.49252840876579285,
-0.6765583753585815,
0.1831810623407364,
0.4035499691963196,
-0.14240425825119019,
0.0618457794189453... | |
or get the number of rows by submitting a query with a COUNT column in the SELECT clause. | [
-0.007681921124458313,
-0.13112495839595795,
0.1594228893518448,
0.12636904418468475,
-0.09899505972862244,
0.32120516896247864,
0.04861766844987869,
-0.4169447124004364,
-0.11451984941959381,
-0.31910786032676697,
-0.2068859487771988,
0.46304047107696533,
-0.35435086488723755,
-0.07092773... | |
I'm looping through a list of items, and I'd like to get a request parameter based on the item's index.
I could easily do it with a scriptlet as done below, but I'd like to use expression language.
```
<c:forEach var="item" items="${list}" varStatus="count">
<!-- This would work -->
<%=request.getParameter("ite... | [
-0.03013451211154461,
-0.17593207955360413,
0.3215092122554779,
0.20777980983257294,
-0.15447239577770233,
0.1724497526884079,
0.4492107033729553,
-0.7425267696380615,
-0.36022135615348816,
-0.36678120493888855,
-0.09745576232671738,
0.20973597466945648,
-0.4726279377937317,
-0.04293077439... | |
Problem statement: Implement a plug-in system that allows the associated assemblies to be overwritten (avoid file locking). In .Net, specific assemblies may not be unloaded, only entire AppDomains may be unloaded.
I'm posting this because when I was trying to solve the problem, every solution made reference to using m... | [
-0.009648645296692848,
0.26146119832992554,
-0.08327913284301758,
-0.1870284080505371,
-0.1542281210422516,
0.16114582121372223,
0.725062370300293,
-0.03703603148460388,
-0.31509244441986084,
-0.6386569142341614,
-0.12584595382213593,
0.19073030352592468,
-0.7964816093444824,
0.18335025012... | |
injected into the local AppDomain.
Also, this is relevant to IIS. IIS has a Shadow Copy setting that allows an executing assembly to be overwritten while its loaded into memory. The problem is that (at least under XP, didnt test on production 2003 servers) when you programmatically load an assembly, the shadow copy do... | [
0.12853212654590607,
-0.02203245460987091,
0.09202386438846588,
-0.311088502407074,
-0.026804469525814056,
0.029526717960834503,
0.38398686051368713,
-0.20619265735149384,
-0.25290846824645996,
-0.45119959115982056,
0.15685899555683136,
0.5712327361106873,
-0.6846635937690735,
-0.050031375... | |
Supply the byte array as an arguement to Assembly.Load
The following code assumes you know the FullName of an assembly.
```
Assembly assembly = null;
foreach(Assembly loadedAssembly in AppDomain.CurrentDomain.GetAssemblies())
if (loadedAssembly.FullName == "foobar, Version=1.0.0.0, Culture=neutral, PublicKeyToke... | [
0.4020128548145294,
0.08875405788421631,
0.5169826149940491,
-0.4412024915218353,
0.25742295384407043,
0.2596284747123718,
0.5242213010787964,
-0.4264933466911316,
-0.18483798205852509,
-0.7278679013252258,
-0.2186395227909088,
0.4690769612789154,
-0.4603266716003418,
0.29937025904655457,
... | |
you are looking for. 'GetAssemblyName(path)' does NOT inject the assembly into your current AppDomain.
Also note that this solution is not appropriate for applications that must only rarely restart AND the assemblies change with high frequency. Every time an assembly is loaded, the memory footprint of you application ... | [
0.20962803065776825,
-0.016453798860311508,
0.47615525126457214,
0.0739741250872612,
0.3980715572834015,
0.16451488435268402,
0.4118480980396271,
-0.07407134771347046,
-0.5453675985336304,
-0.7663597464561462,
-0.3436615765094757,
0.5307509899139404,
-0.4330354928970337,
0.2621126770973205... | |
with `Type`s. | [
0.10249191522598267,
0.3405629098415375,
0.14147131145000458,
-0.1187577173113823,
-0.20958049595355988,
0.17608679831027985,
0.13604885339736938,
-0.18969276547431946,
-0.10729363560676575,
-0.34338709712028503,
-0.481133371591568,
0.19986934959888458,
-0.5369645953178406,
0.1394845098257... | |
I'm connecting to my Subersion server (VisualSVN server 1.6.3) using Ankh v2.0.5250.202 on VS 2008
The current url for my repository is <https://svnserver:8443/svn/foo/foo/trunk/> and I want to switch to <https://svnserver:6002/svn/foo/foo/trunk/>
I'm using the "Switch To" tool to select a new URL 'available on the r... | [
0.2045489251613617,
0.039856523275375366,
0.8051648139953613,
0.04775286465883255,
-0.07554914057254791,
0.11312404274940491,
0.2806803286075592,
0.33276280760765076,
-0.30302029848098755,
-0.7977154850959778,
-0.04430186748504639,
0.3542783260345459,
-0.01165611483156681,
0.74505001306533... | |
such a config file)
Note : On the server side, I've juste changed the server port without touching anything else. I can browse through the repository using the repository explorer so I think the problem is on the client side.
In the daily builds of AnkhSVN (and since March 2009 the stable version) the Switch command w... | [
0.12765294313430786,
0.07334408909082413,
0.5277997851371765,
-0.1702684909105301,
0.13529308140277863,
-0.11150772869586945,
0.6243500709533691,
0.09612446278333664,
-0.5140929818153381,
-0.6317551732063293,
-0.14605584740638733,
0.47435981035232544,
-0.1522943526506424,
0.379750013351440... | |
There is a lot of interest and hype on Adobe Air lately. Is it deserving of this and are there any worthy competitors to Adobe in this space? The only Adobe Air application I have used is TweetDeck .. while I am not loving it, that may be a more a UI design/usability issue.
**One code base, many platforms.**
Flex/Air... | [
0.2527230679988861,
0.05038141459226608,
0.2970772981643677,
-0.026918211951851845,
-0.3471331000328064,
-0.19420963525772095,
0.1410759836435318,
-0.2003791481256485,
0.2128114104270935,
-0.7715286612510681,
0.06702488660812378,
0.38245517015457153,
-0.2830235958099365,
-0.241637229919433... | |
of ways it doesn't have the 10+ years of rich media history that Flash does.
What is remarkable about Air / Flex is that it truly provides the same experience on multiple platforms in a way very little has. The penetration of the Flash Player is as ubiquitous as the web browser. No need to install a 40 mb .net runtime... | [
0.28337210416793823,
0.05995899811387062,
0.4348520338535309,
0.2571771740913391,
-0.13304702937602997,
-0.4172915518283844,
-0.29658544063568115,
0.0031702411361038685,
-0.3068371117115021,
-0.8024402260780334,
-0.05627444013953209,
0.7066608667373657,
0.06149511784315109,
-0.203912228345... | |
a complete desktop experience (ala www.buzzword.com) in the browser without the AJAX battle that google docs had to go through. | [
-0.049703020602464676,
-0.1676584929227829,
0.270783007144928,
0.2734983265399933,
0.017586227506399155,
-0.32064852118492126,
0.34304410219192505,
0.26922935247421265,
-0.12340974807739258,
-0.6452082395553589,
-0.12821584939956665,
0.2733556926250458,
0.04523651674389839,
0.0229120701551... | |
I'd like the community's take on some thoughts I've had about Linq to Sql and other ORM mappers.
I like Linq to Sql and the idea of expressing data access logic (or CRUD operations in general) in your native development tongue rather than having to deal with the "impedance mismatch" between C# and SQL. For example, to... | [
0.04900052398443222,
-0.004992219619452953,
0.15720149874687195,
0.16350966691970825,
-0.04343967139720917,
-0.17924533784389496,
-0.05143845081329346,
-0.22918234765529633,
0.0825510025024414,
-0.45836567878723145,
-0.18641141057014465,
0.781578004360199,
-0.004554221872240305,
-0.0777592... | |
parameter (using a string to describe the "@EventID" argument), add the SQL query string to the Command class, execute the command, and then use (cast-type)nwReader["FieldName"] to pull each returned field value and assign it to a member of a newly created instance of my EventData class (yuck).
So, *that* is why peopl... | [
0.2178046852350235,
-0.11701107770204544,
0.4331326484680176,
0.18011154234409332,
-0.15618430078029633,
0.004184705205261707,
0.00532614765688777,
-0.13599272072315216,
0.003894187742844224,
-0.29869911074638367,
0.15838436782360077,
0.5316005945205688,
-0.07107269763946533,
0.25810706615... | |
that Microsoft is *doubling-down on a bad bet.*
So, what is wrong?
The problem is that there are [architecture astronauts](http://www.joelonsoftware.com/articles/fog0000000018.html), especially at Microsoft, who look at Linq to Sql and realize that it is not a true data management tool: there are still many things yo... | [
0.2880074381828308,
0.3970435559749603,
0.045343589037656784,
0.28782767057418823,
-0.2653939127922058,
-0.11825930327177048,
-0.043916504830121994,
0.11844872683286667,
-0.2544952630996704,
-0.17185381054878235,
0.11273030191659927,
0.5023608207702637,
-0.058308932930231094,
0.28778317570... | |
a mild discomfort (impedance mismatch between SQL and C#), Microsoft has proposed the equivalent of a space suit (full isolation) when a band-aid (Linq to SQL or something similar) would do just fine.
As far as I can see, developers are quite smart enough to master the relational model and then apply it intelligently... | [
0.20466448366641998,
0.12890571355819702,
-0.02172130160033703,
0.09805270284414291,
0.04804757237434387,
-0.5711045861244202,
0.2074977606534958,
-0.05206615850329399,
0.04647841304540634,
-0.49076634645462036,
-0.24792687594890594,
0.7438173890113831,
-0.07430500537157059,
-0.19067640602... | |
model, we're now faced with learning *two* query / CRUD languages. Worse yet, Linq is often difficult to test (you don't have a query window), removes us one layer from the real work we are doing (it generates SQL), and has very clumsy support (at best) for SQL constructs like Date handling (e.g. DateDiff), "Having" an... | [
0.1643376648426056,
0.015315722674131393,
0.2625265419483185,
0.38618582487106323,
-0.008459988981485367,
-0.2661726176738739,
0.1362316906452179,
-0.013159076683223248,
-0.2604621648788452,
-0.6215654611587524,
0.20882251858711243,
0.4646686911582947,
-0.136556476354599,
0.070060372352600... | |
supplement a C# class to encapsulate the call. Since you already know SQL, wouldn't you prefer to just enter something like this:
```
Select EventID, Title From Events Where Location=@Location
```
and end up with an EventData class that A) contains the EventID and Title fields as properties and B) has a factory met... | [
0.45573103427886963,
-0.2206600457429886,
0.1885472685098648,
0.1502615213394165,
0.09208524227142334,
-0.09403406083583832,
-0.14403794705867767,
-0.15516722202301025,
0.005303646437823772,
-0.3346022963523865,
-0.205344095826149,
0.830374538898468,
-0.17333608865737915,
-0.03674323484301... | |
question is: am I wrong? Should Microsoft rewrite the SQL infrastructure so that you don't have to learn SQL / relational data management any more? *Can* they rewrite the SQL infrastructure in this way? Or do you think that a very thin layer on top of SQL to eliminate the pain of setting up parameters and accessing dat... | [
0.46492889523506165,
0.5946433544158936,
-0.18342842161655426,
0.007275437004864216,
-0.15004459023475647,
-0.288512647151947,
-0.16341780126094818,
0.0014767934335395694,
-0.36052727699279785,
-0.0199815072119236,
0.20663811266422272,
0.5937483906745911,
0.26134392619132996,
0.19635531306... | |
to get started but is a very interesting read. Second, AnSGri points to one of Joel Spolsky's more prominent pieces: [The Law of Leaky Abstractions](http://www.joelonsoftware.com/articles/LeakyAbstractions.html). It isn't exactly on topic but it is close and is a great read.
Update 2: I've given the "answer" to ocdeci... | [
0.3638266324996948,
-0.07141813635826111,
0.3206009268760681,
0.27030470967292786,
-0.1622198522090912,
-0.4570191502571106,
-0.06155471131205559,
-0.17798565328121185,
0.1343732625246048,
-0.4901348650455475,
-0.05550803616642952,
0.3132377862930298,
0.10231878608465195,
0.059154305607080... | |
I'd like to thank everyone who contributed, I've upvoted everyone who I think gave a thoughtful answer.
For at least 6 years I have been using my own ORM that is based on a very simple concept: projection. Each table is projected into a class, and SQL is generated on the fly based on the class definition. It still requ... | [
0.31894874572753906,
0.1603710949420929,
0.27245205640792847,
0.054072845727205276,
-0.18401409685611725,
0.08116213977336884,
-0.20815253257751465,
0.17663970589637756,
-0.18336991965770721,
-0.5318807363510132,
0.2714674174785614,
0.0748964473605156,
0.19047540426254272,
0.19721865653991... | |
dropping it for. | [
0.05221455916762352,
0.07660354673862457,
0.1690473109483719,
0.0915055125951767,
-0.30667468905448914,
0.0948350727558136,
0.24180194735527039,
-0.07390285283327103,
-0.05513334646821022,
-0.10145936906337738,
-0.027060892432928085,
0.22342394292354584,
-0.07559122890233994,
-0.0666905120... | |
My Xcode target links against hdf5 library (using the Link Binary with Libraries build phase). libhdf5 is installed using MacPorts, thus /opt/local/lib contains both the dynamic (.dylib) and static (.a) versions of the library.
The text output from the build shows that there is, as expected, a `-lhdf5` in the linking ... | [
0.27080026268959045,
0.18662306666374207,
0.7638958692550659,
-0.18691016733646393,
-0.24815277755260468,
-0.23668424785137177,
0.20651568472385406,
0.04338325187563896,
0.022180447354912758,
-0.8523744344711304,
-0.10200627148151398,
0.6246822476387024,
-0.45354199409484863,
0.14246016740... | |
link against that copy, thus avoiding having dynamic and static versions in the same location.
In reaction to your comment on Eduard Wirch' answer: you can also control static linking for this one library only, if you replace -lhdf5 by -l/full/path/to/libhdf5.a | [
0.24074815213680267,
-0.07503955066204071,
0.2946595549583435,
-0.0024585959035903215,
-0.23526176810264587,
-0.29613417387008667,
0.32737424969673157,
-0.422054648399353,
-0.5241582989692688,
-0.35018661618232727,
-0.2093280553817749,
0.17469048500061035,
-0.5327873826026917,
0.2391798645... | |
Is there any recommendation against using this CTP? Is it unstable?
From the download page:
> Note: This CTP is for testing purposes
> only. Features and functionality may
> change before final release, and
> Microsoft may choose not to provide a
> final release.
Also, in the EULA.rtf:
> 2. TERM. The term of thi... | [
0.4124264419078827,
0.1061754897236824,
0.893899142742157,
0.14496733248233795,
0.40925416350364685,
-0.6782328486442566,
0.2680303752422333,
0.05849098414182663,
-0.08512002229690552,
-0.3066213130950928,
-0.5656565427780151,
0.48613569140434265,
-0.013851831667125225,
0.15358129143714905... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.