Id
int64
4
8.51M
PostTypeId
int64
1
7
AcceptedAnswerId
int64
7
75.5M
ParentId
int64
4
41.8M
Score
int64
-208
27.7k
ViewCount
int64
11
12.4M
Body
stringlengths
0
45k
Title
stringlengths
2
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
225
CreationDate
stringdate
2008-07-31 21:42:52
2011-12-14 18:48:47
LastActivityDate
stringdate
2008-08-01 12:19:17
2023-03-05 04:40:26
LastEditDate
stringdate
2008-08-01 13:54:25
2023-03-05 03:12:45
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
-1
21.1M
Tags
listlengths
1
6
26,176
1
26,270
null
25
16,945
Does your work environment use Harvest SCM? I've used this now at two different locations and find it appalling. In one situation I wrote a conversion script so I could use CVS locally and then daily import changes to the Harvest system while I was sleeping. The corp was fanatic about using Harvest, despite 80% of the ...
Why is Harvest being purchased at all?
CC BY-SA 2.5
0
2008-08-25T14:59:49.853
2012-11-22T14:04:18.570
2010-03-16T12:46:04.590
182,690
2,836
[ "version-control", "harvest" ]
26,173
1
null
null
16
36,624
I am looking for some JavaScript based component to be used as a course scheduler which would be a cross between Google Calendar and the login time. I do not know if the right term for this is but I shall describe this in more detail here. The widget would be used to enter date and times of a course, as an example i...
Is there a Scheduler/Calendar JS Widget library?
CC BY-SA 2.5
0
2008-08-25T14:57:02.450
2021-02-23T14:31:00.250
2021-02-23T14:31:00.250
542,251
370,899
[ "javascript", "calendar" ]
26,179
2
null
26,158
4
null
Usually a stack overflow is the result of an infinite recursive call (given the usual amount of memory in standard computers nowadays). When you make a call to a method, function or procedure the "standard" way or making the call consists on: 1. Pushing the return direction for the call into the stack(that's the nex...
null
CC BY-SA 2.5
null
2008-08-25T15:01:22.083
2008-08-25T15:01:22.083
null
null
2,695
null
26,147
1
31,912
null
71
95,378
I'd love to know if there is such a thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to `navigateto(fancy_url);`). I'd love to use Firefox or WebKit. Anybody tried this? : Please bear in mind that although it is possib...
Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?
CC BY-SA 3.0
0
2008-08-25T14:45:27.080
2017-11-27T19:09:50.637
2017-01-26T18:05:45.970
2,684
2,684
[ "c#", ".net", "winforms", "webkit", "gecko" ]
26,192
2
null
9,033
6
null
In reading the book on development of the .NET framework. A good piece of advice is not to use bool to turn stuff on or off, but rather use ENums. With ENums you give yourself some expandability without having to rewrite any code to add a new feature to a function.
null
CC BY-SA 2.5
null
2008-08-25T15:09:18.617
2008-08-25T15:09:18.617
null
null
2,469
null
26,200
2
null
25,174
2
null
I looked into it, and my coworker agrees that a heartbeat page call should work, you just have to make sure that the action invoked does reset the session timer (things like ajax field completion don't do this on their own).
null
CC BY-SA 2.5
null
2008-08-25T15:12:33.710
2008-08-25T15:12:33.710
null
null
2,567
null
26,185
2
null
26,025
1
null
If you're using lighthttpd, you can also use FastCGI for serving Django. I'm not sure how the speed compares to mod_wsgi, but if memory serves correctly, you get a couple of the benefits that you would get with mod_wsgi that you wouldn't get with mod_python. The main one being that you can give each application its o...
null
CC BY-SA 2.5
null
2008-08-25T15:06:06.783
2008-08-25T15:06:06.783
null
null
2,147
null
26,195
1
26,708
null
6
2,495
I've always wanted to be able to get a reasonably elegant way of getting vimdiff to work with a CVS controlled file. I've found numerous (somewhat hacky) scripts around the internet (best example [here](http://www.vim.org/tips/tip.php?tip_id=390)) that basically check out the file you are editing from CVS to a temp fil...
vimdiff and CVS integration
CC BY-SA 2.5
0
2008-08-25T15:10:27.380
2015-08-20T22:17:52.987
null
null
24
[ "vim", "cvs", "vimdiff" ]
26,204
2
null
26,176
6
null
I used Harvest during a short gig in the banking industry a few years ago. I agree that it was practically unusable, but the people in charge of QA seemed to love it.
null
CC BY-SA 2.5
null
2008-08-25T15:14:11.740
2008-08-25T17:38:57.023
2008-08-25T17:38:57.023
1,175
1,175
null
26,202
2
null
17,085
1
null
The problem with the System.Xml approach in my case was that it required too much code to build this simple XML fragment. I think I've found a compromise. ``` XmlDocument doc = new XmlDocument(); doc.InnerXml = @"<Where><Eq><Field Name=""FieldName""><Value Type=""Text"">/Value></Field></Eq></Where>"; XmlNode valueNode...
null
CC BY-SA 2.5
null
2008-08-25T15:13:16.233
2008-08-25T15:13:16.233
null
null
578
null
26,207
2
null
25,950
2
null
Matz ruby 1.8.6 is much slower when it comes to performance and 1.9 and JRuby do alot to speed it up. But the performance isn't such that it will prevent you from doing anything you want in a web application. There are many large Ruby on Rails sites that do just fine with the "slower interpreted" language. When you ...
null
CC BY-SA 2.5
null
2008-08-25T15:15:24.247
2008-08-25T15:15:24.247
null
null
1,295
null
26,209
2
null
26,196
4
null
To do it in place, you can use the RemoveAll method of the "List<>" class along with a custom "Predicate" class...but all that does is clean up the code... under the hood it's doing the same thing you are...but yes, it does it in place, so you do same the temp list.
null
CC BY-SA 2.5
null
2008-08-25T15:15:41.267
2008-08-25T15:15:41.267
null
null
194
null
26,211
2
null
26,196
4
null
You can use the [FindAll](http://msdn.microsoft.com/en-us/library/fh1w7y8z.aspx) method of the List, providing a delegate to filter on. Though, I agree with @[IainMH](https://stackoverflow.com/questions/26196/filtering-collections-in-c#26201) that it's not worth worrying yourself too much unless it's a huge list.
null
CC BY-SA 2.5
null
2008-08-25T15:16:23.090
2008-08-25T15:16:23.090
2017-05-23T11:47:13.790
-1
2,688
null
26,203
2
null
26,196
296
null
If you're using C# 3.0 you can use linq, which is way better and way more elegant: ``` List<int> myList = GetListOfIntsFromSomewhere(); // This will filter ints that are not > 7 out of the list; Where returns an // IEnumerable<T>, so call ToList to convert back to a List<T>. List<int> filteredList = myList.Where(x => ...
null
CC BY-SA 4.0
null
2008-08-25T15:13:51.927
2021-03-18T07:26:05.670
2021-03-18T07:26:05.670
11,047,824
2,695
null
26,181
2
null
26,137
20
null
ADO is an excellent way to access a database in VBScript/Classic ASP. ``` Dim db: Set db = Server.CreateObject("ADODB.Connection") db.Open "yourconnectionstring -> see connectionstrings.com" Dim rs: Set rs = db.Execute("SELECT firstName from Employees") While Not rs.EOF Response.Write rs("firstName") rs.MoveNe...
null
CC BY-SA 2.5
null
2008-08-25T15:04:33.867
2008-08-26T02:30:44.157
2008-08-26T02:30:44.157
245
245
null
26,210
2
null
26,196
8
null
You can use IEnumerable to eliminate the need of a temp list. ``` public IEnumerable<T> GetFilteredItems(IEnumerable<T> collection) { foreach (T item in collection) if (Matches<T>(item)) { yield return item; } } ``` where Matches is the name of your filter method. And you can use this like: ...
null
CC BY-SA 2.5
null
2008-08-25T15:16:03.107
2008-08-25T15:22:33.730
2008-08-25T15:22:33.730
31,505
31,505
null
26,196
1
26,203
null
184
352,543
I am looking for a very fast way to filter down a collection in C#. I am currently using generic `List<object>` collections, but am open to using other structures if they perform better. Currently, I am just creating a new `List<object>` and looping thru the original list. If the filtering criteria matches, I put a c...
Filtering collections in C#
CC BY-SA 4.0
0
2008-08-25T15:11:10.093
2022-01-11T12:55:58.717
2022-01-11T12:55:58.717
1,398,841
2,470
[ "c#", "collections", "filtering" ]
26,206
2
null
26,196
20
null
`List<T>` has a `FindAll` method that will do the filtering for you and return a subset of the list. MSDN has a great code example here: [http://msdn.microsoft.com/en-us/library/aa701359(VS.80).aspx](http://msdn.microsoft.com/en-us/library/aa701359(VS.80).aspx) EDIT: I wrote this before I had a good understanding of...
null
CC BY-SA 4.0
null
2008-08-25T15:14:40.303
2019-07-08T09:20:36.720
2019-07-08T09:20:36.720
4,925,121
2,191
null
26,225
2
null
12,516
0
null
As people have been mentioning previously, when you use expression trees parens are not necessary. The order of operations becomes trivial and obvious when you're looking at an expression tree. The parens are hints to the parser. While the accepted answer is the solution to one half of the problem, the other half - ac...
null
CC BY-SA 2.5
null
2008-08-25T15:21:17.853
2008-08-25T15:21:17.853
null
null
2,132
null
26,226
2
null
26,074
2
null
Not sure programatically, but [Process Explorer](http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) can tell you how much memory a .net AppDomain is using. Maybe they have some documentation out there about how they are querying that info.
null
CC BY-SA 2.5
null
2008-08-25T15:21:21.737
2008-08-25T15:21:21.737
null
null
1,874
null
26,229
1
27,059
null
1
2,235
Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)? Can it be done with Visio alone or do I need a plugin? What about other diagrams?
Visio and Forward-Engineering
CC BY-SA 2.5
null
2008-08-25T15:22:17.430
2010-04-23T21:44:33.657
2008-09-16T12:28:50.703
1,782
1,782
[ "c#", "visio", "forward-engineer" ]
26,228
2
null
2,123
4
null
As indicated by @Gatekiller and others, the correct solution is the <label> tag. Click-in-the-text is nice, but there is another reason to use the <label> tag: accessibility. The tools that visually-impaired people use to access the web need the <label>s to read-out the meaning of checkboxes and radio buttons. Without...
null
CC BY-SA 2.5
null
2008-08-25T15:21:39.787
2009-02-13T01:11:36.863
2009-02-13T01:11:36.863
383
2,230
null
26,233
1
26,238
null
64
76,476
Given a URL, what would be the most efficient code to download the contents of that web page? I am only considering the HTML, not associated images, JS and CSS.
Fastest C# Code to Download a Web Page
CC BY-SA 2.5
0
2008-08-25T15:23:05.273
2019-02-03T11:40:18.530
2008-09-12T21:14:12.817
-1
2,141
[ "c#" ]
26,236
2
null
26,230
3
null
Using computer management (an MMC snap-in. See Control Panel Administrative tools) you can see a list of all folders that are shared. You could delete the shares or change the permissions on the share to only allow access for certain people or groups.
null
CC BY-SA 2.5
null
2008-08-25T15:24:04.257
2008-08-25T15:24:04.257
null
null
636
null
26,230
1
26,236
null
1
882
Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice and tidy?
Revoke shared folders in windows
CC BY-SA 2.5
0
2008-08-25T15:22:19.193
2010-10-08T08:33:03.367
null
null
29
[ "windows", "networking", "directory", "shared", "smb" ]
26,217
2
null
23,209
2
null
Check this on [MSDN](http://msdn.microsoft.com/en-us/library/2kzt1wy3(VS.80).aspx): - - Note: "... so that the linker will use LIBCMT.lib to resolve external symbols" So you'll need a different set of libraries. How I went about finding out which libraries to link: 1. Find a configuration that does link, and ad...
null
CC BY-SA 2.5
null
2008-08-25T15:18:38.140
2008-08-25T15:18:38.140
2017-05-23T12:33:26.220
-1
1,163
null
26,238
2
null
26,233
70
null
``` public static void DownloadFile(string remoteFilename, string localFilename) { WebClient client = new WebClient(); client.DownloadFile(remoteFilename, localFilename); } ```
null
CC BY-SA 2.5
null
2008-08-25T15:24:22.883
2008-08-25T15:24:22.883
null
null
1,786
null
26,232
2
null
26,196
4
null
> > If you're using C# 3.0 you can use linq Or, if you prefer, use the special query syntax provided by the C# 3 compiler: ``` var filteredList = from x in myList where x > 7 select x; ```
null
CC BY-SA 2.5
null
2008-08-25T15:23:04.540
2008-08-25T15:23:04.540
null
null
2,597
null
26,237
2
null
26,233
29
null
[System.Net.WebClient](http://msdn.microsoft.com/en-us/library/system.net.webclient%28VS.80%29.aspx) From MSDN: ``` using System; using System.Net; using System.IO; public class Test { public static void Main (string[] args) { if (args == null || args.Length == 0) { throw new Appl...
null
CC BY-SA 2.5
null
2008-08-25T15:24:20.280
2008-08-25T15:24:20.280
null
null
2,134
null
26,235
2
null
26,230
1
null
On Windows XP, go to: ``` Administrative Tools > Computer Management > System Tools > Shared Folders > Shares ``` This page lists all shares and lets you remove them easily, in one place.
null
CC BY-SA 2.5
null
2008-08-25T15:23:33.697
2008-08-25T15:23:33.697
null
null
29
null
26,242
2
null
26,233
23
null
Use the WebClient class from System.Net; on .NET 2.0 and higher. ``` WebClient Client = new WebClient (); Client.DownloadFile("http://mysite.com/myfile.txt", " C:\myfile.txt"); ```
null
CC BY-SA 2.5
null
2008-08-25T15:25:36.610
2008-08-25T15:25:36.610
null
null
194
null
26,243
2
null
23,996
1
null
Not really. The layout has access to the page attributes rather than the other way. The easiest way to do what you want is to populate the SITE.page_defaults hash in your site's Rakefile (probably build.rake). Add something like the following: ``` SITE.page_defaults['title'] = "My awesome title" SITE.pa...
null
CC BY-SA 2.5
null
2008-08-25T15:25:59.247
2008-08-25T15:25:59.247
null
null
1,388,162
null
26,255
1
60,396
null
169
70,487
What JavaScript keywords (function names, variables, etc) are reserved?
Reserved keywords in JavaScript
CC BY-SA 3.0
0
2008-08-25T15:29:39.907
2021-01-28T11:57:03.727
2018-01-15T00:16:53.980
122,643
399
[ "javascript", "reserved-words" ]
26,253
2
null
26,229
0
null
To the best of my knowledge, Visio can only forward-engineer code from class models. As sequence diagrams only really show paths of communication between objects, I suspect that they do not contain the necessary information, except perhaps in trivial cases, for generating code. Objects with any sort of complex beh...
null
CC BY-SA 2.5
null
2008-08-25T15:29:33.857
2008-08-25T15:29:33.857
null
null
2,237
null
26,241
2
null
25,950
4
null
If scalability and performance are really important to you you can also check out [Ruby Enterprise Edition](http://www.rubyenterpriseedition.com). It's a custom implementation of the Ruby interpreter that's supposed to be much better about memory allocation and garbage collection. I haven't seen any objective metrics...
null
CC BY-SA 2.5
null
2008-08-25T15:24:45.303
2008-08-25T15:24:45.303
null
null
1,247
null
26,148
1
null
null
6
5,615
At my job, I have a clutch of six Windows services that I am responsible for, written in C# 2003. Each of these services contain a timer that fires every minute or so, where the majority of their work happens. My problem is that, as these services run, they start to consume more and more CPU time through each iteratio...
Windows Service Increasing CPU Consumption
CC BY-SA 3.0
0
2008-08-25T14:45:54.177
2011-09-15T15:44:58.403
2011-09-15T15:44:58.403
1,288
1,975,282
[ "c#", "nhibernate", "windows-services", ".net-1.1" ]
26,240
2
null
26,148
2
null
It's obviously pretty difficult to remotely debug you're unknown application... but here are some things I'd look at: 1. What happens when you only run one of the services at a time? Do you still see the slow-down? This may indicate that there is some contention between the services. 2. Does the problem always occur ...
null
CC BY-SA 2.5
null
2008-08-25T15:24:36.677
2008-08-25T15:24:36.677
null
null
1,314
null
26,265
2
null
26,111
1
null
Do you have .NET 1.1 and .NET 2.0 apps running on the web server? We had some instances of a similar nature around here and the resolution we found was to create two app pools, one for 1.1 apps and one for 2.0 apps and to assign each application accordingly.
null
CC BY-SA 2.5
null
2008-08-25T15:34:28.257
2008-08-25T15:34:28.257
null
null
71
null
26,260
1
26,310
null
13
13,007
The first time I load the website in the production web server, it start very slow, subsequent pages load very quickly (included the home page). I precompiled the site, but nothing changes. I don't have any code at Application start. I don't have cached items. Any ideas? How can I find out what is happening?
Asp.net website first start is very slow
CC BY-SA 2.5
0
2008-08-25T15:32:46.967
2014-12-07T15:53:42.853
null
null
2,385
[ "asp.net" ]
26,270
2
null
26,176
24
null
Chances are, your company has some sort of contract with CA - are you using a lot of other CA software in-house? Guess so!
null
CC BY-SA 2.5
null
2008-08-25T15:37:36.223
2008-08-25T17:39:29.707
2008-08-25T17:39:29.707
35
35
null
26,275
2
null
26,260
2
null
When you published the site, did you choose to make the website "updatable" in the publish website's settings or not? If I remember well, the aspx / ascx file need to be compiled as well, and if they are "updatable" then the first start will cause a recompile of those resources.
null
CC BY-SA 2.5
null
2008-08-25T15:39:12.130
2008-08-25T15:39:12.130
null
null
1,178
null
26,279
2
null
26,260
1
null
Have you turned on [tracing](http://msdn.microsoft.com/en-us/library/y13fw6we.aspx) in your web.config?
null
CC BY-SA 2.5
null
2008-08-25T15:42:02.733
2008-08-25T15:42:02.733
null
null
1,494
null
26,272
2
null
26,260
0
null
This sounds very much like background compiling; though if you're precompiling, that shouldn't be an issue. First thing I would look at is your ORM (if any). NHibernate, in particular, has a serious startup penalty, as it runs multiple compilers in the background at startup to turn each class in your data layer into i...
null
CC BY-SA 2.5
null
2008-08-25T15:38:02.557
2008-08-25T15:38:02.557
null
null
1,975,282
null
26,269
2
null
26,148
1
null
'Fraid this answer is only going to suggest some directions for you to look in, but having seen similar problems in .NET Windows Services I have a couple of thoughts you might find helpful. My first suggestion is your services might have some bugs in either the way they handle memory, or perhaps in the way they handle...
null
CC BY-SA 2.5
null
2008-08-25T15:37:33.460
2008-08-25T15:37:33.460
null
null
2,562
null
26,282
2
null
24,467
1
null
You could just perform the select on the original entity and make the association between the two objects "lazy = false". As long as the entities are mapped then both will be returned and you wont get a lazyloadingexception when trying to access the object. If you don't want to map "lazy=false" then you can also itera...
null
CC BY-SA 2.5
null
2008-08-25T15:45:33.647
2008-11-04T21:42:03.027
2008-11-04T21:42:03.027
1,143
1,143
null
26,301
1
26,337
null
27
9,393
What algorithm taught you the most about programming or a specific language feature? We have all had those moments where all of a sudden we know, just know, we have learned an important lesson for the future based on finally understanding an algorithm written by a programmer a couple of steps up the evolutionary ladde...
Your favourite algorithm and the lesson it taught you
CC BY-SA 2.5
0
2008-08-25T15:55:42.403
2013-08-27T12:50:21.157
2010-08-12T17:51:45.733
131,433
269
[ "algorithm", "language-agnostic" ]
26,284
2
null
26,148
1
null
Sounds like a threading issue with the timer. You might have one unit of work blocking another running on different worker threads, causing them to stack up every time the timer fires. Or you might have instances living and working longer than you expect. I'd suggest refactoring out the timer. Replace it with a sin...
null
CC BY-SA 2.5
null
2008-08-25T15:46:13.377
2008-08-25T15:46:13.377
null
null
null
null
26,285
2
null
22,873
1
null
For Java, I recommend [Core Java](http://www.horstmann.com/corejava.html). It's a large tome (or two large tomes), but I've found it to be one of the best references on Java I've read.
null
CC BY-SA 2.5
null
2008-08-25T15:47:07.730
2008-08-25T15:47:07.730
null
null
2,132
null
26,299
2
null
26,098
2
null
There isn't a language or version agnostic way of exporting an overloaded function since the mangling convention can change with each release of the compiler. This is one reason why most WinXX functions have funny names like *Ex or *2.
null
CC BY-SA 3.0
null
2008-08-25T15:54:32.673
2012-07-03T15:02:24.700
2012-07-03T15:02:24.700
142,162
1,799
null
26,297
2
null
25,771
7
null
Well... for Visual C++, there's a built in symbol called `__ImageBase`. Specifically: `EXTERN_C IMAGE_DOS_HEADER __ImageBase;` You can inspect that at runtime to determine the timestamp in the PE header: `const IMAGE_NT_HEADERS *nt_header= (const IMAGE_NT_HEADERS *)((char *)&__ImageBase + __ImageBase.e_lfanew);` An...
null
CC BY-SA 3.0
null
2008-08-25T15:52:46.763
2013-02-09T16:28:52.700
2013-02-09T16:28:52.700
234,152
1,799
null
26,307
2
null
25,982
0
null
WCF. I have used IPC before there was a WCF, and believe me, IPC is a bear. And it isn't documented fully/correctly. What’s the simplest way to connect to a .NET remote server object? WCF.
null
CC BY-SA 2.5
null
2008-08-25T16:00:23.313
2008-08-25T16:00:23.313
null
null
null
null
26,283
2
null
11,762
27
null
Although this have been already answered I think it would be a good idea to explain it is to be expected. A padding scheme is usually applied because most cryptographic filters are not semantically secure and to prevent some forms of cryptoatacks. For example, usually in RSA the [OAEP](http://en.wikipedia.org/wiki/Op...
null
CC BY-SA 2.5
null
2008-08-25T15:46:00.960
2008-08-25T15:46:00.960
null
null
2,695
null
26,305
1
26,318
null
190
386,262
I want to be able to play sound files in my program. Where should I look?
How can I play sound in Java?
CC BY-SA 2.5
0
2008-08-25T16:00:04.127
2021-07-09T06:11:20.137
null
null
2,644
[ "java", "audio" ]
26,310
2
null
26,260
12
null
It's just your app domain loading up and loading any binaries into memory. Also, it's initializing static variables, so if you have a static variable that loads up a lot of data from the db, it might take a bit.
null
CC BY-SA 2.5
null
2008-08-25T16:00:59.363
2008-08-25T16:00:59.363
null
null
77
null
26,314
2
null
25,450
2
null
I believe the common errors beginners have with CSS are to do with specificity. If you're styling the tag, are you sure you really want to be styling every single one in the document or a certain "class" of tags? I usually start out being very specific with my CSS selectors and generalize them when I see fit. Here's ...
null
CC BY-SA 2.5
null
2008-08-25T16:02:38.177
2008-08-25T16:02:38.177
2020-06-20T09:12:55.060
-1
1,894
null
26,318
2
null
26,305
145
null
I wrote the following code that works fine. But I think it only works with `.wav` format. ``` public static synchronized void playSound(final String url) { new Thread(new Runnable() { // The wrapper thread is unnecessary, unless it blocks on the // Clip finishing; see comments. public void run() { try ...
null
CC BY-SA 3.0
null
2008-08-25T16:03:41.073
2016-06-08T05:54:48.953
2016-06-08T05:54:48.953
6,042,824
2,644
null
26,321
2
null
26,301
9
null
[Quicksort](http://en.wikipedia.org/wiki/Quicksort). It showed me that recursion can be powerful and useful.
null
CC BY-SA 2.5
null
2008-08-25T16:04:48.327
2008-08-25T16:07:15.590
2008-08-25T16:07:15.590
269
1,797
null
26,273
2
null
26,196
22
null
Here is a code block / example of some list filtering using three different methods that I put together to show Lambdas and LINQ based list filtering. ``` #region List Filtering static void Main(string[] args) { ListFiltering(); Console.ReadLine(); } private static void ListFiltering() { var PersonList =...
null
CC BY-SA 3.0
null
2008-08-25T15:38:11.993
2013-12-30T07:31:39.957
2013-12-30T07:31:39.957
null
1,950
null
26,315
2
null
26,137
2
null
On number 2, I think you have a few options... 1) You can use COM components developed in VB6 or the like to separate some of your business logic from your UI. 2) You can create classes in VBScript. There is no concept of inheritance and other more advanced features are missing from the implementation, but you can e...
null
CC BY-SA 2.5
null
2008-08-25T16:02:54.867
2008-08-25T16:02:54.867
null
null
1,865
null
26,311
2
null
26,305
20
null
A bad example: ``` import sun.audio.*; //import the sun.audio package import java.io.*; //** add this into your application code as appropriate // Open an input stream to the audio file. InputStream in = new FileInputStream(Filename); // Create an AudioStream object from the input stream. AudioStream as = new ...
null
CC BY-SA 3.0
null
2008-08-25T16:01:58.660
2011-09-27T00:22:22.010
2011-09-27T00:22:22.010
35
35
null
26,324
2
null
26,301
1
null
This is a slow one :) I learned lots about both C and computers in general by understanding [Duffs Device](http://en.wikipedia.org/wiki/Duff%27s_device) and [XOR swaps](http://en.wikipedia.org/wiki/XOR_swap_algorithm) EDIT: @[Jason Z](https://stackoverflow.com/questions/26301/your-favourite-algorithm-and-the-lesson-...
null
CC BY-SA 2.5
null
2008-08-25T16:06:30.210
2008-08-25T16:26:44.980
2017-05-23T12:25:08.173
-1
269
null
26,312
2
null
22,873
2
null
[C Primer Plus, 5th Edition](https://rads.stackoverflow.com/amzn/click/com/0672326973) - The C book to get if you're learning C without any prior programming experience. It's a personal favorite of mine as I learned to program from this book. It has all the qualities a beginner friendly book should have: - - -
null
CC BY-SA 2.5
null
2008-08-25T16:02:00.593
2008-08-25T16:02:00.593
null
null
1,897
null
26,323
1
26,339
null
5
14,650
C#: What is a good Regex to parse hyperlinks and their description? Please consider case insensitivity, white-space and use of single quotes (instead of double quotes) around the HREF tag. Please also consider obtaining hyperlinks which have other tags within the `<a>` tags such as `<b>` and `<i>`. ­­­­­­­­­­­­­­­­­­...
Regex to Parse Hyperlinks and Descriptions
CC BY-SA 3.0
0
2008-08-25T16:05:29.587
2017-07-19T18:44:10.473
2017-07-19T18:44:10.473
7,750,640
2,141
[ "html", "regex" ]
26,325
2
null
23,439
1
null
Thanks for the responses, the links to the other blog questions were helpful as well, I had read all of Grant Skinner's info on garbage collection too, but searching through those links and going back and re-reading what he had originally said about GC helped refresh the old noggin. In addition to nulling and re-instan...
null
CC BY-SA 4.0
null
2008-08-25T16:09:02.777
2022-09-06T12:02:07.827
2022-09-06T12:02:07.827
472,495
1,945
null
26,326
2
null
24,891
0
null
> @[Ted Percival](https://stackoverflow.com/questions/24891/c-memory-management#25084): ...you don't need to cast malloc()'s return value. You are correct, of course. I believe that has always been true, although I don't have a copy of [K&R](http://en.wikipedia.org/wiki/The_C_Programming_Language_%28book%29) to check. ...
null
CC BY-SA 2.5
null
2008-08-25T16:09:04.477
2008-08-25T16:54:09.143
2020-06-20T09:12:55.060
-1
2,230
null
26,327
2
null
26,260
0
null
Just a quick nod at Darren. That's typical behavior of a .NET app after a DLL update is made. After the initial load everything should zip along just fine.
null
CC BY-SA 2.5
null
2008-08-25T16:09:07.503
2008-08-25T16:09:07.503
null
null
71
null
26,336
2
null
26,137
3
null
Echoing some ideas and adding a few of my own: 1) Best way to access the database would to abstract that away into a COM component of some sort that you access from VBScript. 2) If you really wanted to you could write the controller in VBScript and then access that in the page. It would resemble a Page Controller p...
null
CC BY-SA 2.5
null
2008-08-25T16:19:15.810
2008-08-25T16:19:15.810
null
null
2,278
null
26,341
2
null
26,145
0
null
You class should implement ILaunchShortcut. Check out the [Javadoc](http://help.eclipse.org/help32/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/debug/ui/ILaunchShortcut.html). What exception are you getting? Check the error log.
null
CC BY-SA 2.5
null
2008-08-25T16:23:42.430
2008-08-25T16:23:42.430
null
null
2,823
null
26,337
2
null
26,301
19
null
"To iterate is human, to recurse divine" - quoted in 1989 at college. P.S. Posted by Woodgnome while waiting for invite to join
null
CC BY-SA 2.5
null
2008-08-25T16:20:15.620
2008-08-25T16:20:15.620
null
null
2,118
null
26,330
2
null
18,696
0
null
I finally found a solution to communicate between the testing-application and the application-under-test: [Managed Spy](http://msdn.microsoft.com/en-us/magazine/cc163617.aspx). It's basically a .NET application build on top of ManagedSpyLib. ManagedSpyLib allows programmatic access to the Windows Forms controls of an...
null
CC BY-SA 2.5
null
2008-08-25T16:14:55.713
2008-08-25T16:14:55.713
null
null
2,078
null
26,342
2
null
26,301
2
null
I don't know if this qualifies as an algorithm, or just a classic hack. In either case, it helped to get me to start thinking outside the box. Swap 2 integers without using an intermediate variable (in C++) ``` void InPlaceSwap (int& a, int &b) { a ^= b; b ^= a; a ^= b; } ```
null
CC BY-SA 2.5
null
2008-08-25T16:24:35.673
2008-08-25T16:24:35.673
null
null
2,470
null
26,345
2
null
26,323
1
null
I [have a regex](http://haacked.com/archive/2005/04/22/Matching_HTML_With_Regex.aspx) that handles most cases, though I believe it does match HTML within a multiline comment. It's written using the .NET syntax, but should be easily translatable.
null
CC BY-SA 2.5
null
2008-08-25T16:26:44.343
2008-08-25T16:26:44.343
null
null
598
null
26,328
2
null
26,323
1
null
[I found this](http://regexlib.com/RETester.aspx?regexp_id=968) but apparently [these guys](http://forums.asp.net/p/1029814/1434514.aspx) had some problems with it. Edit: I have now done my own testing and found that it works, I don't know C# so I can't give you a C# answer but I do know PHP and here's the matches ar...
null
CC BY-SA 2.5
null
2008-08-25T16:09:11.780
2008-08-25T16:14:29.003
2008-08-25T16:14:29.003
1,384,652
1,384,652
null
26,354
1
28,168
null
4
4,495
Does anyone know how to print a barcode to the Intermec PB20 bluetooth printer from a Windows Compact Framework application? We are currently using the Intermec LinePrinter API but have been unable to find a way to print a barcode. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
Print a barcode to a Intermec PB20 via the LinePrinter API
CC BY-SA 3.0
0
2008-08-25T16:34:25.150
2017-07-19T18:17:01.183
2017-07-19T18:17:01.183
7,750,640
620,435
[ "c#", "windows-mobile" ]
26,356
2
null
26,354
0
null
Last time I had to print Barcode (despite the printer or framework) I resorted to use a True Type font with the Barcode I needed. (In my case was EAN-13 something), an european barcode. There are fonts where you simply write numbers (and/or letters when supported) and you get a perfect barcode any scanner can read :) ...
null
CC BY-SA 2.5
null
2008-08-25T16:36:47.657
2008-08-25T16:36:47.657
null
null
2,684
null
26,364
2
null
7,190
0
null
We use CruiseControl.NET running msbuild scripts. Msbuild is responsible for updating from SVN on every commit, compiling, and running FxCop and NCover/NUnit.
null
CC BY-SA 2.5
null
2008-08-25T16:40:22.763
2008-08-25T16:40:22.763
null
null
2,748
null
26,343
2
null
26,176
26
null
I had the benefit of using Harvest at a bank and you'll never find a more wretched hive of scum and villainy, backwards triple-forking undocumented check-in gauntlets that require 15 steps to make one simple change. Nevermind that they weren't even using branching. This is an evil tool don't let it get you in its clutc...
null
CC BY-SA 2.5
null
2008-08-25T16:24:42.023
2008-08-25T16:24:42.023
null
null
null
null
26,355
1
26,423
null
9
2,727
I've found [an article](http://blogs.msdn.com/priozersk/archive/2007/08/06/implementing-mvc-pattern-in-net-cf-applications-part-1.aspx) on this subject by a Microsoft employee, but has anyone implemented a more robust framework for this? Is there a lightweight framework for WinForms that could be ported easily? I'd lik...
Compact Framework - Is there an MVC framework/library available?
CC BY-SA 2.5
0
2008-08-25T16:36:31.340
2010-11-18T13:53:44.193
2008-09-24T15:30:31.440
12,870
636
[ "c#", "model-view-controller", "windows-mobile", "compact-framework", "design-patterns" ]
26,365
2
null
26,147
2
null
Additionally, if you find yourself using Gtk instead of Windows.Forms, there is a tarball of webkit-sharp available that allows for easy embedding of WebViews into Gtk# applications.
null
CC BY-SA 2.5
null
2008-08-25T16:40:38.973
2008-08-25T16:40:38.973
null
null
2,286
null
26,363
2
null
26,148
2
null
I suggest to hack the problem into pieces. First, find a way to reproduce the problem 100% of the times and quickly. Lower the timer so that the services fire up more frequently (for example, 10 times quicker than normal). If the problem arises 10 times quicker, then it's related to the number of iterations and not to ...
null
CC BY-SA 2.5
null
2008-08-25T16:40:06.243
2008-08-25T16:40:06.243
null
null
1,005
null
26,350
2
null
22,873
3
null
For Lisp and Scheme (hell, functional programming in general), there are few things that provide a more solid foundation than [The Little Schemer](https://rads.stackoverflow.com/amzn/click/com/0262560992) and [The Seasoned Schemer](https://rads.stackoverflow.com/amzn/click/com/026256100X). Both provide a very simple an...
null
CC BY-SA 2.5
null
2008-08-25T16:30:23.817
2008-08-25T16:30:23.817
null
null
2,286
null
26,352
2
null
24,675
3
null
PDO is also very slow and its API is pretty complicated. No one in their sane mind should use it if portability is not a concern. And let's face it, in 99% of all webapps it is not. You just stick with MySQL or PostrgreSQL, or whatever it is you are working with. As for the PHP question and what to take into account. ...
null
CC BY-SA 2.5
null
2008-08-25T16:32:58.010
2008-08-25T16:32:58.010
null
null
2,859
null
26,339
2
null
26,323
6
null
As long as there are no nested tags (and no line breaks), the following variant works well: ``` <a\s+href=(?:"([^"]+)"|'([^']+)').*?>(.*?)</a> ``` As soon as nested tags come into play, regular expressions are unfit for parsing. However, you can still use them by applying more advanced features of modern interpreter...
null
CC BY-SA 2.5
null
2008-08-25T16:21:47.833
2008-08-25T16:21:47.833
null
null
1,968
null
26,373
2
null
26,354
0
null
Thank you for your answer. There are free fonts available -- However, the PB20 is a handheld printer with a few built-in fonts. It has the capability to print barcodes and can be manipulated directly via the serial port. Intermec provides a .Net CF API to make printing "easy", and it is using this API that we have been...
null
CC BY-SA 2.5
null
2008-08-25T16:45:36.857
2008-08-25T16:45:36.857
null
null
620,435
null
26,369
1
26,394
null
63
48,573
I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)? Some people pointed to `Application.LocalUserAppDataPath`. However, that creates a folder structure like: > C:\Documents and Settings\user_name\Local Settings\Application Data\company_name\...
What is the best way to store user settings for a .NET application?
CC BY-SA 3.0
0
2008-08-25T16:43:06.707
2017-07-19T17:52:34.987
2017-07-19T17:52:34.987
7,750,640
2,868
[ "c#", ".net" ]
26,371
2
null
26,355
-6
null
There are a couple MVC frameworks out there, neither of which are very "lightweight", but MVC is a pretty big shift away from web forms so that is expected: - [ASP.NET MVC](http://www.asp.net/mvc/)- [Castle MonoRail](http://www.castleproject.org/MonoRail/)
null
CC BY-SA 2.5
null
2008-08-25T16:44:28.730
2008-08-25T17:17:25.610
2008-08-25T17:17:25.610
1,574
1,574
null
26,374
2
null
26,301
0
null
For me, the simple swap in Kelly & Pohl's to demonstrate call-by-reference flipped me out when I first saw it. I looked at that, and pointers snapped into place. Verbatim. . . ``` void swap(int *p, int *q) { int temp; temp = *p; *p = *q; *q = temp; } ```
null
CC BY-SA 2.5
null
2008-08-25T16:47:09.627
2008-08-25T16:47:09.627
null
null
1,179
null
26,378
2
null
24,891
0
null
@[Euro Micelli](https://stackoverflow.com/questions/24891/c-memory-management#24922) One negative to add is that pointers to the stack are no longer valid when the function returns, so you cannot return a pointer to a stack variable from a function. This is a common error and a major reason why you can't get by with j...
null
CC BY-SA 2.5
null
2008-08-25T16:50:17.780
2008-08-25T16:50:17.780
2017-05-23T12:34:30.577
-1
2,347
null
26,379
2
null
26,369
0
null
I'd go down the folder list you posted except for the product version. You don't want the settings reset after an update is released. I'm actually moving away from the registry for user settings because of the debug/footprint factor. I'm currently only storing a few basic settings (window size, position, version of a ...
null
CC BY-SA 3.0
null
2008-08-25T16:50:22.287
2012-08-07T11:13:27.400
2012-08-07T11:13:27.400
63,550
71
null
26,376
2
null
24,468
3
null
I resolved the problem by using [caspol](http://msdn.microsoft.com/en-us/library/cb6t8dtz%28VS.80%29.aspx) as instructed in Johnny Hughes' blog post [Running a .Net application from a network share](http://johnnynine.com/blog/RunningANetApplicationFromANetworkShare.aspx): ``` caspol -addgroup 1.2 -url file:///H:/* Ful...
null
CC BY-SA 2.5
null
2008-08-25T16:48:07.037
2008-08-25T16:48:07.037
null
null
616
null
26,390
2
null
26,301
0
null
The [Towers of Hanoi algorithm](http://en.wikipedia.org/wiki/Tower_of_Hanoi) is one of the most beautiful algorithms. It shows how you can use recursion to solve a problem in a much more elegant fashion than the iterative method. Alternatively, the recursion algorithm for Fibonacci series and calculating powers of a n...
null
CC BY-SA 2.5
null
2008-08-25T16:56:51.413
2008-08-25T16:56:51.413
null
null
2,141
null
26,362
1
46,766
null
58
24,648
Has anyone managed to use `ItemizedOverlays` in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available. I've been trying to use the `ItemizedOverlay` and `OverlayItem` classes. Their intended purpose is to simulate map markers (as seen in G...
Using ItemizedOverlay and OverlayItem In Android Beta 0.9
CC BY-SA 4.0
0
2008-08-25T16:39:42.440
2019-11-16T10:51:15.143
2019-04-20T06:12:38.700
10,221,765
822
[ "java", "android", "overlay", "android-mapview" ]
26,391
2
null
17,172
2
null
I've used this in error reporting and it works quite well. As for user permissions it should work very well - you could have several columns for each user permission in your database or one userlevel column in your database. Go for this option.
null
CC BY-SA 2.5
null
2008-08-25T16:57:32.553
2008-11-03T18:15:12.807
null
null
2,025
null
26,382
2
null
17,172
0
null
It always depends on what you need. If you know the Zend Framework already, then I'd second the Zend_Acl/_Auth suggestion which was made earlier. But keep in mind that every framework propably comes with a similar component. The other thing that comes to mind is [LiveUser](http://pear.php.net/package/LiveUser). I like...
null
CC BY-SA 2.5
null
2008-08-25T16:52:11.630
2008-11-03T18:15:12.807
null
null
2,859
null
26,388
2
null
1,711
1
null
Deitel and Deitel, "C++: How to Program" XUnit Test Patterns
null
CC BY-SA 2.5
null
2008-08-25T16:53:33.577
2008-08-25T16:53:33.577
null
null
2,836
null
26,377
2
null
26,369
0
null
Settings are standard key-value pairs (string-string). I could wrap them in an XML file, if that helps. I'd rather use the file system instead of the registry. It seems to be easier to maintain. In support scenarios, if the user needs to manually open/change the settings, that would be easier if it's in the file syste...
null
CC BY-SA 2.5
null
2008-08-25T16:48:37.177
2008-08-25T16:48:37.177
null
null
2,868
null
26,395
2
null
26,383
0
null
I believe that if you are building a class which will be used by an external program (or will be reused by other programs) then you should use the contract approach. A good example of this is an API of any kind.
null
CC BY-SA 2.5
null
2008-08-25T16:59:43.280
2008-08-25T16:59:43.280
null
null
380
null
26,393
1
26,411
null
32
11,084
I've seen news of [John Resig's fast new selector engine named Sizzle](http://github.com/jeresig/sizzle/tree/master) pop up in quite a few places, but I don't know what a selector engine is, nor have any of the articles given an explanation of what it is. I know Resig is the creator of jQuery, and that Sizzle is somet...
What is a selector engine?
CC BY-SA 2.5
0
2008-08-25T16:59:09.957
2015-04-01T22:11:00.797
2008-08-25T22:51:07.867
1,693
1,266
[ "javascript", "jquery", "glossary", "resig" ]
26,392
2
null
26,355
3
null
Neither of you (davidg or Kevin Pang) paid attention to the fact that he's interested in , not . He wants a framework that pushes the Model-View-Controller design pattern (davidg, MVC isn't just the name of an ASP.NET framework) in a WinForms project using the .NET Compact Framework. He asked his question just fine.
null
CC BY-SA 2.5
null
2008-08-25T16:58:07.200
2008-08-25T16:58:07.200
null
null
1,344
null
26,385
2
null
26,147
3
null
@Martin: Yes, the Adam Locke version is outdated. But that's because a separate distribution is not necessary. It's built with the rest of the Mozilla codebase now. If you download Prism (ie XulRunner), that will give you a base that you can customize to your needs, and this includes the most recent version of the con...
null
CC BY-SA 2.5
null
2008-08-25T16:52:48.833
2008-08-25T16:52:48.833
null
null
1,975,282
null