text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
app, etc.). Off the top of my head, I can think of two ways to approach it:
* Analyze assemblies for any web references. The drawback here is that not everything is a web reference and I'm not sure how WCF connections are listed. However, this would at least be a start for finding 80% of the connections. Does anyone k... | [
0.6832990646362305,
0.10076063871383667,
0.23639462888240814,
0.2887585163116455,
-0.21649809181690216,
-0.2108716368675232,
0.39701467752456665,
0.04827640950679779,
-0.48078471422195435,
-0.9725990295410156,
0.28381645679473877,
0.43974271416664124,
-0.2528006136417389,
0.236869141459465... | |
out what is being called and where from. We are looking at enterprise tools that could help but it would be a while before they are implemented (and cost a lot). But is there anything out there that could help out quickly and cheaply? One tool in particular (AmberPoint) can tap into IIS on the servers and monitor inbou... | [
0.5910007357597351,
0.07085331529378891,
0.48302075266838074,
0.38153108954429626,
0.2100532352924347,
-0.043664172291755676,
0.2923729121685028,
0.2633632719516754,
-0.13624711334705353,
-0.2807309925556183,
0.12106567621231079,
0.23197312653064728,
-0.16323411464691162,
-0.13942001760005... | |
just trying to help us get control of it and get out of it.
Thanks,
Matt
You need a service registry (UDDI??)... If you had a means to catalog these services and their consumers, it would make this job of dependency discovery a lot easier. That is not an easy solution, though. It takes time and documentation to get a ... | [
0.44518736004829407,
0.01745074801146984,
0.09681729972362518,
0.5402225255966187,
0.04109450429677963,
-0.09555212408304214,
0.18098029494285583,
0.15593722462654114,
-0.23310868442058563,
-0.6087926626205444,
0.5014152526855469,
0.4751509428024292,
-0.05342964828014374,
0.327319294214248... | |
have some kind of authentication mechanism in place, you could trace who is using a particular service based on login.
You are right about AmberPoint. There are other tools that catalog the service traffic and provide reports showing what is happening to your services. Systinet, SOA Software and Actional also has a pr... | [
0.35436585545539856,
-0.05659586936235428,
0.16488702595233917,
0.15891629457473755,
-0.08824603259563446,
-0.17610947787761688,
0.37322282791137695,
0.19576305150985718,
-0.41683900356292725,
-0.44898128509521484,
0.26413607597351074,
0.22655130922794342,
-0.08262794464826584,
-0.00210966... | |
In C++, what alternatives do I have for exposing a collection, from the point of view of performance and data integrity?
My problem is that I want to return an internal list of data to the caller, but I don't want to generate a copy. Thant leaves me with either returning a reference to the list, or a pointer to the li... | [
0.24238674342632294,
0.2944510877132416,
0.17035426199436188,
-0.002306542359292507,
-0.23643574118614197,
-0.09045085310935974,
0.28216788172721863,
-0.305928111076355,
-0.17491237819194794,
-0.18373633921146393,
-0.20421938598155975,
0.6466948390007019,
-0.3042522072792053,
-0.1644775718... | |
one way or is it particular to the case?
* Are there other alternatives?
[RichQ's answer](https://stackoverflow.com/questions/44693/in-c-what-alternatives-do-i-have-for-exposing-a-collection-from-the-point-of-vi#44734) is a reasonable technique, if you're using an array, vector, etc.
If you're using a collection that... | [
0.052451904863119125,
-0.36846932768821716,
0.06920669227838516,
-0.028740642592310905,
0.054939281195402145,
0.19493669271469116,
0.09381741285324097,
-0.6242694854736328,
-0.16807149350643158,
-0.590034008026123,
-0.2878936231136322,
0.6186136603355408,
-0.40861019492149353,
-0.008408652... | |
{ return myPreciousData.end(); }
private:
mydata_collection myPreciousData;
};
```
...which you can then use in the normal fashion:
```
Blah blah;
for (Blah::mydata_const_iterator itr = blah.data_begin();
itr != blah.data_end();
++itr)
{
// ...
}
``` | [
-0.05479583516716957,
0.029373202472925186,
0.7087542414665222,
-0.14380379021167755,
0.40601643919944763,
-0.019082317128777504,
0.13273265957832336,
-0.007087940815836191,
-0.15750926733016968,
-0.44610410928726196,
-0.5375624299049377,
0.6973947882652283,
-0.13985131680965424,
0.1847986... | |
How can I create an empty one-dimensional string array?
Dim strEmpty(-1) As String | [
0.0022283082362264395,
-0.0910675898194313,
0.24071542918682098,
-0.1809949278831482,
-0.37615731358528137,
-0.04192168638110161,
0.2930103838443756,
-0.24760504066944122,
-0.06224376708269119,
0.0876380130648613,
-0.13859784603118896,
0.13223420083522797,
-0.42136824131011963,
0.240037918... | |
I have downloaded a font that looks less than desirable if it is not anti-aliased. I can not figure out how to enable anti-aliasing in VS, I have changed the 'Smooth Edges of Screen Fonts' in the system performance options but that does not seem to help.
VS2008 on XP SP3.
What am I missing?
Try using ClearType, not S... | [
-0.2567752003669739,
-0.22130797803401947,
0.7317763566970825,
0.09188705682754517,
-0.4920729696750641,
-0.07774904370307922,
0.3648543953895569,
0.11531828343868256,
-0.27928540110588074,
-0.8655936121940613,
0.3091548979282379,
0.8636769652366638,
-0.17261330783367157,
-0.11015145480632... | |
What actually happens to the file system when you do a Subclipse Share Project on an Eclipse project that was externally checked out from Subversion? All the .svn folders are already in place. I get an error when I try to Share Project the right way, and I'd rather not delete and re-checkout the projects from the SVN R... | [
0.6342300772666931,
0.2190297544002533,
-0.04820140078663826,
0.26460447907447815,
-0.18347004055976868,
-0.5762178301811218,
0.3176100552082062,
0.14873771369457245,
-0.2975750267505646,
-0.4730837941169739,
0.04805895313620567,
0.5686536431312561,
-0.011651523411273956,
0.306265413761138... | |
project from the workspace (keep "Delete project contents on disk" unchecked)
* File > Import... > General > Existing Projects into Workspace
* Browse to the folder containing the original project(s) of interest
* Import the projects into your workspace
This seems to have the side effect of subclipse noticing the subv... | [
0.4833933115005493,
-0.2215232253074646,
-0.02370060235261917,
0.0073333075270056725,
-0.0689813643693924,
-0.4183487892150879,
0.1355220377445221,
0.127400740981102,
-0.4125637710094452,
-0.6810474395751953,
-0.4195105731487274,
0.28277960419654846,
-0.17940910160541534,
0.408150613307952... | |
I'm on .NET 2.0, running under Medium Trust (so [TimeZoneInfo](http://msdn.microsoft.com/en-us/library/system.timezoneinfo.aspx) and the Registry are not allowed options). I'm asking the user for two dates and a time zone, and would really love to be able to automatically determine whether I need to adjust the time zon... | [
0.5783448219299316,
-0.0867997258901596,
0.58925461769104,
0.060367945581674576,
0.19924047589302063,
-0.3428150713443756,
0.38974207639694214,
0.15325914323329926,
-0.042616039514541626,
-1.0251414775848389,
-0.0378580279648304,
0.1014326810836792,
-0.16113024950027466,
0.1587293744087219... | |
that into your own data structures. The problem is somewhat simplified if you only care about a subset of time zones, for example just in the USA, but if you need all global time zones, you have a lot of work to do, and then the code has to be updated every few years when the laws change. Even the new time zone objects... | [
0.7016295790672302,
-0.25141671299934387,
0.4334142506122589,
0.22132252156734467,
0.36452561616897583,
-0.3100946545600891,
0.20432625710964203,
-0.015743281692266464,
-0.8485512137413025,
-0.7113485932350159,
-0.14338967204093933,
0.15922954678535461,
-0.07150214165449142,
-0.04843778535... | |
We're currently building an application that executes a number of external tools. We often have to pass information entered into our system by users to these tools.
Obviously, this is a big security nightmare waiting to happen.
Unfortunately, we've not yet found any classes in the .NET Framework that execute command ... | [
0.23245196044445038,
0.0045686704106628895,
-0.14208436012268066,
0.28567156195640564,
0.21287356317043304,
-0.10902975499629974,
0.3831419050693512,
-0.19442299008369446,
-0.021829064935445786,
-0.5374420285224915,
0.05508686602115631,
0.6867201328277588,
-0.3592084050178528,
0.1510552912... | |
.Replace(@"\", @"\\")
> .Replace(@"$", @"\$")
> .Replace(@"""", @"\""")
> .Replace("`", "'")
> ;
> }
>
> ```
What do you guys do to prevent command-line injection attacks? We're planning to implement a regex that is very strict and only allows a very small subset of characters through, b... | [
0.3231419622898102,
-0.12168528139591217,
0.0281467717140913,
0.08587784320116043,
0.10409172624349594,
-0.0013246736489236355,
0.6396226286888123,
-0.05408305674791336,
0.03552945330739021,
-0.5541964769363403,
-0.17269527912139893,
0.8182752132415771,
-0.42647600173950195,
-0.19739694893... | |
they did, we wouldn't be having this problem.
* The users don't pick tools to execute, they enter meta-data which the tools we've chosen use (for example, injecting meta data such as copyright notices into target files).
Are you executing the programs directly or going through the shell? If you always launch an externa... | [
0.5004495978355408,
0.1581461876630783,
-0.04848811775445938,
0.17250783741474152,
-0.05416656658053398,
-0.06700896471738815,
0.27340167760849,
-0.07953708618879318,
-0.19395406544208527,
-0.2460750937461853,
0.07345268130302429,
0.877042829990387,
-0.0843575969338417,
-0.0397938489913940... | |
still got to be aware of any potential security gotchas in the programs that you're calling -- but I don't think this question is about that. | [
0.6281715035438538,
0.3477904498577118,
-0.05753863975405693,
0.268429160118103,
0.09949023276567459,
-0.46894165873527527,
0.2902383506298065,
0.28938642144203186,
-0.2286836951971054,
-0.01877489686012268,
0.33333754539489746,
0.29732266068458557,
-0.06345704197883606,
-0.003246376756578... | |
Has anyone used ADO.NET Data Services as a data source for Adobe Flex applications? If so, any success stories or tragedies to avoid? If you did use it, how did you handle security?
I use WebORB for .NET to do Flex remoting and then use DLINQ on the server. One tricky thing about using LINQ with WebORB is that WebORB u... | [
0.3580164313316345,
0.14656221866607666,
0.1528313159942627,
0.1828508824110031,
-0.3577212691307068,
-0.3897794485092163,
0.15856049954891205,
-0.29545632004737854,
-0.13432322442531586,
-0.5186281204223633,
0.4166199862957001,
0.7353981733322144,
-0.32083338499069214,
-0.1833637207746505... | |
constructor and add the following code:
```
this.DeferredLoadingEnabled = false;
DataLoadOptions dlo = new DataLoadOptions();
dlo.LoadWith<Order>(q => q.Payments);
dlo.LoadWith<Order>(q => q.Customer);
this.LoadOptions = dlo;
```
This tells the DataContext to disable deferred loading of relationships and specificall... | [
0.05753854662179947,
-0.14649634063243866,
0.6570881009101868,
0.01329329889267683,
-0.205315962433815,
0.034612640738487244,
-0.0054341466166079044,
-0.37100672721862793,
-0.21599195897579193,
-0.6140708327293396,
-0.046781715005636215,
0.6664770841598511,
-0.24161796271800995,
-0.0627025... | |
Is there any efficiency difference in an explicit vs implicit inner join?
For example:
```
SELECT * FROM
table a INNER JOIN table b
ON a.id = b.id;
```
vs.
```
SELECT a.*, b.*
FROM table a, table b
WHERE a.id = b.id;
```
Performance wise, they are exactly the same (at least in SQL Server).
PS: Be aware that the `... | [
-0.16919231414794922,
0.16647619009017944,
0.35628366470336914,
-0.1947774738073349,
-0.08177713304758072,
-0.218034029006958,
0.427472323179245,
-0.23302431404590607,
0.024196788668632507,
-0.6433558464050293,
-0.16306906938552856,
0.5538817048072815,
-0.24810616672039032,
0.0109015563502... | |
Can you cast a `List<int>` to `List<string>` somehow?
I know I could loop through and .ToString() the thing, but a cast would be awesome.
I'm in C# 2.0 (so no [LINQ](http://en.wikipedia.org/wiki/Language_Integrated_Query)).
.NET 2.0 has the `ConvertAll` method where you can pass in a converter function:
```
List<int... | [
0.3625961244106293,
-0.16653208434581757,
0.2227191925048828,
-0.1280432641506195,
0.028090646490454674,
-0.04209491237998009,
0.32847580313682556,
-0.4144059717655182,
-0.09717664867639542,
-0.5956812500953674,
-0.03831936791539192,
0.38487595319747925,
-0.1979241669178009,
-0.15415818989... | |
Is it currently possible with pre release of ironruby to run rubygems? It seems as if I have to set an environment variable to find them?
You've been able to run rubygems under IronRuby for quite a while now. Simply download and install the latest [IronRuby from codeplex](http://www.codeplex.com/Wikipage?ProjectName=ir... | [
0.22784143686294556,
0.37650248408317566,
0.2756989002227783,
-0.17584991455078125,
-0.11862224340438843,
-0.19592680037021637,
0.7420003414154053,
0.11659850925207138,
-0.3265099823474884,
-0.48494952917099,
0.06731625646352768,
0.3512590527534485,
-0.05052328109741211,
0.1530726552009582... | |
far away.
>
>
> PS: listen to curt. He's on the core team for ironruby. <3 | [
-0.09524114429950714,
-0.15174992382526398,
0.37813904881477356,
0.2014971226453781,
0.5839714407920837,
-0.1470688432455063,
-0.12527766823768616,
0.32574161887168884,
0.06370166689157486,
-0.3184034526348114,
-0.07696836441755295,
0.42185747623443604,
-0.2032279223203659,
0.0513789765536... | |
I have a "showall" query string parameter in the url, the parameter is being added dynamically when "Show All/Show Pages" button is clicked.
I want the ability to toggle "showall" query string parameter value depending on user clicking the "Show All/Show Pages" button.
I'm doing some nested "if's" and `string.Replac... | [
0.33293306827545166,
0.07506586611270905,
0.6718026399612427,
-0.097169890999794,
-0.2391655296087265,
-0.15213537216186523,
0.45660537481307983,
-0.19673143327236176,
-0.18101026117801666,
-0.6485825777053833,
-0.16228650510311127,
0.607703447341919,
-0.3465031385421753,
0.263850748538970... | |
//parse string as boolean, invert, and convert back to string
ShowAll.Value = (!Boolean.Parse(ShowAll.Value)).ToString();
}
``` | [
-0.048672858625650406,
0.14510796964168549,
0.08545779436826706,
-0.4832921028137207,
0.11642461270093918,
-0.09557737410068512,
0.38196009397506714,
-0.28309541940689087,
0.06035822629928589,
-0.23729364573955536,
-0.4456663727760315,
0.6733415126800537,
-0.5551720857620239,
0.15669362246... | |
I'm wanting to parse a string into a nullable int in C#. ie. I want to get back either the int value of the string or null if it can't be parsed.
I was kind of hoping that this would work
```
int? val = stringVal as int?;
```
But that won't work, so the way I'm doing it now is I've written this extension method
``... | [
0.01668914221227169,
-0.10453873127698898,
0.06154080107808113,
-0.30532780289649963,
0.1194576621055603,
0.0010690030176192522,
0.3361647129058838,
-0.2216411828994751,
-0.05069872364401817,
-0.46135905385017395,
-0.1846754252910614,
0.7246735095977783,
-0.5267512202262878,
0.167124330997... | |
{
try
{
return int.Parse(value);
}
catch
{
return null;
}
}
}
```
Is there a better way of doing this?
**EDIT:** Thanks for the TryParse suggestions, I did know about that, | [
0.33137717843055725,
-0.003598785726353526,
0.06722676008939743,
0.05307833477854729,
0.090782530605793,
-0.11259091645479202,
0.42649486660957336,
0.04580890014767647,
-0.04037148132920265,
-0.5960696935653687,
-0.06137091666460037,
0.5602507591247559,
-0.2948017716407776,
-0.072275340557... | |
but it worked out about the same. I'm more interested in knowing if there is a built-in framework method that will parse directly into a nullable int?
`int.TryParse` is probably a tad easier:
```
public static int? ToNullableInt(this string s)
{
int i;
if (int.TryParse(s, out i)) return i;
return null;
}
... | [
0.10484924912452698,
0.12042015045881271,
0.08843094855546951,
-0.17348234355449677,
-0.13180117309093475,
0.008095983415842056,
0.5665706992149353,
-0.3369101583957672,
0.04714832827448845,
-0.49648547172546387,
-0.013752269558608532,
0.3512325882911682,
-0.3179593086242676,
0.21324354410... | |
Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't get much response so I thought I'd rephrase. Does anyone have any experience building Adobe Flex applications with a .NET back-end? If so, what architecture did you use and what third-party tools if any did you employ. I've read a little abo... | [
0.44974130392074585,
-0.02818763069808483,
0.013718976639211178,
0.2702426612377167,
-0.43084490299224854,
0.0375056229531765,
-0.33207210898399353,
-0.10767467319965363,
-0.4218417704105377,
-0.6655675768852234,
0.22147752344608307,
0.7014583945274353,
-0.06277039647102356,
-0.16847561299... | |
uses a URLLoader to hit the ASP.NET page and loads the result as XML.
If the communication needs to be a little more two-sided (sending more than a couple parameters to ASP.NET lets say), I have used standard ASP.NET webservices.
I've never used WebOrb or Flex remoting because I've never really needed that type of i... | [
0.26942193508148193,
-0.19648849964141846,
0.4307054877281189,
0.06831372529268265,
-0.3704971671104431,
-0.16932013630867004,
-0.06745842844247818,
0.19606302678585052,
-0.3200162351131439,
-0.8159639239311218,
-0.08890017867088318,
0.5245420932769775,
0.004610846284776926,
0.101288698613... | |
Is there a Regular Expression that can detect SQL in a string? Does anyone have a sample of something that they have used before to share?
Don't do it. You're practically guaranteed to fail. Use `PreparedStatement` (or its equivalent) instead. | [
0.5798087120056152,
0.2871033549308777,
-0.5327464938163757,
0.31410178542137146,
-0.08994951844215393,
-0.47453832626342773,
0.7513903379440308,
0.014528805390000343,
0.047530218958854675,
-0.22821496427059174,
0.12014666944742203,
0.39082637429237366,
-0.15281172096729279,
-0.02351801842... | |
I am designing a new System and I have a lot of Interfaces that will grow over time with the system. What is the best practice to name this interfaces
```
ISomethingV01
ISomethingV02
etc
```
and I do this
```
public interface ISomething{
void method();
}
```
then I have to add method 2 so now what I do?
``... | [
0.08285946398973465,
0.1990480273962021,
0.3841000199317932,
0.044044364243745804,
0.04714946448802948,
-0.06703535467386246,
0.0273524671792984,
-0.20396080613136292,
-0.23526707291603088,
-1.0141218900680542,
-0.029215285554528236,
0.6121826767921448,
-0.5978654026985168,
0.0831454694271... | |
still feel that the interfaces will change, and the interfaces changes are small (adding items) and you have control of the whole code base, then you should just modify the interface and fix all the compilation errors.
If your change is a change in how the interface is to be used, then you need to create a separate in... | [
0.2697259485721588,
0.06660158932209015,
0.41058164834976196,
0.34402766823768616,
0.03151485323905945,
-0.03788483515381813,
0.20623522996902466,
-0.16582264006137848,
-0.26346415281295776,
-0.6925541162490845,
-0.0747508704662323,
0.23003895580768585,
-0.4588628113269806,
0.0586473233997... | |
they use ISomething2 and when should they use ISomething3? Then you have to go about the process of obsoleting ISomething and ISomething2. | [
0.0553554892539978,
0.6357539892196655,
0.2173231840133667,
-0.13134299218654633,
-0.14862060546875,
-0.21801698207855225,
0.528611421585083,
-0.2976999580860138,
0.17175862193107605,
-0.8494171500205994,
-0.04441702365875244,
0.2568644881248474,
-0.36575430631637573,
0.3649364113807678,
... | |
I have a small local network. Only one of the machines is available to the outside world (this is not easily changeable). I'd like to be able to set it up such that ssh requests that don't come in on the standard port go to another machine. Is this possible? If so, how?
Oh and all of these machines are running either ... | [
0.4957994222640991,
0.46391546726226807,
0.15248550474643707,
-0.026402447372674942,
-0.02256734110414982,
-0.04150160402059555,
0.6548234820365906,
0.41548073291778564,
-0.48636284470558167,
-1.086935043334961,
-0.04581950977444649,
0.33743348717689514,
-0.17037519812583923,
0.29659029841... | |
and creates a tunnel through that ssh connection to port 22 (the standard ssh port) on the server that's only accessible from the inside.
Then you'd do another ssh command like this (leaving the first one still connected):
```
ssh -p 8022 paul@localhost
```
That connection to port 8022 on your localhost will then g... | [
-0.0051209754310548306,
0.21610672771930695,
0.2811180651187897,
-0.041464027017354965,
-0.04383263364434242,
-0.19617047905921936,
0.5047764182090759,
0.20968355238437653,
-0.5366674065589905,
-0.964849591255188,
-0.33131295442581177,
0.42153200507164,
-0.18412645161151886,
0.273992568254... | |
first ssh connection has to be as root. Maybe somebody else can clarify that.
It looks like superuser privileges aren't required as long as the forwarded port ***(in this case, 8022)*** isn't a privileged port (like 22). Thanks for the clarification [Mike Stone](https://stackoverflow.com/questions/45230/is-it-possible... | [
-0.34710946679115295,
-0.03738051652908325,
0.08077657967805862,
0.05012897774577141,
-0.12272145599126816,
-0.3248862326145172,
0.4664660096168518,
0.34028416872024536,
-0.5093804001808167,
-0.6417694687843323,
-0.33291545510292053,
0.14952607452869415,
-0.20998729765415192,
0.21116217970... | |
Short version: What is the cleanest and most maintainable technique for consistant presentation and AJAX function across all browsers used by both web developers and web developers' end-users?
* IE 6, 7, 8
* Firefox 2, 3
* Safari
* Google Chrome
* Opera
Long version: I wrote a [web app aimed at other web developers](... | [
0.26338014006614685,
-0.01173364743590355,
0.32318127155303955,
-0.23288600146770477,
-0.3067316710948944,
0.02281733602285385,
0.18053801357746124,
0.08281274139881134,
0.1399974822998047,
-0.6840938329696655,
-0.3709838390350342,
0.605821967124939,
-0.2603817880153656,
-0.397621899843215... | |
I [changed my Javascript to be portable on FF and IE](http://github.com/jhs/app-engine-console/commit/4fe7741ad1856208b565eeab4260a64933929c01) using conditionals and less pure jQuery.
Today, I started testing on Webkit and Google Chrome and discovered that, not only are the styles inconsistant with both FF and IE, bu... | [
0.42941799759864807,
0.2879386246204376,
-0.06248850002884865,
-0.10521151125431061,
-0.3469989001750946,
0.04908052459359169,
0.5013265013694763,
-0.39523592591285706,
-0.1563698649406433,
-0.8099629282951355,
0.03567370027303696,
0.6570953726768494,
-0.06458450853824615,
-0.2378983199596... | |
as understandable and maintainable as possible. I prefer if this works with no server-side intelligence; however if there is a advantage to, for example, check the user-agent and then return different files to different browsers, that is fine if the total comprehensibility and maintainability of the web app is lower. T... | [
0.6429963707923889,
0.2343166321516037,
-0.22139455378055573,
0.15768787264823914,
-0.10100109875202179,
-0.3452378809452057,
0.8260372877120972,
0.16981159150600433,
0.19460271298885345,
-0.7039493322372437,
-0.11237987875938416,
0.696343183517456,
0.3999328315258026,
-0.15423467755317688... | |
Make sure you have time for this in your development schedule.
* Toolkits can get you part of the way to cross-browser support, but will eventually miss something on some browser. Plan some time for debugging and researching fixes for specific browsers.
* If you need something that's not in a toolkit and can't find a f... | [
0.38922467827796936,
-0.05323075130581856,
-0.22425034642219543,
0.2632530629634857,
-0.04189733415842056,
-0.1568995863199234,
0.7053740620613098,
0.17847982048988342,
-0.24038754403591156,
-0.9222027063369751,
-0.13913001120090485,
0.7300614714622498,
-0.009829817339777946,
-0.3525063395... | |
resort, because different generations of the "same" browser may have different features. Instead, test for standards-compliant behavior first — e.g., `if(node.addEventListener)...`, then common non-standard functions — e.g., `if(window.attachEvent)...`, and then, if you must, look at the user-agent for a specific brows... | [
-0.15413843095302582,
-0.11602090299129486,
0.5615217685699463,
-0.046304065734148026,
0.1859324872493744,
-0.31192633509635925,
0.3814159333705902,
-0.39308977127075195,
-0.020270928740501404,
-0.6669821739196777,
-0.2805451452732086,
1.0350589752197266,
0.009020349010825157,
-0.304248303... | |
document.createElement and element.setAttribute. While not standard (and kinda yucky), using node.innerHTML with strings that contain bits of HTML seems to be more reliable across browser types. I have yet to find a toolkit that will let you use element.setAttribute to add a 'name' to a form element in IE.
* CSS differ... | [
0.3303702771663666,
-0.08434296399354935,
0.25425729155540466,
0.07245111465454102,
-0.3881322741508484,
-0.36589568853378296,
0.2288808971643448,
-0.12346182018518448,
-0.12664830684661865,
-0.7434866428375244,
-0.14393092691898346,
0.39010319113731384,
-0.08733095228672028,
-0.0613856650... | |
:-)
I haven't really run into any Chrome-specific JS bugs, but it's always one of the first browsers I test.
HTH | [
0.4521441161632538,
0.3441274166107178,
0.3511897921562195,
0.07468228787183762,
-0.13050155341625214,
-0.2864084839820862,
0.2919269800186157,
0.3882461190223694,
-0.07662423700094223,
-0.7527511715888977,
-0.1380181610584259,
0.5200604200363159,
-0.17551879584789276,
-0.17010867595672607... | |
Does anyone know of any existing packages or libraries that can be used to build a calendar in a django app?
A quick google search reveals [django-gencal](https://github.com/justinlilly/django-gencal), which looks like exactly what you need. It would also be worth looking at the snippets under the calendar tag on Djang... | [
0.5160592198371887,
-0.037575144320726395,
0.08475139737129211,
0.2984250783920288,
-0.10048368573188782,
-0.2511041760444641,
-0.14149357378482819,
0.7005677819252014,
-0.5310978889465332,
-0.6329426765441895,
0.19361315667629242,
0.42952558398246765,
0.05492763966321945,
-0.2997739613056... | |
How can I change the title of the command prompt window every time I execute a dos-based program by double clicking it, in c language. Should I use the Windows API?
Try [SetConsoleTitle](http://msdn.microsoft.com/en-us/library/ms686050.aspx). | [
0.3028012812137604,
-0.030347127467393875,
0.45349985361099243,
-0.014425759203732014,
0.30752894282341003,
-0.03322521969676018,
0.26973190903663635,
0.1043943539261818,
-0.2605363428592682,
-0.8240745663642883,
-0.22651152312755585,
0.6722245812416077,
-0.2696380317211151,
0.135222971439... | |
I'm receiving "Package Load Failure" error when I open VS 2005 after I installed the latest VisualSVN (v. 1.5.2). Anyone facing this error? Is there any tool out there to help identify which package didn't load and/or help unload a specific package?
Installing the [Visual Studio SDK](http://www.microsoft.com/downloads/... | [
0.19633515179157257,
0.07949789613485336,
0.3915008306503296,
-0.18771032989025116,
-0.3754903972148895,
-0.2825864851474762,
0.6827195286750793,
-0.027804864570498466,
-0.1525326520204544,
-0.66090327501297,
0.0016240028198808432,
0.8668789267539978,
-0.021507473662495613,
0.1174489557743... | |
I have a Tomcat Filter that delegates requests to the a handling object depending on the URL. This is the only filter in the `FilterChain`. I have an Ajax app that hammers this filter with lots of requests.
Recently I noticed an issue where the filter's `doFilter` method is often called with a committed response as a ... | [
0.5052036046981812,
-0.04969651624560356,
0.19031508266925812,
0.023104317486286163,
-0.25821852684020996,
-0.21697817742824554,
0.2168351262807846,
0.08246758580207825,
-0.12323468178510666,
-0.6681534647941589,
0.13780874013900757,
0.5992215871810913,
-0.30587711930274963,
0.137622684240... | |
keeping references to any of the request, response, outputStream, or writer objects. Additionally, I made sure to close the outputStream in a finally block. However, this doesn't resolve this issue.
This sounds like I am doing something to abuse the servlet container but I am having trouble tracking it down.
I have tr... | [
0.36198386549949646,
-0.12788628041744232,
0.67242830991745,
0.15977135300636292,
-0.19272467494010925,
-0.1965714991092682,
0.6257701516151428,
-0.015132212080061436,
-0.3451560437679291,
-0.6051743030548096,
0.1684231162071228,
0.4619590938091278,
-0.6321662664413452,
0.3752170503139496,... | |
no longer see a committed response passed in.
This is an odd side effect of holding a reference. But I don't think it qualifies as a Tomcat bug. More likely a bug in ImageIO.createImageOutputStream() that I suspect is holding the reference. | [
0.4476841390132904,
-0.20652920007705688,
0.7842394709587097,
0.33498120307922363,
0.05044734850525856,
-0.3642480671405792,
0.22760893404483795,
0.25957968831062317,
-0.4338299334049225,
-0.37585902214050293,
-0.11220350861549377,
0.41254597902297974,
-0.32174450159072876,
0.3029809594154... | |
Let's say that I want to have a table that logs the date and the number of columns in some other table (or really any sort of math / string concat etc).
```
CREATE TABLE `log` (
`id` INTEGER NOT NULL AUTO_INCREMENT ,
`date` DATETIME NOT NULL ,
`count` INTEGER NOT NULL ,
PRIMARY KEY (`id`)
);
```
Is it possible to ha... | [
0.2563031315803528,
0.02826312556862831,
0.21324461698532104,
0.010702138766646385,
0.10423707962036133,
-0.09155502170324326,
-0.09457597881555557,
-0.17825807631015778,
-0.3129231929779053,
-0.2937471866607666,
0.04912343993782997,
0.44129517674446106,
-0.20779074728488922,
-0.1852819621... | |
tool for annotating data when a table is changed by insert, update or delete.
To automatically set the date column of a new row in the log with the current date, you'd create a trigger that looked something like this:
```
create trigger log_date before insert on log
for each row begin
set new.date = current_date(... | [
-0.02556842379271984,
-0.426453173160553,
0.534462571144104,
0.06433764100074768,
0.011865063570439816,
-0.10650811344385147,
0.003812570357695222,
-0.2351294755935669,
-0.23361152410507202,
-0.6511682868003845,
0.2264290601015091,
0.5839371085166931,
-0.17055797576904297,
0.09665729850530... | |
What's the recommended source control system for a very small team (one developer)?
Price does not matter. Customer would pay :-)
I'm working on Vista32 with VS 2008 in C++ and later in C# and with WPF. Setting up an extra (physical) server for this seems overkill to me.
Any opinions?
I would use Subversion (... | [
0.3180171251296997,
-0.0914524644613266,
0.4399394989013672,
0.09006558358669281,
-0.41695529222488403,
-0.42153486609458923,
0.31347107887268066,
0.07649390399456024,
-0.21097929775714874,
-0.6644517183303833,
-0.1505255550146103,
0.8413041830062866,
-0.2786308825016022,
-0.15504896640777... | |
to get help,
* can integrate with most of IDEs i.e. **Visual Studio** (i.e. [ankhsvn](http://ankhsvn.open.collab.net/) or [VisualSVN](http://www.visualsvn.com/) -- [more info](https://stackoverflow.com/questions/453481/subversion-plugin-to-visual-studio)) or **Eclipse** (i.e. [Subclipse](http://sourceforge.net/projects... | [
0.3770793378353119,
0.02615281194448471,
0.30754736065864563,
0.05271640047430992,
-0.2554481327533722,
-0.078336201608181,
0.5226404666900635,
-0.08278000354766846,
-0.2413979470729828,
-0.5671899318695068,
-0.16125205159187317,
0.5169165730476379,
0.014540337026119232,
-0.055236134678125... | |
that SVN has a few disadvantages :).
It is slow on large repositories
--------------------------------
SVN (or its client -- TortoiseSVN) has one **big** disadvantage -- it terrible slow (while updating or committing) on large (thousands of files) repositories unless you have [SSD](http://en.wikipedia.org/wiki/Solid-... | [
-0.3555789589881897,
-0.06492290645837784,
0.5582146644592285,
-0.04170781746506691,
0.14302147924900055,
-0.1371493637561798,
0.5008261799812317,
0.19190481305122375,
-0.679526686668396,
-0.49347978830337524,
-0.14155851304531097,
0.5210546851158142,
0.30728521943092346,
0.381494998931884... | |
of large repository (two repositories in fact) once a week and rarely I have conflicts which are hard to solve (most of conflicts are solved automatically with *diff* software which I use).
However in case of project of a few developers merging should not be problem at all if you keep a few simple rules:
* merge chan... | [
-0.014886080287396908,
-0.3506171703338623,
0.6535874009132385,
0.2311495989561081,
-0.397970974445343,
-0.36779093742370605,
0.12078668177127838,
-0.06952574104070663,
-0.5250298976898193,
-0.5075810551643372,
-0.1407296359539032,
0.4887414872646332,
0.10303716361522675,
0.58980792760849,... | |
without access to central one.
* DVCS is hot thing and fancy to use/learn (if someone pay for your learning).
And I don't think merging is a problem in case of single developer.
Joel Spolsky wrote [tutorial about Mercurial](http://hginit.com/) which is definitively worth to read.
So, despite of many advantages of DV... | [
-0.22143101692199707,
-0.13204845786094666,
0.6388211846351624,
0.22399747371673584,
-0.38166871666908264,
-0.027889728546142578,
0.09283235669136047,
0.13083408772945404,
-0.29909205436706543,
-0.6121178269386292,
-0.27222275733947754,
0.5998578071594238,
-0.07169075310230255,
0.249219611... | |
branches for each Euler problem are really nice feature -- exactly as it is described as advantage of DVCS.
Today Git tooling on Windows is much, much better then 2 or more years ago.
You can use remote repo (like GitHub or ProjectLocker and many others) to keep
copy of your project away from your workstation with n... | [
0.04455149918794632,
-0.13075244426727295,
0.5474681258201599,
0.2527543008327484,
-0.063300721347332,
-0.18719884753227234,
0.06213751435279846,
0.1924162060022354,
-0.2944416105747223,
-0.7218931913375854,
-0.33956557512283325,
0.5696038603782654,
-0.14487621188163757,
-0.068540088832378... | |
I'm using Eclipse 3.4 and have configured the Java code formatter with all of the options on the *Comments* tab enabled. The problem is that when I format a document comment that contains:
```
* @see <a href="test.html">test</a>
```
the code formatter inserts a space in the closing HTML, breaking it:
```
* @see <a ... | [
0.39391911029815674,
0.28933724761009216,
0.16768638789653778,
-0.09426712989807129,
-0.2500614821910858,
-0.1967415064573288,
0.3908105492591858,
-0.17707961797714233,
0.07246491312980652,
-0.7501562237739563,
-0.025783507153391838,
0.5456165671348572,
-0.30101487040519714,
-0.03806315734... | |
which means I then have to format comment blocks manually.
I can only assume it's a bug in Eclipse. It only happens with *@see* tags, it happens also for all 3 builtin code formatter settings.
There are some interesting bugs reported already in the neighbourhood, but I couldn't find this specific one. See for example ... | [
0.5779660940170288,
0.15081562101840973,
0.14878517389297485,
-0.0027034678496420383,
-0.3512081801891327,
-0.19305020570755005,
0.1584872156381607,
-0.07550318539142609,
-0.4420587420463562,
-0.9168843626976013,
-0.16188877820968628,
0.4898785650730133,
-0.33799198269844055,
0.14985409379... | |
When we create stored procedures in Visual Studio (with the extension .sql) the file encoding is automatically set to 'Unicode (UTF-8 with signature) - Codepage 65001'.
This causes ours DBA's problems as their scripts don't like it.
We have to manually go in and change them to 'Western European (windows) - Codepage 1... | [
0.46951380372047424,
-0.06304510682821274,
0.44735053181648254,
-0.012528200633823872,
-0.4186335802078247,
-0.025151489302515984,
0.5546396970748901,
-0.03474179282784462,
-0.22791942954063416,
-0.678077757358551,
-0.011010522954165936,
0.3386721909046173,
-0.2572617828845978,
0.251689285... | |
How can you do a streaming read on a large XML file that contains a xs:sequence just below root element, without loading the whole file into a XDocument instance in memory?
Going with a SAX-style element parser and the [XmlTextReader](http://msdn.microsoft.com/en-us/library/system.xml.xmltextreader.aspx) class created ... | [
0.08470839262008667,
-0.3203611671924591,
0.3061660826206207,
0.15583489835262299,
0.07638902217149734,
-0.17635288834571838,
0.29816892743110657,
-0.16875122487545013,
-0.10382912307977676,
-0.6598189473152161,
-0.18660329282283783,
0.4207291305065155,
-0.29674071073532104,
-0.18381142616... | |
{
case XmlNodeType.Element:
var attributes = new Hashtable();
var strURI = reader.NamespaceURI;
var strName = reader.Name;
if (reader.HasAttributes)
{
for | [
-0.32948771119117737,
-0.28261736035346985,
0.24476352334022522,
-0.067327581346035,
0.07643260061740875,
-0.005749668460339308,
0.12631739675998688,
-0.32649919390678406,
-0.06632810831069946,
-0.5579432249069214,
-0.43298402428627014,
0.4233139753341675,
-0.297505259513855,
0.31169083714... | |
(int i = 0; i < reader.AttributeCount; i++)
{
reader.MoveToAttribute(i);
attributes.Add(reader.Name,reader.Value);
}
}
StartElement(strURI,strName,strName,attributes); | [
-0.489795982837677,
-0.27513623237609863,
0.4144824743270874,
-0.3228057026863098,
0.011878209188580513,
0.40113821625709534,
0.18258456885814667,
-0.40789592266082764,
0.04908217117190361,
-0.7234817743301392,
-0.6140064001083374,
0.13920927047729492,
-0.3527655303478241,
0.21624881029129... | |
break;
//
//you can handle other cases here
//
//case XmlNodeType.EndElement:
// Todo
//case XmlNodeType.Text:
// Todo | [
0.18355870246887207,
-0.18006427586078644,
0.16570225358009338,
0.15503674745559692,
0.27654480934143066,
-0.23203282058238983,
0.23366010189056396,
-0.2251703292131424,
-0.24000954627990723,
-0.1659187525510788,
-0.3793662190437317,
0.29656293988227844,
-0.24135078489780426,
-0.1182381361... | |
default:
break;
}
}
}
catch (XmlException e)
{
Console.WriteLine("error occured: " + e.Message);
}
}
}
}
``` | [
-0.22832991182804108,
-0.2249584048986435,
0.2614332437515259,
-0.08866387605667114,
0.10533522069454193,
-0.13080017268657684,
0.2322188764810562,
-0.12477118521928787,
0.1834837794303894,
-0.4296603500843048,
-0.39295846223831177,
0.3892114758491516,
-0.3238319456577301,
0.00216928287409... | |
Are there conventions for function names when using the Perl Test::More or Test::Simple modules?
I'm specifically asking about the names of functions that are used to set up a test environment before the test and to tear down the environment after successful completion of the test(s).
cheers,
Rob
I dont think there ... | [
0.6378449201583862,
-0.12538021802902222,
-0.2802932560443878,
0.15217667818069458,
-0.02044086344540119,
-0.2142098844051361,
0.32124972343444824,
-0.2033451795578003,
-0.4065859019756317,
-0.2836184501647949,
-0.1560177057981491,
0.7541787624359131,
-0.18987269699573517,
-0.2854032218456... | |
an easy count of how many tests you have for each function.
Something like ...
```
BEGIN {
# If you want to set some global db setting/file setting/INC changes etc
}
# Tests functionality 1...
{
# have fun ....
}
# Tests functionality 2...
{
# have more fun ....
}
END {
# Clean up the BEGIN chang... | [
0.3634222447872162,
-0.12331826239824295,
0.09583006799221039,
0.10426987707614899,
-0.15264922380447388,
-0.30053937435150146,
0.4616864025592804,
-0.33752164244651794,
-0.11222152411937714,
-0.4588552415370941,
0.17781250178813934,
0.6942954063415527,
-0.12540043890476227,
-0.11695200204... | |
I want to call a function from a .NET DLL (coded in C#) from an Inno Setup script.
I have:
1. marked the *Register for COM interop* option in the project properties,
2. changed the *ComVisible* setting in the *AssemblyInfo.cs* file,
3. added these lines to the ISS script:
> [Files]
>
>
> Source: c:\temp\1\MyDLL.dl... | [
0.27529051899909973,
0.15884660184383392,
0.2776109576225281,
-0.1652505099773407,
0.12064257264137268,
0.1673353761434555,
0.4036712050437927,
-0.050084225833415985,
-0.24656817317008972,
-0.6809931993484497,
-0.12042387574911118,
0.611189603805542,
-0.2956579327583313,
0.0122974682599306... | |
get the value then there are a couple of possibilities:
1. Write the functionality in C/C++ and export the function, that's definitely supported.
2. Use a Managed C++ dll to shim to your .NET dll, and expose the call as a C interface point (this should work, but it's getting messy)
3. Use an .exe to store the result o... | [
0.490597665309906,
-0.26364588737487793,
0.30809974670410156,
0.188913494348526,
0.0334683321416378,
-0.2888445556163788,
0.21740512549877167,
-0.4431817829608917,
-0.05683160945773125,
-0.6414921283721924,
0.04095753654837608,
0.7502164244651794,
-0.2251817137002945,
-0.10307447612285614,... | |
setup). | [
0.38319453597068787,
-0.08677525073289871,
0.29630419611930847,
-0.03531105816364288,
0.36075878143310547,
0.06996674835681915,
0.025820590555667877,
-0.49687984585762024,
-0.268650084733963,
-0.34106752276420593,
-0.11665192991495132,
0.6291176676750183,
-0.26813584566116333,
-0.116907708... | |
C# doesn't require you to specify a generic type parameter if the compiler can infer it, for instance:
```
List<int> myInts = new List<int> {0,1,1,
2,3,5,8,13,21,34,55,89,144,233,377,
610,987,1597,2584,4181,6765};
//this statement is clunky
List<string> myStrings = myInts.
Select<int,string>( i => i.ToStr... | [
-0.0473458431661129,
-0.09645639359951019,
0.4834597110748291,
-0.2370484471321106,
0.03507397696375847,
0.00022677694505546242,
0.09597356617450714,
-0.27451738715171814,
-0.20680628716945648,
-0.12890203297138214,
-0.15749666094779968,
0.6907328963279724,
-0.5818495750427246,
-0.04617603... | |
shows up as `'a`) because it's added by the compiler.
Class-level type parameters don't let you do this:
```
//sample generic class
public class GenericDemo<T>
{
public GenericDemo ( T value )
{
GenericTypedProperty = value;
}
public T GenericTypedProperty {get; set;}
}
//why can't I do:
i... | [
0.01149143185466528,
-0.2304549515247345,
0.3840964138507843,
-0.11712627857923508,
-0.10881896317005157,
-0.009645970538258553,
0.4486759305000305,
-0.47515207529067993,
0.03568190708756447,
-0.4325564503669739,
-0.20720863342285156,
0.4488430321216583,
-0.24912157654762268,
0.28243130445... | |
inference on the method compiles
var item = Create( anIntValue );
```
Why doesn't C# support this class level generic type inference?
Actually, your question isn't bad. I've been toying with a generic programming language for last few years and although I've never come around to actually develop it (and probably neve... | [
0.19300726056098938,
0.00545157678425312,
-0.11114101111888885,
0.12572038173675537,
-0.5787392258644104,
-0.24065782129764557,
0.25184786319732666,
-0.2075309306383133,
0.0334843173623085,
-0.33521580696105957,
0.4042825400829315,
0.5390507578849792,
-0.5144843459129333,
0.252127468585968... | |
Actually, the following code would be very near to your proposition and solve the problem. All C# needs is an added syntax support.
```
class Foo<T> {
public Foo(T x) { … }
}
// Notice: non-generic class overload. Possible in C#!
class Foo {
public static Foo<T> ctor<T>(T x) { return new Foo<T>(x); }
}
var x... | [
-0.04432598128914833,
0.2119971364736557,
0.29570814967155457,
-0.001304658013395965,
-0.024161050096154213,
-0.11847995221614838,
0.507204532623291,
0.05984560400247574,
-0.03578603267669678,
-0.624447762966156,
-0.14065393805503845,
0.7796737551689148,
-0.29316338896751404,
0.07715281099... | |
Example
I have `Person`, `SpecialPerson`, and `User`. `Person` and `SpecialPerson` are just people - they don't have a user name or password on a site, but they are stored in a database for record keeping. User has all of the same data as `Person` and potentially `SpecialPerson`, along with a user name and password as... | [
0.1591850370168686,
0.30469197034835815,
-0.0383925698697567,
0.19497746229171753,
-0.015279529616236687,
-0.030753616243600845,
-0.014007517136633396,
-0.12107755243778229,
-0.4183749258518219,
-0.5420889258384705,
-0.12725487351417542,
0.3793025314807892,
0.011678115464746952,
0.17798402... | |
are a user) and vice-versa?
There are generally three ways of mapping object inheritance to database tables.
You can make one big table with all the fields from all the objects with a special field for the type. This is fast but wastes space, although modern databases save space by not storing empty fields. And if yo... | [
-0.047440577298402786,
-0.2726527452468872,
-0.17840707302093506,
0.4779314398765564,
-0.10194490849971771,
0.07841115444898605,
0.1452377289533615,
-0.0677916556596756,
-0.2269463986158371,
-0.7423453330993652,
0.019708724692463875,
0.4500465393066406,
-0.2447960078716278,
0.0501983501017... | |
is ok from a performance perspective. But not from a maintenance perspective. Every time your base-class changes all the tables change.
You can also make a table per class like you suggested. This way you need joins to get all the data. So it's less performant. I think it's the cleanest solution.
What you want to use... | [
0.36749503016471863,
-0.03609732165932655,
0.20570670068264008,
0.17356304824352264,
0.16449074447155,
0.10821100324392319,
0.2567788362503052,
0.0489337332546711,
-0.45199108123779297,
-0.6586758494377136,
0.05572408810257912,
0.3154812157154083,
-0.12788695096969604,
-0.0934113934636116,... | |
In Java, what would the best way be to have a constantly listening port open, and still send upon receipt of a packet. I am not particularly savvy with network programming at the moment, so the tutorials I have found on the net aren't particularly helpful.
Would it make sense to have the listening socket as a serverso... | [
0.3569824993610382,
-0.04433026164770126,
-0.16433332860469818,
0.03870224952697754,
-0.06706278026103973,
-0.26896899938583374,
0.19024540483951569,
0.06781508773565292,
-0.23807263374328613,
-0.7597978711128235,
0.25849467515945435,
0.5377285480499268,
-0.26657339930534363,
-0.0416635423... | |
the sockets would still work ?
If you can afford the threading, try this (keep in mind I've left out some details like exception handling and playing nice with threads). You may want to look into `SocketChannels` and/or NIO async sockets / selectors. This should get you started.
```
boolean finished = false;
int port ... | [
0.48414868116378784,
-0.07931264489889145,
0.3504340648651123,
0.09642648696899414,
0.08615470677614212,
-0.033719565719366074,
0.3625643849372864,
-0.13973930478096008,
-0.34336498379707336,
-0.5417243242263794,
-0.02535601332783699,
0.3932395577430725,
-0.30025631189346313,
0.30062177777... | |
will continue to listen
}
``` | [
0.6479575634002686,
0.3733213543891907,
0.4253828823566437,
0.08930110931396484,
0.43392646312713623,
-0.07293883711099625,
0.3624189496040344,
0.12679916620254517,
-0.12386078387498856,
-0.5069895386695862,
-0.41902655363082886,
0.8581715226173401,
-0.036262694746255875,
0.051497392356395... | |
I use TortoiseSVN to access file based local repo. In all my commits an author is my Windows login name. Is it possible to use different name?
I know how to change author after commit but how to change before? Installing apache/svnserver is not an option.
Yes, it's possible.
*TortoiseSVN* and the [*svn*](http://subve... | [
0.05431385338306427,
0.009580976329743862,
0.6204208135604858,
-0.19486787915229797,
-0.18670234084129333,
0.209647074341774,
0.575141429901123,
-0.12260322272777557,
-0.5602485537528992,
-0.5736308693885803,
-0.1404828280210495,
0.7924201488494873,
-0.15081128478050232,
0.3404023349285126... | |
what program you make the new checkouts.
The procedure should work with TortoiseSVN 1.5.5. If it doesn't, try emptying svn's authentication cache (`%APPDATA%\Subversion\auth\svn.username`) first. | [
-0.21446067094802856,
-0.16455742716789246,
0.5838245749473572,
-0.124770887196064,
0.12947463989257812,
-0.003755493788048625,
0.5896826982498169,
-0.03654606267809868,
-0.3097117841243744,
-0.5040451884269714,
-0.13205690681934357,
0.7237228751182556,
-0.24189628660678864,
-0.03730329126... | |
I inserted some values into a table. There is a column whose value is auto-generated. In the next statement of my code, I want to retrieve this value.
Can you tell me how to do it the right way?
`@@IDENTITY` is not scope safe and will get you back the id from another table if you have an insert trigger on the original... | [
0.7490195631980896,
0.14986172318458557,
0.37506788969039917,
-0.07682853192090988,
0.305621862411499,
-0.23661264777183533,
0.290089875459671,
-0.34118330478668213,
-0.06024158373475075,
-0.47574663162231445,
0.2895708680152893,
0.7455126643180847,
-0.5303955078125,
-0.1402333825826645,
... | |
I wrote an Active X plugin for IE7 which implements IObjectWithSite besides some other necessary interfaces (note no IOleClient). This interface is queried and called by IE7. During the SetSite() call I retrieve a pointer to IE7's site interface which I can use to retrieve the IHTMLDocument2 interface using the followi... | [
-0.19028910994529724,
-0.08509767800569534,
0.6984926462173462,
-0.2241387963294983,
-0.15769930183887482,
-0.025751983746886253,
0.5556655526161194,
-0.19550703465938568,
0.15540538728237152,
-0.7705575227737427,
-0.1823907494544983,
0.5545542240142822,
-0.5169364809989929,
-0.03818290308... | |
if(win) {
win->get_document(&doc);
}
}
}
if(doc) {
/* found */
}
```
I tried a similiar approach on PIE as well using the following code, however, even the IPIEHTMLWindow2 interface cannot be acquired, so I'm stuck:
```
IUnknown *site = pUnkSite; /* retrieved from PIE during SetSite() cal... | [
-0.20536932349205017,
-0.016074052080512047,
0.28902116417884827,
-0.05837515741586685,
0.03573930263519287,
0.002275592414662242,
0.5084009766578674,
-0.20360015332698822,
-0.12343550473451614,
-0.5865206122398376,
-0.33712783455848694,
0.449415922164917,
-0.14710146188735962,
0.157993927... | |
win->get_document(&tmp);
if(tmp) {
tmp->QueryInterface(__uuidof(*doc), (void **)&doc);
}
}
}
if(doc) {
/* found */
}
```
Using the IServiceProvider interface doesn't work either, so I already tested this.
Any ideas?
I found the following code in the Google Gears code, [here](http:... | [
0.009332200512290001,
0.07600565999746323,
0.7093666791915894,
0.1773952692747116,
0.11939752101898193,
0.08829519897699356,
-0.03929707780480385,
-0.17820826172828674,
0.044616132974624634,
-0.7767753005027771,
-0.07768165320158005,
1.0084642171859741,
0.0392666757106781,
-0.0376416407525... | |
if I did the stuff you need is probably at the link.
```
#ifdef WINCE
// We can't get IWebBrowser2 for WinCE.
#else
HRESULT ActiveXUtils::GetWebBrowser2(IUnknown *site, IWebBrowser2 **browser2) {
CComQIPtr<IServiceProvider> service_provider = site;
if (!service_provider) { return E_FAIL; }
return service_provid... | [
0.20953594148159027,
0.1030992940068245,
0.5921304225921631,
-0.2395266741514206,
-0.09329557418823242,
-0.1072796955704689,
0.6821637153625488,
-0.1747155785560608,
-0.340120404958725,
-0.9106119871139526,
-0.016003575176000595,
0.5381544232368469,
-0.17441223561763763,
0.3015702366828918... | |
reinterpret_cast<void**>(browser2));
}
#endif
HRESULT ActiveXUtils::GetHtmlDocument2(IUnknown *site,
IHTMLDocument2 **document2) {
HRESULT hr;
#ifdef WINCE
// Follow path Window2 -> Window -> Document -> Document2
CComPtr<IPIEHTMLWindow2> window2;
hr = GetHtmlWindow2(sit... | [
-0.03921040520071983,
-0.12546256184577942,
0.8528222441673279,
-0.08161313086748123,
0.02048288658261299,
0.05383133515715599,
0.8972508907318115,
-0.4763115644454956,
0.16401547193527222,
-0.7221714854240417,
-0.20927304029464722,
0.9986215829849243,
-0.06380248069763184,
0.0592374429106... | |
CComPtr<IHTMLDocument> document;
hr = window->get_document(&document);
if (FAILED(hr) || !document) { return E_FAIL; }
return document->QueryInterface(__uuidof(*document2),
reinterpret_cast<void**>(document2));
#else
CComPtr<IWebBrowser2> web_browser2;
hr = GetWebBrowser2(sit... | [
-0.2812536358833313,
0.06738585978746414,
0.8693395256996155,
0.19309116899967194,
-0.14878979325294495,
0.01738099195063114,
0.19425161182880402,
-0.5485565066337585,
-0.6421671509742737,
-0.4969291687011719,
-0.10389059036970139,
0.7771705389022827,
-0.15441474318504333,
0.18127407133579... | |
IPIEHTMLWindow2 **window2) {
// site is javascript IDispatch pointer.
return site->QueryInterface(__uuidof(*window2),
reinterpret_cast<void**>(window2));
#else | [
-0.17443007230758667,
-0.10057234764099121,
0.5535127520561218,
-0.028372004628181458,
0.03180737793445587,
-0.20683248341083527,
0.42439574003219604,
-0.09905484318733215,
-0.23312966525554657,
-0.775562047958374,
-0.10317183285951614,
0.31620094180107117,
-0.35369789600372314,
0.43815639... | |
IHTMLWindow2 **window2) {
CComPtr<IHTMLDocument2> html_document2;
// To hook an event on a page's window object, follow the path
// IWebBrowser2->document->parentWindow->IHTMLWindow2
HRESULT hr = GetHtmlDocument2(site, &html_document2);
if (FAILED(hr) || !html_document2) { return E_FAIL; }
return html_doc... | [
-0.11469413340091705,
-0.13429167866706848,
0.750819981098175,
-0.07718633860349655,
0.14314770698547363,
-0.3326317071914673,
0.4580006003379822,
-0.3470912575721741,
-0.314779669046402,
-0.6633458733558655,
-0.554744303226471,
0.4856792986392975,
-0.3878665864467621,
-0.01077611837536096... | |
I am working in Visual Basic 6 and need to sort by multiple columns in a ListView. For example, sorting a list of music tracks by artist, then album, then track number. As far as I know, VB6 does not support this out of the box. Here are the suggestions I have already heard:
* Sort the data in a SQL table first and di... | [
0.2867080569267273,
0.2888597846031189,
0.2690644860267639,
-0.0666854977607727,
-0.14092612266540527,
0.08442053198814392,
0.06496210396289825,
-0.2063288688659668,
-0.25365811586380005,
-0.6800046563148499,
0.07172725349664688,
0.558939516544342,
-0.019392233341932297,
0.0696943402290344... | |
positions manually
Does anyone have experience with multiple-column sorting in VB6 who could lend advice?
I would create a hidden column in the listview that concatenates those three columns and sort by that | [
-0.13935792446136475,
0.07002788782119751,
0.49860090017318726,
0.12459970265626907,
-0.1816871166229248,
0.45024994015693665,
-0.11576902121305466,
-0.4659422039985657,
-0.3084501326084137,
-0.3734889030456543,
0.24834413826465607,
0.5665479898452759,
0.03379661589860916,
-0.2541740238666... | |
I want to use the [Publish.GacRemove](http://msdn.microsoft.com/en-us/library/system.enterpriseservices.internal.publish.gacremove(VS.80).aspx) function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument.
Should it be a path to the original DLL (what if I removed it afte... | [
0.38495099544525146,
0.3659268617630005,
0.4387573003768921,
-0.19041083753108978,
0.08673979341983795,
-0.22381027042865753,
0.328273206949234,
0.023129211738705635,
-0.3287854790687561,
-0.48105502128601074,
-0.02618139423429966,
0.30677786469459534,
-0.2542528510093689,
0.31122177839279... | |
the original path. This is causing a problem since I cannot seem to get the `GacRemove` method to uninstall the assemblies unless I keep the original files.
Conclusion: Yes, you need to specify the path to the original DLL. (And try to not move/delete it later). If you delete it, try to copy the file from the GAC to y... | [
0.214616596698761,
-0.057519491761922836,
0.26416128873825073,
-0.046557337045669556,
0.11336587369441986,
-0.21144752204418182,
0.4683428108692169,
-0.15934397280216217,
-0.24131213128566742,
-0.5502031445503235,
-0.2272293120622635,
0.4530334174633026,
-0.5172588229179382,
0.446317404508... | |
How would you dynamically subscribe to a C# event so that given a Object instance and a String name containing the name of the event, you subscribe to that event and do something (write to the console for example) when that event has been fired?
It would seem using Reflection this isn't possible and I would like to av... | [
0.4808281362056732,
-0.11886169016361237,
0.022715341299772263,
0.2119937241077423,
-0.27013063430786133,
-0.5144287347793579,
0.3078576326370239,
-0.24945057928562164,
-0.12017892301082611,
-0.21023434400558472,
0.09782274067401886,
0.739008367061615,
-0.430723637342453,
-0.07082138955593... | |
contravariance seems like a good plan, I can not make the assumption necessary to use this solution
You can compile expression trees to use void methods without any arguments as event handlers for events of any type. To accommodate other event handler types, you have to map the event handler's parameters to the events ... | [
0.12244773656129837,
-0.28208205103874207,
0.1913307011127472,
-0.18142403662204742,
-0.19037862122058868,
-0.11634533107280731,
0.5367308259010315,
-0.300498902797699,
-0.3613981306552887,
-0.28058385848999023,
-0.07632936537265778,
0.5864230394363403,
-0.13149069249629974,
0.201066195964... | |
public void RaiseEvents()
{
if (SomethingHappened!=null) SomethingHappened(this, EventArgs.Empty);
if (SomethingHappenedWithArg!=null)
{
SomethingHappenedWithArg(this, new ExampleEventArgs{IntArg = 5});
}
}
}
class Handler
{
public void HandleEvent()... | [
0.14439859986305237,
-0.08978257328271866,
0.43035268783569336,
-0.4049908518791199,
0.0553654208779335,
0.11121945083141327,
0.6900471448898315,
-0.44264379143714905,
-0.2123839557170868,
-0.283689022064209,
-0.20982828736305237,
0.5993492603302002,
0.18547479808330536,
0.3739145398139953... | |
}
}
static class EventProxy
{
//void delegates with no parameters
static public Delegate Create(EventInfo evt, Action d)
{
var handlerType = evt.EventHandlerType;
var eventParams = handlerType.GetMethod("Invoke").GetParameters();
//lambda: (object x0, EventArgs x1) => d(... | [
0.12290797382593155,
-0.40368133783340454,
0.32975658774375916,
0.15665602684020996,
0.08717655390501022,
0.19227059185504913,
0.14480702579021454,
-0.6046657562255859,
-0.12958742678165436,
-0.3388165533542633,
-0.36178675293922424,
0.6640196442604065,
-0.45508304238319397,
-0.01342182885... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.