question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
151,496 | 151,543 | Expressing Excel formula in Java (decimal to time interpretation) | I am converting an excel sheet formula to java but I can't understand how excel manages to take the following: 0.22 Applies a formula: =TEXT(R5/14, "h:mm") and somehow arrives at: 0.22 Again if I provide: 2.8 it arrives at 4.48 Can someone please explain to me how it does this. I have read a little regarding decimal an... | Excel stores datetime values as: The number to the left of the decimal represents the number of days since January 1, 1900 The number to the right of the decimal represents the fractional portion of a 24-hour day In your example, you are converting a decimal to a textual representation of the hour and minute portions o... | Expressing Excel formula in Java (decimal to time interpretation) I am converting an excel sheet formula to java but I can't understand how excel manages to take the following: 0.22 Applies a formula: =TEXT(R5/14, "h:mm") and somehow arrives at: 0.22 Again if I provide: 2.8 it arrives at 4.48 Can someone please explain... | TITLE:
Expressing Excel formula in Java (decimal to time interpretation)
QUESTION:
I am converting an excel sheet formula to java but I can't understand how excel manages to take the following: 0.22 Applies a formula: =TEXT(R5/14, "h:mm") and somehow arrives at: 0.22 Again if I provide: 2.8 it arrives at 4.48 Can some... | [
"java",
"excel",
"datetime",
"decimal"
] | 1 | 1 | 4,289 | 5 | 0 | 2008-09-30T02:08:36.347000 | 2008-09-30T02:28:32.647000 |
151,505 | 151,774 | Difference between a class and a module | I came from Java, and now I am working more with Ruby. One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a module over a class? | The first answer is good and gives some structural answers, but another approach is to think about what you're doing. Modules are about providing methods that you can use across multiple classes - think about them as "libraries" (as you would see in a Rails app). Classes are about objects; modules are about functions. ... | Difference between a class and a module I came from Java, and now I am working more with Ruby. One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a module over a class? | TITLE:
Difference between a class and a module
QUESTION:
I came from Java, and now I am working more with Ruby. One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a module over a class?
ANSWER:
The first answer is good and gives some... | [
"ruby",
"class",
"module"
] | 465 | 429 | 170,859 | 9 | 0 | 2008-09-30T02:11:29.867000 | 2008-09-30T04:38:39.620000 |
151,520 | 151,529 | Should I provide a deep clone when implementing ICloneable? | It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option? | Short answer: Yes. Long Answer: Don't use ICloneable. That is because.Clone isn't defined as being a shallow or a deep clone. You should implement your own IClone interface, and describe how the clone should work. | Should I provide a deep clone when implementing ICloneable? It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option? | TITLE:
Should I provide a deep clone when implementing ICloneable?
QUESTION:
It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option?
ANSWER:
Short answer: Yes. Long Answer: Don't use ICloneable. That is because.Clone isn... | [
".net",
"oop"
] | 6 | 15 | 876 | 3 | 0 | 2008-09-30T02:17:13.207000 | 2008-09-30T02:19:54.137000 |
151,521 | 153,282 | Linq to XML for KML? | I'm a LINQ to XML newbie, and a KML newbie as well; so bear with me. My goal is to extract individual Placemarks from a KML file. My KML begins thusly: Concessions 1 1 IN920211 relativeToGround 11.728374,1.976421,0 11.732967,1.965322,0 11.737225,1.953161,0 11.635858,1.940812,0 11.658102,1.976874,0 11.728374,1.976421,0.... | Thanks to spoon16 and Bruce Murdock for pointing me in the right direction. The code that spoon16 posted works, but forces you to concatenate the namespace with every single element name, which isn't as clean as I'd like. I've done a bit more searching and I've figured out how this is supposed to be done - this is supe... | Linq to XML for KML? I'm a LINQ to XML newbie, and a KML newbie as well; so bear with me. My goal is to extract individual Placemarks from a KML file. My KML begins thusly: Concessions 1 1 IN920211 relativeToGround 11.728374,1.976421,0 11.732967,1.965322,0 11.737225,1.953161,0 11.635858,1.940812,0 11.658102,1.976874,0 ... | TITLE:
Linq to XML for KML?
QUESTION:
I'm a LINQ to XML newbie, and a KML newbie as well; so bear with me. My goal is to extract individual Placemarks from a KML file. My KML begins thusly: Concessions 1 1 IN920211 relativeToGround 11.728374,1.976421,0 11.732967,1.965322,0 11.737225,1.953161,0 11.635858,1.940812,0 11.... | [
"vb.net",
"linq-to-xml",
"kml"
] | 6 | 1 | 5,756 | 5 | 0 | 2008-09-30T02:17:39.507000 | 2008-09-30T14:26:15.590000 |
151,528 | 151,980 | Textarea in IE7 disappears on mouse over | I have this big data-entry sort of page, a table kind of layout using divs. Each row has subrows which can be toggled open/closed. The toggling is triggered using css visibility settings. Each "cell" of the table has a little image in its corner, you click on the image, and a popup window opens that allows you to put n... | in addition to block elements the z-index works for all elements that have what IE calls hasLayout read more | Textarea in IE7 disappears on mouse over I have this big data-entry sort of page, a table kind of layout using divs. Each row has subrows which can be toggled open/closed. The toggling is triggered using css visibility settings. Each "cell" of the table has a little image in its corner, you click on the image, and a po... | TITLE:
Textarea in IE7 disappears on mouse over
QUESTION:
I have this big data-entry sort of page, a table kind of layout using divs. Each row has subrows which can be toggled open/closed. The toggling is triggered using css visibility settings. Each "cell" of the table has a little image in its corner, you click on t... | [
"html",
"css",
"internet-explorer-7",
"html-input"
] | 5 | 6 | 3,914 | 4 | 0 | 2008-09-30T02:19:40.843000 | 2008-09-30T06:32:33.513000 |
151,555 | 168,185 | How do I execute a page-defined JavaScript function from a Firefox extension? | I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not inside extension, but a page that is loaded by Firefox): document.funcToBeCalled = function() { // function body }; Then, the extension will run this on ... | It is for security reasons that you have limited access to the content page from extension. See XPCNativeWrapper and Safely accessing content DOM from chrome, If you control the page, the best way to do this is set up an event listener in the page and dispatch an event from your extension (addEventListener in the page,... | How do I execute a page-defined JavaScript function from a Firefox extension? I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not inside extension, but a page that is loaded by Firefox): document.funcToBeC... | TITLE:
How do I execute a page-defined JavaScript function from a Firefox extension?
QUESTION:
I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not inside extension, but a page that is loaded by Firefox): ... | [
"javascript",
"firefox",
"dom",
"document"
] | 9 | 8 | 12,370 | 5 | 0 | 2008-09-30T02:32:19.720000 | 2008-10-03T18:20:10.277000 |
151,563 | 151,566 | What tools are available for TDDD (Test Driven Database Development)? | About a year ago, I picked up Scott Ambler's Refactoring Databases: Evolutionary Database Design. I was won over to the idea that just as you can develop your code with TDD, you probably should be covering your databases with unit tests (at least) or even writing database tests before you make a change to the schema so... | I only know of two unit testing frameworks: DBUnit TSQLUnit As for change management, these are some recommended tools: Redgate SQL Compare ApexSQL Toad Although I am not sure if this is really what you're looking for. | What tools are available for TDDD (Test Driven Database Development)? About a year ago, I picked up Scott Ambler's Refactoring Databases: Evolutionary Database Design. I was won over to the idea that just as you can develop your code with TDD, you probably should be covering your databases with unit tests (at least) or... | TITLE:
What tools are available for TDDD (Test Driven Database Development)?
QUESTION:
About a year ago, I picked up Scott Ambler's Refactoring Databases: Evolutionary Database Design. I was won over to the idea that just as you can develop your code with TDD, you probably should be covering your databases with unit t... | [
"database-design",
"testing",
"tdd"
] | 5 | 4 | 523 | 5 | 0 | 2008-09-30T02:34:18.453000 | 2008-09-30T02:36:39.727000 |
151,587 | 542,445 | How do I disable Tortoise BZR? | I'm a huge fan of bzr and I'm glad they're working on tortoise for it, but currently it's WAY too slow to be useful. The icons are almost always incorrect and when I load a directory in explorer with a lot of branches it locks up my entire system for anywhere from 10 seconds to 2 minutes. I look forward to trying it ag... | I think you can do: regsvr32 /u tbzrshellext_x86.dll I also killed tbzrcachew.exe in memory, but since, like enobrev, I couldn't find it with AutoRuns, I will suppose it is the shell extension that runs this cache. Will know for sure when I will reboot my computer... I agree that currently these icons are slow, doesn't... | How do I disable Tortoise BZR? I'm a huge fan of bzr and I'm glad they're working on tortoise for it, but currently it's WAY too slow to be useful. The icons are almost always incorrect and when I load a directory in explorer with a lot of branches it locks up my entire system for anywhere from 10 seconds to 2 minutes.... | TITLE:
How do I disable Tortoise BZR?
QUESTION:
I'm a huge fan of bzr and I'm glad they're working on tortoise for it, but currently it's WAY too slow to be useful. The icons are almost always incorrect and when I load a directory in explorer with a lot of branches it locks up my entire system for anywhere from 10 sec... | [
"windows-xp",
"tortoisebzr"
] | 10 | 7 | 2,945 | 7 | 0 | 2008-09-30T02:55:18.170000 | 2009-02-12T17:30:14.710000 |
151,590 | 152,116 | How to detect a remote side socket close? | How do you detect if Socket#close() has been called on a socket on the remote side? | The isConnected method won't help, it will return true even if the remote side has closed the socket. Try this: public class MyServer { public static final int PORT = 12345; public static void main(String[] args) throws IOException, InterruptedException { ServerSocket ss = ServerSocketFactory.getDefault().createServerS... | How to detect a remote side socket close? How do you detect if Socket#close() has been called on a socket on the remote side? | TITLE:
How to detect a remote side socket close?
QUESTION:
How do you detect if Socket#close() has been called on a socket on the remote side?
ANSWER:
The isConnected method won't help, it will return true even if the remote side has closed the socket. Try this: public class MyServer { public static final int PORT = ... | [
"java",
"networking",
"sockets",
"tcp"
] | 88 | 66 | 153,287 | 4 | 0 | 2008-09-30T02:58:18.147000 | 2008-09-30T07:41:15.173000 |
151,594 | 151,597 | What's a good naming convention for large-scope function variables? | You can have different naming convention for class members, static objects, global objects, and structs. Some of the examples of them are as below. _member m_member or in Java case, the usage of this.member. But is there any good technique or naming convention for function variables scope that conveys when a single var... | We tend to use an l_ prefix in our functions for "local." And, that's worked pretty well. | What's a good naming convention for large-scope function variables? You can have different naming convention for class members, static objects, global objects, and structs. Some of the examples of them are as below. _member m_member or in Java case, the usage of this.member. But is there any good technique or naming co... | TITLE:
What's a good naming convention for large-scope function variables?
QUESTION:
You can have different naming convention for class members, static objects, global objects, and structs. Some of the examples of them are as below. _member m_member or in Java case, the usage of this.member. But is there any good tech... | [
"variables",
"naming"
] | 4 | 0 | 2,024 | 10 | 0 | 2008-09-30T03:00:08.983000 | 2008-09-30T03:01:55.360000 |
151,595 | 151,726 | JRuby on Rails vs. Ruby on Rails, what's difference? | I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding information on what's difference between JRuby on Rails and Ruby on Rails. What's the differences I need to look out for? | JRuby is the Ruby implementation that runs on a JVM whereas Matz's Ruby is a C implementation. Key features to note are: JRuby runs on Java VM's and it's either compiled or interpreted down to Java byte code. JRuby can integrate with Java code. If you have Java class libraries (.jar's), you can reference and use them f... | JRuby on Rails vs. Ruby on Rails, what's difference? I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding information on what's difference between JRuby on Rails and Ruby on Rails. What's the differences I need to look out for? | TITLE:
JRuby on Rails vs. Ruby on Rails, what's difference?
QUESTION:
I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding information on what's difference between JRuby on Rails and Ruby on Rails. What's the differences I need to look out for?
ANSWER:
JRuby is the Ruby implementation that runs... | [
"ruby-on-rails",
"ruby",
"jruby",
"jrubyonrails"
] | 139 | 164 | 64,295 | 6 | 0 | 2008-09-30T03:00:17.690000 | 2008-09-30T04:13:59.103000 |
151,639 | 151,956 | Yasnippet and pabbrev working together in Emacs | I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together? The crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both packages seem to do this fallback when a match isn't found, but they d... | Have a look at tabkey2.el. It looks like it addresses the problem you're having. | Yasnippet and pabbrev working together in Emacs I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together? The crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both packages seem to do th... | TITLE:
Yasnippet and pabbrev working together in Emacs
QUESTION:
I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together? The crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both pack... | [
"emacs",
"pabbrev"
] | 3 | 2 | 1,342 | 2 | 0 | 2008-09-30T03:20:56.173000 | 2008-09-30T06:18:31.160000 |
151,641 | 154,856 | Flex Popup Button Question | Banging my head against the wall here. I don't want to reinvent the wheel. The default Flex 3 classs for PopupButton is a combination of two buttons. One is a normal button with label and/or icon, and the second is the arrow which opens the popup. My struggle here is that I just want a button with an icon that opens th... | Have you tried setting a new skin? Not sure if it would work but it would be far easier than trying to write a new control. | Flex Popup Button Question Banging my head against the wall here. I don't want to reinvent the wheel. The default Flex 3 classs for PopupButton is a combination of two buttons. One is a normal button with label and/or icon, and the second is the arrow which opens the popup. My struggle here is that I just want a button... | TITLE:
Flex Popup Button Question
QUESTION:
Banging my head against the wall here. I don't want to reinvent the wheel. The default Flex 3 classs for PopupButton is a combination of two buttons. One is a normal button with label and/or icon, and the second is the arrow which opens the popup. My struggle here is that I ... | [
"apache-flex"
] | 1 | 3 | 10,839 | 7 | 0 | 2008-09-30T03:22:28.120000 | 2008-09-30T20:22:01.040000 |
151,651 | 160,664 | Does anyone use GoogleData? | I was recently considering using GoogleData for a hobby project to store my service's old data, (say 24+hours old), while I keep the fresh data on my servers (hobby project==cheap home server). However I haven't really heard of anyone using GoogleData, so I was wondering about what other's experiences have been. Edit: ... | Since you didn't really get a satisfactory answer to this, I might suggest looking at Amazon SimpleDB. It's not free, but unless you're storing zillions of records you'll probably only spend pennies per month. Like Amazon's other web services, you only pay for what you use. SimpleDB is more generic than the Google Data... | Does anyone use GoogleData? I was recently considering using GoogleData for a hobby project to store my service's old data, (say 24+hours old), while I keep the fresh data on my servers (hobby project==cheap home server). However I haven't really heard of anyone using GoogleData, so I was wondering about what other's e... | TITLE:
Does anyone use GoogleData?
QUESTION:
I was recently considering using GoogleData for a hobby project to store my service's old data, (say 24+hours old), while I keep the fresh data on my servers (hobby project==cheap home server). However I haven't really heard of anyone using GoogleData, so I was wondering ab... | [
"database",
"google-data-api"
] | 2 | 1 | 367 | 5 | 0 | 2008-09-30T03:27:07.937000 | 2008-10-02T02:44:22.670000 |
151,652 | 151,668 | creating system wide vista keyboard shortcuts and macros | This question might not seem programming related at first, but let me explain. I'm stuck with using a keyboard that doesn't have home end page up and page down buttons. I need those functions for programming. So the question is: what's a good/free utility to define system wide shortcuts and macros in vista? Mapping for... | AutoHotKey is the most configurable I know... http://www.autohotkey.com [EDIT] Another neat utility is Microsoft Keyboard Layout creator http://www.microsoft.com/globaldev/tools/msklc.mspx | creating system wide vista keyboard shortcuts and macros This question might not seem programming related at first, but let me explain. I'm stuck with using a keyboard that doesn't have home end page up and page down buttons. I need those functions for programming. So the question is: what's a good/free utility to defi... | TITLE:
creating system wide vista keyboard shortcuts and macros
QUESTION:
This question might not seem programming related at first, but let me explain. I'm stuck with using a keyboard that doesn't have home end page up and page down buttons. I need those functions for programming. So the question is: what's a good/fr... | [
"windows-vista",
"keyboard-shortcuts"
] | 0 | 1 | 4,303 | 4 | 0 | 2008-09-30T03:27:23.443000 | 2008-09-30T03:33:35.580000 |
151,660 | 151,673 | Can I trust PHP __destruct() method to be called? | In PHP5, is the __destruct() method guaranteed to be called for each object instance? Can exceptions in the program prevent this from happening? | The destructor will be called when the all references are freed, or when the script terminates. I assume this means when the script terminates properly. I would say that critical exceptions would not guarantee the destructor to be called. The PHP documentation is a little bit thin, but it does say that Exceptions in th... | Can I trust PHP __destruct() method to be called? In PHP5, is the __destruct() method guaranteed to be called for each object instance? Can exceptions in the program prevent this from happening? | TITLE:
Can I trust PHP __destruct() method to be called?
QUESTION:
In PHP5, is the __destruct() method guaranteed to be called for each object instance? Can exceptions in the program prevent this from happening?
ANSWER:
The destructor will be called when the all references are freed, or when the script terminates. I ... | [
"php",
"garbage-collection"
] | 43 | 37 | 35,955 | 6 | 0 | 2008-09-30T03:29:54.543000 | 2008-09-30T03:35:23.157000 |
151,677 | 151,690 | Tool for adding license headers to source files? | I'm looking for a tool that will, in bulk, add a license header to some source files, some of which already have the header. Is there a tool out there that will insert a header, if it is not already present? Edit: I am intentionally not marking an answer to this question, since answers are basically all environment-spe... | #!/bin/bash
for i in *.cc # or whatever other pattern... do if! grep -q Copyright $i then cat copyright.txt $i >$i.new && mv $i.new $i fi done | Tool for adding license headers to source files? I'm looking for a tool that will, in bulk, add a license header to some source files, some of which already have the header. Is there a tool out there that will insert a header, if it is not already present? Edit: I am intentionally not marking an answer to this question... | TITLE:
Tool for adding license headers to source files?
QUESTION:
I'm looking for a tool that will, in bulk, add a license header to some source files, some of which already have the header. Is there a tool out there that will insert a header, if it is not already present? Edit: I am intentionally not marking an answe... | [
"header",
"language-agnostic"
] | 98 | 71 | 44,786 | 12 | 0 | 2008-09-30T03:37:12.390000 | 2008-09-30T03:48:48.540000 |
151,682 | 151,879 | Dynamically setting the Header text of a Silverlight DataGrid Column | I have the above column in a Silverlight grid control. But it is giving me a XamlParser error because of how I am trying to set the Header property. Has anyone done this before? I want to do this for multiple languages. Also my syntax for the binding to a resouce is correct because I tried it in a lable outside of the ... | You can't Bind to Header because it's not a FrameworkElement. You can make the text dynamic by modifying the Header Template like this: xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" xmlns:dataprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.... | Dynamically setting the Header text of a Silverlight DataGrid Column I have the above column in a Silverlight grid control. But it is giving me a XamlParser error because of how I am trying to set the Header property. Has anyone done this before? I want to do this for multiple languages. Also my syntax for the binding ... | TITLE:
Dynamically setting the Header text of a Silverlight DataGrid Column
QUESTION:
I have the above column in a Silverlight grid control. But it is giving me a XamlParser error because of how I am trying to set the Header property. Has anyone done this before? I want to do this for multiple languages. Also my synta... | [
"silverlight"
] | 29 | 28 | 31,005 | 8 | 0 | 2008-09-30T03:41:02.117000 | 2008-09-30T05:38:58.570000 |
151,686 | 228,713 | Asynchronous WPF Commands | Note: The code in this question is part of deSleeper if you want the full source. One of the things I wanted out of commands was a baked design for asynchronous operations. I wanted the button pressed to disable while the command was executing, and come back when complete. I wanted the actual work to be performed in a ... | I've been able to refine the original sample down and have some advice for anyone else running into similar situations. First, consider if BackgroundWorker will meet the needs. I still use AsyncCommand often to get the automatic disable function, but if many things could be done with BackgroundWorker. But by wrapping B... | Asynchronous WPF Commands Note: The code in this question is part of deSleeper if you want the full source. One of the things I wanted out of commands was a baked design for asynchronous operations. I wanted the button pressed to disable while the command was executing, and come back when complete. I wanted the actual ... | TITLE:
Asynchronous WPF Commands
QUESTION:
Note: The code in this question is part of deSleeper if you want the full source. One of the things I wanted out of commands was a baked design for asynchronous operations. I wanted the button pressed to disable while the command was executing, and come back when complete. I ... | [
"c#",
".net",
"wpf",
"multithreading",
"concurrency"
] | 13 | 4 | 16,164 | 2 | 0 | 2008-09-30T03:45:11.310000 | 2008-10-23T06:22:02.527000 |
151,687 | 151,703 | Where do you send the kernel console on an embedded system? | I'm developing an embedded system which currently boots linux with console output on serial port 1 (using the console boot param from the boot loader). However, eventually we will be using this serial port. What is the best solution for the kernel console output? /dev/null? Can it be put on a pty somehow so that we cou... | If you just want to read kernel printk messages from the console, and not actually run getty or a shell on it, you can use netconsole. You can supply the following to your bootloader kernel options (or to modprobe netconsole): netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc where 4444 is the local port, 1... | Where do you send the kernel console on an embedded system? I'm developing an embedded system which currently boots linux with console output on serial port 1 (using the console boot param from the boot loader). However, eventually we will be using this serial port. What is the best solution for the kernel console outp... | TITLE:
Where do you send the kernel console on an embedded system?
QUESTION:
I'm developing an embedded system which currently boots linux with console output on serial port 1 (using the console boot param from the boot loader). However, eventually we will be using this serial port. What is the best solution for the k... | [
"linux",
"embedded"
] | 7 | 3 | 1,800 | 2 | 0 | 2008-09-30T03:45:54.023000 | 2008-09-30T03:59:17.500000 |
151,691 | 154,849 | C# Custom Applications that Access TFS | We have built a custom application, for internal use, that accesses TFS. We use the Microsoft libraries for this (e.g Microsoft.TeamFoundation.dll). When this application is deployed to PCs that already have Team Explorer or VS installed, everything is fine. When it’s deployed to PCs that don’t have this installed, it ... | The "officially supported" way of writing an application that uses the TFS Object Model is to have Team Explorer installed on the machine. This is especially important for servicing purposes - i.e. making sure that when a service pack for VSTS is applied to the client machine then the TFS API's get upgraded as well. Th... | C# Custom Applications that Access TFS We have built a custom application, for internal use, that accesses TFS. We use the Microsoft libraries for this (e.g Microsoft.TeamFoundation.dll). When this application is deployed to PCs that already have Team Explorer or VS installed, everything is fine. When it’s deployed to ... | TITLE:
C# Custom Applications that Access TFS
QUESTION:
We have built a custom application, for internal use, that accesses TFS. We use the Microsoft libraries for this (e.g Microsoft.TeamFoundation.dll). When this application is deployed to PCs that already have Team Explorer or VS installed, everything is fine. When... | [
"c#",
"tfs"
] | 4 | 9 | 5,001 | 2 | 0 | 2008-09-30T03:49:18.443000 | 2008-09-30T20:20:35.287000 |
151,696 | 158,912 | Infragistics V7.3 vs. V8.1 | We are using the Infragistics controls for.net (both ASP.Net and WinForms) for a few years. We want to upgrade our current version (v6.3) and are in a pickle. We can upgrade to v7.3 or v8.1 but not to a later one due to licensing limitations, and we don't want to spend more money on licenses unless it is really necessa... | I haven't, traditionally, had any "stability" issues with Infragistics NetAdvantage releases. However, I have found breaking changes (particularly with the ASP.NET CSOM side), and smaller, more insidious gotchas. As a result, our company's policy is to not upgrade an Infragistics-enabled project until it is absolutely,... | Infragistics V7.3 vs. V8.1 We are using the Infragistics controls for.net (both ASP.Net and WinForms) for a few years. We want to upgrade our current version (v6.3) and are in a pickle. We can upgrade to v7.3 or v8.1 but not to a later one due to licensing limitations, and we don't want to spend more money on licenses ... | TITLE:
Infragistics V7.3 vs. V8.1
QUESTION:
We are using the Infragistics controls for.net (both ASP.Net and WinForms) for a few years. We want to upgrade our current version (v6.3) and are in a pickle. We can upgrade to v7.3 or v8.1 but not to a later one due to licensing limitations, and we don't want to spend more ... | [
".net",
"infragistics"
] | 0 | 2 | 702 | 1 | 0 | 2008-09-30T03:53:43.520000 | 2008-10-01T18:04:18.693000 |
151,701 | 152,389 | Running Google Analytics in iframe? | Our company runs a web site (oursite.com) with affiliate partners who send us traffic. In some cases, we set up our affiliates with their own subdomain (affiliate.oursite.com), and they display selected content from our site on their site (affiliate.com) using an iframe. Example of a page on their site:...content... [g... | You have to append the Google Analytics tracking code to the end of example_page.html. The content between the - tag only displays for browsers, which do not support that specific tag. Should you need to merge the results from the subdomains, there's an excellent article on Google's help site: How do I track all of the... | Running Google Analytics in iframe? Our company runs a web site (oursite.com) with affiliate partners who send us traffic. In some cases, we set up our affiliates with their own subdomain (affiliate.oursite.com), and they display selected content from our site on their site (affiliate.com) using an iframe. Example of a... | TITLE:
Running Google Analytics in iframe?
QUESTION:
Our company runs a web site (oursite.com) with affiliate partners who send us traffic. In some cases, we set up our affiliates with their own subdomain (affiliate.oursite.com), and they display selected content from our site on their site (affiliate.com) using an if... | [
"javascript",
"iframe",
"google-analytics",
"cross-domain",
"tracking"
] | 22 | 15 | 54,491 | 4 | 0 | 2008-09-30T03:58:11.310000 | 2008-09-30T09:36:29.047000 |
151,721 | 151,734 | Code Promotion: Build or Binary? | Given a pretty basic source tree structure like the following: trunk ------- QA |-------- Stage |------- Prod |------ And an environment which mirrors that (Dev, QA, Staging and Production servers) - how do you all manage automated or manual code promotion? Do you use a CI server to build and promote at all stages? CI ... | You want absolutely no possibility of the production code not being identical to the one QA tested, so you should use binaries. You should also tag the sources used to create each build, so if needed you can reproduce the build in a dev environment. At least if you make a mistake at this point, the consequences won't b... | Code Promotion: Build or Binary? Given a pretty basic source tree structure like the following: trunk ------- QA |-------- Stage |------- Prod |------ And an environment which mirrors that (Dev, QA, Staging and Production servers) - how do you all manage automated or manual code promotion? Do you use a CI server to bui... | TITLE:
Code Promotion: Build or Binary?
QUESTION:
Given a pretty basic source tree structure like the following: trunk ------- QA |-------- Stage |------- Prod |------ And an environment which mirrors that (Dev, QA, Staging and Production servers) - how do you all manage automated or manual code promotion? Do you use ... | [
"svn",
"version-control",
"tfs"
] | 5 | 4 | 571 | 2 | 0 | 2008-09-30T04:12:56.063000 | 2008-09-30T04:17:46.847000 |
151,728 | 151,751 | Developing for different platforms individually, does anyone recommend it? | I know it is easy to recommend several cross platform libraries. However, are there benefits to treating each platform individually for your product? Yes there will be some base libraries used in all platforms, but UI and some other things would be different on each platform. I have no restriction that the product must... | I would say that the benefits of individual development for each platform are: - native look and feel - platform knowledge acquired by your developers -... i'm out of ideas Seriously, the cost of developing and maintaining 3 separate copies of your application could be huge if you're not careful. If it's just the GUI c... | Developing for different platforms individually, does anyone recommend it? I know it is easy to recommend several cross platform libraries. However, are there benefits to treating each platform individually for your product? Yes there will be some base libraries used in all platforms, but UI and some other things would... | TITLE:
Developing for different platforms individually, does anyone recommend it?
QUESTION:
I know it is easy to recommend several cross platform libraries. However, are there benefits to treating each platform individually for your product? Yes there will be some base libraries used in all platforms, but UI and some ... | [
"c++",
"user-interface",
"cross-platform",
"platform-specific"
] | 3 | 14 | 363 | 6 | 0 | 2008-09-30T04:15:07.587000 | 2008-09-30T04:24:16.347000 |
151,730 | 151,749 | Custom Sorting of a DataSet Column | I have a DataSet that contains a few columns. One of these columns is a number - most of the time. Because it's occasionally a string, in the database it's a varchar(10) column. However, when you sort a varchar column, it sorts it like a string. What I want to do instead is to try and override this somehow so that it s... | I think your best bet is to add a new calculated column which converts the varchar(10) to an int, and sort on that. myDataTable.Columns.Add("Sorter", typeof(System.Int32), "Convert(TextColumn, 'System.Int32')"); This will throw exceptions when the string in your varchar column (which I've referred to as "TextColumn" in... | Custom Sorting of a DataSet Column I have a DataSet that contains a few columns. One of these columns is a number - most of the time. Because it's occasionally a string, in the database it's a varchar(10) column. However, when you sort a varchar column, it sorts it like a string. What I want to do instead is to try and... | TITLE:
Custom Sorting of a DataSet Column
QUESTION:
I have a DataSet that contains a few columns. One of these columns is a number - most of the time. Because it's occasionally a string, in the database it's a varchar(10) column. However, when you sort a varchar column, it sorts it like a string. What I want to do ins... | [
".net",
"database"
] | 0 | 2 | 347 | 1 | 0 | 2008-09-30T04:16:50.140000 | 2008-09-30T04:23:45.523000 |
151,731 | 152,134 | Ext.form.FormPanel and form submission | I've been trying to submit a form with the FormPanel using the Action class Ext defaults to. However, I'd like it to consider the response as a script, not JSON-encoded. Has anyone had any experience on this? | The best plan would be to create a custom action by extending Ext.form.Action. You can then eval the response object or the result object in the success callback of your custom action. Your custom action can be called from Ext.form.BasicForm in the usual way. | Ext.form.FormPanel and form submission I've been trying to submit a form with the FormPanel using the Action class Ext defaults to. However, I'd like it to consider the response as a script, not JSON-encoded. Has anyone had any experience on this? | TITLE:
Ext.form.FormPanel and form submission
QUESTION:
I've been trying to submit a form with the FormPanel using the Action class Ext defaults to. However, I'd like it to consider the response as a script, not JSON-encoded. Has anyone had any experience on this?
ANSWER:
The best plan would be to create a custom act... | [
"javascript",
"ajax",
"json",
"user-interface",
"extjs"
] | 0 | 3 | 4,389 | 2 | 0 | 2008-09-30T04:17:16.350000 | 2008-09-30T07:48:38.417000 |
151,746 | 173,286 | iPhone tab bar Item image resolution? | What is the resolution of the image for the tab bar item? And also, please provide some other useful information regarding that tab item image. Thanks in advance. | The documentation says that the tab bar image is usually 30x30, but I've found that the best size to setup the images is 48x32 pixels. This size still renders and gives you a bit more space. The image is a PNG with transparency, only the mask is used. The UI renders the mask gray when unselected or blue/chrome when sel... | iPhone tab bar Item image resolution? What is the resolution of the image for the tab bar item? And also, please provide some other useful information regarding that tab item image. Thanks in advance. | TITLE:
iPhone tab bar Item image resolution?
QUESTION:
What is the resolution of the image for the tab bar item? And also, please provide some other useful information regarding that tab item image. Thanks in advance.
ANSWER:
The documentation says that the tab bar image is usually 30x30, but I've found that the best... | [
"iphone"
] | 43 | 68 | 64,319 | 4 | 0 | 2008-09-30T04:22:29.147000 | 2008-10-06T05:49:32.957000 |
151,752 | 154,189 | Storyboards can't find ControlTemplate elements | I've created some fairly simple XAML, and it works perfectly (at least in KAXML). The storyboards run perfectly when called from within the XAML, but when I try to access them from outside I get the error: 'buttonGlow' name cannot be found in the name scope of 'System.Windows.Controls.Button'. I am loading the XAML wit... | Finally found it. When you call Begin on storyboards that reference elements in the ControlTemplate, you must pass in the control template as well. Changing: pressedButtonStoryboard.Begin(_xamlButton); To: pressedButtonStoryboard.Begin(_xamlButton, _xamlButton.Template); Fixed everything. | Storyboards can't find ControlTemplate elements I've created some fairly simple XAML, and it works perfectly (at least in KAXML). The storyboards run perfectly when called from within the XAML, but when I try to access them from outside I get the error: 'buttonGlow' name cannot be found in the name scope of 'System.Win... | TITLE:
Storyboards can't find ControlTemplate elements
QUESTION:
I've created some fairly simple XAML, and it works perfectly (at least in KAXML). The storyboards run perfectly when called from within the XAML, but when I try to access them from outside I get the error: 'buttonGlow' name cannot be found in the name sc... | [
"c#",
".net",
"wpf",
"xaml",
"animation"
] | 14 | 21 | 15,442 | 5 | 0 | 2008-09-30T04:25:21.150000 | 2008-09-30T17:49:40.843000 |
151,756 | 151,772 | Identifying the device requesting a response | Is it possible for a web server to know which type of device request has been received from? For example, can a create a website which shows different contents if request came from a computer (Firefox) and something different if it came from iPhone? | The way is the User Agent header, as has been said. You best use a list like this one to find out which mobile is it. When I had to do something like it I stored the unknown received User Agents in a table to find out later about the ones I didn't have stored and thus wasn't able to know for sure what to serve. | Identifying the device requesting a response Is it possible for a web server to know which type of device request has been received from? For example, can a create a website which shows different contents if request came from a computer (Firefox) and something different if it came from iPhone? | TITLE:
Identifying the device requesting a response
QUESTION:
Is it possible for a web server to know which type of device request has been received from? For example, can a create a website which shows different contents if request came from a computer (Firefox) and something different if it came from iPhone?
ANSWER... | [
"browser",
"user-agent"
] | 1 | 2 | 178 | 3 | 0 | 2008-09-30T04:27:42.987000 | 2008-09-30T04:37:45.630000 |
151,765 | 151,767 | Are .NET framework updates pushed to every user of windows-updates? | Does Microsoft force an update down to all of its users of windows-update? Is it for legal reasons? EDIT(aku): Question was reformulated. if you want to know which version of Windows comes with.NET see this topic: https://stackoverflow.com/questions/71390/which-operating-systems-come-with-net | Yes, Windows Vista shipped with.NET Framework 3.0. I'm sure future versions of Windows will ship with whichever is the most recent version of the framework. Scott Hanselman recently blogged about the status of.NET 3.5 on Windows Update: http://www.hanselman.com/blog/UpdateOnNETFramework35SP1AndWindowsUpdate.aspx | Are .NET framework updates pushed to every user of windows-updates? Does Microsoft force an update down to all of its users of windows-update? Is it for legal reasons? EDIT(aku): Question was reformulated. if you want to know which version of Windows comes with.NET see this topic: https://stackoverflow.com/questions/71... | TITLE:
Are .NET framework updates pushed to every user of windows-updates?
QUESTION:
Does Microsoft force an update down to all of its users of windows-update? Is it for legal reasons? EDIT(aku): Question was reformulated. if you want to know which version of Windows comes with.NET see this topic: https://stackoverflo... | [
".net",
"deployment"
] | 2 | 3 | 270 | 5 | 0 | 2008-09-30T04:35:39.677000 | 2008-09-30T04:36:41.560000 |
151,769 | 152,228 | What's the common way for OOP Pattern design (Data Access) | Originally there was the DAL object which my BO's called for info and then passed to UI. Then I started noticing reduced code in UI and there were Controller classes. What's the decent recomendation. I currently structure mine Public Class OrderDAL
Private _id Integer Private _order as Order
Public Function GetOrder(... | I've used your solution in the past, and the only problem I faced is that "Shared" or "static" methods don't support inheritance. When your application grows, you might very well need to support different types of "OrderControllers". The estabilished way of supporting different OrderControllers would be, in theory, to ... | What's the common way for OOP Pattern design (Data Access) Originally there was the DAL object which my BO's called for info and then passed to UI. Then I started noticing reduced code in UI and there were Controller classes. What's the decent recomendation. I currently structure mine Public Class OrderDAL
Private _id... | TITLE:
What's the common way for OOP Pattern design (Data Access)
QUESTION:
Originally there was the DAL object which my BO's called for info and then passed to UI. Then I started noticing reduced code in UI and there were Controller classes. What's the decent recomendation. I currently structure mine Public Class Ord... | [
"design-patterns",
"oop",
"multi-tier"
] | 5 | 0 | 716 | 5 | 0 | 2008-09-30T04:37:34.583000 | 2008-09-30T08:26:37.263000 |
151,776 | 151,889 | Are there any tools for converting Managed C++ to C++/CLI? | We have an old project written using Managed C++ syntax. I would like to propose to the team a reasonably pain-free (I don't mind some level of human interaction, I think I'm realistic in my expectations that we'll still have to do some work by hand) method of updating the existing code to C++/CLI syntax so that we can... | Microsoft has a tool that will help a little. Visual c++ blog post about it. Here are a couple other resources I found useful when I made our switch C++/CLI Migration Primer Managed Extensions for C++ Syntax Upgrade Checklist The Microsoft tool is just a start. there were many files that it could not convert. | Are there any tools for converting Managed C++ to C++/CLI? We have an old project written using Managed C++ syntax. I would like to propose to the team a reasonably pain-free (I don't mind some level of human interaction, I think I'm realistic in my expectations that we'll still have to do some work by hand) method of ... | TITLE:
Are there any tools for converting Managed C++ to C++/CLI?
QUESTION:
We have an old project written using Managed C++ syntax. I would like to propose to the team a reasonably pain-free (I don't mind some level of human interaction, I think I'm realistic in my expectations that we'll still have to do some work b... | [
"c++-cli",
"managed-c++",
"code-conversion"
] | 6 | 2 | 3,933 | 2 | 0 | 2008-09-30T04:40:26.870000 | 2008-09-30T05:44:36.047000 |
151,777 | 151,940 | How can I save an activity state using the save instance state? | I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example: package com.android.hello;
import android.app.Activity; import android.os.Bundle; import android.widget.TextView;
public class HelloAndroid exte... | You need to override onSaveInstanceState(Bundle savedInstanceState) and write the application state values you want to change to the Bundle parameter like this: @Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); // Save UI state changes to the savedInst... | How can I save an activity state using the save instance state? I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example: package com.android.hello;
import android.app.Activity; import android.os.Bundle;... | TITLE:
How can I save an activity state using the save instance state?
QUESTION:
I've been working on the Android SDK platform, and it is a little unclear how to save an application's state. So given this minor re-tooling of the 'Hello, Android' example: package com.android.hello;
import android.app.Activity; import ... | [
"android",
"android-activity",
"application-state"
] | 2,868 | 2,724 | 906,825 | 35 | 0 | 2008-09-30T04:41:15.340000 | 2008-09-30T06:12:20.847000 |
151,778 | 154,057 | Alternatives to static methods in Java | I'm making a mini ORM for a Java program I'm writing... there is a class for each table in my db, all inheriting from ModelBase. ModelBase is abstract & provides a bunch of static methods for finding & binding objects from the db, for example: public static ArrayList findAll(Class cast_to_class) { //build the sql query... | Albeit, I totally agree in the point of "Static is the wrong thing to be using here", I kind of understand what you're trying to address here. Still instance behavior should be the way to work, but if you insist this is what I would do: Starting from your comment "I need to create an instance of it just to get a string... | Alternatives to static methods in Java I'm making a mini ORM for a Java program I'm writing... there is a class for each table in my db, all inheriting from ModelBase. ModelBase is abstract & provides a bunch of static methods for finding & binding objects from the db, for example: public static ArrayList findAll(Class... | TITLE:
Alternatives to static methods in Java
QUESTION:
I'm making a mini ORM for a Java program I'm writing... there is a class for each table in my db, all inheriting from ModelBase. ModelBase is abstract & provides a bunch of static methods for finding & binding objects from the db, for example: public static Array... | [
"java",
"interface",
"static"
] | 13 | 2 | 13,369 | 9 | 0 | 2008-09-30T04:41:36.900000 | 2008-09-30T17:17:25.320000 |
151,781 | 204,539 | Enable local scripts and flash in ie7 | I'm running an old little app which runs in the browser from local files, and I keep getting the, "To help protect your security, Internet Explorer has restricted this webpage from running scripts or Activex controls that could access your computer" message. Is there a registry setting or something I can tweak to allow... | Internet Options > Advanced > Security > Allow active content to run in files on My Computer | Enable local scripts and flash in ie7 I'm running an old little app which runs in the browser from local files, and I keep getting the, "To help protect your security, Internet Explorer has restricted this webpage from running scripts or Activex controls that could access your computer" message. Is there a registry set... | TITLE:
Enable local scripts and flash in ie7
QUESTION:
I'm running an old little app which runs in the browser from local files, and I keep getting the, "To help protect your security, Internet Explorer has restricted this webpage from running scripts or Activex controls that could access your computer" message. Is th... | [
"internet-explorer-7"
] | 3 | 5 | 6,259 | 3 | 0 | 2008-09-30T04:42:49.190000 | 2008-10-15T12:35:50.093000 |
151,782 | 152,100 | Will MS drop support for XP in .Net 4.* or 5.*? | Does it matter to developers that the current, and newer versions of.Net don't support windows 2000? It scares me to think that several of my clients still use Windows 2000 and although I may decide to stop supporting Windows 2000 one day, I don't like that Microsoft is pushing it on people's products. Could anyone see... | Considering that Microsoft has a double interest in this matter (selling you the new OS and producing the.NET framework), I would be very suspicious. In actual fact, you will be able to support new.NET versions on older OSes using Mono, which is pretty much designed to be cross-platform and backwards-compatible. | Will MS drop support for XP in .Net 4.* or 5.*? Does it matter to developers that the current, and newer versions of.Net don't support windows 2000? It scares me to think that several of my clients still use Windows 2000 and although I may decide to stop supporting Windows 2000 one day, I don't like that Microsoft is p... | TITLE:
Will MS drop support for XP in .Net 4.* or 5.*?
QUESTION:
Does it matter to developers that the current, and newer versions of.Net don't support windows 2000? It scares me to think that several of my clients still use Windows 2000 and although I may decide to stop supporting Windows 2000 one day, I don't like t... | [
".net",
"windows-xp",
"legacy"
] | 5 | 3 | 3,003 | 8 | 0 | 2008-09-30T04:42:49.237000 | 2008-09-30T07:37:03.623000 |
151,794 | 152,136 | Unit Testing the Views? | Any idea on how to unit test the views in ASP.NET MVC? I am sick of encountering the yellow screen of death when I launch my MVC project just because I forget to update the views when one of the Action methods of my controller changes name. | You could write integration tests using Watin, but if you just need a quick check to see if you've any errors in your views, you could also try the solution mentioned in this post: How can I compile ASP.NET pages before loading them with a webserver. Prebuild your aspx pages and you're good to go! | Unit Testing the Views? Any idea on how to unit test the views in ASP.NET MVC? I am sick of encountering the yellow screen of death when I launch my MVC project just because I forget to update the views when one of the Action methods of my controller changes name. | TITLE:
Unit Testing the Views?
QUESTION:
Any idea on how to unit test the views in ASP.NET MVC? I am sick of encountering the yellow screen of death when I launch my MVC project just because I forget to update the views when one of the Action methods of my controller changes name.
ANSWER:
You could write integration ... | [
"asp.net-mvc",
"unit-testing"
] | 22 | 8 | 3,795 | 5 | 0 | 2008-09-30T04:48:52.857000 | 2008-09-30T07:50:12.563000 |
151,795 | 151,808 | Horizontal lines when clicking the button in Firefox | I've some CSS problem in Firefox 3. I have several image buttons on my page and when I'm clicking on them I've seen to horizontal lines across the screen at top and bottom button border. I saw such issue on other web sites, so I think it's something known. | This is because of the outline style in CSS - the idea is that it highlights the element in focus so that people with disabilities notice it better. You can set the outline style to none in the css and this should fix it. | Horizontal lines when clicking the button in Firefox I've some CSS problem in Firefox 3. I have several image buttons on my page and when I'm clicking on them I've seen to horizontal lines across the screen at top and bottom button border. I saw such issue on other web sites, so I think it's something known. | TITLE:
Horizontal lines when clicking the button in Firefox
QUESTION:
I've some CSS problem in Firefox 3. I have several image buttons on my page and when I'm clicking on them I've seen to horizontal lines across the screen at top and bottom button border. I saw such issue on other web sites, so I think it's something... | [
"css",
"firefox"
] | 0 | 4 | 321 | 1 | 0 | 2008-09-30T04:49:04.557000 | 2008-09-30T04:54:30.347000 |
151,800 | 151,829 | Sqlite update field if it contains | Given a database field named "widget_ids", containing data like "67/797/124/" or "45/", where the numbers are slash separated widget_ids... how would you make an update statement with SQL that would say: "if the widget_ids of the row with id X contains the text "somenumber/" do nothing, otherwise append "somenumber/" t... | Updates are kind of like if-thens themselves, and there is also if-then support of some sort in most SQL implementations. A simple solution might be: update set widget_id = widget_id + "somenumber/" where row_id = X and widget_id not like "%/somenumber/%" and widget_id not like "somenumber/%"; | Sqlite update field if it contains Given a database field named "widget_ids", containing data like "67/797/124/" or "45/", where the numbers are slash separated widget_ids... how would you make an update statement with SQL that would say: "if the widget_ids of the row with id X contains the text "somenumber/" do nothin... | TITLE:
Sqlite update field if it contains
QUESTION:
Given a database field named "widget_ids", containing data like "67/797/124/" or "45/", where the numbers are slash separated widget_ids... how would you make an update statement with SQL that would say: "if the widget_ids of the row with id X contains the text "some... | [
"sql",
"database",
"sqlite",
"syntax"
] | 3 | 7 | 5,996 | 2 | 0 | 2008-09-30T04:51:20.697000 | 2008-09-30T05:08:14.137000 |
151,804 | 151,923 | System.IO.FileSystemWatcher to monitor a network-server folder - Performance considerations | I want to watch a folder tree on a network server for changes. The files all have a specific extension. There are about 200 folders in the tree and about 1200 files with the extension I am watching. I can't write a service to run on the server (off-limits!) so the solution has to be local to the client. Timeliness is n... | From a server load point of view, using the IO.FileSystemWatcher for remote change notifications in the scenario you describe is probably the most efficient method possible. It uses the FindFirstChangeNotification and ReadDirectoryChangesW Win32 API functions internally, which in turn communicate with the network redir... | System.IO.FileSystemWatcher to monitor a network-server folder - Performance considerations I want to watch a folder tree on a network server for changes. The files all have a specific extension. There are about 200 folders in the tree and about 1200 files with the extension I am watching. I can't write a service to ru... | TITLE:
System.IO.FileSystemWatcher to monitor a network-server folder - Performance considerations
QUESTION:
I want to watch a folder tree on a network server for changes. The files all have a specific extension. There are about 200 folders in the tree and about 1200 files with the extension I am watching. I can't wri... | [
".net",
"performance",
"filesystemwatcher"
] | 48 | 77 | 55,009 | 7 | 0 | 2008-09-30T04:53:27.230000 | 2008-09-30T06:00:47.927000 |
151,812 | 380,728 | Search for information on building large enterprise systems | How do you organize DB layer, business logic and cross-platform API of your information management system, if uploading and processing 500000 data records in one session is a normal operation (C#.NET 3.5 + MS SQL 2005)? I’m specifically interested in production-proven paging patterns that behave well with the concurren... | Done the implementation. I have been informed recently that one of the uploads was about 2148849 records. Tiers did successfully deal with the a couple of broken connections and dozens of deadlocks at the DB level during this upload. In case somebody else needs some info: Product page Exception Handling Action Policies | Search for information on building large enterprise systems How do you organize DB layer, business logic and cross-platform API of your information management system, if uploading and processing 500000 data records in one session is a normal operation (C#.NET 3.5 + MS SQL 2005)? I’m specifically interested in productio... | TITLE:
Search for information on building large enterprise systems
QUESTION:
How do you organize DB layer, business logic and cross-platform API of your information management system, if uploading and processing 500000 data records in one session is a normal operation (C#.NET 3.5 + MS SQL 2005)? I’m specifically inter... | [
"c#",
".net",
"database",
"scalability",
"reliability"
] | 1 | 1 | 499 | 6 | 0 | 2008-09-30T04:57:59.043000 | 2008-12-19T11:29:35.957000 |
151,841 | 151,847 | High-level Compare And Swap (CAS) functions? | I'd like to document what high-level (i.e. C++ not inline assembler ) functions or macros are available for Compare And Swap (CAS) atomic primitives... E.g., WIN32 on x86 has a family of functions _InterlockedCompareExchange in the <_intrin.h> header. | I'll let others list the various platform-specific APIs, but for future reference in C++09 you'll get the atomic_compare_exchange() operation in the new "Atomic operations library". | High-level Compare And Swap (CAS) functions? I'd like to document what high-level (i.e. C++ not inline assembler ) functions or macros are available for Compare And Swap (CAS) atomic primitives... E.g., WIN32 on x86 has a family of functions _InterlockedCompareExchange in the <_intrin.h> header. | TITLE:
High-level Compare And Swap (CAS) functions?
QUESTION:
I'd like to document what high-level (i.e. C++ not inline assembler ) functions or macros are available for Compare And Swap (CAS) atomic primitives... E.g., WIN32 on x86 has a family of functions _InterlockedCompareExchange in the <_intrin.h> header.
ANSW... | [
"c++",
"multithreading",
"multicore",
"atomic"
] | 13 | 17 | 8,901 | 7 | 0 | 2008-09-30T05:16:49.060000 | 2008-09-30T05:21:44.917000 |
151,844 | 154,670 | Unicode Characters that can be used to trick a string sorter? | Since Unicode lacks a series of zero width sorting characters, I need to determine equivalent characters that will allow me to force a certain order on a list that is automatically sorted by character values. Unfortunately the list items are not in an alphabetical order, nor is it acceptable to prefix them with visible... | Zero-width space (U+200B) should probably do what you want. From the Unicode spec: Zero Width Space. The U+200B ZERO WIDTH SPACE indicates a line break opportunity, except that it has no width. Zero-width space characters are intended to be used in languages that have no visible word spacing to represent line break opp... | Unicode Characters that can be used to trick a string sorter? Since Unicode lacks a series of zero width sorting characters, I need to determine equivalent characters that will allow me to force a certain order on a list that is automatically sorted by character values. Unfortunately the list items are not in an alphab... | TITLE:
Unicode Characters that can be used to trick a string sorter?
QUESTION:
Since Unicode lacks a series of zero width sorting characters, I need to determine equivalent characters that will allow me to force a certain order on a list that is automatically sorted by character values. Unfortunately the list items ar... | [
"unicode",
"sorting"
] | 6 | 6 | 2,634 | 2 | 0 | 2008-09-30T05:19:02.690000 | 2008-09-30T19:50:41.690000 |
151,846 | 152,454 | Get other running processes window sizes in Python | This isn't as malicious as it sounds, I want to get the current size of their windows, not look at what is in them. The purpose is to figure out that if every other window is fullscreen then I should start up like that too. Or if all the other processes are only 800x600 despite there being a huge resolution then that i... | Using hints from WindowMover article and Nattee Niparnan's blog post I managed to create this: import win32con import win32gui
def isRealWindow(hWnd): '''Return True iff given window is a real Windows application window.''' if not win32gui.IsWindowVisible(hWnd): return False if win32gui.GetParent(hWnd)!= 0: return Fal... | Get other running processes window sizes in Python This isn't as malicious as it sounds, I want to get the current size of their windows, not look at what is in them. The purpose is to figure out that if every other window is fullscreen then I should start up like that too. Or if all the other processes are only 800x60... | TITLE:
Get other running processes window sizes in Python
QUESTION:
This isn't as malicious as it sounds, I want to get the current size of their windows, not look at what is in them. The purpose is to figure out that if every other window is fullscreen then I should start up like that too. Or if all the other process... | [
"python",
"windows",
"winapi",
"pywin32"
] | 10 | 13 | 13,998 | 5 | 0 | 2008-09-30T05:20:27.320000 | 2008-09-30T10:02:38.250000 |
151,850 | 151,870 | Why would you use an assignment in a condition? | In many languages, assignments are legal in conditions. I never understood the reason behind this. Why would you write: if (var1 = var2) {... } instead of: var1 = var2; if (var1) {... }? | It's more useful for loops than if statements. while(var = GetNext()) {...do something with 'var' } Which would otherwise have to be written var = GetNext(); while(var) {...do something var = GetNext(); } | Why would you use an assignment in a condition? In many languages, assignments are legal in conditions. I never understood the reason behind this. Why would you write: if (var1 = var2) {... } instead of: var1 = var2; if (var1) {... }? | TITLE:
Why would you use an assignment in a condition?
QUESTION:
In many languages, assignments are legal in conditions. I never understood the reason behind this. Why would you write: if (var1 = var2) {... } instead of: var1 = var2; if (var1) {... }?
ANSWER:
It's more useful for loops than if statements. while(var =... | [
"conditional-statements",
"language-agnostic",
"variable-assignment"
] | 95 | 132 | 114,369 | 12 | 0 | 2008-09-30T05:24:43.737000 | 2008-09-30T05:32:39.460000 |
151,873 | 151,880 | What is a good extendable blogging application for ASP.NET? | I am looking for a relatively good and well supported, and preferably open source blog application that runs on ASP.NET and SQL Server. It doesn’t need to be packed full of features, it just needs the basics, such as tagging, comments, etc. Extra features are a bonus. I would also like it to be either open source or ha... | I used BlogEngine.NET for one of my clients, can definitely recommend it. | What is a good extendable blogging application for ASP.NET? I am looking for a relatively good and well supported, and preferably open source blog application that runs on ASP.NET and SQL Server. It doesn’t need to be packed full of features, it just needs the basics, such as tagging, comments, etc. Extra features are ... | TITLE:
What is a good extendable blogging application for ASP.NET?
QUESTION:
I am looking for a relatively good and well supported, and preferably open source blog application that runs on ASP.NET and SQL Server. It doesn’t need to be packed full of features, it just needs the basics, such as tagging, comments, etc. E... | [
"c#",
"asp.net",
"blogs"
] | 2 | 6 | 893 | 4 | 0 | 2008-09-30T05:36:00.777000 | 2008-09-30T05:39:00.850000 |
151,900 | 151,903 | saslpasswd2: generic failure on Windows | I get a generic failure when I try to run: saslpasswd2 username This was installed by Collanet's Subversion 1.5.2. | The problem that I had was that the sasl executables are trying to access the sasldb file at: C:\CMU\sasldb2 Make sure that you create the directory C:\CMU | saslpasswd2: generic failure on Windows I get a generic failure when I try to run: saslpasswd2 username This was installed by Collanet's Subversion 1.5.2. | TITLE:
saslpasswd2: generic failure on Windows
QUESTION:
I get a generic failure when I try to run: saslpasswd2 username This was installed by Collanet's Subversion 1.5.2.
ANSWER:
The problem that I had was that the sasl executables are trying to access the sasldb file at: C:\CMU\sasldb2 Make sure that you create the... | [
"windows",
"svn",
"sasl"
] | 2 | 1 | 2,487 | 1 | 0 | 2008-09-30T05:48:59.997000 | 2008-09-30T05:51:11.663000 |
151,905 | 151,910 | Best way to make double insert | What's the best way of inserting information in table A and using the index from table A to relate to table B. The "solution" I tried is inserting the info in table A (which has a automatically generated ID), then, select the last index and insert it in table B. This may not be very useful, as the last index may change... | if you're using MSSQL you could use SCOPE_IDENTITY to return the last id inserted in your current session. You can then use that to insert into table B. This article from MSDN gives a decent example on how to do it. | Best way to make double insert What's the best way of inserting information in table A and using the index from table A to relate to table B. The "solution" I tried is inserting the info in table A (which has a automatically generated ID), then, select the last index and insert it in table B. This may not be very usefu... | TITLE:
Best way to make double insert
QUESTION:
What's the best way of inserting information in table A and using the index from table A to relate to table B. The "solution" I tried is inserting the info in table A (which has a automatically generated ID), then, select the last index and insert it in table B. This may... | [
"sql",
"database"
] | 4 | 8 | 9,418 | 12 | 0 | 2008-09-30T05:51:40.320000 | 2008-09-30T05:53:53.403000 |
151,917 | 151,932 | AutoLock in Java - how to? | What is the best way to free resources (in this case unlock the ReadWriteLock) when leaving the scope? How to cover all possible ways (return, break, exceptions etc)? | A try/finally block is the closest thing that you can get to this behaviour: Lock l = new Lock(); l.lock(); // Call the lock before calling try. try { // Do some processing. // All code must go in here including break, return etc. return something; } finally { l.unlock(); } | AutoLock in Java - how to? What is the best way to free resources (in this case unlock the ReadWriteLock) when leaving the scope? How to cover all possible ways (return, break, exceptions etc)? | TITLE:
AutoLock in Java - how to?
QUESTION:
What is the best way to free resources (in this case unlock the ReadWriteLock) when leaving the scope? How to cover all possible ways (return, break, exceptions etc)?
ANSWER:
A try/finally block is the closest thing that you can get to this behaviour: Lock l = new Lock(); l... | [
"java",
"synchronization",
"locking"
] | 2 | 12 | 1,514 | 3 | 0 | 2008-09-30T05:58:22.690000 | 2008-09-30T06:05:11.287000 |
151,919 | 151,998 | When should I use __forceinline instead of inline? | Visual Studio includes support for __forceinline. The Microsoft Visual Studio 2005 documentation states: The __forceinline keyword overrides the cost/benefit analysis and relies on the judgment of the programmer instead. This raises the question: When is the compiler's cost/benefit analysis wrong? And, how am I suppose... | The compiler is making its decisions based on static code analysis, whereas if you profile as don says, you are carrying out a dynamic analysis that can be much farther reaching. The number of calls to a specific piece of code is often largely determined by the context in which it is used, e.g. the data. Profiling a ty... | When should I use __forceinline instead of inline? Visual Studio includes support for __forceinline. The Microsoft Visual Studio 2005 documentation states: The __forceinline keyword overrides the cost/benefit analysis and relies on the judgment of the programmer instead. This raises the question: When is the compiler's... | TITLE:
When should I use __forceinline instead of inline?
QUESTION:
Visual Studio includes support for __forceinline. The Microsoft Visual Studio 2005 documentation states: The __forceinline keyword overrides the cost/benefit analysis and relies on the judgment of the programmer instead. This raises the question: When... | [
"c++",
"visual-studio",
"inline-functions"
] | 47 | 29 | 36,580 | 13 | 0 | 2008-09-30T05:58:53.640000 | 2008-09-30T06:49:46.747000 |
151,929 | 155,127 | Errors with Python's mechanize module | I'm using the mechanize module to execute some web queries from Python. I want my program to be error-resilient and handle all kinds of errors (wrong URLs, 403/404 responsese) gracefully. However, I can't find in mechanize's documentation the errors / exceptions it throws for various errors. I just call it with: self.b... | $ perl -0777 -ne'print qq($1) if /__all__ = \[(.*?)\]/s' __init__.py | grep Error
'BrowserStateError', 'ContentTooShortError', 'FormNotFoundError', 'GopherError', 'HTTPDefaultErrorHandler', 'HTTPError', 'HTTPErrorProcessor', 'LinkNotFoundError', 'LoadError', 'ParseError', 'RobotExclusionError', 'URLError', Or: >>> imp... | Errors with Python's mechanize module I'm using the mechanize module to execute some web queries from Python. I want my program to be error-resilient and handle all kinds of errors (wrong URLs, 403/404 responsese) gracefully. However, I can't find in mechanize's documentation the errors / exceptions it throws for vario... | TITLE:
Errors with Python's mechanize module
QUESTION:
I'm using the mechanize module to execute some web queries from Python. I want my program to be error-resilient and handle all kinds of errors (wrong URLs, 403/404 responsese) gracefully. However, I can't find in mechanize's documentation the errors / exceptions i... | [
"python",
"exception",
"urllib2",
"mechanize"
] | 6 | 9 | 6,615 | 3 | 0 | 2008-09-30T06:03:47.793000 | 2008-09-30T21:15:47.510000 |
151,936 | 151,950 | Does an empty array in .NET use any space? | I have some code where I'm returning an array of objects. Here's a simplified example: string[] GetTheStuff() { List s = null; if( somePredicate() ) { s = new List (); // imagine we load some data or something } return (s == null)? new string[0]: s.ToArray(); } The question is, how expensive is the new string[0]? Shoul... | Even if it's being called "hundreds and hundreds" of times, I'd say it's a premature optimization. If the result is clearer as an empty array, use that. Now for the actual answer: yes, an empty array takes some memory. It has the normal object overhead (8 bytes on x86, I believe) and 4 bytes for the count. I don't know... | Does an empty array in .NET use any space? I have some code where I'm returning an array of objects. Here's a simplified example: string[] GetTheStuff() { List s = null; if( somePredicate() ) { s = new List (); // imagine we load some data or something } return (s == null)? new string[0]: s.ToArray(); } The question is... | TITLE:
Does an empty array in .NET use any space?
QUESTION:
I have some code where I'm returning an array of objects. Here's a simplified example: string[] GetTheStuff() { List s = null; if( somePredicate() ) { s = new List (); // imagine we load some data or something } return (s == null)? new string[0]: s.ToArray();... | [
"c#",
".net",
"arrays"
] | 26 | 56 | 19,601 | 10 | 0 | 2008-09-30T06:07:53.807000 | 2008-09-30T06:16:23.193000 |
151,945 | 151,946 | How do I control how Emacs makes backup files? | Emacs puts backup files named foo~ everywhere and I don't like having to remember to delete them. Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I'm done editing, and that's confusing and awful. How can I either eliminate these backup files, or hav... | If you've ever been saved by an Emacs backup file, you probably want more of them, not less of them. It is annoying that they go in the same directory as the file you're editing, but that is easy to change. You can make all backup files go into a directory by putting something like the following in your.emacs. (setq ba... | How do I control how Emacs makes backup files? Emacs puts backup files named foo~ everywhere and I don't like having to remember to delete them. Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I'm done editing, and that's confusing and awful. How ca... | TITLE:
How do I control how Emacs makes backup files?
QUESTION:
Emacs puts backup files named foo~ everywhere and I don't like having to remember to delete them. Also, if I edit a file that has a hard link somewhere else in the file system, the hard link points to the backup when I'm done editing, and that's confusing... | [
"emacs"
] | 365 | 587 | 135,708 | 7 | 0 | 2008-09-30T06:15:08.750000 | 2008-09-30T06:15:25.427000 |
151,952 | 151,955 | What is Native Code? | The Project's Web section (under project properties in VS2008) has a list of debuggers: ASP.NET, Native Code, SQL Server. What is Native Code? | Native code is machine code executed directly by the CPU. This is in contrast to.NET bytecode, which is interpreted by the.NET virtual machine. A nice MSDN hit: Debugging Native Code | What is Native Code? The Project's Web section (under project properties in VS2008) has a list of debuggers: ASP.NET, Native Code, SQL Server. What is Native Code? | TITLE:
What is Native Code?
QUESTION:
The Project's Web section (under project properties in VS2008) has a list of debuggers: ASP.NET, Native Code, SQL Server. What is Native Code?
ANSWER:
Native code is machine code executed directly by the CPU. This is in contrast to.NET bytecode, which is interpreted by the.NET vi... | [
"c#",
"asp.net",
"visual-studio-2008"
] | 18 | 21 | 28,207 | 4 | 0 | 2008-09-30T06:17:19.040000 | 2008-09-30T06:18:25.387000 |
151,957 | 151,986 | Good database design for recall and comparison of 2D data arrays? | I am looking to store 2D arrays of 900x100 elements in a database. Efficient recall and comparison of the arrays is important. I could use a table with a schema like [A, x, y, A(x,y)] such that a single array would compromise 90,000 records. This seems like an ~ok~ table design to store the array, and would provide for... | If the type of data allows, store it in a concatenated format and compare in memory after it has been de-concatenated. The database operation will be much faster and the in-memory operations will be faster than database retrievals as well. Who knows, you may even be able to compare it without de-concatenating. | Good database design for recall and comparison of 2D data arrays? I am looking to store 2D arrays of 900x100 elements in a database. Efficient recall and comparison of the arrays is important. I could use a table with a schema like [A, x, y, A(x,y)] such that a single array would compromise 90,000 records. This seems l... | TITLE:
Good database design for recall and comparison of 2D data arrays?
QUESTION:
I am looking to store 2D arrays of 900x100 elements in a database. Efficient recall and comparison of the arrays is important. I could use a table with a schema like [A, x, y, A(x,y)] such that a single array would compromise 90,000 rec... | [
"arrays",
"database-design"
] | 2 | 2 | 662 | 3 | 0 | 2008-09-30T06:18:31.613000 | 2008-09-30T06:34:51.417000 |
151,959 | 152,114 | Date Conversion with SQL Server/Reporting Services | I have 2 fields in the database month (numeric) and year (numeric) and I want to combine them in a report that combines those 2 fields and format them with MMM-YYYY. e.g 7-2008 becomes Jul-2008. How do I do that? | DateSerial is the correct answer: http://msdn.microsoft.com/en-us/library/bbx05d0c(VS.80).aspx SSRS uses VB.Net for expressions. Use the expression editor to browse the available functions, one of which is DateSerial. To format the date, set the Format property on the textbox. You should be able to use "MMM-yyyy" as th... | Date Conversion with SQL Server/Reporting Services I have 2 fields in the database month (numeric) and year (numeric) and I want to combine them in a report that combines those 2 fields and format them with MMM-YYYY. e.g 7-2008 becomes Jul-2008. How do I do that? | TITLE:
Date Conversion with SQL Server/Reporting Services
QUESTION:
I have 2 fields in the database month (numeric) and year (numeric) and I want to combine them in a report that combines those 2 fields and format them with MMM-YYYY. e.g 7-2008 becomes Jul-2008. How do I do that?
ANSWER:
DateSerial is the correct ans... | [
"sql-server-2005",
"reporting-services"
] | 1 | 1 | 2,617 | 3 | 0 | 2008-09-30T06:19:07.803000 | 2008-09-30T07:41:13.583000 |
151,963 | 1,268,335 | Asp.Net MVC: How do I get virtual url for the current controller/view? | Is it possible to get the route/virtual url associated with a controller action or on a view? I saw that Preview 4 added LinkBuilder.BuildUrlFromExpression helper, but it's not very useful if you want to use it on the master, since the controller type can be different. Any thoughts are appreciated. | You can get that data from ViewContext.RouteData. Below are some examples for how to access (and use) that information: /// These are added to my viewmasterpage, viewpage, and viewusercontrol base classes: public bool IsController(string controller) { if (ViewContext.RouteData.Values["controller"]!= null) { return View... | Asp.Net MVC: How do I get virtual url for the current controller/view? Is it possible to get the route/virtual url associated with a controller action or on a view? I saw that Preview 4 added LinkBuilder.BuildUrlFromExpression helper, but it's not very useful if you want to use it on the master, since the controller ty... | TITLE:
Asp.Net MVC: How do I get virtual url for the current controller/view?
QUESTION:
Is it possible to get the route/virtual url associated with a controller action or on a view? I saw that Preview 4 added LinkBuilder.BuildUrlFromExpression helper, but it's not very useful if you want to use it on the master, since... | [
"c#",
"asp.net-mvc",
"routes"
] | 20 | 14 | 47,269 | 5 | 0 | 2008-09-30T06:20:43.540000 | 2009-08-12T19:51:10.600000 |
151,966 | 151,968 | Why are no Symbols loaded when remote debugging? | I want to use remote debugging. The program that I want to debug runs on machine b. Visual Studio runs on machine a. On machine b I have a folder with the following files: msvcr72.dll msvsmon.exe NatDbgDE.dll NatDbgDEUI.dll NatDbgEE.dll NatDbgEEUI.dll If you think some files are missing, could you also describe where t... | Make sure you copy the.PDB file that is generated with your assembly into the same folder on the remote machine. This will allow the debugger to pickup the debug symbols. | Why are no Symbols loaded when remote debugging? I want to use remote debugging. The program that I want to debug runs on machine b. Visual Studio runs on machine a. On machine b I have a folder with the following files: msvcr72.dll msvsmon.exe NatDbgDE.dll NatDbgDEUI.dll NatDbgEE.dll NatDbgEEUI.dll If you think some f... | TITLE:
Why are no Symbols loaded when remote debugging?
QUESTION:
I want to use remote debugging. The program that I want to debug runs on machine b. Visual Studio runs on machine a. On machine b I have a folder with the following files: msvcr72.dll msvsmon.exe NatDbgDE.dll NatDbgDEUI.dll NatDbgEE.dll NatDbgEEUI.dll I... | [
"visual-studio-2008",
"remote-debugging"
] | 56 | 30 | 63,388 | 14 | 0 | 2008-09-30T06:21:38.750000 | 2008-09-30T06:23:03.257000 |
151,969 | 151,976 | When should I use 'self' over '$this'? | In PHP 5, what is the difference between using self and $this? When is each appropriate? | Short Answer Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members. Full Answer Here is an example of correct usage of $this and self for non-static and static member variables: non_static_member. ... | When should I use 'self' over '$this'? In PHP 5, what is the difference between using self and $this? When is each appropriate? | TITLE:
When should I use 'self' over '$this'?
QUESTION:
In PHP 5, what is the difference between using self and $this? When is each appropriate?
ANSWER:
Short Answer Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$m... | [
"php",
"class",
"oop",
"scope"
] | 2,225 | 1,929 | 833,175 | 24 | 0 | 2008-09-30T06:23:06.343000 | 2008-09-30T06:29:25.627000 |
151,979 | 152,562 | Does the GroupBox Header in WPF swallow mouse-clicks? | Have a look at this very simple example WPF program: So I have a GroupBox whose header is a CheckBox. We've all done something like this - typically you bind the content of the GroupBox in such a way that it's disabled when the CheckBox is unchecked. However, when I run this application and click on the CheckBox, I've ... | It appears to be a subtle bug in the control template for the GroupBox. I found by editing the default template for the GroupBox and moving the Border named 'Header' to the last item in the control templates Grid element, the issue resolves itself. The reason is that the one of the other Border elements with a Template... | Does the GroupBox Header in WPF swallow mouse-clicks? Have a look at this very simple example WPF program: So I have a GroupBox whose header is a CheckBox. We've all done something like this - typically you bind the content of the GroupBox in such a way that it's disabled when the CheckBox is unchecked. However, when I... | TITLE:
Does the GroupBox Header in WPF swallow mouse-clicks?
QUESTION:
Have a look at this very simple example WPF program: So I have a GroupBox whose header is a CheckBox. We've all done something like this - typically you bind the content of the GroupBox in such a way that it's disabled when the CheckBox is unchecke... | [
".net",
"wpf",
"checkbox",
"groupbox"
] | 41 | 19 | 9,347 | 4 | 0 | 2008-09-30T06:32:09.880000 | 2008-09-30T10:50:29.290000 |
152,003 | 152,014 | Server side virus scanning | I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it. What are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time. | I would have a look at Clam AntiVirus. It provides a clamscan program that can scan a given file and return a pass/fail indication. It's free and automatically updates its database regularly. As for integrating such a product into your file upload process, that would be specific to whatever file upload process you actu... | Server side virus scanning I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it. What are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time. | TITLE:
Server side virus scanning
QUESTION:
I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it. What are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time.
ANSWER:
I would have a look at Clam AntiV... | [
"linux",
"server-side",
"antivirus"
] | 9 | 14 | 8,639 | 7 | 0 | 2008-09-30T06:51:37.010000 | 2008-09-30T06:56:28.930000 |
152,005 | 152,020 | How can currying be done in C++? | What is currying? How can currying be done in C++? Please Explain binders in STL container? | In short, currying takes a function f(x, y) and given a fixed Y, gives a new function g(x) where g(x) == f(x, Y) This new function may be called in situations where only one argument is supplied, and passes the call on to the original f function with the fixed Y argument. The binders in the STL allow you to do this for... | How can currying be done in C++? What is currying? How can currying be done in C++? Please Explain binders in STL container? | TITLE:
How can currying be done in C++?
QUESTION:
What is currying? How can currying be done in C++? Please Explain binders in STL container?
ANSWER:
In short, currying takes a function f(x, y) and given a fixed Y, gives a new function g(x) where g(x) == f(x, Y) This new function may be called in situations where onl... | [
"c++",
"stl",
"functional-programming",
"currying",
"binders"
] | 63 | 42 | 36,692 | 12 | 0 | 2008-09-30T06:51:54.217000 | 2008-09-30T06:59:57.223000 |
152,006 | 152,009 | change mime type of output in php | I've got a php script. Most of the time the script returns html, which is working fine, but on one occasion (parameter?Format=XML) the script returns XML instead of HTML. Is there any way to change the returned mime type of the php output on the fly from text/html to text/xml or application/xml? | header('Content-type: application/xml'); More information available at the PHP documentation for header() | change mime type of output in php I've got a php script. Most of the time the script returns html, which is working fine, but on one occasion (parameter?Format=XML) the script returns XML instead of HTML. Is there any way to change the returned mime type of the php output on the fly from text/html to text/xml or applic... | TITLE:
change mime type of output in php
QUESTION:
I've got a php script. Most of the time the script returns html, which is working fine, but on one occasion (parameter?Format=XML) the script returns XML instead of HTML. Is there any way to change the returned mime type of the php output on the fly from text/html to ... | [
"php",
"xml",
"mime-types"
] | 64 | 126 | 92,662 | 6 | 0 | 2008-09-30T06:52:11.360000 | 2008-09-30T06:53:45.380000 |
152,015 | 164,538 | .NET Micro Framework on a ARM Cortex-M3 Core | I have a RDK-IDM from Luminary Micro. This board has a 32-bit ARM® Cortex™-M3 core. Has anybody tried to run a.NET Micro Framework application on such a device? | The cortex M3 is a very cut-down core, it lacks an MMU, for example, and is intended to run very simple operating systems. Specifically, not Symbian/Windows Mobile/Linux/etc. Rather OSEck, OSEK, iTRON, or similar. I think this is actually totally infeasible due to that. | .NET Micro Framework on a ARM Cortex-M3 Core I have a RDK-IDM from Luminary Micro. This board has a 32-bit ARM® Cortex™-M3 core. Has anybody tried to run a.NET Micro Framework application on such a device? | TITLE:
.NET Micro Framework on a ARM Cortex-M3 Core
QUESTION:
I have a RDK-IDM from Luminary Micro. This board has a 32-bit ARM® Cortex™-M3 core. Has anybody tried to run a.NET Micro Framework application on such a device?
ANSWER:
The cortex M3 is a very cut-down core, it lacks an MMU, for example, and is intended to... | [
"arm",
"cortex-m",
".net-micro-framework"
] | 3 | 0 | 5,484 | 4 | 0 | 2008-09-30T06:57:44.233000 | 2008-10-02T20:51:50.140000 |
152,019 | 1,047,961 | Will a future version of .NET support tuples in C#? | .Net 3.5 doesn't support tuples. Too bad, But not sure whether the future version of.net will support tuples or not? | I've just read this article from the MSDN Magazine: Building Tuple Here are excerpts: The upcoming 4.0 release of Microsoft.NET Framework introduces a new type called System.Tuple. System.Tuple is a fixed-size collection of heterogeneously typed data. Like an array, a tuple has a fixed size that can't be changed once i... | Will a future version of .NET support tuples in C#? .Net 3.5 doesn't support tuples. Too bad, But not sure whether the future version of.net will support tuples or not? | TITLE:
Will a future version of .NET support tuples in C#?
QUESTION:
.Net 3.5 doesn't support tuples. Too bad, But not sure whether the future version of.net will support tuples or not?
ANSWER:
I've just read this article from the MSDN Magazine: Building Tuple Here are excerpts: The upcoming 4.0 release of Microsoft.... | [
"c#",
".net",
"tuples",
"language-features"
] | 69 | 73 | 33,766 | 12 | 0 | 2008-09-30T06:59:50.077000 | 2009-06-26T08:24:10.943000 |
152,022 | 160,715 | Deploying Websphere Portals onto a 6.1 Server | Any time I try to publish my Portal project on a Websphere Portal 6.1 Server, I get the following error message: Portal project publishing is not supported on WebSphere Portal v6.1 Server Is that really true or have I done something wrong? I'm trying to deploy a portal project, with the underlying goal of publishing a ... | Not sure this will help, but: Limitation: Although the WebSphere Portal installer contains an advanced option to install an empty portal, Portal Designer relies on administration portlets for setting access control; therefore, publishing a portal project to an empty portal is not supported. Are you trying to deploy a p... | Deploying Websphere Portals onto a 6.1 Server Any time I try to publish my Portal project on a Websphere Portal 6.1 Server, I get the following error message: Portal project publishing is not supported on WebSphere Portal v6.1 Server Is that really true or have I done something wrong? I'm trying to deploy a portal proj... | TITLE:
Deploying Websphere Portals onto a 6.1 Server
QUESTION:
Any time I try to publish my Portal project on a Websphere Portal 6.1 Server, I get the following error message: Portal project publishing is not supported on WebSphere Portal v6.1 Server Is that really true or have I done something wrong? I'm trying to de... | [
"deployment",
"rad",
"websphere-6.1",
"websphere-portal"
] | 0 | 1 | 1,106 | 2 | 0 | 2008-09-30T07:00:49.840000 | 2008-10-02T03:03:01.783000 |
152,024 | 152,037 | How to select all users who made more than 10 submissions | I have a submission table that is very simple: userId, submissionGuid I want to select the username (simple inner join to get it) of all the users who have more than 10 submissions in the table. I would do this with embedded queries and a group by to count submissions... but is there a better way of doing it (without e... | This is the simplest way, I believe: select userId from submission group by userId having count(submissionGuid) > 10 | How to select all users who made more than 10 submissions I have a submission table that is very simple: userId, submissionGuid I want to select the username (simple inner join to get it) of all the users who have more than 10 submissions in the table. I would do this with embedded queries and a group by to count submi... | TITLE:
How to select all users who made more than 10 submissions
QUESTION:
I have a submission table that is very simple: userId, submissionGuid I want to select the username (simple inner join to get it) of all the users who have more than 10 submissions in the table. I would do this with embedded queries and a group... | [
"sql"
] | 3 | 5 | 871 | 5 | 0 | 2008-09-30T07:01:27.610000 | 2008-09-30T07:04:58.350000 |
152,028 | 152,059 | Are there any OK image recognition libraries for .NET? | I want to be able to compare an image taken from a webcam to an image stored on my computer. The library doesn't need to be one hundred percent accurate as it won't be used in anything mission critical (e.g. police investigation), I just want something OK I can work with. I have tried a demonstration project for Image ... | You could try this: http://code.google.com/p/aforge/ It includes a comparison analysis that will give you a score. There are many other great imaging features of all types included as well. // The class also can be used to get similarity level between two image of the same size, which can be useful to get information a... | Are there any OK image recognition libraries for .NET? I want to be able to compare an image taken from a webcam to an image stored on my computer. The library doesn't need to be one hundred percent accurate as it won't be used in anything mission critical (e.g. police investigation), I just want something OK I can wor... | TITLE:
Are there any OK image recognition libraries for .NET?
QUESTION:
I want to be able to compare an image taken from a webcam to an image stored on my computer. The library doesn't need to be one hundred percent accurate as it won't be used in anything mission critical (e.g. police investigation), I just want some... | [
"c#",
".net",
"vb.net",
"image",
"image-recognition"
] | 61 | 80 | 66,006 | 3 | 0 | 2008-09-30T07:02:49.837000 | 2008-09-30T07:16:33.983000 |
152,064 | 152,332 | How to measure performance in a C++ (MFC) application? | What good profilers do you know? What is a good way to measure and tweak the performance of a C++ MFC application? Is Analysis of algorithms really neccesary? http://en.wikipedia.org/wiki/Algorithm_analysis | I strongly recommend AQTime if you are staying on the Windows platform. It comes with a load of profilers, including static code analysis, and works with most important Windows compilers and systems, including Visual C++,.NET, Delphi, Borland C++, Intel C++ and even gcc. And it integrates into Visual Studio, but can al... | How to measure performance in a C++ (MFC) application? What good profilers do you know? What is a good way to measure and tweak the performance of a C++ MFC application? Is Analysis of algorithms really neccesary? http://en.wikipedia.org/wiki/Algorithm_analysis | TITLE:
How to measure performance in a C++ (MFC) application?
QUESTION:
What good profilers do you know? What is a good way to measure and tweak the performance of a C++ MFC application? Is Analysis of algorithms really neccesary? http://en.wikipedia.org/wiki/Algorithm_analysis
ANSWER:
I strongly recommend AQTime if ... | [
"c++",
"performance",
"optimization",
"mfc"
] | 6 | 4 | 6,995 | 10 | 0 | 2008-09-30T07:20:17.860000 | 2008-09-30T09:11:34.007000 |
152,068 | 152,083 | Is it OK to inspect properties beginning with underscore? | I've been working on a very simple crud generator for pylons. I came up with something that inspects SomeClass._sa_class_manager.mapper.c Is it ok to inspect this (or to call methods begining with underscore)? I always kind of assumed this is legal though frowned upon as it relies heavily on the internal structure of a... | It is intentional (in Python) that there are no "private" scopes. It is a convention that anything that starts with an underscore should not ideally be used, and hence you may not complain if its behavior or definition changes in a next version. | Is it OK to inspect properties beginning with underscore? I've been working on a very simple crud generator for pylons. I came up with something that inspects SomeClass._sa_class_manager.mapper.c Is it ok to inspect this (or to call methods begining with underscore)? I always kind of assumed this is legal though frowne... | TITLE:
Is it OK to inspect properties beginning with underscore?
QUESTION:
I've been working on a very simple crud generator for pylons. I came up with something that inspects SomeClass._sa_class_manager.mapper.c Is it ok to inspect this (or to call methods begining with underscore)? I always kind of assumed this is l... | [
"python",
"sqlalchemy",
"pylons"
] | 5 | 9 | 509 | 4 | 0 | 2008-09-30T07:24:25.743000 | 2008-09-30T07:29:36.543000 |
152,069 | 152,131 | If you change RightToLeft, ShowInTaskbar properties, Form.ShowDialog() unexpectedly ends | Dialog closes with Cancel result, no exceptions, as if you have pressed its close button. The only safe place to set RightToLeft property is in the form constructor. It occured to me that this information might save somebody else's time. If you are able to elaborate on the issue: if there is an official bug confirmatio... | Ok... I have a quick fix for you. It is nasty, it is a hack but it kinda works. From my answer to the original question: private bool _rightToLeft; private void SetRTL(bool setRTL) { _rightToLeft = true; ApplyRTL(setRTL, this); }
private void ApplyRTL(bool yes, Control startControl) { if ((startControl is Panel) || (s... | If you change RightToLeft, ShowInTaskbar properties, Form.ShowDialog() unexpectedly ends Dialog closes with Cancel result, no exceptions, as if you have pressed its close button. The only safe place to set RightToLeft property is in the form constructor. It occured to me that this information might save somebody else's... | TITLE:
If you change RightToLeft, ShowInTaskbar properties, Form.ShowDialog() unexpectedly ends
QUESTION:
Dialog closes with Cancel result, no exceptions, as if you have pressed its close button. The only safe place to set RightToLeft property is in the form constructor. It occured to me that this information might sa... | [
".net",
"winforms",
"localization"
] | 1 | 1 | 625 | 1 | 0 | 2008-09-30T07:25:01.030000 | 2008-09-30T07:48:05.140000 |
152,074 | 152,113 | SQL schema to hold history of employee actions when employees come/go/get promoted, etc | I'm writing an app that contains the following tables: (1) employee_type, (2) employee and (3) employee_action. Employee_action is foreign-keyed to employee, and contains a description of what happened and the date of the event, just as you might expect. However, employees can change their type over time (promotion, de... | And to answer your question, I think your only option (if you can't do any redesign of the schema) is to add a table where you store the timespans in which a certain condition held true, eg a table employment_history with the employee, a position ('CEO', 'delivery boy' or the ID's of those positions if you have them no... | SQL schema to hold history of employee actions when employees come/go/get promoted, etc I'm writing an app that contains the following tables: (1) employee_type, (2) employee and (3) employee_action. Employee_action is foreign-keyed to employee, and contains a description of what happened and the date of the event, jus... | TITLE:
SQL schema to hold history of employee actions when employees come/go/get promoted, etc
QUESTION:
I'm writing an app that contains the following tables: (1) employee_type, (2) employee and (3) employee_action. Employee_action is foreign-keyed to employee, and contains a description of what happened and the date... | [
"database-design"
] | 0 | 1 | 1,688 | 3 | 0 | 2008-09-30T07:26:19.343000 | 2008-09-30T07:41:02.053000 |
152,077 | 152,095 | Programming against interfaces: Do you write interfaces for all your domain classes? | I agree, that programming against interfaces is a good practice. In most cases in Java "interface" in this sense means the language construct interface, so that you write an interface and an implementation class and that you use the interface instead of the implementation class most of the time. I wonder if this is a g... | Writing interfaces "just because" strikes me as a waste of time and energy, not to mention a violation of the KISS-principle. I write them when they are actually useful in representing common behavior of related classes, not just as a fancy header file. | Programming against interfaces: Do you write interfaces for all your domain classes? I agree, that programming against interfaces is a good practice. In most cases in Java "interface" in this sense means the language construct interface, so that you write an interface and an implementation class and that you use the in... | TITLE:
Programming against interfaces: Do you write interfaces for all your domain classes?
QUESTION:
I agree, that programming against interfaces is a good practice. In most cases in Java "interface" in this sense means the language construct interface, so that you write an interface and an implementation class and t... | [
"java",
"model",
"dns",
"interface"
] | 23 | 27 | 5,589 | 15 | 0 | 2008-09-30T07:27:44.847000 | 2008-09-30T07:35:25.517000 |
152,084 | 154,267 | Fixed point combinators in C++ | I'm interested in actual examples of using fixed point combinators (such as the y-combinator in C++. Have you ever used a fixed point combinator with egg or bind in real live code? I found this example in egg a little dense: void egg_example() { using bll::_1; using bll::_2;
int r = fix2( bll::ret ( // \(f,a) -> a == ... | Here is the same code converted into boost::bind notice the y-combinator and its application site in the main function. I hope this helps. #include #include #include // Y-combinator compatible factorial int fact(boost::function f,int v) { if(v == 0) return 1; else return v * f(v -1); }
// Y-combinator for the int type... | Fixed point combinators in C++ I'm interested in actual examples of using fixed point combinators (such as the y-combinator in C++. Have you ever used a fixed point combinator with egg or bind in real live code? I found this example in egg a little dense: void egg_example() { using bll::_1; using bll::_2;
int r = fix2... | TITLE:
Fixed point combinators in C++
QUESTION:
I'm interested in actual examples of using fixed point combinators (such as the y-combinator in C++. Have you ever used a fixed point combinator with egg or bind in real live code? I found this example in egg a little dense: void egg_example() { using bll::_1; using bll:... | [
"c++",
"bind",
"y-combinator"
] | 11 | 34 | 7,333 | 3 | 0 | 2008-09-30T07:29:39.197000 | 2008-09-30T18:13:20.927000 |
152,099 | 253,191 | I want to prevent ASP.NET GridView from reacting to the enter button | I have an ASP.NET page with a gridview control on it with a CommandButton column with delete and select commands active. Pressing the enter key causes the first command button in the gridview to fire, which deletes a row. I don't want this to happen. Can I change the gridview control in a way that it does not react any... | This solution is blocking the enter key on the entire page Disable Enter Key | I want to prevent ASP.NET GridView from reacting to the enter button I have an ASP.NET page with a gridview control on it with a CommandButton column with delete and select commands active. Pressing the enter key causes the first command button in the gridview to fire, which deletes a row. I don't want this to happen. ... | TITLE:
I want to prevent ASP.NET GridView from reacting to the enter button
QUESTION:
I have an ASP.NET page with a gridview control on it with a CommandButton column with delete and select commands active. Pressing the enter key causes the first command button in the gridview to fire, which deletes a row. I don't wan... | [
"asp.net-2.0"
] | 4 | 1 | 8,770 | 6 | 0 | 2008-09-30T07:36:54.187000 | 2008-10-31T11:17:08.863000 |
152,104 | 154,377 | Problems using jeditable and autogrow | I work on a Webproject using jQuery and CakePHP. I use jeditable as an inplace edit plugin. For textareas I extend it using the autogrow plugin. Well, I have two problems with this: First, autogrow does only work on Firefox, not on IE, Safari, Opera and Chrome. Second, I need a callback event for jeditable, when its fi... | I didn't see any problems using Autogrow with jeditable in any browsers but here is an implementation of Growfield with jeditable. It works much in the same way that the Autogrow plugin for jeditable does. You create a special input type for jeditable and just apply.growfield() to it. The necessary javascript is below,... | Problems using jeditable and autogrow I work on a Webproject using jQuery and CakePHP. I use jeditable as an inplace edit plugin. For textareas I extend it using the autogrow plugin. Well, I have two problems with this: First, autogrow does only work on Firefox, not on IE, Safari, Opera and Chrome. Second, I need a cal... | TITLE:
Problems using jeditable and autogrow
QUESTION:
I work on a Webproject using jQuery and CakePHP. I use jeditable as an inplace edit plugin. For textareas I extend it using the autogrow plugin. Well, I have two problems with this: First, autogrow does only work on Firefox, not on IE, Safari, Opera and Chrome. Se... | [
"javascript",
"jquery",
"ajax",
"jeditable",
"autogrow"
] | 2 | 3 | 5,881 | 4 | 0 | 2008-09-30T07:38:10.063000 | 2008-09-30T18:38:19.807000 |
152,115 | 153,016 | Gaussian distributions with PHP on a 24h time period | How can I set points on a 24h period spreaded by the Gaussian distributions? For example to have the peak at 10 o'clock? | The following code generates a gaussian distributed random time (in hours, plus fractions of an hour) centered at a given time, and with a given standard deviation. The random times may 'wrap around' the clock, especially if the standard deviation is several hours: this is handled correctly. A different 'wrapping' algo... | Gaussian distributions with PHP on a 24h time period How can I set points on a 24h period spreaded by the Gaussian distributions? For example to have the peak at 10 o'clock? | TITLE:
Gaussian distributions with PHP on a 24h time period
QUESTION:
How can I set points on a 24h period spreaded by the Gaussian distributions? For example to have the peak at 10 o'clock?
ANSWER:
The following code generates a gaussian distributed random time (in hours, plus fractions of an hour) centered at a giv... | [
"php",
"math",
"gaussian"
] | 4 | 9 | 2,989 | 2 | 0 | 2008-09-30T07:41:15.080000 | 2008-09-30T13:27:11.003000 |
152,120 | 209,600 | Are there any open source projects using DDD (Domain Driven Design)? | I'm trying to understand the concepts behind DDD, but I find it hard to understand just by reading books as they tend to discuss the topic in a rather abstract way. I would like to see some good implementations of DDD in code, preferably in C#. Are there any good examples of projects practicing DDD in the open source w... | Eric Evans and a Swedish consulting company have released a sample application based on the shipping example that Eric uses throughout the book. It's in Java, but the concepts are well documented on the project page. http://dddsample.sourceforge.net/ However, be warned that DDD is more about the journey than the destin... | Are there any open source projects using DDD (Domain Driven Design)? I'm trying to understand the concepts behind DDD, but I find it hard to understand just by reading books as they tend to discuss the topic in a rather abstract way. I would like to see some good implementations of DDD in code, preferably in C#. Are th... | TITLE:
Are there any open source projects using DDD (Domain Driven Design)?
QUESTION:
I'm trying to understand the concepts behind DDD, but I find it hard to understand just by reading books as they tend to discuss the topic in a rather abstract way. I would like to see some good implementations of DDD in code, prefer... | [
"c#",
"architecture",
"open-source",
"domain-driven-design"
] | 29 | 16 | 14,308 | 12 | 0 | 2008-09-30T07:42:12.723000 | 2008-10-16T17:53:54.007000 |
152,123 | 152,186 | Animation in C++ | What are ways to draw animations in C++? GDI+? OpenGL? Would you recommend a class pattern in particular to get the drawing and redrawing done? Do you know of any open source project where animations are made so I can take a peek at the code? Where would you start if you wanted to code geometrical animations? Do you kn... | QT QGraphicsScene It was specifically designed to make writing 2D games easy and effortless, with great support for animation. QT is a very mature cross platform toolkit which also have an open source flavor. | Animation in C++ What are ways to draw animations in C++? GDI+? OpenGL? Would you recommend a class pattern in particular to get the drawing and redrawing done? Do you know of any open source project where animations are made so I can take a peek at the code? Where would you start if you wanted to code geometrical anim... | TITLE:
Animation in C++
QUESTION:
What are ways to draw animations in C++? GDI+? OpenGL? Would you recommend a class pattern in particular to get the drawing and redrawing done? Do you know of any open source project where animations are made so I can take a peek at the code? Where would you start if you wanted to cod... | [
"c++",
"animation"
] | 2 | 3 | 12,882 | 6 | 0 | 2008-09-30T07:45:33.930000 | 2008-09-30T08:11:46.893000 |
152,137 | 152,898 | ActionUrl in ASP.NET MVC Preview 5 | I don't need a Link but rather only the href= part of the ActionLink. But if I call Html.ActionLink(...) I get a back. Is there a way to just return the URL of the Action while not getting the? | MVC also provides a UrlHelper class which can do the same thing: <%=Url.Action(actionName)%> <%=Url.Action(actionName, htmlValues)%> <%=Url.Action(actionName, controllerName, htmlValues)%> | ActionUrl in ASP.NET MVC Preview 5 I don't need a Link but rather only the href= part of the ActionLink. But if I call Html.ActionLink(...) I get a back. Is there a way to just return the URL of the Action while not getting the? | TITLE:
ActionUrl in ASP.NET MVC Preview 5
QUESTION:
I don't need a Link but rather only the href= part of the ActionLink. But if I call Html.ActionLink(...) I get a back. Is there a way to just return the URL of the Action while not getting the?
ANSWER:
MVC also provides a UrlHelper class which can do the same thing:... | [
"asp.net-mvc",
"model-view-controller"
] | 6 | 10 | 1,683 | 2 | 0 | 2008-09-30T07:50:16.603000 | 2008-09-30T12:50:01.763000 |
152,138 | 152,593 | Java 1.4 synchronization: only allow one instance of method to run (non blocking)? | I have a class proposing translations utilities. The translations themselves should be reloaded every 30 minutes. I use Spring Timer support for that. Basically, my class looks like: public interface Translator { public void loadTranslations(); public String getTranslation(String key); } loadTranslations() can be prett... | Use some form of locking mechanism to only perform the task if it is not already in progress. Acquiring the locking token must be a one-step process. See: /** * @author McDowell */ public abstract class NonconcurrentTask implements Runnable {
private boolean token = true;
private synchronized boolean acquire() { bool... | Java 1.4 synchronization: only allow one instance of method to run (non blocking)? I have a class proposing translations utilities. The translations themselves should be reloaded every 30 minutes. I use Spring Timer support for that. Basically, my class looks like: public interface Translator { public void loadTranslat... | TITLE:
Java 1.4 synchronization: only allow one instance of method to run (non blocking)?
QUESTION:
I have a class proposing translations utilities. The translations themselves should be reloaded every 30 minutes. I use Spring Timer support for that. Basically, my class looks like: public interface Translator { public... | [
"java",
"concurrency",
"synchronization"
] | 3 | 3 | 1,531 | 4 | 0 | 2008-09-30T07:50:24.247000 | 2008-09-30T11:06:16.383000 |
152,187 | 370,426 | What authentication to pick for the cross-platform WCF service? | What type of authentication would you suggest for the service that is: implemented as WCF and exposed via varios enpoints (including XML-RPC) has to be consumed easily by various cross-platform clients Why? Options that I'm aware of are: Forms-based authentication for IIS-hosted WCF (easy to implement, but has horrible... | In the end I've picked the simplest approach: Web services are implemented as simple stateless SOAP services, where username and password get passed with every request. Product page | What authentication to pick for the cross-platform WCF service? What type of authentication would you suggest for the service that is: implemented as WCF and exposed via varios enpoints (including XML-RPC) has to be consumed easily by various cross-platform clients Why? Options that I'm aware of are: Forms-based authen... | TITLE:
What authentication to pick for the cross-platform WCF service?
QUESTION:
What type of authentication would you suggest for the service that is: implemented as WCF and exposed via varios enpoints (including XML-RPC) has to be consumed easily by various cross-platform clients Why? Options that I'm aware of are: ... | [
".net",
"wcf",
"rest",
"cross-platform",
"xml-rpc"
] | 1 | 1 | 945 | 2 | 0 | 2008-09-30T08:12:06.363000 | 2008-12-16T04:02:07.280000 |
152,188 | 152,208 | Can I create a desktop icon for a ClickOnce application? | I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this? | In Visual Studio 2005, ClickOnce does not have the ability to create a desktop icon, but it is now available in Visual Studio 2008 SP1. In Visual Studio 2005, you can use the following code to create a desktop icon for you when the application starts. I have used this code over several projects for a couple of months n... | Can I create a desktop icon for a ClickOnce application? I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this? | TITLE:
Can I create a desktop icon for a ClickOnce application?
QUESTION:
I have read in some of the ClickOnce posts that ClickOnce does not allow you to create a desktop icon for you application. Is there any way around this?
ANSWER:
In Visual Studio 2005, ClickOnce does not have the ability to create a desktop icon... | [
".net",
"clickonce",
"smartclient"
] | 26 | 12 | 21,528 | 6 | 0 | 2008-09-30T08:12:25.957000 | 2008-09-30T08:19:36.813000 |
152,190 | 152,677 | Java: StringBuffer & Concatenation | I'm using StringBuffer in Java to concat strings together, like so: StringBuffer str = new StringBuffer();
str.append("string value"); I would like to know if there's a method (although I didn't find anything from a quick glance at the documentation) or some other way to add "padding". Let me explain; every time I app... | I think this is handled easier either with a helper method (untested code): public String myMethod() { StringBuilder sb = new StringBuilder(); addToBuffer(sb, "Hello").addToBuffer("there,"); addToBuffer(sb, "it").addToBuffer(sb, "works"); }
private StringBuilder addToBuffer(StringBuilder sb, String what) { return sb.a... | Java: StringBuffer & Concatenation I'm using StringBuffer in Java to concat strings together, like so: StringBuffer str = new StringBuffer();
str.append("string value"); I would like to know if there's a method (although I didn't find anything from a quick glance at the documentation) or some other way to add "padding... | TITLE:
Java: StringBuffer & Concatenation
QUESTION:
I'm using StringBuffer in Java to concat strings together, like so: StringBuffer str = new StringBuffer();
str.append("string value"); I would like to know if there's a method (although I didn't find anything from a quick glance at the documentation) or some other w... | [
"java",
"concatenation",
"stringbuffer"
] | 8 | 10 | 37,485 | 6 | 0 | 2008-09-30T08:13:06.393000 | 2008-09-30T11:43:40.347000 |
152,205 | 152,235 | How to handle functions deprecation in library? | I'm working on a Java library and would like to remove some functions from it. My reasons for this is public API and design cleanup. Some objects have setters, but should be immutable, some functionality has been implemented better/cleaner in different methods, etc. I have marked these methods 'deprecated', and would l... | Set a date and publicize it in the @deprecated tag. The amount of time given to the removal depends on the amount of users your code has, how well connected you are with them and the the reason for the change. If you have thousands of users and you barely talk to them, the time frame should probably be in the decades r... | How to handle functions deprecation in library? I'm working on a Java library and would like to remove some functions from it. My reasons for this is public API and design cleanup. Some objects have setters, but should be immutable, some functionality has been implemented better/cleaner in different methods, etc. I hav... | TITLE:
How to handle functions deprecation in library?
QUESTION:
I'm working on a Java library and would like to remove some functions from it. My reasons for this is public API and design cleanup. Some objects have setters, but should be immutable, some functionality has been implemented better/cleaner in different m... | [
"java"
] | 6 | 10 | 918 | 8 | 0 | 2008-09-30T08:18:45.083000 | 2008-09-30T08:29:22.483000 |
152,209 | 152,308 | D (and Tango) on PowerPC Linux | It's hard to search for D using Google, so I wasn't able to find a good answer: I have an old iBook G3 and I'd like to install Linux on it and use it to compile (and test) D programs written using Tango on it. Is this possible? Or hasn't anybody tried it, yet? After all the Mac port of GDC + Tango is broken in parts, t... | This used to work, but it has been a combination with few users, and so I'm not sure if it has been tested recently. There shouldn't be major problems with Tango though - compiler is probably likely to a more likely issue. For that, you probably should try to compile your own from a recent SVN checkout (of GDC). | D (and Tango) on PowerPC Linux It's hard to search for D using Google, so I wasn't able to find a good answer: I have an old iBook G3 and I'd like to install Linux on it and use it to compile (and test) D programs written using Tango on it. Is this possible? Or hasn't anybody tried it, yet? After all the Mac port of GD... | TITLE:
D (and Tango) on PowerPC Linux
QUESTION:
It's hard to search for D using Google, so I wasn't able to find a good answer: I have an old iBook G3 and I'd like to install Linux on it and use it to compile (and test) D programs written using Tango on it. Is this possible? Or hasn't anybody tried it, yet? After all ... | [
"linux",
"d",
"powerpc",
"tango"
] | 3 | 2 | 252 | 1 | 0 | 2008-09-30T08:19:56.237000 | 2008-09-30T09:01:44.310000 |
152,215 | 272,048 | Using database resources in Axiom Safe Request | I would like to know how to make use of an Axiom database resource inside a Safe function. Right now I'm just handling the connection manually but I know it would be better to use the already defined resources. | I found how. if ever need to do it, you can do it like this: define db resource in safe.t_resources and then in the safe function java code: String DB_RESOURCE="DATABASE"; this.dbResource = getResource(this.DB_RESOURCE); Oracle oracle = new Oracle(this.dbResource); Connection conn = oracle.getConnection(); yep, that si... | Using database resources in Axiom Safe Request I would like to know how to make use of an Axiom database resource inside a Safe function. Right now I'm just handling the connection manually but I know it would be better to use the already defined resources. | TITLE:
Using database resources in Axiom Safe Request
QUESTION:
I would like to know how to make use of an Axiom database resource inside a Safe function. Right now I'm just handling the connection manually but I know it would be better to use the already defined resources.
ANSWER:
I found how. if ever need to do it,... | [
"java",
"axiom"
] | 0 | 1 | 129 | 1 | 0 | 2008-09-30T08:22:16.650000 | 2008-11-07T13:25:33.560000 |
152,216 | 3,308,176 | Boost Range Library: Traversing Two Ranges Sequentially | Boost range library ( http://www.boost.org/doc/libs/1_35_0/libs/range/index.html ) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz: given two ranges r1 and r2, define r which traverses [r1.begin(), r1.end()[ and then [r2.begin(), r2.end()[. Is there some way to def... | I needed this again so I had a second look. There is a way to concat two ranges using boost/range/join.hpp. Unluckily the output range type is not included in the interface: #include "boost/range/join.hpp" #include "boost/foreach.hpp" #include int main() { int a[] = {1, 2, 3, 4}; int b[] = {7, 2, 3, 4};
boost::iterato... | Boost Range Library: Traversing Two Ranges Sequentially Boost range library ( http://www.boost.org/doc/libs/1_35_0/libs/range/index.html ) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz: given two ranges r1 and r2, define r which traverses [r1.begin(), r1.end()[ a... | TITLE:
Boost Range Library: Traversing Two Ranges Sequentially
QUESTION:
Boost range library ( http://www.boost.org/doc/libs/1_35_0/libs/range/index.html ) allows us to abstract a pair of iterators into a range. Now I want to combine two ranges into one, viz: given two ranges r1 and r2, define r which traverses [r1.be... | [
"c++"
] | 6 | 7 | 2,174 | 3 | 0 | 2008-09-30T08:22:25.277000 | 2010-07-22T11:11:19.527000 |
152,218 | 152,225 | Looking for a regular expression including alphanumeric + "&" and ";" | Here's the problem: split=re.compile('\\W*') This regular expression works fine when dealing with regular words, but there are occasions where I need the expression to include words like käyttäj&amlauml;. What should I add to the regex to include the & and; characters? | You probably want to take the problem reverse, i.e. finding all the character without the spaces: [^ \t\n]* Or you want to add the extra characters: [a-zA-Z0-9&;]* In case you want to match HTML entities, you should try something like: (\w+|&\w+;)* | Looking for a regular expression including alphanumeric + "&" and ";" Here's the problem: split=re.compile('\\W*') This regular expression works fine when dealing with regular words, but there are occasions where I need the expression to include words like käyttäj&amlauml;. What should I add to the regex to i... | TITLE:
Looking for a regular expression including alphanumeric + "&" and ";"
QUESTION:
Here's the problem: split=re.compile('\\W*') This regular expression works fine when dealing with regular words, but there are occasions where I need the expression to include words like käyttäj&amlauml;. What should I add... | [
"python",
"regex",
"encoding"
] | 1 | 5 | 485 | 4 | 0 | 2008-09-30T08:23:05.417000 | 2008-09-30T08:26:18.873000 |
152,238 | 152,296 | How can I distribute a WCF Peer to Peer application over the Internet? | Can someone point me in the right direction? I wish to distribute a WCF peer to peer cloud over the internet. So far I've seen examples of how it works on the same subnet. I wish to push it a little further. | I believe you'll need to look into using IPV6 Teredo Tunneling for crossing NAT and firewalls, so maybe check out this on WCF transports from MSDN. Also, take a look at the PRNP series Kevn Hoffman did this year. | How can I distribute a WCF Peer to Peer application over the Internet? Can someone point me in the right direction? I wish to distribute a WCF peer to peer cloud over the internet. So far I've seen examples of how it works on the same subnet. I wish to push it a little further. | TITLE:
How can I distribute a WCF Peer to Peer application over the Internet?
QUESTION:
Can someone point me in the right direction? I wish to distribute a WCF peer to peer cloud over the internet. So far I've seen examples of how it works on the same subnet. I wish to push it a little further.
ANSWER:
I believe you'... | [
".net",
"wcf",
"p2p"
] | 3 | 4 | 1,684 | 4 | 0 | 2008-09-30T08:30:33.557000 | 2008-09-30T08:56:48.517000 |
152,240 | 152,467 | Ruby on rails (based on Mephisto) - Unable to contact server | I am completely new to ruby and I inherited a ruby system for a product catalogue. Most of my users are able to view everything as they should but overseas users (specifically Mexico) cannot contact the server once logged in. They are an active user. I'm sorry I cannot be more specific, and the system is private so I c... | Speaking as somebody who regularly ends up on your user's side of the fence, the number one culprit for this symptom is "Clueless administrator". There are many, many sites which generically block either large blocks of IP space or which geolocate and carve out big portions of the world. For example, a surprising numbe... | Ruby on rails (based on Mephisto) - Unable to contact server I am completely new to ruby and I inherited a ruby system for a product catalogue. Most of my users are able to view everything as they should but overseas users (specifically Mexico) cannot contact the server once logged in. They are an active user. I'm sorr... | TITLE:
Ruby on rails (based on Mephisto) - Unable to contact server
QUESTION:
I am completely new to ruby and I inherited a ruby system for a product catalogue. Most of my users are able to view everything as they should but overseas users (specifically Mexico) cannot contact the server once logged in. They are an act... | [
"ruby-on-rails"
] | 0 | 1 | 167 | 4 | 0 | 2008-09-30T08:30:58.207000 | 2008-09-30T10:06:51.063000 |
152,241 | 152,306 | What is a good tool for writing a user manual (help file), which integrates with version control | The people writing the user manual are not necessarily programmers, and they need a visual editor. A major issue is the internal format of the authoring tool; it should be readable text/html, so it's easy to compare versions of individual pages checked into version control. | There are other professional products which allow help file writing and they have support of "context ID" which makes context sensitive help possible. Doc To Help and RoboHelp are these type of products. | What is a good tool for writing a user manual (help file), which integrates with version control The people writing the user manual are not necessarily programmers, and they need a visual editor. A major issue is the internal format of the authoring tool; it should be readable text/html, so it's easy to compare version... | TITLE:
What is a good tool for writing a user manual (help file), which integrates with version control
QUESTION:
The people writing the user manual are not necessarily programmers, and they need a visual editor. A major issue is the internal format of the authoring tool; it should be readable text/html, so it's easy ... | [
"version-control",
"documentation",
"editor",
"chm"
] | 15 | 3 | 13,332 | 11 | 0 | 2008-09-30T08:31:06.847000 | 2008-09-30T09:00:54.203000 |
152,248 | 5,877,304 | Can I use HTTP Basic Authentication with Django? | We have a website running on Apache, access to which has a number of static pages protected via HTTP Basic authentication. I've written a new part of the site with Django using Django's built in support for user management. The problem I have is that users have to log in once via the HTTP Basic authentication and then ... | This has been added to the Django 1.3 release. See more current documentation for this here: http://docs.djangoproject.com/en/dev/howto/auth-remote-user/ | Can I use HTTP Basic Authentication with Django? We have a website running on Apache, access to which has a number of static pages protected via HTTP Basic authentication. I've written a new part of the site with Django using Django's built in support for user management. The problem I have is that users have to log in... | TITLE:
Can I use HTTP Basic Authentication with Django?
QUESTION:
We have a website running on Apache, access to which has a number of static pages protected via HTTP Basic authentication. I've written a new part of the site with Django using Django's built in support for user management. The problem I have is that us... | [
"django",
"http-authentication"
] | 45 | 25 | 63,311 | 7 | 0 | 2008-09-30T08:34:35.403000 | 2011-05-04T00:42:10.803000 |
152,250 | 152,279 | Get class property name | I have my winform application gathering data using databinding. Everything looks fine except that I have to link the property with the textedit using a string: Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.MyClassBindingSource, "MyClassProperty", True)) This works fine but if I change t... | Here is an example of what I'm talking about: [AttributeUsage(AttributeTargets.Property)] class TextProperyAttribute: Attribute {}
class MyTextBox { [TextPropery] public string Text { get; set;} public int Foo { get; set;} public double Bar { get; set;} }
static string GetTextProperty(Type type) { foreach (PropertyIn... | Get class property name I have my winform application gathering data using databinding. Everything looks fine except that I have to link the property with the textedit using a string: Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.MyClassBindingSource, "MyClassProperty", True)) This work... | TITLE:
Get class property name
QUESTION:
I have my winform application gathering data using databinding. Everything looks fine except that I have to link the property with the textedit using a string: Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.MyClassBindingSource, "MyClassProperty"... | [
".net",
"reflection"
] | 11 | 6 | 7,548 | 6 | 0 | 2008-09-30T08:34:56.230000 | 2008-09-30T08:48:22.313000 |
152,259 | 152,284 | What's the best way to search a MySQL database with PHP? | Say if I had a table of books in a MySQL database and I wanted to search the 'title' field for keywords (input by the user in a search field); what's the best way of doing this in PHP? Is the MySQL LIKE command the most efficient way to search? | Yes, the most efficient way usually is searching in the database. To do that you have three alternatives: LIKE, ILIKE to match exact substrings RLIKE to match POSIX regexes FULLTEXT indexes to match another three different kinds of search aimed at natural language processing So it depends on what will you be actually s... | What's the best way to search a MySQL database with PHP? Say if I had a table of books in a MySQL database and I wanted to search the 'title' field for keywords (input by the user in a search field); what's the best way of doing this in PHP? Is the MySQL LIKE command the most efficient way to search? | TITLE:
What's the best way to search a MySQL database with PHP?
QUESTION:
Say if I had a table of books in a MySQL database and I wanted to search the 'title' field for keywords (input by the user in a search field); what's the best way of doing this in PHP? Is the MySQL LIKE command the most efficient way to search?
... | [
"php",
"mysql",
"search"
] | 14 | 22 | 17,540 | 6 | 0 | 2008-09-30T08:41:54.967000 | 2008-09-30T08:51:56.923000 |
152,261 | 152,322 | tStringList passing in C# to Delphi DLL | I have a Delphi DLL with a function defined as: function SubmitJobStringList(joblist: tStringList; var jobno: Integer): Integer; I am calling this from C#. How do I declare the first parameter as a tStringList does not exist in C#. I currently have the declaration as: [DllImport("opt7bja.dll", CharSet = CharSet.Ansi, C... | You'll most likely not have any luck with this. The TStringList is more than just an array, it's a full-blown class, and the exact implementation details may differ from what is possible with.NET. Take a look at the Delphi VCL source code (that is, if you have it) and try to find out if you can rebuild the class in C#,... | tStringList passing in C# to Delphi DLL I have a Delphi DLL with a function defined as: function SubmitJobStringList(joblist: tStringList; var jobno: Integer): Integer; I am calling this from C#. How do I declare the first parameter as a tStringList does not exist in C#. I currently have the declaration as: [DllImport(... | TITLE:
tStringList passing in C# to Delphi DLL
QUESTION:
I have a Delphi DLL with a function defined as: function SubmitJobStringList(joblist: tStringList; var jobno: Integer): Integer; I am calling this from C#. How do I declare the first parameter as a tStringList does not exist in C#. I currently have the declarati... | [
"c#",
"delphi",
"dll",
"tstringlist"
] | 2 | 13 | 4,043 | 7 | 0 | 2008-09-30T08:42:37.070000 | 2008-09-30T09:07:14.110000 |
152,288 | 152,730 | Loading UTF-8 encoded dump into MySQL | I've been pulling my hear out over this problem for a few hours yesterday: I've a database on MySQL 4.1.22 server with encoding set to "UTF-8 Unicode (utf8)" (as reported by phpMyAdmin). Tables in this database have default charset set to latin2. But, the web application (CMS Made Simple written in PHP) using it displa... | Ugh... ok, seems I found a solution. MySQL isn't the culprit here. I did a simple dump and load now, with no changes to the dump.sql script - meaning I left "set names latin2" and tables charsets as they were. Then I switched my original CMSMS installation over to the new database and... it worked correctly. So actuall... | Loading UTF-8 encoded dump into MySQL I've been pulling my hear out over this problem for a few hours yesterday: I've a database on MySQL 4.1.22 server with encoding set to "UTF-8 Unicode (utf8)" (as reported by phpMyAdmin). Tables in this database have default charset set to latin2. But, the web application (CMS Made ... | TITLE:
Loading UTF-8 encoded dump into MySQL
QUESTION:
I've been pulling my hear out over this problem for a few hours yesterday: I've a database on MySQL 4.1.22 server with encoding set to "UTF-8 Unicode (utf8)" (as reported by phpMyAdmin). Tables in this database have default charset set to latin2. But, the web appl... | [
"mysql",
"encoding",
"utf-8"
] | 10 | 0 | 17,873 | 3 | 0 | 2008-09-30T08:53:10.617000 | 2008-09-30T12:00:16.113000 |
152,299 | 152,403 | svn + repository location | I am about to set up a subversion server to be accessed via svn+ssh. I was wondering, where the default repository location is (on a unix box). Do you put it in /opt/svn or /home/svn or /usr/subversion or even /svn or somewhere else? I am looking for the place, most people put it. Is there a convention? EDIT: It is abs... | I typically place the repositories somewhere under /var, usually in /var/lib/svn - I'm trying to follow the Filesystem Hierarchy Standard which has this to say about the purpose of /var: /var is specified here in order to make it possible to mount /usr read-only. Everything that once went into /usr that is written to d... | svn + repository location I am about to set up a subversion server to be accessed via svn+ssh. I was wondering, where the default repository location is (on a unix box). Do you put it in /opt/svn or /home/svn or /usr/subversion or even /svn or somewhere else? I am looking for the place, most people put it. Is there a c... | TITLE:
svn + repository location
QUESTION:
I am about to set up a subversion server to be accessed via svn+ssh. I was wondering, where the default repository location is (on a unix box). Do you put it in /opt/svn or /home/svn or /usr/subversion or even /svn or somewhere else? I am looking for the place, most people pu... | [
"svn"
] | 0 | 6 | 645 | 5 | 0 | 2008-09-30T08:57:59.653000 | 2008-09-30T09:41:55.570000 |
152,302 | 152,316 | What happened to NUnit? | Why isn't this project maintained anymore? I love this app, however not updating it seems like a crime against all.Net developers. There are several items that I would love to add to it given the chance of a future release. Can anyone share something I don't know? | The NUnit 2.5 Alpha 4 Release was released on September 14, 2008. Do you consider 16 days as not being maintained? | What happened to NUnit? Why isn't this project maintained anymore? I love this app, however not updating it seems like a crime against all.Net developers. There are several items that I would love to add to it given the chance of a future release. Can anyone share something I don't know? | TITLE:
What happened to NUnit?
QUESTION:
Why isn't this project maintained anymore? I love this app, however not updating it seems like a crime against all.Net developers. There are several items that I would love to add to it given the chance of a future release. Can anyone share something I don't know?
ANSWER:
The ... | [
"tdd",
"nunit"
] | 0 | 9 | 429 | 3 | 0 | 2008-09-30T08:58:56.080000 | 2008-09-30T09:04:09.453000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.