text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
all good, but the lists that need to be worked on aren't (and shouldn't) be declared with the interface as the type parameter. However, it doesn't seem like you can cast to a different type parameter. For example, this fails and I can't understand why:
```
using System;
using System.Collections.Generic;
namespace Con... | [
0.4350310266017914,
0.09250763058662415,
0.28421998023986816,
-0.13187551498413086,
0.1187385767698288,
-0.008875705301761627,
0.4652412235736847,
-0.3425965905189514,
-0.06469607353210449,
-0.5534740686416626,
-0.2623630166053772,
0.6400715112686157,
-0.4067559540271759,
0.144934743642807... | |
for (int i = 0; i < 5; i++)
{
myList.Add(new Test());
}
PrintList((IEnumerable<IDoSomething>)myList);
}
static void PrintList(IEnumerable<IDoSomething> list)
{ | [
0.29068073630332947,
-0.16807705163955688,
0.4114524722099304,
-0.2664949893951416,
0.1748180240392685,
0.19977238774299622,
0.19808369874954224,
-0.6840227246284485,
0.23351062834262848,
-0.748863697052002,
-0.1758175492286682,
0.4585290253162384,
-0.2954643666744232,
-0.12180119007825851... | |
foreach (IDoSomething item in list)
{
item.DoSomething();
}
}
}
interface IDoSomething
{
void DoSomething();
}
public class Test : IDoSomething
{ | [
0.03209111467003822,
-0.15897725522518158,
0.18800713121891022,
-0.025731932371854782,
-0.07027749717235565,
0.2498750239610672,
0.17652085423469543,
-0.6154568791389465,
0.15084396302700043,
-0.8462984561920166,
-0.031374242156744,
0.5293865203857422,
-0.30002638697624207,
-0.079896360635... | |
public void DoSomething()
{
Console.WriteLine("Test did it!");
}
}
}
```
I *can* use the `Enumerable.Cast<T>` member to do this, but I was looking for a method that might work in .NET 2.0 as well. It seems like this should be possible; what am I missing?
The problem is with the method, ... | [
0.5897957682609558,
-0.17101222276687622,
0.26955562829971313,
-0.1042320504784584,
0.006628636736422777,
-0.15113966166973114,
0.5024397969245911,
-0.5413517355918884,
-0.06893172115087509,
-0.4690983295440674,
0.056977130472660065,
0.6627238988876343,
-0.3984140157699585,
-0.027503814548... | |
Console.WriteLine("{0} {1}", item.Prop1, item.Prop2);
}
}
``` | [
-0.3771985173225403,
-0.13137885928153992,
0.5967249274253845,
0.10324349254369736,
0.32974034547805786,
0.09813056886196136,
0.07031234353780746,
0.04527658969163895,
0.29498574137687683,
-0.7033486366271973,
-0.1837262064218521,
0.5513947010040283,
-0.16489191353321075,
0.263440996408462... | |
Whenever I'm at a break point in a certain C#.NET application in Visual Studio 2008 and I fire up Microsoft Word 2007, word will fail to open until I restart the C# application. I have a few theories about why, but does anyone know for sure?
This can be because Word is sending out DDE messages to top level windows, and... | [
0.2091289609670639,
0.29998376965522766,
0.062418803572654724,
-0.08748732507228851,
-0.20712341368198395,
-0.20956823229789734,
0.5784206986427307,
0.33804404735565186,
-0.29652753472328186,
-0.46532973647117615,
-0.38423067331314087,
0.38965561985969543,
-0.13839547336101532,
0.280981481... | |
So no doubt that building a domain model is something that I think happens best when you approach it as as team. Even going so far as to involve someone who is not technical and a member of the 'business' in the modeling sessions. So much can get done quickly when you put the right people in a room and hammer out thing... | [
0.7200911045074463,
0.23407870531082153,
-0.01875748485326767,
0.030048122629523277,
0.03621457517147064,
-0.12596942484378815,
0.2330932468175888,
0.08356384932994843,
-0.2551978528499603,
-0.4831521213054657,
0.5159074664115906,
0.5182968974113464,
0.33436641097068787,
0.0416875630617141... | |
and have done the following:
1. Start off by Noun Idendtification, then use Class-Role-Collaborations to analyze relationships
2. Look for analysis patterns that can be used to refine the model, Party, etc..
3. As soon as I have a handle on the basics, I'll bust out an IDE and start writing XUnit tests to show that th... | [
0.47488540410995483,
0.29583269357681274,
0.03879380598664284,
0.3199969232082367,
-0.24713663756847382,
-0.23530489206314087,
0.19180433452129364,
-0.20527243614196777,
0.1548588126897812,
-0.3861437439918518,
0.1527201235294342,
0.6418871879577637,
0.060443565249443054,
-0.19026277959346... | |
or y requirement. What techniques have you used when working in isolation to ensure that your object/domain model is on target?
Everyone does it differently, I think, but...
I almost always start with a Class diagram (usually UML-like and on paper), paying special attention to relationships between classes and their a... | [
0.29720768332481384,
-0.01796264946460724,
-0.0751553401350975,
0.36905571818351746,
-0.2426752895116806,
0.22387129068374634,
0.006218018475919962,
-0.04602282494306564,
-0.07513535767793655,
-0.6618926525115967,
0.06967636942863464,
0.3178391754627228,
0.07169335335493088,
-0.06894034147... | |
tool (StarUML).
Then come the gedanken experiments. I mentally walk through the trickiest use cases I can think of and see if I can envision a way to address them with the given design. This isn't psuedocode, just stepping through each of the major tasks/functions and following the lines of the diagram to make sure I'... | [
0.37040409445762634,
0.10495112836360931,
0.16961756348609924,
0.12421248108148575,
-0.14619062840938568,
0.04283808916807175,
0.2649334967136383,
-0.2546416223049164,
0.015288262628018856,
-0.6540204882621765,
-0.027026722207665443,
0.5905085206031799,
0.11051162332296371,
0.0355389080941... | |
evaluate/validate it you either lack some understanding of the problem, or the design on paper isn't complete enough...
Then, time permitting, set that one aside and see if you can come up with something really different... | [
0.38319259881973267,
0.4309695065021515,
-0.19791050255298615,
0.20861117541790009,
-0.06692950427532196,
-0.07815074175596237,
0.3856232464313507,
-0.2546667754650116,
0.28740158677101135,
-0.5480546355247498,
0.17142926156520844,
0.43243223428726196,
0.3887954652309418,
-0.16582643985748... | |
Is there a built-in mechanism in .NET to match patterns other than Regular Expressions? I'd like to match using UNIX style (glob) wildcards (\* = any number of any character).
I'd like to use this for a end-user facing control. I fear that permitting all RegEx capabilities will be very confusing.
I found the actual c... | [
-0.0193426962941885,
-0.23128606379032135,
0.19218797981739044,
0.14293111860752106,
0.32306307554244995,
-0.06932376325130463,
0.3724849224090576,
-0.17141540348529816,
-0.16641901433467865,
-0.3805771768093109,
-0.19940629601478577,
0.373518168926239,
-0.685295581817627,
-0.2383928149938... | |
Is there a tool, method or setting in the standard VBA Editor to warn about variables that have been `Dim`'med, but aren't being used?
[MZ-Tools](http://www.mztools.com/index.aspx) will search through your code and tell you what is not being used. The version for VBA can be found [here](http://www.mztools.com/v3/mztool... | [
0.3920416533946991,
0.11289253830909729,
0.30458566546440125,
-0.12860660254955292,
-0.012744659557938576,
-0.1220918819308281,
0.2259640097618103,
-0.2737225294113159,
-0.23144233226776123,
-0.5042057037353516,
-0.12320833653211594,
0.7088589668273926,
-0.27742865681648254,
-0.05656535550... | |
I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating swimmingly until I needed to do a truncate on a table and all ... | [
0.035560283809900284,
-0.07114356011152267,
0.3493494391441345,
0.27000507712364197,
0.04204685240983963,
-0.20771005749702454,
0.3133412003517151,
0.09181180596351624,
-0.2558744251728058,
-0.5029642581939697,
0.060137346386909485,
0.43701478838920593,
-0.1358022540807724,
0.1863754838705... | |
am I just [clueless](http://en.wikipedia.org/wiki/Clueless_(film))?
This is not possible without doing a custom T-SQL query. Doing a .Delete() and SubmitChanges afterwords would, as you probably already know, result in a DELETE statement.
Of course you could create a stored procedure that truncates the table, and then... | [
0.40504947304725647,
0.3119678795337677,
0.12470395117998123,
0.02804231457412243,
0.2360733300447464,
-0.21270625293254852,
0.03660690784454346,
-0.16082054376602173,
-0.2541857659816742,
0.2103785276412964,
-0.1662069708108902,
0.33342456817626953,
-0.12850399315357208,
0.124906182289123... | |
I'm writing some cross-platform code between Windows and Mac.
If list::end() "returns an iterator that addresses the location succeeding the last element in a list" and can be checked when traversing a list forward, what is the best way to traverse backwards?
This code workson the Mac but not on Windows (can't decrem... | [
-0.27947449684143066,
0.25858074426651,
0.7118744850158691,
-0.23260673880577087,
0.12935364246368408,
0.08249898999929428,
0.3598434627056122,
-0.26840633153915405,
-0.3740863502025604,
-0.6971276998519897,
0.0071505592204630375,
0.4188234210014343,
-0.0723663941025734,
0.1240132227540016... | |
backward that could be implemented in a for loop?
Use `reverse_iterator` instead of `iterator`.
Use `rbegin()` & `rend()` instead of `begin()` & `end()`.
Another possibility, if you like using the [`BOOST_FOREACH`](http://www.boost.org/doc/libs/1_36_0/doc/html/foreach.html) macro is to use the `BOOST_REVERSE_FOREACH` ... | [
-0.09118767082691193,
-0.030150869861245155,
0.10526297241449356,
-0.2438870072364807,
-0.12278034538030624,
0.2927655577659607,
0.1590583473443985,
-0.1999531239271164,
-0.04234563931822777,
-0.3806227743625641,
0.07465707510709763,
0.580208957195282,
-0.4832511842250824,
0.07768308371305... | |
I want to do this in code, not with ALT+F1.
You can also do it this way:
```
select columnproperty(object_id('mytable'),'mycolumn','IsIdentity')
```
Returns 1 if it's an identity, 0 if not. | [
-0.24565577507019043,
0.10321228951215744,
0.6410261988639832,
-0.08682586252689362,
0.06851425021886826,
0.06812471896409988,
-0.29619714617729187,
0.13112576305866241,
0.06547939777374268,
-0.5151121020317078,
-0.031357452273368835,
0.44171473383903503,
-0.2290951907634735,
0.06676729768... | |
If I'm making a simple grid based game, for example, I might have a few 2d lists. One might be for terrain, another might be for objects, etc. Unfortunately, when I need to iterate over the lists and have the contents of a square in one list affect part of another list, I have to do something like this.
```
for i in r... | [
0.2865087389945984,
-0.047470808029174805,
0.1373555213212967,
-0.07147081941366196,
-0.39229026436805725,
0.07142236828804016,
0.1888824999332428,
-0.43595629930496216,
-0.25151902437210083,
-0.7512330412864685,
-0.0015218850458040833,
0.47529706358909607,
-0.252427339553833,
-0.067763917... | |
by writing a generator method:
```
def grid_objects(alist, blist):
for i in range(len(alist)):
for j in range(len(alist[i])):
yield(alist[i][j], blist[i][j])
```
Then whenever you need to iterate over the lists your code looks like this:
```
for (a, b) in grid_objects(alist, blist):
if a... | [
0.16629372537136078,
-0.2858888506889343,
-0.05207698792219162,
-0.31519967317581177,
-0.03654734417796135,
-0.05793383717536926,
0.22929376363754272,
-0.4377816617488861,
-0.213314488530159,
-0.6225704550743103,
-0.20206905901432037,
0.5706632137298584,
-0.45884427428245544,
-0.1376544833... | |
How can I get list all the files within a folder recursively in Java?
Not sure how you want to represent the tree? Anyway here's an example which scans the entire subtree using recursion. Files and directories are treated alike. Note that [File.listFiles()](http://docs.oracle.com/javase/6/docs/api/java/io/File.html#lis... | [
0.19772247970104218,
-0.13379980623722076,
0.3491525948047638,
-0.19208921492099762,
-0.0011728773824870586,
-0.04992719367146492,
0.3989379107952118,
-0.4579639136791229,
-0.5500637888908386,
-0.6721774935722351,
-0.3147459030151367,
0.1825299859046936,
-0.41947710514068604,
0.18692316114... | |
: children) {
all.add(child);
addTree(child, all);
}
}
}
```
Java 7 offers a couple of improvements. For example, [DirectoryStream](http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#newDirectoryStream%28java.nio.file.Path%29) provides one result at a time - the call... | [
-0.16197331249713898,
-0.17691758275032043,
0.5272844433784485,
-0.23870700597763062,
0.22437523305416107,
0.1855389028787613,
0.2219371497631073,
-0.348477840423584,
-0.12508222460746765,
-0.8032776117324829,
-0.25368794798851013,
0.5349023342132568,
-0.2625378370285034,
-0.01975557580590... | |
= Files.newDirectoryStream(directory)) {
for (Path child : ds) {
all.add(child);
if (Files.isDirectory(child)) {
addTree(child, all);
}
}
}
}
```
Note that the dreaded null return value has been replaced by IOException.
Java 7 also offers a [tre... | [
-0.10864739120006561,
-0.2217532992362976,
0.33321574330329895,
-0.4238913059234619,
0.23527085781097412,
0.1358727514743805,
0.4260617196559906,
-0.3467748761177063,
-0.4298199415206909,
-0.4791862368583679,
-0.31633511185646057,
0.48211556673049927,
-0.497116357088089,
-0.079518057405948... | |
void addTree(Path directory, final Collection<Path> all)
throws IOException {
Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
all.add(file);
... | [
0.07461590319871902,
-0.03451728820800781,
0.397773802280426,
-0.3149600923061371,
0.1818445920944214,
0.12940743565559387,
0.3835669755935669,
-0.41820457577705383,
-0.02175288274884224,
-0.6616979837417603,
-0.19178566336631775,
0.8294385075569153,
-0.6341689229011536,
-0.080094233155250... | |
using MVP, what is the normal order of construction and dependency injection.
normally you create a presenter for each view and pass the view into the presenter on constructor. But what if you have:
1. A Service that multiple views need to listen to events on.
2. Multiple views all pointing to the same data model cac... | [
0.2467561960220337,
-0.23704646527767181,
0.38311702013015747,
0.2752779424190521,
-0.15581901371479034,
-0.007809346541762352,
-0.08486533164978027,
-0.14783167839050293,
-0.35189297795295715,
-0.8860886096954346,
0.21349216997623444,
0.3948413133621216,
-0.42808088660240173,
0.1467569619... | |
where TView : IView<TPresenter>
where TPresenter : IPresenter<TView, TPresenter>
{
TView View { get; set; }
}
```
Then this abstract presenter class:
```
public abstract class AbstractPresenter<TView, TPresenter> : IPresenter<TView, TPresenter>
where TView : IView<TPresenter>
where TPresenter : clas... | [
0.07078191637992859,
-0.14562329649925232,
0.6564826965332031,
-0.416307270526886,
-0.22101148962974548,
0.24461182951927185,
0.1570023000240326,
-0.3372845947742462,
-0.4572555124759674,
-0.5330349802970886,
-0.43320444226264954,
0.7063235640525818,
-0.16456137597560883,
0.065028190612792... | |
this.view = value;
this.view.Presenter = this as TPresenter;
}
}
}
```
The view is injected via a property, instead of the constructor, to allow the bi-directional affection in the setter. Notice that a safe cast is needed...
Then, my concrete presenter is something like :
```
public class M... | [
-0.00641485583037138,
0.1233123317360878,
0.6206827163696289,
-0.31704527139663696,
-0.1876596063375473,
0.23511721193790436,
0.16141273081302643,
-0.07521387189626694,
0.05281900614500046,
-0.6358929872512817,
-0.11224554479122162,
0.574471116065979,
-0.4270297884941101,
0.294130742549896... | |
in the container, with a transient behavior.
2. I register `MyView` as an `IMyView` in the container with a transient behavior.
3. I then asks for a `MyPresenter` to the container.
4. Container instanciate a MyView
5. It instanciates a `MyPresenter`
6. It inject the view into the presenter through the `AbstractPresente... | [
0.07209788262844086,
-0.05195091664791107,
0.829584538936615,
-0.1620502769947052,
0.10970443487167358,
0.191755473613739,
-0.11500623822212219,
0.08329760283231735,
-0.11184006184339523,
-0.6743908524513245,
-0.02339550480246544,
0.5567267537117004,
-0.12837304174900055,
0.370966345071792... | |
I'm interested in writing software that depends on being able to identify that there is a face in a picture (or video frame). It doesn't have to ID the face - so no metrics other than:
* Is there a human face in the picture (or more than one)
* Where, approximately, are the eyes and mouth or nose tip (whatever it keye... | [
0.8387867212295532,
0.17396335303783417,
0.43715059757232666,
0.1765090525150299,
0.197821706533432,
0.015881074592471123,
-0.07674182951450348,
0.35870361328125,
-0.4901575446128845,
-0.6122003793716431,
0.17178688943386078,
0.4432733654975891,
0.00911021139472723,
-0.3147774934768677,
... | |
for a [good wiki about it](http://opencv.willowgarage.com/wiki/).
[And here](http://opencv.willowgarage.com/wiki/FaceDetection) you can see a sample program of implementing a face recognition app. | [
0.2547595798969269,
-0.24769245088100433,
0.08758711814880371,
-0.0661618560552597,
-0.14506791532039642,
0.10921710729598999,
0.614951491355896,
0.20816008746623993,
-0.2599829435348511,
-0.2557515501976013,
0.25714850425720215,
0.2017676681280136,
0.06465957313776016,
-0.3398973941802978... | |
It needs to be graphical. No sed, awk, grep, perl, whatever. I know how to use those and I do use them now, but I need to cherry-pick each replace in 300+ files.
I want a tool where I can:
* type a search string
* type a replace string
* select a directory and file extension
and it would recursively go into each fil... | [
0.1755806803703308,
-0.18661551177501678,
0.5986476540565491,
0.12404640018939972,
-0.024087579920887947,
0.022307537496089935,
0.04633013904094696,
-0.06329759955406189,
-0.18635788559913635,
-0.9187771081924438,
-0.014773748815059662,
0.6074316501617432,
-0.3322073221206665,
-0.021025139... | |
I needed. In case someone needs it on Slackware, [here's](http://swoes.blogspot.com/2008/10/regexxer-on-slackware-121.html) what you need to download and how to compile it (choosing correct version of each dependency can be a PITA)
I think [regexxer](http://regexxer.sourceforge.net/) is exactly what you're looking for:... | [
0.33053022623062134,
-0.35317084193229675,
0.10814321041107178,
0.11364677548408508,
-0.13494741916656494,
0.056345000863075256,
0.24202510714530945,
0.05513574555516243,
-0.3093600869178772,
-0.7008646726608276,
-0.05730883404612541,
0.574210524559021,
-0.4898627996444702,
0.0340624004602... | |
What I'm trying to do with `FileStream` in C#/.NET is to open two streams: one appending to a file and the other reading those writes asynchronously (for unit testing some network connection handling code). I can't figure out how to get the *writer* stream to open the file in non-exlusive locking mode and thus the code... | [
0.3924400508403778,
-0.017553012818098068,
0.4342959225177765,
-0.09208250790834427,
-0.04256228357553482,
-0.14494675397872925,
0.12410378456115723,
-0.19890646636486053,
-0.0057234810665249825,
-0.7090083360671997,
-0.09495824575424194,
0.6009330153465271,
-0.27247050404548645,
0.1567516... | |
FileAccess.Read, FileShare.Read);
```
See this question: [C# file read/write fileshare doesn’t appear to work](https://stackoverflow.com/questions/124946/c-file-readwrite-fileshare-doesnt-appear-to-work)
In short, your freader has to specify FileShare.Write to allow for the fact that there is already a writer on the ... | [
0.3517697751522064,
0.24811379611492157,
0.5030389428138733,
-0.1939779669046402,
0.30304837226867676,
-0.382452130317688,
0.04496549069881439,
0.09835509210824966,
-0.29815176129341125,
-0.37954309582710266,
-0.1738375425338745,
0.7857295870780945,
-0.2617270052433014,
0.05374487116932869... | |
The majority of resources that I have for UI design all deal with the web world. There are a number of advantages there because of the dynamic nature of the presentation layer.
However, I would like to design better windows form programs. I want a professional flow to my applications. Right now they look pretty by us... | [
0.5099838972091675,
0.09568291157484055,
0.32839328050613403,
0.11072764545679092,
-0.36354270577430725,
-0.11488461494445801,
0.2745354175567627,
0.13001146912574768,
-0.3762812316417694,
-0.8479985594749451,
0.1451626718044281,
0.4979398846626282,
0.019361307844519615,
0.1650534570217132... | |
Guidelines" or UX Guide available at <http://msdn.microsoft.com/en-us/library/aa511258.aspx> or in [PDF](http://download.microsoft.com/download/e/1/9/e191fd8c-bce8-4dba-a9d5-2d4e3f3ec1d3/ux%20guide.pdf). Here's the goals as listed on the website:
> * Establish a high quality and consistency baseline for all Windows-ba... | [
0.3568975031375885,
0.17318837344646454,
0.527341902256012,
0.006546285934746265,
0.25485989451408386,
-0.6131849884986877,
0.23316878080368042,
-0.4544821083545685,
-0.015518750064074993,
-0.6884287595748901,
-0.3258669376373291,
0.5835897326469421,
-0.010124646127223969,
-0.3597717583179... | |
I have a list of States in an ItemsControl, the DataTemplate is a CheckBox. I would like to add a function to select(check) all states. However I need to loop through the CheckBoxs rather then the data items since the checked state is stored in a separate data structure then the list of states the ItemsControl's ItemSo... | [
0.29605796933174133,
-0.1344357430934906,
0.2956659197807312,
0.10668563097715378,
-0.17626716196537018,
0.015415686182677746,
0.06827221065759659,
-0.30022501945495605,
0.06830068677663803,
-0.6350516080856323,
0.1577303111553192,
0.3070383369922638,
-0.32345741987228394,
0.42935305833816... | |
How do I write a regular expression to find all lines containing 665 and not having .pdf
I can't seem to find how to do not in regex. This is for Notepad++ syntax if it matters.
Thanks
If `.pdf` will only occur after `665`, the negative lookahead assertion `665(?!.*\.pdf)` should work fine. Otherwise, I prefer to use... | [
0.06657234579324722,
0.16623960435390472,
0.6083260774612427,
-0.03410467877984047,
-0.246284618973732,
-0.09377355873584747,
0.31056544184684753,
-0.01167363952845335,
-0.08229214698076248,
-0.4514150619506836,
-0.26657629013061523,
0.7436099648475647,
-0.22012406587600708,
-0.37604588270... | |
I'm trying to return a transparent GIF from an .aspx page for display within a web page. I am trying to get the image to have transparency, but I just keep getting Black being where the image should be Transparent.
Does anyone know what I'm doing wrong?
```
Protected Sub Page_Load(ByVal sender As Object, ByVal e As S... | [
0.3340570032596588,
0.050119057297706604,
0.6644611954689026,
-0.06746403127908707,
-0.3214661777019501,
-0.0004650284827221185,
0.3987400233745575,
-0.31588324904441833,
-0.34449151158332825,
-0.6142721176147461,
-0.2987152636051178,
0.6358448266983032,
-0.1754317432641983,
0.222100406885... | |
Create a new 32-bit bitmap image
Dim b = New Bitmap(width, height)
'' Create Grahpics object for drawing
Dim g = Graphics.FromImage(b)
Dim rect = New Rectangle(0, 0, width - 1, height - 1)
'' Fill in with Transparent
Dim tbrush = New System.Drawing.SolidBrush(Color.Transparent)
g.FillRect... | [
0.18848536908626556,
-0.306769996881485,
0.9947794079780579,
-0.03987683355808258,
-0.37374207377433777,
0.49181997776031494,
-0.13640852272510529,
-0.6747729778289795,
-0.2650093138217926,
-0.3973716199398041,
0.008107302710413933,
0.5246449112892151,
-0.4192345142364502,
0.06794122606515... | |
= New SolidBrush(Color.LightBlue)
g.FillPie(cbrush, rect, 0, 365)
'' Clean up
g.Flush()
g.Dispose()
'' Make Transparent
b.MakeTransparent()
b.Save(Response.OutputStream, Imaging.ImageFormat.Gif)
Response.Flush()
Response.End()
End Sub
```
Unfortunately, there is no easy way to cr... | [
0.1610065996646881,
-0.2313338816165924,
0.630009114742279,
-0.11669575423002243,
-0.4578508734703064,
0.23050396144390106,
0.41300198435783386,
-0.4862637519836426,
-0.1197197362780571,
-0.7621700167655945,
-0.10358481854200363,
0.41898542642593384,
-0.3830108344554901,
0.1412508636713028... | |
How to detect the Internet connection is offline in JavaScript?
You can determine that the connection is lost by making **failed XHR requests**.
The standard approach is to **retry the request** a few times. If it doesn't go through, **alert the user** to check the connection, and **fail gracefully**.
**Sidenote:** T... | [
0.24987609684467316,
-0.1319068819284439,
0.19494064152240753,
0.14893126487731934,
0.17883536219596863,
-0.5980449914932251,
0.6773495078086853,
-0.14209868013858795,
-0.0325690321624279,
-0.8254691362380981,
-0.2867507040500641,
0.4451899528503418,
-0.14043745398521423,
-0.23611795902252... | |
there is one, and to continue using your app with a fair amount of forgiveness.
**Sidenote:** You could check a reliable site like google for connectivity, but this may not be entirely useful as just trying to make your own request, because while Google may be available, your own application may not be, and you're sti... | [
0.34777799248695374,
0.087066151201725,
0.4049777090549469,
0.47991305589675903,
-0.14538027346134186,
-0.17121034860610962,
0.4077287018299103,
0.12052756547927856,
-0.2261996865272522,
-0.6200252175331116,
-0.1359959989786148,
0.28204336762428284,
-0.04907535761594772,
-0.188627824187278... | |
*Sending a Ping* could be achieved in the same way that you would make any kind of two-way ajax request, but sending a ping to google, in this case, would pose some challenges. First, we'd have the same cross-domain issues that are typically encountered in making Ajax communications. One option is to set up a server-si... | [
0.0912792831659317,
-0.12161047756671906,
0.32093656063079834,
0.3970087766647339,
-0.21521958708763123,
-0.13278520107269287,
0.32460901141166687,
0.26502934098243713,
-0.15183138847351074,
-0.7111557126045227,
-0.06837154924869537,
0.2611829340457916,
-0.300368070602417,
-0.0287674423307... | |
connection problem is only on our own domain, we won't be able to tell the difference. Other cross-domain techniques could be tried, for example, embedding an iframe in your page which points to google.com, and then polling the iframe for success/failure (examine the contents, etc). Embedding an image may not really te... | [
0.19292958080768585,
-0.053312331438064575,
0.5084556937217712,
0.4903983175754547,
0.09999820590019226,
-0.1460878998041153,
0.24287283420562744,
0.27508655190467834,
-0.3764345943927765,
-0.6542162299156189,
0.12164883315563202,
0.40201497077941895,
-0.3206150531768799,
0.348510295152664... | |
out for your specific app. | [
0.38438865542411804,
-0.2539175748825073,
0.18513324856758118,
0.18099547922611237,
-0.008654746226966381,
0.17515279352664948,
0.06338539719581604,
0.39773160219192505,
-0.040101565420627594,
-0.1424582153558731,
0.18408599495887756,
0.1634565144777298,
-0.16966043412685394,
-0.0482742153... | |
My team is trying to setup an Apache reverse proxy from a customer's site into one of our web applications.
<http://www.example.com/app1/some-path> maps to <http://internal1.example.com/some-path>
Inside our application we use struts and have redirect = true set on certain actions in order to provide certain functi... | [
0.00995047390460968,
0.20209887623786926,
0.28059810400009155,
-0.10538937151432037,
-0.2583785355091095,
0.34703391790390015,
0.4243769645690918,
-0.2640654742717743,
0.052749376744031906,
-0.3120020031929016,
0.3716045618057251,
0.2674627900123596,
-0.17763221263885498,
-0.01777288503944... | |
that seems to address your problem. It even uses the same example.com and /app1 that you have in your example. Go to the "Configuring the Proxy" section for examples on how to use [ProxyPassReverse](http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypassreverse). | [
0.27775275707244873,
-0.019921794533729553,
0.33224037289619446,
0.30099716782569885,
-0.21370454132556915,
-0.3110523819923401,
0.4023684859275818,
0.1546589434146881,
-0.20595823228359222,
-0.8434314131736755,
0.3291088342666626,
0.45254987478256226,
-0.18559445440769196,
0.1141447499394... | |
Every so often when I'm debugging, I get this message in nice brown text on an ASP.NET error page:
> *Access to the path
> "c:\windows\microsoft.net\framework\(version)\Temporary ASP.NET Files\(blah)"
> is denied.*
I've never been able to figure out what causes it, what really fixes it, and why it happens.
Often ... | [
0.3753322660923004,
0.31398749351501465,
0.29220476746559143,
-0.043696079403162,
-0.04114401340484619,
0.01779690571129322,
0.759925365447998,
0.4651975631713867,
-0.48564380407333374,
-0.688063383102417,
-0.20411354303359985,
0.24178321659564972,
-0.22612865269184113,
0.4216732382774353,... | |
into this today with some .NET 1.1 code (yes, still maintaining some - hoping to upgrade it soon) and I'm not sure if I've ever seen it with .NET 2.0 and above.
Does anyone know what causes this and what should fix it? I assume it has multiple possible causes but I'm just curious if someone could shed some light on i... | [
0.3638041019439697,
-0.1529518961906433,
0.09629432111978531,
0.1835009753704071,
0.15331421792507172,
-0.351136714220047,
0.3198525011539459,
0.31495508551597595,
-0.4140909016132355,
-0.6666761636734009,
0.22492071986198425,
0.11511833965778351,
-0.3343002200126648,
0.3470626473426819,
... | |
I am current writing an application that will require multiple inserts, updates and deletes for my business entity. I am using the TransactionScope class to guarantee all the stored procedures can commit or roll back as a single unit of work.
My question is, I am required to also use COMMIT TRAN and ROLLBACK TRAN is e... | [
0.015765827149152756,
0.07896380871534348,
0.5641652345657349,
-0.012730143964290619,
0.19784408807754517,
-0.3371734023094177,
0.02415085956454277,
-0.06391752511262894,
-0.41258352994918823,
-0.34575462341308594,
0.09288594126701355,
0.8857004046440125,
-0.04302222654223442,
-0.003477824... | |
older vs 2005.
See [here](http://blogs.msdn.com/jmeier/archive/2006/10/12/use-promotable-transactions-while-working-with-sql-server-2005.aspx)
Thanks | [
-0.1926318258047104,
-0.04009139910340309,
0.4631512761116028,
0.2873784899711609,
-0.036855366080999374,
-0.5850811004638672,
0.2106964886188507,
-0.11109679192304611,
-0.2746882736682892,
-0.24021929502487183,
-0.3665899634361267,
0.5999021530151367,
0.3317597210407257,
-0.15351949632167... | |
We're running a java/hibernate app going against ORACLE 10g in TESTING. Once in a while, we're seeing this error:
> ORA-00942: table or view does not exist
Is there a way to find out which table/view(s) ORACLE is talking about ?
I know that I can add extra levels of logging in hibernate which will show all the SQL t... | [
0.5916587710380554,
0.11716657131910324,
0.0742366686463356,
0.05915810540318489,
-0.042058151215314865,
-0.1542721837759018,
0.44690796732902527,
0.12682604789733887,
-0.21325914561748505,
-0.502566933631897,
0.2509387135505676,
0.6323096752166748,
-0.23631173372268677,
-0.116330675780773... | |
:
--------
Just so you know, I don't have control over the Oracle DB Server Environment.
I enabled Hibernate tracing/logging and found a VALID SQL. I even put Wireshark(which is a TCP packet filter) to see what hibernate actually sends and that was a valid SQL. So, why would Oracle complain about it once in a whil... | [
0.7562466859817505,
0.11708065122365952,
0.17468248307704926,
0.28292158246040344,
-0.3413044810295105,
-0.7143732905387878,
0.46754395961761475,
-0.1467435508966446,
-0.06442107260227203,
-0.3562651574611664,
0.28813818097114563,
0.5218691229820251,
-0.3755917549133301,
0.0476837754249572... | |
what they are off the top of my head.
See:
<http://docs.oracle.com/cd/B19306_01/network.102/b14266/cfgaudit.htm>
for some idea (which I just quickly googled for) | [
0.7284854054450989,
0.3398283123970032,
0.20228616893291473,
0.026864679530262947,
0.12660083174705505,
0.08856561779975891,
0.16480228304862976,
0.4499965012073517,
-0.49650582671165466,
-0.3459012508392334,
0.24525055289268494,
0.6010010242462158,
0.19008004665374756,
0.13080060482025146... | |
For a new Java web project I thought about using:
* Eclipse as IDE
* Mercurial for version control
* Some kind of bug tracking software
I have heard of bug tracking software where you can tie a change to an unresolved bug when you check it in. I haven't used any such solution myself, but it sounds good. Are there any... | [
0.37736666202545166,
-0.1252094805240631,
0.21291355788707733,
0.5021704435348511,
-0.20115621387958527,
-0.2544402778148651,
-0.2095314860343933,
0.20274028182029724,
-0.4746737480163574,
-0.4768115282058716,
0.31232815980911255,
0.5891345143318176,
-0.2903646230697632,
0.1090515255928039... | |
it support `hg rename` and `hg copy`?
If I can get something good working using a mix of the above three components I plan on throwing Hudson into the mix as well. To be able to track how changes in the code base affects our unit tests.
First of all I want feedback on the above question. But I would appreciate any th... | [
0.49807775020599365,
0.1551816761493683,
0.04286663234233856,
0.031146928668022156,
0.15199236571788788,
-0.1633235216140747,
-0.2565770447254181,
-0.1387462615966797,
0.27490490674972534,
-0.32840511202812195,
0.15420885384082794,
1.041384220123291,
-0.10138152539730072,
-0.26524764299392... | |
opinions. You'd probably be better off to test it yourself. As I said before - it works for me.
Disclaimer: I've participated in developing the plug-in... | [
0.5747895836830139,
0.10738515853881836,
0.07516083866357803,
0.19268333911895752,
-0.14852789044380188,
0.1395028680562973,
-0.105052150785923,
0.2716875672340393,
0.30681225657463074,
-0.266242653131485,
0.23042365908622742,
0.659070611000061,
0.3067260682582855,
-0.17611882090568542,
... | |
Imagine I have a chunk of initialisation code at the top of a stored procedure with a number of variable assignments:
```
SET @proc = 'sp_madeupname'
SET @magic_number = 42
SET @tomorrows_date = DATEADD(dd, 1, GETDATE())
...
```
Clearly doing all of the above as one SELECT would be faster:
```
SELECT
@proc = '... | [
0.07217955589294434,
-0.1836717128753662,
0.17114271223545074,
0.010837729088962078,
0.11170285195112228,
0.23104247450828552,
0.12541885673999786,
-0.4937856197357178,
-0.2735282778739929,
-0.6466366052627563,
0.056812576949596405,
0.377096563577652,
0.045874446630477905,
-0.0109265847131... | |
multiple assignments.
Here is some more information about it:
[SELECT vs. SET: Optimizing Loops](http://www.sqlmag.com/Articles/ArticleID/94555/94555.html) | [
0.32792672514915466,
-0.6319836378097534,
-0.2940722703933716,
0.25253069400787354,
-0.06089787185192108,
-0.01898990571498871,
-0.08293838798999786,
-0.5906332731246948,
-0.5066194534301758,
-0.3095661997795105,
0.12440217286348343,
0.10547713935375214,
-0.4613126814365387,
-0.19820182025... | |
Coming from a background, I'm familiar with GUI editors that do a poor job of producing code. However, I've never written a GUI using .NET. Does the GUI editor in Visual Studio have the same problem(s)? Are both the source files and output GUI good?
The GUI editor in Visual Studio is probably the best I've used. Also, ... | [
0.4459924101829529,
0.020133107900619507,
-0.025102049112319946,
0.20087911188602448,
-0.19279217720031738,
-0.09127389639616013,
0.02924126200377941,
-0.12590251863002777,
-0.25326091051101685,
-0.8914023041725159,
0.09026351571083069,
0.8501064777374268,
0.007551176473498344,
-0.06309662... | |
Is it possible to call into COM objects via x86 assembly language? If so, how?
Why would I want to do this? Let's say I've got two programs that I don't have source for - all I've got are the binaries. One of them implements a COM interface, the other doesn't. I want to inject code into the first program to call into ... | [
0.31407639384269714,
0.32399630546569824,
-0.023664165288209915,
0.1351408213376999,
-0.1291278600692749,
0.2034049779176712,
0.31036198139190674,
-0.029393954202532768,
-0.1023254245519638,
-0.5315530300140381,
0.03044024296104908,
0.680709719657898,
-0.44322651624679565,
0.11746332049369... | |
were for educational value, then surely doing the COM stuff by hand in straight C would do the trick.
---
Given the updated question, I'd suggest that you write the COM stuff in a DLL and inject that DLL into the program you want to patch, then patch in simple x86 code into the program to call your DLL that does the ... | [
0.40361613035202026,
0.06494193524122238,
0.003137291641905904,
0.2529532015323639,
0.10385322570800781,
0.16044588387012482,
-0.17172493040561676,
0.07209807634353638,
-0.24799959361553192,
-0.7454739809036255,
-0.1361062377691269,
0.856834352016449,
-0.28361690044403076,
-0.1458350419998... | |
the avenues for injecting code into a process are considered security flaws (and have often been used by malware), so I suspect that Microsoft may have removed many if not most (or all) from more recent service packs or OS versions. | [
0.38775908946990967,
0.4852011203765869,
-0.30968448519706726,
0.1597490906715393,
0.2671183943748474,
-0.28748130798339844,
0.34178948402404785,
0.32983115315437317,
0.07953526079654694,
-0.36240658164024353,
-0.25740674138069153,
0.26247555017471313,
-0.1406564712524414,
-0.0410876087844... | |
Have had to write my first "proper" multithreaded coded recently, and realised just how little I knew about how "imperative-style" (ie, concurrency models used by C++/C#/Java, and the like) concurrent programming techniques.
What resources are there (both books and online tutorials, etc) in order to learn more about t... | [
0.42970409989356995,
-0.05540398508310318,
-0.06190234422683716,
0.13486351072788239,
-0.3106633126735687,
-0.13111981749534607,
-0.11377816647291183,
-0.0007520403014495969,
-0.4988662302494049,
-0.429989755153656,
0.2542729675769806,
0.23148174583911896,
-0.5533100366592407,
-0.257887899... | |
any decent book on multithreaded programming in any of the languages you mention should cover the general principles. I'm covering this ground in [C++ Concurrency in Action](http://www.manning.com/williams/), for example. | [
0.3002230226993561,
-0.12188304960727692,
-0.1250232309103012,
0.150679349899292,
-0.039399389177560806,
-0.02908996492624283,
0.30165597796440125,
0.1873447299003601,
-0.541145384311676,
-0.12948505580425262,
0.14938831329345703,
0.7415698170661926,
-0.23135747015476227,
-0.39792668819427... | |
im creating a Factory class that will contruct and return an object. I normally would do all of the data stuff at the Data Access Layer, but i dont think i could reach my objective and still do so. What i want to do is use a SQLDataReader to quickly read the data information and populate the object to be returned from ... | [
0.331924170255661,
0.06185722351074219,
0.13834773004055023,
0.20775535702705383,
-0.19568781554698944,
0.03259887546300888,
0.12917505204677582,
-0.17490358650684357,
0.05046626180410385,
-0.39023149013519287,
0.14512386918067932,
0.4508649706840515,
-0.2779843211174011,
0.042561315000057... | |
is a good idea as this way provides two major benefits:
1. This way you can seperate the data access and business logic, which means if you change database design the upper layer algorithms do not need to be changed.
2. From OO stand point, you are converting some pure data into objects and may also added behavior to... | [
0.14288455247879028,
-0.03374151512980461,
0.07572519779205322,
0.29525694251060486,
0.11663886159658432,
-0.22837106883525848,
0.23495309054851532,
-0.12470582872629166,
-0.1931001842021942,
-0.46054962277412415,
-0.2455044388771057,
0.49383771419525146,
-0.2806854844093323,
0.02715876512... | |
Just wondering if a .NET app can be compiled down to native machine code ahead of time? I'm not planning on doing so even if I could; I'm just curious.
Thanks
You can use NGen to compile it ahead of time, but this still depends on the .NET framework. Remotesoft's Salamander (a commercial app) can make a framework-less... | [
0.5193146467208862,
-0.04847017675638199,
-0.11036394536495209,
0.19420550763607025,
-0.03716602921485901,
-0.1723404824733734,
0.4208357334136963,
0.4033709764480591,
-0.20793604850769043,
-0.7068110704421997,
0.17041215300559998,
0.5843905210494995,
-0.22655676305294037,
0.14516869187355... | |
I have an odd problem...I'm using a documentation generator which generates a lot of output like docs/foo.php.html. It's XHTML, and thus contains `<?xml...>` tags at the beginning of file. The problem is, Apache has somehow decided to run it through the PHP interpreter, even though ".php" appears in the middle of the f... | [
0.4336031675338745,
0.43966078758239746,
0.24862553179264069,
-0.02748776413500309,
-0.21038496494293213,
-0.3588160276412964,
0.41668322682380676,
-0.09778349101543427,
0.015080851502716541,
-0.4897599518299103,
0.11382976174354553,
0.3837112486362457,
-0.3178587555885315,
0.2805628180503... | |
The string "php.html" does not appear explicitly anywhere in my Apache config files. There is a line "`AddHandler php5-script .php`", but I don't see how that would also include ".php.html" files.
The problem seems to be in [mod\_mime](http://httpd.apache.org/docs/2.2/mod/mod_mime.html).
Quote from the Apache mod\_mim... | [
0.2998621165752411,
0.2805604040622711,
0.4225769340991974,
-0.022955214604735374,
-0.0916408970952034,
-0.13115885853767395,
0.31326931715011597,
-0.18565769493579865,
-0.23077376186847687,
-0.6176634430885315,
0.06949110329151154,
0.40162649750709534,
-0.39521220326423645,
0.220925524830... | |
> `<FilesMatch \.cgi$>`
>
>
> `SetHandler cgi-script`
>
>
> `</FilesMatch>`
Also, you can google for `apache mod_mime "multiple extensions"` | [
0.2685410976409912,
0.23456700146198273,
0.1414901614189148,
0.19011211395263672,
-0.012555641122162342,
-0.006189881358295679,
0.4452482759952545,
-0.0169747956097126,
-0.28822028636932373,
-0.7089617252349854,
-0.3808939456939697,
0.48350629210472107,
-0.2637178897857666,
0.0712477043271... | |
I have never seen a way to do this nicely, i would be interested in seeing how others do it. Currently i format it like this:
```
public Booking createVehicleBooking(Long officeId,
Long start, | [
0.7037109732627869,
0.07310989499092102,
0.3479660749435425,
0.04290952906012535,
0.35462942719459534,
-0.6175797581672668,
-0.30958831310272217,
-0.09817207604646683,
-0.15243099629878998,
-0.627627968788147,
0.2914305031299591,
0.3725762665271759,
-0.021406322717666626,
0.229925975203514... | |
Long end,
String origin,
String destination, | [
-0.28235626220703125,
-0.3169481158256531,
0.4875670075416565,
-0.1614096462726593,
-0.12969937920570374,
0.06492210924625397,
-0.08901836723089218,
0.0485222265124321,
-0.33676478266716003,
-0.012998374179005623,
-0.3068378269672394,
0.12812185287475586,
-0.20573101937770844,
0.6661679148... | |
String purpose,
String requirements, | [
0.030117569491267204,
0.028791651129722595,
0.0822971910238266,
-0.12327864021062851,
0.06742522865533829,
0.010898711159825325,
0.015950391069054604,
-0.033080343157052994,
-0.298013299703598,
-0.16497169435024261,
-0.42804619669914246,
0.4252587556838989,
-0.43907997012138367,
0.16680000... | |
Integer numberOfPassengers) throws ServiceException {
/*..Code..*/
}
```
A large set of parameters like this is often (but not always) an indicator that you could be using an object to represent the parameter set. This is especially true if either:
* There are several methods with similar large parameter sets, that c... | [
0.4635145962238312,
0.11895202100276947,
0.23117604851722717,
-0.21714581549167633,
0.11325962841510773,
-0.042668502777814865,
0.49482908844947815,
-0.18534700572490692,
-0.07369699329137802,
-0.7364428639411926,
-0.01072444673627615,
0.521557629108429,
-0.38113805651664734,
0.19093906879... | |
destination;
String purpose;
String requirements;
Integer numberOfPassengers;
Booking createVehicleBooking () throws ServiceException { ... }
}
```
This is the **Builder Pattern**. The advantage of this pattern is that you can build up a complex set of parameters in pieces, including mul... | [
0.3688001036643982,
-0.042033255100250244,
0.3262687027454376,
0.20755043625831604,
0.06388726830482483,
-0.24435894191265106,
0.46523746848106384,
-0.49639633297920227,
-0.05474968999624252,
-0.7616007924079895,
0.038573648780584335,
0.46369990706443787,
-0.23021641373634338,
0.2522039413... | |
method that checked their consistence before you go as far as `creating` the final object. This is applicable in cases where creating the object involves non-reversible steps, such as writing to a file or database.
Note that, as with all patterns, this doesn't apply in every case and may not apply in yours. If your co... | [
0.39589908719062805,
-0.15147432684898376,
0.04231538623571396,
0.2630351185798645,
-0.0477711483836174,
-0.19166599214076996,
0.41054391860961914,
-0.2529488205909729,
-0.23287193477153778,
-0.7234771847724915,
0.16850391030311584,
0.2998916506767273,
-0.571069061756134,
-0.01964606903493... | |
Compared to most people on this site I am admittedly a novice. I wanted to get some advice from the pros on how to avoid making stupid errors in your code.
Is there anyone else who had the problem when they were first starting out of missing some detail that causes big problems? Are there any habits or behaviors that... | [
0.7988351583480835,
0.3215937614440918,
-0.42545315623283386,
0.17841577529907227,
0.007638983894139528,
-0.29223552346229553,
0.7056231498718262,
0.11413021385669708,
-0.16927041113376617,
-0.49840062856674194,
0.5428755283355713,
0.5805903673171997,
-0.022876698523759842,
-0.089765578508... | |
your code
4. Use source control, even if you are the only developer
5. Review all of your changes before doing a commit to source control
6. Consider using a more modern language that makes it harder for you to make mistakes
7. Comment your code extensively
8. Refactor your code early and often
9. Fix bugs before addin... | [
0.8217951059341431,
0.19220811128616333,
0.015079094097018242,
0.3623080551624298,
0.14091083407402039,
-0.21890541911125183,
0.6991473436355591,
-0.16185814142227173,
-0.1662178486585617,
-0.9195538759231567,
-0.09261360764503479,
0.8595719337463379,
-0.007323797792196274,
-0.210633739829... | |
I have a factory class that populates objects with data. I want to implementing saving from the object, but do not want to populate the object with db stuff - is it stupid to have my Factory that creates the class also save the data?
ie: in my .Save() method on the object i would call Factory.Save(myObject);
If you ar... | [
0.3906058371067047,
0.08678513765335083,
-0.2928680181503296,
-0.16593638062477112,
-0.3637006878852844,
-0.11219073832035065,
0.3576521873474121,
-0.16959553956985474,
-0.08059675991535187,
-0.7338733077049255,
0.31569746136665344,
0.23828727006912231,
-0.5045765042304993,
0.3597885966300... | |
Our company is considering upgrading our SQL server.
At this point, would it be better to upgrade to 2005 or 2008?
Here are some of my considerations:
* Features
* Licensing costs
* Learning curve
Bear in mind our staff has already been using SQL server 2000 for many years.
If you're porting your SQL Server 2000 c... | [
0.11726172268390656,
0.3382607400417328,
0.4657062590122223,
0.1206904798746109,
-0.08819171786308289,
-0.13208340108394623,
0.20916229486465454,
-0.03915346786379814,
-0.13909293711185455,
-0.5212063193321228,
0.29266849160194397,
0.7600454688072205,
0.08323827385902405,
0.054733201861381... | |
with the following major pros and cons to the decision:
**Pros of going to 2008**
* You get another 3 years of lifespan for your systems essentially for free. SQL Server 2008 will be in support for longer than SQL Server 2005. This gives you a longer stretch before you will have to mover over to the new version. IMO ... | [
-0.11714738607406616,
-0.06448253989219666,
0.5417007207870483,
0.2379574328660965,
-0.16841323673725128,
-0.25629520416259766,
0.1577545702457428,
0.028333934023976326,
-0.5540003180503845,
-0.4844982922077179,
0.19721759855747223,
0.472025066614151,
-0.03319169208407402,
0.27137434482574... | |
get more options in future without having to do another platform shift. For your porting exercise this doesn't matter but you buy yourself a little flexibility nearly for free.
**Pros of going to SQL Server 2005**
* It's less 'bleeding edge' than SQL Server 2008 so the implementation path will probably be slightly ea... | [
0.08067099004983902,
-0.1765812784433365,
0.38330474495887756,
0.29520729184150696,
-0.18611985445022583,
-0.07358087599277496,
0.3279689848423004,
0.05345253273844719,
-0.4438299536705017,
-0.39679041504859924,
0.13868685066699982,
0.843971848487854,
0.21368399262428284,
-0.06752847880125... | |
some more detailed investigation about the potential issues and see if there are any real benefits or obstacles that are specific to your circumstances. | [
0.4761902093887329,
-0.07739461213350296,
0.09749070554971695,
0.3719731867313385,
0.10982439666986465,
-0.18331067264080048,
0.27927717566490173,
0.3750617504119873,
0.026385623961687088,
-0.6002294421195984,
0.0036684288643300533,
0.2361486554145813,
0.21546003222465515,
-0.1488268524408... | |
is there an if statement when it comes to mysql query statements?
when i am updating a table record, i want to only update certain columns if they have a value to be updated.
for example, i want an update table function, and there is a table for volunteers and a table for people who just want email updates.
i want t... | [
0.2411244511604309,
0.06287023425102234,
0.2676689624786377,
0.07455510646104813,
-0.21256017684936523,
0.005917179863899946,
0.023196298629045486,
0.013560489751398563,
-0.15429237484931946,
-0.5667639970779419,
0.2566216289997101,
0.5146558284759521,
-0.35675203800201416,
-0.030294915661... | |
can by done using an if statement w/ two query statements, based on what table you're updating, but i am wondering is it possible to use only one query statement w/ the conditionals in it to update the appropriate columns in the table.
this may sound like something you would dream about, let me know.
thanks.
I think ... | [
0.21990273892879486,
0.05155999958515167,
0.22654525935649872,
-0.02661258354783058,
0.1954697072505951,
-0.10267317295074463,
0.096583291888237,
-0.282514750957489,
-0.09215018898248672,
-0.7905523180961609,
-0.155826136469841,
0.6740756630897522,
-0.06693793833255768,
0.01992669142782688... | |
If I have an array of a fixed size depending on how it is defined and used, I typically use one of two ways to reference it.
Array type 1: Since it is a fixed size based on a define, I just use that define in all my loops referencing it.
```
#define MAXPLAYERS 4
int playerscores[MAXPLAYERS];
for(i=0;i<MAXPLAYERS;++... | [
0.26994678378105164,
-0.2821698784828186,
0.253435879945755,
-0.1901709884405136,
-0.08539598435163498,
-0.10730656236410141,
-0.07192020118236542,
-0.5423721075057983,
-0.44962620735168457,
-0.6177464723587036,
0.1998702734708786,
0.49179455637931824,
-0.541205108165741,
0.079552695155143... | |
penalty to doing it this way.
```
typedef struct
{
fields....
}MYSTRUCT_DEF;
MYSTRUCT_DEF mystruct[]={
{entry 1},
{entry 2},
{entry 3...n}
};
for(i=0;i<(sizeof(mystruct)/sizeof(MYSTRUCT_DEF));++i)
{
..... do something with each entry
}
```
Is there a more elegant solution to handling processing... | [
-0.014295072294771671,
0.15931475162506104,
0.3685106635093689,
-0.4347185790538788,
-0.050313130021095276,
0.011511661112308502,
0.4637719988822937,
-0.6402791738510132,
-0.22294841706752777,
-0.21298673748970032,
-0.1902279406785965,
0.5130971670150757,
-0.42945751547813416,
-0.079295076... | |
I need to store the user's password in my iphone app.
When posting an app to the app store, I have to tell Apple if there's encryption in the app for export purposes.
I don't want my app to be restricted to US only, but I also don't want to store or send passwords over the net in clear text.
So basically the questi... | [
0.3126283586025238,
0.2169395387172699,
-0.12958183884620667,
0.3557000756263733,
0.15468858182430267,
-0.3041529357433319,
0.28996750712394714,
-0.09619615226984024,
-0.11244453489780426,
-0.5068259835243225,
-0.2238529622554779,
0.42704230546951294,
-0.3791041374206543,
-0.10061445087194... | |
an unencumbered replacement for the U.S.only libcrypt encryption library. Programs linked against the crypt() interface may be exported from the U.S.A. only if they use crypt() solely for authentica-tion authentication purposes and avoid use of the other programmer interfaces listed above. Special care has been taken i... | [
0.3182009160518646,
0.03234163299202919,
0.1575937122106552,
0.1695314198732376,
0.3533703684806824,
-0.3754071593284607,
0.14245137572288513,
0.046519067138433456,
-0.31087276339530945,
-0.19070453941822052,
-0.592605710029602,
0.3090679347515106,
-0.3770362138748169,
0.1528174728155136,
... | |
I'm trying to convert some code that worked great in VB, but I can't figure out what objects to use in .Net.
```
Dim oXMLHttp As XMLHTTP
oXMLHttp = New XMLHTTP
oXMLHttp.open "POST", "https://www.server.com/path", False
oXMLHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
o... | [
0.4815342128276825,
0.2067360132932663,
0.5969865322113037,
-0.1390816569328308,
-0.4260566830635071,
-0.30058932304382324,
0.04180720075964928,
-0.23934385180473328,
-0.26809078454971313,
-0.6888411045074463,
-0.07629614323377609,
0.26123717427253723,
-0.43346846103668213,
0.1842318624258... | |
it's big, but you never know how long links like this will stay valid.
NOTE: the first version of the question didn't say in C# .NET - it just said "in .NET". (perhaps it was tagged C# and I didn't see it) Converting from VB.NET to C# is pretty easy (though unnecessary).
'This class is representing the same functional... | [
0.11536622047424316,
-0.0657317116856575,
0.5449219942092896,
0.11430568993091583,
-0.16759082674980164,
-0.41109487414360046,
0.020809754729270935,
0.058030784130096436,
-0.4100707173347473,
-0.6765526533126831,
-0.2628938555717468,
0.24461902678012848,
-0.4976401627063751,
0.418435662984... | |
Object = False, Optional ByVal bstrUser _
As Object = "", Optional ByVal bstrPassword As Object = "")
Try
strUrl = bstrUrl
strMethod = bstrMethod
'Checking if proxy configuration
'is required...(blnIsProxy value
'from config file) | [
-0.14029380679130554,
0.11161274462938309,
0.3400668501853943,
-0.133531853556633,
-0.11284679919481277,
0.002922907005995512,
0.7102056741714478,
-0.2495194971561432,
0.026773255318403244,
-0.5711432099342346,
-0.3361835181713104,
0.5629338026046753,
-0.269222617149353,
0.1472478359937667... | |
If blnIsProxy Then
'Set the proxy object
proxyObject = WebProxy.GetDefaultProxy()
'Finding if proxy exists and if so set
'the proxy configuration parameters...
If Not (IsNothing(proxyObject.Address)) | [
-0.0759541392326355,
-0.1411338746547699,
0.5035665035247803,
-0.26256823539733887,
0.00030040371348150074,
-0.12423019856214523,
0.1221657544374466,
0.10318782925605774,
0.07713982462882996,
-0.6633104681968689,
-0.08327177911996841,
0.17718937993049622,
-0.5477015972137451,
0.32534059882... | |
Then
uriAddress = proxyObject.Address
If Not (IsNothing(uriAddress)) Then
_ProxyName = uriAddress.Host
_ProxyPort = uriAddress.Port | [
-0.5576547980308533,
-0.03239477053284645,
0.7442798614501953,
-0.264443039894104,
-0.1545260101556778,
0.09089893102645874,
0.12579673528671265,
0.3568463921546936,
-0.028112072497606277,
-0.9069143533706665,
0.08385681360960007,
0.27013710141181946,
0.02098149247467518,
0.748140931129455... | |
End If
UpdateProxy()
End If
urlWebRequest.Proxy = proxyObject
End If
'Make the webRequest... | [
0.13700199127197266,
-0.0693211778998375,
0.7011718153953552,
-0.09647975862026215,
-0.3085351288318634,
-0.20087690651416779,
0.5841633081436157,
0.1938532441854477,
0.10798020660877228,
-0.7185600399971008,
-0.2965220808982849,
0.052638765424489975,
-0.46124130487442017,
0.61635851860046... | |
urlWebRequest = System.Net.HttpWebRequest.Create(strUrl)
urlWebRequest.Method = strMethod
If (strMethod = "POST") Then
setRequestHeader("Content-Type", _
"application/x-www-form-urlencoded")
End If
'Add the cookie values of jessionid of web... | [
0.2420206516981125,
0.005981401540338993,
0.9236272573471069,
0.13318191468715668,
-0.20684270560741425,
-0.10495796799659729,
0.5745023488998413,
-0.3994380533695221,
0.10051406919956207,
-0.7480244040489197,
-0.2379046231508255,
0.11784367263317108,
-0.44478359818458557,
0.45308014750480... | |
'and PH-Session value of webseal
'for retaining the same session
urlWebRequest.Headers.Add("Cookie", str_g_cookieval)
Catch exp As Exception
SetErrStatusText("Error opening method level url connection")
End Try
End Sub
'Sends the request with post parameters...
... | [
-0.17303214967250824,
-0.23314277827739716,
0.705727219581604,
0.030300198122859,
-0.24090184271335602,
0.1289519965648651,
0.6637148261070251,
-0.3014233708381653,
-0.094047412276268,
-0.3514954745769501,
-0.6398112177848816,
0.19754517078399658,
-0.27006807923316956,
0.4629065692424774,
... | |
Try
Dim rspResult As System.Net.HttpWebResponse
Dim strmRequestStream As System.IO.Stream
Dim strmReceiveStream As System.IO.Stream
Dim encode As System.Text.Encoding
Dim sr As System.IO.StreamReader
Dim bytBytes() As Byte | [
-0.09777399152517319,
-0.407317578792572,
0.6812160015106201,
-0.2668873965740204,
-0.4547080397605896,
0.39345401525497437,
0.24873732030391693,
-0.27800360321998596,
-0.2538498342037201,
-0.3537489175796509,
-0.49953600764274597,
0.3736797273159027,
-0.2403884083032608,
0.130069330334663... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.