text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars? [ClassPathHelper](http://classpathhelper.sourceforge.net/) is a good start. It automatically identifies orphan jars and much more. The only limitation is with dependencies that are not...
[ 0.321888267993927, 0.11344344168901443, -0.2829691171646118, 0.039491791278123856, -0.16202478110790253, 0.04597853869199753, 0.12910813093185425, -0.3613179922103882, -0.38062575459480286, -0.7271140217781067, 0.17605642974376678, 0.38793787360191345, -0.3096975088119507, -0.0682355985045...
Detector](http://www.ucdetector.org/): a eclipse PlugIn tool to find unnecessary (dead) public java code.
[ 0.47164326906204224, -0.1777038723230362, -0.23670458793640137, 0.12030845135450363, -0.14654527604579926, -0.2357538491487503, 0.08453300595283508, -0.5416430234909058, -0.06125618889927864, -0.3966502249240875, -0.055975526571273804, 0.43738967180252075, -0.2068052589893341, -0.339815765...
Anyone have a good resource or provide a sample of a natural order sort in C# for an `FileInfo` array? I am implementing the `IComparer` interface in my sorts. The easiest thing to do is just P/Invoke the built-in function in Windows, and use it as the comparison function in your `IComparer`: ``` [DllImport("shlwapi.d...
[ 0.15663307905197144, 0.07181195169687271, 0.16358289122581482, 0.19855201244354248, 0.1912413239479065, -0.28390443325042725, 0.1583249419927597, -0.04397724196314812, -0.15504354238510132, -0.6934085488319397, 0.06411796808242798, 0.6661080718040466, -0.098714679479599, -0.190420106053352...
the version of Windows it runs on, however this does mean that it differs between versions of Windows so you need to consider whether this is a problem for you. So a complete implementation would be something like: ``` [SuppressUnmanagedCodeSecurity] internal static class SafeNativeMethods { [DllImport("shlwapi.d...
[ -0.0015354693168774247, -0.13243786990642548, 0.3666762411594391, -0.10134869068861008, 0.06740687042474747, -0.028810350224375725, 0.44139158725738525, -0.2765607237815857, 0.16892708837985992, -0.7089776992797852, -0.26651108264923096, 0.5914036631584167, -0.3072984218597412, 0.213323086...
Compare(FileInfo a, FileInfo b) { return SafeNativeMethods.StrCmpLogicalW(a.Name, b.Name); } } ```
[ 0.12710082530975342, 0.07403026521205902, 0.16865594685077667, -0.1436316817998886, 0.15718592703342438, -0.06928414106369019, 0.4526243507862091, -0.30248403549194336, 0.16774693131446838, -0.7828123569488525, -0.028156226500868797, 0.7135785222053528, -0.29327288269996643, 0.191163554787...
Is it legal to more or less "copy" (or euphemistically, be very "inspired by") the idea and UI of a copyrighted program? This question popped in my mind when looking at "[Things](http://culturedcode.com/things/)" which is a Mac-only program. How legal would it be for someone to make a Windows version of this program w...
[ 0.469852089881897, 0.0239583570510149, 0.39339274168014526, 0.3061295747756958, 0.23457784950733185, -0.17974047362804413, -0.24219249188899994, 0.22939378023147583, -0.3894309401512146, 0.11386117339134216, 0.1186428815126419, 0.5405372977256775, 0.16079868376255035, 0.10616392642259598, ...
"trashcan" icon, but effectively nothing else during the Microsoft/Apple lawsuit over a look and feel. As long as the code is entirely your own, the graphics are your own (and yes, copying too closely a *specific* graphic element like the trashcan can be a problem) and you aren't doing cloning elements that are tradema...
[ 0.9583775997161865, 0.1431148648262024, 0.27704086899757385, 0.3182530999183655, 0.1764775663614273, -0.3028986155986786, -0.09224633872509003, 0.03718055412173271, -0.19558943808078766, -0.5305100679397583, 0.036920227110385895, 0.4755302369594574, -0.20915676653385162, 0.2596991956233978...
be your primary problem in some cases.
[ 0.4074403643608093, 0.015620730817317963, 0.05361542850732803, 0.09462704509496689, 0.09254283457994461, 0.11186014115810394, 0.2032022625207901, 0.3328675329685211, -0.14626364409923553, -0.4135906398296356, -0.3320103585720062, 0.5805949568748474, -0.37324848771095276, -0.152386069297790...
I'm wondering if it is possible to add methods in main program to an existing class defined in header file. For example: There is `class CFun` defined in file `CFun.hpp`, but in our `party.cpp` we want to add a method `void hello() {cout << "hello" << endl;};`without editing `CFun.hpp` Obviously (unfortunately) constr...
[ 0.17096200585365295, 0.3329259157180786, 0.35989320278167725, 0.15008582174777985, -0.02555224671959877, -0.06202925369143486, 0.0881238728761673, -0.12214638292789459, -0.22329947352409363, -0.5609981417655945, 0.2042834460735321, 0.5013125538825989, -0.43689653277397156, 0.07286746054887...
to private data: ``` void Hello(CFun &fun) { cout << "hello" << endl; } ``` This is probably the best you'll be able to do. As pointed out by litb - this function has to be in the same namespace as CFun. Fortunately, namespaces, unlike classes, can be added to in multiple places.
[ 0.009754244238138199, 0.0621863417327404, 0.2834904193878174, 0.05074459686875343, -0.03779050335288048, -0.157152459025383, 0.1408737599849701, 0.13329774141311646, -0.13551361858844757, -0.5075542330741882, -0.16416233777999878, 0.6251654028892517, -0.23791642487049103, -0.13926212489604...
I need to have a single instance application (as per this [answer](https://stackoverflow.com/questions/19147/what-is-the-correct-way-to-create-a-single-instance-application#19326)), but it needs to be deployed via click once. The problem is that I require that click once doesn't automatically detect an update an attem...
[ -0.02727229706943035, 0.24684172868728638, 0.4462299048900604, -0.02802637591958046, 0.00650063855573535, -0.3624272644519806, 0.4791690409183502, -0.09466315805912018, -0.4078996479511261, -0.7789216637611389, -0.024612097069621086, 0.5761060118675232, -0.4169817268848419, 0.2296236008405...
how this is possible within a Click Once deployment scenario? To tackle the problem, we built a prototype application which has the following two functionalities. 1. Multiple instances on one pc are disabled. A single instance application is deployed via clickonce. When a user tries to start a second instance of the a...
[ 0.0014141227584332228, -0.13142426311969757, 0.2515317499637604, 0.10864988714456558, 0.23152923583984375, -0.10248155891895294, 0.30479946732521057, -0.10259784013032913, -0.16889429092407227, -0.8738925457000732, -0.17050381004810333, 0.5072020888328552, -0.5717865228652954, -0.006389381...
the demo application is as follows: **Step 1: Detect an active instance application using Mutex class.** -------------------------------------------------------------------- ``` namespace ClickOnceDemo { static class Program { /// summary> /// The main entry point for the application. ...
[ -0.20011645555496216, -0.16181820631027222, 0.15842531621456146, 0.14188624918460846, 0.4866439402103424, -0.05088810622692108, 0.15931276977062225, -0.1867520958185196, 0.04673796519637108, -0.8026244640350342, -0.40394127368927, 0.7492139339447021, -0.22278375923633575, -0.09689391404390...
Application.SetCompatibleTextRenderingDefault( false ); bool ok; var m = new System.Threading.Mutex( true, "Application", out ok ); if ( !ok ) { MessageBox.Show( "Another instance is already running.", ApplicationDeployment.CurrentDeployment.CurrentVersion...
[ -0.2709404230117798, -0.14695894718170166, 0.6733940243721008, -0.4268931746482849, 0.4083901345729828, 0.08611248433589935, 0.6917949914932251, -0.19793370366096497, -0.2597038149833679, -0.49610233306884766, -0.43872684240341187, 0.5015513300895691, -0.5784658789634705, 0.500349104404449...
return; } Application.Run( new UpdateProgress() ); } } } ``` **Step 2: Handle update programmatically** ------------------------------------------ Before we do that, we should disable the automatic ClickOnce update checking (in the Publish -- Updates... dialog). Then we create tw...
[ -0.23985248804092407, -0.17623427510261536, 0.9148165583610535, -0.19608455896377563, 0.1428772658109665, -0.195226788520813, 0.14565809071063995, 0.003713707672432065, -0.019679510965943336, -0.5597772598266602, -0.5686776041984558, 0.9797056913375854, -0.36089855432510376, 0.242489039897...
to check for updates. When updating completes, mainForm will start and updateProgress will be hidden. ``` namespace ClickOnceDemo { public partial class UpdateProgress : Form { public UpdateProgress() { InitializeComponent(); Text = "Checking for updates..."; Applicatio...
[ -0.0854564756155014, 0.029532168060541153, 0.9417087435722351, -0.4976925551891327, 0.3753153681755066, -0.12526081502437592, 0.557234525680542, -0.08689098060131073, 0.08879463374614716, -0.7154197692871094, -0.6531365513801575, 0.7052242755889893, -0.3369891345500946, 0.15160854160785675...
ad.CheckForUpdateProgressChanged += OnCheckForUpdateProgressChanged; ad.CheckForUpdateAsync(); } private void OnCheckForUpdateProgressChanged(object sender, DeploymentProgressChangedEventArgs e) { lblStatus.Text = String.Format( "Downloading: {0}. {1:D}K of {2:D}K downlo...
[ -0.1040705144405365, -0.033276889473199844, 0.6685081720352173, -0.12583264708518982, 0.12968912720680237, 0.30565962195396423, 0.5131800770759583, -0.46753427386283875, -0.1981654316186905, -0.5964683890342712, -0.44440385699272156, 0.46183183789253235, -0.5143679976463318, 0.245277985930...
string GetProgressString( DeploymentProgressState state ) { if ( state == DeploymentProgressState.DownloadingApplicationFiles ) { return "application files"; } if ( state == DeploymentProgressState.DownloadingApplicationInformation )
[ -0.17691868543624878, -0.2668432593345642, 0.6409943699836731, -0.16582836210727692, 0.45783406496047974, -0.06981105357408524, 0.4868496358394623, -0.25124526023864746, -0.24758891761302948, -0.5559667944908142, -0.6447940468788147, 0.6883974075317383, -0.44062110781669617, 0.215652689337...
{ return "application manifest"; } return "deployment manifest"; } private void OnCheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e) { if ( e.Error != null )
[ -0.014344689436256886, -0.2573576867580414, 0.22668547928333282, -0.021449532359838486, 0.30427277088165283, 0.1503182202577591, 0.44590699672698975, -0.2547018229961395, -0.15637856721878052, -0.4502601623535156, -0.3781062960624695, 0.7095783352851868, -0.38969165086746216, 0.17096219956...
{ MessageBox.Show( "ERROR: Could not retrieve new version of the application. Reason: \n" + e.Error.Message + "\nPlease report this error to the system administrator." ); return; } if ( e.Cancelled )
[ -0.271809846162796, -0.22276359796524048, 0.3403913974761963, -0.1501619666814804, 0.38623934984207153, -0.040233831852674484, 0.5303301215171814, 0.11820951104164124, -0.24280714988708496, -0.26917070150375366, -0.656948447227478, 0.3529021143913269, -0.6636562943458557, 0.471221148967742...
{ MessageBox.Show( "The update was cancelled." ); } // Ask the user if they would like to update the application now. if ( e.UpdateAvailable ) {
[ -0.0453326553106308, -0.19042260944843292, 0.42135676741600037, -0.042364321649074554, 0.26789405941963196, -0.22875048220157623, 0.4009808301925659, 0.3751879036426544, -0.006531849969178438, -0.41367074847221375, -0.4363917410373688, 0.4035593569278717, -0.4496065378189087, 0.28326618671...
if ( !e.IsUpdateRequired ) { long updateSize = e.UpdateSizeBytes; DialogResult dr = MessageBox.Show( string.Format("An update ({0}K) is available. Would you like to update the application now?", updateSize/1024), "Update Available", MessageBoxButtons.OKCancel );
[ -0.07144170254468918, -0.2853364944458008, 0.9424669742584229, -0.1600237935781479, 0.41690850257873535, 0.12673291563987732, 0.10401758551597595, -0.09247930347919464, 0.02611599490046501, -0.5514969229698181, -0.4547191858291626, 0.6036490797996521, -0.33786794543266296, 0.22931393980979...
if ( DialogResult.OK == dr ) { BeginUpdate(); } }
[ -0.03167599439620972, -0.24168388545513153, 0.7156733870506287, -0.22846807539463043, 0.30568811297416687, 0.178427591919899, 0.20098945498466492, 0.043026696890592575, -0.053317274898290634, -0.653623104095459, -0.26839280128479004, 0.3259880244731903, -0.14880290627479553, 0.241948664188...
else { MessageBox.Show( "A mandatory update is available for your application. We will install the update now, after which we will save all of your in-progress data and restart your application." ); BeginUpdate();
[ -0.00002943727668025531, -0.2964097857475281, 0.23711203038692474, -0.4192464351654053, 0.396625816822052, -0.27391350269317627, 0.5217018723487854, 0.18378973007202148, 0.12177442014217377, -0.8170278072357178, -0.5907933712005615, 0.5144901275634766, -0.4685623347759247, 0.01781887933611...
} } else { ShowMainForm(); } } // Show the main application form private void
[ 0.45274093747138977, -0.15015609562397003, 0.25764304399490356, -0.2827441394329071, 0.06448537111282349, -0.11497753113508224, 0.38706427812576294, -0.007934226654469967, 0.14476346969604492, -0.3499620854854584, -0.31957048177719116, 0.4324758052825928, -0.39963820576667786, 0.2145767062...
ShowMainForm() { MainForm mainForm = new MainForm (); mainForm.Show(); Hide(); } private void BeginUpdate() { Text = "Downloading update...";
[ 0.3804801404476166, -0.5478509664535522, 0.7625694274902344, -0.3679024577140808, -0.08613845705986023, -0.1523372083902359, 0.4339570701122284, 0.030385414138436317, 0.15853948891162872, -0.481367826461792, -0.5126409530639648, 0.569419264793396, -0.37934553623199463, 0.24392728507518768,...
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment; ad.UpdateCompleted += ad_UpdateCompleted; ad.UpdateProgressChanged += ad_UpdateProgressChanged; ad.UpdateAsync(); } void ad_UpdateProgressChanged( object sender, DeploymentProgressChangedEventArgs e...
[ -0.37802016735076904, 0.16238215565681458, 0.8750072121620178, -0.1316733956336975, 0.41789740324020386, 0.2629331946372986, 0.4299156963825226, -0.32266902923583984, -0.1575794816017151, -0.4905748665332794, -0.44482916593551636, 0.46022623777389526, -0.43692344427108765, 0.19693337380886...
/ 1024, e.BytesTotal / 1024, e.ProgressPercentage ); progressBar1.Value = e.ProgressPercentage; lblStatus.Text = progressText; } void ad_UpdateCompleted( object sender, AsyncCompletedEventArgs e ) { if ( e.Cancelled ) {
[ -0.11285533010959625, -0.08888500183820724, 0.4402964115142822, -0.1286810338497162, 0.1740647703409195, 0.23281385004520416, 0.5631307363510132, -0.26006701588630676, 0.019529657438397408, -0.31345704197883606, -0.5494884252548218, 0.2964473068714142, -0.568637490272522, 0.468893975019454...
MessageBox.Show( "The update of the application's latest version was cancelled." ); return; } if ( e.Error != null ) { MessageBox.Show( "ERROR: Could not install the latest version of the
[ 0.015916747972369194, -0.19261352717876434, 0.33792251348495483, -0.20257680118083954, 0.3470114767551422, -0.23509851098060608, 0.638700008392334, 0.10944759845733643, 0.027362219989299774, -0.33616477251052856, -0.5031812191009521, 0.3932356536388397, -0.652759313583374, 0.12031441181898...
application. Reason: \n" + e.Error.Message + "\nPlease report this error to the system administrator." ); return; } DialogResult dr = MessageBox.Show( "The application has been updated. Restart? (If you do not restart now, the new version will not take effect until after you qui...
[ -0.16545869410037994, -0.09789591282606125, 0.6810512542724609, -0.1534377485513687, 0.3682768940925598, -0.13887041807174683, 0.44302958250045776, 0.08314574509859085, -0.18998269736766815, -0.5148146152496338, -0.5886278748512268, 0.7829788327217102, -0.6226571202278137, 0.19510573148727...
if ( DialogResult.OK == dr ) { Application.Restart(); } else { ShowMainForm(); }
[ -0.06214209273457527, -0.1470426470041275, 0.7557520270347595, -0.12925226986408234, 0.4435088038444519, 0.012370583601295948, 0.3507766127586365, -0.052470844238996506, -0.11358125507831573, -0.4564290940761566, -0.4014916718006134, 0.43200239539146423, -0.29462698101997375, 0.29151582717...
} } } ``` The application works well and we hope it is a good solution for the problem. Special thanks to [Timothy Walters](http://timothywalters-devthoughts.blogspot.com) for providing the source code
[ 0.32355332374572754, 0.3532553017139435, -0.05685458704829216, 0.1402275711297989, 0.26711663603782654, -0.2912578284740448, 0.6930320262908936, 0.28683122992515564, 0.1344580501317978, -0.6006775498390198, -0.3666330575942993, 0.6330199837684631, -0.09244857728481293, 0.11400912702083588,...
Recently I wrote a function to generate certain sequences with nontrivial constraints. The problem came with a natural recursive solution. Now it happens that, even for relatively small input, the sequences are several thousands, thus I would prefer to use my algorithm as a generator instead of using it to fill a list ...
[ 0.01175604946911335, 0.020583799108862877, -7.036502438495518e-7, -0.1456737071275711, 0.047202084213495255, 0.3091813623905182, -0.04027124494314194, -0.4070708453655243, -0.33875802159309387, -0.46522510051727295, -0.029503988102078438, 0.1641719788312912, -0.3978472352027893, 0.25270470...
len(string) == 1: storage.append(prefix + string) # <----- else: for i in range(len(string)): getPermutations(string[:i]+string[i+1:], storage, prefix+string[i]) storage = [] getPermutations("abcd", storage) for permutation in storage: print permutation ``` (Please don't care about ineffici...
[ -0.02698950096964836, -0.26979875564575195, 0.09145999699831009, -0.3122910261154175, -0.24238033592700958, 0.10600979626178741, 0.23207111656665802, -0.4849243462085724, -0.07213890552520752, -0.19906960427761078, -0.08675776422023773, 0.6494091153144836, -0.41422808170318604, 0.112463586...
# <----- else: for i in range(len(string)): getPermutations(string[:i]+string[i+1:], prefix+string[i]) for permutation in getPermutations("abcd"): print permutation ``` This code does *not* work (the function behaves like an empty generator). Am I missing something? Is there a way to turn the a...
[ -0.07454052567481995, -0.03891194239258766, -0.032327909022569656, -0.2061775028705597, -0.0017079125391319394, -0.09026990830898285, 0.4461759626865387, -0.42330631613731384, -0.16582204401493073, -0.12771786749362946, -0.19758842885494232, 0.5236770510673523, -0.6215001344680786, 0.02774...
for i in xrange(len(string)): for perm in getPermutations(string[:i] + string[i+1:], prefix+string[i]): yield perm ``` Or without an accumulator: ``` def getPermutations(string): if len(string) == 1: yield string else: for i in xrange(len(string)): for ...
[ -0.3219134509563446, -0.324837327003479, 0.4518692195415497, -0.25100940465927124, -0.2942817509174347, 0.26847249269485474, 0.14963221549987793, -0.7291616201400757, -0.04576938971877098, -0.021362178027629852, -0.4999445080757141, 0.42590653896331787, -0.4357493221759796, -0.071038126945...
yield string[i] + perm ```
[ -0.22628583014011383, 0.04874493554234505, 0.14274494349956512, -0.24907194077968597, -0.4684032201766968, 0.036746811121702194, 0.2500661015510559, -0.20923320949077606, 0.07378555089235306, -0.01168942078948021, -0.29105886816978455, 0.48206740617752075, -0.08822237700223923, 0.089153409...
I need to write an extension method on a byte[]. Is that possible? yes, just do : ``` public static class Extensions { public static void Method(this byte[] current) { } } ```
[ 0.09346933662891388, 0.2517848312854767, 0.38988128304481506, -0.10165469348430634, 0.4710902273654938, 0.08978890627622604, -0.0279129296541214, 0.020994294434785843, -0.41622886061668396, -0.36702367663383484, -0.20910386741161346, 0.5121169686317444, -0.3566167950630188, 0.2924686968326...
I have some code that raises `PropertyChanged` events and I would like to be able to unit test that the events are being raised correctly. The code that is raising the events is like ``` public class MyClass : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected void N...
[ 0.0740194246172905, -0.268716961145401, 0.269051194190979, 0.06554803997278214, 0.3439386487007141, -0.031022658571600914, 0.2007337361574173, -0.2064945548772812, -0.2842846214771271, -0.4003336429595947, -0.09046510607004166, 0.8187876343727112, -0.03828490898013115, 0.07214298844337463,...
public string MyProperty { set { if (_myProperty != value) { _myProperty = value; NotifyPropertyChanged("MyProperty"); } } } } ``` I
[ -0.12484283745288849, 0.036346204578876495, 0.4053434133529663, -0.15812724828720093, 0.42410504817962646, 0.07820326089859009, 0.3681034445762634, 0.04268275946378708, 0.10055233538150787, -0.4759769141674042, -0.4229116141796112, 0.5306339859962463, -0.3193448483943939, 0.291285008192062...
get a nice green test from the following code in my unit tests, that uses delegates: ``` [TestMethod] public void Test_ThatMyEventIsRaised() { string actual = null; MyClass myClass = new MyClass(); myClass.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e) { actual = e.Pro...
[ 0.2480478286743164, -0.16974788904190063, 0.1516413390636444, 0.19785380363464355, 0.5040380358695984, -0.06874752044677734, 0.1450338065624237, -0.44381266832351685, -0.1082097738981247, -0.5386501550674438, -0.1903730183839798, 0.646932065486908, -0.23344144225120544, -0.0402934886515140...
if (_myProperty != value) { _myProperty = value; NotifyPropertyChanged("MyProperty"); MyOtherProperty = "SomeValue"; } } } public string MyOtherProperty { set { if (_myOtherProperty != value) {
[ -0.2739734649658203, -0.052940621972084045, 0.49593618512153625, -0.19213134050369263, 0.5949642062187195, 0.24496960639953613, 0.2964427173137665, -0.03145987167954445, 0.10427883267402649, -0.3758375346660614, -0.42669808864593506, 0.5087223649024963, -0.1684550791978836, 0.1954928040504...
_myOtherProperty = value; NotifyPropertyChanged("MyOtherProperty"); } } } ``` My test for the event fails - the event that it captures is the event for the MyOtherProperty. I'm pretty sure the event fires, my UI reacts like it does, but my delegate only captures the last event to fire. So I'...
[ 0.18088173866271973, 0.18387101590633392, 0.18581260740756989, 0.20787110924720764, 0.09823723882436752, -0.19628334045410156, 0.341989666223526, -0.23450197279453278, -0.24486489593982697, -0.46102166175842285, -0.05325743928551674, 0.5385329127311707, -0.2538670301437378, 0.0871268585324...
providing you want your test to ask "What is the last event that was raised?" Your code is firing these two events, in this order * Property Changed (... "My Property" ...) * Property Changed (... "MyOtherProperty" ...) Whether this is "correct" or not depends upon the purpose of these events. If you want to test ...
[ 0.3839554786682129, -0.21852746605873108, 0.07743903994560242, 0.04420550540089607, -0.00925648957490921, 0.10055641084909439, 0.33791008591651917, -0.500505268573761, -0.11284582316875458, -0.4761946499347687, -0.10403534024953842, 0.5739337205886841, -0.0777650773525238, 0.06955964118242...
{ receivedEvents.Add(e.PropertyName); }; myClass.MyProperty = "testing"; Assert.AreEqual(2, receivedEvents.Count); Assert.AreEqual("MyProperty", receivedEvents[0]); Assert.AreEqual("MyOtherProperty", receivedEvents[1]); } ```
[ 0.0015816715313121676, -0.0034613243769854307, 0.3835817277431488, -0.09617242217063904, -0.019857313483953476, 0.17844052612781525, 0.6745024919509888, -0.500848114490509, 0.09795038402080536, -0.2354673147201538, -0.23784559965133667, 0.5862777829170227, -0.04949918016791344, 0.368955880...
I have heard that LINQ2SQL has been written to support multiple database vendor providers however for internal political reasons at MS, only SQL Server has been supported. Is this a fair summary of the situation, and if so has a timetable been released as to when other databases will be supported? I am aware of Matt ...
[ 0.1540536880493164, 0.05876513943076134, 0.2612649202346802, 0.23285575211048126, 0.09568824619054794, -0.3050120174884796, -0.04204198345541954, 0.0718047097325325, -0.2196439951658249, -0.507598876953125, 0.08859270811080933, 0.3334542214870453, -0.17625944316387177, 0.08048190176486969,...
Entity Framework Provider for Oracle](http://code.msdn.microsoft.com/EFOracleProvider), and [here](http://code.msdn.microsoft.com/adonetefx/) are more examples about creating Data Providers for EF.
[ 0.279092013835907, 0.124568872153759, 0.17602674663066864, 0.2800760269165039, -0.03997437655925751, -0.05479234457015991, -0.16923852264881134, -0.26190221309661865, -0.10494472086429596, -0.2889519929885864, -0.010448776185512543, 0.4132709801197052, -0.17839309573173523, 0.0241044089198...
I hear a lot of people talking about the revolution that is coming in programming due to multi-core processors and parallelism, but I can't shake the feeling that for most of us, CPU cycles aren't the bottleneck. Pretty much all of my programs have been I/O bound in one way or another (database, filesystem, network, us...
[ 0.5461096167564392, 0.28921234607696533, 0.08207859843969345, 0.3556027412414551, 0.31922271847724915, 0.017942743375897408, 0.0970422700047493, 0.44082385301589966, -0.32238712906837463, -0.75829017162323, 0.2276161015033722, 0.4406258761882782, -0.05362498015165329, 0.3761950135231018, ...
fairly specialized application domains. My general impression is that most programs are still I/O bound and that for most of our industry CPUs have been plenty fast for quite a while now. Am I off my rocker? What other application domains are CPU bound today? Do any of them include a large portion of the programming p...
[ 0.456230103969574, 0.09590703248977661, 0.11183027178049088, 0.49435359239578247, 0.047589290887117386, -0.09421016275882721, -0.15295127034187317, 0.17502586543560028, -0.4049658179283142, -0.4948205351829529, -0.3113718032836914, 0.7353440523147583, -0.04891154542565346, 0.07693962752819...
SaaS, most webpages, etc. As the personal computer becomes more and more a browser-based thin client for web applications, this industry will expand, as well as the need for more, and parallelized processing power on the backend. I could see gaming pushing parallel processing in personal computing.
[ 0.30666372179985046, 0.11173631250858307, 0.3071703612804413, 0.3495196998119354, 0.1462763547897339, -0.28257766366004944, -0.39472028613090515, 0.42650115489959717, -0.5516528487205505, -0.68663090467453, 0.021570401266217232, 0.35291600227355957, -0.02266107313334942, 0.2379655241966247...
Does anyone know a good SMTP/IMAP server library for C#? I only found some long abandoned projects. --- Only **SERVER SIDE** libraries, please no more posts about client libs. Thanks, Fionn I am working on a project where I need to receive a mail via SMTP on the local network (a legacy application is sending a mail...
[ 0.11766792088747025, -0.20135504007339478, -0.058540768921375275, -0.0023627213668078184, -0.40949496626853943, 0.024164769798517227, 0.45673561096191406, 0.21570691466331482, -0.21711400151252747, -0.709245502948761, 0.012960710562765598, -0.09467244893312454, -0.29138270020484924, 0.2261...
to an object for easy inspection. I had to revise it to raise an event when a message was received. [SmtpServer](http://cainosullivan.com/smtpserver/): Modern design using .NET TPL and Implements STARTTLS. Source code does not seem readily available. Provides a few hooks when message is received but appears to hand yo...
[ 0.4441891312599182, -0.17306631803512573, 0.08428698778152466, -0.2598368525505066, -0.05276988074183464, -0.06686295568943024, 0.3400294780731201, -0.07254394888877869, -0.5872727632522583, -0.5143604278564453, -0.09226151555776596, -0.16357697546482086, -0.2593390941619873, 0.04064277186...
First, a couple operating parameters: * .NET development using Visual Studio 2005/2008 * TortoiseSVN client I've only primarily worked with Visual Source Safe and SourceGear Vault source control systems. In each, I map the root of the repository to a local working directory. For example: ``` $/ --> C:\source ``` ...
[ 0.08932703733444214, -0.0210565272718668, 0.15541556477546692, -0.13681089878082275, -0.032740481197834015, 0.2209869772195816, 0.4601670205593109, -0.001217584707774222, -0.36837708950042725, -0.596821129322052, -0.1215628907084465, 0.9215879440307617, 0.2678373157978058, 0.08397869020700...
Latest" (i.e. svn checkout) the client will automatically create the complete directory hierarchy for me, mirroring the structure on my local disk. Thus when I get latest of ``` $/foo/bar/project1 ``` it is created on the drive at ``` C:\source\foo\bar\project1 ``` In subversion, when I check out a directory, I m...
[ 0.2300536334514618, 0.05341094359755516, 0.9077820777893066, -0.04281346872448921, 0.30395951867103577, -0.08233513683080673, 0.04588814824819565, -0.016658181324601173, -0.16594280302524567, -0.9673576951026917, -0.19309496879577637, 0.6239446401596069, -0.03519248217344284, 0.16097107529...
repository directory down in the hierarchy such that it will be created in a matching local working copy directory structure without all the manual intervention?** This isn't a problem with a small repository, but in most cases, I don't need a large percentage of the source repository. It's imperative that the physica...
[ 0.3457103371620178, 0.20369134843349457, 0.1992817372083664, 0.06877662241458893, -0.06275711208581924, 0.09542464464902878, 0.20054708421230316, 0.09026141464710236, -0.598868727684021, -0.6055753827095032, -0.02296721190214157, 0.90619957447052, 0.27809274196624756, 0.35155612230300903, ...
do what I'm looking for? I seemed to have found a suitable solution to my problem. **Using TortoiseSVN, the "Update item to revision" action within the repo browser can be used to locally reconstruct the repository's folder structure for an arbitrary repo path.** Detailed steps are: 1. Create a local folder to be th...
[ 0.07293381541967392, -0.34573298692703247, 0.5078664422035217, 0.0008102929568849504, 0.02326059341430664, 0.22574029862880707, 0.5112715363502502, -0.19471228122711182, -0.486561119556427, -0.5094358325004578, -0.2919575273990631, 0.7315089106559753, -0.006301702465862036, -0.007780008018...
on desired folder, choose "Update item to revision" 6. Leave defaults of HEAD revision and "Working copy" update depth, click OK This will update your working copy with the contents of the chosen repo path including all the parent directories up to the start of the checkout working copy thus mirroring the folder hiera...
[ -0.028392162173986435, -0.17302370071411133, 0.8375540375709534, 0.22134973108768463, 0.016572024673223495, 0.032448600977659225, 0.14864273369312286, 0.007764983456581831, -0.22333618998527527, -0.7251745462417603, -0.2500677704811096, 0.674260139465332, 0.05262278392910957, 0.14545471966...
getting all contents of the chosen path. (Rather than having to explicitly select "Fully recursive".)
[ -0.3873142898082733, -0.18638207018375397, 0.0892094224691391, 0.2831101417541504, -0.013267042115330696, -0.08989483118057251, 0.5678497552871704, 0.007881334982812405, -0.1015767902135849, -0.6516825556755066, -0.563850462436676, 0.4261006712913513, -0.2603550851345062, -0.26885440945625...
How can you programmatically tell an HTML `select` to drop down (for example, due to mouseover)? You can't do this with a HTML select tag, but you can do it with JavaScript *and* HTML. There are variety of existing controls that do this - for instance, the "suggest" list attached to the SO "interesting/ignored tag" ent...
[ 0.3829980492591858, -0.46130356192588806, 0.12128280103206635, 0.27190229296684265, 0.04377293586730957, -0.3132191300392151, 0.2181025594472885, -0.20459160208702087, -0.3250831067562103, -0.7290643453598022, 0.01155039295554161, 0.5368815064430237, -0.29487141966819763, -0.32771629095077...
I'm a fan of extension methods in C#, but haven't had any success adding an extension method to a static class, such as `Console`. For example, if I want to add an extension to `Console`, called '`WriteBlueLine`', so that I can go: ``` Console.WriteBlueLine("This text is blue"); ``` I tried this by adding a local, ...
[ 0.0033800292294472456, -0.015272121876478195, 0.4526493549346924, -0.19210708141326904, 0.29242977499961853, 0.24144403636455536, -0.0508204847574234, 0.0044680493883788586, 0.23648688197135925, -0.8866562843322754, -0.27728891372680664, 0.6896899342536926, -0.4906298816204071, 0.190124258...
Console.ResetColor(); } } ``` This didn't add a '`WriteBlueLine`' method to `Console`... am I doing it wrong? Or asking for the impossible? No. Extension methods require an instance variable (value) for an object. You can however, write a static wrapper around the `ConfigurationManager` interface. If you implemen...
[ -0.05028850585222244, -0.2260536104440689, 0.5629510879516602, 0.05958932638168335, 0.15977483987808228, -0.017689596861600876, -0.019985735416412354, -0.1275453418493271, -0.16353203356266022, -0.6536231637001038, -0.10318303853273392, 0.8432377576828003, -0.3293909728527069, 0.3295060694...
ConfigurationManager.GetSection( name ); } ..... public static ConfigurationSection GetWidgetSection() { return GetSection( "widgets" ); } } ```
[ 0.16380643844604492, -0.38790059089660645, 0.28931060433387756, 0.20550020039081573, 0.11121520400047302, -0.08536294102668762, -0.11036857962608337, -0.12444183975458145, -0.33761516213417053, -0.6262742280960083, -0.2588627338409424, 0.6365435123443604, -0.197276309132576, 0.308703273534...
Is it possible to add an image overlay to a google map that scales as the user zooms? My current code works like this: ``` var map = new GMap2(document.getElementById("gMap")); var customIcon = new GIcon(); customIcon.iconSize = new GSize(100, 100); customIcon.image = "/images/image.png"; map.addOverlay(new GMarker...
[ 0.10765020549297333, -0.32418394088745117, 1.0485889911651611, 0.2374783158302307, -0.24903079867362976, -0.08020167052745819, 0.11632249504327774, -0.19068549573421478, -0.3245652914047241, -0.6952176690101624, 0.2696458697319031, 0.7514830231666565, -0.16098015010356903, -0.3404987156391...
thing ever. It even has a method to allow you to drag the image and place it in development mode for easy lining up.
[ 0.4224081337451935, -0.4461885392665863, 0.6485415697097778, 0.5654293298721313, 0.5713698863983154, -0.10744163393974304, -0.12614434957504272, 0.5615278482437134, -0.0892971083521843, -0.14989128708839417, 0.2560344338417053, 0.5687410831451416, 0.014344282448291779, 0.14654192328453064,...
I have a script to extract certain data from a much bigger table, with one field in particular changing regularly, e.g. ``` SELECT CASE @Flag WHEN 1 THEN t.field1 WHEN 2 THEN t.field2 WHEN 3 THEN t.field3 END as field, ...[A bunch of other fields] FROM table t ``` However, the issue is now I want to d...
[ 0.21689340472221375, 0.032780490815639496, 0.06457463651895523, -0.12947945296764374, -0.29347532987594604, 0.16204996407032013, -0.027909433469176292, -0.23839452862739563, -0.35412687063217163, -0.8282519578933716, -0.03538593277335167, 0.2239738553762436, -0.09727858006954193, 0.1437151...
the right field. One possible solution I was playing around with a bit (mostly to see what would happen) is to dump the contents of the script into a table function which has the flag passed to it, and then use a SELECT query on the results of the function. I've managed to get it to work, but it's significantly slower...
[ 0.05218930169939995, 0.07341943681240082, 0.02826760895550251, 0.12943048775196075, 0.1276153177022934, 0.16696909070014954, 0.18367677927017212, -0.2215769737958908, -0.10751154273748398, -0.49059903621673584, 0.05852250009775162, 0.20065009593963623, -0.05816807970404625, -0.220686644315...
from the right cache table to perform the calculation. The obvious, though incorrect, response would be something like ``` SELECT CASE @Flag WHEN 1 THEN table1.field WHEN 2 THEN table2.field WHEN 3 THEN table3.field END as field, ...[The various calculated fields] FROM table1, table2, table3 ``` Unfor...
[ 0.2360975444316864, 0.17157402634620667, 0.2444411665201187, -0.0972917303442955, -0.1454525738954544, -0.13619591295719147, 0.3950458765029907, -0.10879629105329514, -0.033407315611839294, -0.6380395889282227, -0.15839560329914093, 0.3100188374519348, -0.4340371787548065, 0.21980634331703...
Or an alternative solution, that's still reasonably speedy? EDIT: Whether it's a good reason or not, the idea I was trying to implement was to not have three largely identical queries, that differ only by table - which would then have to be edited identically whenever a change is made to the logic. Which is why I've a...
[ 0.2455843687057495, -0.12146149575710297, 0.05184570327401161, -0.055605851113796234, -0.19047749042510986, -0.03719690814614296, 0.216274693608284, -0.28618571162223816, -0.24252967536449432, -0.5190831422805786, -0.10594861954450607, 0.3277498185634613, -0.36587223410606384, -0.196392625...
fields], @Flag as flag FROM table t ``` Then base the decision making on the last field. A lot simpler, and probably should have occurred to me in the first place.
[ 0.1422886848449707, -0.036068905144929886, 0.46218785643577576, -0.04892299324274063, -0.24121958017349243, 0.0893157348036766, -0.36492663621902466, -0.12706804275512695, -0.12426440417766571, -0.6206585168838501, -0.06443508714437485, 0.49397245049476624, -0.3606146275997162, -0.16905562...
I was browsing the [Hidden Features of C#](https://stackoverflow.com/questions/9033/hidden-features-of-c) question and thought I would try out one of the features I was unfamiliar with. Unfortunately I use Visual Studio 2005 and the feature in question was introduced later. Is there a good list for new features in C# 3...
[ 0.059773217886686325, 0.3259928226470947, -0.06575565040111542, -0.33952128887176514, -0.06503230333328247, 0.022319993004202843, 0.263572096824646, 0.04726342484354973, -0.27745652198791504, -0.4046250879764557, -0.11395130306482315, 0.6963011622428894, -0.3839982748031616, -0.05718027427...
}; ``` Similarly, instead of adding items individually, I can initialize types that implement IEnumerable like this: ``` List<string> list = new List<string> { "foo", "bar" }; ``` The new syntax for lambda expressions is also nice. Instead of typing this: ``` people.Where(delegate(person) { return person.Age >=...
[ 0.09879624098539352, -0.011270029470324516, 0.24403321743011475, -0.18354323506355286, 0.052081670612096786, 0.19541706144809723, 0.2311684787273407, -0.3518132269382477, -0.3696940839290619, -0.6627320647239685, -0.34513506293296814, 0.5651135444641113, -0.2902888357639313, -0.03713468834...
can create anonymous classes on the fly, like this: ``` var book = new { Title: "...", Cost: "..." }; ```
[ 0.36964908242225647, -0.09873802959918976, -0.029651889577507973, 0.21132607758045197, 0.1450059860944748, -0.2724277675151825, 0.3015880286693573, -0.00003282657780800946, 0.22102931141853333, -0.35930344462394714, -0.22452835738658905, 0.740168035030365, -0.5638514161109924, 0.1921442747...
``` '''use Jython''' import shutil print dir(shutil) ``` There is no, shutil.move, how does one move a file with Jython? and while we at it, how does one delete a file with Jython? `os.rename()` to move, and `os.unlink()` to delete -- just like Python pre-`shutil`.
[ -0.4538370966911316, -0.1296214610338211, 0.3941141366958618, -0.23677849769592285, -0.21381786465644836, -0.0860462561249733, 0.07705790549516678, 0.15803636610507965, -0.029288465157151222, -0.45835036039352417, -0.46832209825515747, 0.6479927897453308, -0.5586768388748169, 0.04711834713...
I've been using virtualenv lately while developing in python. I like the idea of a segregated development environment using the **--no-site-packages** option, but doing this while developing a PyGTK app can be a bit tricky. The PyGTK modules are installed on Ubuntu by default, and I would like to make a virtualenv (wit...
[ 0.22545281052589417, -0.15455715358257294, 0.2929283678531647, 0.06876041740179062, -0.1484602838754654, -0.2288883924484253, 0.15116211771965027, 0.33871304988861084, -0.21456275880336761, -0.7782100439071655, -0.2945336401462555, 0.748356819152832, -0.4732908010482788, 0.0240188818424940...
ln -s /usr/lib/pymodules/python2.6/pygtk.py $ ln -s /usr/lib/pymodules/python2.6/cairo/ $ python >>> import pygtk >>> import gtk ```
[ -0.2631620764732361, 0.017755143344402313, 0.1495063155889511, -0.2736196219921112, 0.012159133329987526, 0.12723445892333984, -0.1727580726146698, -0.06828421354293823, -0.0832533910870552, -0.49255093932151794, -0.5965469479560852, 0.48067542910575867, -0.6233317852020264, -0.22780023515...
Why don't we see C-like languages that allow for callables with polymorphism in the return type? I could see how the additional type inference would be a hurdle, but we have [plenty of languages](http://en.wikipedia.org/wiki/Type_inference) with full-fledged type inference systems (that work for varying levels of "work...
[ 0.07007529586553574, 0.03269636631011963, -0.31061235070228577, -0.0011048543965443969, -0.13371947407722473, -0.33999791741371155, 0.16569067537784576, -0.005951715167611837, -0.22896823287010193, -0.3309726119041443, -0.14901939034461975, 0.6212599277496338, -0.749613881111145, -0.082924...
but for C++ here's the answer (pretty much from the horse's mouth): Function return types don't come into play in overload resolution simply because Stroustrup (I assume with input from other C++ architects) wanted overload resolution to be 'context independent'. See 7.4.1 - "Overloading and Return Type" from the "C++...
[ -0.1454041749238968, 0.02773677557706833, -0.1852673888206482, 0.011746635660529137, -0.5766307711601257, 0.22979889810085297, 0.1344710737466812, -0.4121539294719696, -0.1363975703716278, -0.32867252826690674, 0.23695266246795654, 0.8307124972343445, -0.4116835296154022, -0.17643547058105...
without using the result or the result would be used as part of a larger expression. One factor that I'm sure came into play when they decided this was that if the return type was part of the resolution there would be many calls to overloaded functions that would need to be resolved with complex rules or would have to ...
[ -0.07945220917463303, 0.1691373884677887, -0.001032329397276044, -0.032846029847860336, -0.284414678812027, -0.2303660660982132, 0.41303011775016785, -0.4048689305782318, -0.11056151986122131, -0.01538067776709795, -0.04208334907889366, 0.6108237504959106, -0.5179128050804138, 0.0488129816...
Excuse me if I'm off on my terminology, I only have around 2.4 years of programming experience, mostly in .NET. Currently I'm one of two .NET developers in a mainframe shop, the other developer set the standards and is a great coder with a lot more experience plus a CS degree(I am 100% self taught). We use custom co...
[ 0.7304753661155701, 0.1442725956439972, 0.16075368225574493, 0.15730342268943787, -0.43851685523986816, -0.2392285317182541, 0.1609797179698944, 0.14752496778964996, -0.29088106751441956, -0.6498286724090576, 0.07785805314779282, 0.3286048471927643, -0.1778821051120758, 0.3021162748336792,...
business layers for any objects we'd like, plus it handles logical deletes et cetera. When performance is what you optimize for, when can you justify NOT using a custom collection and writing a custom sort for it? Currently we use hard coded sorts because everything we've seen is a good deal slower, since most other ...
[ 0.35896700620651245, -0.014034495688974857, -0.02258158102631569, 0.2266184538602829, -0.08355411887168884, -0.004235792439430952, 0.16693195700645447, -0.10779612511396408, -0.3741025924682617, -0.6196983456611633, -0.02811596356332302, 0.3363712430000305, 0.02252802439033985, -0.09588378...
to believe? Being that I am still in my infant stages of my development career, I'd say the next logical step is for me to start benchmarking things myself, but I wanted to get the opinion of other professionals as well....So, how does everyone else do it? Am one of the only people who actually strictly use custom coll...
[ 1.0647082328796387, -0.017897387966513634, -0.11693839728832245, 0.29637378454208374, -0.16983193159103394, 0.0007866956293582916, 0.4371565580368042, 0.038171667605638504, -0.40764883160591125, -0.30460435152053833, 0.3029133379459381, 0.7553978562355042, 0.39067837595939636, -0.095037236...
a custom collection class that inherits List(Of T) and also implements IComparable to handle sorting. When it comes to optimising and collections you should first look at algorithmic complexity. A simple example is - if you have a list of objects, and you are constantly looking stuff up in that list, and it gets quite...
[ 0.10287562012672424, -0.4469146430492401, 0.02143421769142151, 0.45982635021209717, -0.17103362083435059, -0.02173566073179245, -0.05017779767513275, -0.3234177529811859, -0.6496145129203796, -0.731921374797821, -0.09935595840215683, 0.5202847719192505, -0.3042204976081848, 0.0998602882027...
not already done so (if you're entirely unfamiliar with it, [check out the wikipedia article](http://en.wikipedia.org/wiki/Asymptotic_complexity)) If you're using an associative collection, like Dictionary, you should also check that you are using the best implementation for GetHashCode() on the objects in the collect...
[ 0.3263755142688751, -0.1135479211807251, -0.021159525960683823, 0.24096021056175232, -0.007279100362211466, -0.33827245235443115, 0.2317250669002533, -0.22129938006401062, -0.49249792098999023, -0.556259036064148, -0.1805056780576706, 0.5571696162223816, 0.005763195920735598, -0.0795314460...
choose from, which means you can pick the right one more of the time. As yet I have not come across a case where I have had to write a custom collection class due to poorly performing built in (or PowerCollection) collections (other than the older, pre-generic, versions). It's my feeling that if, having made sure you ...
[ 0.7478057742118835, -0.43236279487609863, 0.033099230378866196, 0.1736832708120346, -0.055544350296258926, -0.26392289996147156, 0.09753111749887466, 0.07187191396951675, -0.4023178219795227, -0.6823003888130188, -0.15201020240783691, 0.6455803513526917, -0.040305543690919876, 0.3039081394...
I read somewhere that NTP is based on UDP and there's no security built with NTP communication so it is easy to spoof NTP responses. Is it true? Wouldn't that be a major security issue since most of the servers out there depend on NTP to sync their clock? here is an [interesting article](http://securityvulns.com/adviso...
[ 0.6388447284698486, -0.07737221568822861, -0.03837186470627785, 0.1017860472202301, -0.06256972998380661, -0.30091387033462524, 0.1659974604845047, 0.3721561133861542, -0.487498939037323, -0.2544020116329193, 0.26776963472366333, 0.32993391156196594, -0.18711797893047333, 0.258152097463607...
I've always been curious to see if I can show, hide or change a NotifyIcon created by another application via a C# application. Could someone please post an example on how to do this? :) To modify icons in the systray, you can use [Shell\_NotifyIcon](http://msdn.microsoft.com/en-us/library/bb762159.aspx) Win32 API ([P...
[ 0.26438531279563904, -0.050979744642972946, 0.5269386768341064, 0.07569671422243118, -0.13481423258781433, 0.13758724927902222, 0.2225978970527649, -0.06029140204191208, -0.298390656709671, -0.540912389755249, 0.13376368582248688, 0.7269343733787537, -0.41248512268066406, -0.00360369449481...
making calls with each handle and each number between 0 and 5000 thousands for example, but your chances of success are very slim.
[ 0.3908478319644928, -0.03368692100048065, 0.2622954249382019, 0.24347350001335144, 0.18029680848121643, 0.18340496718883514, 0.35178783535957336, -0.4539172947406769, -0.2817870080471039, -0.41748616099357605, 0.16128480434417725, 0.3520965576171875, 0.09374891966581345, -0.013059623539447...
I'm trying to pick a good CMS that isn't a portal. All of my research as lead me to believe SilverStipe is the best option. I'd like some opinions/impressions. Thanks for any thoughts you have. edit: I've decided to try it out. I'll post my own answer after I've had some time with it. It seems like based on the lack ...
[ 0.31862273812294006, -0.3199900686740875, 0.523653507232666, 0.1462317407131195, -0.4717040956020355, 0.052476149052381516, 0.2857794463634491, 0.4652351438999176, -0.7598852515220642, -0.7591804265975952, -0.048710040748119354, -0.1338914930820465, -0.09381961822509766, 0.4221866130828857...
all the building. It also makes data sharing harder. So be wary if you have A LOT of sites like we do that share data. Other than that...actually developing a site/CMS in SilverStripe is an OO dream come true. No more coding some app feature and then coding some admin and then bug fixing them both and having one work...
[ 0.7167224287986755, 0.20275411009788513, 0.07502997666597366, 0.43278634548187256, -0.15602076053619385, -0.16071492433547974, 0.39650535583496094, 0.4811408519744873, -0.38320204615592957, -0.5569376945495605, 0.1534513533115387, 0.2001221477985382, -0.03559986874461174, -0.12780947983264...
I am like WTF...I just search or browse the code and there's already a function to do exactly what I wanted. Support: no problems here. There's a forum which is answered when intelligent questions are asked and not already answered. This can only improve in time with more people getting on board and Ingo's SS book ge...
[ 0.5467394590377808, 0.22892701625823975, 0.13363657891750336, -0.12267785519361496, -0.6434555649757385, -0.5695330500602722, 0.5894635915756226, 0.38916999101638794, -0.19043046236038208, -0.5062879920005798, -0.2090674191713333, 0.3974887728691101, 0.00547120301052928, -0.214384734630584...
I'm writing a utility in Python that will attach changed files in Subversion to an email and send it when a subset of folders that are under source control in SVN have been changed. I am using the pysvn library to access the repository. I have a copy of the files on my local file system and I do an update to check if ...
[ 0.36946049332618713, 0.14056621491909027, 0.4789430499076843, -0.20600605010986328, -0.13173718750476837, -0.0054835304617881775, 0.2735428214073181, 0.11226993054151535, -0.28974515199661255, -0.8707971572875977, -0.007008634973317385, 0.32453522086143494, -0.2092743217945099, 0.120950728...
following to do the job: ``` def formatPaths(self, paths): newPaths = list() for path in paths: path = path[len(self.basePath):] path = path.replace("/", "\\") newPaths.append(path) return newPaths ``` self.basePath would be something like "/trunk/project1" and I'm looking to just...
[ 0.02324121631681919, -0.26706624031066895, 0.3722524344921112, -0.041502609848976135, -0.09399962425231934, -0.12231861799955368, 0.3419809639453888, -0.23423196375370026, -0.2830277681350708, -0.7582216858863831, -0.06830354034900665, 0.7986215949058533, -0.26503273844718933, -0.120210401...
change the loop variable inside the loop. for fun, try the generator expression (or keep the listcomp). ``` baselen = len(self.basePath) return (path[baselen:].replace("/", "\\") for path in paths) ``` Edit: `lstrip()' is not relevant here. From the [manual](http://docs.python.org/library/stdtypes.html#string-method...
[ 0.18573229014873505, -0.08801090717315674, 0.4076635539531708, -0.24115104973316193, -0.0030921963043510914, 0.0817137286067009, 0.37540575861930847, -0.2892577648162842, -0.07518109679222107, -0.39591971039772034, -0.00411482946947217, 0.3887381851673126, -0.6579998731613159, 0.0715378522...
What are the usual methods to compare two polygons for similarity? Vertices are in 2D. You will find [some methods exposed here](http://www.cs.princeton.edu/courses/archive/spr00/cs598b/lectures/polygonsimilarity/polygonsimilarity.pdf). * Turning function * Graph matching * Shape signature by deformation It is used i...
[ -0.40908801555633545, -0.12865915894508362, 0.241858571767807, 0.26037925481796265, -0.49261772632598877, 0.467622846364975, -0.30802175402641296, -0.05107640475034714, -0.5078216195106506, -0.6702516078948975, 0.05208703875541687, 0.22334393858909607, 0.04148979112505913, 0.30688458681106...
I'm looking at stdint.h and given that it has uint16\_t and uint\_fast16\_t, what is the use for uint\_least16\_t what might you want that couldn't be done equally well with one of the other two? Say you're working on a compiler with: * `unsigned char` is 8 bits * `unsigned short` is 32 bits * `unsigned int` is 64 bit...
[ 0.06415999680757523, 0.005345724523067474, 0.11994247883558273, 0.20436549186706543, -0.26441091299057007, 0.13516302406787872, 0.10572655498981476, 0.014575161971151829, -0.11725795269012451, -0.8945247530937195, 0.2664884924888611, 0.6390051245689392, -0.2061479240655899, -0.084795571863...
size variants all the time. That's what people want. The 'least' and 'fast' versions I've seen used pretty close to never (it's possible that it was only in example code - I'm really not sure).
[ 0.06289872527122498, -0.25760868191719055, 0.06971505284309387, 0.05099131539463997, -0.3133988380432129, -0.005318057723343372, 0.2207082062959671, 0.3927108943462372, -0.7073521614074707, -0.5686514377593994, -0.19169606268405914, 0.3944753408432007, -0.2210131287574768, -0.1369268447160...
OK, I have a somewhat complicated system in C++. In a nutshell, I need to add a method to a third party abstract base class. The third party also provides a ton of derived classes that also need the new functionality. I'm using a library that provides a standard Shape interface, as well as some common shapes. ``` cla...
[ 0.4600185751914978, -0.18497854471206665, 0.23072843253612518, -0.20812059938907623, 0.16395267844200134, 0.07062948495149612, 0.07906333357095718, -0.1505378633737564, 0.19501778483390808, -0.7954409718513489, -0.1123829260468483, 0.5237467885017395, -0.21930859982967377, 0.17520764470100...
virtual double GetPerimeter() const = 0; private: ... }; class Square : public Shape { public: Square(position, side_length); ... }; class Circle, Rectangle, Hexagon, etc ``` Now, here's my problem. I want the Shape class to also include a GetArea() function. So it seems like I should just do a...
[ 0.010370923206210136, -0.24922354519367218, 0.5527857542037964, -0.10115645080804825, -0.20889075100421906, 0.46931567788124084, 0.19637882709503174, -0.4289049208164215, -0.08277308940887451, -0.7246425151824951, -0.035663291811943054, 0.5128940939903259, -0.2351837158203125, 0.0666522532...
and Square. Well, as you can see, I have now created the dreaded [diamond inheritance problem](http://en.wikipedia.org/wiki/Diamond_problem). This would easily be fixed if the third party library used [virtual inheritance](http://en.wikipedia.org/wiki/Virtual_inheritance) for their Square, Circle, etc. However, getting...
[ 0.5055927038192749, 0.04996025189757347, 0.12512774765491486, -0.098851278424263, -0.3433398902416229, 0.047196757048368454, 0.04912850260734558, -0.4691879451274872, -0.36690807342529297, -0.4720076024532318, 0.27384480834007263, 0.5002369284629822, -0.16297726333141327, 0.229135781526565...
cast will always work. And the rest is just like in your example.
[ 0.6522246599197388, -0.11785056442022324, -0.01896723546087742, 0.006051862612366676, 0.1697375774383545, 0.2673259973526001, 0.2271675318479538, -0.2775455117225647, -0.08618053048849106, -0.5031752586364746, 0.09377847611904144, 0.839718222618103, -0.07754625380039215, -0.195727765560150...