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
39,570
2
null
39,541
0
null
The same click event can handle the button presses from multiple buttons in .Net. You could then add the the text box to find in the Tag property? ``` Private Sub AllButton_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, Button3.Click Dim c As Control = CType(sender, Control) Dim t As...
null
CC BY-SA 2.5
null
2008-09-02T13:54:51.680
2008-09-02T13:54:51.680
null
null
1,908
null
39,580
2
null
39,561
4
null
For CSS you'll need the 'Semi Expanded' option.
null
CC BY-SA 2.5
null
2008-09-02T13:57:54.213
2008-09-02T13:57:54.213
null
null
1,830
null
39,584
2
null
39,438
2
null
The main difference I noticed in moving from SQL Server to Oracle was that in Oracle you need to use cursors in the SELECT statements. Also, temporary tables are used differently. In SQL Server you can create one in a procedure and then DROP it at the end, but in Oracle you're supposed to already have a temporary table...
null
CC BY-SA 2.5
null
2008-09-02T14:00:06.207
2008-09-02T14:00:06.207
null
null
null
null
39,585
1
39,591
null
9
1,429
When coding web services, how do you structure your return values? How do you handle error conditions (expected ones and unexpected ones)? If you are returning something simple like an int, do you just return it, or embed it in a more complex object? Do all of the web methods within one service return an instance of...
What's a good design pattern for web method return values?
CC BY-SA 2.5
0
2008-09-02T14:00:09.420
2017-09-15T11:51:59.027
2008-09-02T14:03:48.693
832
1,219
[ "web-services", "soap", "wsdl" ]
39,576
1
39,602
null
359
774,106
I'm looking for a good way to perform multi-row inserts into an Oracle 9 database. The following works in MySQL but doesn't seem to be supported in Oracle. ``` INSERT INTO TMP_DIM_EXCH_RT (EXCH_WH_KEY, EXCH_NAT_KEY, EXCH_DATE, EXCH_RATE, FROM_CURCY_CD, TO_CURCY_CD, EXCH_EFF_DATE, EXCH_EFF_END_DATE, EXC...
Best way to do multi-row insert in Oracle?
CC BY-SA 2.5
0
2008-09-02T13:56:19.413
2022-05-03T01:49:42.820
2020-12-07T00:43:08.617
1,509,264
3,734
[ "sql", "oracle", "sql-insert", "oracle9i" ]
39,583
1
null
null
31
16,352
How much do you rely on database transactions? Do you prefer small or large transaction scopes ? Do you prefer client side transaction handling (e.g. TransactionScope in .NET) over server side transactions or vice-versa? What about nested transactions? Do you have some tips&tricks related to transactions...
Transactions best practices
CC BY-SA 2.5
0
2008-09-02T13:59:38.703
2009-10-16T15:40:54.167
2008-09-05T14:07:36.923
1,196
1,196
[ "database", "architecture", "transactions" ]
39,574
2
null
39,561
254
null
1. In the Tools Menu click Options 2. Click Show all Parameters (checkbox at the bottom left) (Show all settings in VS 2010) 3. Text Editor 4. C# 5. Formatting 6. New lines And there check when you want new lines with brackets 1. In the Tools Menu click Options 2. Click Show all Parameters (checkbox at the botto...
null
CC BY-SA 4.0
null
2008-09-02T13:55:30.960
2020-12-07T15:56:42.120
2020-12-07T15:56:42.120
2,090
2,090
null
39,571
2
null
39,517
1
null
These days, any "unique" or "cool" feature in a DBMS makes me incredibly nervous. I break out in a rash and have to stop work until the itching goes away. I just hate to be locked in to a platform unnecessarily. Suppose you build a big chunk of your system in PL/Perl inside the database. Or in C# within SQL Server, or...
null
CC BY-SA 2.5
null
2008-09-02T13:54:57.030
2008-09-02T13:54:57.030
null
null
1,060
null
39,568
2
null
39,473
9
null
It can certainly be done, has been done, and is a hot topic currently among the raytracing and Cuda gurus. I'd start by perusing [http://www.nvidia.com/object/cuda_home.html](http://www.nvidia.com/object/cuda_home.html) But it's basically a research problem. People who are doing it well are getting peer-reviewed res...
null
CC BY-SA 2.5
null
2008-09-02T13:54:29.247
2008-09-02T13:54:29.247
null
null
3,832
null
39,590
2
null
39,474
27
null
I've also realized than Intellisense is sometime 'lost', on some big project. Why? No idea. This is why we have bought [Visual Assist](http://www.wholetomato.com/) (from [Tomato software](http://www.wholetomato.com/)) and disabled Intellisense by deleting the dll feacp.dll in the Visual studio subdirectory (C:\Program...
null
CC BY-SA 2.5
null
2008-09-02T14:02:01.240
2008-09-02T15:07:53.937
2008-09-02T15:07:53.937
1,578
1,578
null
39,588
2
null
3,748
10
null
If you're not on SQL Server 2008 and you have some solid reasons for putting specific image files in the database, then you could take the "both" approach and use the file system as a temporary cache and use the database as the master repository. For example, your business logic can check if an image file exists on d...
null
CC BY-SA 2.5
null
2008-09-02T14:01:36.467
2008-09-02T14:01:36.467
null
null
4,239
null
39,579
2
null
39,395
1
null
Here's a nice approach (from [the main Wikipedia entry on pi](http://en.wikipedia.org/wiki/Pi)); it converges much faster than the simple formula discussed above, and is quite amenable to a recursive solution if your intent is to pursue recursion as a learning exercise. (Assuming that you're after the learning experie...
null
CC BY-SA 2.5
null
2008-09-02T13:57:49.377
2008-09-02T13:57:49.377
null
null
3,525
null
39,589
2
null
39,474
4
null
Do you have any add-ins installed (or uninstalled)? I find that effects my intellisense. Besides that just making sure your Tools->Options->Text Editor->All Languages "Auto List Members" and "Parameter Information" are checked off.
null
CC BY-SA 3.0
null
2008-09-02T14:01:50.430
2012-04-19T20:13:46.327
2012-04-19T20:13:46.327
102,554
4,140
null
39,587
2
null
39,562
6
null
They way I have designed the database before is to have an News-table containing basic info like NewsID (int), NewsPubDate (datetime), NewsAuthor (varchar/int) and then have a linked table NewsText that has these columns: NewsID(int), NewsText(text), NewsLanguageID(int). And at last you have a Language-table that has L...
null
CC BY-SA 2.5
null
2008-09-02T14:01:01.867
2008-09-02T14:01:01.867
null
null
2,257
null
39,586
2
null
39,561
11
null
The official MS guidelines tells you to have the curly brace on the same line as the method/property/class and many other things which are not enforced in Visual Studio. You can change all these auto-text settings under: This was based on the book "Framework Design Guidelines" written by some of the core-people fr...
null
CC BY-SA 3.0
null
2008-09-02T14:01:00.430
2015-12-07T16:02:01.617
2015-12-07T16:02:01.617
2,429
2,429
null
39,594
2
null
39,583
3
null
I use transactions on every write operation to the database. So there are quite a few small "transactions" wrapped in a larger transaction and basically there is an outstanding transaction count in the nesting code. If there are any outstanding children when you end the parent, its all rolled back. I prefer client-s...
null
CC BY-SA 2.5
null
2008-09-02T14:04:09.347
2008-09-02T14:04:09.347
null
null
1,220
null
39,591
2
null
39,585
8
null
I like the Request/Response object pattern, where you encapsulate your arguments into a single [Operation]Request class, which has simple public properties on it. Something like AddCustomerRequest, which would return AddCustomerResponse. The response can include information on the success/failure of the operation, an...
null
CC BY-SA 2.5
null
2008-09-02T14:03:08.163
2008-09-02T14:03:08.163
null
null
3,381
null
39,599
2
null
39,399
1
null
It appears that a popular solution will not work in all containers... [http://www.theserverside.com/discussions/thread.tss?thread_id=30190](http://www.theserverside.com/discussions/thread.tss?thread_id=30190)
null
CC BY-SA 2.5
null
2008-09-02T14:06:51.133
2008-09-02T14:06:51.133
null
null
543
null
39,597
2
null
39,485
1
null
Have Matlab with Simulink? There are PLL demo files available at Matlab Central [here](http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14868&objectType=FILE#). Matlab's code generation capabilities might get you from there to a PLL written in C.
null
CC BY-SA 2.5
null
2008-09-02T14:06:30.997
2008-09-02T14:06:30.997
null
null
4,069
null
39,593
2
null
39,536
0
null
@Mark Biek > Is MySQL replication an option? You could even turn it on and off if you didn't want it constantly replicating. Thanks for the suggestion, but I cannot enable replication on the server. It is a shared server with very little room for maneuver. I've updated the question to note this.
null
CC BY-SA 2.5
null
2008-09-02T14:03:46.040
2008-09-02T14:03:46.040
null
null
1,944
null
39,598
2
null
28,147
1
null
With so much untapped power I cannot see how it would go unused for too long. The question is, though, how the GPU will be used for this. CUDA seems to be a good guess for now but other techologies are emerging on the horizon which might make it more approachable by the average developer. Apple have recently announced...
null
CC BY-SA 2.5
null
2008-09-02T14:06:38.780
2008-09-02T14:06:38.780
null
null
4,055
null
39,602
2
null
39,576
215
null
This works in Oracle: ``` insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE) select 8000,0,'Multi 8000',1 from dual union all select 8001,0,'Multi 8001',1 from dual ``` The thing to remember here is to use the `from dual` statement.
null
CC BY-SA 4.0
null
2008-09-02T14:08:12.333
2020-12-29T14:34:19.427
2020-12-29T14:34:19.427
897,373
2,257
null
39,601
2
null
39,564
0
null
Having tried to do this some years ago I remember it not being very easy. The way I did it was to create totally new table to user/pass and then replace these columns in the respective software with foreign keys to your new table - this required of custom tweaking of core files in each application - mainly making su...
null
CC BY-SA 2.5
null
2008-09-02T14:08:04.330
2008-09-02T14:08:04.330
null
null
319
null
39,608
2
null
39,564
1
null
I once did a phpBB/MediaWiki login integration from the phpBB end. [Check it out](https://damnian.svn.sourceforge.net/svnroot/damnian/phpBB3/MediaWiki/).
null
CC BY-SA 2.5
null
2008-09-02T14:09:47.633
2008-09-04T12:18:21.533
2008-09-04T12:18:21.533
3,583
3,583
null
39,603
2
null
39,585
1
null
+1 for Ben's answer. In addition, I suggest considering that the generic response allow for multiple error/warning items, to allow the reply to be as comprehensive and actionable as possible. (Would you want to use a compiler that stopped after the first error message, or one that told you as much as possible?)
null
CC BY-SA 2.5
null
2008-09-02T14:08:20.180
2008-09-02T14:08:20.180
null
null
3,525
null
39,607
2
null
39,576
15
null
If you have the values that you want to insert in another table already, then you can Insert from a select statement. ``` INSERT INTO a_table (column_a, column_b) SELECT column_a, column_b FROM b_table; ``` Otherwise, you can list a bunch of single row insert statements and submit several queries in bulk to save the...
null
CC BY-SA 2.5
null
2008-09-02T14:08:58.273
2008-09-02T14:21:01.133
2017-05-23T12:26:32.913
-1
75
null
39,600
2
null
39,476
-5
null
It's trying to bring in some Ruby Goodness :) This is some sample Ruby Code that prints out each element of the array ``` rubyArray = [1,2,3,4,5,6,7,8,9,10] rubyArray.each{|x| puts x # do whatever with x } ``` The Array's each method implementation control over to the caller (the 'puts x') wi...
null
CC BY-SA 2.5
null
2008-09-02T14:06:52.493
2008-09-02T14:06:52.493
null
null
1,695
null
39,595
2
null
39,564
4
null
I don't know how to share the session cookies, but you can easily share the same login. i.e. People will need to log separately into both sites, but will be able to use the same username and password. In the mediawiki file "LocalSettings.PHP", you can tell it to use a different (wordpress) database for authenticatio...
null
CC BY-SA 2.5
null
2008-09-02T14:05:26.397
2008-09-02T14:05:26.397
null
null
1,726
null
39,610
2
null
39,438
0
null
If you need to you can create and drop temporary tables in procedures using the [Execute Immediate](http://www.dbasupport.com/oracle/ora9i/execute_immediate.shtml) command.
null
CC BY-SA 2.5
null
2008-09-02T14:10:50.267
2008-09-02T14:10:50.267
null
null
3,590
null
39,609
2
null
38,596
3
null
Quick and dirty cron to restart your daemon: ``` * * * * * USER ps auxww | grep SCRIPTNAME > /dev/null || SCRIPTNAME ``` Replace USER with the user that the daemon runs as and SCRIPTNAME with the name of your script. Stick this in `/etc/cron.d/restart_php_daemon`. It should run every minute. Change the first `*` to ...
null
CC BY-SA 2.5
null
2008-09-02T14:10:13.717
2009-02-09T03:18:49.923
2009-02-09T03:18:49.923
2,506
2,506
null
39,605
2
null
39,583
21
null
I always wrap a transaction in a using statement. ``` using(IDbTransaction transaction ) { // logic goes here. transaction.Commit(); } ``` Once the transaction moves out of scope, it is disposed. If the transaction is still active, it is rolled back. This behaviour fail-safes you from accidentally locking out the...
null
CC BY-SA 2.5
null
2008-09-02T14:08:27.137
2008-09-02T14:14:33.503
2008-09-02T14:14:33.503
854
854
null
39,606
2
null
36,014
0
null
I'm not sure if I'm being unclear, but if so, I'm seeing the debugger halt execution with an "Unhandled Exception" of type NoViableAltException. Initially, I didn't know anything about this Debug->Exceptions menu item because MS expects you, at VS install time, to commit to a profile when you have no idea how they are...
null
CC BY-SA 2.5
null
2008-09-02T14:08:43.860
2008-09-02T14:08:43.860
null
null
3,347
null
39,613
2
null
39,583
6
null
Personally, developing a website that is high traffic perfomance based, I stay away from database transactions whenever possible. Obviously they are neccessary, so I use an ORM, and page level object variables to minimize the number of server side calls I have to make. Nested transactions are an awesome way to minimi...
null
CC BY-SA 2.5
null
2008-09-02T14:10:56.210
2008-09-02T14:10:56.210
null
null
4,140
null
39,604
2
null
33,923
5
null
Recursion means a function calling itself. For example: ``` (define (un-ended name) (un-ended 'me) (print "How can I get here?")) ``` Tail-Recursion means the recursion that conclude the function: ``` (define (un-ended name) (print "hello") (un-ended 'me)) ``` See, the last thing un-ended function (proced...
null
CC BY-SA 4.0
null
2008-09-02T14:08:26.420
2018-11-23T15:17:36.353
2018-11-23T15:17:36.353
9,978,535
227,049
null
39,616
2
null
18,632
76
null
I like tools that will perform more than one task, Notepad++ is a great notepad replacement and has a Document Monitor plugin (installs with standard msi) that works great. It also is portable so you can have it on a thumb drive for use anywhere. For a command line option, PowerShell (which is really a new command lin...
null
CC BY-SA 2.5
null
2008-09-02T14:12:08.937
2008-09-02T14:12:08.937
null
null
4,231
null
39,615
1
39,664
null
214
356,849
I have a set of base filenames, for each name 'f' there are exactly two files, 'f.in' and 'f.out'. I want to write a batch file (in Windows XP) which goes through all the filenames, for each one it should: - - - I don't have any way to list the set of base filenames, other than to search for *.in (or *.out) for exa...
How to loop through files matching wildcard in batch file
CC BY-SA 3.0
0
2008-09-02T14:12:02.527
2020-03-04T12:45:32.700
2014-11-29T15:05:36.443
16,587
3,974
[ "command-line", "windows-xp", "batch-file" ]
39,614
2
null
39,541
3
null
There is no 1 to 1 analog in .Net. Sure, you can make arrays or lists of controls of a specific type, but there's nothing that will do that for you automatically. However, I've never seen a control array that couldn't be refactored in .Net to something . A case in point is your example. In the scenario you posted,...
null
CC BY-SA 2.5
null
2008-09-02T14:11:27.583
2008-11-07T14:33:43.797
2008-11-07T14:33:43.797
3,043
3,043
null
39,625
2
null
39,567
10
null
> Edit: Saw the responses posted while I was writing, Hash[a.flatten] seems the way to go. Must have missed that bit in the documentation when I was thinking through the response. Thought the solutions that I've written can be used as alternatives if required. The second form is simpler: ``` a = [[:apple, 1], [:ban...
null
CC BY-SA 2.5
null
2008-09-02T14:16:01.363
2008-09-02T14:23:15.057
2008-09-02T14:23:15.057
3,719
3,719
null
39,629
2
null
39,567
0
null
Not sure if it's the best way, but this works: ``` a = ["apple", 1, "banana", 2] m1 = {} for x in (a.length / 2).times m1[a[x*2]] = a[x*2 + 1] end b = [["apple", 1], ["banana", 2]] m2 = {} for x,y in b m2[x] = y end ```
null
CC BY-SA 3.0
null
2008-09-02T14:16:35.120
2017-12-03T16:33:37.543
2017-12-03T16:33:37.543
313,756
1,709
null
39,624
2
null
34,981
6
null
beaudetious, buddy, I would really suggest you read Steve Yegge's blog called ["Good Agile, Bad Agile"](http://steve-yegge.blogspot.com/2006/09/good-agile-bad-agile_27.html). It's an oldy but a goody, and I think it's a must read for anyone - like myself about 2 months ago - who gets a little let's say "over-eager" t...
null
CC BY-SA 2.5
null
2008-09-02T14:15:57.057
2008-09-02T14:15:57.057
null
null
2,594
null
39,635
2
null
39,585
1
null
If you're using SOAP web services then [SOAP faults](https://web.archive.org/web/20080906191515/https://www.w3schools.com/SOAP/soap_fault.asp) are the standard way to return error details, where the fault messages can return whatever additional detail you like.
null
CC BY-SA 3.0
null
2008-09-02T14:18:09.780
2017-09-15T11:51:59.027
2017-09-15T11:51:59.027
6,761,181
2,562
null
39,634
2
null
39,517
3
null
"isn't that [text manipulation] more of something that should be programmed into the application?" Usually, yes. The generally accepted "[three-tier](http://en.wikipedia.org/wiki/Multitier_architecture)" application design for databases says that your logic should be in the middle tier, between the client and the data...
null
CC BY-SA 2.5
null
2008-09-02T14:17:55.990
2008-09-02T14:17:55.990
null
null
619
null
39,628
1
null
null
9
1,363
In my [previous question](https://stackoverflow.com/questions/39371/database-exception-handling-best-practices), most commenters agreed that having validation logic both at client & server sides is a good thing. However there is a problem - you need to keep your validation rules in sync between database and client code...
Keeping validation logic in sync between server and client sides
CC BY-SA 4.0
0
2008-09-02T14:16:32.280
2022-05-09T06:26:33.297
2022-05-09T06:26:33.297
18,069,264
1,196
[ "database", "architecture" ]
39,621
2
null
39,567
151
null
Simply use `Hash[*array_variable.flatten]` For example: ``` a1 = ['apple', 1, 'banana', 2] h1 = Hash[*a1.flatten(1)] puts "h1: #{h1.inspect}" a2 = [['apple', 1], ['banana', 2]] h2 = Hash[*a2.flatten(1)] puts "h2: #{h2.inspect}" ``` Using `Array#flatten(1)` limits the recursion so `Array` keys and values work as ex...
null
CC BY-SA 3.0
null
2008-09-02T14:14:08.340
2015-04-09T04:34:16.860
2015-04-09T04:34:16.860
2,050
1,450
null
39,638
2
null
12,702
0
null
I think Darren is most likely correct - the default values provided for WCF are laughably small and if you bump into them you end up with errors that can be difficult to track down. They seem to appear as soon as you attempt to do anything beyond a simple test case. I wasted more time than I'd like to admit debugging p...
null
CC BY-SA 2.5
null
2008-09-02T14:18:57.300
2008-09-02T14:18:57.300
null
null
3,656
null
39,640
2
null
39,564
1
null
If you're integrating a bunch of different apps, and you really just want a bridge, I've had good success with the bridge from [Single-Signon.com](http://www.single-signon.com). You can see there supported apps here: [http://www.single-signon.com/en/applications.html](http://www.single-signon.com/en/applications.html) ...
null
CC BY-SA 2.5
null
2008-09-02T14:20:09.277
2008-09-02T14:20:09.277
null
null
4,247
null
39,641
2
null
39,567
-1
null
If the numeric values are seq indexes, then we could have simpler ways... Here's my code submission, My Ruby is a bit rusty ``` input = ["cat", 1, "dog", 2, "wombat", 3] hash = Hash.new input.each_with_index {|item, index| if (index%2 == 0) hash[item] = input[index+1] } hash #=> {"cat"=>1, "wombat"...
null
CC BY-SA 2.5
null
2008-09-02T14:20:27.640
2008-09-02T14:20:27.640
null
null
1,695
null
39,632
1
null
null
7
8,177
When defining XSD you can either choose to define your types as types or types (complexType). I understand that global types are of much more use when it comes to morphism or reusing of elements. However, if you have a big data model you would have to define for each level a global complexType and then create an...
XSD: Nested Types vs Global Types
CC BY-SA 2.5
null
2008-09-02T14:17:41.997
2013-09-10T12:38:50.227
2017-05-23T12:08:38.563
-1
null
[ "xml", "xsd" ]
39,645
2
null
39,254
-5
null
ok. seems like it is exactly the opposite according to Apache docs and RFC 2616. REQUEST_URI does not contain the query string. DOCUMENT_URI does contain the query string. cheers, Rob
null
CC BY-SA 2.5
null
2008-09-02T14:21:44.797
2008-09-02T14:21:44.797
null
null
2,974
null
39,636
2
null
39,615
7
null
Easiest way, as I see it, is to use a for loop that calls a second batch file for processing, passing that second file the base name. According to the for /? help, basename can be extracted using the nifty ~n option. So, the base script would read: ``` for %%f in (*.in) do call process.cmd %%~nf ``` Then, in proces...
null
CC BY-SA 2.5
null
2008-09-02T14:18:32.260
2008-09-03T01:51:51.580
2008-09-03T01:51:51.580
4,142
4,142
null
39,649
2
null
39,564
0
null
I personally think that integration login systems is one of, if not the, hardest job when utilizing multiple prebuilt applications. As a fan of reuse and modularity, I find this disappointing. If anyone knows of any easy ways to handle this problem between random app X and random app Y, I would love to know.
null
CC BY-SA 2.5
null
2008-09-02T14:22:18.930
2008-09-02T14:22:18.930
null
null
572
null
39,648
1
339,784
null
43
27,416
Is there a good way to debug errors in the Visual Studio Designer? In our project we have tons of UserControls and many complex forms. For the complex ones, the Designer often throws various exceptions which doesn't help much, and I was wondering if there's some nice way to figure out what has gone wrong. The languag...
Good Way to Debug Visual Studio Designer Errors
CC BY-SA 3.0
0
2008-09-02T14:22:16.497
2022-05-04T12:29:02.693
2015-10-22T08:09:03.723
63,550
4,037
[ "visual-studio", "gui-designer" ]
39,652
2
null
39,615
3
null
There is a tool usually used in MS Servers (as far as I can remember) called [forfiles](http://www.ss64.com/nt/forfiles.html): The link above contains help as well as a link to the microsoft download page.
null
CC BY-SA 2.5
null
2008-09-02T14:23:40.003
2008-09-02T14:23:40.003
null
null
null
null
39,644
2
null
32,085
9
null
there is no need to put that into a ``` <xsl:variable name="length" select="count(nodes/node)"/> ``` though... you can just print it out as follows: ``` <xsl:value-of select="count(nodes/node)"/> ``` or use it in a if-clause as follows: ``` <xsl:if test="count(comments/comment) > '0'"> <ul> <xsl:app...
null
CC BY-SA 2.5
null
2008-09-02T14:21:39.790
2008-09-02T14:21:39.790
null
null
1,532
null
39,650
2
null
39,374
0
null
I am most likely in the minority, but I don't mind whitespace. I LOVE WHITESPACE. Since the compiler takes it out and HD space being so cheap I like to have white space in my code. For example I like: ``` int total = 10; int sum = 0; for (int i = 0; i < total; i++) { sum += i;...
null
CC BY-SA 2.5
null
2008-09-02T14:22:26.107
2008-09-02T14:22:26.107
null
null
2,469
null
39,639
1
67,661
null
7
2,847
My project is based on spring framework 2.5.4. And I try to add aspects for some controllers (I use aspectj 1.5.3). I've enabled auto-proxy in application-servlet.xml, just pasted these lines to the end of the xml file: ``` <aop:aspectj-autoproxy /> <bean id="auditLogProcessor" class="com.example.bg.web.utils.AuditLo...
Aspectj doesn't catch all events in spring framework?
CC BY-SA 2.5
0
2008-09-02T14:19:23.040
2018-12-20T13:01:23.720
2016-11-21T21:00:35.240
1,318,479
1,007
[ "java", "spring", "spring-aop" ]
39,654
2
null
39,628
4
null
As mentioned in one of the answers to the other post, if you are going to keep your layers separated, there is no good way to avoid duplicating the validation logic in each layer. If you use something to automatically tie them together, you have introduced a sort of coupling between the layers that might hinder you do...
null
CC BY-SA 2.5
null
2008-09-02T14:24:33.540
2008-09-02T14:24:33.540
null
null
1,219
null
39,651
1
39,862
null
95
37,001
In a [previous Git question](https://stackoverflow.com/questions/21848/switch-branch-names-in-git), Daniel Benamy was talking about a workflow in Git: > I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started...
git-stash vs. git-branch
CC BY-SA 2.5
0
2008-09-02T14:22:44.390
2020-11-24T10:12:38.293
2017-05-23T12:17:20.247
-1
4,161
[ "git" ]
39,662
1
39,814
null
1
702
In TFS whats the easiest way of linking a backlog item to a large number of other backlog items, without doing them one at a time? I do not have access to the underlying database so am unable to write a query to do it.
TFS Linking Backlog items
CC BY-SA 2.5
null
2008-09-02T14:26:50.633
2009-12-21T17:36:47.757
2008-09-02T15:24:14.880
1,127,460
1,127,460
[ "tfs" ]
39,660
2
null
39,536
0
null
Depending on how often you need to copy down live data and how quickly you need to do it, installing [phpMyAdmin](http://www.phpmyadmin.net/) on both machines might be an option. You can export and import DBs, but you'd have to do it manually. If it's a small DB (and it sounds like it is), and you don't need live dat...
null
CC BY-SA 2.5
null
2008-09-02T14:26:46.547
2008-09-02T14:26:46.547
null
null
2,185
null
39,619
2
null
39,533
26
null
A lot of the research on this is dedicated to detecting so-called "blue pill" attacks, that is, a malicious hypervisor that is actively attempting to evade detection. The classic trick to detect a VM is to populate the ITLB, run an instruction that be virtualized (which necessarily clears out such processor state w...
null
CC BY-SA 3.0
null
2008-09-02T14:13:47.250
2015-06-05T22:02:56.190
2015-06-05T22:02:56.190
4,722,775
3,869
null
39,661
1
null
null
3
889
I've recently discovered that it's possible to place .net assemblies on SQL Server >=2005 servers so that .net functions can be called in T/SQL statements. I wondered what uses people found for these and how they perform?
Use of .net Assemblies in SQL Server 2005
CC BY-SA 2.5
null
2008-09-02T14:26:49.713
2009-07-17T19:41:47.203
null
null
3,394
[ ".net", "sql-server" ]
39,659
2
null
39,104
36
null
Try using pkg_resources, which is part of setuptools (and available on all of the pythons I have access to right now): ``` >>> import pkg_resources >>> pkg_resources.resource_filename(__name__, "foo.config") 'foo.config' >>> pkg_resources.resource_filename('tempfile', "foo.config") '/usr/lib/python2.4/foo.config' ``` ...
null
CC BY-SA 4.0
null
2008-09-02T14:26:07.033
2019-06-17T20:53:37.830
2019-06-17T20:53:37.830
47,551
2,603
null
39,663
1
39,760
null
25
12,836
I'm reading some MPEG Transport Stream protocol over UDP and it has some funky bitfields in it (length 13 for example). I'm using the "struct" library to do the broad unpacking, but is there a simple way to say "Grab the next 13 bits" rather than have to hand-tweak the bit manipulation? I'd like something like the way ...
What is the best way to do Bit Field manipulation in Python?
CC BY-SA 2.5
0
2008-09-02T14:28:40.600
2020-05-15T11:32:07.547
2010-07-06T13:31:42.393
274,402
2,587,612
[ "python", "udp", "bit", "bit-fields" ]
39,666
2
null
38,756
1
null
If you want to use the FCL collections, then locking is the only way to support iteration / modification from multiple threads that may overlap. Be careful what you use as your lock object, though. Using SyncRoot is only a good idea if the collection itself is a private member of the class that uses it. If the collect...
null
CC BY-SA 2.5
null
2008-09-02T14:30:01.827
2008-09-02T14:30:01.827
null
null
3,776
null
39,667
2
null
39,661
0
null
I found it to be very useful. I used this possibility to extend MSSQL2005 XML related functions. If I remember correctly you can even introduce your own data types.
null
CC BY-SA 2.5
null
2008-09-02T14:30:50.517
2008-09-02T14:30:50.517
null
null
1,196
null
39,664
2
null
39,615
319
null
Assuming you have two programs that process the two files, process_in.exe and process_out.exe: ``` for %%f in (*.in) do ( echo %%~nf process_in "%%~nf.in" process_out "%%~nf.out" ) ``` %%~nf is a substitution modifier, that expands %f to a file name only. See other modifiers in [https://technet.microsoft...
null
CC BY-SA 3.0
null
2008-09-02T14:28:51.457
2018-02-16T08:17:15.703
2018-02-16T08:17:15.703
58,553
2,666
null
39,656
2
null
39,615
106
null
You can use this line to print the contents of your desktop: ``` FOR %%I in (C:\windows\desktop\*.*) DO echo %%I ``` Once you have the `%%I` variable it's easy to perform a command on it (just replace the word echo with your program) In addition, substitution of FOR variable references has been enhanced You can now...
null
CC BY-SA 4.0
null
2008-09-02T14:25:00.310
2020-03-04T12:45:32.700
2020-03-04T12:45:32.700
67,419
986
null
39,673
2
null
38,669
2
null
Some hosts (Godaddy is the worst) block your use of sendmail and mail(). I generally use smtp to send emails from my php applications and with [PHPMailer](http://phpmailer.codeworxtech.com/) it's super easy. Many applications are using older versions of PHPMailer and sometimes updating it can help. It's also easy ...
null
CC BY-SA 2.5
null
2008-09-02T14:33:26.017
2008-09-02T14:33:26.017
null
null
1,430
null
39,669
1
null
null
2
2,225
By default the nursery is supposed to be 25% of the heap, we have the initial heap size set to 1GB. With verbose gc on, we see that our nursery is sized at 55-60MB. We have forced the size using `-Xmns256M -Xmnx512M`. Shouldn't this happen automatically?
WebSphere 6.1 generational gc default nursery size limit
CC BY-SA 3.0
null
2008-09-02T14:32:42.977
2011-10-12T03:39:34.857
2011-09-23T00:19:20.080
590,042
4,231
[ "memory-management", "websphere" ]
39,679
2
null
39,661
0
null
This is normally used if you need to interact with the operating system in some way, for example, to place a message in MSMQ or write to a file. It is also useful if you have some complex mathematical or financial calculations that are already implemented in .NET, and you don't want to re-write them in T-SQL.
null
CC BY-SA 2.5
null
2008-09-02T14:36:38.473
2008-09-02T14:36:38.473
null
null
1,219
null
39,671
2
null
39,648
0
null
Each one is different and they can sometimes be obscure. As a first step, I would do the following: - -
null
CC BY-SA 2.5
null
2008-09-02T14:32:57.047
2008-09-02T14:32:57.047
null
null
51
null
39,672
2
null
39,536
6
null
Since you can access your database remotely, you can use mysqldump from your windows machine to fetch the remote database. From commandline: ``` cd "into mysql directory" mysqldump -u USERNAME -p -h YOUR_HOST_IP DATABASE_TO_MIRROR >c:\backup\database.sql ``` The program will ask you for the database password and the...
null
CC BY-SA 2.5
null
2008-09-02T14:33:01.977
2008-09-02T14:33:01.977
null
null
999
null
39,677
2
null
39,648
1
null
I have had this happen many times and it is a real pain. Firstly I'd suggest attempting to follow the stack trace provided by the designer, though I found that often simply lists a bunch of internals stuff that isn't much use. If that doesn't work then try compiling and determining the exception from there. You reall...
null
CC BY-SA 2.5
null
2008-09-02T14:36:19.550
2008-09-02T14:36:19.550
null
null
3,394
null
39,668
2
null
36,014
0
null
@spoulson, If you can replicate it, can you post it somewhere? One avenue you could try is usign WinDBG with the SOS extensions to run the app and catch the unhandled exception. It will break on the first chance exception (before the runtime tries to find a handler) and you can see at that point where it is coming fro...
null
CC BY-SA 2.5
null
2008-09-02T14:30:56.630
2008-09-02T14:30:56.630
null
null
4,083
null
39,691
1
39,970
null
34
6,698
What are some good resources to learn best practices for Javascript? I'm mainly concerned about when something should be an object vs. when it should just be tracked in the DOM. Also I would like to better learn how to organize my code so it's easy to unit test.
Javascript Best Practices
CC BY-SA 2.5
0
2008-09-02T14:41:22.050
2015-09-22T01:02:28.307
2008-09-02T14:42:33.857
4,114
4,114
[ "javascript", "unit-testing" ]
39,685
2
null
27,242
6
null
I used Prototype for about six months before I decided to learn jQuery. To me, it was like a night and day difference. For example, in Prototype you will loop over a set of elements checking if one exists and then setting something in it, in jQuery you just say $('div.class').find('[name=thing]') or whatever and set ...
null
CC BY-SA 2.5
null
2008-09-02T14:39:21.853
2008-09-02T14:39:21.853
null
null
4,114
null
39,693
2
null
26,301
7
null
[Bresenham's line drawing algorithm](http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm) got me interested in realtime graphics rendering. This can be used to render filled polygons, like triangles, for things like 3D model rendering.
null
CC BY-SA 2.5
null
2008-09-02T14:41:34.797
2008-09-02T14:41:34.797
null
null
3,347
null
39,683
2
null
39,628
2
null
I like to use a validation service, which doesn't necessarily care about the origin of the data to be validated. This can work in a few different ways when you get to the part about transmitting validation rules to a client (i.e. web page), but I feel the most important aspect of this is to have a single authority for...
null
CC BY-SA 2.5
null
2008-09-02T14:38:46.893
2008-09-02T14:38:46.893
null
null
2,870
null
39,692
2
null
38,336
14
null
Here are some good up-to-date listings of the most-installed fonts for PC, Mac, and Linux: [Sans serif font sampler and survey results](http://www.codestyle.org/css/font-family/sampler-SansSerif.shtml) [Serif font sampler and survey results](http://www.codestyle.org/css/font-family/sampler-Serif.shtml) Hope this hel...
null
CC BY-SA 2.5
null
2008-09-02T14:41:31.410
2008-09-02T14:41:31.410
null
null
2,076,253
null
39,678
2
null
38,645
19
null
Without collisions, you can do ``` M = [fieldnames(A)' fieldnames(B)'; struct2cell(A)' struct2cell(B)']; C=struct(M{:}); ``` And this is reasonably efficient. However, `struct` errors on duplicate fieldnames, and pre-checking for them using `unique` kills performance to the point that a loop is better. But here's w...
null
CC BY-SA 2.5
null
2008-09-02T14:36:20.563
2008-09-02T14:36:20.563
null
null
4,928
null
39,680
2
null
39,288
5
null
I think you confusing business logic with your application requirements. It's not the same thing. When someone explains the logic of his/her business it is something like: "When a user buys an item he has to provide delivery information. The information is validated with x y z rules. After that he will receive an invo...
null
CC BY-SA 2.5
null
2008-09-02T14:36:58.690
2008-09-02T14:36:58.690
null
null
4,213
null
39,694
2
null
39,053
0
null
@toolkit: Well, not exactly. Since I can access the data source over JNDI, it is actually visible and thus usable. Or am I getting something totally wrong? @Brabster: I think you're on the right track. Isn't there a way to make the connection serializable? Maybe it's just a configuration issue...
null
CC BY-SA 2.5
null
2008-09-02T14:42:44.713
2008-09-02T14:42:44.713
null
null
null
null
39,700
2
null
39,662
0
null
Depends on your definition of easy, but you could write a SQL Update linking the backlog item(s) to the correct backlog items. (If there is no field in the backlog item to connect it to another backlog item, you would have to extend backlog item and the views showing them yourself)
null
CC BY-SA 2.5
null
2008-09-02T14:45:31.043
2008-09-02T14:45:31.043
null
null
2,241
null
39,699
2
null
39,674
1
null
You can not use REPLACE on text-fields. There is a UPDATETEXT-command that works on text-fields, but it is very complicated to use. Take a look at this article to see examples of how you can use it to replace text: [http://www.sqlteam.com/article/search-and-replace-in-a-text-column](http://www.sqlteam.com/article/sear...
null
CC BY-SA 2.5
null
2008-09-02T14:44:41.653
2008-09-02T14:44:41.653
null
null
2,257
null
39,711
2
null
39,457
1
null
I doubt you can find a regex that matches all (and only) the function calls in some source code. But maybe you could use a tool like [Understand](http://www.scitools.com/products/understand/), or your IDE, to browse your code.
null
CC BY-SA 2.5
null
2008-09-02T14:53:00.400
2008-09-02T14:53:00.400
null
null
4,177
null
39,706
2
null
39,628
2
null
Some framework provides a validation support the may keep your client and server validation in sync. Take a look at this [Seam validation tutorial](http://weblogs.java.net/blog/bleonard/archive/2006/05/trying_out_jbos_1.html) using annotations. It's a good implementation and very easy to understand. Anyway, if you don...
null
CC BY-SA 2.5
null
2008-09-02T14:48:55.417
2008-09-02T14:48:55.417
null
null
4,213
null
39,674
1
39,790
null
4
800
I have the following script. It replaces all instances of @lookFor with @replaceWith in all tables in a database. However it doesn't work with text fields only varchar etc. Could this be easily adapted? ``` ------------------------------------------------------------ -- Name: STRING REPLACER -- Author: ADUGGLEBY -- Ve...
Adapt Replace all strings in all tables to work with text
CC BY-SA 2.5
null
2008-09-02T14:33:47.403
2008-09-04T15:56:41.027
2008-09-09T21:13:45.230
-1
997
[ "sql-server", "tsql", "text", "cursors" ]
39,709
2
null
39,661
3
null
The first general purpose use for the CLR in SQL 2005 I created was a SQL 2005 assembly that has a variety of functions that perform string operations and pattern matches using regular expressions. The native string functions in SQL 2005 can be augmented so that you can validate common formats like phone numbers or cre...
null
CC BY-SA 2.5
null
2008-09-02T14:51:36.317
2008-09-02T14:51:36.317
null
null
2,029
null
39,708
2
null
39,628
1
null
If you're using ASP.Net there are a number of validation controls you can use. These controls are written in a very generic way, such that most of them automatically duplicate your validation logic between the client and server, even though you only set options for the control in one place. You are also free to inh...
null
CC BY-SA 2.5
null
2008-09-02T14:51:23.430
2008-09-02T14:51:23.430
null
null
3,043
null
39,695
2
null
31,494
7
null
> So is there some sort of algorithm that can give a percentage for how similar an entry is to another? Algorithms as Soundex and Edit distances (as suggested in a previous post) can solve some of your problems. However, if you are serious about cleaning your data, this will not be enough. As others have stated "B...
null
CC BY-SA 2.5
null
2008-09-02T14:43:05.680
2008-09-02T14:43:05.680
null
null
4,165
null
39,712
1
41,600
null
5
1,412
I would like to have all developers on my team to use the same rules for formatting several types of code (ASPX, CSS, JavaScript, C#). Can I have visual studio look to a common place for these rules? I would like to not rely on export/import settings as that brings many settings along. I (for example) don't care wha...
Visual Studio 2005/2008: How can you share/force all developers to use the same formatting rules?
CC BY-SA 3.0
null
2008-09-02T14:53:11.990
2013-05-15T09:59:35.307
2011-10-31T10:37:22.473
133
4,231
[ "visual-studio", "formatting" ]
39,715
2
null
39,712
3
null
If you're using C#, take a look at [StyleCop](http://code.msdn.microsoft.com/sourceanalysis).
null
CC BY-SA 2.5
null
2008-09-02T14:55:37.430
2008-09-02T14:55:37.430
null
null
133
null
39,713
2
null
39,691
2
null
Probably the single most important thing is to use a framework, such as [jQuery](http://jquery.com/), or [prototype](http://www.prototypejs.org/), to iron out the differences between browsers, and also make things easier in general.
null
CC BY-SA 2.5
null
2008-09-02T14:53:55.640
2008-09-02T14:53:55.640
null
null
1,612
null
39,719
2
null
39,661
0
null
CLR integration with SQL 2005 is particularly useful for user-defined functions/stored procs written in .NET and also user-defined data types. e.g. You could write a heavy duty data type that allows SQL to define objects and reference properties. You could write some super-duper datetime variation, for instance.
null
CC BY-SA 2.5
null
2008-09-02T14:56:37.350
2008-09-02T14:56:37.350
null
null
3,347
null
39,716
2
null
39,712
3
null
Visual Studio uses the settings in Tools > Options > Text Editor > [your language] > Formatting to set how it auto-formats code. You can set it up how you like and then use Tools > Import and Export settings to create a .settings file for your team to import and use. It won't enforce rules, but it will make the defau...
null
CC BY-SA 2.5
null
2008-09-02T14:56:08.973
2008-09-02T14:56:08.973
null
null
4,219
null
39,721
2
null
39,712
0
null
An extensive use of [Visual Assist](http://www.wholetomato.com/)'s snippets (bits of pre-formatted codes) may help...
null
CC BY-SA 2.5
null
2008-09-02T14:57:47.067
2008-09-02T14:57:47.067
null
null
4,177
null
39,723
2
null
39,691
5
null
I liked [JavaScript:The Good Parts](http://oreilly.com/catalog/9780596517748/) by Douglas Crockford although it's focused entirely on the language and ignores the DOM altogether.
null
CC BY-SA 2.5
null
2008-09-02T14:59:23.007
2008-09-02T15:59:41.160
2008-09-02T15:59:41.160
437
4,262
null
39,727
1
null
null
2
3,978
What .NET namespace or class includes both Context.Handler and Server.Transfer? I think one may include both and my hunt on MSDN returned null.
Namespace with Context.Handler and Server.Transfer?
CC BY-SA 3.0
null
2008-09-02T15:00:08.963
2013-12-02T13:03:47.320
2013-12-02T13:03:47.320
2,432,317
4,140
[ "c#", ".net", "namespaces" ]
39,704
1
null
null
4
4,931
I am trying to register to a "Device added/ Device removed" event using WMI. When I say device - I mean something in the lines of a Disk-On-Key or any other device that has files on it which I can access... I am registering to the event, and the event is raised, but the EventType propery is different from the one I am...
WMI and Win32_DeviceChangeEvent - Wrong event type returned?
CC BY-SA 3.0
0
2008-09-02T14:48:28.820
2012-06-13T20:00:24.007
2012-06-13T20:00:24.007
851,273
null
[ "event-handling", "wmi" ]