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,401
2
null
26,383
1
null
My usual approach is to use contract to handle any kind of error due to "client" invocation, that is, due to an external error (i.e ArgumentNullException). Every error on the arguments is not handled. An exception is raised and the "client" is in charge of handling it. On the other hand, for internal errors always try...
null
CC BY-SA 2.5
null
2008-08-25T17:00:45.273
2008-08-25T17:00:45.273
null
null
2,695
null
26,398
2
null
21,830
18
null
First of all, do you need to use them for text search indexing? GIN and GiST are index specialized for some data types. If you need to index simple char or integer values then the normal B-Tree index is the best. Anyway, PostgreSQL documentation has a chapter on [GIST](http://www.postgresql.org/docs/8.3/static/gist.htm...
null
CC BY-SA 2.5
null
2008-08-25T17:00:24.947
2008-08-25T17:00:24.947
null
null
1,005
null
26,407
2
null
26,301
1
null
For some reason Bubble Sort has always stood out to me. Not because it's elegant or good just because it had/has a goofy name I suppose.
null
CC BY-SA 2.5
null
2008-08-25T17:01:47.020
2008-08-25T17:01:47.020
null
null
2,109
null
26,403
2
null
26,383
6
null
I favor what you call the "contract" approach. Returning nulls or other special values to indicate errors isn't necessary in a language that supports exceptions. I find it much easier to understand code when it doesn't have a bunch of "if (result == NULL)" or "if (result == -1)" clauses mixed in with what could be ve...
null
CC BY-SA 2.5
null
2008-08-25T17:01:07.287
2008-08-25T17:01:07.287
null
null
1,175
null
26,404
2
null
26,260
0
null
When you say "precompile" the site, are you using the [aspnet_compiler](http://msdn.microsoft.com/en-us/library/ms229863%28VS.80%29.aspx) utility to precompile, or simply using the "Build site" option in Visual Studio? If you are not carrying out the former, I recommend [giving it a spin](http://odetocode.com/blogs/sc...
null
CC BY-SA 2.5
null
2008-08-25T17:01:22.263
2008-08-25T17:01:22.263
null
null
2,663
null
26,399
2
null
26,355
1
null
@DavidG and @KevenPang MVC is not limited to a web technology, in fact the original smalltalk MVC was for desktop applications. It works like this: - - - In pure Smalltalk MVC, the View is not limited to being a form, but can be any representation of Model Data...For example, if we had a Model that represented a s...
null
CC BY-SA 2.5
null
2008-08-25T17:00:28.317
2008-08-25T17:00:28.317
null
null
1,965
null
26,366
1
null
null
11
1,005
For the past 10 years or so there have been a smattering of articles and papers referencing Christopher Alexander's newer work "The Nature of Order" and how it can be applied to software. Unfortunately, the only works I can find are from James Coplien and Richard Gabriel; there is nothing beyond that, at least from my...
Beyond design patterns?
CC BY-SA 3.0
0
2008-08-25T16:40:44.497
2017-07-19T17:12:14.603
2017-07-19T17:12:14.603
7,750,640
1,799
[ "design-patterns" ]
26,408
2
null
24,221
7
null
Java also has the Annotation Processing Tool (apt) where not only you create annotations, but decide also how do these annotations work on the source code. [Here](http://download.oracle.com/javase/1.5.0/docs/guide/apt/GettingStarted.html) is an introduction.
null
CC BY-SA 3.0
null
2008-08-25T17:02:12.790
2012-07-31T12:17:44.620
2012-07-31T12:17:44.620
812,149
2,644
null
26,411
2
null
26,393
52
null
A selector engine is used to query a page's DOM for particular elements, based on some sort of query (usually CSS syntax or similar). For example, this jQuery: ``` $('div') ``` Would search for and return all of the <div> elements on the page. It uses jQuery's selector engine to do that. Optimizing the selector...
null
CC BY-SA 2.5
null
2008-08-25T17:03:51.897
2008-08-25T17:03:51.897
null
null
60
null
26,415
2
null
25,252
1
null
Since this is more along the lines of product support, your best bet is probably emailing the support people. We bought Zend Studio at my last job and they were always able to help us in a matter of hours. Feel free to post the answer though, I am sure there are more people looking for it. :)
null
CC BY-SA 2.5
null
2008-08-25T17:06:28.460
2008-08-25T17:06:28.460
null
null
2,859
null
26,417
2
null
26,393
5
null
Also, Sizzle is the engine John Resig is working on currently to replace jQuery's already fantastic selector engine.
null
CC BY-SA 2.5
null
2008-08-25T17:07:35.040
2008-08-25T17:07:35.040
null
null
77
null
26,416
2
null
8,398
1
null
Just make sure you have 'Disable Script Debugging' unchecked, and just hit F5 to start debugging in VS2005 or 2008. I would also note that if you have your JavaScript inside the .aspx page you will have to find it via the script explore. However if you have it in a separate .js file you can just put a break point on...
null
CC BY-SA 2.5
null
2008-08-25T17:07:04.417
2008-08-26T12:39:01.573
2008-08-26T12:39:01.573
2,469
2,469
null
26,409
2
null
1,711
2
null
Read [Head First Design Patterns](http://books.google.com/books?id=LjJcCnNf92kC&dq=head+first+design+patterns&pg=PP1&ots=_9Z38Ii7uY&sig=BQOPlemSK6VvYAapjbrHzCqr434&hl=en&sa=X&oi=book_result&resnum=4&ct=result) for a much more accessible introduction than the GoF book. I remember feeling like I'd leveled up after each ...
null
CC BY-SA 2.5
null
2008-08-25T17:02:29.013
2008-08-25T17:02:29.013
null
null
1,288
null
26,394
2
null
26,369
87
null
I love using the built-in [Application Settings](http://msdn.microsoft.com/en-us/library/a65txexh.aspx). Then you have built in support for using the settings designer if you want at design-time, or at runtime to use: ``` // read setting string setting1 = (string)Settings.Default["MySetting1"]; // save setting Setti...
null
CC BY-SA 3.0
null
2008-08-25T16:59:15.527
2015-11-06T17:33:12.597
2015-11-06T17:33:12.597
1,627
1,627
null
26,419
2
null
26,393
9
null
A selector engine is a way to traverse the DOM looking for a specific element. An example of a built in selector engine: ``` var foo = document.getElementById('foo'); ```
null
CC BY-SA 2.5
null
2008-08-25T17:07:50.607
2008-08-25T17:07:50.607
null
null
1,965
null
26,421
2
null
26,260
0
null
The initial slowness is a couple things: - - - This is normal behavior for ASP.NET.
null
CC BY-SA 2.5
null
2008-08-25T17:10:02.333
2008-08-25T17:10:02.333
null
null
1,965
null
26,418
2
null
26,393
19
null
A selector engine is a JavaScript library that lets you select elements in the DOM tree using some kind of string for identifying them (think regular expressions for DOM elements). Most selector engines use some variation of the CSS3 selectors syntax so, for example, you can write something like: ``` var paragraphs = ...
null
CC BY-SA 2.5
null
2008-08-25T17:07:40.420
2008-08-25T17:07:40.420
null
null
2,384
null
26,422
1
26,426
null
5
438
Do you know where I could find some useful third party (free) code snippets for VS 2008?
Third party Visual Studio snippets
CC BY-SA 2.5
0
2008-08-25T17:11:07.153
2014-12-31T07:41:06.113
2014-12-31T07:41:06.113
1,505,120
1,782
[ "visual-studio", "visual-studio-2008", "code-snippets" ]
26,426
2
null
26,422
6
null
[http://gotcodesnippets.com/](http://gotcodesnippets.com/) [http://www.codekeep.net/](http://www.codekeep.net/) has a VS add-in for their snippets, too
null
CC BY-SA 2.5
null
2008-08-25T17:11:55.497
2008-09-04T18:52:16.487
2008-09-04T18:52:16.487
2,688
2,688
null
26,383
1
26,403
null
12
879
I know two approaches to Exception handling, lets have a look at them. 1. Contract approach. When a method does not do what it says it will do in the method header, it will throw an exception. Thus the method "promises" that it will do the operation, and if it fails for some reason, it will throw an exception. 2. Exce...
Exception handling: Contract vs Exceptional approach
CC BY-SA 3.0
0
2008-08-25T16:52:23.110
2013-02-19T19:42:02.483
2020-06-20T09:12:55.060
-1
null
[ "exception" ]
26,397
2
null
26,301
33
null
General algorithms: - - [AVL trees](http://en.wikipedia.org/wiki/AVL_tree)- [Dijkstra](http://en.wikipedia.org/wiki/Dijkstra's_algorithm)[Ford-Fulkerson](http://en.wikipedia.org/wiki/Ford-Fulkerson_algorithm)- [LZW](http://en.wikipedia.org/wiki/LZW)- [FFT](http://en.wikipedia.org/wiki/Fft)- [simplex](http://en.wikiped...
null
CC BY-SA 2.5
null
2008-08-25T17:00:23.123
2008-08-25T17:15:52.430
2008-08-25T17:15:52.430
2,638
2,638
null
26,431
2
null
25,252
1
null
There's an option to debug a php script, run->run as->php script I believe it also has to be in your project root though. Just for clarification, Zend studio uses their own debugger, while the eclipse pdt project you have the option for Xdebug or Zend's debugger.
null
CC BY-SA 2.5
null
2008-08-25T17:17:43.487
2008-08-25T17:17:43.487
null
null
1,425
null
26,414
2
null
26,369
2
null
One approach that has worked for me in the past has been to create a settings class and use XML serialization to write it to the file system. You could extend this concept by creating a collection of settings objects and serializing it. You would have all of your settings for all users in one place without having to ...
null
CC BY-SA 2.5
null
2008-08-25T17:06:26.650
2008-08-25T17:06:26.650
null
null
2,470
null
26,424
2
null
26,369
5
null
Or write your settings in a xml file and save it using [Isolated Storage](http://msdn.microsoft.com/en-us/library/3ak841sy.aspx). Depending on the store you use it saves it in the Application Data folder. You can also choose a roaming enabled store which means when the user logs on a different computer the settings mov...
null
CC BY-SA 2.5
null
2008-08-25T17:11:33.080
2008-08-25T17:11:33.080
null
null
1,242
null
26,428
2
null
23,376
1
null
In the no-cost category, newer versions of [gzip](http://www.gzip.org/#faq10) and [bzip2](http://www.bzip.org/) are supposed to include large file support (someone on the internet tells me that bzip2 1.0.1 and beyond is large file compatible thanks to Cyril Pilsko, while gzip 1.2 can be patched which the dowloadable bi...
null
CC BY-SA 2.5
null
2008-08-25T17:14:16.613
2008-08-25T17:14:16.613
null
null
459
null
26,423
2
null
26,355
5
null
I personally think that the Mobile Software Factory doesn't hold much joy for CF. We still use one part of it (EventBroker) at work and I'd like to even remove that part if possible (as it doesn't support generic events and you have to cast the arguments into their strong types from EventArgs). A sister project at work...
null
CC BY-SA 2.5
null
2008-08-25T17:11:13.143
2008-08-25T17:16:59.243
2008-08-25T17:16:59.243
1,143
1,143
null
26,439
2
null
26,433
1
null
I don't know of anything in bash or on cp, but there are simple ways to do this sort of thing using (for example) a perl script: ``` ($op = shift) || die "Usage: rename perlexpr [filenames]\n"; for (@ARGV) { $was = $_; eval $op; die $@ if $@; rename($was,$_) unless $was eq $_; } ``` Then: ``` renam...
null
CC BY-SA 2.5
null
2008-08-25T17:21:13.150
2008-09-18T19:30:37.600
null
null
1,199
null
26,448
2
null
21,388
3
null
Just a thought considering : doesn't the spaced array option (#3) only postpone the problem of the normal array (#1)? Whatever algorithm you choose, either it's broken, and you'll run into problems with #3 later, or it works, and then #1 should work just as well.
null
CC BY-SA 2.5
null
2008-08-25T17:24:13.627
2008-08-25T17:24:13.627
null
null
1,037
null
26,435
2
null
26,065
1
null
We haven't done any/much I&T and use unit testing almost exclusively, seasoned with a bit of system testing. But our focus is clearly on unit testing. I'm pretty strict on the APIs we build/provide, so the assumption is, if it works by itself, it will work in conjunction and there hasn't been much wrong in it yet. Our...
null
CC BY-SA 2.5
null
2008-08-25T17:19:50.737
2008-08-25T17:19:50.737
null
null
2,859
null
26,427
2
null
8,398
0
null
> I usually use Firebug to deal with debugging JS. Unless you need to debug in IE, there's no need to stop using Firebug. It works with JavaScript in ASP.NET pages just as well as it does with any other type of page. Visual Studio's JavaScript debugging is alright, but really cannot compete with the full range of cl...
null
CC BY-SA 2.5
null
2008-08-25T17:13:06.727
2012-12-06T05:40:55.950
2012-12-06T05:40:55.950
60
60
null
26,433
1
26,456
null
9
818
Say I have three files (template_*.txt): - - - I want to copy them to three new files (foo_*.txt). - - - Is there some simple way to do that with one command, e.g. `cp --enableAwesomeness template_*.txt foo_*.txt`
Bash One Liner: copy template_*.txt to foo_*.txt?
CC BY-SA 2.5
null
2008-08-25T17:18:50.083
2012-06-07T16:42:22.417
null
null
437
[ "bash" ]
26,451
2
null
26,433
3
null
``` [01:22 PM] matt@Lunchbox:~/tmp/ba$ ls template_x.txt template_y.txt template_z.txt [01:22 PM] matt@Lunchbox:~/tmp/ba$ for i in template_*.txt ; do mv $i foo${i:8}; done [01:22 PM] matt@Lunchbox:~/tmp/ba$ ls foo_x.txt foo_y.txt foo_z.txt ```
null
CC BY-SA 2.5
null
2008-08-25T17:25:23.827
2008-08-25T17:25:23.827
null
null
1,322
null
26,456
2
null
26,433
11
null
null
CC BY-SA 2.5
null
2008-08-25T17:26:57.503
2008-08-28T00:02:11.703
2008-08-28T00:02:11.703
234
1,412
null
26,452
1
26,462
null
6
4,013
I'm trying to bind the following shortcut: to close tabs How can you customize VS to add/change shortcuts? Also, what are the most useful shortcuts you guys have found?
Visual Studio 2005 Shortcuts
CC BY-SA 2.5
0
2008-08-25T17:25:33.857
2017-06-29T13:27:50.103
2009-03-25T18:17:02.590
14,444
40
[ "visual-studio", "visual-studio-2005", "shortcut" ]
26,455
1
26,484
null
26
4,246
Do you use Design by Contract professionally? Is it something you have to do from the beginning of a project, or can you change gears and start to incorporate it into your software development lifecycle? What have you found to be the pros/cons of the design approach? I came across the [Design by Contract](http://en.wi...
Does Design By Contract Work For You?
CC BY-SA 2.5
0
2008-08-25T17:26:47.163
2010-11-18T05:19:10.330
2009-06-22T13:54:07.840
96,780
null
[ "design-by-contract" ]
26,450
1
null
null
2
3,135
Is there any way to save an object using Hibernate if there is already an object using that identifier loaded into the session? - `session.contains(obj)`- `merge(obj)`
Hibernate saveOrUpdate with another object in the session
CC BY-SA 3.0
0
2008-08-25T17:25:22.610
2017-08-09T20:14:13.173
2017-08-09T20:14:13.173
1,836,618
2,875
[ "hibernate", "orm" ]
26,457
2
null
26,452
2
null
Tools > Options > Environment > Keyboard I find most of them useful TBH! Commenting, Bookmarking, Incremental Search, etc etc. The one you want to override by the way is which defaults to +
null
CC BY-SA 3.0
null
2008-08-25T17:27:18.907
2017-06-29T13:09:11.973
2017-06-29T13:09:11.973
5,982,710
832
null
26,458
1
null
null
47
33,358
Is there any IDE that simplifies creating Swing applications (ideally something along the lines of Visual Studio)
IDE for Swing applications development
CC BY-SA 4.0
0
2008-08-25T17:27:19.330
2022-04-06T10:31:45.193
2022-04-06T10:31:45.193
5,446,749
2,875
[ "java", "swing", "ide" ]
26,447
2
null
26,433
2
null
This should work: ``` for file in template_*.txt ; do cp $file `echo $file | sed 's/template_\(.*\)/foo_\1/'` ; done ```
null
CC BY-SA 2.5
null
2008-08-25T17:24:13.457
2008-08-25T17:24:13.457
null
null
497
null
26,461
2
null
25,952
4
null
I think [.NET Terrarium](http://www.codeplex.com/terrarium2) is one of the best 'learn-to-program' games for the .NET platform.
null
CC BY-SA 2.5
null
2008-08-25T17:27:36.550
2008-08-25T17:27:36.550
null
null
2,029
null
26,441
2
null
26,433
1
null
``` for i in template_*.txt; do cp -v "$i" "`echo $i | sed 's%^template_%foo_%'`"; done ``` Probably breaks if your filenames have funky characters in them. Remove the '-v' when (if) you get confidence that it works reliably.
null
CC BY-SA 2.5
null
2008-08-25T17:21:35.990
2008-08-25T17:21:35.990
null
null
755
null
26,460
2
null
26,301
3
null
The iterative algorithm for Fibonacci, because for me it nailed down the fact that the most elegant code (in this case, the recursive version) is not necessarily the most efficient. To elaborate- The "fib(10) = fib(9) + fib(8)" approach means that fib(9) will be evaluated to fib(8) + fib(7). So evaluation of fib(8) ...
null
CC BY-SA 2.5
null
2008-08-25T17:27:35.210
2008-08-25T17:27:35.210
null
null
2,876
null
26,470
2
null
26,458
20
null
I like the [Swing GUI Builder](http://www.netbeans.org/features/java/swing.html) from the [NetBeans IDE](http://www.netbeans.org/).
null
CC BY-SA 2.5
null
2008-08-25T17:33:53.230
2008-08-25T17:33:53.230
null
null
755
null
26,468
2
null
26,450
4
null
Have you tried calling .SaveOrUpdateCopy()? It should work in all instances, if there is an entity by the same id in the session or if there is no entity at all. This is basically the catch-all method, as it converts a transient object into a persistent one (Save), updates the object if it is existing (Update) or even...
null
CC BY-SA 2.5
null
2008-08-25T17:32:23.343
2008-08-25T18:06:19.640
2008-08-25T18:06:19.640
1,143
1,143
null
26,467
2
null
26,452
3
null
I keep a link to Jeff's [shortcuts page](http://www.codinghorror.com/blog/files/Visual%20Studio%20.NET%202005%20Keyboard%20Shortcuts.htm), and refer to it to learn the shortcuts for all tasks I find myself regularly doing. I also use VisualAssist, and use a lot of: - -
null
CC BY-SA 3.0
null
2008-08-25T17:30:32.473
2017-06-29T13:27:50.103
2017-06-29T13:27:50.103
5,982,710
2,638
null
26,462
2
null
26,452
6
null
Tools > Options > (Show all settings), then Environment > Keyboard. Here, rebind the key “File.Close” to +.
null
CC BY-SA 3.0
null
2008-08-25T17:28:26.377
2015-08-20T22:19:28.417
2015-08-20T22:19:28.417
7,226
1,968
null
26,469
2
null
26,458
7
null
Netbeans has some GUI-building support, and it's one of the most popular Java IDEs on the market. Give it a look.
null
CC BY-SA 2.5
null
2008-08-25T17:33:05.430
2008-08-25T17:33:05.430
null
null
1,344
null
26,453
2
null
3,713
3
null
> The Microsoft AJAX library will accomplish this. You could also create your own solution that involves using AJAX to call your own aspx (as basically) script files to run .NET functions. This is the library called AjaxPro which was written an MVP named [Michael Schwarz](http://weblogs.asp.net/mschwarz/about.aspx). T...
null
CC BY-SA 3.0
null
2008-08-25T17:25:36.917
2016-12-09T17:47:35.877
2016-12-09T17:47:35.877
63,550
2,469
null
26,476
2
null
25,952
0
null
There is a Spanish Java Page who organice a football leage in wich the users program the skills of their team and the strategy. You only need to download the framework and implement a little interface, then you can simulate matchs which are seen in the screen. When you are happy with your team and strategy you submit t...
null
CC BY-SA 3.0
null
2008-08-25T17:37:30.130
2012-01-27T02:54:05.513
2012-01-27T02:54:05.513
956,033
518
null
26,474
2
null
26,458
1
null
I used to use MyEclipse quite a bit. It had a decent IDE for making Swing forms and such. I assume it has improved in the past year - they seem to add features in gobs and heaps, quite often. [http://www.myeclipseide.com/](http://www.myeclipseide.com/)
null
CC BY-SA 2.5
null
2008-08-25T17:36:28.683
2008-08-25T17:36:28.683
null
null
2,878
null
26,481
2
null
26,458
5
null
The latest version of NetBeans include a very nice and simple visual editor for Swing called Matisse [Matisse](http://www.netbeans.org/kb/articles/matisse.html)
null
CC BY-SA 2.5
null
2008-08-25T17:39:57.113
2008-08-25T17:39:57.113
null
null
518
null
26,475
2
null
24,821
2
null
You should make sure that neither IIS nor any other filter is trying to compress your response. It is very possible that your production server has IIS compression enabled for dynamic pages such as those with the .aspx suffix, and your development server does not. If this is the case, IIS may be waiting for the entir...
null
CC BY-SA 2.5
null
2008-08-25T17:37:00.490
2008-08-25T17:37:00.490
null
null
1,335
null
26,482
2
null
25,646
1
null
> I've always had problems with OpenGL implementations from Intel This is kind of what I'm worried about, but I have a hard time believing they'd screw up something as basic as glDrawPixels, and also, since I can "duplicate" the problem by changing the raster position vector, it makes me think it's my fault and I'm ...
null
CC BY-SA 2.5
null
2008-08-25T17:40:46.800
2008-08-25T17:40:46.800
null
null
1,329,401
null
26,483
2
null
24,821
5
null
Hey, Jason. Sorry you're still having trouble with this. What I would do is set up a simple page like: ``` protected void Page_Load(object sender, EventArgs e) { for (int i = 0; i < 10; i++) { Response.Write(i + "<br />"); Response.Flush(); Thread.Sleep(1000); } } ``` As we discussed before, m...
null
CC BY-SA 2.5
null
2008-08-25T17:41:10.967
2008-08-25T17:41:10.967
null
null
60
null
26,509
1
null
null
-1
153
I haven't been to enough of these "live" events to really determine which, if any, are worth the time / money. Which ones do you attend and why?
What workshops / user groups / conventions do you attend?
CC BY-SA 2.5
null
2008-08-25T17:55:58.997
2011-09-07T00:29:40.673
null
null
1,574
[ "networking" ]
26,498
2
null
7,991
91
null
I'd like to add another vote for the StringFormat object. You can use this simply to specify "center, center" and the text will be drawn centrally in the rectangle or points provided: ``` StringFormat format = new StringFormat(); format.LineAlignment = StringAlignment.Center; format.Alignment = StringAlignment.Center;...
null
CC BY-SA 3.0
null
2008-08-25T17:49:38.463
2017-10-09T15:39:34.130
2017-10-09T15:39:34.130
395,500
1,143
null
26,478
1
49,638
null
1
460
I'm having trouble getting the following to work in SQL Server 2k, but it works in 2k5: ``` --works in 2k5, not in 2k create view foo as SELECT usertable.legacyCSVVarcharCol as testvar FROM usertable WHERE rsrcID in ( select val from dbo.fnSplitStringToInt(usertable.legacyCSVVarc...
Incosistency between MS Sql 2k and 2k5 with columns as function arguments
CC BY-SA 2.5
0
2008-08-25T17:38:50.470
2010-07-22T19:47:03.480
2010-07-22T19:47:03.480
5,696,608
2,327
[ "sql-server" ]
26,485
2
null
26,455
2
null
It's absolutely foolish to not design by contract when doing anything in an SOA realm, and it's always helpful if you're working on any sort of modular work, where bits & pieces might be swapped out later on, especially if any black boxen are involved.
null
CC BY-SA 2.5
null
2008-08-25T17:42:30.243
2008-08-25T17:42:30.243
null
null
35
null
26,512
1
null
null
2
4,967
I have a ComboBox that I bind to a standard HTTPService, I would like to add an event listener so that I can run some code after the ComboBox is populated from the data provider. How can I do this?
Can I add an event listener to a databinding action in Flex?
CC BY-SA 2.5
null
2008-08-25T17:56:40.537
2010-07-29T20:33:16.413
2008-08-25T18:06:58.017
35
1,638
[ "apache-flex", "data-binding" ]
26,490
2
null
19,487
3
null
I essentially do the same thing Jon does, but here are a few other ideas: 1. Use Guides in Photoshop (and lock to them). Figure out all of your dimensions for each box/ region ahead of time. 2. Collect all of your dimensions and color hex values into an info file (I use a txt file) that you can easily reference. This...
null
CC BY-SA 3.0
null
2008-08-25T17:45:16.493
2015-08-20T22:19:12.793
2015-08-20T22:19:12.793
7,226
2,166
null
26,517
2
null
26,458
2
null
I'm a big fan of JetBrains, and when it comes to Java, [IntelliJ](http://www.jetbrains.com/idea/index.html) is the best IDE I have used. For Swing, they have a fully interactive UI builder. And, for actual coding, their intellisense can't be beat.
null
CC BY-SA 2.5
null
2008-08-25T17:59:44.557
2008-08-25T17:59:44.557
null
null
338
null
26,521
2
null
26,509
0
null
I used to belong to my local Linux User Group which I co-founded but I treated it more as a social event than anything else but obviously a social event full of geeks is still a great way to get a great debate going :) Conventions and the like I've not got much out of other than being pestered by businesses who can of...
null
CC BY-SA 2.5
null
2008-08-25T18:02:26.030
2008-08-25T18:02:26.030
null
null
269
null
26,522
1
26,582
null
3
2,102
Let's say I have a .NET Array of n number of dimensions. I would like to foreach through the elements and print out something like: ``` [0, 0, 0] = 2 [0, 0, 1] = 32 ``` And so on. I could write a loop using some the Rank and dimension functions to come up with the indices. Is there a built in function instead?
.NET Multi Dimensional Array Printing
CC BY-SA 2.5
null
2008-08-25T18:02:48.713
2013-01-24T10:12:22.053
null
null
632
[ "c#", ".net", "arrays" ]
26,515
1
26,537
null
2
860
I have a habit of keeping my variable usage to a bare minimum. So I'm wondering if there is any advantage to be gained by the following: ``` $query = $mysqli->query('SELECT * FROM `people` ORDER BY `name` ASC LIMIT 0,30'); // Example 1 $query = $query->fetch_assoc(); // Example 2 $query_r = $query->fetch_assoc(); $...
Using MySQLi - which is better for closing queries
CC BY-SA 2.5
0
2008-08-25T17:59:28.847
2009-03-06T16:51:49.370
2009-03-06T16:51:49.370
null
2,025
[ "php", "mysql", "memory", "mysqli" ]
26,546
2
null
26,522
1
null
[Take a look at this:](http://forums.msdn.microsoft.com/en-US/csharplanguage/thread/2ca85aa4-0672-40ad-b780-e181b28fcd80/) might helpful for you.
null
CC BY-SA 3.0
null
2008-08-25T18:11:57.303
2013-01-24T10:12:22.053
2013-01-24T10:12:22.053
1,410,342
2,104
null
26,484
2
null
26,455
16
null
I can't recommend it highly enough. It's particularly nice if you have a suite that takes inline documentation contract specifications, like so: ``` // @returns null iff x = 0 public foo(int x) { ... } ``` and turns them into generated unit tests, like so: ``` public test_foo_returns_null_iff_x_equals_0() { as...
null
CC BY-SA 2.5
null
2008-08-25T17:41:29.530
2008-10-06T17:45:05.760
2008-10-06T17:45:05.760
1,190
1,190
null
26,537
2
null
26,515
5
null
The [manual](http://us2.php.net/manual/en/mysqli-result.free.php) seems to suggest that you should still be using `free()` to release the memory. I believe the reasoning is that `free()` is freeing the memory in , not in PHP. Since PHP can't garbage-collect for MySQL, you need to call `free()`.
null
CC BY-SA 2.5
null
2008-08-25T18:08:38.373
2008-08-25T18:08:38.373
null
null
1,344
null
26,536
1
26,684
null
9
6,216
My coworker and I have encountered a nasty situation where we have to use an active X control to manipulate a web camera on a page. Is it possible to assign a javascript event handler to a button in the active x control so that it would fire an action on the page when clicked, or do we have to create a button on the ...
Active X Control JavaScript
CC BY-SA 3.0
null
2008-08-25T18:07:57.110
2017-02-15T21:50:21.847
2015-04-17T18:11:40.827
1,215,724
1,942
[ "javascript", "activex" ]
26,548
2
null
26,383
0
null
If you are actually interested in exceptions and want to think about how to use them to construct robust systems, consider reading [Making reliable distributed systems in the presence of software errors](http://www.erlang.org/download/armstrong_thesis_2003.pdf).
null
CC BY-SA 2.5
null
2008-08-25T18:13:44.443
2008-08-25T18:13:44.443
null
null
338
null
26,535
2
null
22,873
5
null
Effective Java is a must but I recommend being comfortable with Java first to fully understand the examples.
null
CC BY-SA 2.5
null
2008-08-25T18:07:50.887
2008-08-25T18:07:50.887
null
null
2,644
null
26,542
2
null
26,455
1
null
In lieu of more expressive type systems, I would absolutely use design by contract on military grade projects. For weakly typed languages or languages with dynamic scope (PHP, JavaScript), functional contracts are also very handy. For everything else, I would toss it aside an rely upon beta testers and unit tests. [...
null
CC BY-SA 2.5
null
2008-08-25T18:10:20.380
2008-08-25T18:10:20.380
2017-05-23T10:29:43.280
-1
338
null
26,552
1
26,555
null
14
14,318
What are the advantages and disadvantages of turning `NOCOUNT` off in SQL server queries? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
What are the advantages and disadvantages of turning NOCOUNT off in SQL server queries?
CC BY-SA 3.0
0
2008-08-25T18:14:21.197
2017-07-19T17:47:06.307
2017-07-19T17:47:06.307
7,750,640
2,141
[ "sql-server", "nocount" ]
26,545
2
null
26,458
35
null
Like others have mentioned, NetBeans' visual editor is pretty good, but it's based pretty heavily on the [Swing Application Framework](https://java.net/projects/appframework/), so you'd need to get an understanding of how it works to properly use it (although you don't need to dig in to just test things). Other than t...
null
CC BY-SA 3.0
null
2008-08-25T18:11:28.740
2018-02-10T00:47:34.063
2018-02-10T00:47:34.063
63,550
2,881
null
26,547
1
26,589
null
2
529
Let's say that you want to create a dead simple BlogEditor and, one of your ideas, is to do what Live Writer does and ask only the URL of the persons Blog. How can you detect what type of blog is it? Basic detection can be done with the URL itself, such as “[http://myblog.blogger.com](http://myblog.blogger.com)” etc. ...
How to detect which blog API
CC BY-SA 3.0
null
2008-08-25T18:13:40.420
2013-12-02T12:48:11.227
2013-12-02T12:48:11.227
2,432,317
2,644
[ "java", "api", "blogs" ]
26,561
2
null
26,552
8
null
And it's not just the network traffic that is reduced. There is a boost internal to SQL Server because the execution plan can be optimized due to reduction of an extra query to figure out how many rows were affected.
null
CC BY-SA 2.5
null
2008-08-25T18:18:00.097
2008-08-25T18:18:00.097
null
null
380
null
26,558
2
null
20,047
1
null
So what's the problem with implementing a retry mechanism? There will always be the possibility of a deadlock ocurring so why not have some logic to identify it and just try again? Won't at least some of the other options introduce performance penalties that are taken all the time when a retry system will kick in r...
null
CC BY-SA 2.5
null
2008-08-25T18:16:49.100
2008-08-25T18:16:49.100
null
null
2,862
null
26,553
2
null
26,512
0
null
You can use `BindingUtils` to get notified when the `dataProvider` property of the combo box changes: ``` BindingUtils.bindSetter(comboBoxDataProviderChanged, comboBox, "dataProvider"); ``` `BindingUtils` lives in the `mx.binding.utils` package. I have a longer description of how to work with `BindingUtils` here: [...
null
CC BY-SA 2.5
null
2008-08-25T18:14:53.473
2008-08-25T18:14:53.473
2017-05-23T11:48:36.327
-1
1,109
null
26,562
2
null
26,552
4
null
It simply stops the message that shows the # of rows effected for being sent/displayed, which provides a benefit, especially if you have many statements that will return the message. It improves performance since less data is being sent over the network (between the sql server and front end). More at BOL: [SET NOCOU...
null
CC BY-SA 2.5
null
2008-08-25T18:18:05.447
2008-08-25T18:18:05.447
null
null
1,368
null
26,555
2
null
26,552
18
null
From SQL BOL: > SET NOCOUNT ON prevents the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. For stored procedures that contain several statements that do not return much actual data, , because network traffic is greatly reduced. See [http://msdn.microsoft.com/en-...
null
CC BY-SA 2.5
null
2008-08-25T18:15:57.747
2008-08-25T18:15:57.747
null
null
1,627
null
26,563
2
null
26,512
0
null
You can also listen for the `ResultEvent.RESULT` on the HTTPService, that would be called slightly before the combo box got populated I guess, but it might be good enough.
null
CC BY-SA 2.5
null
2008-08-25T18:18:40.330
2008-08-25T18:18:40.330
null
null
1,109
null
26,566
2
null
26,552
1
null
I always have it set to ON for the reasons above, but if you have more than 1 result set in your proc it could mess up client code
null
CC BY-SA 2.5
null
2008-08-25T18:19:09.050
2008-08-25T18:19:09.050
null
null
740
null
26,570
1
26,600
null
21
11,444
I'm looking for a way to get the size of an instance of a reference type. sizeof is only for value types. Is this possible?
sizeof() equivalent for reference types?
CC BY-SA 2.5
0
2008-08-25T18:19:57.563
2011-08-19T14:02:37.540
2008-09-09T14:55:47.807
2,361
1,786
[ "c#", ".net" ]
26,556
2
null
26,551
63
null
Yep, and just don't forget to use variables like `%%1` when using `if` and `for` and the gang. If you forget the double `%`, then you will be substituting in (possibly null) command line arguments and you will receive some pretty confusing error messages.
null
CC BY-SA 2.5
null
2008-08-25T18:16:32.957
2008-08-25T18:16:32.957
null
null
338
null
26,559
1
26,597
null
25
10,918
I know there are a lot of positive things mod-rewrite accomplishes. But are there any negative? Obviously if you have poorly written rules your going to have problems. But what if you have a high volume site and your constantly using mod-rewrite, is it going to have a significant impact on performance? I did a quick s...
Any negative impacts when using Mod-Rewrite?
CC BY-SA 3.0
0
2008-08-25T18:17:11.377
2015-10-08T01:09:42.233
2015-10-08T01:08:35.423
67,579
2,687
[ "performance", "mod-rewrite" ]
26,551
1
92,057
null
1,373
2,337,027
I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file. Here's what the command line looks like: ``` test.cmd admin P@55w0rd > test-log.txt ```
How can I pass arguments to a batch file?
CC BY-SA 4.0
0
2008-08-25T18:14:18.437
2022-07-28T22:53:26.763
2019-01-30T10:03:02.953
10,607,772
730
[ "batch-file", "arguments" ]
26,577
2
null
26,478
0
null
I don't think functions can have default values in functions in SS2K. What happens when you run this SQL in SS2K? ``` select val from dbo.fnSplitStringToInt('1,2,3', default) ```
null
CC BY-SA 2.5
null
2008-08-25T18:21:56.733
2008-08-25T18:33:27.843
2008-08-25T18:33:27.843
2,173
2,173
null
26,573
2
null
17,966
2
null
I'm new to Air, but also haven't found any way to customize the install process. It looks like you're limited to your application code. (Updating appears more flexible.) From your example, it looks like you want your app' to run with a parameter constant each time Windows starts. So you're probably already aware yo...
null
CC BY-SA 2.5
null
2008-08-25T18:20:59.420
2008-08-25T18:20:59.420
null
null
2,882
null
26,568
2
null
26,509
2
null
For conventions, if you're still in university, and can make it to Montreal, Canada, the [Canadian Undergraduate Software Engineering Conference](http://www.cusec.net/) (CUSEC) has been extremely enjoyable. See the [2009](http://2009.cusec.net/) site for the next event, and for a take on what previous years have been ...
null
CC BY-SA 2.5
null
2008-08-25T18:19:27.427
2008-08-25T18:19:27.427
2017-05-23T10:27:50.457
-1
2,134
null
26,580
2
null
26,512
1
null
You can use a mx.binding.utils.ChangeWatcher as described [here](http://www.adobe.com/livedocs/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=databinding_091_08.html).
null
CC BY-SA 2.5
null
2008-08-25T18:23:20.677
2008-08-25T18:23:20.677
null
null
2,168
null
26,579
2
null
26,547
1
null
Some blogs provide a Generator meta tag - e.g. Wordpress - you could find out if there's any exceptions to this. You'll have to be careful how you detect it though, Google surprised me with this line: ``` <meta content='blogger' name='generator'/> ``` Single quotes are blasphemy.
null
CC BY-SA 2.5
null
2008-08-25T18:22:54.687
2008-08-25T18:22:54.687
null
null
2,025
null
26,578
2
null
769
2
null
Personally, I'm partial to the algorithms of [Numerical Recipes](http://www.nr.com/). (I'm fond of the C++ edition.) This book will teach you why the algorithms work, plus show you some pretty-well debugged implementations of those algorithms. Of course, you could just blindly use [CLAPACK](http://www.netlib.org/clap...
null
CC BY-SA 2.5
null
2008-08-25T18:22:48.010
2008-08-25T18:22:48.010
null
null
338
null
26,567
1
30,409
null
17
64,880
I have a report with many fields that I'm trying to get down to 1 page horizontally (I don't care whether it's 2 or 200 pages vertically... just don't want to have to deal with 2 pages wide by x pages long train-wreck). That said, it deals with contact information. My idea was to do: ``` Name: Address: City: ...
How do I set a textbox to multi-line in SSRS?
CC BY-SA 3.0
null
2008-08-25T18:19:18.627
2017-08-13T05:06:38.150
2017-07-19T17:04:08.630
7,750,640
2,156
[ "reporting-services", "textbox", "multiline" ]
26,582
2
null
26,522
2
null
Thanks for the answer, here is what I wrote while I waited: ``` public static string Format(Array array) { var builder = new StringBuilder(); builder.AppendLine("Count: " + array.Length); var counter = 0; var dimensions = new List<int>(); for (int i = 0; i < array.Rank; i++) { dimensio...
null
CC BY-SA 2.5
null
2008-08-25T18:23:38.977
2008-08-25T18:23:38.977
null
null
632
null
26,592
2
null
22,873
1
null
I know this is a cross post from [here](https://stackoverflow.com/questions/26437/book-recommendation-for-java-good-practices)... but, I think one of the best Java books is [Java Concurrency in Practice](https://rads.stackoverflow.com/amzn/click/com/0321349601) by Brian Goetz. A rather advanced book - but, it will wea...
null
CC BY-SA 2.5
null
2008-08-25T18:26:43.743
2008-08-25T18:36:49.757
2017-05-23T12:18:29.303
-1
828
null
26,594
1
26,710
null
4
691
What libraries/methods do you know of that can do some basic HTML representation in Swing? Can you comment on your experience?
Previewing HTML in Java
CC BY-SA 4.0
0
2008-08-25T18:27:09.950
2019-12-03T20:42:41.677
2019-12-03T20:42:41.677
12,475,991
2,644
[ "java", "html" ]
26,590
2
null
26,570
1
null
Beware that Marshal.SizeOf is for unsafe code... I don't think it's possible for managed code though, maybe you can explain your problem, there may be another way to solve it
null
CC BY-SA 2.5
null
2008-08-25T18:25:56.583
2008-08-25T18:25:56.583
null
null
1,782
null
26,588
2
null
26,552
0
null
I personally like to turn on for queries that get run in an manual fashion and use a lot of `Print` statements to output debugging messages. In this way, your output would look less like: And more like Depending on the sensitivity of what you're updating, sometimes it is helpful to include the counts; however, ...
null
CC BY-SA 2.5
null
2008-08-25T18:25:34.617
2008-08-25T18:25:34.617
null
null
1,108
null
26,600
2
null
26,570
10
null
If you don't mind it being a little less accurate than perfect, and for comparative purposes, you could serialize the object/s and measure that (in bytes for example) : Because it's a little more complicated than sizeof for valuetypes, for example: reference types can have references to other objects and so on... ther...
null
CC BY-SA 2.5
null
2008-08-25T18:31:00.813
2008-08-25T18:36:23.627
2008-08-25T18:36:23.627
1,782
1,782
null
26,589
2
null
26,547
3
null
Many (most?) blogs will have a meta tag for "generator" which will list the blog engine. For example a blogger blog will contain the following meta tag: ``` <meta name="generator" content="Blogger" /> ``` My Subtext blog shows the following generator meta tag: ``` <meta name="Generator" content="Subtext Version...
null
CC BY-SA 2.5
null
2008-08-25T18:25:51.920
2008-08-25T18:25:51.920
null
null
1,627
null
26,595
1
26,611
null
227
32,538
Is there any difference between: ``` if foo is None: pass ``` and ``` if foo == None: pass ``` The convention that I've seen in most Python code (and the code I myself write) is the former, but I recently came across code which uses the latter. None is an instance (and the only instance, IIRC) of NoneType, so it...
Is there any difference between "foo is None" and "foo == None"?
CC BY-SA 2.5
0
2008-08-25T18:27:16.330
2019-04-03T07:18:57.980
null
null
156
[ "python" ]