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
15,159
2
null
15,142
44
null
> Advantages for in Code:- - Actually, I think you have that backwards. IMHO, SQL in code is pain to maintain because: - - - - - Think of Stored Procs as methods you call from the database object - they are much easier to reuse, there is only one place to edit and in the event that you do change DB providers, the ...
null
CC BY-SA 2.5
null
2008-08-18T20:07:42.433
2009-04-17T14:10:18.840
2009-04-17T14:10:18.840
1,185
149
null
15,165
2
null
7,252
0
null
This may be a bit heartless, but the way you describe the situation it sounds like you need to fire this guy. Or at least make it clear: refusing to follow house development practices (including writing tests) checking in buggy code that other people have to clean up will eventually get you fired.
null
CC BY-SA 2.5
null
2008-08-18T20:12:24.687
2008-08-18T20:12:24.687
null
null
1,412
null
15,171
1
7,989,517
null
34
32,395
In the linux file system, where should user scripts be placed? I'm thinking specifically python scripts to be called by cron.
User script location linux (debian etch)
CC BY-SA 2.5
0
2008-08-18T20:15:13.933
2013-02-23T23:00:49.543
2009-04-08T19:14:15.097
16,417
479
[ "linux", "debian" ]
15,168
2
null
9,435
3
null
Here are two things you can do to improve support for iPhones without doing much work: Make page scroll up to hide URL bar: ``` <script type="application/x-javascript"> if (navigator.userAgent.indexOf('iPhone') != -1) { addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); } ...
null
CC BY-SA 3.0
null
2008-08-18T20:13:33.780
2016-11-30T10:48:03.190
2016-11-30T10:48:03.190
2,571,493
1,441
null
15,160
2
null
11,043
1
null
I always use aliases in my queries and it is part of the code guidebook in my company. First of all you need aliases or table names when there are columns with identical names in the joining tables. In my opinion the aliases improve readability in complex queries and allow me to see quickly the location of each colum...
null
CC BY-SA 2.5
null
2008-08-18T20:07:51.030
2008-08-18T20:07:51.030
null
null
null
null
15,173
2
null
15,142
4
null
Definitely easier to maintain if you put it in a stored procedure. If there's difficult logic involved that will potentially change in the future it is definitely a good idea to put it in the database when you have multiple clients connecting. For example I'm working on an application right now that has an end user w...
null
CC BY-SA 2.5
null
2008-08-18T20:15:39.220
2008-08-18T20:15:39.220
null
null
428,190
null
15,172
2
null
15,139
2
null
[Nihilogic](http://blog.nihilogic.dk/) (not my site) does a lot of stuff with Javascript. They even have several [games](http://blog.nihilogic.dk/search/label/games) that they've made in Javascript. I've also seen a neat roguelike game made in Javascript. Unfortunately, I can't remember what it was called...
null
CC BY-SA 2.5
null
2008-08-18T20:15:24.820
2008-08-18T20:15:24.820
null
null
55
null
15,174
2
null
15,142
7
null
Think of it this way You have 4 webservers and a bunch of windows apps which use the same SQL code Now you realized there is a small problem with the SQl code so do you rather...... change the proc in 1 place or push the code to all the webservers, reinstall all the desktop apps(clickonce might help) on all the window...
null
CC BY-SA 2.5
null
2008-08-18T20:16:14.850
2008-08-18T20:16:14.850
null
null
740
null
15,177
2
null
15,171
19
null
If you're talking about scripts created by a user that will be run from that users crontab, I typically put those in either a bin or scripts folder in the home directory, or if they're intended to be shared between users, a /usr/local/scripts directory.
null
CC BY-SA 2.5
null
2008-08-18T20:18:29.557
2008-08-18T20:18:29.557
null
null
1,322
null
15,163
1
15,591
null
3
1,309
In some VB6 code, I have a handler for a TreeView's Collapse event: ``` Private Sub MyTree_Collapse(ByVal Node as MSComCtlLib.Node) ``` This is called whenever a node in the tree is collapsed, whether by the user or programmatically. As it turns out, through some roundabout execution, it may happen that this handle...
Prevent a TreeView from firing events in VB6?
CC BY-SA 2.5
null
2008-08-18T20:11:22.787
2009-11-28T19:32:36.030
null
null
863
[ "events", "vb6", "treeview" ]
15,176
1
15,198
null
10
1,476
I have a product, X, which we deliver to a client, C every month, including bugfixes, enhancements, new development etc.) Each month, I am asked to err "guarantee" the quality of the product. For this we use a number of statistics garnered from the tests that we do, such as: - - - and various other figures. It is ...
How to gauge the quality of a software product
CC BY-SA 3.0
0
2008-08-18T20:18:22.257
2013-11-14T22:01:05.127
2013-11-14T22:01:05.127
null
1,836
[ "testing" ]
15,182
2
null
15,176
1
null
I think keeping it simple is the best way to go. Categorize your bugs by severity, and address them in order of decreasing severity. This way you can hand over the highest-quality build possible (the number of significant bugs remaining is how I would gauge the quality of the product, as opposed to some complex statis...
null
CC BY-SA 2.5
null
2008-08-18T20:27:06.560
2008-08-18T20:27:06.560
null
null
1,467
null
15,183
2
null
14,963
0
null
Just to clarify. The last (4th) point given by Dale was the problem. During the installation of SP1 the Status for ASP.NET and WebDAV became set to Prohibited under Web Service Extensions. Why the installation of SP1 changed this setting on one server and not the other is a mystery that I wouldn't mind (but not expect...
null
CC BY-SA 2.5
null
2008-08-18T20:28:48.430
2008-08-18T20:28:48.430
null
null
1,463
null
15,181
2
null
15,142
8
null
You list 2 pro-points for sprocs: Performance - not really. In Sql 2000 or greater the query plan optimisations are pretty good, and cached. I'm sure that Oracle etc do similar things. I don't think there's a case for sprocs for performance any more. Security? Why would sprocs be more secure? Unless you have a pret...
null
CC BY-SA 2.5
null
2008-08-18T20:24:53.133
2008-08-18T20:24:53.133
2017-05-23T12:17:54.817
-1
905
null
15,184
2
null
15,124
1
null
As a student of many languages/frameworks, I can't stress enough that you shouldn't be concentrating on the whizz-bang latest and greatest stuff. It's a solid understanding of the tried and true programming principles (see design patterns, DRY principle, OOP conventions, etc.) and general familiarity with the framework...
null
CC BY-SA 2.5
null
2008-08-18T20:29:14.810
2008-08-18T20:29:14.810
null
null
149
null
15,186
2
null
15,139
1
null
You might run into performance issues given that you're completely at the mercy of the client's Javascript interpreter. Gears would be a nice way of data storage, but I don't think it has penetrated the market that much. You could just use cookies if you're not fussy about that kind of thing.
null
CC BY-SA 2.5
null
2008-08-18T20:31:02.513
2008-08-18T20:31:02.513
null
null
1,467
null
15,189
2
null
15,171
4
null
I'm a strong beleiver that if a file is made by a user, it goes in his user directory (/home/username) if he didn't make it then it gets more complicated. I have in the past just put them in either /usr/local/bin, /bin, or /usr/local/scripts, I'm not sure about etch, but you need to check to make sure that /usr/local/s...
null
CC BY-SA 2.5
null
2008-08-18T20:32:26.363
2008-08-18T20:32:26.363
null
null
1,063
null
15,185
2
null
15,142
16
null
I fall on the side. We build data access layer that's used by all all the apps (both web and client), so it's DRY from that perspective. It simplifies the database deployment because we just have to make sure the table schema's are correct. It simplifies code maintenance because we don't have to look at source code...
null
CC BY-SA 2.5
null
2008-08-18T20:29:35.213
2008-08-18T20:29:35.213
null
null
1,752
null
15,178
2
null
1,669
12
null
One book not yet suggested but very important is ["Linkers and Loaders"](http://books.google.com/books?id=h34d_jr2iikC&dq=%22linkers+and+loaders%22&pg=PP1&ots=IxFkFWJ-8V&sig=GSlclmkezTRL6YYguGJmZsnkM3c&hl=en&sa=X&oi=book_result&resnum=1&ct=result) by John Levine. If you're not using an external assembler, you'll need ...
null
CC BY-SA 2.5
null
2008-08-18T20:18:32.163
2008-08-18T20:18:32.163
null
null
1,323
null
15,187
1
null
null
28
5,367
I'd like to take an existing application (written in OCaml) and create an Emacs "interface" for it (like, for example, the Emacs GDB mode). I would prefer to do this without writing a ton of Lisp code. In MVC terms, I'd like for the View to be Emacs, but for the Model and Controller to remain (primarily) OCaml. Does a...
Writing Emacs extensions in languages other than Lisp
CC BY-SA 2.5
0
2008-08-18T20:31:15.583
2016-10-11T09:14:46.747
null
null
1,412
[ "emacs", "lisp", "ocaml" ]
15,194
2
null
15,171
0
null
You can also add paths to your crontab file as shown in a [previous cron-related question](https://stackoverflow.com/questions/13204/why-doesnt-my-cron-job-work-properly#13220).
null
CC BY-SA 2.5
null
2008-08-18T20:35:29.820
2008-08-18T20:35:29.820
2017-05-23T11:45:24.007
-1
1,491
null
15,190
1
null
null
3
4,050
I have a project group that contains a project I'm working on as well as some related component and packages. I prefer to keep the database links active during design-time. I know how to write the code which would change the database file location, but in this case, I'm just using `".\data"` instead, for various desi...
Changing CURRENT save/default directory in Delphi 2007 without using Save-As
CC BY-SA 3.0
0
2008-08-18T20:32:49.920
2013-05-03T11:40:18.710
2013-04-18T16:56:14.397
1,454,806
null
[ "delphi", "ide" ]
15,195
2
null
15,176
2
null
The question is who requires you to provide the stats. If it's non-technical people, fake the stats. By "fake", I mean "provide any inevitably meaningless, but real numbers" of the kind you mentioned. If it's technical people without a CS background, they ought to be told about the halting problem, which is undecidab...
null
CC BY-SA 2.5
null
2008-08-18T20:36:56.790
2008-08-18T20:36:56.790
null
null
1,648
null
15,193
2
null
15,142
13
null
: More easily code reviewed. Less coupled, therefore more easily tested. More easily tuned. Performance is generally better, from the point of view of network traffic - if you have a cursor, or similar, then there aren't multiple trips to the database You can protect access to the data more easily, remove direct a...
null
CC BY-SA 3.0
null
2008-08-18T20:35:25.810
2014-02-07T09:21:40.170
2014-02-07T09:21:40.170
3,030,434
1,836
null
15,204
1
15,210
null
17
44,945
What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET?
What is the best way to iterate through a strongly-typed generic List<T>?
CC BY-SA 2.5
null
2008-08-18T20:49:22.443
2010-04-23T14:36:23.697
2008-08-19T00:27:28.480
null
1,224
[ "c#", ".net", "vb.net", "generics", "collections" ]
15,196
2
null
15,176
0
null
How long is a piece of string? Ultimately what makes a quality product? Bugs gives some indication yes, but many other factors are involved, Unit Test coverage is a key factor in IMO. But in my experience the main factor that effects whether a product can be deemed quality or not, is good understanding of the problem t...
null
CC BY-SA 2.5
null
2008-08-18T20:41:12.023
2008-08-18T20:41:12.023
null
null
230
null
15,199
2
null
15,176
1
null
Most of the agile methodologies address this dilemma pretty clearly. You can't test everything. Neither can you test it infinite number of times before you release. So the procedure is to rely on the risk and likelihood of the bug. Both risk and likelihood are numerical values. The product of both gives you a RPN numbe...
null
CC BY-SA 2.5
null
2008-08-18T20:44:11.190
2008-08-18T20:44:11.190
null
null
1,781
null
15,203
1
15,271
null
5
7,089
We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio, .NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the other hand I can get someone to host SVN for me and use TortoiseSVN. An...
Best way to deploy subversion (SVN) in a multisite windows environment
CC BY-SA 2.5
0
2008-08-18T20:46:11.797
2022-12-20T21:59:44.427
2022-12-20T21:59:44.427
761,095
1,363
[ "windows", "svn", "tortoisesvn", "visualsvn-server" ]
15,209
2
null
1,390
2
null
No. For some things, you will need the `.net` Framework (like reporting services), and you can't install it (in a supported way) in a server core.
null
CC BY-SA 4.0
null
2008-08-18T20:52:22.470
2018-05-10T16:52:32.417
2018-05-10T16:52:32.417
5,260,008
295
null
15,198
2
null
15,176
2
null
I don't think you can ever really estimate the number of bugs in your app. Unless you use a language and process that allows formal proofs, you can never really be sure. Your time is probably better spent setting up processes to minimize bugs than trying to estimate how many you have. One of the most important thing...
null
CC BY-SA 2.5
null
2008-08-18T20:43:17.573
2008-08-18T20:43:17.573
null
null
1,409
null
15,201
2
null
15,142
2
null
Stored Procedures are maintainable because: - - Code repetition is the thing you can do when you're trying to build a maintainable application! What happens when you find a logic error that needs to be corrected in multiple places? You're more apt to forget to change that last spot where you copy & pasted your co...
null
CC BY-SA 2.5
null
2008-08-18T20:44:20.893
2008-08-18T20:44:20.893
null
null
357
null
15,206
2
null
15,142
1
null
@Keith > Security? Why would sprocs be more secure? Stored procedures offer inherent protection from [SQL Injection](http://en.wikipedia.org/wiki/SQL_injection) attacks. However, you're not completely protected because you can still write stored procedures that are vulnerable to such attacks (i.e. dynamic SQL in a s...
null
CC BY-SA 2.5
null
2008-08-18T20:51:16.323
2008-08-18T20:51:16.323
null
null
357
null
15,210
2
null
15,204
32
null
For C#: ``` foreach(ObjectType objectItem in objectTypeList) { // ...do some stuff } ``` Answer for VB.NET from : ``` For Each objectItem as ObjectType in objectTypeList 'Do some stuff ' Next ```
null
CC BY-SA 2.5
null
2008-08-18T20:52:25.980
2010-04-21T18:07:30.817
2010-04-21T18:07:30.817
131,926
810
null
15,217
2
null
14,410
5
null
@Leon: Great answer. @dbr: Modal editing is something that takes a while to get used to. If you were to build a new editor that fits this paradigm, how would you improve on VI/VIM/Emacs? I think that is, in part, an answer to the question. Getting it "right" is hard enough, competing agains the likes of VI/VIM/Emacs w...
null
CC BY-SA 2.5
null
2008-08-18T21:00:57.287
2008-08-18T21:00:57.287
null
null
611
null
15,207
2
null
15,047
20
null
Let's first make sure we know what the Command pattern is: > Command pattern encapsulates a request as an object and gives it a known public interface. Command Pattern ensures that every object receives its own commands and provides a decoupling between sender and receiver. A sender is an object that invok...
null
CC BY-SA 2.5
null
2008-08-18T20:51:49.070
2008-08-18T20:51:49.070
null
null
1,117
null
15,211
1
85,541
null
13
14,173
we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis. Currenly, we use [SVNManager](http://svnmanager.sourceforge.net/) to allow users to manage access a...
Subversion Management Tools
CC BY-SA 2.5
0
2008-08-18T20:53:06.430
2011-09-02T15:46:42.093
2008-09-14T15:14:34.613
-1
170
[ "linux", "svn" ]
15,218
2
null
15,204
4
null
For VB.NET: ``` For Each tmpObject as ObjectType in ObjectTypeList 'Do some stuff ' Next ```
null
CC BY-SA 2.5
null
2008-08-18T21:01:07.850
2008-08-18T21:01:07.850
null
null
1,795
null
15,212
2
null
15,204
1
null
I may be missing something, but iterating through a generic list should be fairly simple if you use my examples below. The List<> class implements the IList and IEnumerable interfaces so that you can easily iterate through them basically any way you want. The most efficient way would be to use a for loop: ``` for(i...
null
CC BY-SA 2.5
null
2008-08-18T20:54:56.630
2008-08-18T20:54:56.630
null
null
392
null
15,222
2
null
15,204
2
null
Without knowing the internal implementation of a list, I think generally the best way to iterate over it would be a foreach loop. Because foreach uses an IEnumerator to walk over the list, it's up to the list itself to determine how to move from object to object. If the internal implementation was, say, a linked list,...
null
CC BY-SA 2.5
null
2008-08-18T21:06:49.383
2008-08-18T21:06:49.383
null
null
615
null
15,226
2
null
15,142
8
null
@Keith > Security? Why would sprocs be more secure? As suggested by Komradekatz, you can disallow access to tables (for the username/password combo that connects to the DB) and allow SP access only. That way if someone gets the username and password to your database they can execute SP's but can't access the tables o...
null
CC BY-SA 2.5
null
2008-08-18T21:12:39.933
2008-08-18T21:12:39.933
null
null
1,463
null
15,228
1
15,239
null
9
8,710
I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design. So, what's the best way to set the masterpage at runtime? Page.MasterPageFile can only...
Setting an ASP.NET Master Page at runtime
CC BY-SA 2.5
0
2008-08-18T21:17:15.523
2013-08-29T13:23:01.310
2008-08-28T21:30:41.090
1,790
5
[ ".net", "asp.net", "master-pages" ]
15,219
1
18,507
null
4
16,377
I'm using the Infragistics grid and I'm having a difficult time using a drop-down list as the value selector for one of my columns. I tried reading the documentation but Infragistics' documentation is not so good. I've also taken a look at this [discussion](http://news.infragistics.com/forums/p/9063/45792.aspx) with n...
UltraWebGrid: How to use a drop-down list in a column
CC BY-SA 2.5
0
2008-08-18T21:03:18.483
2010-04-21T09:07:05.480
null
null
810
[ "c#", "asp.net", "grid", "infragistics", "ultrawebgrid" ]
15,225
2
null
15,211
2
null
There is an alternative called [KDESVN](http://kdesvn.alwins-world.de/trac.fcgi) which you might want to try. However, I have never used it, so I cannot vouch for it.
null
CC BY-SA 2.5
null
2008-08-18T21:12:38.777
2008-08-18T21:12:38.777
null
null
1,311
null
15,235
2
null
15,228
2
null
Rather than two different master pages how about having one master that dynamically loads different user controls and content HTML literals?
null
CC BY-SA 2.5
null
2008-08-18T21:19:30.230
2008-08-18T21:19:30.230
null
null
905
null
15,236
2
null
14,943
16
null
Note that it is considered bad form for an application to completely prevent itself from closing. You should check the event arguments for the Closing event to determine how and why your application was asked to close. If it is because of a Windows shutdown, you should not prevent the close from happening.
null
CC BY-SA 2.5
null
2008-08-18T21:19:32.990
2008-08-18T21:19:32.990
null
null
267
null
15,234
2
null
15,139
16
null
I've written several application in JS including a spreadsheet. Upside: - - - - Downside: - - - - - Bottom line: Go for it. I did.
null
CC BY-SA 2.5
null
2008-08-18T21:19:27.827
2008-08-18T21:19:27.827
null
null
1,476
null
15,239
2
null
15,228
6
null
I've done this once before, I did exactly what you described (Made all pages inherit from a custom page with an OnPreInit event). Also I had a custom Application_PreRequestHandlerExecute in my Global.asax.cs for setting Page.StyleSheetTheme for doing image/css changes that didn't require a different Master Page.
null
CC BY-SA 2.5
null
2008-08-18T21:22:01.363
2008-08-18T21:22:01.363
null
null
163
null
15,240
1
15,269
null
43
36,428
I'd like to make a debug logging function with the same parameters as `printf`. But one that can be removed by the pre-processor during optimized builds. For example: ``` Debug_Print("Warning: value %d > 3!\n", value); ``` I've looked at variadic macros but those aren't available on all platforms. `gcc` supports t...
How do you create a debug only function that takes a variable argument list? Like printf()
CC BY-SA 3.0
0
2008-08-18T21:22:20.753
2023-02-19T05:19:33.373
2016-01-30T19:20:59.977
4,370,109
1,841
[ "c++", "c", "c-preprocessor" ]
15,242
2
null
15,228
1
null
It's easy enough to handle PreInit and insert the one line of code it takes to load the proper Master Page. ``` this.Page.MasterPageFile = "~/default.master"; ``` In the absence of some compelling reason not to go this route, that's what I'd do, regardless of where you handle the PreInit.
null
CC BY-SA 2.5
null
2008-08-18T21:24:43.637
2008-08-18T21:24:43.637
null
null
null
null
15,241
1
15,323
null
51
12,880
The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable, and one of my colleagues has suggested CSLA. So I've bought the book but as : > I wanted to gauge the SOFlow community's opinion of it. So here are my questions: 1. How may people ar...
Does anyone have any real-world experience of CSLA?
CC BY-SA 3.0
0
2008-08-18T21:23:50.877
2014-12-22T21:51:19.790
2014-12-22T21:51:19.790
3,474,146
1,116
[ ".net", "frameworks", "csla" ]
15,243
2
null
14,943
12
null
> I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it. If the user is determined to close your app (and knowledgeable) enough to press alt+f4, they'll most likely also be knowledgeable enough to run task manager and kill your application instead. At least wi...
null
CC BY-SA 2.5
null
2008-08-18T21:25:12.700
2008-08-18T21:25:12.700
null
null
234
null
15,232
2
null
15,204
21
null
With any generic implementation of IEnumerable the best way is: ``` //C# foreach( var item in listVariable) { //do stuff } ``` There is an important exception however. IEnumerable involves an overhead of Current() and MoveNext() that is what the foreach loop is actually compiled into. When you have a simple arr...
null
CC BY-SA 2.5
null
2008-08-18T21:18:00.187
2010-04-23T14:36:23.697
2010-04-23T14:36:23.697
905
905
null
15,248
2
null
15,240
1
null
What platforms are they not available on? stdarg is part of the standard library: [http://www.opengroup.org/onlinepubs/009695399/basedefs/stdarg.h.html](http://www.opengroup.org/onlinepubs/009695399/basedefs/stdarg.h.html) Any platform not providing it is not a standard C implementation (or very, very old). For those...
null
CC BY-SA 2.5
null
2008-08-18T21:27:18.793
2008-08-18T21:27:18.793
null
null
414
null
15,238
2
null
15,204
5
null
C# ``` myList<string>().ForEach( delegate(string name) { Console.WriteLine(name); }); ``` Anonymous delegates are not currently implemented in VB.Net, but both C# and VB.Net should be able to do lambdas: C# ``` myList<string>().ForEach(name => Console.WriteLine(name)); ``` VB.Net ``` myList(...
null
CC BY-SA 2.5
null
2008-08-18T21:21:49.337
2010-04-22T02:08:53.873
2010-04-22T02:08:53.873
1,249
1,249
null
15,205
2
null
15,139
1
null
Standalone games in GWT: 1. http://gpokr.com/ 2. http://kdice.com/
null
CC BY-SA 2.5
null
2008-08-18T20:50:06.170
2008-12-25T01:11:47.287
null
null
40
null
15,258
2
null
15,241
6
null
We started using CSLA because we thought it would help with our model layer. Was sort of overkill and mostly all we use now is the SmartDate class, just because we're already linked to the library. We thought the validation interface would really help us enforce business rules but it didn't work well with WCF and ser...
null
CC BY-SA 2.5
null
2008-08-18T21:34:26.893
2008-08-18T21:34:26.893
null
null
698
null
15,247
1
17,132
null
9
4,862
Given a list of locations such as ``` <td>El Cerrito, CA</td> <td>Corvallis, OR</td> <td>Morganton, NC</td> <td>New York, NY</td> <td>San Diego, CA</td> ``` What's the easiest way to generate a Google Map with pushpins for each location?
Simplest way to make a Google Map mashup?
CC BY-SA 4.0
0
2008-08-18T21:26:57.750
2020-08-12T17:13:47.773
2020-08-12T17:13:47.773
9,154,188
116
[ "html", "google-maps" ]
15,257
2
null
15,247
1
null
I guess more information would be needed to really give you an answer, but over at Django Pluggables there is a [django-googlemap plugin](http://djangoplugables.com/projects/django-googlemap/) that might be of help. Adam has a much better answer. When it doubt look at the API examples.
null
CC BY-SA 2.5
null
2008-08-18T21:34:26.347
2008-08-18T21:40:42.230
2008-08-18T21:40:42.230
1,797
1,797
null
15,253
2
null
15,142
2
null
@Terrapin - sprocs are just as vulnerable to injection attacks. As I said: > Always parametrise all queries - never inline something from user input and you'll be fine. That goes for sprocs and dynamic Sql. I'm not sure not recompiling your app is an advantage. I mean, you have run your unit tests against that code ...
null
CC BY-SA 2.5
null
2008-08-18T21:32:57.177
2008-08-18T21:32:57.177
null
null
905
null
15,259
2
null
15,203
1
null
You can get hosting of secure svn repositories from a variety of sources: [http://beanstalkapp.com/](http://beanstalkapp.com/) and many others. Often free if the usage (users, data, etc.) is limited. VisualSVN does integrate with Visual Studio but not like SourceSafe does (and I mean this in a good way). It requires T...
null
CC BY-SA 2.5
null
2008-08-18T21:34:28.420
2008-08-18T21:34:28.420
null
null
748
null
15,254
1
15,343
null
47
16,252
Is it possible to actually make use of placement new in portable code when using it for arrays? It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is correct), but I don't see how you can allocate a buffer for...
Can placement new for arrays be used in a portable way?
CC BY-SA 3.0
0
2008-08-18T21:33:35.863
2023-02-11T07:01:34.470
2012-09-01T23:25:54.560
1,561,378
1,739
[ "c++", "arrays", "compiler-construction", "portability", "overhead" ]
15,262
2
null
15,240
11
null
Here's something that I do in C/C++. First off, you write a function that uses the varargs stuff (see the link in Stu's posting). Then do something like this: ``` int debug_printf( const char *fmt, ... ); #if defined( DEBUG ) #define DEBUG_PRINTF(x) debug_printf x #else #define DEBUG_PRINTF(x) #endif DEBUG_P...
null
CC BY-SA 2.5
null
2008-08-18T21:35:49.917
2008-08-18T21:35:49.917
null
null
1,821
null
15,260
2
null
15,187
4
null
I don't know if this will work for your particular problem, but I have been doing something similar using the shell-command-to-string function: ``` (shell-command-to-string "bash -c \"script-to-exec args\"") ``` So for example, we have existing scripts written in python which will mangle a file, so the above let...
null
CC BY-SA 2.5
null
2008-08-18T21:34:59.747
2008-08-18T21:34:59.747
null
null
122
null
15,265
2
null
15,247
8
null
Check out the [Google Maps API Examples](http://code.google.com/apis/maps/documentation/examples/) They make it pretty simple and their API documentation is great. Most of the examples are for doing all the code in JavaScript on the client side, but there are APIs for other languages available as well.
null
CC BY-SA 2.5
null
2008-08-18T21:38:16.497
2008-08-18T21:38:16.497
null
null
194
null
15,264
2
null
15,139
7
null
Another option for developing simple desktop like applications or games in JavaScript is [Adobe AIR](http://www.adobe.com/devnet/air/). You can build your app code in either HTML + JavaScript or using Flash/Flex or a combination of both. It has the advantage of being cross-platform (actually cross-platform, Linux, OS X...
null
CC BY-SA 2.5
null
2008-08-18T21:37:24.203
2008-08-18T21:37:24.203
null
null
1,538
null
15,261
2
null
8,154
2
null
You might want to check MySQL's timeout variables: ``` show variables like '%timeout%'; ``` You're probably interested in `wait_timeout` (less likely but possible: `interactive_timeout`). On Debian and Ubuntu, the defaults are 28800 (MySQL kills connections after 8 hours), but maybe the default for your platform is...
null
CC BY-SA 3.0
null
2008-08-18T21:35:39.387
2011-11-04T11:33:54.620
2011-11-04T11:33:54.620
1,813
1,813
null
15,270
2
null
15,203
5
null
> I heard about VisualSVN and integration with visual studio Point to note, VisualSVN (the one that integrates with VStudio) is a server technology at all, it is simply a integrated GUI front end to SVN, and in fact works TortoiseSVN (which is to be installed). However, VisualSVN is GREAT and defnitely worth the...
null
CC BY-SA 2.5
null
2008-08-18T21:42:21.620
2008-08-18T21:42:21.620
null
null
194
null
15,269
2
null
15,240
25
null
I still do it the old way, by defining a macro (XTRACE, below) which correlates to either a no-op or a function call with a variable argument list. Internally, call vsnprintf so you can keep the printf syntax: ``` #include <stdio.h> void XTrace0(LPCTSTR lpszText) { ::OutputDebugString(lpszText); } void XTrace(LPC...
null
CC BY-SA 3.0
null
2008-08-18T21:42:09.857
2016-04-09T23:06:06.310
2016-04-09T23:06:06.310
1,162,609
null
null
15,272
1
15,904
null
3
1,193
I want a data structure that will allow querying . An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items having same timestamp). So far it s...
Aging Data Structure in C#
CC BY-SA 2.5
null
2008-08-18T21:44:07.933
2010-04-23T15:32:59.280
2008-08-25T12:52:04.093
2,134
163
[ "c#", "linq", ".net-3.5", "data-structures" ]
15,271
2
null
15,203
3
null
Hosting subversion is fantastically simple. At the risk of being labeled a brown nose (is there a badge for that?) Jeff Atwood did put up an article on installing subersion - [http://blog.codinghorror.com/setting-up-subversion-on-windows/](http://blog.codinghorror.com/setting-up-subversion-on-windows/) So really you...
null
CC BY-SA 3.0
null
2008-08-18T21:42:25.457
2015-07-28T17:19:27.987
2015-07-28T17:19:27.987
100,297
361
null
15,266
1
2,195,434
null
11
9,827
Using , I am trying to access a web site that has an expired certificate. When I send the request, my delegate method is invoked with the following info: ``` -1203, NSURLErrorDomain, bad server certificate ``` My searches have only turned up one solution: a hidden class method in NSURLRequest: ``` [NSURLRequest se...
Objective-C/Cocoa: How do I accept a bad server certificate?
CC BY-SA 3.0
0
2008-08-18T21:40:01.657
2015-08-12T03:18:58.923
2017-05-23T10:33:44.020
-1
544
[ "objective-c", "cocoa", "networking" ]
15,276
2
null
15,241
11
null
I had experience with it several years ago. It is a brilliant architecture, but very complex, difficult to understand or change, and it's solving a problem that most of us developing web based applications don't necessarily have. It was developed more for windows based applications and handling multi-level undo, with...
null
CC BY-SA 2.5
null
2008-08-18T21:48:44.680
2008-08-18T21:48:44.680
null
null
1,219
null
15,278
2
null
2,482
10
null
Joseph Albahari wrote a good overview of Threading in C# here: [http://www.albahari.com/threading/](http://www.albahari.com/threading/)
null
CC BY-SA 2.5
null
2008-08-18T21:51:01.947
2008-08-18T21:51:01.947
null
null
1,807
null
15,281
2
null
15,240
5
null
Ah, vsprintf() was the thing I was missing. I can use this to pass the variable argument list directly to printf(): ``` #include <stdarg.h> #include <stdio.h> void DBG_PrintImpl(char * format, ...) { char buffer[256]; va_list args; va_start(args, format); vsprintf(buffer, format, args); printf("%...
null
CC BY-SA 3.0
null
2008-08-18T21:54:15.777
2016-04-09T23:20:00.097
2016-04-09T23:20:00.097
15,168
1,841
null
15,274
2
null
15,228
0
null
I'm curious what decides how the page should look? Is it the user clicking a button to change the theme? Is it based on the URL that was used to get to the site? Code behind is supported in Master Pages, so you could put some logic in your one Master Page to decide what should be displayed. I've seen several sites se...
null
CC BY-SA 2.5
null
2008-08-18T21:46:40.877
2008-08-18T22:19:44.993
2008-08-18T22:19:44.993
1,795
1,795
null
15,283
2
null
10,083
4
null
If you are a bit of a Pythonista then [iPython](http://ipython.scipy.org/) is tough to beat. It has some of the more common shell commands coded in (i.e. ls, pwd, cd etc.), can also run any other shell command by prefixing with '!' (i.e. !latex file.tex) but also is a full Python shell with history, tab-complete, multi...
null
CC BY-SA 2.5
null
2008-08-18T21:56:55.100
2008-08-18T21:56:55.100
null
null
199
null
15,282
2
null
14,760
1
null
> you can enter commands into the search box by prefixing them with a > symbol. Wow, I didn't know that. Where do I find the list of possible commands? I never actually use the search box, I've remapped + to incremental search, which is usually + I find this cooler than the normal search - give it a go, you might ...
null
CC BY-SA 3.0
null
2008-08-18T21:55:43.090
2015-08-20T22:23:50.497
2015-08-20T22:23:50.497
7,226
234
null
15,279
2
null
14,801
2
null
I tried it with a pojo and it seems to work. I had to modify your code a bit. I think your interfaces were a bit off, but I'm not sure. I assumed "Foo" was a concrete type, but if not I can do some more testing for you. I just wrote a main method to test this. I hope this helps! ``` public static void main(String[] ...
null
CC BY-SA 2.5
null
2008-08-18T21:51:55.140
2008-08-18T21:51:55.140
null
null
1,310
null
15,167
2
null
15,139
5
null
[SproutCore](http://www.sproutcore.com/) is a wholly JavaScript-hosted application framework, borrowing concepts particularly from Cocoa (such as KVO) and Ruby on Rails (such as using a CLI generator for your models, views and controllers). It includes Prototype, but builds plenty of stuff such as sophisticated control...
null
CC BY-SA 2.5
null
2008-08-18T20:12:46.747
2008-08-18T20:12:46.747
null
null
1,600
null
15,286
2
null
15,109
2
null
I had LOTS of issues with developing installers (and software in general) for terminal server. I hate that damn thing. Anyway, VS Setup Projects are just .msi files, and run using the Windows installer framework. This will drop a log file when it errors out, they're called MSIc183.LOG (swap the c183 for some random n...
null
CC BY-SA 2.5
null
2008-08-18T22:00:58.103
2008-08-18T22:00:58.103
null
null
234
null
15,291
2
null
4,942
0
null
I agree with mreggen. Tell them by working in Python you can get things done faster. Getting things done faster possibly means money saved by the client. In the least it means that you are working with a language you a more comfortable in, meaning faster development, debugging, and refactoring time. There will be less ...
null
CC BY-SA 2.5
null
2008-08-18T22:06:02.693
2008-08-18T22:06:02.693
null
null
1,797
null
15,113
2
null
15,056
5
null
This is one of the handy ones I use on HTML and XML files: ``` ''''replaceunicodechars.vb Option Strict Off Option Explicit Off Imports EnvDTE Imports System.Diagnostics Public Module ReplaceUnicodeChars Sub ReplaceUnicodeChars() DTE.ExecuteCommand("Edit.Find") ReplaceAllChar(ChrW(8230), "&#8230;...
null
CC BY-SA 2.5
null
2008-08-18T19:27:01.330
2008-08-18T19:27:01.330
null
null
1,414
null
15,273
2
null
15,254
0
null
I think gcc does the same thing as MSVC, but of course this doesn't make it "portable". I think you can work around the problem when NUMELEMENTS is indeed a compile time constant, like so: `typedef A Arr[NUMELEMENTS];````A* p = new (buffer) Arr;` This should use the scalar placement new.
null
CC BY-SA 2.5
null
2008-08-18T21:45:14.640
2008-08-18T21:45:14.640
null
null
1,648
null
15,302
1
15,324
null
13
2,115
What does it mean when you get or create a date in UTC format in JavaScript?
What do the getUTC* methods on the date object do?
CC BY-SA 2.5
0
2008-08-18T22:14:34.427
2013-05-14T12:11:32.290
2013-05-14T12:11:32.290
2,139,775
1,538
[ "javascript", "date", "utc" ]
15,292
2
null
13,775
1
null
It looks like you might be sending a poorly formed XML document to the service. Can you use Fiddler or something like that to get a copy of the actual call that is going to the web service? That would be a huge help in figured out what the issue is.
null
CC BY-SA 2.5
null
2008-08-18T22:07:24.877
2008-08-18T22:07:24.877
null
null
537
null
15,301
2
null
14,760
0
null
> Wow, I didn't know that. Where do I find the list of possible commands? The commands are the same as those you can enter in the command window, so you can pretty much drive the entire IDE and debugger using it. There are a load of predefined aliases for common commands. Open up the command window and enter `alias`...
null
CC BY-SA 2.5
null
2008-08-18T22:13:33.430
2008-08-18T22:13:33.430
null
null
1,739
null
15,296
2
null
4,942
5
null
It's one of the preferred languages over at Google - It's several years ahead of Ruby in terms of "maturity" (what ever that really means - but managers like that). Since it's prefered by Google you can also run it on the Google App Engine. Mircosoft is also embracing Python, and will have a v2.0 of IronPython coming ...
null
CC BY-SA 2.5
null
2008-08-18T22:10:13.077
2008-08-18T22:10:13.077
null
null
1,199,387
null
15,297
2
null
15,142
6
null
Use your app code as what it does best: handle logic. User your database for what it does best: store data. You can debug stored procedures but you will find easier to debug and maintaing logic in code. Usually you will end recompiling your code every time you change the database model. Also stored procedures with ...
null
CC BY-SA 2.5
null
2008-08-18T22:10:49.207
2008-08-18T22:26:41.687
2008-08-18T22:26:41.687
null
null
null
15,305
1
15,367
null
7
3,501
I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed. Being new to JNI I've managed to find much documentation on th...
JNI and Java: ant calling make or make calling ant?
CC BY-SA 2.5
0
2008-08-18T22:15:39.087
2019-12-29T14:10:47.387
null
null
1,849
[ "java", "ant", "makefile", "java-native-interface", "automake" ]
15,314
2
null
15,302
0
null
getUTC is for converting times to Coordinated Universal Time (UTC, the acronym is ordered differently than what it stands for) which is the standard time based on the time in Greenwich, London. The universal time is calculated using a time offset (in minutes when in JavaScript.) This offset is based on the time zone c...
null
CC BY-SA 2.5
null
2008-08-18T22:24:32.423
2008-08-18T22:24:32.423
null
null
392
null
15,316
2
null
15,272
2
null
I think that an important consideration will be the frequency of querying vs. adding/removing. If you will do frequent querying (especially if you'll have a large collection) a B-tree may be the way to go: [http://en.wikipedia.org/wiki/B-tree](http://en.wikipedia.org/wiki/B-tree) You could have some thread go throug...
null
CC BY-SA 2.5
null
2008-08-18T22:25:35.200
2008-08-18T22:25:35.200
null
null
1,807
null
15,319
2
null
14,872
0
null
My friend fixed it by just using another directory, namely C:\TEMP. I think it was just a permissions thing.
null
CC BY-SA 2.5
null
2008-08-18T22:26:57.630
2008-08-18T22:26:57.630
null
null
1,659
null
15,277
2
null
15,142
179
null
I am not a fan of stored procedures > Stored Procedures are MORE maintainable because: * You don't have to recompile your C# app whenever you want to change some SQL You'll end up recompiling it anyway when datatypes change, or you want to return an extra column, or whatever. The number of times you can 'transpa...
null
CC BY-SA 3.0
null
2008-08-18T21:50:33.757
2013-09-19T15:28:31.400
2013-09-19T15:28:31.400
547,144
234
null
15,321
2
null
9,033
111
null
If you're trying to use curly brackets inside a String.Format expression... ``` int foo = 3; string bar = "blind mice"; String.Format("{{I am in brackets!}} {0} {1}", foo, bar); //Outputs "{I am in brackets!} 3 blind mice" ```
null
CC BY-SA 2.5
null
2008-08-18T22:29:45.020
2010-05-19T14:43:18.540
2010-05-19T14:43:18.540
63,550
1,690
null
15,315
1
null
null
3
331
Is there a method for handling errors from COM objects in RDML? For instance, when calling Word VBA methods like `PasteSpecial`, an error is returned and the LANSA application crashes. I cannot find anything in the documentation to allow handling of these errors. Actually, error handling in general is a weak-point for...
Is there a method for handling errors from COM objects in RDML?
CC BY-SA 2.5
0
2008-08-18T22:25:20.083
2012-06-18T21:48:38.557
2010-05-31T14:17:22.660
8,513
null
[ "com", "error-handling" ]
15,324
2
null
15,302
14
null
A date represents a specific point in time. This point in time will be called differently in different places. As I write this, it's 00:27 on Tuesday in Germany, 23:27 on Monday in the UK and 18:27 on Monday in New York. To take an example method: getDay returns the day of the week in the local timezone. Right now,...
null
CC BY-SA 2.5
null
2008-08-18T22:32:34.233
2008-08-18T22:32:34.233
null
null
1,813
null
15,327
2
null
15,305
3
null
As a simpler alternative to JNI, try JNA: [https://jna.dev.java.net/](https://jna.dev.java.net/), may solve this hassle for you and be simpler (assuming it can do what you want).
null
CC BY-SA 2.5
null
2008-08-18T22:36:49.967
2008-08-18T22:36:49.967
null
null
699
null
15,326
1
null
null
11
24,873
Here is the scenario: I have a table with a margin-bottom of 19px. Below that I have a form that contains some fieldsets. One of them is floated right. The problem is that the margin-bottom is not getting the full 19px in IE7. I've gone through all of the IE7 css/margin/float bugs that I can think of and have tried r...
IE7 HTML/CSS margin-bottom bug
CC BY-SA 3.0
null
2008-08-18T22:35:42.620
2019-08-29T10:35:10.330
2012-06-21T20:56:57.907
102,937
1,797
[ "html", "css", "internet-explorer-7" ]
15,335
2
null
14,760
2
null
This is a really cool feature. I've poked through the [feature documentation](http://msdn.microsoft.com/en-us/library/1665hyw1(VS.80).aspx), and the accompanying [command list](http://msdn.microsoft.com/en-us/library/c338aexd(VS.80).aspx), and not a heck of a lot is showing up in terms of turning it off. If you want t...
null
CC BY-SA 2.5
null
2008-08-18T22:42:12.513
2008-08-18T22:42:12.513
null
null
1,370
null
15,339
2
null
15,302
0
null
Further to Dan's remark about the acronym being different to what it stands for is a good reason: [UTC Abbreviation on Wikipedia](http://en.wikipedia.org/wiki/Coordinated_Universal_Time#Abbreviation)
null
CC BY-SA 2.5
null
2008-08-18T22:49:46.413
2008-08-18T22:49:46.413
null
null
1,035
null