text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
millions of records.
If your data needs exceed 6 digits of records, you may want to re-evaluate using a full text index, or do some research on inverted indexes.
Please comment if you would like any more info.
---
**Edit:** The search tables were kept as narrow as possible. Ideally 50-100 bytes per record. ENUMS an... | [
0.2113899141550064,
0.09304920583963394,
0.3854784667491913,
0.5514560341835022,
-0.032930634915828705,
0.021433204412460327,
0.05255582183599472,
0.10365438461303711,
-0.5458133816719055,
-0.35718169808387756,
0.38233572244644165,
0.19552260637283325,
-0.004632283002138138,
0.236612141132... | |
of searchable data
SELECT
MainTable.ID,
MainTable.Name,
MainTable.Whatever
FROM
MainTable, SearchTable
WHERE
MainTable.ID = SearchTable.ID
AND SearchTable.State IN ('PA', 'DE')
AND SearchTable.Age < 40
AND SearchTable.Status = 3
```
Essentially, the two tables were joined on a primary key (fa... | [
-0.2718248963356018,
0.17692731320858002,
0.5961177349090576,
0.20712542533874512,
0.13069593906402588,
-0.013298572041094303,
0.013782959431409836,
0.08810649812221527,
-0.4659567177295685,
-0.7352483868598938,
-0.19774402678012848,
0.05210284888744354,
-0.12215928733348846,
0.53228706121... | |
I ended up with something like the following code in a project I'm working on. I thought it was really odd that I was allowed to do it, but now I'm starting wonder what is most likely an architectural gaff on my part led me to this.
My questions to you are:
* What exactly is this called?
* What are some real world us... | [
0.6805427074432373,
0.20038022100925446,
0.06974384188652039,
0.19578644633293152,
0.17623715102672577,
-0.1468859612941742,
0.23862187564373016,
0.26316553354263306,
-0.23277293145656586,
-0.6237447261810303,
0.06325196474790573,
0.20395027101039886,
-0.26103484630584717,
0.22570195794105... | |
public interface ICanDoThat
{
string Do();
}
public interface ICanDoThisAndThat : ICanDoThis, ICanDoThat
{
new string Do();
}
}
```
Here's my concrete class:
```
namespace ThisAndThat
{
public class CanDoThisAndThat : ICanDoThisAndThat
{
public string Do()
... | [
-0.17395341396331787,
-0.011548183858394623,
0.2951977849006653,
0.05902455002069473,
0.18482708930969238,
-0.2360849231481552,
0.42076778411865234,
-0.20663116872310638,
0.24150335788726807,
-0.8051148056983948,
-0.19037401676177979,
0.6277514100074768,
-0.2783421277999878,
-0.09254271537... | |
}
string ICanDoThis.Do()
{
return "I Can Do This!";
}
string ICanDoThat.Do()
{
return "I Can Do That!";
}
}
}
```
And my passing tests:
```
using Xunit;
namespace ThisAndThat.Tests
{ | [
0.10031267255544662,
0.13058191537857056,
-0.01640295423567295,
0.21971936523914337,
0.38538941740989685,
-0.27418050169944763,
0.4706500470638275,
-0.2188534289598465,
-0.011338094249367714,
-0.46808087825775146,
-0.08850518614053726,
0.39751121401786804,
0.007364924997091293,
0.051843121... | |
public class ThisAndThatTests
{
[Fact]
public void I_Can_Do_This_And_That()
{
ICanDoThisAndThat sut = new CanDoThisAndThat();
Assert.Equal("I Can Do This And That!", sut.Do());
}
[Fact]
public void I_Can_Do_This() | [
0.11531466990709305,
-0.16599693894386292,
0.21342062950134277,
0.005779519211500883,
0.3159664273262024,
-0.10631071776151657,
0.4917817711830139,
-0.30037710070610046,
-0.17762330174446106,
-0.521867573261261,
-0.2023623287677765,
0.7432116866111755,
-0.06290395557880402,
0.2119845300912... | |
{
ICanDoThis sut = new CanDoThisAndThat();
Assert.Equal("I Can Do This!", sut.Do());
}
[Fact]
public void I_Can_Do_That()
{
ICanDoThat sut = new CanDoThisAndThat();
Assert.Equal("I Can Do That!", | [
0.2533103823661804,
-0.17372335493564606,
0.14242596924304962,
0.09539586305618286,
0.4317709505558014,
-0.1506556272506714,
0.5797573924064636,
-0.3621697723865509,
-0.057846225798130035,
-0.5217269659042358,
-0.1826321929693222,
0.6029995083808899,
0.050499603152275085,
0.149052679538726... | |
sut.Do());
}
}
}
```
There is absolutely nothing wrong with this code (provided it isn't confusing for your users), and it isn't a pattern with any name that I'm familiar with. `CanDoThisAndThat` implements two interfaces, so clients can use it in either way.
.NET allows interfaces to be implemented this... | [
-0.039803020656108856,
-0.05703452229499817,
0.11390486359596252,
-0.006277869455516338,
-0.008690863847732544,
-0.18600739538669586,
0.35560497641563416,
-0.07406578958034515,
-0.18186166882514954,
-1.0610631704330444,
-0.10335990786552429,
0.506695032119751,
-0.47798803448677063,
0.00143... | |
a reference using the interface type
An example of case 2 from the .NET framework is `ICollection.SyncLock`. `List<T>` implements `ICollection` yet the following code will not compile because the member has intentionally been 'hidden' as the designers of the BCL no longer advocate locking collections in this way:
```... | [
0.28733184933662415,
0.003964110743254423,
0.5593764781951904,
0.1737295240163803,
0.12345588207244873,
-0.21236726641654968,
0.16068874299526215,
-0.4245936870574951,
-0.20704494416713715,
-0.5513493418693542,
0.06303752213716507,
0.3325508236885071,
-0.79445880651474,
0.4996337592601776,... | |
In jQuery when you do this:
```
$(function() {
alert("DOM is loaded, but images not necessarily all loaded");
});
```
It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as sh... | [
0.4923335909843445,
-0.34508615732192993,
0.6304315328598022,
0.07614926248788834,
-0.1925698071718216,
-0.2967727482318878,
0.11894192546606064,
-0.19662751257419586,
-0.36640286445617676,
-0.4775257408618927,
-0.18715566396713257,
0.7405669093132019,
-0.05911628529429436,
-0.242224127054... | |
but I don't really want to do that unless I have to.
Note: There is a [bug in jQuery 1.3.1](https://stackoverflow.com/questions/477463/jquery-is-waiting-for-images-to-load-before-executing-document-ready) in Internet Explorer which actually does wait for all images to load before executing code inside `$function() { }... | [
0.25561240315437317,
-0.2718033790588379,
0.3643147647380829,
-0.1125422865152359,
-0.06827118247747421,
-0.3840028643608093,
0.09798425436019897,
0.007765415124595165,
-0.4631546139717102,
-0.6298509240150452,
-0.17096614837646484,
0.86195307970047,
-0.24174149334430695,
-0.00858220923691... | |
have a lot of `jollyrogerNN` JPEG files (or other suitable ones):
```
<html>
<head>
<script src="jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function() {
alert ("done");
});
</script>
</head><body>
Hello
... | [
0.21158137917518616,
-0.057510729879140854,
0.8462993502616882,
0.022399263456463814,
0.11236909031867981,
-0.21851077675819397,
-0.19463084638118744,
-0.21690504252910614,
-0.6625155210494995,
-0.2338000237941742,
-0.4437946081161499,
0.6136628985404968,
-0.18524755537509918,
-0.251824587... | |
point. If you then change:
```
$(document).ready(function() {
```
into:
```
$(window).on("load", function() {
```
then the alert box doesn't appear until *after* the images are loaded.
Hence, to wait until the entire page is ready, you could use something like:
```
$(window).on("load", function() {
// weave... | [
0.13136135041713715,
-0.15609845519065857,
0.7594543695449829,
-0.1076020672917366,
0.1767328977584839,
-0.17297236621379852,
0.1565064638853073,
-0.30466705560684204,
-0.15784703195095062,
-0.4988155961036682,
-0.31530624628067017,
0.5201007127761841,
-0.3410828709602356,
-0.0707545056939... | |
I was reading another answer. And it made me wonder, when do does one need to explicitly call Dispose if I am using `using` statements?
EDIT:
Just to vindicate myself from being a total know-nothing, the reason I asked was because someone on another thread said something implying there was a good reason to have to ... | [
0.5009239315986633,
0.2726389765739441,
-0.013559424318373203,
-0.15637822449207306,
-0.13095034658908844,
-0.010269425809383392,
0.2875763773918152,
-0.21726830303668976,
-0.3483952283859253,
-0.4782388210296631,
-0.009311643429100513,
0.4401349723339081,
-0.25304239988327026,
0.246662124... | |
code (note the extra curly braces to create the limited scope for the object):
```
{
Font font1 = new Font("Arial", 10.0f);
try
{
byte charset = font1.GdiCharSet;
}
finally
{
if (font1 != null)
((IDisposable)font1).Dispose();
}
}
```
---
**Note:** As [@timvw mentioned](https://stackoverf... | [
0.38295209407806396,
-0.09617315232753754,
0.15896235406398773,
-0.2834264934062958,
0.03254121541976929,
-0.03696032986044884,
0.4273567199707031,
-0.4562186002731323,
-0.20455728471279144,
-0.4546070694923401,
-0.4392797648906708,
0.687703013420105,
-0.5584628582000732,
-0.22319464385509... | |
// Pretend a cat is a dog
}
```
expands to
```
{
var cat = new Cat().AsDog(); // Throws
try
{
// Never reached
}
finally
{
if (cat != null)
((IDisposable)cat).Dispose();
}
}
```
`AsDog` will obviously throw an exception, since a cat can never be as awesome as a dog. The cat will the... | [
0.21407487988471985,
-0.025970162823796272,
0.37601590156555176,
-0.23804332315921783,
0.31352007389068604,
-0.2633364498615265,
0.5338237881660461,
-0.24518056213855743,
-0.49223268032073975,
-0.5562666654586792,
-0.4658289849758148,
0.426104336977005,
-0.5020583868026733,
0.3177957236766... | |
here )` is safe and you are good to go. (Obviously, if the constructor fails, the object won't be created to begin with, so no need to dispose). | [
0.2935805916786194,
0.2477390617132187,
0.25138750672340393,
-0.28526267409324646,
0.3019130527973175,
-0.7106553316116333,
0.5885352492332458,
-0.06380415707826614,
0.035481322556734085,
-0.5111303925514221,
-0.643152117729187,
0.7701122164726257,
-0.38158103823661804,
0.16259033977985382... | |
I'm building a small program that acts as an XMPP client and I am using the [Smack](http://www.igniterealtime.org/projects/smack/index.jsp) library. Now, the server I am connecting to requires SSL (in Pidgin I have to check "Force old (port 5223) SSL"). I'm having trouble getting Smack to connect to this server. Is it ... | [
0.4915705919265747,
0.09801018238067627,
0.4853239357471466,
0.07347016036510468,
-0.13016867637634277,
-0.47777992486953735,
0.2312481701374054,
0.1937147080898285,
-0.3476918935775757,
-0.6243888139724731,
0.37057796120643616,
0.4890075922012329,
-0.08830996602773666,
0.12150885164737701... | |
I am new to AS3. When learning AS3, I get the below code from an Adobe example and trying to run it gives an error like
```
"1037: Packages cannot be nested."
```
What does this mean?
Please tell me how to execute? or any problem in this code?
```
package {
import flash.display.Sprite;
import flash.text.T... | [
0.30032989382743835,
-0.16706188023090363,
0.6105216145515442,
-0.4077302813529968,
-0.08967981487512589,
-0.2185772955417633,
0.4808809161186218,
-0.5403451323509216,
0.23031453788280487,
-0.4166854918003082,
-0.27511030435562134,
0.6570667624473572,
-0.35991358757019043,
-0.1517917364835... | |
label1.text = "This text is selected.";
label1.setSelection(0, 9);
label1.alwaysShowSelection = true;
var label2:TextField = createTextField(0, 50, 200, 20);
label2.text = "Drag to select some of this text.";
}
private function createTextField(x:Number, ... | [
0.0415213443338871,
-0.43644827604293823,
0.5460827350616455,
-0.1534050703048706,
0.005445485003292561,
0.02973565086722374,
-0.15627923607826233,
-0.2196686863899231,
-0.07692565023899078,
-0.3958668112754822,
-0.38235822319984436,
0.37481221556663513,
-0.5086005330085754,
-0.04908628016... | |
width:Number, height:Number):TextField {
var result:TextField = new TextField();
result.x = x; result.y = y;
result.width = width; result.height = height;
addChild(result);
return result;
}
}
}
```
Your code should compile, provided that it is in ... | [
0.060519203543663025,
0.054126109927892685,
0.32980144023895264,
-0.40831485390663147,
0.14089429378509521,
-0.00455908989533782,
0.5197258591651917,
-0.31047937273979187,
-0.15236732363700867,
-0.3695337772369385,
-0.2936747968196869,
0.6454156041145325,
-0.02921619825065136,
0.2121804356... | |
source folder ("src" in flex builder). Are you sure that's the entire file?
The error means that you have nested a package {} statement inside another package {} statement. | [
0.37803027033805847,
0.01185976155102253,
-0.22836878895759583,
0.010494232177734375,
0.26732489466667175,
-0.39866942167282104,
0.0671553686261177,
0.1231883317232132,
-0.23174387216567993,
-0.5086925625801086,
-0.11409501731395721,
0.5838138461112976,
-0.22153079509735107,
0.091201409697... | |
Are there disadvantages of using XML, instead of RDMS? The reason I ask this is because my data is more naturally represented by XML structure, rather than RDBMS. I initially thought of [storing the data in relational database](https://stackoverflow.com/questions/545145/map-xml-structure-to-database-schema), but the la... | [
0.24453015625476837,
0.3133446276187897,
-0.02642795257270336,
0.133805513381958,
-0.15128271281719208,
-0.48053473234176636,
-0.030197182670235634,
-0.22851337492465973,
-0.3700246214866638,
-0.4906943738460541,
-0.12769632041454315,
0.4389760196208954,
-0.2951275408267975,
0.170757427811... | |
to use and construct, what about XML queries? I don't know.
I am doing .Net application.
In my opinion, these are the factors to consider
1. Which fits your applications needs more closely
2. How large a data set you need to handle?
3. Are you transferring data between applications or are you going to query it?
Once... | [
0.19058357179164886,
0.12398047000169754,
-0.20900365710258484,
0.20593909919261932,
-0.10369876027107239,
-0.25224512815475464,
-0.28692957758903503,
-0.14211662113666534,
-0.3029261827468872,
-0.7668981552124023,
-0.017509810626506805,
0.4848400950431824,
-0.3331557512283325,
0.075710892... | |
and integrity needs like Nick has suggested.
I have little experience in the area, however this is what I have heard from others at my school.
All the best. | [
0.5865052342414856,
0.3773902356624603,
-0.34720534086227417,
0.1428263932466507,
-0.02039506658911705,
-0.17017331719398499,
0.4888455867767334,
-0.11822277307510376,
-0.10057047009468079,
-0.36065664887428284,
0.30116036534309387,
1.1348398923873901,
0.43995577096939087,
-0.2012347728013... | |
I published an orchestration in Biztalk as a webservice. Does anyone know how I can use XML serialization or something to load XML from a file and "convert" it to the messagetype the webservice expects? How do people usually use this webservices? I try to avoid using untyped messages since I use both XML and flatfile, ... | [
0.4156245291233063,
0.09600966423749924,
-0.11520937830209732,
0.29938122630119324,
-0.3195820152759552,
-0.2221074253320694,
0.18313337862491608,
-0.3610513508319855,
0.11174596101045609,
-0.4833400547504425,
0.1746218353509903,
0.5334397554397583,
-0.3700539767742157,
-0.1819991916418075... | |
contains what you think
2. Download an IDE from the Internet and use the built-in debugger to look at the various variables
3. Dump the state of your objects just before the point where the test fails.
4. Use the "message" part of the asserts to output more information why it fails (see below)
5. Disable all but a hand... | [
0.5073791146278381,
0.1362471580505371,
0.1506073921918869,
0.1601932793855667,
-0.04448004439473152,
-0.2487187683582306,
0.5715860724449158,
-0.38451313972473145,
0.21879413723945618,
-0.38986581563949585,
-0.32140135765075684,
0.47782227396965027,
-0.26044338941574097,
-0.00648048613220... | |
Our product earned bad reputation in terms of performance. Well, it's a big enterprise application, 13 years old, that needs a refreshment treat, and specifically a boost in its performance.
We decided to address the performance problem strategically in this version. We are evaluating a few options on how to do that. ... | [
0.13153432309627533,
0.3138519823551178,
0.32529276609420776,
0.10346540808677673,
0.39629945158958435,
-0.10350839793682098,
0.039859116077423096,
0.17831316590309143,
-0.06847091019153595,
-0.41974392533302307,
0.12201730161905289,
0.29233554005622864,
0.2561367154121399,
0.0478694438934... | |
need to deliver earlier a stable versions, we are working on this process as well, but it's not in my area)
One of the directions I am pushing is to set up a lab environment installed with the nightly build so developers can test the performance impact of their code.
I'd like this environment to be constantly loaded ... | [
0.5317769050598145,
0.32107919454574585,
0.0698486864566803,
0.06077992543578148,
0.18675948679447174,
-0.1464986801147461,
0.3955839276313782,
-0.14779500663280487,
-0.04653426632285118,
-0.6882005929946899,
0.046624358743429184,
0.7402252554893494,
0.05537658557295799,
-0.205113321542739... | |
on existing features, as well as performance of new features.
I am a bit worried that I'm aiming too high, and it it will turn out to become too complicated.
What do you think of such an idea?
Does anyone have an experience with setting up such an environment?
Can you share your experience?
It sounds like a good ide... | [
0.944349467754364,
0.3000865876674652,
-0.1605592519044876,
0.154973104596138,
0.20928530395030975,
0.09429948031902313,
0.32562005519866943,
0.22711195051670074,
-0.3622268736362457,
-0.3161434531211853,
-0.011039110831916332,
0.7584609389305115,
0.2686600685119629,
-0.03671606630086899,
... | |
the performance testing team earlier in the process.
In fact, if this version is all about performance, why not have the team just take this version to address all the performance issues that came late in the iteration for the last version.
EDIT: "Don't developers have a responsibility to performance test code" was a... | [
0.5921041965484619,
-0.06764290481805801,
-0.16736222803592682,
0.3009353280067444,
-0.3339947760105133,
-0.5522699356079102,
0.5089156031608582,
-0.09226921200752258,
-0.013669565320014954,
-0.3015024960041046,
0.18170785903930664,
0.9196731448173523,
-0.1433335691690445,
-0.2441082000732... | |
this when you would be better developing features.
If your developer team are repeatedly developing noticeably slow code then education on performance or better programmers is the only answer, not more expensive process. | [
0.10336126387119293,
0.14608272910118103,
-0.04001864790916443,
0.6161723136901855,
0.060804516077041626,
-0.016751134768128395,
0.32369282841682434,
0.041495129466056824,
-0.08961457759141922,
-0.7315177917480469,
-0.22364813089370728,
0.5110591650009155,
0.3412051796913147,
-0.1084721162... | |
For objects which compose another object as part of their implementation, what's the best way to write the unit test so only the principle object gets tested? Trivial example:
```
class myObj {
public function doSomethingWhichIsLogged()
{
// ...
$logger = new logger('/tmp/log.txt');
$l... | [
0.3590072989463806,
-0.10685735195875168,
0.01759389415383339,
0.004160997923463583,
0.13897572457790375,
-0.08028293401002884,
0.4576401114463806,
-0.34043312072753906,
-0.027924031019210815,
-0.5164384841918945,
0.01239781454205513,
0.5531686544418335,
-0.5143696665763855,
-0.02274493873... | |
and hence mocked in a unit test, but that's not always the case - in more complicated scenarios, you do need to compose other objects or make calls to static methods.
As we don't want to test the logger object, only the myObj, how do we proceed? Do we create a stubbed "double" with the test script? Something like:
``... | [
0.39399492740631104,
-0.09968718886375427,
0.10409727692604065,
-0.010969964787364006,
-0.16796626150608063,
-0.12121812999248505,
0.32446056604385376,
-0.18229037523269653,
-0.05350548401474953,
-0.5166233777999878,
-0.06765740364789963,
0.3765720725059509,
-0.5181010961532593,
-0.1083002... | |
on the return values. Also, what if you want to test the calls to the dependency object in the same was you can with mock objects? Is there a way of mocking objects which are instantiated by the SUT rather than being passed in?
I've read the man page on mocks but it doesn't seem to cover this situation where the depen... | [
0.1896563470363617,
-0.1291818916797638,
-0.0563715398311615,
0.3552470803260803,
-0.2924140691757202,
0.21017234027385712,
0.41862598061561584,
-0.2279091626405716,
-0.23015014827251434,
-0.47472208738327026,
0.07736410945653915,
0.5650572180747986,
-0.2618211805820465,
0.217788964509964,... | |
API, is to default to the current behaviour, but provide a hook to override it. There are a number of ways that this could be implemented.
Some languages have tools that can inject mock classes into code, but I don't know of anything like this for PHP. In most cases, you would probably be better off refactoring your c... | [
0.5019993185997009,
0.05129214748740196,
-0.21767859160900116,
0.0936155766248703,
-0.22048185765743256,
0.01795721985399723,
0.4112354815006256,
0.15526609122753143,
-0.18322017788887024,
-0.3227892518043518,
0.16875480115413666,
0.6945192813873291,
-0.6210023760795593,
-0.179551586508750... | |
I recently started a new project and I'm trying to keep my instance variables always initialized to some value, so none of them is at any time null. Small example below:
```
public class ItemManager {
ItemMaster itemMaster;
List<ItemComponentManager> components;
ItemManager() {
itemMaster = new ItemMaster(... | [
0.1848122626543045,
-0.40346577763557434,
0.31635981798171997,
-0.13974903523921967,
-0.3640114665031433,
-0.2643187940120697,
0.4181586503982544,
-0.34145140647888184,
-0.491781085729599,
-0.6782797574996948,
0.04697012901306152,
0.4741615056991577,
-0.31261780858039856,
0.322866380214691... | |
or empty list, etc. I'm not using this approach for method scoped variables as their scope is very limited and so doesn't affect other parts of the code.
This all is kind of experimental, so I'd like to know if this approach could work or if there are some pitfalls which I'm not seeing yet. Is it generally a good idea... | [
0.21964086592197418,
-0.03405967727303505,
-0.3872458338737488,
0.27654093503952026,
-0.25723201036453247,
-0.058837294578552246,
0.30139851570129395,
-0.014734270051121712,
-0.4191661775112152,
-0.32976505160331726,
0.19624878466129303,
0.4016093611717224,
-0.33604779839515686,
0.12490151... | |
state of the collection, which is a different thing.
So I really do not think it's an either/or. And I would declare the variable **final** if I initialize them in the constructor. If you declare it final it becomes very clear to the reader that this collection cannot be null. | [
0.20202548801898956,
-0.011994664557278156,
-0.0817747712135315,
0.03023351915180683,
-0.2218358963727951,
0.054460637271404266,
0.3809126913547516,
0.11945877224206924,
-0.2420968860387802,
-0.3909042775630951,
-0.12841913104057312,
0.0727333277463913,
-0.11188370734453201,
0.739509165287... | |
Is there any way that you can combine predicates?
Lets say I have something like this:
```
class MatchBeginning : public binary_function<CStdString, CStdString, bool>
{ public:
bool operator()(const CStdString &inputOne, const CStdString &inputTwo) const
{ return inputOne.substr(0, inputTwo.length(... | [
0.06965639442205429,
-0.31832000613212585,
0.02034769020974636,
-0.3919738829135895,
-0.044314976781606674,
0.10763715207576752,
0.1908070147037506,
-0.3755391836166382,
0.007346836384385824,
-0.45261022448539734,
-0.18872369825839996,
0.6521013379096985,
-0.6896556615829468,
0.02247906103... | |
vector<CStdString>::iterator searchResult = find_if(tokens.begin(), tokens.end(), not1(bind2nd(MatchBeginning(), "-")));
return 0;
}
```
This works, but now I'd like to do something like:
```
searchResult = find_if(tokens.begin(), tokens.end(), bind2nd(MatchBeginning(), "-b") || not1(bind2nd(MatchBeginn... | [
-0.28905174136161804,
-0.43132561445236206,
0.5271189212799072,
-0.08889245986938477,
-0.1611824631690979,
-0.05164720490574837,
0.10858765244483948,
-0.1568274199962616,
-0.23933586478233337,
-0.7539937496185303,
0.0533374547958374,
0.7394254207611084,
-0.4227360486984253,
-0.075752414762... | |
community wiki answer started by xhantt for a good example using STL.
(old, deprecated, answer) You can write your own utility for this, similar:
```
// here we define the combiner...
template<class Left, class Right>
class lazy_or_impl {
Left m_left;
Right m_right;
public:
lazy_or_impl(Left const& left, Right ... | [
0.27489998936653137,
-0.17465373873710632,
0.08836531639099121,
0.022116681560873985,
-0.00403016759082675,
-0.14726167917251587,
0.26117053627967834,
-0.2710513472557068,
0.0018958763685077429,
-0.3266506493091583,
0.10504534095525742,
0.4162520170211792,
-0.5253672003746033,
0.0924258455... | |
then use it: `... lazy_or(bind1st(...), bind1st(...)) ...` | [
0.11364112049341202,
0.16850782930850983,
0.10670427232980728,
-0.2992887496948242,
-0.012244083918631077,
-0.06294760853052139,
0.381428986787796,
-0.05194108188152313,
0.08627578616142273,
-0.5838749408721924,
-0.34904319047927856,
0.5703900456428528,
-0.4802164137363434,
-0.144996255636... | |
I'm writing a small webpage that will enable students to answer questions and get feedback on their answers.
Part of this detection checks for common errors to give them guidance. Specifically I want to check if their answer is a power of ten out from the actual answer.
If the answer was 3.93E-6, this condition shoul... | [
0.015223132446408272,
0.3061753511428833,
0.22989846765995026,
-0.009458830580115318,
-0.17860960960388184,
-0.067352294921875,
0.4291324019432068,
-0.18726111948490143,
0.1057281643152237,
-0.5083245635032654,
0.0522487610578537,
0.5411483645439148,
0.08786743879318237,
0.0741398334503173... | |
doesn't work as error/correct doesn't work for large/small numbers.
How can I fix this?
Live code at: <http://bradshawenterprises.com/test.html>
```
var num = 12.4123;
var numString = num.toExponential()
// numString = "1.24123e+1"
```
This normalizes the number, but you have to parse it manually. (Like on how accu... | [
0.06232897937297821,
0.05342670530080795,
0.16246357560157776,
0.12566673755645752,
0.22196124494075775,
0.1769961267709732,
0.7663061618804932,
-0.1499486267566681,
-0.2657628655433655,
-0.45210185647010803,
0.06282594054937363,
0.23923006653785706,
-0.10263549536466599,
-0.04395319521427... | |
For some reason I can't catch the error. I'm following an example in O'Reillys PHP cookbook, so I'm not doing any cowboy coding (yet).
The error is:
```
SoapFault exception: [SOAP-ENV:Server] SoapFault::SoapFault() [soapfault.soapfault]: Invalid parameters. Invalid fault code. in C:\xampp\htdocs\soap\client_database.... | [
0.03586401417851448,
0.47719746828079224,
0.12272937595844269,
-0.1789349466562271,
0.1579686999320984,
0.022808421403169632,
0.7678601145744324,
-0.3544791042804718,
0.02306233160197735,
-0.2617093622684479,
0.3317275941371918,
0.4293808341026306,
-0.36165890097618103,
0.08956703543663025... | |
I'm not against using "Using" statement, but I'm wondering how this affect performance when we use it inside one of another.
For example:
```
using (test1 (type1))
{
using (test2(type2))
{
using (test2(type3))
{ | [
0.6544409394264221,
0.0562598817050457,
-0.25470247864723206,
-0.32765495777130127,
-0.05005815997719765,
-0.33638352155685425,
0.6114888787269592,
-0.3048435151576996,
0.23814451694488525,
-0.44463807344436646,
-0.0386456735432148,
0.6023362874984741,
-0.41993069648742676,
-0.007130327168... | |
}
}
}
```
This, will be translated in IL like this:
```
try
{
try
{
try | [
0.15417316555976868,
0.016308564692735672,
0.08870425075292587,
-0.1156153455376625,
-0.08635378628969193,
0.06482486426830292,
-0.02762794867157936,
-0.08431195467710495,
0.26525893807411194,
-0.7467121481895447,
-0.2717623710632324,
0.5503454208374023,
-0.5132349729537964,
-0.32029867172... | |
{
}
finally
{
}
} | [
-0.4894339144229889,
0.06904212385416031,
0.3862415552139282,
-0.11379925906658173,
0.013732653111219406,
0.07019959390163422,
0.11683984845876694,
0.47651371359825134,
-0.0769992247223854,
-0.4070902168750763,
-0.49886274337768555,
0.25919008255004883,
-0.1493997871875763,
0.3719533979892... | |
finally
{
}
}
finally
{
}
```
This will increase the size of assembly and, I believe, affect the performance of the application, right?
Shouldn't we use this?
```
type1 test1 = new type1;
type2 test2 = new | [
0.3342694342136383,
0.04897482693195343,
0.13125407695770264,
-0.024052906781435013,
0.12593698501586914,
-0.13762308657169342,
0.46595272421836853,
-0.36487695574760437,
-0.029557202011346817,
-0.7033630609512329,
-0.16261710226535797,
0.5218490362167358,
-0.5129744410514832,
-0.017666336... | |
type2;
type3 test3 = new type3;
try
{
}
finally
{
test1.Dispose;
test2.Dispose;
test3.Dispose;
}
```
No, *don't* use your second form. If `test1.Dispose()` throws an | [
0.3179541528224945,
-0.2905992269515991,
-0.00815916433930397,
-0.4156709313392639,
-0.05505921691656113,
-0.18710580468177795,
0.6822963356971741,
-0.43134796619415283,
0.06746316701173782,
-0.6104009747505188,
-0.2842809557914734,
0.3457343876361847,
-0.40925174951553345,
0.1222892850637... | |
exception for some reason, `test2.Dispose()` and `test3.Dispose()` won't get called.
The performance difference, if any, will be microscopic. Don't throw away correctness for insignificant performance :) | [
0.2224946916103363,
0.07563460618257523,
-0.018986018374562263,
-0.0012010836508125067,
0.06563329696655273,
-0.360789954662323,
0.3943023383617401,
-0.19563473761081696,
-0.156854510307312,
-0.5925134420394897,
-0.17258593440055847,
0.4170322120189667,
-0.18706874549388885,
-0.19070589542... | |
Does anyone know how to set font and color on a static text and other controls of MFC dialog for Windows Mobile?
Where can I get the list of supported fonts?
Thanks!
Colors are changed via [SetBkColor](http://msdn.microsoft.com/en-us/library/aa920825.aspx) and [SetTextColor](http://msdn.microsoft.com/en-us/library/aa... | [
0.034538332372903824,
-0.05435441434383392,
0.7128848433494568,
0.051748715341091156,
-0.005984519142657518,
-0.010148086585104465,
0.22292490303516388,
-0.025329459458589554,
-0.39305123686790466,
-0.6654411554336548,
-0.06640047580003738,
0.5688824653625488,
-0.2137477546930313,
-0.08780... | |
I have a simple JS function that needs to get called when AJAX call succeeds, however i don't have any control over the AJAX calls since the framework (DNN5) handles all that.
How do i call my function on AJAX success?
I use DNN5 and jQuery, if you're not familiar with DNN, just assume that all the controls on the pa... | [
0.007654439192265272,
0.004978719167411327,
0.3999081254005432,
0.05971793457865715,
-0.28834038972854614,
-0.20518380403518677,
0.2613251805305481,
-0.07509243488311768,
-0.08357268571853638,
-0.721182107925415,
0.009661694057285786,
0.7687093019485474,
0.037165384739637375,
-0.1476579159... | |
prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequest);
// runs when async postback completes.
function EndRequest(sender, args)
{
if (sender._postBackSettings.sourceElement.id) // the id of the element that raised the postback that is completing
{
//Do what you ne... | [
-0.22985288500785828,
-0.21618498861789703,
0.9315144419670105,
-0.19015930593013763,
-0.09305666387081146,
-0.04654431715607643,
0.27318498492240906,
-0.5876027345657349,
-0.34026333689689636,
-0.6695436239242554,
-0.34798404574394226,
0.4877074658870697,
-0.16451111435890198,
0.122873209... | |
Is it possible to have a WebView zoomed in by default. Im trying to place and advert in my application and would like it to be zoomed to 100% by default so it fills the space.
Being able to disable zooming would also be a benefit but I cant disable all interaction as I would like them to be able to click the link
I di... | [
0.29532504081726074,
-0.13820794224739075,
0.5400867462158203,
0.11187051981687546,
-0.012636441737413406,
-0.3131924569606781,
0.14333614706993103,
-0.062407199293375015,
-0.2505130171775818,
-0.6078958511352539,
0.15508955717086792,
0.662172794342041,
-0.24668605625629425,
-0.43897035717... | |
Is there a nice simple method of delaying a function call whilst letting the thread continue executing?
e.g.
```
public void foo()
{
// Do stuff!
// Delayed call to bar() after x number of ms
// Do more Stuff
}
public void bar()
{
// Only execute once foo has finished
}
```
I'm aware that this ca... | [
0.5380373001098633,
-0.21753814816474915,
0.19396746158599854,
-0.28189757466316223,
0.196552574634552,
-0.1537683606147766,
-0.009581683203577995,
-0.08417800068855286,
-0.5270609855651855,
-0.1370658576488495,
-0.07950685918331146,
0.42627912759780884,
-0.3926734924316406,
0.243401318788... | |
different (singleton) classes which my need to call each other in exceptional circumstances. The problem being that this is done at initialisation so foo needs to call bar which needs an instance of the foo class which is being created... hence the delayed call to bar() to ensure that foo is fully instanciated.. Readin... | [
0.29811063408851624,
0.20052078366279602,
-0.06151004135608673,
-0.20407772064208984,
-0.29173558950424194,
0.03626454621553421,
0.46167922019958496,
-0.010981167666614056,
-0.2370424121618271,
-0.47204411029815674,
-0.037956226617097855,
0.6292772889137268,
-0.47771942615509033,
0.3705676... | |
co-exist very nicely. I think that I'm not going to messaround with nasty async-patters, rather I'm going to refactor the initialisation of one of the classes.
Thanks to modern C# 5/6 :)
```
public void foo()
{
Task.Delay(1000).ContinueWith(t=> bar());
}
public void bar()
{
// do stuff
}
``` | [
0.3736238479614258,
0.17396648228168488,
0.21002286672592163,
-0.3496397137641907,
0.3289509117603302,
-0.11199774593114853,
0.2853500247001648,
-0.24449989199638367,
-0.12756504118442535,
-0.319100946187973,
-0.14605313539505005,
0.5540847778320312,
-0.692237913608551,
0.18325026333332062... | |
Let's say I have a number in the german number format "1,00" which is equal to 1.0 in the en-US locale.
Is there a built-in way to convert this text in T-SQL to the corresponding number? It seems like CONVERT and CAST accept only numbers with '.' as the decimal separator and I see no way to tell them otherwise.
I was... | [
0.45094871520996094,
0.37048906087875366,
0.18329167366027832,
0.135603129863739,
-0.16152450442314148,
-0.10090450197458267,
0.5738334655761719,
0.07572780549526215,
0.11037879437208176,
-0.5831040143966675,
0.10164733976125717,
0.28049948811531067,
0.13183408975601196,
0.1556158214807510... | |
SQL Server, then you will have to create a CLR stored procedure/user-defined function which will take the string as a parameter and return the numeric type that you desire. You might also want to take a parameter that indicates what region names (en-US for example) you might want to use to indicate the culture to use f... | [
0.2891494631767273,
-0.05252492427825928,
0.2655009329319,
0.21181808412075043,
0.1304178386926651,
-0.3097865879535675,
-0.10753437876701355,
0.2051798552274704,
-0.1385001540184021,
-0.36313772201538086,
-0.015011514537036419,
0.2701876759529114,
-0.46101972460746765,
0.09576461464166641... | |
We are starting out a new project where I work and one of the things being talked about is the name of the product. The rest of the company seem to place great importance on the domain name being available eg. [product].com. I am saying that it does not matter as [product].[companydomain] or [companydomain]/[product] a... | [
0.9480558037757874,
0.24878321588039398,
0.4235176742076874,
0.11149725317955017,
-0.21493974328041077,
-0.5127319097518921,
-0.028836434707045555,
0.4390403628349304,
-0.2827611267566681,
-0.3443323075771332,
0.16449186205863953,
0.3327171504497528,
0.25690028071403503,
0.6146956086158752... | |
$10/year, it's not a big deal.
On the other hand, if your brand is already strong, [strongbrand]/[newproduct] could be better than [unknownproduct].com. You could even combine the two; just get the new domain, and redirect it to your company's site (or vice versa). | [
0.43819668889045715,
-0.08473040163516998,
0.3763783276081085,
0.11934013664722443,
0.14661425352096558,
-0.1668841689825058,
0.19743669033050537,
0.25900378823280334,
-0.30781790614128113,
-0.323345422744751,
0.132063090801239,
0.30183905363082886,
0.375169575214386,
0.24533569812774658,
... | |
I have a WPF Image control with attached blur effect.
Is there a way to save the image (with blur) without using RenderTargetBitmap?
Thank you.
UPDATE: I'm using now new custom effect which derives from System.Windows.Media.Effects.ShaderEffect.
I would like to save my image with shader effect applied.
the only way ... | [
0.131442591547966,
-0.25218909978866577,
1.0365158319473267,
-0.11127500236034393,
-0.27137991786003113,
0.08468389511108398,
0.4262903034687042,
-0.6186183094978333,
-0.2776274085044861,
-0.9005479216575623,
-0.001158667029812932,
0.8372841477394104,
-0.1684838980436325,
-0.07308591902256... | |
I can turn on warnings as errors and exclude certain warnings for all the projects in my solution except for a website (not web application).
Is there anyway to turn on 'warnings as errors' as errors for websites and is there anyway to turn off certain errors for the whole website or sub folders?
**Update** I'm using... | [
0.48314201831817627,
0.3951023817062378,
0.13460594415664673,
0.17734965682029724,
0.02037215419113636,
-0.0728076919913292,
0.37874162197113037,
0.15747304260730743,
-0.2859904170036316,
-0.955111026763916,
-0.00020337174646556377,
0.15661194920539856,
-0.23094715178012848,
-0.15323519706... | |
compilerOptions="/warnaserror"
type="Microsoft.CSharp.CSharpCodeProvider,
System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
</compilers>
</system.codedom>
```
[Here is where I originally found this trick.](http://odetocode.com/Blogs/scott/archive/2006/08/10... | [
0.15044626593589783,
-0.08515545725822449,
0.054679542779922485,
-0.023890161886811256,
0.03373953700065613,
0.02821662649512291,
0.6761431097984314,
-0.4347417652606964,
-0.18603627383708954,
-0.5355415940284729,
0.009701631963253021,
0.4464147090911865,
-0.47552424669265747,
-0.231458157... | |
I want to describe a complex script and possibly programming language. i was thinking of describing it in Backus-Naur Form before doing anything (excluding dummy/sample script code)
Is there another form to describe a language then Backus-Naur Form? What alternatives should i consider?
The obvious alternative would be... | [
0.24680574238300323,
0.18193677067756653,
-0.16358031332492828,
-0.36043795943260193,
-0.5819635391235352,
0.2455761879682541,
0.40208783745765686,
0.06132139638066292,
-0.06841840595006943,
-0.5907918810844421,
-0.13213811814785004,
0.2935481369495392,
-0.3097940683364868,
-0.162033796310... | |
can help with the generation of a parser from such a grammar and make it quite trivial to produce an interpreter. | [
-0.1085648387670517,
0.3472368121147156,
-0.258800745010376,
0.26692432165145874,
-0.10483568161725998,
0.02353115938603878,
0.46372759342193604,
0.083980493247509,
0.13297583162784576,
-0.33825597167015076,
-0.3688550889492035,
0.5077188611030579,
-0.19662688672542572,
-0.4762542843818664... | |
I am a bit lost. I've tried to implement a solution based on JqGrid and tried to use function as datatype. I've setted all by the book I guess, I get WS invoked and get JSON back, I got succes on clientside in ajax call and I "bind" jqGrid using `addJSONData` but grid remains empty. I do not have any clue now... other ... | [
-0.035403061658144,
-0.2046811878681183,
0.23493191599845886,
0.14769430458545685,
-0.20768247544765472,
-0.17301593720912933,
0.6440562009811401,
-0.1464134156703949,
0.0756082609295845,
-0.48850759863853455,
-0.034715283662080765,
0.4459277093410492,
-0.2227082997560501,
0.30758231878280... | |
{
// Load a list
InitSessionVariables();
SA.DB.DenarnaEnota.DenarnaEnotaDB db = new SAOP.SA.DB.DenarnaEnota.DenarnaEnotaDB();
DataSet ds = db.GetLookupForDenarnaEnota(SAOP.FW.DB.RecordStatus.All);
// Turn into HTML friendly format | [
-0.27849510312080383,
-0.18223392963409424,
0.2826049327850342,
0.1634627878665924,
-0.1539071649312973,
0.1584417223930359,
0.479781836271286,
-0.21844004094600677,
-0.5993807911872864,
-0.6075061559677124,
-0.46764522790908813,
0.07636403292417526,
-0.4208240807056427,
-0.006506297271698... | |
GetGridData summaryList = new GetGridData();
summaryList.page = "1";
summaryList.total = "10";
summaryList.records = "160";
int i = 0;
foreach (DataRow dr in ds.Tables[0].Rows) | [
-0.4456164240837097,
-0.22680024802684784,
0.7680008411407471,
0.09434020519256592,
0.02183099277317524,
0.11443152278661728,
0.34995612502098083,
-0.41814863681793213,
-0.5913281440734863,
-0.5930107831954956,
-0.5664187669754028,
0.2684299945831299,
-0.2988716959953308,
0.321031630039215... | |
{
GridRows row = new GridRows();
row.id = dr["DenarnaEnotaID"].ToString();
row.cell = "[" + "\"" + dr["DenarnaEnotaID"].ToString() + "\"" | [
-0.5357585549354553,
-0.1340305358171463,
0.3316158950328827,
-0.3842099606990814,
0.014040189795196056,
0.27262431383132935,
0.19024235010147095,
-0.6788996458053589,
-0.21574431657791138,
-0.7280569672584534,
-0.13968107104301453,
0.34967780113220215,
-0.17076967656612396,
0.183532491326... | |
+ "," + "\"" + dr["Kratica"].ToString() + "\""
+ "," + "\"" + dr["Naziv"].ToString() + "\""
+ | [
-0.18604685366153717,
-0.02141757123172283,
0.38243240118026733,
-0.3173663020133972,
-0.2401108592748642,
0.28063833713531494,
-0.07556650042533875,
-0.6400275826454163,
-0.0996534526348114,
0.00588799174875021,
-0.3813224732875824,
0.3150906264781952,
-0.5724231600761414,
0.1730313897132... | |
"," + "\"" + dr["Sifra"].ToString() + "\""
+ "]";
summaryList.rows.Add(row);
}
return JsonConvert.SerializeObject(summaryList);
}
```
My ASCX code is this:
```
jQuery(document).ready(function() {
jQuery("#list").jqGrid({
datatype... | [
0.08928951621055603,
-0.08319265395402908,
0.7763279676437378,
-0.22477568686008453,
0.4813407361507416,
-0.12735961377620697,
0.04991180822253227,
-0.2531197667121887,
-0.12016698718070984,
-0.5738361477851868,
-0.38530299067497253,
0.6497586965560913,
-0.38733142614364624,
0.002403296297... | |
function(postdata) {
jQuery.ajax({
url: '../../AjaxWS/TemeljnicaEdit.asmx/GetGridData',
data: '{}',
dataType: 'json',
type: 'POST',
contentType: "application/json; charset=utf-8",
complete: function(jsondata, stat) {
if (stat == "success") {
va... | [
-0.41984570026397705,
-0.6357479095458984,
0.38684436678886414,
-0.1160820871591568,
-0.07383359223604202,
-0.007647897582501173,
0.4953041076660156,
-0.0426948219537735,
-0.06643284112215042,
-0.6092801094055176,
-0.7353164553642273,
0.5435081720352173,
-0.36041536927223206,
-0.2320020496... | |
var thegrid = jQuery("#list")[0];
var myjsongrid = eval('(' + clearJson + ')');
alfs
thegrid.addJSONData(myjsongrid.replace(/\\/g, ''));
}
}
});
},
colNames: ['DenarnaEnotaID', 'Kratica', 'Sifra', 'Naziv'],
colModel: [{ | [
-0.4720219671726227,
-0.1783587783575058,
0.5933366417884827,
-0.3416593372821808,
-0.03995440900325775,
0.2915491759777069,
0.42629528045654297,
-0.24826680123806,
-0.00876172911375761,
-0.3095485270023346,
-0.6568240523338318,
0.295572429895401,
-0.44354894757270813,
0.0249323770403862,
... | |
name: 'DenarnaEnotaID',
index: 'DenarnaEnotaID',
width: 100
},
{
name: 'Kratica',
index: 'Kratica',
width: 100
},
{
name: 'Sifra',
index: 'Sifra',
width: 100 | [
-0.3982480764389038,
-0.21547549962997437,
-0.26228806376457214,
0.18618936836719513,
-0.43656760454177856,
0.9338189363479614,
0.24513445794582367,
-0.21325385570526123,
-0.17049486935138702,
-0.4633592665195465,
-0.207981675863266,
0.17463943362236023,
-0.08493759483098984,
-0.1234555691... | |
},
{
name: 'Naziv',
index: 'Naziv',
width: 100
}
],
rowNum: 15,
rowList: [15, 30, 100],
pager: jQuery('#pager'),
sortname: 'id',
// loadtext:"Nalagam zapise...",
// viewrecords: true,
sortorder: "desc",
// caption:"Vrstice",
// width:"800", | [
-0.24056386947631836,
0.015034018084406853,
0.3849901258945465,
-0.08659642934799194,
0.1557421088218689,
0.5768720507621765,
0.1834782063961029,
-0.16629311442375183,
-0.2361607551574707,
-0.5225302577018738,
-0.44570884108543396,
0.5998016595840454,
-0.12382905185222626,
-0.0032574369106... | |
imgpath: "../Scripts/JGrid/themes/basic/images"
});
});
```
from WS I get JSON like this:
```
{”page”:”1″,”total”:”10″,”records”:”160″,”rows”:[{"id":"18","cell":"["18","BAM","Konvertibilna marka","977"]“},{”id”:”19″,”cell”:”["19","RSD","Srbski dinar","941"]“},{”id”:”20″,”cell”:”["20","AFN","Afgani","971"]“},{”id”... | [
0.015744797885417938,
0.3464857339859009,
0.7805558443069458,
0.10219907015562057,
0.1582481414079666,
0.34716492891311646,
0.3523850440979004,
-0.23995694518089294,
-0.5999698042869568,
-0.3650308847427368,
-0.2552219033241272,
0.7031072378158569,
-0.537257969379425,
0.12258799374103546,
... | |
for (var i = 0; i < data.length; i++) {
thegrid.addRowData(i+1, data[i]);
}
}
``` | [
-0.11092454195022583,
-0.1504179686307907,
0.5538350939750671,
-0.36963510513305664,
0.19989299774169922,
0.015729045495390892,
0.301313579082489,
-0.3879775404930115,
0.0005387705750763416,
-0.4063767194747925,
-0.0760558471083641,
0.5427054166793823,
-0.21602749824523926,
0.2650960087776... | |
I used to be a java developer and we used tools like ant or maven to manage our development/testing/UAT environments in a standardized way. This allowed us to handle library dependencies, setting OS variables, compiling, deploying, running unit tests, and all the required tasks. Also, the scripts generated guaranteed t... | [
0.5816125869750977,
0.2594291865825653,
-0.33536460995674133,
-0.1743418574333191,
-0.10691405087709427,
-0.10577860474586487,
0.11641501635313034,
0.07116524875164032,
-0.22588612139225006,
-0.6195539832115173,
0.08892800658941269,
0.5941295027732849,
-0.17750184237957,
-0.110245577991008... | |
[virtualenv](http://pypi.python.org/pypi/virtualenv) to create a contained virtual environment (prevent different versions of Python or Python packages from stomping on each other). There is increasing buzz from people moving to this tool. The author is the same as the older working-env.py mentioned by Aaron.
2. [pip](... | [
0.11593042314052582,
-0.3044360876083374,
0.2893911898136139,
0.1319630891084671,
-0.09715190529823303,
0.28566819429397583,
0.1637502908706665,
0.04134924337267876,
-0.5873241424560547,
-0.9770060777664185,
-0.27417102456092834,
0.33662864565849304,
-0.22311824560165405,
0.038638096302747... | |
or git for version control.
7. [Nose](http://somethingaboutorange.com/mrl/projects/nose/) as an extension for unit testing.
8. [PyFit](http://pypi.python.org/pypi/PyFIT/0.8a2) for [FIT](http://fit.c2.com) testing. | [
0.4841419756412506,
-0.5006678700447083,
0.16654323041439056,
-0.02272724360227585,
-0.26966604590415955,
0.11653238534927368,
0.2580030858516693,
-0.24721117317676544,
-0.45014920830726624,
-0.38454726338386536,
-0.47367343306541443,
0.6964735984802246,
-0.2569824159145355,
-0.51318037509... | |
I try to call my custom web service which is deployed as part of CRM4 and received the following error:
```
Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>No Micros... | [
0.04040730744600296,
0.40679723024368286,
0.8233791589736938,
0.1114233136177063,
-0.0685332864522934,
-0.04627550020813942,
0.08802707493305206,
0.01781119406223297,
-0.18033495545387268,
-0.21048134565353394,
-0.1484464704990387,
0.38980528712272644,
-0.05149862915277481,
0.5416345596313... | |
<style>
...
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/RecurrenceService' Application.<hr width=100% size=1 color=silver></H1> | [
0.16950318217277527,
-0.028558967635035515,
0.2806009352207184,
-0.06079968437552452,
-0.027811966836452484,
0.07094316184520721,
0.5035844445228577,
-0.5411074161529541,
-0.4893972873687744,
-0.41549384593963623,
-0.08694614470005035,
0.12033754587173462,
-0.10686711221933365,
0.071422211... | |
<h2> <i>No Microsoft Dynamics CRM user exists with the specified domain name and user ID</i> </h2></span>
...
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
[CrmException: No Microsoft Dynamics CRM user | [
-0.18358446657657623,
0.28734472393989563,
0.7939770817756653,
0.09699038416147232,
-0.2868666350841522,
0.0441381074488163,
-0.230929896235466,
0.07175036519765854,
-0.25784629583358765,
-0.32844772934913635,
-0.22571441531181335,
0.2702142298221588,
-0.3074527680873871,
0.222134649753570... | |
exists with the specified domain name and user ID]
Microsoft.Crm.Authentication.WindowsAuthenticationProvider.Authenticate(HttpApplication application) +895
Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application) +125
Microsoft.Crm.Authentication.Authen... | [
-0.2094121277332306,
0.1705685704946518,
0.6662907600402832,
0.10729292780160904,
-0.034874558448791504,
0.12252315878868103,
0.4025849997997284,
-0.557510256767273,
-0.1380540132522583,
-0.5221744775772095,
-0.2380182296037674,
0.20298832654953003,
-0.11404932290315628,
0.0951154604554176... | |
</td>
</tr>
</table>
<br>
<hr width=100% | [
-0.09341100603342056,
-0.27733632922172546,
0.5817383527755737,
-0.12798036634922028,
0.15433695912361145,
0.13389311730861664,
0.20519094169139862,
-0.5171576738357544,
-0.16916929185390472,
-0.5632895231246948,
-0.33408164978027344,
0.7656459212303162,
0.3156057894229889,
-0.222389727830... | |
size=1 color=silver>
<b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
</font>
</body>
</html>
<!--
[CrmException]: No Microsoft Dynamics CRM user exists with the specified domain na... | [
-0.009666976518929005,
0.21435023844242096,
0.7424236536026001,
0.172476127743721,
-0.2140129953622818,
0.22556988894939423,
0.04015609622001648,
-0.11852975934743881,
-0.24281913042068481,
-0.21335697174072266,
-0.27106815576553345,
-0.020256061106920242,
-0.28716766834259033,
0.237765520... | |
at Microsoft.Crm.Authentication.WindowsAuthenticationProvider.Authenticate(HttpApplication application)
at Microsoft.Crm.Authentication.AuthenticationStep.Authenticate(HttpApplication application)
at Microsoft.Crm.Authentication.AuthenticationPipeline.Authenticate(HttpApplication application)
... | [
-0.07677411288022995,
0.2108841985464096,
0.5945354104042053,
0.08908528089523315,
-0.009185174480080605,
-0.02001952938735485,
0.556646466255188,
-0.32516956329345703,
-0.07355251908302307,
-0.6091554760932922,
-0.2215999811887741,
0.446949303150177,
-0.04542746767401695,
0.13132639229297... | |
web service:
```
RecurrenceService serv = new RecurrenceService();
serv.Credentials = System.Net.CredentialCache.DefaultCredentials;
string result = serv.UpdateSeries();
```
CRM4 url: `http://cw-dev-5/loader.aspx`
Custom service url: `http://cw-dev-5/RecurrenceService/RecurrenceService.asmx`
The following code sni... | [
0.08345430344343185,
0.051969047635793686,
0.6014323830604553,
0.14726439118385315,
0.1342860758304596,
0.03724436089396477,
0.5977855920791626,
-0.1255360096693039,
-0.4888894855976105,
-0.7278115153312683,
-0.3864489495754242,
0.4739604592323303,
-0.07225893437862396,
0.5395042896270752,... | |
I have a Windows Forms application that has this code in the program's start up:
```
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.Automatic);
```
In the MSDN Documentation for [UnhandledExceptionMode.Automatic](http://msdn.microsoft.com/en-us/library/system.windows.forms.unhandledexceptionmode(VS.85)... | [
0.24474923312664032,
0.13645996153354645,
0.5021169781684875,
-0.23018738627433777,
-0.10237346589565277,
-0.24716684222221375,
0.21186353266239166,
-0.19964654743671417,
-0.09845452010631561,
-0.6625097990036011,
-0.23903408646583557,
0.370233952999115,
-0.221000537276268,
0.0426935590803... | |
by .Net unless you specify otherwise; as far as I can tell, the only reason to explicitly set the Unhandled Exception Mode to Automatic is if you want to undo a previous call that changed it to something else. Note that if you do set it to something other than Automatic, the configuration file setting will not be read.... | [
0.582303524017334,
-0.20808473229408264,
0.5185225605964661,
-0.09604296833276749,
-0.015495275147259235,
-0.6384490728378296,
0.4193039834499359,
0.0921967551112175,
-0.5169012546539307,
-0.399370014667511,
-0.4576196074485779,
0.1731230765581131,
-0.7230331897735596,
0.44197237491607666,... | |
I would like to write some tests for the GUI of my Cocoa program.
Is there any good GUI testing framework for Cocoa apps? The only thing I found is [Squish](http://www.froglogic.com/pg?id=Products&category=squish&sub=editions&subsub=mac), which, at 2.400€, is well beyond my budget…
Any ideas? How do *you* test your C... | [
0.20065130293369293,
0.26770058274269104,
0.31158769130706787,
0.20156070590019226,
-0.05987768992781639,
0.1638963669538498,
0.19095101952552795,
0.06001181900501251,
-0.07695389539003372,
-0.631346583366394,
0.10880811512470245,
0.6674424409866333,
0.18160100281238556,
-0.246746778488159... | |
you follow a "[trust, but verify](http://eschatologist.net/blog/?p=16 "Trust, but verify.")" approach where you *trust* that as long as you're making the right connections (according to your framework) that your user can interact properly with your framework. That means you can do the majority of your testing by *verif... | [
0.5016179084777832,
0.11139505356550217,
0.10000918060541153,
0.34929487109184265,
-0.23951223492622375,
-0.24647019803524017,
0.17092910408973694,
-0.6299493312835693,
-0.042140256613492966,
-0.6738593578338623,
0.1938285082578659,
0.5149261951446533,
-0.02765187807381153,
-0.329093158245... | |
testing Cocoa user interfaces: Cocoa Bindings"). (Remember, of course, that the two technologies aren't exclusive: If you want to do drag & drop in a table view managed via Cocoa bindings, you'd also have a data source and probably a delegate hooked up via target-action.)
The thing I don't write unit tests for — gener... | [
0.6505507826805115,
0.047895412892103195,
0.12842027842998505,
0.3664904832839966,
-0.16931645572185516,
-0.15645672380924225,
0.2226105034351349,
-0.22020867466926575,
-0.030852826312184334,
-0.509160578250885,
0.283681184053421,
0.5648645162582397,
0.12254277616739273,
-0.266825020313262... | |
write code to "simulate events." The closest I've ever come to that is constructing a fake drag info object and passing that to an outline view data source to ensure it will deal with drags correctly. | [
0.7637937068939209,
0.0813138484954834,
-0.0011091146152466536,
0.3856649696826935,
0.11214177310466766,
-0.08050943911075592,
0.1383298635482788,
0.20842045545578003,
0.19307565689086914,
-0.5737935900688171,
0.3899928629398346,
0.3400949537754059,
-0.37740659713745117,
-0.376913577318191... | |
I have read in the article ([the article](http://dev.opera.com/articles/view/timing-and-synchronization-in-javascript/)) following concepts about event handlers:
> For a non-bubbling event, the sequence
> of the dispatch is like this:
>
>
> 1. Capturing phase: All "capturing"
> event handlers are fired on all
> a... | [
-0.021860430017113686,
-0.504974901676178,
-0.016719654202461243,
0.0058516040444374084,
0.06798746436834335,
0.029297156259417534,
0.06911959499120712,
-0.36661002039909363,
-0.11770543456077576,
-0.20330259203910828,
-0.09607689827680588,
0.30538177490234375,
-0.3360592722892761,
-0.0980... | |
a bubbling event, the sequence
> is like this:
>
>
> 1. Capturing phase: All "capturing"
> event handlers are fired on all
> ancestor elements, from the top
> down.
> 2. The event is fired on the target
> element
> 3. Bubbling phase: The event is fired
> on all ancestor elements, from the
> target and upward.
... | [
-0.4401228725910187,
-0.47628578543663025,
0.19719140231609344,
-0.13518166542053223,
0.09230316430330276,
0.28077492117881775,
0.07571331411600113,
-0.2088461071252823,
-0.15898528695106506,
-0.3206641972064972,
-0.3892880082130432,
0.16252325475215912,
-0.144106924533844,
-0.057007066905... | |
body now how attach callback that will be called after default action is performed? So I would like to catch an event when character appeared in textarea.
onchange is not a solution because it is fired when focus lost.
onkeyup is not the solution also
Any ideas?
[UPD] I am trying to catch a textarea value change ri... | [
0.23729418218135834,
-0.32991716265678406,
0.7965602874755859,
0.012461135163903236,
-0.2557298541069031,
0.07978422194719315,
0.15836438536643982,
-0.5600954294204712,
-0.006366243120282888,
-0.32946130633354187,
-0.016455834731459618,
0.8599587678909302,
-0.10596445947885513,
-0.21538323... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.