text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Does something like this affect performance badly?
```
var myQuery = from c in Customers select c;
var filter1 = from c in myQuery where c.ID > 2 select c;
myQuery = filter1;
var filter2 = from c in myQuery where c.Name.Contains("r") select c;
myQuery = filter2;
```
When I do this it seems to only do the actual ... | [
0.22914551198482513,
-0.2030019760131836,
0.44902902841567993,
-0.22959783673286438,
-0.23997658491134644,
-0.021923447027802467,
0.2257363647222519,
-0.24388542771339417,
-0.21126078069210052,
-0.6883092522621155,
0.09245374798774719,
0.4429982006549835,
-0.4901542365550995,
0.02568338997... | |
the database?
I'm trying to find out a good way to create queries based on a user's input so they can filter on different criteria. I'm not too worried about performance as long as doing this is not going to take a huge amount of time.
I also found posts about the Dynamic Linq library, but using that seems clunky an... | [
0.6772096157073975,
0.09472376108169556,
0.12402317672967911,
0.37761440873146057,
0.08181790262460709,
-0.13994567096233368,
-0.13104315102100372,
0.11656340956687927,
-0.30556848645210266,
-0.10913319140672684,
0.4310651421546936,
0.5542358160018921,
-0.20084547996520996,
0.1337087154388... | |
until an operation is performed that needs results so combining them does not necessarily result in additional trips to the database.
```
var query = db.Customers;
if (selectID.HasValue)
{
query = query.Where( c => c.ID > selectID.Value );
}
if (!string.IsNullOrEmpty( nameFilter ))
{
query = query.Where( c => c.... | [
-0.04372084140777588,
0.06046425923705101,
0.6484200358390808,
-0.2891194820404053,
0.409724622964859,
-0.10602220892906189,
0.19796426594257355,
-0.4497593343257904,
-0.1716701090335846,
-0.5680724382400513,
-0.5028746128082275,
0.3228134214878082,
-0.2721725404262543,
0.3374963104724884,... | |
We've built an application on top of ASP.NET MVC. We now need to allow our users to manage their documents online. As part of this system, users want to upload and share documents with other members of their organization.
We have an existing web application that needs this functionality as a value add. We are trying ... | [
0.3899601399898529,
0.21177394688129425,
0.4070512354373932,
0.3696010112762451,
0.24417778849601746,
-0.5486364364624023,
-0.029537200927734375,
-0.11143160611391068,
-0.3864439129829407,
-0.7154655456542969,
-0.13291198015213013,
0.31816911697387695,
0.12440522760152817,
0.09094704687595... | |
our domain model, and web user interface.
We need to be able to...
* upload documents
* see the version history of each document
* perform full text search
* calculate file size
We're considering:
* building our own domain model, and storing documents in a database
* integrating with subversion to use it as our bac... | [
0.5509750247001648,
0.11791960150003433,
0.4823213219642639,
0.36928874254226685,
0.04647243395447731,
-0.31616607308387756,
0.20102372765541077,
0.11195487529039383,
-0.12495781481266022,
-0.5571990609169006,
-0.11252151429653168,
0.4106574058532715,
-0.14557118713855743,
0.09994814544916... | |
our local developer machines, without needing a connection to a separate server
* we would like something light weight, and easy to upgrade & deploy
We opted to build our own domain model, and store documents in a SQL Server 2008 database. So far this has worked great for us. | [
0.31628039479255676,
0.22555623948574066,
0.14315608143806458,
0.16959436237812042,
-0.04371969401836395,
-0.19245117902755737,
0.0730779767036438,
0.1770687699317932,
0.019241563975811005,
-0.5880367755889893,
0.1281927227973938,
0.37373411655426025,
0.1282273232936859,
0.1180698797106742... | |
Suppose you want to add an extra layer of credentials on top of a SSL-encrypted login/password, but you don't want to increase complexity to the user. Is there a way to add the requirement of the possession of a dongle to web-server authentication schemes with existing cross-platform browser capabilities?
In other wor... | [
0.07306717336177826,
0.1709475815296173,
0.025986332446336746,
0.25485533475875854,
0.3082534670829773,
-0.30770736932754517,
0.06576591730117798,
-0.29732051491737366,
-0.2528340220451355,
-0.47071096301078796,
-0.3651971220970154,
0.45359039306640625,
-0.12188063561916351,
-0.21967093646... | |
a plugin.
Thoughts and suggestions are appreciated.
You may be interested in the [Yubikey](http://www.yubico.com/products/yubikey/).
It's a small usb dongle that acts as a usb keyboard (i.e. needs no special drivers or client software) and is designed exactly for this sort of authentication. | [
0.059880685061216354,
-0.2054547369480133,
0.264565110206604,
0.40057244896888733,
0.06296814233064651,
-0.24996110796928406,
-0.2801344394683838,
0.4569809138774872,
0.048721518367528915,
-0.09678763151168823,
-0.2836899161338806,
0.30969828367233276,
-0.05879300832748413,
0.0449251979589... | |
I'm developing a website in PHP and I have large JS files that I want to compress. So, I added this in my .htaccess file:
```
<FilesMatch "\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
```
It works great on my local wamp server install but once I move the files on my shared server, the DE... | [
0.2694302201271057,
0.059373244643211365,
0.7325144410133362,
-0.02010413631796837,
-0.21790415048599243,
-0.3537810444831848,
0.5080119967460632,
-0.14135748147964478,
0.07887353003025055,
-0.687873125076294,
0.04912443831562996,
0.8289173245429993,
-0.5480523109436035,
-0.068029940128326... | |
anyone know why it works on my localhost and not on my webserver too ? Is there any module/extension that I need to enable on my webserver that I don't know of ?
Any ideas ?
Thank you!
Are you sure mod\_deflate is loaded and available? Apache doesn’t throw an error if you set it as filter although it is not loaded.
... | [
0.5655110478401184,
-0.11269185692071915,
0.27892452478408813,
0.1991545408964157,
-0.19044102728366852,
-0.6175225377082825,
0.5480937361717224,
-0.07527290284633636,
-0.45213907957077026,
-0.6245905756950378,
-0.10739481449127197,
0.8676081895828247,
-0.3342258632183075,
-0.1580923944711... | |
I have read that when hashing a password, many programmers recommend using the BCrypt algorithm.
I am programming in C# and is wondering if anyone knows of a good implementation for BCrypt? I found [this page](http://derekslager.com/blog/posts/2007/10/bcrypt-dotnet-strong-password-hashing-for-dotnet-and-mono.ashx), b... | [
0.3634864389896393,
0.17981138825416565,
0.19085079431533813,
-0.10434044152498245,
-0.1734291911125183,
-0.4244937598705292,
0.28021296858787537,
-0.008731340058147907,
-0.09704408794641495,
-0.17718717455863953,
-0.05277848616242409,
0.6617160439491272,
-0.2722460925579071,
0.05667787417... | |
act of taking a string and producing a sequence of characters that **can** be decrypted to the original string through the use of the same encryption key that encrypted it.
**[Rainbow Table](http://en.wikipedia.org/wiki/Rainbow_table)** - a lookup table that contains all variations of characters hashed in a specific h... | [
0.052133675664663315,
-0.1957170069217682,
0.07144975662231445,
0.10071699321269989,
-0.2386161834001541,
-0.06999225914478302,
0.330059677362442,
-0.2993631064891815,
-0.26846471428871155,
-0.5484027862548828,
0.00635779881849885,
0.040806591510772705,
-0.2656787037849426,
0.0150683112442... | |
here](http://bcrypt.codeplex.com/). I don't know enough about cryptography to say whether it's a good or bad implementation. Cryptography is a very deep field. **Do not attempt to build your own encryption algorithm**. Seriously.
If you are going to implement your own password security (sigh), then you need to do sev... | [
0.4180380702018738,
0.2783123850822449,
0.12083414942026138,
0.008644932880997658,
-0.05752386897802353,
-0.3468882739543915,
0.38316822052001953,
-0.4699719250202179,
-0.17090745270252228,
-0.6172303557395935,
0.18837666511535645,
0.3719722628593445,
-0.03971967473626137,
-0.0154214669018... | |
just take him a really long time. That's your chief enemy: **Time**.
The [bcrypt algorithm works because it takes *five* orders of magnitude longer to hash a password than MD5](http://codahale.com/how-to-safely-store-a-password/); (and still much longer than AES or SHA-512). It forces the hacker to spend a lot more ti... | [
0.06852693855762482,
0.10790207982063293,
0.01964106597006321,
0.12383411079645157,
0.10231532156467438,
-0.17401209473609924,
0.25225064158439636,
0.013629968278110027,
-0.35443809628486633,
-0.6696836352348328,
0.08310341835021973,
0.196780264377594,
-0.03786040470004082,
0.0653601139783... | |
have a rainbow table for one salted+hashed password. That means if you have 1 million users, a hacker has to generate 1 million rainbow tables. If you're using the same salt for every user, then the hacker only has to generate 1 rainbow table to successfully hack your system.
If you're not salting your passwords, then... | [
0.22025194764137268,
0.19037176668643951,
0.033720098435878754,
0.24345047771930695,
-0.13044212758541107,
-0.02065272070467472,
0.4023406207561493,
-0.2814294993877411,
-0.49728766083717346,
-0.6811521649360657,
0.09671580046415329,
0.10033018887042999,
-0.2767600119113922,
0.213679432868... | |
themselves*.
Even with all this, [you've got to be using good security practices](https://softwareengineering.stackexchange.com/questions/46716/what-technical-details-should-a-programmer-of-a-web-application-consider-before). If they can successfully use another attack vector (XSS, SQL Injection, CSRF, [et. al.](https... | [
0.7949859499931335,
0.23023498058319092,
-0.05603962391614914,
0.24041415750980377,
-0.030217796564102173,
-0.13788092136383057,
0.5267218947410583,
-0.15538564324378967,
-0.34321990609169006,
-0.5746762156486511,
-0.19490130245685577,
0.5925313234329224,
-0.27956509590148926,
-0.351462066... | |
Jeff Atwood: [You're probably storing passwords incorrectly](http://www.codinghorror.com/blog/2007/09/youre-probably-storing-passwords-incorrectly.html)
4. Jeff Atwood: [Speed Hashing](http://www.codinghorror.com/blog/2012/04/speed-hashing.html)
**Note:** Please recommend other good resources. I've must have read a do... | [
0.2199556976556778,
0.44251495599746704,
-0.36098140478134155,
0.28568100929260254,
-0.03525995463132858,
0.006429582368582487,
0.41771045327186584,
-0.028317030519247055,
-0.07252170890569687,
-0.6169612407684326,
-0.31333237886428833,
0.5818568468093872,
-0.10453049838542938,
-0.39903637... | |
I have a List of a "complex" type - an object with a few string properties. The List itself is a property of another object and contains objects of a variety of types, as shown in this abbreviated class structure:
```
Customer {
public List<Characteristic> Characteristics;
.
.
.
}
Characteristic {
pub... | [
0.12843526899814606,
0.1600220501422882,
0.5520493984222412,
-0.12553168833255768,
0.07920653373003006,
0.24024364352226257,
-0.14623014628887177,
-0.11795999854803085,
0.06517305225133896,
-0.5398136973381042,
0.05025932565331459,
0.8008143305778503,
-0.07425038516521454,
0.33264195919036... | |
customer.Characteristics.FindAll(
delegate (Characteristic interest) {
return interest.CharacteristicType == "Interest";
}
);
List<string> interests = interestCharacteristics.ConvertAll<string>(
delegate (Characteristic interest) {
return interest.CharacteristicValue;
}
);
```
That works fine... | [
0.08474653959274292,
-0.10136140137910843,
0.5799146294593811,
-0.37872812151908875,
0.10040382295846939,
0.27870821952819824,
-0.08053093403577805,
-0.14254233241081238,
0.012987261638045311,
-0.3446100354194641,
0.16625797748565674,
0.8903009295463562,
-0.2223665565252304,
0.230181425809... | |
I can't change it's structure to simplify it, and there are other aspects of the class that are important, just not in relations to this problem.
Any pointers or additional reading welcomed.
Here's a generator implementation
```
public static IEnumerable<string> GetInterests(Customer customer)
{
foreach (Characte... | [
0.04432244226336479,
-0.14758093655109406,
0.5195489525794983,
-0.09254975616931915,
0.10960330814123154,
0.03503013774752617,
0.017203528434038162,
-0.06950672715902328,
0.11337273567914963,
-0.6576455235481262,
0.015263499692082405,
0.907415509223938,
-0.24017810821533203,
0.121041625738... | |
.Where(c => c.CharacteristicType == "Interest")
.Select(c => c. CharacteristicValue);
``` | [
-0.051093924790620804,
-0.3310934007167816,
0.43516799807548523,
-0.09404373168945312,
0.3248003423213959,
-0.11371687054634094,
-0.17845489084720612,
-0.029517244547605515,
0.13187113404273987,
-0.5391637682914734,
-0.3273039162158966,
0.8019638061523438,
-0.383228063583374,
0.28390145301... | |
How can I get the value (string) of the current selection in a combobox?
(Not the integer index)
There might be a better way (my MFC is a bit rusty), but it seems like you should be able to call `CComboBox::GetLBText()`, passing it the current selection using `CComboBox::GetCurSel()`. | [
0.16869708895683289,
-0.35634133219718933,
0.3871726393699646,
0.10355133563280106,
0.022864069789648056,
-0.09670282900333405,
-0.08814180642366409,
-0.2401689738035202,
-0.14233577251434326,
-0.6005618572235107,
0.038734570145606995,
0.43575483560562134,
-0.29095497727394104,
0.142416447... | |
Is it possible to step though Classic ASP VB code without Visual interdev or other such IDEs? I'm currently using Notepad++ to maintain a old ASP project and the ability to step though code at certain types would be helpful.
Thank You,
Frank
Debugging ASP also works with Visual Studio 2005, not sure about the Express ... | [
0.009017936885356903,
-0.024773824959993362,
0.010229252278804779,
0.10810130089521408,
-0.19816377758979797,
-0.3321380913257599,
0.5581113696098328,
-0.0615086667239666,
-0.3467600643634796,
-0.3303258419036865,
0.14176318049430847,
0.5508065819740295,
-0.11580286920070648,
-0.1763539761... | |
Visual Studio complains: **Warning 1 The designer must create an instance of type 'RentalEase.CustomBindingNavForm' but it cannot because the type is declared as abstract.**
Visual Studio won't let me access the Designer for the form. The class already implements all abstract methods from the CustomBindingNavForm. Cu... | [
0.5993627905845642,
-0.11668191850185394,
0.21860331296920776,
-0.24666063487529755,
-0.30346396565437317,
-0.39346036314964294,
0.4276086091995239,
-0.46007734537124634,
-0.15453822910785675,
-0.4879358112812042,
0.018193911761045456,
0.7143079042434692,
-0.6041385531425476,
0.14606437087... | |
protected bool isUpdating = false;
/// <summary>
/// This is so that when a new item is added, it sets isNew and firstPass to true. The Position Changed Event will look for
/// firstPass and if it is true set it to false. Then on the next pass, it will see it's false and set isNew to false.
... | [
0.09468550980091095,
-0.26624244451522827,
0.31242355704307556,
-0.09883587807416916,
0.117730051279068,
-0.20492862164974213,
0.6480357050895691,
-0.45997655391693115,
-0.2802498936653137,
-0.3693826496601105,
-0.19332152605056763,
0.6141951680183411,
-0.22309570014476776,
0.0337330549955... | |
when a new item is added.
/// </summary>
protected bool firstPass = false;
protected abstract bool validateInput();
protected abstract void saveToDatabase();
//manipulating binding
protected abstract void bindingSourceCancelResetCurrent();
protected abstract voi... | [
0.2982391119003296,
-0.12187515944242477,
0.3232860565185547,
-0.12587536871433258,
0.04791892319917679,
0.03667335584759712,
0.3155509829521179,
-0.4077466130256653,
-0.36141684651374817,
-0.41401976346969604,
-0.4307463467121124,
0.3314143419265747,
-0.4896182715892792,
0.241277635097503... | |
void bindingSourceMoveNext();
protected abstract void bindingSourceMoveLast();
protected abstract void bindingSourceMovePrevious();
protected abstract void bindingSourceAddNew();
public void bindingNavigatorMovePreviousItem_Click(object sender, EventArgs e) {
if (validateInp... | [
0.14893920719623566,
-0.1562383621931076,
0.4412265419960022,
-0.20931307971477509,
0.25914138555526733,
0.03866409510374069,
0.349194198846817,
-0.233180969953537,
-0.2724290192127228,
-0.6723584532737732,
-0.4214491546154022,
0.641830563545227,
-0.2628174126148224,
0.3883447051048279,
... | |
DialogResult cont = MessageBox.Show(null, "There are errors in your data. Click Cancel to go back and fix them, or ok to continue. If you continue, changes will not be saved.", "Continue?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
if (cont == DialogResult.OK... | [
-0.3936867415904999,
-0.17270195484161377,
0.8294026255607605,
-0.24998660385608673,
0.34915027022361755,
0.30794939398765564,
0.2762659192085266,
-0.25993871688842773,
-0.22262942790985107,
-0.39468321204185486,
-0.2630005478858948,
0.5031194090843201,
-0.5456540584564209,
0.0089938137680... | |
bindingSourceRemoveCurrent();
isNew = false;
} else {
bindingSourceCancelResetCurrent(); | [
-0.3205823302268982,
-0.21656131744384766,
0.7538462281227112,
-0.32639938592910767,
0.3178630769252777,
-0.19154496490955353,
0.5007543563842773,
-0.7009757161140442,
0.06030534952878952,
-0.6259132623672485,
-0.018758587539196014,
0.5980564951896667,
-0.3092419505119324,
0.23319596052169... | |
bindingSourceMovePrevious();
}
}
}
}
public void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) {
if (validateInput()) { | [
0.025610871613025665,
-0.30995580554008484,
0.5404654741287231,
-0.09552866220474243,
0.04197078198194504,
-0.2747437059879303,
0.4993148446083069,
-0.440662145614624,
-0.2271122932434082,
-0.6585403084754944,
-0.26853451132774353,
0.47015106678009033,
-0.46202602982521057,
0.4800048470497... | |
saveToDatabase();
bool temp = isUpdating;
isUpdating = true;
bindingSourceAddNew();
isUpdating = temp;
isNew = true; | [
0.0494067445397377,
-0.18373361229896545,
0.6549240350723267,
-0.3310408890247345,
0.36672207713127136,
-0.11849550902843475,
0.7644385695457458,
-0.3413429856300354,
-0.15560701489448547,
-0.5248819589614868,
-0.27805548906326294,
0.34724944829940796,
-0.6209999322891235,
-0.0312548205256... | |
firstPass = true;
} else {
DialogResult cont = MessageBox.Show(null, "There are errors in your data. Click Cancel to go back and fix them, or ok to continue. If you continue, changes will not be saved.", "Continue?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButto... | [
-0.17849649488925934,
-0.378170371055603,
0.6088951826095581,
-0.0652824267745018,
0.2363460510969162,
0.21276015043258667,
0.6587923169136047,
-0.3328208923339844,
-0.13663354516029358,
-0.7184967994689941,
-0.20024718344211578,
0.5889055728912354,
-0.33891168236732483,
0.0726342275738716... | |
if (isNew) {
bindingSourceRemoveCurrent();
isNew = false;
} else { | [
-0.2673276364803314,
-0.34290269017219543,
0.4697227478027344,
-0.44895777106285095,
0.36608070135116577,
-0.22086209058761597,
0.5679501295089722,
-0.5618135333061218,
0.05643081292510033,
-0.3314276337623596,
-0.019345777109265327,
0.6475089192390442,
-0.17187964916229248,
0.130329951643... | |
bindingSourceCancelResetCurrent();
}
bool temp = isUpdating;
isUpdating = true;
bindingSourceAddNew(); | [
-0.1458120346069336,
-0.15829218924045563,
0.7838243842124939,
-0.27082785964012146,
0.17343363165855408,
-0.2435000091791153,
0.6583846807479858,
-0.5639247894287109,
-0.12116844952106476,
-0.49017783999443054,
-0.2679564952850342,
0.4420713186264038,
-0.531815767288208,
0.27576944231987,... | |
isUpdating = temp;
isNew = true;
firstPass = true;
}
}
} | [
-0.1998758763074875,
-0.5463382601737976,
0.4333571195602417,
-0.11407003551721573,
0.15512710809707642,
-0.017161885276436806,
0.7974105477333069,
-0.2768074870109558,
-0.2673231065273285,
-0.6395168304443359,
-0.09797299653291702,
0.4735037386417389,
-0.4093966782093048,
-0.1951045095920... | |
public void bindingNavigatorMoveFirstItem_Click(object sender, EventArgs e) {
if (validateInput()) {
bindingSourceMoveFirst();
} else {
DialogResult cont = MessageBox.Show(null, "There are errors in your data. Click Cancel to go back and fix them, or ok to continu... | [
0.0817265510559082,
-0.14939433336257935,
0.5175730586051941,
-0.09815167635679245,
0.31340792775154114,
-0.042628876864910126,
0.6124781370162964,
-0.12818218767642975,
-0.4169369637966156,
-0.46249282360076904,
-0.2714756727218628,
0.4393584430217743,
-0.5084377527236938,
0.4099636077880... | |
be saved.", "Continue?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
if (cont == DialogResult.OK) {
if (isNew) {
bindingSourceRemoveCurrent();
isNew = false; | [
-0.13780876994132996,
-0.2800435423851013,
0.6968515515327454,
-0.3612792193889618,
0.5301531553268433,
0.12371499091386795,
0.48138365149497986,
-0.40582364797592163,
-0.007440382149070501,
-0.5278427004814148,
-0.23575913906097412,
0.6324593424797058,
-0.34720873832702637,
0.145092412829... | |
} else {
bindingSourceCancelResetCurrent();
}
bindingSourceMoveFirst();
} | [
-0.2620946168899536,
-0.12273016571998596,
0.4715334177017212,
-0.30138885974884033,
0.3615199327468872,
-0.15175116062164307,
0.40010085701942444,
-0.3584018349647522,
0.03859966620802879,
-0.7250759601593018,
-0.06534498929977417,
0.6368922591209412,
-0.19469766318798065,
0.2945178747177... | |
}
}
public void bindingNavigatorMoveNextItem_Click(object sender, EventArgs e) {
if (validateInput()) {
bindingSourceMoveNext();
} else {
DialogResult cont = MessageBox.Show(null, "There are errors | [
0.05991290882229805,
-0.2269456684589386,
0.46598199009895325,
-0.09368089586496353,
0.31423619389533997,
0.060535598546266556,
0.6181684136390686,
-0.1989215910434723,
-0.2569167912006378,
-0.6194401979446411,
-0.14014080166816711,
0.5421434044837952,
-0.5146843194961548,
0.27554821968078... | |
in your data. Click Cancel to go back and fix them, or ok to continue. If you continue, changes will not be saved.", "Continue?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
if (cont == DialogResult.OK) {
if (isNew) {
... | [
-0.1687774807214737,
-0.24071362614631653,
0.878510594367981,
-0.14445358514785767,
0.7058700919151306,
0.08106176555156708,
0.24224244058132172,
-0.16952009499073029,
-0.38584470748901367,
-0.5799156427383423,
-0.20762354135513306,
0.4969444274902344,
-0.3573954701423645,
0.23786506056785... | |
isNew = false;
} else {
bindingSourceCancelResetCurrent();
} | [
-0.23966091871261597,
-0.328433096408844,
0.5214293599128723,
-0.29501527547836304,
0.31586092710494995,
-0.15542291104793549,
0.5036357641220093,
-0.5172906517982483,
0.07383023947477341,
-0.5211355090141296,
0.13087819516658783,
0.5727071762084961,
-0.1435309201478958,
0.1656739860773086... | |
bindingSourceMoveNext();
}
}
}
}
```
I haven't seen the content at urban potato (its down) but Me and [Smelch](https://stackoverflow.com/users/245808/smelch) came up with a solution. **`Form` itself inherits from an abstract class, so** what they dont tell you is that **its only... | [
0.005524251144379377,
0.058598391711711884,
0.5060223340988159,
-0.04573952406644821,
-0.06911702454090118,
-0.30630728602409363,
0.08129201084375381,
-0.4127386808395386,
-0.2828134596347809,
-0.6162267327308655,
-0.028648698702454567,
0.3254590928554535,
-0.32351571321487427,
0.191436588... | |
of having an empty class in the middle and wrapping an `#if debug` around the forms declaration and you're good to go. Just be sure to release in release mode and design in debug mode (which is very typical).
You'll get full designer support and a real abstract base class at design (debug) and build (release) time bec... | [
0.2806837260723114,
-0.10060321539640427,
0.48452356457710266,
-0.13117897510528564,
0.2964826822280884,
-0.538195013999939,
0.19535405933856964,
-0.08670713007450104,
-0.19355393946170807,
-0.6919268369674683,
-0.4632132649421692,
0.7402186393737793,
-0.17626026272773743,
0.01416048873215... | |
When my ASP.NET page does a postback in IE7, all the CSS is lost. I am not using Themes and are including the CSS from the Masterpage in code behind.
```
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
AddStylesheetInclude("/static/css/global.css");
AddStylesheetInclude("/static/css/sifr.... | [
0.06822247058153152,
-0.048807088285684586,
0.8693795204162598,
-0.13113227486610413,
0.01881266012787819,
-0.2670122981071472,
0.4844619333744049,
-0.35010474920272827,
-0.1957605481147766,
-0.7301132678985596,
-0.21226158738136292,
0.6217198371887207,
-0.24513281881809235,
-0.02645595930... | |
more context, in the CSS file included, it uses `@import` to include the rest.
Edit
----
It works if I take all the `@import` rules and have it included in the actual HTML.
After doing more research on your problem I found out the reason is doesn't work with the link is because (<http://www.broken-links.com/2007/02/1... | [
0.14363142848014832,
0.18421845138072968,
0.5394959449768066,
-0.04596070200204849,
-0.43027839064598083,
-0.4121219217777252,
0.48098617792129517,
0.10380518436431885,
-0.4530107080936432,
-0.6394028067588806,
-0.059543710201978683,
0.8237626552581787,
-0.5132285952568054,
0.0636796504259... | |
or so?) and at that point debugging in IE\* will be h\*ll.
So I guess this is the only way for now to try adding the css script on the client side so it will always remain rendered on the page. after you build with the link included of the css file your IntelliSense should pick up your classes when you try to add clas... | [
0.05383266136050224,
0.11007242649793625,
0.4487755298614502,
0.10717708617448807,
0.05938005819916725,
-0.3272254168987274,
0.36887326836586,
0.252175897359848,
-0.033897072076797485,
-0.9710073471069336,
-0.13497553765773773,
0.6116188764572144,
-0.11539758741855621,
-0.00142863683868199... | |
background-color: #C0DDE0;
}
</style>
```
and you should be able to something like this
```
<table id="table1" class="highlight"/>
``` | [
0.05863332375884056,
-0.13504624366760254,
0.27218249440193176,
0.013160472735762596,
0.27886444330215454,
-0.15214955806732178,
-0.2250603586435318,
0.4011094570159912,
-0.48207250237464905,
-0.6238036751747131,
-0.2209407538175583,
0.37116602063179016,
-0.16435617208480835,
-0.4301451444... | |
In C# I have a use case where I have a mapping from `int`s to collections.
* the `int`s are a dense (but not packed) set from 1 to n where n is not known.
* The cells will be loaded in random order.
* the marginal cost of each cell should be ideal (as good as a `List<T>` or `T[]`)
* I'd like to have the cells default ... | [
-0.04712807759642601,
0.07531612366437912,
0.0785805955529213,
0.012674947269260883,
-0.02435717172920704,
0.026700016111135483,
-0.11481346189975739,
-0.17100417613983154,
-0.16284547746181488,
-0.7366527915000916,
-0.30812889337539673,
0.3825676739215851,
-0.38672935962677,
-0.1745773404... | |
something better? As in the best code is code you don't write.
A `Dictionary<int, Cell>` sounds like a good match to me. Or you could use a `List<Cell>` quite easily, and just make sure that you expand it where necessary:
```
public static void EnsureCount<T>(List<T> list, int count)
{
if (list.Count > count)
... | [
0.5537312626838684,
-0.35369569063186646,
0.25624600052833557,
0.16055423021316528,
0.13016515970230103,
-0.16036859154701233,
0.314319372177124,
-0.34327924251556396,
-0.1695500612258911,
-0.6441625952720642,
-0.01873927190899849,
0.9405248165130615,
-0.09289263933897018,
-0.2595955729484... | |
// the number of expansions required
list.Capacity = Math.Max(list.Capacity*2, count);
}
list.AddRange(Enumerable.Repeat(default(T), list.Capacity-list.Count));
}
``` | [
0.188646599650383,
-0.14481604099273682,
0.3323228657245636,
-0.16870610415935516,
0.3636126220226288,
0.1326758861541748,
0.24252547323703766,
-0.41218486428260803,
-0.5587502121925354,
-0.44224077463150024,
-0.3396730124950409,
0.9164658784866333,
-0.1638384908437729,
0.00263938843272626... | |
In my assembly language class, our first assignment was to write a program to print out a simple dollar-terminated string in DOS. It looked something like this:
```
BITS 32
global _main
section .data
msg db "Hello, world!", 13, 10, ’$’
section .text
_main:
mov ah, 9
mov edx, msg
int 21h
ret
```
As I unders... | [
0.08245402574539185,
0.2760895788669586,
0.0803583487868309,
-0.12034157663583755,
-0.20617873966693878,
0.07694835215806961,
0.4448615610599518,
0.19643203914165497,
-0.008683858439326286,
-0.36286965012550354,
0.057962816208601,
0.29709699749946594,
-0.3237672746181488,
0.133895069360733... | |
didn't know the answer and I don't seem to find it using a google search.
You can't use DOS's `0x09` service to display `$` signs, you'll need to use `0x02`. See [here](http://spike.scu.edu.au/~barry/interrupts.html#ah02). | [
0.3457454442977905,
0.08273747563362122,
0.218232661485672,
-0.06509541720151901,
0.18473173677921295,
0.08350303024053574,
0.4728850722312927,
0.132193461060524,
-0.3994140326976776,
-0.05629989877343178,
-0.03267940878868103,
0.47289928793907166,
-0.16432416439056396,
0.28137603402137756... | |
I've got a simple function like this:
```
function CreateFileLink()
{
global $Username;
return date("d-m-y-g-i");
}
```
How do you write code to test a function like that where the return data is variable?
You could test it if you could somehow get control over that date() functi... | [
0.3606376051902771,
0.1644931137561798,
0.263507604598999,
-0.07361964881420135,
0.1838773787021637,
-0.13117560744285583,
-0.008924520574510098,
0.17553003132343292,
-0.08198051899671555,
-0.47314104437828064,
0.1255016326904297,
0.3845389783382416,
-0.24797722697257996,
0.354337692260742... | |
it. Maybe something like:
```
function CreateFileLink(DateProvider dateProvider)
{
global $Username;
return dateProvider.date("d-m-y-g-i");
}
```
Sorry, I don't even know what language this is but hopefully you can see my point. In production code, you'd call this by doing:
```
DateProvider standar... | [
0.09689044952392578,
-0.16849884390830994,
0.7723957896232605,
-0.1115657389163971,
0.07447392493486404,
-0.10550328344106674,
0.0328717865049839,
0.295306921005249,
-0.08830416947603226,
-0.7446407079696655,
-0.281383216381073,
0.3537866473197937,
-0.4117341637611389,
0.3691129982471466,
... | |
if(str != "d-m-y-g-i") throw Exception();
return "success";
}
}
``` | [
-0.09024094045162201,
0.18835735321044922,
-0.04338924586772919,
-0.30810782313346863,
0.2002037763595581,
-0.2830113470554352,
0.4368230700492859,
-0.10062532871961594,
-0.03034072183072567,
-0.2850319445133209,
-0.6946991086006165,
0.7033102512359619,
-0.3050033152103424,
0.2785830199718... | |
Is there a way for a Java GUI application to respond to system shutdown or logoff events, other than to use JNI? (On Windows, the JNI would use WM\_QUERYENDSESSION, on Linux?)
The method should allow the program to prompt users to save, etc., and then continue the logoff process.
As far as I know, there's no way in Ja... | [
0.4287140369415283,
-0.39218267798423767,
0.2438073456287384,
-0.039523642510175705,
0.003036003326997161,
-0.32123515009880066,
-0.020475098863244057,
-0.28336530923843384,
-0.5055135488510132,
-0.4613465666770935,
-0.11464344710111618,
0.31812772154808044,
-0.46990376710891724,
0.0329870... | |
this; I believe SWT does as well. Be aware that you MUST manually dispose of the window if you override this event!
I believe that MS Windows will fire these events as it is closing. I believe a SIGTERM on Linux/UNIX does the same, although Linux will SIGKILL an app shortly afterwords if this is during shutdown. | [
0.08902477473020554,
0.13670334219932556,
0.5913992524147034,
-0.036818571388721466,
-0.03841027617454529,
-0.5863178372383118,
0.6070412993431091,
0.2552397847175598,
-0.3850739598274231,
-0.6226584315299988,
-0.47758257389068604,
0.8012331128120422,
-0.11792396008968353,
0.14670285582542... | |
I'm having a rough time with this membership stuff.
OK, so, it's really odd. I can register a user. I can register, I can login. However, when I go to register ANOTHER user the user isn't saved in the database and I get a
Membership credential verification failed event when the user tries to login (I assume because ... | [
0.37856948375701904,
-0.05417752265930176,
0.28333356976509094,
-0.08165673911571503,
0.1557302474975586,
-0.18743789196014404,
0.45085665583610535,
-0.11758571863174438,
-0.3315492868423462,
-0.5583694577217102,
0.11593352258205414,
0.45525291562080383,
-0.26787763833999634,
0.39304068684... | |
FormsAuthentication.SignOut();
MembershipCreateStatus status;
Data.User user = UserManager.CreateUser(txtEmail.Text.Trim(), txtPassword.Text.Trim(), out status);
switch (status)
{
case MembershipCreateStatus.Success:
UserManager.Save(user);
br... | [
0.009461956098675728,
-0.18845602869987488,
0.4439592659473419,
-0.20628488063812256,
0.4789171814918518,
-0.16547420620918274,
0.4598626494407654,
-0.3398970663547516,
-0.4742090702056885,
-0.514610767364502,
-0.5390034914016724,
0.2869444787502289,
-0.10373695194721222,
0.064279779791831... | |
default:
lblMessage.Text = status.ToString();
break;
}
Response.Redirect("~/login.aspx");
}
```
the CreateUser method:
```
public static User CreateUser(string username, string password, out MembershipCreateStatus status)
{
using (TransactionScope tran... | [
-0.1096668466925621,
-0.18224015831947327,
0.5420979857444763,
-0.29210299253463745,
0.32597652077674866,
-0.16291353106498718,
0.1763695925474167,
-0.17237700521945953,
-0.4383794069290161,
-0.39929845929145813,
-0.4356769919395447,
0.6143830418586731,
-0.4634218215942383,
0.3214963674545... | |
MembershipUser aspnetUser = Membership.CreateUser(username, password, username, null, null, true, out status);
User hqUser = null;
if (status == MembershipCreateStatus.Success)
{
hqUser = new User();
//these properties are only for issues | [
0.0026959534734487534,
-0.09499814361333847,
0.5344681143760681,
-0.05708209052681923,
0.09775271266698837,
-0.1985762119293213,
0.45528438687324524,
-0.27707189321517944,
-0.4659993648529053,
-0.5443293452262878,
-0.1440095752477646,
0.30878379940986633,
-0.28744029998779297,
0.0302912853... | |
//that won't blow up. They can be safely removed from the system.
//the aspnet membership tables take care of this stuff for us.
hqUser.LastLoginDate = DateTime.Now;
hqUser.DateCreated = DateTime.Now; | [
0.2809566855430603,
-0.17975544929504395,
0.5406216382980347,
0.03479980304837227,
0.5074046850204468,
-0.4903111159801483,
0.43582019209861755,
0.3317323923110962,
-0.43212318420410156,
-0.5920521020889282,
-0.25310009717941284,
0.225246861577034,
-0.011838764883577824,
0.0083210403099656... | |
//end properites.
hqUser.Email = username;
hqUser.MembershipID = (Guid)aspnetUser.ProviderUserKey;
Save(hqUser);
}
transaction.Complete();
return hqUser;
```
}}
The extra save method is for | [
-0.04731026664376259,
-0.05255838483572006,
0.7195082306861877,
-0.26086029410362244,
0.11858014762401581,
-0.07841706275939941,
0.3747001886367798,
-0.23917660117149353,
-0.1480853259563446,
-0.4922391176223755,
-0.2542732357978821,
0.2513743042945862,
-0.3028944134712219,
0.2007054537534... | |
saving the user in the app's database. The user is not getting into the membership database though so I know it's dying before that.
anyone see anything obvious that's burning me? Thanks!
Have you checked to see this is not a problem with password complexity? I know I have had issues with this in the past... | [
0.6838799715042114,
0.15225763618946075,
0.09452547878026962,
0.10632172971963882,
0.021676011383533478,
-0.21731457114219666,
0.48477664589881897,
0.48275572061538696,
-0.3322848975658417,
-0.8042688965797424,
0.2910476624965668,
0.6578060984611511,
-0.2186596840620041,
-0.004449064843356... | |
I've got an AS3 SWF that I'm going to be loading other SWFs into. These child SWFs all take a single parameter on the URL. I can't seem to get it working when loading an AS2 child, and it needs to be able to handle both.
so I have
```
var request:URLRequest = new URLRequest();
var loader:URLLoader = new URLLoader()... | [
0.1254822462797165,
0.051200103014707565,
0.5592806935310364,
-0.328368216753006,
-0.16037344932556152,
0.22408193349838257,
0.5584819912910461,
-0.48001888394355774,
-0.595459520816803,
-0.6295763850212097,
-0.16395336389541626,
0.33809515833854675,
-0.17770904302597046,
0.299638599157333... | |
I can load a SWF with those URL params from an AS2 loader and it works just fine.
It's not trivial to communicate between AS2 and AS3 since they run in different virtual machines. Check this <http://www.gskinner.com/blog/archives/2007/07/swfbridge_easie.html> for some hints.
Edit: If you cannot change the loaded as2 c... | [
0.3227100968360901,
-0.10135931521654129,
0.5155717730522156,
-0.20984405279159546,
-0.4615338146686554,
0.003174987155944109,
0.48522746562957764,
-0.17476004362106323,
-0.25633931159973145,
-0.6808421015739441,
-0.06598872691392899,
0.570732831954956,
-0.3142969012260437,
0.0057779862545... | |
We have a hosted site that has a CMS we built running on a LAMP stack. We noticed that when you save HTML that has a tag embedded in the HTML the request immediately dies. This does not occur on the staging or local development instances of the CMS, so I'm assuming its a server configuration issue. Any ideas what might... | [
0.5135414600372314,
0.0862019807100296,
0.3363168239593506,
0.34760457277297974,
0.001565828686580062,
-0.2899405062198639,
0.2794886827468872,
0.32899153232574463,
-0.4219580292701721,
-0.6454411745071411,
0.24928714334964752,
0.306173175573349,
-0.2693224251270294,
0.21092729270458221,
... | |
checked the apache logs to see if there were any problems. The only error I'm seeing is "Directory index forbidden by Options directive". That error seems to be happening independent of the form submit timing out.
We built the CMS using CakePHP and the CakePHP logs reveal no other useful information either. The reque... | [
0.21838214993476868,
-0.0745130255818367,
0.3817822337150574,
0.21568939089775085,
-0.3519807457923889,
-0.13918590545654297,
0.6663749814033508,
-0.10997293144464493,
-0.2758752405643463,
-0.7580918073654175,
0.14562609791755676,
0.5720858573913574,
-0.1726801097393036,
0.0803313106298446... | |
replicate the issue and said it was a Top Level Filtering Rule that was causing the issue, surely something out of my realm of control. All the same I appreciate the responses :)
I've had similar problems caused by apaches mod\_security. If you have mod\_security enabled on the server, you can try something like this (... | [
0.5296716094017029,
-0.021347614005208015,
0.1858137995004654,
-0.14459197223186493,
-0.013348609209060669,
-0.4741286039352417,
0.6810498237609863,
0.010137718170881271,
-0.06535899639129639,
-0.6449061036109924,
0.1254216432571411,
0.46898049116134644,
-0.36832910776138306,
0.10639359056... | |
Is there an elegant way to handle exceptions that are thrown in `finally` block?
For example:
```
try {
// Use the resource.
}
catch( Exception ex ) {
// Problem with the resource.
}
finally {
try{
resource.close();
}
catch( Exception ex ) {
// Could not close the resource?
}
}
```
How do... | [
-0.08222490549087524,
-0.07343181222677231,
0.06211617588996887,
-0.02353656478226185,
0.03947807103395462,
-0.2870244085788727,
0.1528446525335312,
-0.15546055138111115,
-0.4249367117881775,
-0.5853771567344666,
-0.2861289381980896,
0.3388734459877014,
-0.16758766770362854,
-0.00818710215... | |
away the resource.
closeQuietly( resource );
}
```
Elsewhere:
```
protected void closeQuietly( Resource resource ) {
try {
if (resource != null) {
resource.close();
}
} catch( Exception ex ) {
log( "Exception during Resource.close()", ex );
}
}
``` | [
-0.05782678723335266,
-0.06617002934217453,
0.25429806113243103,
-0.47563377022743225,
0.5029204487800598,
0.16439339518547058,
0.10038211196660995,
0.037352558225393295,
0.04794591665267944,
-0.25469502806663513,
-0.4618985652923584,
0.5341066122055054,
-0.35658949613571167,
0.35808071494... | |
I am not familiar with PHP at all and had a quick question.
I have 2 variables `pricePerUnit` and `InvoicedUnits`. Here's the code that is setting these to values:
```
$InvoicedUnits = ((string) $InvoiceLineItem->InvoicedUnits);
$pricePerUnit = ((string) $InvoiceLineItem->PricePerUnit);
```
If I output this, I get ... | [
0.3755410313606262,
0.14321176707744598,
0.3832325339317322,
-0.11804557591676712,
-0.184396430850029,
0.2756344676017761,
0.1474504917860031,
-0.3054697513580322,
0.051357902586460114,
-0.5409380197525024,
0.5324409604072571,
0.8389055132865906,
0.20464400947093964,
0.09256991744041443,
... | |
[String conversion to Numbers](http://us2.php.net/manual/en/language.types.string.php#language.types.string.conversion). | [
-0.012955620884895325,
0.10963307321071625,
0.2695123553276062,
-0.019845904782414436,
-0.12577421963214874,
0.10791479796171188,
0.15070661902427673,
-0.13467682898044586,
-0.3932208716869354,
-0.1736816018819809,
-0.3959905207157135,
0.375790536403656,
-0.2841106057167053,
-0.14783188700... | |
I have been programming in C# and Java for a little over a year and have a decent grasp of object oriented programming, but my new side project requires a database-driven model. I'm using C# and Linq which seems to be a very powerful tool but I'm having trouble with designing a database around my object oriented approa... | [
0.377139151096344,
-0.04878713935613632,
-0.008563834242522717,
-0.09485753625631332,
-0.19950167834758759,
0.1617158204317093,
-0.18947698175907135,
-0.427621454000473,
-0.14876942336559296,
-0.591543972492218,
0.27951839566230774,
0.6471060514450073,
-0.06889017671346664,
-0.071997486054... | |
from ShiftEvent) and StaffTimeOff (derived from StaffEvent). There are other derived classes, but for the sake of argument these are enough.
Should I have a separate table for ShiftEvents and StaffEvents? Maybe I should have separate tables for each concrete class? Both of these approaches seem like they would give me... | [
0.06989262998104095,
-0.12690365314483643,
0.28161171078681946,
0.1788327693939209,
-0.19481326639652252,
0.34339848160743713,
0.0006537481094710529,
-0.25582069158554077,
-0.0924498438835144,
-0.42326101660728455,
0.14992624521255493,
0.44453001022338867,
-0.12703977525234222,
0.094810843... | |
is a third approach that I have not considered.
My second question:
**How do I deal with collections and one-to-many relationships in an object oriented way?**
Let's say I have a Products class and a Categories class. Each instance of Categories would contain one or more products, but the products themselves should ... | [
0.20795787870883942,
0.005433646030724049,
-0.005254100542515516,
0.09894221276044846,
-0.3745790421962738,
0.045601800084114075,
-0.11284124106168747,
-0.2959335446357727,
-0.18340618908405304,
-0.49873262643814087,
0.045644719153642654,
0.5161344408988953,
-0.2376628816127777,
0.16516426... | |
exist, much less have a data field containing a category ID! Is there a better way?
Linq to SQL using a table per class solution:
<http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/10/01/linq-to-sql-inheritance.aspx>
Other solutions (such as my favorite, LLBLGen) allow other models. Personally, I like the singl... | [
0.19097575545310974,
0.04288826510310173,
0.2487235814332962,
0.24263353645801544,
-0.22957240045070648,
-0.24665221571922302,
-0.07699614018201828,
-0.26525184512138367,
-0.21169376373291016,
-0.48605674505233765,
0.12441255897283554,
0.4606997072696686,
-0.2274085134267807,
0.03534927591... | |
impedance mismatch between OO and relations has been solved... and there have been plenty of OO specific databases. None of them have unseated the powerful simplicity of the relation.
Instead, I tend to design the database with the application in mind, map those tables to entities and build from there. Some find this ... | [
0.12381502985954285,
0.16945508122444153,
0.0840229019522667,
0.2360631823539734,
-0.31189313530921936,
0.02571876533329487,
0.18073458969593048,
-0.12556636333465576,
0.15391980111598969,
-0.43376147747039795,
-0.017733294516801834,
0.688118577003479,
-0.2707826495170593,
0.19233082234859... | |
Since there is no concept of sessions in ASP.Net MVC and each request is independent of each other would I ever make use of the Cache object to internally cache data in order to minimize db access? The output caching functionality is great for caching view data but if I wanted to cache something like a user profile whi... | [
0.4619416296482086,
0.15000398457050323,
0.14531327784061432,
0.04427716135978699,
-0.5637965202331543,
-0.2118104249238968,
0.3899519741535187,
-0.28486403822898865,
-0.2626103460788727,
-0.4971355199813843,
0.2829277515411377,
0.704587459564209,
-0.24284379184246063,
0.2850983738899231,
... | |
postbacks to the same page and isn't applicable in MVC. | [
-0.025099489837884903,
0.05382950231432915,
0.48666876554489136,
0.043888915330171585,
-0.3448435664176941,
-0.014727899804711342,
0.10496486723423004,
0.1739429384469986,
-0.399707555770874,
-0.46190330386161804,
-0.20160077512264252,
-0.0928347185254097,
-0.26202842593193054,
0.288684099... | |
Imagine the following tables:
create table boxes( id int, name text, ...);
create table thingsinboxes( id int, box\_id int, thing enum('apple,'banana','orange');
And the tables look like:
```
Boxes:
id | name
1 | orangesOnly
2 | orangesOnly2
3 | orangesBananas
4 | misc
thingsinboxes:
id | box_id | thing
1 |... | [
-0.4679248631000519,
-0.1508551836013794,
0.10595502704381943,
-0.11424890160560608,
0.3061477243900299,
0.5170403122901917,
0.0595589280128479,
0.04351920261979103,
-0.5218912959098816,
-0.7482241988182068,
-0.48503097891807556,
0.08295127004384995,
-0.28171783685684204,
-0.20799162983894... | |
| orange
7 | 4 | apple
8 | 4 | banana
```
How do I select the boxes that contain at least one orange and nothing that isn't an orange?
How does this scale, assuming I have several hundred thousand boxes and possibly a million things in boxes?
I'd like to keep this all in SQL if possible, rather than pos... | [
0.01775492914021015,
-0.04383239522576332,
-0.13587351143360138,
-0.38008490204811096,
0.055938757956027985,
0.3908219337463379,
0.20193013548851013,
0.12423671036958694,
-0.3755444884300232,
-0.7284834384918213,
-0.27040961384773254,
0.25582242012023926,
-0.3960135281085968,
-0.1635411977... | |
ON (b.id = t.box_id)
GROUP BY b.id
HAVING COUNT(DISTINCT t.thing) = 1 AND SUM(t.thing = 'orange') > 0;
```
---
Here's another solution that does not use GROUP BY:
```
SELECT DISTINCT b.*
FROM boxes b
JOIN thingsinboxes t1
ON (b.id = t1.box_id AND t1.thing = 'orange')
LEFT OUTER JOIN thingsinboxes t2
O... | [
-0.36368072032928467,
-0.15284015238285065,
0.0907646045088768,
-0.12303676456212997,
-0.08958113938570023,
0.1029784232378006,
0.12134487926959991,
-0.6650059819221497,
-0.027715936303138733,
-0.622316300868988,
-0.4591493308544159,
0.39519232511520386,
-0.38526734709739685,
-0.1103615239... | |
I hope you know, because I don't see it. Bonus points for whoever figures out how one can achieve what this test is trying to achieve.
```
using NUnit.Framework;
using Moq;
[TestFixture]
public class MoqHuh
{
public class A {}
public class B : A {}
public interface IHelper
{
void DoIt(A a);
... | [
0.6488622426986694,
0.030301224440336227,
0.5618919730186462,
-0.05909689515829086,
0.04928899183869362,
0.03217999264597893,
0.589156985282898,
-0.3583822250366211,
0.0779838040471077,
-0.6476551294326782,
-0.10101684182882309,
0.5297025442123413,
-0.27539125084877014,
0.25521373748779297... | |
mock.Expect(helper => helper.DoIt(It.IsAny<B>())).Verifiable();
mock.Object.DoIt(new B());
mock.VerifyAll();
}
}
```
Turns out this was sort of pilot error. I incorrectly assumed Moq working fine on Mono.
(which it looks like it does just fine). This issue only happens when compiled with mono's g... | [
0.359319269657135,
0.4388523995876312,
0.3201272189617157,
-0.02007877826690674,
-0.011477909050881863,
-0.027378423139452934,
0.8189337849617004,
-0.24891801178455353,
-0.04947293549776077,
-0.6111451387405396,
0.012569624930620193,
0.8960475325584412,
-0.23872701823711395,
0.026573466137... | |
I add a web reference to my wse 3.0 service in Visual Studio 2005 and my intellisense shows the name of my service like `MyServiceWse` (it adds the WSE extension to the name).
I also have access to `SetClientCredentials()` where I pass in my `UsernameToken`, everything works fine.
In Visual Studio 2008 I don't have t... | [
0.0070501575246453285,
0.16453923285007477,
0.6867184638977051,
-0.19299215078353882,
-0.31895682215690613,
-0.2962283492088318,
0.4848165512084961,
0.18191814422607422,
-0.03193291276693344,
-0.8360633850097656,
0.02217232808470726,
0.6601573824882507,
-0.12355007976293564,
-0.12969063222... | |
also waiting for a better solution.
[WSE 3.0 and Visual Studio 2008?](http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/84299cff-5af6-4cef-8b6e-a8251df3d496/) | [
0.1876199096441269,
-0.3485772907733917,
0.3171303868293762,
0.23469117283821106,
0.06361754983663559,
0.22409507632255554,
0.06225835159420967,
0.2327582836151123,
-0.5096336007118225,
-0.48989564180374146,
0.24280884861946106,
0.3743074834346771,
-0.05020042508840561,
-0.1892673969268798... | |
I'm starting up a new web application. It's going to be hosted on a service that charges extra for SQL Server and frankly I don't think the site needs that much of a database. Right now the data model is 5 tables. And I'll be amazed if the largest table ever goes of 10k records.
So I'd like to keep the db lightweight... | [
0.4447512626647949,
0.30106765031814575,
0.3145349621772766,
-0.021591035649180412,
-0.13777470588684082,
0.057623013854026794,
0.2759730815887451,
0.119700126349926,
-0.2720063328742981,
-0.7523449063301086,
0.3653913736343384,
0.2717040479183197,
-0.038385480642318726,
0.3011369705200195... | |
feels un-relational. **Firebird** seems like the only lightweight (and free) db that supports FKs.
Also, I'd really like to get my feet wet in LINQ with this project. So far I've only found [dbLINQ](http://code.google.com/p/dblinq2007/) that lets me use SQLite or Firebird with LINQ. It's currently at v0.18 so it's fa... | [
0.16717258095741272,
0.2103944718837738,
0.45620936155319214,
-0.06505817919969559,
-0.36285895109176636,
-0.21822340786457062,
0.47587859630584717,
0.052375711500644684,
-0.5217817425727844,
-0.6161876916885376,
0.3834325969219208,
0.3503600060939789,
0.10401665419340134,
0.13739420473575... | |
LINQ? Any of the compact editions of SQL Server are out, unless there's one that's XCOPY deployable **with no install of an agent/service**? I can't be asking the host to install new software since I doubt they'll do it and I want the app to be highly portable (with respect to hosting).
The list so far:
* SQLite
* F... | [
0.014629296027123928,
0.21306945383548737,
0.8225350379943848,
0.047548871487379074,
-0.058827392756938934,
-0.3291836977005005,
-0.13372866809368134,
0.04148448631167412,
-0.3587651252746582,
-0.32124537229537964,
0.15124136209487915,
0.6552430391311646,
0.08926545083522797,
-0.1650663912... | |
GUI (with auto-freakin-complete no less), has no install footprint, is free and will work regardless of where I host the website. I know I'm answering my own question, but no one else put just SQLite in their reply.
**Important**: SQLite will require a web host that uses Full-Trust mode if you want to run it on share... | [
0.3392607569694519,
0.15203766524791718,
0.4846107065677643,
0.019688572734594345,
-0.17069104313850403,
-0.1744706630706787,
0.33433273434638977,
0.316148966550827,
0.12486722320318222,
-0.902046799659729,
-0.03496728464961052,
1.1587966680526733,
-0.2762351632118225,
-0.3188019394874573,... | |
A regular function can contain a call to itself in its definition, no problem. I can't figure out how to do it with a lambda function though for the simple reason that the lambda function has no name to refer back to. Is there a way to do it? How?
The only way I can think of to do this amounts to giving the function a ... | [
0.14182640612125397,
-0.10702622681856155,
0.12052754312753677,
0.10992579162120819,
-0.285101979970932,
0.010432721115648746,
0.09419406950473785,
0.1557496041059494,
-0.267030268907547,
0.0897226631641388,
-0.1782039850950241,
0.6009770035743713,
-0.7244023084640503,
-0.02839575149118900... | |
the other answers, I was able to wedge the factorial function into a single unnamed lambda:
```
>>> map(lambda n: (lambda f, *a: f(f, *a))(lambda rec, n: 1 if n == 0 else n*rec(rec, n-1), n), range(10))
[1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
```
So it's possible, but not really recommended! | [
-0.0847311019897461,
0.021218102425336838,
0.2026069313287735,
0.03688991814851761,
0.12014789134263992,
0.34155377745628357,
0.23002879321575165,
-0.6416144371032715,
0.08357390761375427,
-0.45254775881767273,
-0.011428486555814743,
0.5293727517127991,
-0.3532430827617645,
-0.136670336127... | |
Anyone know how to create a slideshow with flex, that has the following.
1. Based with java flex (xml, java code whatever)
2. Text Animation (text moving across the screen, etc)
3. Ability to play mp3 or ogg (mainly mp3)
4. Ability to add images on each slide.
Essentially, I want to easily create better 'powerpoint' ... | [
0.5249908566474915,
-0.062351882457733154,
0.550353467464447,
0.37370386719703674,
-0.44551587104797363,
-0.407535582780838,
-0.11670129001140594,
-0.1417926549911499,
-0.25878673791885376,
-0.844071626663208,
0.334698349237442,
0.7806399464607239,
-0.06966996937990189,
-0.168853297829628,... | |
(tedious at best, buggy in early version, specifically with copying and modifying report designs, which was the only way to quickly make a lot of similar report designs).
Since we wanted a batch approach to be able to generate hundreds on report designs at a time (and to be able to change small stylistic things and re... | [
0.44246795773506165,
-0.02524932660162449,
0.31871774792671204,
0.25864189863204956,
-0.3022342920303345,
-0.1566542387008667,
0.1380549818277359,
-0.32426249980926514,
-0.0230235755443573,
-0.6045219302177429,
0.11618494987487793,
0.04812229424715042,
-0.45263421535491943,
-0.184876948595... | |
reporting subsystem already existed - we were just adding web reporting as an option to it.
It worked because all of our reports follow the same basic format - we didn't need very complicated stuff in them.
What it entailed was to use the GUI to create a couple of reports then reverse engineer them to figure out how ... | [
0.6967806220054626,
0.14818985760211945,
0.4074258506298065,
0.22469528019428253,
-0.4221743047237396,
-0.4582682251930237,
-0.041025709360837936,
-0.15621018409729004,
0.0618586465716362,
-0.21864868700504303,
0.2184792011976242,
0.7798994183540344,
-0.18710243701934814,
-0.20976857841014... | |
would create a totally empty slideshow with no content, then create one slide with text, another with animation, another with an embedded OGG and so on, then compare the steps to see how the XML changes for each added element.
Then you can create a tool which takes your simple commands (e.g., `add-slide`, `add-ogg`, `... | [
0.41302523016929626,
-0.09201964735984802,
0.28425395488739014,
0.37507471442222595,
-0.2777489423751831,
0.003720007836818695,
-0.2072019726037979,
-0.017650846391916275,
-0.060715775936841965,
-0.48846134543418884,
-0.08759699761867523,
0.4765724241733551,
-0.3932243883609772,
-0.1838709... | |
There are many phones, each with it's own icon size (for example, Nokia has 19 different sizes, <http://www.j2meforums.com/wiki/index.php/Application_Icon_sizes>).
I would like to use only one icon (even if it's displayed poorly).
Is there a single icon size and color depth that displays in all phones?
There is no st... | [
0.22816790640354156,
0.11129020899534225,
0.3581647276878357,
0.10834163427352905,
0.09640175849199295,
0.2759658396244049,
0.36903685331344604,
-0.04492567479610443,
-0.5380798578262329,
-0.5973013043403625,
0.21865199506282806,
0.3750433325767517,
-0.1756412237882614,
0.07129854708909988... | |
space :) | [
0.03531080484390259,
0.38489896059036255,
0.177160382270813,
0.19764328002929688,
0.1650191843509674,
0.26591137051582336,
-0.27822351455688477,
-0.04267596825957298,
-0.29970771074295044,
-0.6016497611999512,
-0.44956541061401367,
0.1331748366355896,
-0.38264408707618713,
0.39039209485054... | |
I am having trouble connecting to a Named Pipe (in this case a fast cgi named pipe)
According to MSDN, I should be using CreateFile() or CallNamedPipe()
(flat C API, synchronous - no overlapped I/O)
<http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx>
Yet I am getting INVALID\_HANDLE\_VALUE and when I GetLas... | [
0.05161654204130173,
0.10872415453195572,
0.2876623570919037,
0.12024752050638199,
0.01483275555074215,
-0.1325010061264038,
0.45543983578681946,
-0.016720984131097794,
-0.14729435741901398,
-0.7753415703773499,
0.2029268592596054,
0.4974351227283478,
-0.19245009124279022,
0.39508664608001... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.