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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29,107 | 165,333 | Generic IBindingListView Implementations | Can anyone suggest a good implementation of a generic collection class that implements the IBindingListView & IBindingList interfaces and provides Filtering and Searching capabilities? I see my current options as: Using a class that someone else has written and tested Inheriting from BindingList, and implementing the I... | I used and built upon an implementation I found on and old MSDN forum post from a few years ago, but recently I searched around again and found a sourceforge project called BindingListView. It looks pretty nice, I just haven't pulled it in to replace my hacked version yet. nuget package: Equin.ApplicationFramework.Bind... | Generic IBindingListView Implementations Can anyone suggest a good implementation of a generic collection class that implements the IBindingListView & IBindingList interfaces and provides Filtering and Searching capabilities? I see my current options as: Using a class that someone else has written and tested Inheriting... | TITLE:
Generic IBindingListView Implementations
QUESTION:
Can anyone suggest a good implementation of a generic collection class that implements the IBindingListView & IBindingList interfaces and provides Filtering and Searching capabilities? I see my current options as: Using a class that someone else has written and... | [
".net",
"data-binding"
] | 27 | 27 | 19,502 | 3 | 0 | 2008-08-26T22:32:51.660000 | 2008-10-03T01:23:31.500000 |
29,141 | 29,232 | Using Interop with C#, Excel Save changing original. How to negate this? | The problem: Loading an excel spreadsheet template. Using the Save command with a different filename and then quitting the interop object. This ends up saving the original template file. Not the result that is liked. public void saveAndExit(string filename) { excelApplication.Save(filename); excelApplication.Quit(); } ... | Excel interop is pretty painful. I dug up an old project I had, did a little fiddling, and I think this is what you're looking for. The other commenters are right, but, at least in my experience, there's a lot more to calling SaveAs() than you'd expect if you've used the same objects (without the interop wrapper) in VB... | Using Interop with C#, Excel Save changing original. How to negate this? The problem: Loading an excel spreadsheet template. Using the Save command with a different filename and then quitting the interop object. This ends up saving the original template file. Not the result that is liked. public void saveAndExit(string... | TITLE:
Using Interop with C#, Excel Save changing original. How to negate this?
QUESTION:
The problem: Loading an excel spreadsheet template. Using the Save command with a different filename and then quitting the interop object. This ends up saving the original template file. Not the result that is liked. public void ... | [
"c#",
"excel"
] | 11 | 8 | 19,777 | 4 | 0 | 2008-08-26T22:55:37.473000 | 2008-08-27T00:02:59.557000 |
29,142 | 29,172 | Getting ssh to execute a command in the background on target machine | This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return? When I try to just include the ampersand (&) at the end of the command it just hangs. The exact fo... | This should solve your problem: nohup myprogram > foo.log 2> foo.err < /dev/null & The syntax and unusual use of < /dev/null are explained especially well in this answer, quoted here for your convenience. < /dev/null is used to instantly send EOF to the program, so that it doesn't wait for input ( /dev/null, the null d... | Getting ssh to execute a command in the background on target machine This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return? When I try to just include th... | TITLE:
Getting ssh to execute a command in the background on target machine
QUESTION:
This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ssh command to return? When I try ... | [
"bash",
"ssh",
"csh"
] | 365 | 387 | 389,090 | 19 | 0 | 2008-08-26T22:55:58.970000 | 2008-08-26T23:18:41.147000 |
29,144 | 31,042 | What is the more efficient version control methodology: checkout or merge? | I've always used Subversion or CVS for version control, which use a 'merge' methodology. One of my friends raves about Perforce and how great it is with its change lists and check-out methodology. While I'm sure a lot of it comes down to experience & personal preference, I was wondering if any research had been done in... | Honestly I think it depends on the discipline of the developers. I use Subversion for my personal work and I've used it at a few jobs. What I like about Subversion is I don't have to hunt someone down and ask them why they're working on something and if it would be OK for me to do some work. The problem comes when some... | What is the more efficient version control methodology: checkout or merge? I've always used Subversion or CVS for version control, which use a 'merge' methodology. One of my friends raves about Perforce and how great it is with its change lists and check-out methodology. While I'm sure a lot of it comes down to experie... | TITLE:
What is the more efficient version control methodology: checkout or merge?
QUESTION:
I've always used Subversion or CVS for version control, which use a 'merge' methodology. One of my friends raves about Perforce and how great it is with its change lists and check-out methodology. While I'm sure a lot of it com... | [
"svn",
"version-control",
"perforce"
] | 1 | 4 | 1,539 | 10 | 0 | 2008-08-26T22:58:43.720000 | 2008-08-27T19:48:57.443000 |
29,155 | 29,170 | What are the differences between delegates and events? | What are the differences between delegates and an events? Don't both hold references to functions that can be executed? | An Event declaration adds a layer of abstraction and protection on the delegate instance. This protection prevents clients of the delegate from resetting the delegate and its invocation list and only allows adding or removing targets from the invocation list. | What are the differences between delegates and events? What are the differences between delegates and an events? Don't both hold references to functions that can be executed? | TITLE:
What are the differences between delegates and events?
QUESTION:
What are the differences between delegates and an events? Don't both hold references to functions that can be executed?
ANSWER:
An Event declaration adds a layer of abstraction and protection on the delegate instance. This protection prevents cli... | [
"c#",
"events",
"delegates",
"glossary"
] | 376 | 336 | 155,962 | 11 | 0 | 2008-08-26T23:06:31.860000 | 2008-08-26T23:16:18.640000 |
29,168 | 2,047,574 | Deploying a Git subdirectory in Capistrano | My master branch layout is like this: / <-- top level /client <-- desktop client source files /server <-- Rails app What I'd like to do is only pull down the /server directory in my deploy.rb, but I can't seem to find any way to do that. The /client directory is huge, so setting up a hook to copy /server to / won't wor... | Without any dirty forking action but even dirtier! In my config/deploy.rb: set:deploy_subdir, "project/subdir" Then I added this new strategy to my Capfile: require 'capistrano/recipes/deploy/strategy/remote_cache'
class RemoteCacheSubdir < Capistrano::Deploy::Strategy::RemoteCache
private
def repository_cache_subdi... | Deploying a Git subdirectory in Capistrano My master branch layout is like this: / <-- top level /client <-- desktop client source files /server <-- Rails app What I'd like to do is only pull down the /server directory in my deploy.rb, but I can't seem to find any way to do that. The /client directory is huge, so setti... | TITLE:
Deploying a Git subdirectory in Capistrano
QUESTION:
My master branch layout is like this: / <-- top level /client <-- desktop client source files /server <-- Rails app What I'd like to do is only pull down the /server directory in my deploy.rb, but I can't seem to find any way to do that. The /client directory... | [
"ruby-on-rails",
"git",
"deployment",
"capistrano"
] | 67 | 79 | 15,616 | 12 | 0 | 2008-08-26T23:15:41.697000 | 2010-01-12T08:18:01.160000 |
29,174 | 31,338 | SimpleModal breaks ASP.Net Postbacks | I'm using jQuery and SimpleModal in an ASP.Net project to make some nice dialogs for a web app. Unfortunately, any buttons in a modal dialog can no longer execute their postbacks, which is not really acceptable. There is one source I've found with a workaround, but for the life of me I can't get it to work, mostly beca... | Both of you were on the right track. What I realized is that SimpleModal appends the dialog to the body, which is outside ASP.Net's, which breaks the functionality, since it can't find the elements. To fix it, I just modified the SimpleModal source to append eveything to 'form' instead of 'body'. When I create the dial... | SimpleModal breaks ASP.Net Postbacks I'm using jQuery and SimpleModal in an ASP.Net project to make some nice dialogs for a web app. Unfortunately, any buttons in a modal dialog can no longer execute their postbacks, which is not really acceptable. There is one source I've found with a workaround, but for the life of m... | TITLE:
SimpleModal breaks ASP.Net Postbacks
QUESTION:
I'm using jQuery and SimpleModal in an ASP.Net project to make some nice dialogs for a web app. Unfortunately, any buttons in a modal dialog can no longer execute their postbacks, which is not really acceptable. There is one source I've found with a workaround, but... | [
"asp.net",
"javascript",
"jquery",
"postback",
"simplemodal"
] | 25 | 33 | 10,553 | 10 | 0 | 2008-08-26T23:19:47.960000 | 2008-08-27T23:44:06.100000 |
29,175 | 29,204 | (IIS/Win2000Pro) Granting Registry read rights to IIS user? | Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS. I wrote it so that the webpage would use the registry to store certain settings (connection strings, potentially volatile locations of other web services, pat... | If your having touble with RegEdit in Windows 2000 you can try the following: Copy the Windows XP RegEdt32.exe to the Windows 2000 Machine Using a Windows XP Machine, connect to the Windows 2000 registry remotely: File > Connect Network Registry | (IIS/Win2000Pro) Granting Registry read rights to IIS user? Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS. I wrote it so that the webpage would use the registry to store certain settings (connection string... | TITLE:
(IIS/Win2000Pro) Granting Registry read rights to IIS user?
QUESTION:
Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS. I wrote it so that the webpage would use the registry to store certain settings ... | [
"security",
"iis",
"registry",
"windows-server-2000"
] | 1 | 1 | 3,231 | 6 | 0 | 2008-08-26T23:21:31.280000 | 2008-08-26T23:38:37.073000 |
29,177 | 30,187 | DoDragDrop and MouseUp | Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework? I have found a blog post describing one mechanism, but it involves a good deal of manual bookkeeping, including status flags, MouseMove events, manual "mouse leave" checking, etc. ... | I was recently wanting to put Drag and Drop functionality in my project and I hadn't come across this issue, but I was intrigued and really wanted to see if I could come up with a better method than the one described in the page you linked to. I hope I clearly understood everything you wanted to do and overall I think ... | DoDragDrop and MouseUp Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework? I have found a blog post describing one mechanism, but it involves a good deal of manual bookkeeping, including status flags, MouseMove events, manual "mouse... | TITLE:
DoDragDrop and MouseUp
QUESTION:
Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework? I have found a blog post describing one mechanism, but it involves a good deal of manual bookkeeping, including status flags, MouseMove eve... | [
".net",
"winforms",
"events",
"drag-and-drop"
] | 20 | 25 | 19,015 | 1 | 0 | 2008-08-26T23:23:05.033000 | 2008-08-27T14:00:12.353000 |
29,242 | 29,395 | Off-the-Shelf C++ Hex Dump Code | I work a lot with network and serial communications software, so it is often necessary for me to have code to display or log hex dumps of data packets. Every time I do this, I write yet another hex-dump routine from scratch. I'm about to do so again, but figured I'd ask here: Is there any good free hex dump code for C+... | The unix tool xxd is distributed as part of vim, and according to http://www.vmunix.com/vim/util.html#xxd, the source for xxd is ftp://ftp.uni-erlangen.de:21/pub/utilities/etc/xxd-1.10.tar.gz. It was written in C and is about 721 lines. The only licensing information given for it is this: * Distribute freely and credit... | Off-the-Shelf C++ Hex Dump Code I work a lot with network and serial communications software, so it is often necessary for me to have code to display or log hex dumps of data packets. Every time I do this, I write yet another hex-dump routine from scratch. I'm about to do so again, but figured I'd ask here: Is there an... | TITLE:
Off-the-Shelf C++ Hex Dump Code
QUESTION:
I work a lot with network and serial communications software, so it is often necessary for me to have code to display or log hex dumps of data packets. Every time I do this, I write yet another hex-dump routine from scratch. I'm about to do so again, but figured I'd ask... | [
"c++",
"logging",
"hex",
"hexdump"
] | 16 | 5 | 26,301 | 7 | 0 | 2008-08-27T00:18:19.113000 | 2008-08-27T02:42:07.507000 |
29,243 | 29,255 | How do I create an xml document in python | Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document() node = doc.createElement('foo') node.innerText = 'bar' doc.appendChild(node) return doc if __name__ == '__main__': make_xml().writexml(sys.stdout) when I run the above code I get this: I would like to get: bar I just guessed that the... | Setting an attribute on an object won't give a compile-time or a run-time error, it will just do nothing useful if the object doesn't access it (i.e. " node.noSuchAttr = 'bar' " would also not give an error). Unless you need a specific feature of minidom, I would look at ElementTree: import sys from xml.etree.cElementT... | How do I create an xml document in python Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document() node = doc.createElement('foo') node.innerText = 'bar' doc.appendChild(node) return doc if __name__ == '__main__': make_xml().writexml(sys.stdout) when I run the above code I get this: I woul... | TITLE:
How do I create an xml document in python
QUESTION:
Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document() node = doc.createElement('foo') node.innerText = 'bar' doc.appendChild(node) return doc if __name__ == '__main__': make_xml().writexml(sys.stdout) when I run the above code ... | [
"python",
"xml"
] | 20 | 9 | 27,897 | 2 | 0 | 2008-08-27T00:21:35.643000 | 2008-08-27T00:35:29.807000 |
29,244 | 29,439 | HTML Select Tag with black background - dropdown triangle is invisible in Firefox 3 | I have the following HTML (note the CSS making the background black and text white) first second Safari is smart enough to make the small triangle that appears to the right of the text the same color as the foreground text. Other browsers basically ignore the CSS, so they're fine too. Firefox 3 however applies the back... | Must be a Vista problem. I have XP SP 2 and it looks normal. | HTML Select Tag with black background - dropdown triangle is invisible in Firefox 3 I have the following HTML (note the CSS making the background black and text white) first second Safari is smart enough to make the small triangle that appears to the right of the text the same color as the foreground text. Other browse... | TITLE:
HTML Select Tag with black background - dropdown triangle is invisible in Firefox 3
QUESTION:
I have the following HTML (note the CSS making the background black and text white) first second Safari is smart enough to make the small triangle that appears to the right of the text the same color as the foreground ... | [
"html",
"css",
"firefox",
"drop-down-menu",
"html-select"
] | 8 | 4 | 23,372 | 6 | 0 | 2008-08-27T00:23:02.783000 | 2008-08-27T03:13:46.680000 |
29,247 | 29,252 | What versions of Visual Studio can be installed concurrently? | Are there any conflicts with having any combination of Visual Studio 2003, 2005 and/or 2008 installed? I noticed a related question here but wanted a more general answer. | 6, 2000/2001 (I can't remember which is.net 1.0), 2003, 2005, 2008... of course within.NET you may have issues with getting the right solution with the right version. I haven't really seen any conflicts in particular. | What versions of Visual Studio can be installed concurrently? Are there any conflicts with having any combination of Visual Studio 2003, 2005 and/or 2008 installed? I noticed a related question here but wanted a more general answer. | TITLE:
What versions of Visual Studio can be installed concurrently?
QUESTION:
Are there any conflicts with having any combination of Visual Studio 2003, 2005 and/or 2008 installed? I noticed a related question here but wanted a more general answer.
ANSWER:
6, 2000/2001 (I can't remember which is.net 1.0), 2003, 2005... | [
"visual-studio"
] | 7 | 8 | 409 | 7 | 0 | 2008-08-27T00:29:30.180000 | 2008-08-27T00:32:32.327000 |
29,284 | 29,789 | Windows Vista: Unable to load DLL 'x.dll': Invalid access to memory location. (DllNotFoundException) | I was testing on a customer's box this afternoon which has Windows Vista (He had home, but I am testing on a Business Edition with same results). We make use of a.DLL that gets the Hardware ID of the computer. It's usage is very simple and the sample program I have created works. The Dll is This from AzSdk. In fact, th... | @ Martín The reason you were not getting the UAC prompt is because UAC can only change how a process is started, once the process is running it must stay at the same elevation level. The UAC will prompt will happen if: Vista thinks it's an installer ( lots of rules here, the simplest one is if it's called "setup.exe"),... | Windows Vista: Unable to load DLL 'x.dll': Invalid access to memory location. (DllNotFoundException) I was testing on a customer's box this afternoon which has Windows Vista (He had home, but I am testing on a Business Edition with same results). We make use of a.DLL that gets the Hardware ID of the computer. It's usag... | TITLE:
Windows Vista: Unable to load DLL 'x.dll': Invalid access to memory location. (DllNotFoundException)
QUESTION:
I was testing on a customer's box this afternoon which has Windows Vista (He had home, but I am testing on a Business Edition with same results). We make use of a.DLL that gets the Hardware ID of the c... | [
"c#",
".net",
"windows-vista",
"dllnotfoundexception"
] | 4 | 2 | 12,250 | 6 | 0 | 2008-08-27T01:03:22.827000 | 2008-08-27T09:30:32.920000 |
29,292 | 29,330 | Version Control for Graphics | Say a development team includes (or makes use of) graphic artists who create all the images that go into a product. Such things include icons, bitmaps, window backgrounds, button images, animations, etc. Obviously, everything needed to build a piece of software should be under some form of version control. But most ver... | Yes, having art assets in version control is very useful. You get the ability to track history, roll back changes, and you have a single source to do backups with. Keep in mind that art assets are MUCH larger so your server needs to have lots of disk space & network bandwidth. I've had success with using perforce on ve... | Version Control for Graphics Say a development team includes (or makes use of) graphic artists who create all the images that go into a product. Such things include icons, bitmaps, window backgrounds, button images, animations, etc. Obviously, everything needed to build a piece of software should be under some form of ... | TITLE:
Version Control for Graphics
QUESTION:
Say a development team includes (or makes use of) graphic artists who create all the images that go into a product. Such things include icons, bitmaps, window backgrounds, button images, animations, etc. Obviously, everything needed to build a piece of software should be u... | [
"version-control",
"graphics",
"versioning"
] | 53 | 18 | 38,666 | 15 | 0 | 2008-08-27T01:11:16.460000 | 2008-08-27T01:35:58.367000 |
29,311 | 72,080 | Which 3D cards support full scene antialiasing? | Is there a list of 3D cards available that provide full scene antialiasing as well as which are able to do it in hardware (decent performance)? | Pretty much all cards since DX7-level technology (GeForce 2 / Radeon 7000) can do it. Most notable exceptions are Intel cards (Intel 945 aka GMA 950 and earlier can't do it; I think Intel 965 aka GMA X3100 can't do it either). Older cards (GeForce 2 / 4MX, Radeon 7000-9250) were using supersampling (render everything i... | Which 3D cards support full scene antialiasing? Is there a list of 3D cards available that provide full scene antialiasing as well as which are able to do it in hardware (decent performance)? | TITLE:
Which 3D cards support full scene antialiasing?
QUESTION:
Is there a list of 3D cards available that provide full scene antialiasing as well as which are able to do it in hardware (decent performance)?
ANSWER:
Pretty much all cards since DX7-level technology (GeForce 2 / Radeon 7000) can do it. Most notable ex... | [
"opengl",
"antialiasing"
] | 3 | 4 | 1,252 | 6 | 0 | 2008-08-27T01:23:29.503000 | 2008-09-16T13:19:19.477000 |
29,324 | 29,336 | How do I create a hash table in Java? | What is the most straightforward way to create a hash table (or associative array...) in Java? My google-fu has turned up a couple examples, but is there a standard way to do this? And is there a way to populate the table with a list of key->value pairs without individually calling an add method on the object for each ... | Map map = new HashMap(); Hashtable ht = new Hashtable(); Both classes can be found from the java.util package. The difference between the 2 is explained in the following jGuru FAQ entry. | How do I create a hash table in Java? What is the most straightforward way to create a hash table (or associative array...) in Java? My google-fu has turned up a couple examples, but is there a standard way to do this? And is there a way to populate the table with a list of key->value pairs without individually calling... | TITLE:
How do I create a hash table in Java?
QUESTION:
What is the most straightforward way to create a hash table (or associative array...) in Java? My google-fu has turned up a couple examples, but is there a standard way to do this? And is there a way to populate the table with a list of key->value pairs without in... | [
"java",
"hash",
"hashmap"
] | 14 | 28 | 80,340 | 8 | 0 | 2008-08-27T01:32:15.177000 | 2008-08-27T01:40:43.020000 |
29,370 | 29,914 | SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7, tokens 9.5.0.DEF.2, SOFTWARE\IBM\DB2\InstalledCopies | I am trying to get the DB2 data provider from a 32-bit.Net application to connect to DB2 running as a 32-bit application on Vista 64 (is that confusing enough yet)? Unfortunately, I am getting the following error: SQL1159 Initialization error with DB2.NET Data Provider, reason code 7, tokens 9.5.0.DEF.2, SOFTWARE\IBM\D... | Are you required to have it run as x86? I had similar issues with web apps under Visual Studio's dev web server (which is x86), but switching over to IIS (x64) worked for me. Since I was deploying to IIS x64, I called it a day at that point. I tried tracing with Filemon and Regmon, but didn't get any denied or missing ... | SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7, tokens 9.5.0.DEF.2, SOFTWARE\IBM\DB2\InstalledCopies I am trying to get the DB2 data provider from a 32-bit.Net application to connect to DB2 running as a 32-bit application on Vista 64 (is that confusing enough yet)? Unfortunately, I am getting t... | TITLE:
SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7, tokens 9.5.0.DEF.2, SOFTWARE\IBM\DB2\InstalledCopies
QUESTION:
I am trying to get the DB2 data provider from a 32-bit.Net application to connect to DB2 running as a 32-bit application on Vista 64 (is that confusing enough yet)? Unfortunate... | [
".net",
"db2",
"db2-luw",
"vista64"
] | 4 | 2 | 23,186 | 10 | 0 | 2008-08-27T02:20:39.913000 | 2008-08-27T11:21:12.093000 |
29,382 | 29,404 | Rails requires RubyGems >= 0.9.4. Please install RubyGems | I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from gem ) If I try mongrel_rails start or script/server I get this error: Rails requires RubyGems >= 0.9.4. Please install RubyGems When I type gem -v I have version 1.2.0 installed. Any quick tips on what to look at to fix? | Just finally found this answer... I was missing a gem, and thrown off by bad error message from Rails... | Rails requires RubyGems >= 0.9.4. Please install RubyGems I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from gem ) If I try mongrel_rails start or script/server I get this error: Rails requires RubyGems >= 0.9.4. Please install RubyGems When I type gem -v I have version 1.2.0 installed. Any quick tips ... | TITLE:
Rails requires RubyGems >= 0.9.4. Please install RubyGems
QUESTION:
I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from gem ) If I try mongrel_rails start or script/server I get this error: Rails requires RubyGems >= 0.9.4. Please install RubyGems When I type gem -v I have version 1.2.0 installe... | [
"ruby-on-rails",
"deployment",
"rubygems"
] | 0 | 0 | 1,225 | 2 | 0 | 2008-08-27T02:32:15.033000 | 2008-08-27T02:47:39.380000 |
29,383 | 29,571 | Converting bool to text in C++ | Maybe this is a dumb question, but is there any way to convert a boolean value to a string such that 1 turns to "true" and 0 turns to "false"? I could just use an if statement, but it would be nice to know if there is a way to do that with the language or standard libraries. Plus, I'm a pedant.:) | How about using the C++ language itself? bool t = true; bool f = false; std::cout << std::noboolalpha << t << " == " << std::boolalpha << t << std::endl; std::cout << std::noboolalpha << f << " == " << std::boolalpha << f << std::endl; UPDATE: If you want more than 4 lines of code without any console output, please go ... | Converting bool to text in C++ Maybe this is a dumb question, but is there any way to convert a boolean value to a string such that 1 turns to "true" and 0 turns to "false"? I could just use an if statement, but it would be nice to know if there is a way to do that with the language or standard libraries. Plus, I'm a p... | TITLE:
Converting bool to text in C++
QUESTION:
Maybe this is a dumb question, but is there any way to convert a boolean value to a string such that 1 turns to "true" and 0 turns to "false"? I could just use an if statement, but it would be nice to know if there is a way to do that with the language or standard librar... | [
"c++",
"string",
"boolean"
] | 124 | 142 | 263,159 | 17 | 0 | 2008-08-27T02:32:34.953000 | 2008-08-27T05:10:23.017000 |
29,399 | 29,471 | Is using an obfuscator enough to secure my JavaScript code? | I'm working on building a development tool that is written in JavaScript. This will not be an open source project and will be sold (hopefully) as a commercial product. I'm looking for the best way to protect my investment. Is using an obfuscator (code mangler) enough to reasonably secure the code? Are there other alter... | I'm going to tell you a secret. Once you understand it, you'll feel a lot better about the fact that Javascript obfuscation is only really useful for saving bandwidth when sending scripts over the wire. Your source-code is not worth stealing. I know this comes as a shock to the ego, but I can say this confidently witho... | Is using an obfuscator enough to secure my JavaScript code? I'm working on building a development tool that is written in JavaScript. This will not be an open source project and will be sold (hopefully) as a commercial product. I'm looking for the best way to protect my investment. Is using an obfuscator (code mangler)... | TITLE:
Is using an obfuscator enough to secure my JavaScript code?
QUESTION:
I'm working on building a development tool that is written in JavaScript. This will not be an open source project and will be sold (hopefully) as a commercial product. I'm looking for the best way to protect my investment. Is using an obfusca... | [
"javascript",
"obfuscation"
] | 27 | 145 | 8,943 | 9 | 0 | 2008-08-27T02:44:58.107000 | 2008-08-27T03:48:07.377000 |
29,406 | 29,411 | Guidelines for writing a framework | I'm faced with writing a framework to simplify working with a large and complex object library ( ArcObjects ). What guidelines would you suggest for creating a framework of this kind? Are static methods preferred? How do you handle things like logging? How do you future proof your framework code from changes that a ven... | Brad Abrams' Framework Design Guidelines book is all about this. Might be worth a look. | Guidelines for writing a framework I'm faced with writing a framework to simplify working with a large and complex object library ( ArcObjects ). What guidelines would you suggest for creating a framework of this kind? Are static methods preferred? How do you handle things like logging? How do you future proof your fra... | TITLE:
Guidelines for writing a framework
QUESTION:
I'm faced with writing a framework to simplify working with a large and complex object library ( ArcObjects ). What guidelines would you suggest for creating a framework of this kind? Are static methods preferred? How do you handle things like logging? How do you fut... | [
"frameworks"
] | 8 | 5 | 7,520 | 4 | 0 | 2008-08-27T02:48:39.550000 | 2008-08-27T02:51:35.987000 |
29,423 | 29,449 | How automated is too automated when it comes to deployment? | I have ci, so our staging environment builds itself. Should I have a script that not only builds production but does all the branching for it as well? When you have one code base on two different urls with skinning, should they be required to build at once? | The only way to be too automated is if you are spending more time fighting with building or fixing automation scripts than you would just doing the job manually. As long as your automation scripts take less time and produce fewer errors than doing the job manually, then automation is great. Scripts to build and branch ... | How automated is too automated when it comes to deployment? I have ci, so our staging environment builds itself. Should I have a script that not only builds production but does all the branching for it as well? When you have one code base on two different urls with skinning, should they be required to build at once? | TITLE:
How automated is too automated when it comes to deployment?
QUESTION:
I have ci, so our staging environment builds itself. Should I have a script that not only builds production but does all the branching for it as well? When you have one code base on two different urls with skinning, should they be required to... | [
"build-automation",
"production"
] | 7 | 8 | 289 | 4 | 0 | 2008-08-27T03:02:00.250000 | 2008-08-27T03:21:03.467000 |
29,426 | 3,816,214 | Best GUI designer for eclipse? | I'm looking for a good GUI designer for swing in eclipse. My preference is for a free/open-source plugin. | Window Builder Pro is a great GUI Designer for eclipse and is now offered for free by google. | Best GUI designer for eclipse? I'm looking for a good GUI designer for swing in eclipse. My preference is for a free/open-source plugin. | TITLE:
Best GUI designer for eclipse?
QUESTION:
I'm looking for a good GUI designer for swing in eclipse. My preference is for a free/open-source plugin.
ANSWER:
Window Builder Pro is a great GUI Designer for eclipse and is now offered for free by google. | [
"java",
"eclipse",
"swing",
"gui-designer"
] | 125 | 72 | 423,929 | 12 | 0 | 2008-08-27T03:06:06.760000 | 2010-09-28T19:12:29.963000 |
29,436 | 29,472 | Compact Framework - how do I dynamically create type with no default constructor? | I'm using the.NET CF 3.5. The type I want to create does not have a default constructor so I want to pass a string to an overloaded constructor. How do I do this? Code: Assembly a = Assembly.LoadFrom("my.dll"); Type t = a.GetType("type info here"); // All ok so far, assembly loads and I can get my type
string s = "Pas... | MyObj o = null; Assembly a = Assembly.LoadFrom("my.dll"); Type t = a.GetType("type info here");
ConstructorInfo ctor = t.GetConstructor(new Type[] { typeof(string) }); if(ctor!= null) o = ctor.Invoke(new object[] { s }); | Compact Framework - how do I dynamically create type with no default constructor? I'm using the.NET CF 3.5. The type I want to create does not have a default constructor so I want to pass a string to an overloaded constructor. How do I do this? Code: Assembly a = Assembly.LoadFrom("my.dll"); Type t = a.GetType("type in... | TITLE:
Compact Framework - how do I dynamically create type with no default constructor?
QUESTION:
I'm using the.NET CF 3.5. The type I want to create does not have a default constructor so I want to pass a string to an overloaded constructor. How do I do this? Code: Assembly a = Assembly.LoadFrom("my.dll"); Type t = ... | [
"c#",
"reflection",
"compact-framework"
] | 6 | 9 | 5,099 | 3 | 0 | 2008-08-27T03:12:43.267000 | 2008-08-27T03:48:10.140000 |
29,437 | 29,492 | How to shift an array of bytes by 12-bits | I want to shift the contents of an array of bytes by 12-bit to the left. For example, starting with this array of type uint8_t shift[10]: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xBC} I'd like to shift it to the left by 12-bits resulting in: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAB, 0xC0, 0x00} | Hurray for pointers! This code works by looking ahead 12 bits for each byte and copying the proper bits forward. 12 bits is the bottom half (nybble) of the next byte and the top half of 2 bytes away. unsigned char length = 10; unsigned char data[10] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0A,0xBC}; unsigned char *shift = ... | How to shift an array of bytes by 12-bits I want to shift the contents of an array of bytes by 12-bit to the left. For example, starting with this array of type uint8_t shift[10]: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xBC} I'd like to shift it to the left by 12-bits resulting in: {0x00, 0x00, 0x00, 0x... | TITLE:
How to shift an array of bytes by 12-bits
QUESTION:
I want to shift the contents of an array of bytes by 12-bit to the left. For example, starting with this array of type uint8_t shift[10]: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xBC} I'd like to shift it to the left by 12-bits resulting in: {0x... | [
"c",
"arrays",
"bit-shift",
"bitset"
] | 16 | 9 | 22,450 | 7 | 0 | 2008-08-27T03:13:12.283000 | 2008-08-27T04:02:45.970000 |
29,460 | 29,491 | Stop the taskbar flashing | I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow stop the flashing? | The FlashWindowEx function which controls the flashing takes a FLASHWINFO struct which has a uCount field to control how many times it flashes. Also, a possible value for the dwFlags field is FLASHW_STOP to cause the flashing to stop. EDIT: Forgot was a C# tagged question... so P/Invoke goodness found here. | Stop the taskbar flashing I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow st... | TITLE:
Stop the taskbar flashing
QUESTION:
I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my u... | [
"c#",
"winforms",
"taskbar"
] | 5 | 5 | 6,851 | 3 | 0 | 2008-08-27T03:38:10.537000 | 2008-08-27T04:02:17.640000 |
29,461 | 29,573 | What is a MUST COVER in my Groovy presentation? | I'm working on getting an Introduction to Groovy presentation ready for my local Java User's Group and I've pretty much got it together. What I'd like to see is what you all think I just have to cover. Remember, this is an introductory presentation. Most of the people are experienced Java developers, but I'm pretty sur... | I don't know anything about groovy so in a sense I've qualified to answer this... I would want you to: Tell me why I would want to use Scripting (in general) as opposed to Java-- what does it let me do quicker (as in development time), what does it make more readable. Give tantalising examples of ways I can use chunks ... | What is a MUST COVER in my Groovy presentation? I'm working on getting an Introduction to Groovy presentation ready for my local Java User's Group and I've pretty much got it together. What I'd like to see is what you all think I just have to cover. Remember, this is an introductory presentation. Most of the people are... | TITLE:
What is a MUST COVER in my Groovy presentation?
QUESTION:
I'm working on getting an Introduction to Groovy presentation ready for my local Java User's Group and I've pretty much got it together. What I'd like to see is what you all think I just have to cover. Remember, this is an introductory presentation. Most... | [
"java",
"groovy"
] | 11 | 8 | 1,053 | 5 | 0 | 2008-08-27T03:40:05.807000 | 2008-08-27T05:11:06.477000 |
29,466 | 29,523 | Writing a game for the Nintendo Wii | I'd like to write a game for the Nintendo Wii. How do I go about obtaining an SDK and/or any other tools necessary for writing a game? | The Wii Remote and Wii Balance Board use bluetooth. You can pair them with your PC and write your own PC apps that interact with them (like this guy ). If you want to make something that actually runs on the Wii, you can try finding some homebrew development help. If you want to actually sell your software for Wii, you... | Writing a game for the Nintendo Wii I'd like to write a game for the Nintendo Wii. How do I go about obtaining an SDK and/or any other tools necessary for writing a game? | TITLE:
Writing a game for the Nintendo Wii
QUESTION:
I'd like to write a game for the Nintendo Wii. How do I go about obtaining an SDK and/or any other tools necessary for writing a game?
ANSWER:
The Wii Remote and Wii Balance Board use bluetooth. You can pair them with your PC and write your own PC apps that interac... | [
"wii"
] | 23 | 25 | 15,083 | 7 | 0 | 2008-08-27T03:43:11.743000 | 2008-08-27T04:35:02.540000 |
29,482 | 29,485 | How do I cast int to enum in C#? | How do I cast an int to an enum in C#? | From an int: YourEnum foo = (YourEnum)yourInt; From a string: YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
// The foo.ToString().Contains(",") check is necessary for // enumerations marked with a [Flags] attribute. if (!Enum.IsDefined(typeof(YourEnum), foo) &&!foo.ToString().Contains(",")) { thr... | How do I cast int to enum in C#? How do I cast an int to an enum in C#? | TITLE:
How do I cast int to enum in C#?
QUESTION:
How do I cast an int to an enum in C#?
ANSWER:
From an int: YourEnum foo = (YourEnum)yourInt; From a string: YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);
// The foo.ToString().Contains(",") check is necessary for // enumerations marked with a [... | [
"c#",
"enums",
"casting",
"integer"
] | 3,897 | 4,662 | 2,044,744 | 32 | 0 | 2008-08-27T03:58:21.253000 | 2008-08-27T03:59:42.483000 |
29,496 | 29,609 | Automated script to zip IIS logs? | I'd like to write a script/batch that will bunch up my daily IIS logs and zip them up by month. ex080801.log which is in the format of ex yymmdd.log ex080801.log - ex080831.log gets zipped up and the log files deleted. The reason we do this is because on a heavy site a log file for one day could be 500mb to 1gb so we z... | You'll need a command line tool to zip up the files. I recommend 7-Zip which is free and easy to use. The self-contained command line version (7za.exe) is the most portable choice. Here's a two-line batch file that would zip the log files and delete them afterwards: 7za.exe a -tzip ex%1-logs.zip %2\ex%1*.log del %2\ex%... | Automated script to zip IIS logs? I'd like to write a script/batch that will bunch up my daily IIS logs and zip them up by month. ex080801.log which is in the format of ex yymmdd.log ex080801.log - ex080831.log gets zipped up and the log files deleted. The reason we do this is because on a heavy site a log file for one... | TITLE:
Automated script to zip IIS logs?
QUESTION:
I'd like to write a script/batch that will bunch up my daily IIS logs and zip them up by month. ex080801.log which is in the format of ex yymmdd.log ex080801.log - ex080831.log gets zipped up and the log files deleted. The reason we do this is because on a heavy site ... | [
"iis",
"batch-file",
"zip",
"scripting",
"logging"
] | 15 | 12 | 29,791 | 7 | 0 | 2008-08-27T04:08:39.980000 | 2008-08-27T06:00:40.507000 |
29,499 | 29,515 | How do you troubleshoot character encoding problems? | If all you see is the ugly no-char boxes, what tools or strategies do you use to figure out what went wrong? (The specific scenario I'm facing is no-char boxes within a when it should be showing Japanese chars.) | Firstly, "ugly no-char boxes" might not be an encoding problem, they might just be a sign you don't have a font installed that can display the glyphs in the page. Most character encoding problems happen when strings are being passed from one system to another. For webapps, this is usually between the browser and the ap... | How do you troubleshoot character encoding problems? If all you see is the ugly no-char boxes, what tools or strategies do you use to figure out what went wrong? (The specific scenario I'm facing is no-char boxes within a when it should be showing Japanese chars.) | TITLE:
How do you troubleshoot character encoding problems?
QUESTION:
If all you see is the ugly no-char boxes, what tools or strategies do you use to figure out what went wrong? (The specific scenario I'm facing is no-char boxes within a when it should be showing Japanese chars.)
ANSWER:
Firstly, "ugly no-char boxes... | [
"encoding",
"localization"
] | 1 | 3 | 3,753 | 3 | 0 | 2008-08-27T04:11:18.820000 | 2008-08-27T04:26:58.737000 |
29,505 | 29,524 | Deserialize in a different language | The log4j network adapter sends events as a serialised java object. I would like to be able to capture this object and deserialise it in a different language (python). Is this possible? NOTE The network capturing is easy; its just a TCP socket and reading in a stream. The difficulty is the deserialising part | Generally, no. The stream format for Java serialization is defined in this document, but you need access to the original class definitions (and a Java runtime to load them into) to turn the stream data back into something approaching the original objects. For example, classes may define writeObject() and readObject() m... | Deserialize in a different language The log4j network adapter sends events as a serialised java object. I would like to be able to capture this object and deserialise it in a different language (python). Is this possible? NOTE The network capturing is easy; its just a TCP socket and reading in a stream. The difficulty ... | TITLE:
Deserialize in a different language
QUESTION:
The log4j network adapter sends events as a serialised java object. I would like to be able to capture this object and deserialise it in a different language (python). Is this possible? NOTE The network capturing is easy; its just a TCP socket and reading in a strea... | [
"java",
"serialization",
"log4j"
] | 6 | 5 | 5,289 | 6 | 0 | 2008-08-27T04:18:10.347000 | 2008-08-27T04:35:57.700000 |
29,511 | 29,521 | Ruby - Convert Integer to String | In Ruby, trying to print out the individual elements of a String is giving me trouble. Instead of seeing each character, I'm seeing their ASCII values instead: >> a = "0123" => "0123" >> a[0] => 48 I've looked online but can't find any way to get the original "0" back out of it. I'm a little new to Ruby to I know it ha... | Or you can convert the integer to its character value: a[0].chr | Ruby - Convert Integer to String In Ruby, trying to print out the individual elements of a String is giving me trouble. Instead of seeing each character, I'm seeing their ASCII values instead: >> a = "0123" => "0123" >> a[0] => 48 I've looked online but can't find any way to get the original "0" back out of it. I'm a l... | TITLE:
Ruby - Convert Integer to String
QUESTION:
In Ruby, trying to print out the individual elements of a String is giving me trouble. Instead of seeing each character, I'm seeing their ASCII values instead: >> a = "0123" => "0123" >> a[0] => 48 I've looked online but can't find any way to get the original "0" back ... | [
"ruby",
"arrays"
] | 17 | 15 | 12,234 | 7 | 0 | 2008-08-27T04:19:42.047000 | 2008-08-27T04:34:03.493000 |
29,525 | 29,570 | Opcode cache impact on memory usage | Can anyone tell me what is the memory usage overhead associated with PHP opcode cache? I've seen a lot of reviews of opcode cache but all of them only concentrate on the performance increase. I have a small entry level VPS and memory limits are a concern for me. | Most of the memory overhead will come from the opcode cache size. Each opcode cacher has their own default(e.g. 30MB for APC) which you can change through the config file. Other than the cache size, the actual memory overhead of the cacher itself is negligible. | Opcode cache impact on memory usage Can anyone tell me what is the memory usage overhead associated with PHP opcode cache? I've seen a lot of reviews of opcode cache but all of them only concentrate on the performance increase. I have a small entry level VPS and memory limits are a concern for me. | TITLE:
Opcode cache impact on memory usage
QUESTION:
Can anyone tell me what is the memory usage overhead associated with PHP opcode cache? I've seen a lot of reviews of opcode cache but all of them only concentrate on the performance increase. I have a small entry level VPS and memory limits are a concern for me.
AN... | [
"php",
"opcode-cache"
] | 1 | 5 | 723 | 3 | 0 | 2008-08-27T04:36:49.757000 | 2008-08-27T05:09:39.740000 |
29,531 | 29,534 | Using .NET CodeDOM to declare and initialize a field in one statement | I want to use CodeDOM to both declare and initialize my static field in one statement. How can I do this? // for example public static int MyField = 5; I can seem to figure out how to declare a static field, and I can set its value later, but I can't seem to get the above effect. @lomaxx, Naw, I just want static. I don... | Once you create your CodeMemberField instance to represent the static field, you can assign the InitExpression property to the expression you want to use to populate the field. | Using .NET CodeDOM to declare and initialize a field in one statement I want to use CodeDOM to both declare and initialize my static field in one statement. How can I do this? // for example public static int MyField = 5; I can seem to figure out how to declare a static field, and I can set its value later, but I can't... | TITLE:
Using .NET CodeDOM to declare and initialize a field in one statement
QUESTION:
I want to use CodeDOM to both declare and initialize my static field in one statement. How can I do this? // for example public static int MyField = 5; I can seem to figure out how to declare a static field, and I can set its value ... | [
".net",
"codedom"
] | 4 | 8 | 2,785 | 3 | 0 | 2008-08-27T04:43:00.537000 | 2008-08-27T04:45:27.617000 |
29,539 | 86,325 | How to create an exit message | Is there a one line function call that quits the program and displays a message? I know in Perl it's as simple as: die("Message goes here") I'm tired of typing this: puts "Message goes here" exit | The abort function does this. For example: abort("Message goes here") Note: the abort message will be written to STDERR as opposed to puts which will write to STDOUT. | How to create an exit message Is there a one line function call that quits the program and displays a message? I know in Perl it's as simple as: die("Message goes here") I'm tired of typing this: puts "Message goes here" exit | TITLE:
How to create an exit message
QUESTION:
Is there a one line function call that quits the program and displays a message? I know in Perl it's as simple as: die("Message goes here") I'm tired of typing this: puts "Message goes here" exit
ANSWER:
The abort function does this. For example: abort("Message goes here... | [
"ruby",
"error-handling",
"exit"
] | 214 | 371 | 106,897 | 3 | 0 | 2008-08-27T04:48:50.417000 | 2008-09-17T18:50:05.210000 |
29,557 | 30,700 | How to Ease TDD with MSTest / VS2008 | I've read time and time again that TDD/test first is more difficult with MSTest than it is with other testing frameworks such as nUnit, MBUnit, etc... What are some suggested manual workarounds and/or 3rd party bits that you suggest when MSTest is the only option due to infrastructure policy? I'm mainly wondering about... | MSTest is certainly not as efficient or extensible as some of the open source frameworks, but it is workable. Since the question asks about making life easier with MSTest and not about alternatives, here are my MSTest tips. Shortcuts. Like Haacked said, take a few seconds to learn the shortcuts. Current Context. Since ... | How to Ease TDD with MSTest / VS2008 I've read time and time again that TDD/test first is more difficult with MSTest than it is with other testing frameworks such as nUnit, MBUnit, etc... What are some suggested manual workarounds and/or 3rd party bits that you suggest when MSTest is the only option due to infrastructu... | TITLE:
How to Ease TDD with MSTest / VS2008
QUESTION:
I've read time and time again that TDD/test first is more difficult with MSTest than it is with other testing frameworks such as nUnit, MBUnit, etc... What are some suggested manual workarounds and/or 3rd party bits that you suggest when MSTest is the only option d... | [
"visual-studio-2008",
"tdd",
"mstest"
] | 19 | 29 | 4,266 | 10 | 0 | 2008-08-27T05:01:30.087000 | 2008-08-27T17:40:52.447000 |
29,558 | 29,574 | Split data access class into reader and writer or combine them? | This might be on the "discussy" side, but I would really like to hear your view on this. Previously I have often written data access classes that handled both reading and writing, which often led to poor naming, like FooIoHandler etc. The rule of thumb that classes that are hard to name probably are poorly designed sug... | ORM might be your best solution. Or use a repository type pattern, with a "thingContext" object that is responsible for state persistence. Personally, I use the activeRecord pattern, where save logic is baked into a base class, but I'm leaving it in favor of an nHibernate style repository pattern. The allowance for DDD... | Split data access class into reader and writer or combine them? This might be on the "discussy" side, but I would really like to hear your view on this. Previously I have often written data access classes that handled both reading and writing, which often led to poor naming, like FooIoHandler etc. The rule of thumb tha... | TITLE:
Split data access class into reader and writer or combine them?
QUESTION:
This might be on the "discussy" side, but I would really like to hear your view on this. Previously I have often written data access classes that handled both reading and writing, which often led to poor naming, like FooIoHandler etc. The... | [
"architecture",
"oop",
"data-access"
] | 5 | 3 | 1,722 | 5 | 0 | 2008-08-27T05:02:33.847000 | 2008-08-27T05:12:08.580000 |
29,562 | 29,575 | How to use Python distutils? | I wrote a quick program in python to add a gtk GUI to a cli program. I was wondering how I can create an installer using distutils. Since it's just a GUI frontend for a command line app it only works in *nix anyway so I'm not worried about it being cross platform. my main goal is to create a.deb package for debian/ubun... | See the distutils simple example. That's basically what it is like, except real install scripts usually contain a bit more information. I have not seen any that are fundamentally more complicated, though. In essence, you just give it a list of what needs to be installed. Sometimes you need to give it some mapping dicts... | How to use Python distutils? I wrote a quick program in python to add a gtk GUI to a cli program. I was wondering how I can create an installer using distutils. Since it's just a GUI frontend for a command line app it only works in *nix anyway so I'm not worried about it being cross platform. my main goal is to create ... | TITLE:
How to use Python distutils?
QUESTION:
I wrote a quick program in python to add a gtk GUI to a cli program. I was wondering how I can create an installer using distutils. Since it's just a GUI frontend for a command line app it only works in *nix anyway so I'm not worried about it being cross platform. my main ... | [
"python",
"linux",
"installation",
"debian",
"distutils"
] | 25 | 14 | 11,254 | 5 | 0 | 2008-08-27T05:03:07.993000 | 2008-08-27T05:12:47.643000 |
29,580 | 29,588 | Why is pagination so resource-expensive? | It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all. Care to enlighten me? | Because in most cases you've got to sort your results first. For example, when you search on Google, you can view only up to 100 pages of results. They don't bother sorting by page-rank beyond 1000 websites for given keyword (or combination of keywords). Pagination is fast. Sorting is slow. | Why is pagination so resource-expensive? It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all. Care to enlighten me? | TITLE:
Why is pagination so resource-expensive?
QUESTION:
It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all. Care to enlighten me?
ANSWER:
Because in most cases you've got to so... | [
"performance",
"pagination"
] | 7 | 19 | 1,716 | 6 | 0 | 2008-08-27T05:21:23.003000 | 2008-08-27T05:26:17.237000 |
29,593 | 29,629 | What does ServerVariables["APPL_MD_PATH"] retrieves the metabase path for the Application for the ISAPI DLL mean? | I've trying to get an ASP.net (v2) app to work in the debugger and keep running into a problem because the value returned by the following code is an empty string: HttpContext.Current.Request.ServerVariables["APPL_MD_PATH"].ToLower() I have found out that this "Retrieves the metabase path for the Application for the IS... | Are you running your application locally inside of IIS or inside of the development web server? If it's the latter, then that's probably why: Cassini (the development web server) doesn't do ISAPI, so this value will be empty. | What does ServerVariables["APPL_MD_PATH"] retrieves the metabase path for the Application for the ISAPI DLL mean? I've trying to get an ASP.net (v2) app to work in the debugger and keep running into a problem because the value returned by the following code is an empty string: HttpContext.Current.Request.ServerVariable... | TITLE:
What does ServerVariables["APPL_MD_PATH"] retrieves the metabase path for the Application for the ISAPI DLL mean?
QUESTION:
I've trying to get an ASP.net (v2) app to work in the debugger and keep running into a problem because the value returned by the following code is an empty string: HttpContext.Current.Requ... | [
".net",
"asp.net",
"visual-studio",
".net-2.0",
"debugging"
] | 0 | 3 | 3,452 | 1 | 0 | 2008-08-27T05:35:58.977000 | 2008-08-27T06:38:29.717000 |
29,621 | 29,623 | Change priority of the current process in C | On Windows I can do: HANDLE hCurrentProcess = GetCurrentProcess();
SetPriorityClass(hCurrentProcess, ABOVE_NORMAL_PRIORITY_CLASS); How can I do the same thing on *nix? | Try: #include #include int main(){ setpriority(PRIO_PROCESS, 0, -20); } Note that you must be running as superuser for this to work. (for more info, type 'man setpriority' at a prompt.) | Change priority of the current process in C On Windows I can do: HANDLE hCurrentProcess = GetCurrentProcess();
SetPriorityClass(hCurrentProcess, ABOVE_NORMAL_PRIORITY_CLASS); How can I do the same thing on *nix? | TITLE:
Change priority of the current process in C
QUESTION:
On Windows I can do: HANDLE hCurrentProcess = GetCurrentProcess();
SetPriorityClass(hCurrentProcess, ABOVE_NORMAL_PRIORITY_CLASS); How can I do the same thing on *nix?
ANSWER:
Try: #include #include int main(){ setpriority(PRIO_PROCESS, 0, -20); } Note tha... | [
"c",
"unix",
"cross-platform",
"process-management"
] | 14 | 25 | 23,208 | 3 | 0 | 2008-08-27T06:17:47.533000 | 2008-08-27T06:20:54.843000 |
29,624 | 194,969 | How to Maintain Correct Javascript Event After Using cloneNode(true) | I have a form element that contains multiple lines of inputs. Think of each line as attributes of a new object that I want to create in my web application. And, I want to be able to create multiple new objects in one HTTP POST. I'm using Javascript's built-in cloneNode(true) method to clone each line. The problem is th... | Don't put handler on each link (this really should be a button, BTW). Use event bubbling to handle all buttons with one handler: formObject.onclick = function(e) { e=e||event; // IE sucks var target = e.target||e.srcElement; // and sucks again
// target is the element that has been clicked if (target && target.classNa... | How to Maintain Correct Javascript Event After Using cloneNode(true) I have a form element that contains multiple lines of inputs. Think of each line as attributes of a new object that I want to create in my web application. And, I want to be able to create multiple new objects in one HTTP POST. I'm using Javascript's ... | TITLE:
How to Maintain Correct Javascript Event After Using cloneNode(true)
QUESTION:
I have a form element that contains multiple lines of inputs. Think of each line as attributes of a new object that I want to create in my web application. And, I want to be able to create multiple new objects in one HTTP POST. I'm u... | [
"javascript",
"events",
"dom",
"prototypejs",
"clonenode"
] | 5 | 7 | 8,857 | 6 | 0 | 2008-08-27T06:27:51.643000 | 2008-10-12T01:53:07.863000 |
29,630 | 29,719 | What is the best way to package and distribute an Excel application | I've writen an Excel-based, database reporting tool. Currentely, all the VBA code is associated with a single XLS file. The user generates the report by clicking a button on the toolbar. Unfortunately, unless the user has saved the file under another file name, all the reported data gets wiped-out. When I have created ... | You can modify the user's personal.xls file, stored in the excel startup directory (varies between Office versions). If you have lots of users though, that can be fiddly. An alternative way to get over your problem is to store the macro in a template (.xlt) file. Then when the users opens it they can't save it back ove... | What is the best way to package and distribute an Excel application I've writen an Excel-based, database reporting tool. Currentely, all the VBA code is associated with a single XLS file. The user generates the report by clicking a button on the toolbar. Unfortunately, unless the user has saved the file under another f... | TITLE:
What is the best way to package and distribute an Excel application
QUESTION:
I've writen an Excel-based, database reporting tool. Currentely, all the VBA code is associated with a single XLS file. The user generates the report by clicking a button on the toolbar. Unfortunately, unless the user has saved the fi... | [
"excel",
"vba",
"office-addins"
] | 4 | 2 | 17,118 | 5 | 0 | 2008-08-27T06:40:13.253000 | 2008-08-27T08:13:04.667000 |
29,643 | 29,652 | Which is a better approach in logging - files or DB? | Okay, here's the scenario. I have a utility that processes tons of records, and enters information to the Database accordingly. It works on these records in multi-threaded batches. Each such batch writes to the same log file for creating a workflow trace for each record. Potentially, we could be making close to a milli... | I second the other answers here, depends on what you are doing with the data. We have two scenarios here: The majority of the logging is to a DB since admin users for the products we build need to be able to view them in their nice little app with all the bells and whistles. We log all of our diagnostics and debug info... | Which is a better approach in logging - files or DB? Okay, here's the scenario. I have a utility that processes tons of records, and enters information to the Database accordingly. It works on these records in multi-threaded batches. Each such batch writes to the same log file for creating a workflow trace for each rec... | TITLE:
Which is a better approach in logging - files or DB?
QUESTION:
Okay, here's the scenario. I have a utility that processes tons of records, and enters information to the Database accordingly. It works on these records in multi-threaded batches. Each such batch writes to the same log file for creating a workflow ... | [
"multithreading",
"logging"
] | 7 | 2 | 948 | 10 | 0 | 2008-08-27T06:58:51.617000 | 2008-08-27T07:10:02.527000 |
29,645 | 29,649 | Set up PowerShell Script for Automatic Execution | I have a few lines of PowerShell code that I would like to use as an automated script. The way I would like it to be able to work is to be able to call it using one of the following options: One command line that opens PowerShell, executes script and closes PowerShell (this would be used for a global build-routine) A f... | Save your script as a.ps1 file and launch it using powershell.exe, like this: powershell.exe.\foo.ps1 Make sure you specify the full path to the script, and make sure you have set your execution policy level to at least "RemoteSigned" so that unsigned local scripts can be run. | Set up PowerShell Script for Automatic Execution I have a few lines of PowerShell code that I would like to use as an automated script. The way I would like it to be able to work is to be able to call it using one of the following options: One command line that opens PowerShell, executes script and closes PowerShell (t... | TITLE:
Set up PowerShell Script for Automatic Execution
QUESTION:
I have a few lines of PowerShell code that I would like to use as an automated script. The way I would like it to be able to work is to be able to call it using one of the following options: One command line that opens PowerShell, executes script and cl... | [
"command-line",
"powershell",
"scripting"
] | 21 | 9 | 70,889 | 5 | 0 | 2008-08-27T07:00:43.093000 | 2008-08-27T07:06:22.393000 |
29,647 | 29,656 | How do you get the filename of a tempfile to use in Linux? | Let's say I'm creating a program in C that needs to use a tempfile. Creating an ad hoc tempfile in /tmp is probably not a good idea. Is there a function or OS call to supply me with a tempfile name so that I can begin to write and read from it? | You can use the mkstemp(3) function for this purpose. Another alternative is the tmpfile(3) function. Which one of them you choose depends on whether you want the file to be opened as a C library file stream (which tmpfile does), or a direct file descriptor ( mkstemp ). The tmpfile function also deletes the file automa... | How do you get the filename of a tempfile to use in Linux? Let's say I'm creating a program in C that needs to use a tempfile. Creating an ad hoc tempfile in /tmp is probably not a good idea. Is there a function or OS call to supply me with a tempfile name so that I can begin to write and read from it? | TITLE:
How do you get the filename of a tempfile to use in Linux?
QUESTION:
Let's say I'm creating a program in C that needs to use a tempfile. Creating an ad hoc tempfile in /tmp is probably not a good idea. Is there a function or OS call to supply me with a tempfile name so that I can begin to write and read from it... | [
"c",
"linux"
] | 11 | 21 | 10,687 | 7 | 0 | 2008-08-27T07:05:07.060000 | 2008-08-27T07:12:14.470000 |
29,654 | 281,963 | WinForms databinding and foreign key relationships | I'm developing a WinForms application (.Net 3.5, no WPF) where I want to be able to display foreign key lookups in a databound DataGridView. An example of the sort of relationship is that I have a table of OrderLines. Orderlines have a foreign key relationship to Products and Products in turn have a foreign key relatio... | I think the problem you're having is that when you are binding to a grid, it is not enough to support INotifyPropertyChanged, but you have to fire the ListChanged events in your IBindingList implementation and make sure that you override and return true for the SupportsChangeNotification property. If you don't return t... | WinForms databinding and foreign key relationships I'm developing a WinForms application (.Net 3.5, no WPF) where I want to be able to display foreign key lookups in a databound DataGridView. An example of the sort of relationship is that I have a table of OrderLines. Orderlines have a foreign key relationship to Produ... | TITLE:
WinForms databinding and foreign key relationships
QUESTION:
I'm developing a WinForms application (.Net 3.5, no WPF) where I want to be able to display foreign key lookups in a databound DataGridView. An example of the sort of relationship is that I have a table of OrderLines. Orderlines have a foreign key rel... | [
"c#",
".net",
"winforms"
] | 6 | 2 | 4,992 | 5 | 0 | 2008-08-27T07:11:46.407000 | 2008-11-11T19:51:11.033000 |
29,664 | 62,688 | How to catch SQLServer timeout exceptions | I need to specifically catch SQL server timeout exceptions so that they can be handled differently. I know I could catch the SqlException and then check if the message string Contains "Timeout" but was wondering if there is a better way to do it? try { //some code } catch (SqlException ex) {
if (ex.Message.Contains("T... | To check for a timeout, I believe you check the value of ex.Number. If it is -2, then you have a timeout situation. -2 is the error code for timeout, returned from DBNETLIB, the MDAC driver for SQL Server. This can be seen by downloading Reflector, and looking under System.Data.SqlClient.TdsEnums for TIMEOUT_EXPIRED. Y... | How to catch SQLServer timeout exceptions I need to specifically catch SQL server timeout exceptions so that they can be handled differently. I know I could catch the SqlException and then check if the message string Contains "Timeout" but was wondering if there is a better way to do it? try { //some code } catch (SqlE... | TITLE:
How to catch SQLServer timeout exceptions
QUESTION:
I need to specifically catch SQL server timeout exceptions so that they can be handled differently. I know I could catch the SqlException and then check if the message string Contains "Timeout" but was wondering if there is a better way to do it? try { //some ... | [
"c#",
".net",
"sql-server",
"error-handling"
] | 137 | 187 | 124,131 | 6 | 0 | 2008-08-27T07:18:54.173000 | 2008-09-15T13:09:29.943000 |
29,665 | 30,452 | Free Wavetable Synthesizer? | I need to implement a wavetable synthesizer in an ARM Cortex-M3 core. I'm looking for any code or tools to help me get started. I'm aware of this AVR implementation. I actually converted it to a PIC a while back. Now I am looking for something similar, but a little better sounding. ANSI C code would be great. Any code ... | The Synthesis Toolkit (STK) is excellent, but it is C++ only: http://ccrma.stanford.edu/software/stk/ You may be able to extract the wavetable synthesizer code from the STK though. | Free Wavetable Synthesizer? I need to implement a wavetable synthesizer in an ARM Cortex-M3 core. I'm looking for any code or tools to help me get started. I'm aware of this AVR implementation. I actually converted it to a PIC a while back. Now I am looking for something similar, but a little better sounding. ANSI C co... | TITLE:
Free Wavetable Synthesizer?
QUESTION:
I need to implement a wavetable synthesizer in an ARM Cortex-M3 core. I'm looking for any code or tools to help me get started. I'm aware of this AVR implementation. I actually converted it to a PIC a while back. Now I am looking for something similar, but a little better s... | [
"audio",
"arm",
"microcontroller",
"synthesizer",
"sound-synthesis"
] | 2 | 5 | 4,754 | 3 | 0 | 2008-08-27T07:20:38.617000 | 2008-08-27T15:31:08.967000 |
29,668 | 38,889 | Remote debugging across domains | I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy machine. When I try to attach with debugger I get message "The trust relation... | Gregg Miskely has a blog post on this. You might get it to work if both local accounts have the same user name and password. You might also try dropping your good box from it's domain so that you are going from a workgroup to a domain rather than domain to domain. | Remote debugging across domains I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy machine. When I try to attach with debugger I... | TITLE:
Remote debugging across domains
QUESTION:
I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy machine. When I try to atta... | [
"visual-studio",
"debugging",
"managed-code"
] | 4 | 5 | 2,520 | 3 | 0 | 2008-08-27T07:21:35.353000 | 2008-09-02T05:34:25.157000 |
29,677 | 29,692 | How do I make the manifest of a .net assembly private? | What should I do if I want to release a.net assembly but wish to keep its internals detailed in the manifest private (from a utility such as ildasm.exe )? | I think what you're talking about is "obfuscation". There are lots of articles about it on the net: http://en.wikipedia.org/wiki/Obfuscation The "standard" tool for obfuscation on.NET is by Preemptive Solutions: http://www.preemptive.com/obfuscator.html They have a community edition that ships with Visual Studio which ... | How do I make the manifest of a .net assembly private? What should I do if I want to release a.net assembly but wish to keep its internals detailed in the manifest private (from a utility such as ildasm.exe )? | TITLE:
How do I make the manifest of a .net assembly private?
QUESTION:
What should I do if I want to release a.net assembly but wish to keep its internals detailed in the manifest private (from a utility such as ildasm.exe )?
ANSWER:
I think what you're talking about is "obfuscation". There are lots of articles abou... | [
".net",
"security",
"obfuscation"
] | 3 | 7 | 758 | 2 | 0 | 2008-08-27T07:38:06.593000 | 2008-08-27T07:55:52.837000 |
29,678 | 29,784 | How to aggregate data from SQL Server 2005 | I have about 150 000 rows of data written to a database everyday. These row represent outgoing articles for example. Now I need to show a graph using SSRS that show the average number of articles per day over time. I also need to have a information about the actual number of articles from yesterday. The idea is to have... | The neat thing with SSAS is that you can get those indicators that you talk about quite easily either by creating calculated measures or by using KPIs. I started with Delivering Business Intelligence with Microsoft SQL Server 2005. It had some good introduction, but unfortunately it's too verbose when it comes to the d... | How to aggregate data from SQL Server 2005 I have about 150 000 rows of data written to a database everyday. These row represent outgoing articles for example. Now I need to show a graph using SSRS that show the average number of articles per day over time. I also need to have a information about the actual number of a... | TITLE:
How to aggregate data from SQL Server 2005
QUESTION:
I have about 150 000 rows of data written to a database everyday. These row represent outgoing articles for example. Now I need to show a graph using SSRS that show the average number of articles per day over time. I also need to have a information about the ... | [
"sql-server",
"reporting-services",
"ssas"
] | 3 | 2 | 906 | 5 | 0 | 2008-08-27T07:38:29.367000 | 2008-08-27T09:26:46.177000 |
29,680 | 165,867 | Suppress NTLM dialog box after unauthorized request | In a recent sharepoint project, I implemented an authentication webpart which should replace the NTLM authentication dialog box. It works fine as long as the user provides valid credentials. Whenever the user provides invalid credentials, the NTLM dialog box pops up in Internet Explorer. My Javascript code which does t... | Mark 's comment is correct; The NTLM auth prompt is triggered by a 401 response code and the presence of NTLM as the first mechanism offered in the WWW-Authenticate header (Ref: The NTLM Authentication Protocol ). I'm not sure if I understand the question description correctly, but I think you are trying to wrap the NT... | Suppress NTLM dialog box after unauthorized request In a recent sharepoint project, I implemented an authentication webpart which should replace the NTLM authentication dialog box. It works fine as long as the user provides valid credentials. Whenever the user provides invalid credentials, the NTLM dialog box pops up i... | TITLE:
Suppress NTLM dialog box after unauthorized request
QUESTION:
In a recent sharepoint project, I implemented an authentication webpart which should replace the NTLM authentication dialog box. It works fine as long as the user provides valid credentials. Whenever the user provides invalid credentials, the NTLM di... | [
"asp.net",
"javascript",
"sharepoint"
] | 8 | 5 | 4,285 | 3 | 0 | 2008-08-27T07:40:01.597000 | 2008-10-03T06:06:29.120000 |
29,686 | 29,754 | Set ASP.net executionTimeout in code / "refresh" request | I'll have an ASP.net page that creates some Excel Sheets and sends them to the user. The problem is, sometimes I get Http timeouts, presumably because the Request runs longer than executionTimeout (110 seconds per default). I just wonder what my options are to prevent this, without wanting to generally increase the exe... | If you want to increase the execution timeout for this one request you can set HttpContext.Current.Server.ScriptTimeout But you still may have the problem of the client timing out which you can't reliably solve directly from the server. To get around that you could implement a "processing" page (like Rob suggests) that... | Set ASP.net executionTimeout in code / "refresh" request I'll have an ASP.net page that creates some Excel Sheets and sends them to the user. The problem is, sometimes I get Http timeouts, presumably because the Request runs longer than executionTimeout (110 seconds per default). I just wonder what my options are to pr... | TITLE:
Set ASP.net executionTimeout in code / "refresh" request
QUESTION:
I'll have an ASP.net page that creates some Excel Sheets and sends them to the user. The problem is, sometimes I get Http timeouts, presumably because the Request runs longer than executionTimeout (110 seconds per default). I just wonder what my... | [
"c#",
"asp.net"
] | 14 | 16 | 10,192 | 2 | 0 | 2008-08-27T07:50:05.957000 | 2008-08-27T08:45:58.973000 |
29,689 | 31,946 | Javadoc template generator | I have a large codebase without Javadoc, and I want to run a program to write a skeleton with the basic Javadoc information (e.g., for each method's parameter write @param...), so I just have to fill the gaps left. Anyone know a good solution for this? Edit: JAutodoc is what I was looking for. It has Ant tasks, an Ecli... | The JAutodoc plugin for eclipse does exactly what you need, but with a package granularity: right click on a package, select "Add javadoc for members..." and the skeleton will be added. There are numerous interesting options: templates for javadoc, adding a TODO in the header of every file saying: "template javadoc, mu... | Javadoc template generator I have a large codebase without Javadoc, and I want to run a program to write a skeleton with the basic Javadoc information (e.g., for each method's parameter write @param...), so I just have to fill the gaps left. Anyone know a good solution for this? Edit: JAutodoc is what I was looking for... | TITLE:
Javadoc template generator
QUESTION:
I have a large codebase without Javadoc, and I want to run a program to write a skeleton with the basic Javadoc information (e.g., for each method's parameter write @param...), so I just have to fill the gaps left. Anyone know a good solution for this? Edit: JAutodoc is what... | [
"java",
"documentation",
"javadoc"
] | 32 | 39 | 42,111 | 6 | 0 | 2008-08-27T07:55:06.443000 | 2008-08-28T10:02:10.887000 |
29,694 | 29,804 | How to work around unsupported unsigned integer field types in MS SQL? | Trying to make a MySQL-based application support MS SQL, I ran into the following issue: I keep MySQL's auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never be negative values. MS SQL does not support the unsigned attribute on all integer types,... | When is the problem likely to become a real issue? Given current growth rates, how soon do you expect signed integer overflow to happen in the MS SQL version? Be pessimistic. How long do you expect the application to live? Do you still think the factor of 2 difference is something you should worry about? (I have no ide... | How to work around unsupported unsigned integer field types in MS SQL? Trying to make a MySQL-based application support MS SQL, I ran into the following issue: I keep MySQL's auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never be negative value... | TITLE:
How to work around unsupported unsigned integer field types in MS SQL?
QUESTION:
Trying to make a MySQL-based application support MS SQL, I ran into the following issue: I keep MySQL's auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never... | [
"mysql",
"sql-server",
"database",
"interop"
] | 1 | 1 | 3,220 | 3 | 0 | 2008-08-27T07:57:16.110000 | 2008-08-27T09:39:12.323000 |
29,696 | 29,720 | How do you stop the Designer generating code for public properties on a User Control? | How do you stop the designer from auto generating code that sets the value for public properties on a user control? | Use the DesignerSerializationVisibilityAttribute on the properties that you want to hide from the designer serialization and set the parameter to Hidden. [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string Name { get; set; } | How do you stop the Designer generating code for public properties on a User Control? How do you stop the designer from auto generating code that sets the value for public properties on a user control? | TITLE:
How do you stop the Designer generating code for public properties on a User Control?
QUESTION:
How do you stop the designer from auto generating code that sets the value for public properties on a user control?
ANSWER:
Use the DesignerSerializationVisibilityAttribute on the properties that you want to hide fr... | [
"c#",
"winforms"
] | 39 | 66 | 13,335 | 3 | 0 | 2008-08-27T07:59:21.020000 | 2008-08-27T08:13:13.420000 |
29,699 | 29,727 | How do I deal with quotes ' in SQL | I have a database with names in it such as John Doe etc. Unfortunately some of these names contain quotes like Keiran O'Keefe. Now when I try and search for such names as follows: SELECT * FROM PEOPLE WHERE SURNAME='O'Keefe' I (understandably) get an error. How do I prevent this error from occurring. I am using Oracle ... | The escape character is ', so you would need to replace the quote with two quotes. For example, SELECT * FROM PEOPLE WHERE SURNAME='O'Keefe' becomes SELECT * FROM PEOPLE WHERE SURNAME='O''Keefe' That said, it's probably incorrect to do this yourself. Your language may have a function to escape strings for use in SQL, b... | How do I deal with quotes ' in SQL I have a database with names in it such as John Doe etc. Unfortunately some of these names contain quotes like Keiran O'Keefe. Now when I try and search for such names as follows: SELECT * FROM PEOPLE WHERE SURNAME='O'Keefe' I (understandably) get an error. How do I prevent this error... | TITLE:
How do I deal with quotes ' in SQL
QUESTION:
I have a database with names in it such as John Doe etc. Unfortunately some of these names contain quotes like Keiran O'Keefe. Now when I try and search for such names as follows: SELECT * FROM PEOPLE WHERE SURNAME='O'Keefe' I (understandably) get an error. How do I ... | [
"sql",
"oracle"
] | 11 | 30 | 23,509 | 8 | 0 | 2008-08-27T08:01:04.417000 | 2008-08-27T08:17:56.293000 |
29,731 | 29,740 | What is the best way to sort a data bound combo box? | I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case). If that is the case then the question becomes what is the best way to sort a DataTable? The combo box bindings are set in the designer initiali... | If you're using a DataTable, you can use the (DataTable.DefaultView) DataView.Sort property. For greater flexibility you can use the BindingSource component. BindingSource will be the DataSource of your combobox. Then you can change your data source from a DataTable to List without changing the DataSource of the combob... | What is the best way to sort a data bound combo box? I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case). If that is the case then the question becomes what is the best way to sort a DataTable? Th... | TITLE:
What is the best way to sort a data bound combo box?
QUESTION:
I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case). If that is the case then the question becomes what is the best way to so... | [
"c#",
"data-binding"
] | 5 | 7 | 12,744 | 8 | 0 | 2008-08-27T08:22:55.643000 | 2008-08-27T08:30:13.223000 |
29,734 | 29,739 | Why stateless session beans are single threaded? | As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. So they seem to be more like Singleton classes. However the difference is contain creates (or reuses from pool) the separate ins... | The SLSBs are single threaded because of the TX Context, Principal is associated with a bean instance when it is called. These beans are pooled and unless the max pool size is reached are processed in separate threads ( Vendor dependent). If SLSBs were designed thread safe every call would have looked like a servlet do... | Why stateless session beans are single threaded? As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. So they seem to be more like Singleton classes. However the difference is conta... | TITLE:
Why stateless session beans are single threaded?
QUESTION:
As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. So they seem to be more like Singleton classes. However the d... | [
"java",
"ejb"
] | 6 | 5 | 2,772 | 2 | 0 | 2008-08-27T08:25:05.450000 | 2008-08-27T08:29:56.780000 |
29,743 | 29,750 | How to select an SQL database? | We're living in a golden age of databases, with numerous high quality commercial and free databases. This is great, but the downside is there's not a simple obvious choice for someone who needs a database for his next project. What are the constraints/criteria you use for selecting a database? How well do the various d... | I would think first on what the system requirements are for data access, data security, scalability, performance, disconnected scenarios, data transformation, data sizing. On the other side, consider also the experience and background of developers, operators, platform administrators. You should also think on what cons... | How to select an SQL database? We're living in a golden age of databases, with numerous high quality commercial and free databases. This is great, but the downside is there's not a simple obvious choice for someone who needs a database for his next project. What are the constraints/criteria you use for selecting a data... | TITLE:
How to select an SQL database?
QUESTION:
We're living in a golden age of databases, with numerous high quality commercial and free databases. This is great, but the downside is there's not a simple obvious choice for someone who needs a database for his next project. What are the constraints/criteria you use fo... | [
"sql",
"database"
] | 1 | 8 | 726 | 6 | 0 | 2008-08-27T08:33:18.287000 | 2008-08-27T08:43:45.577000 |
29,744 | 29,801 | How do you manage schema upgrades to a production database? | This seems to be an overlooked area that could really use some insight. What are your best practices for: making an upgrade procedure backing out in case of errors syncing code and database changes testing prior to deployment mechanics of modifying the table etc... | That's a great question. ( There is a high chance this is going to end up a normalised versus denormalised database debate..which I am not going to start... okay now for some input.) some off the top of my head things I have done (will add more when I have some more time or need a break) client design - this is where t... | How do you manage schema upgrades to a production database? This seems to be an overlooked area that could really use some insight. What are your best practices for: making an upgrade procedure backing out in case of errors syncing code and database changes testing prior to deployment mechanics of modifying the table e... | TITLE:
How do you manage schema upgrades to a production database?
QUESTION:
This seems to be an overlooked area that could really use some insight. What are your best practices for: making an upgrade procedure backing out in case of errors syncing code and database changes testing prior to deployment mechanics of mod... | [
"oracle",
"database-administration"
] | 34 | 4 | 6,088 | 8 | 0 | 2008-08-27T08:36:37.013000 | 2008-08-27T09:37:14.123000 |
29,746 | 29,755 | Get the Directory sizes on a Remote Host with a PHP script | I'm looking for something that will show me the size of each folder within my main folder recursively. This is a LAMP server with a CGI-Bin so most any PHP script should work or anything that will work in the CGI-Bin. My hosting company does not provide an interface for me to see which folders are consuming the most am... | Strange, I came up on Google with many relevant results and this one is probably the most complete. The function "getDirectorySize" will ignore link/shorcuts to files/directory. The function "sizeFormat" will suffix the size with bytes,KB,MB or GB accordingly. Code function getDirectorySize($path) { $totalsize = 0; $to... | Get the Directory sizes on a Remote Host with a PHP script I'm looking for something that will show me the size of each folder within my main folder recursively. This is a LAMP server with a CGI-Bin so most any PHP script should work or anything that will work in the CGI-Bin. My hosting company does not provide an inte... | TITLE:
Get the Directory sizes on a Remote Host with a PHP script
QUESTION:
I'm looking for something that will show me the size of each folder within my main folder recursively. This is a LAMP server with a CGI-Bin so most any PHP script should work or anything that will work in the CGI-Bin. My hosting company does n... | [
"php",
"hosting",
"cgi"
] | 2 | 6 | 1,618 | 3 | 0 | 2008-08-27T08:40:50.530000 | 2008-08-27T08:49:05.547000 |
29,760 | 29,772 | Stopping MSI from launching an EXE in the SYSTEM context | I've got a problem here with an MSI deployment that I'm working on (using InstallShield ). We have a program running in the background that needs to run per-user, and it needs to start automatically without user intervention. The problem is with Group Policy Object / Active Directory (GPO/AD) deployment the application... | You can use the LogonUser property of Windows Installer as a condition to the action launching the EXE. | Stopping MSI from launching an EXE in the SYSTEM context I've got a problem here with an MSI deployment that I'm working on (using InstallShield ). We have a program running in the background that needs to run per-user, and it needs to start automatically without user intervention. The problem is with Group Policy Obje... | TITLE:
Stopping MSI from launching an EXE in the SYSTEM context
QUESTION:
I've got a problem here with an MSI deployment that I'm working on (using InstallShield ). We have a program running in the background that needs to run per-user, and it needs to start automatically without user intervention. The problem is with... | [
"installation",
"windows-installer",
"installshield"
] | 3 | 6 | 2,286 | 3 | 0 | 2008-08-27T08:52:35.087000 | 2008-08-27T09:18:24.917000 |
29,761 | 30,768 | Good Git repository viewer for Mac | Can anyone recommend a good repository viewer for Git, similar to gitk, that works on Mac OS X Leopard? (I'm not saying gitk doesn't work) Of course I would like a native Mac application, but as I haven't found any, what are the best options to gitk? I know about gitview, but I'm looking forward to evaluate as many alt... | There's also gitx, it's progressing well and under active development (multiple commits per day). | Good Git repository viewer for Mac Can anyone recommend a good repository viewer for Git, similar to gitk, that works on Mac OS X Leopard? (I'm not saying gitk doesn't work) Of course I would like a native Mac application, but as I haven't found any, what are the best options to gitk? I know about gitview, but I'm look... | TITLE:
Good Git repository viewer for Mac
QUESTION:
Can anyone recommend a good repository viewer for Git, similar to gitk, that works on Mac OS X Leopard? (I'm not saying gitk doesn't work) Of course I would like a native Mac application, but as I haven't found any, what are the best options to gitk? I know about git... | [
"git",
"macos",
"version-control"
] | 16 | 27 | 15,645 | 14 | 0 | 2008-08-27T08:54:50.293000 | 2008-08-27T18:13:49.793000 |
29,777 | 29,780 | Visual Studio 2005 Project options | I have a solution in Visual Studio 2005(professional Edition) which in turn has 8 projects.I am facing a problem that even after i set the Command Arguments in the Project settings of the relevant project, it doesnt accept those command line arguments and it shows argc = 1, inspite of me giving more than 1 command argu... | Hmm.. Are you sure the specified project is set as the start project (right click > set as startup project)?? Oh, and obviously you need to be in the correct configuration mode ^_^ (Notice it can be changed to debug | build | all configurations ) | Visual Studio 2005 Project options I have a solution in Visual Studio 2005(professional Edition) which in turn has 8 projects.I am facing a problem that even after i set the Command Arguments in the Project settings of the relevant project, it doesnt accept those command line arguments and it shows argc = 1, inspite of... | TITLE:
Visual Studio 2005 Project options
QUESTION:
I have a solution in Visual Studio 2005(professional Edition) which in turn has 8 projects.I am facing a problem that even after i set the Command Arguments in the Project settings of the relevant project, it doesnt accept those command line arguments and it shows ar... | [
"visual-studio-2005",
"projects"
] | 0 | 1 | 251 | 2 | 0 | 2008-08-27T09:21:34.613000 | 2008-08-27T09:23:21.067000 |
29,782 | 29,815 | Windows XP Default Routes | I use my mobile phone for connection to the internet on my laptop, I also have a wired connection to a LAN which doesn't have internet conectivity, it just has our TFS server on it. The problem is that I can't use the internet (from the phone) with the LAN cable plugged in. Is there a way to set the default route to my... | There's many OS specific ways to force routing over specific interfaces. What OS are you using? XP? Vista? *nix? The simplest way is to configure your network card with a static IP and NO GATEWAY, the only gateway (ie. internet access) your laptop will find is then via the mobile. The disadvantage of this method is tha... | Windows XP Default Routes I use my mobile phone for connection to the internet on my laptop, I also have a wired connection to a LAN which doesn't have internet conectivity, it just has our TFS server on it. The problem is that I can't use the internet (from the phone) with the LAN cable plugged in. Is there a way to s... | TITLE:
Windows XP Default Routes
QUESTION:
I use my mobile phone for connection to the internet on my laptop, I also have a wired connection to a LAN which doesn't have internet conectivity, it just has our TFS server on it. The problem is that I can't use the internet (from the phone) with the LAN cable plugged in. I... | [
"windows",
"networking",
"tcp"
] | 0 | 2 | 453 | 2 | 0 | 2008-08-27T09:25:45.257000 | 2008-08-27T09:44:18.287000 |
29,806 | 29,813 | How to change Instantiated Objects Font Colour in Visual Studio | I know the colours are changed in Environment > Fonts and Colors but I haven't found out which Display Item the object is. Can someone please tell how I can colour the following code: lblMessage.Text = "You have successfully answered my question!" I have the string coloured pink, I would like the lblMessage purple and ... | Go to Environment > Fonts and Colors > Display Item s and change Identifier String I was hoping that their is I can be more specific with the colours - if their isn't then that's an acceptable answer - just disappointing for me. Yeah, I don't think you can do that.:) | How to change Instantiated Objects Font Colour in Visual Studio I know the colours are changed in Environment > Fonts and Colors but I haven't found out which Display Item the object is. Can someone please tell how I can colour the following code: lblMessage.Text = "You have successfully answered my question!" I have t... | TITLE:
How to change Instantiated Objects Font Colour in Visual Studio
QUESTION:
I know the colours are changed in Environment > Fonts and Colors but I haven't found out which Display Item the object is. Can someone please tell how I can colour the following code: lblMessage.Text = "You have successfully answered my q... | [
"visual-studio-2005",
"colors",
"environment"
] | 0 | 1 | 1,768 | 2 | 0 | 2008-08-27T09:40:00.107000 | 2008-08-27T09:43:49.550000 |
29,810 | 29,837 | Is version control (ie. Subversion) applicable in document tracking? | I am in charge of about 100+ documents (word document, not source code) that needs revision by different people in my department. Currently all the documents are in a shared folder where they will retrieve, revise and save back into the folder. What I am doing now is looking up the "date modified" in the shared folder,... | I guess one thing that nobody seems to have asked is if you have a legal requirement to store history of changes to the doc's? Whether you do or don't is going to have an impact on what solutions you can consider. Also a notification mechanism for out of date copies is also a bundle of fun. If engineer A has a copy of ... | Is version control (ie. Subversion) applicable in document tracking? I am in charge of about 100+ documents (word document, not source code) that needs revision by different people in my department. Currently all the documents are in a shared folder where they will retrieve, revise and save back into the folder. What I... | TITLE:
Is version control (ie. Subversion) applicable in document tracking?
QUESTION:
I am in charge of about 100+ documents (word document, not source code) that needs revision by different people in my department. Currently all the documents are in a shared folder where they will retrieve, revise and save back into ... | [
"version-control",
"tracking"
] | 75 | 19 | 45,799 | 20 | 0 | 2008-08-27T09:42:59.710000 | 2008-08-27T10:01:47.277000 |
29,814 | 29,906 | How to do crossdomain calls from Silverlight? | What's needed to succesfully make a crossdomain call from Silverlight? | If I understand your question correctly you would need to have a clientaccesspolicy.xml file in the domain web root of the server that you wish to call (ie www.example.com/clientaccesspolicy.xml) that defines that it is ok for services from other domains to call services on that domain. Read the How to Make a Service A... | How to do crossdomain calls from Silverlight? What's needed to succesfully make a crossdomain call from Silverlight? | TITLE:
How to do crossdomain calls from Silverlight?
QUESTION:
What's needed to succesfully make a crossdomain call from Silverlight?
ANSWER:
If I understand your question correctly you would need to have a clientaccesspolicy.xml file in the domain web root of the server that you wish to call (ie www.example.com/clie... | [
"silverlight",
"web-services"
] | 5 | 5 | 858 | 4 | 0 | 2008-08-27T09:44:06.023000 | 2008-08-27T11:07:19.943000 |
29,820 | 29,826 | Java return copy to hide future changes | In Java, say you have a class that wraps an ArrayList (or any collection) of objects. How would you return one of those objects such that the caller will not see any future changes to the object made in the ArrayList? i.e. you want to return a deep copy of the object, but you don't know if it is cloneable. | Turn that into a spec: -that objects need to implement an interface in order to be allowed into the collection Something like ArrayList () Then you can be assured that you always do a deep copy - the interface should have a method that is guaranteed to return a deep copy. I think that's the best you can do. | Java return copy to hide future changes In Java, say you have a class that wraps an ArrayList (or any collection) of objects. How would you return one of those objects such that the caller will not see any future changes to the object made in the ArrayList? i.e. you want to return a deep copy of the object, but you don... | TITLE:
Java return copy to hide future changes
QUESTION:
In Java, say you have a class that wraps an ArrayList (or any collection) of objects. How would you return one of those objects such that the caller will not see any future changes to the object made in the ArrayList? i.e. you want to return a deep copy of the o... | [
"java",
"deep-copy",
"cloning"
] | 5 | 4 | 1,094 | 3 | 0 | 2008-08-27T09:48:00.960000 | 2008-08-27T09:52:49.997000 |
29,822 | 29,904 | Giant NodeManagerLogs from hibernate in weblogic | One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk. The logs giving us hassle resides in mydrive:\bea\weblogic81\common\nodemanager\NodeManagerLogs\generatedManagedServer1\managedserveroutput.log and the entries in the logfile is just the some kind of entries repeated again... | Since those log entries aren't problems, it sounds like the global log level has been turned up to DEBUG. Alternatively, perhaps a new Logging mechanism has been implemented or a new log Appender that writes to stdout, and thus is being re-logged by Weblogic. I would look at the configuration of your logger. (Or provid... | Giant NodeManagerLogs from hibernate in weblogic One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk. The logs giving us hassle resides in mydrive:\bea\weblogic81\common\nodemanager\NodeManagerLogs\generatedManagedServer1\managedserveroutput.log and the entries in the logfil... | TITLE:
Giant NodeManagerLogs from hibernate in weblogic
QUESTION:
One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk. The logs giving us hassle resides in mydrive:\bea\weblogic81\common\nodemanager\NodeManagerLogs\generatedManagedServer1\managedserveroutput.log and the ent... | [
"hibernate",
"logging",
"weblogic"
] | 2 | 2 | 664 | 2 | 0 | 2008-08-27T09:50:27.460000 | 2008-08-27T11:05:59.917000 |
29,838 | 29,854 | Visual Source Safe --> TFS Migration | Around here we have been working with a bunch of Visual Source Safe repositories for about 10 years or so. Now I want to get rid of sourcesafe and move on to Team Foundation Server. Do you have any tips or tricks for me before I embark on this migration? What are the things I have to be careful about? I am sure this mi... | I just googled, but this walkthrough seems like a good reference, and it mentions the tool VSSConverter which should help you make the migration as painless as possible. I would like to recommend one thing though: Backup. Backup everything before you do this. Should anything go wrong it's better to be safe than sorry. ... | Visual Source Safe --> TFS Migration Around here we have been working with a bunch of Visual Source Safe repositories for about 10 years or so. Now I want to get rid of sourcesafe and move on to Team Foundation Server. Do you have any tips or tricks for me before I embark on this migration? What are the things I have t... | TITLE:
Visual Source Safe --> TFS Migration
QUESTION:
Around here we have been working with a bunch of Visual Source Safe repositories for about 10 years or so. Now I want to get rid of sourcesafe and move on to Team Foundation Server. Do you have any tips or tricks for me before I embark on this migration? What are t... | [
"version-control",
"tfs",
"visual-sourcesafe",
"vssconverter"
] | 16 | 2 | 11,523 | 8 | 0 | 2008-08-27T10:02:57.103000 | 2008-08-27T10:20:38.153000 |
29,841 | 29,920 | Thread not waking up from Thread.Sleep() | We have a Windows Service written in C#. The service spawns a thread that does this: private void ThreadWorkerFunction() { while(false == _stop) // stop flag set by other thread { try { openConnection();
doStuff();
closeConnection(); } catch (Exception ex) { log.Error("Something went wrong.", ex);
Thread.Sleep(TimeS... | Dig in and find out? Stick a debugger on that bastard! I can see at least the following possibilities: the logging system hangs; the thread exited just fine but the service is still running because some other part has a logic error. And maybe, but almost certainly not, the following: Sleep() hangs. But in any case, att... | Thread not waking up from Thread.Sleep() We have a Windows Service written in C#. The service spawns a thread that does this: private void ThreadWorkerFunction() { while(false == _stop) // stop flag set by other thread { try { openConnection();
doStuff();
closeConnection(); } catch (Exception ex) { log.Error("Somethi... | TITLE:
Thread not waking up from Thread.Sleep()
QUESTION:
We have a Windows Service written in C#. The service spawns a thread that does this: private void ThreadWorkerFunction() { while(false == _stop) // stop flag set by other thread { try { openConnection();
doStuff();
closeConnection(); } catch (Exception ex) { ... | [
".net",
"multithreading"
] | 5 | 5 | 5,258 | 8 | 0 | 2008-08-27T10:05:02.963000 | 2008-08-27T11:29:58.797000 |
29,845 | 29,866 | Dynamic reference to resource files in C# | I have an application on which I am implementing localization. I now need to dynamically reference a name in the resouce file. assume I have a resource file called Login.resx, an a number of strings: foo="hello", bar="cruel" and baz="world" normally, I will refer as: String result =Login.foo; and result=="hello"; my pr... | You'll need to instance a ResourceManager for the Login.resx: var resman = new System.Resources.ResourceManager( "RootNamespace.Login", System.Reflection.Assembly.GetExecutingAssembly() ) var text = resman.GetString("resname"); It might help to look at the generated code in the code-behind files of the resource files t... | Dynamic reference to resource files in C# I have an application on which I am implementing localization. I now need to dynamically reference a name in the resouce file. assume I have a resource file called Login.resx, an a number of strings: foo="hello", bar="cruel" and baz="world" normally, I will refer as: String res... | TITLE:
Dynamic reference to resource files in C#
QUESTION:
I have an application on which I am implementing localization. I now need to dynamically reference a name in the resouce file. assume I have a resource file called Login.resx, an a number of strings: foo="hello", bar="cruel" and baz="world" normally, I will re... | [
"c#",
"localization"
] | 14 | 20 | 21,078 | 2 | 0 | 2008-08-27T10:12:08.657000 | 2008-08-27T10:35:46.290000 |
29,847 | 29,862 | Get last item in a table - SQL | I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retrieve the last step for each item... | It's kind of hard to make sense of your table design - I think SO ate your delimiters. The basic way of handling this is to GROUP BY your fixed fields, and select a MAX (or MIN) for some unqiue value (a datetime usually works well). In your case, I think that the GROUP BY would be BatchRef and ItemCount, and Id will be... | Get last item in a table - SQL I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retri... | TITLE:
Get last item in a table - SQL
QUESTION:
I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basical... | [
"sql",
"sql-server",
"database",
"t-sql"
] | 4 | 7 | 17,866 | 6 | 0 | 2008-08-27T10:13:16.220000 | 2008-08-27T10:29:03.920000 |
29,855 | 29,859 | Is there a wxWidgets framework for C? | My understanding is that wxWidgets is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for? | You can try GTK+. I believe wxWidgets implementation for linux is written in GTK+. | Is there a wxWidgets framework for C? My understanding is that wxWidgets is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for? | TITLE:
Is there a wxWidgets framework for C?
QUESTION:
My understanding is that wxWidgets is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for?
ANSWER:
You can try... | [
"c",
"user-interface"
] | 5 | 2 | 9,921 | 3 | 0 | 2008-08-27T10:21:16.433000 | 2008-08-27T10:24:54.430000 |
29,856 | 31,384 | Install Python to match directory layout in OS X 10.5 | The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. ... | Personally, I wouldn't worry about it until you see a problem. Messing with the default python install on a *Nix system can cause more trouble than it's worth. I can say from personal experience that you never truly understand what python has done for the nix world until you have a problem with it. You can also add a s... | Install Python to match directory layout in OS X 10.5 The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache ... | TITLE:
Install Python to match directory layout in OS X 10.5
QUESTION:
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit ... | [
"python",
"macos",
"64-bit"
] | 4 | 1 | 679 | 5 | 0 | 2008-08-27T10:22:09.427000 | 2008-08-28T00:09:56.910000 |
29,869 | 29,917 | Regex to match all HTML tags except <p> and </p> | I need to match and remove all tags using a regular expression in Perl. I have the following: <\\??(?!p).+?> But this still matches with the closing tag. Any hint on how to match with the closing tag as well? Note, this is being performed on xhtml. | I came up with this: <(?!\/?p(?=>|\s.*>))\/?.*?>
x/ < # Match open angle bracket (?! # Negative lookahead (Not matching and not consuming) \/? # 0 or 1 / p # p (?= # Positive lookahead (Matching and not consuming) > # > - No attributes | # or \s # whitespace.* # anything up to > # close angle brackets - with attribute... | Regex to match all HTML tags except <p> and </p> I need to match and remove all tags using a regular expression in Perl. I have the following: <\\??(?!p).+?> But this still matches with the closing tag. Any hint on how to match with the closing tag as well? Note, this is being performed on xhtml. | TITLE:
Regex to match all HTML tags except <p> and </p>
QUESTION:
I need to match and remove all tags using a regular expression in Perl. I have the following: <\\??(?!p).+?> But this still matches with the closing tag. Any hint on how to match with the closing tag as well? Note, this is being performed on xhtml.
ANS... | [
"html",
"regex",
"perl"
] | 24 | 14 | 43,390 | 14 | 0 | 2008-08-27T10:41:44.793000 | 2008-08-27T11:26:12.957000 |
29,870 | 29,903 | How to bring in a web app | I run a game and the running is done by hand, I have a few scripts that help me but essentially it's me doing the work. I am at the moment working on web app that will allow the users to input directly some of their game actions and thus save me a lot of work. The problem is that I'm one man working on a moderately siz... | This is my general approach to testing/launching. How you test/launch depends mostly on: What your application is. Who your users are. If you application is a technical application and is geared to the technically-minded, the word "beta" won't really scare them - but provide an opportunity to test the product before it... | How to bring in a web app I run a game and the running is done by hand, I have a few scripts that help me but essentially it's me doing the work. I am at the moment working on web app that will allow the users to input directly some of their game actions and thus save me a lot of work. The problem is that I'm one man w... | TITLE:
How to bring in a web app
QUESTION:
I run a game and the running is done by hand, I have a few scripts that help me but essentially it's me doing the work. I am at the moment working on web app that will allow the users to input directly some of their game actions and thus save me a lot of work. The problem is ... | [
"web-applications",
"beta",
"launching"
] | 0 | 2 | 177 | 3 | 0 | 2008-08-27T10:43:53.620000 | 2008-08-27T11:04:47.203000 |
29,883 | 29,888 | Printing DOM Changes | What I am trying to do is change the background colour of a table cell and then when a user goes to print the page, the changes are now showing. I am currently using an unobtrusive script to run the following command on a range of cells: element.style.backgroundColor = "#f00" This works on screen in IE and FF, however,... | Have you tried hard-coding the values just to see if background-colors are showing on the print-preview at all? I think it is a setting in the Browser. | Printing DOM Changes What I am trying to do is change the background colour of a table cell and then when a user goes to print the page, the changes are now showing. I am currently using an unobtrusive script to run the following command on a range of cells: element.style.backgroundColor = "#f00" This works on screen i... | TITLE:
Printing DOM Changes
QUESTION:
What I am trying to do is change the background colour of a table cell and then when a user goes to print the page, the changes are now showing. I am currently using an unobtrusive script to run the following command on a range of cells: element.style.backgroundColor = "#f00" This... | [
"internet-explorer",
"firefox",
"dom",
"browser",
"printing"
] | 1 | 0 | 298 | 2 | 0 | 2008-08-27T10:51:38.873000 | 2008-08-27T10:54:01.410000 |
29,890 | 29,916 | How to get your own (local) IP-Address from an udp-socket (C/C++) | You have multiple network adapters. Bind a UDP socket to an local port, without specifying an address. Receive packets on one of the adapters. How do you get the local ip address of the adapter which received the packet? The question is, "What is the ip address from the receiver adapter?" not the address from the sende... | You could enumerate all the network adapters, get their IP addresses and compare the part covered by the subnet mask with the sender's address. Like: IPAddress FindLocalIPAddressOfIncomingPacket( senderAddr ) { foreach( adapter in EnumAllNetworkAdapters() ) { adapterSubnet = adapter.subnetmask & adapter.ipaddress; send... | How to get your own (local) IP-Address from an udp-socket (C/C++) You have multiple network adapters. Bind a UDP socket to an local port, without specifying an address. Receive packets on one of the adapters. How do you get the local ip address of the adapter which received the packet? The question is, "What is the ip ... | TITLE:
How to get your own (local) IP-Address from an udp-socket (C/C++)
QUESTION:
You have multiple network adapters. Bind a UDP socket to an local port, without specifying an address. Receive packets on one of the adapters. How do you get the local ip address of the adapter which received the packet? The question is... | [
"c++",
"sockets",
"udp"
] | 11 | 4 | 18,530 | 7 | 0 | 2008-08-27T10:54:29.427000 | 2008-08-27T11:24:50.680000 |
29,927 | 30,077 | vmware-cmd causes "perl.exe - Ordinal Not Found" error | My automated script for starting and stopping VMWare Server virtual machines has stopped working. vmware-cmd has started raising the error: The ordinal 3288 could not be located in the dynamic link library LIBEAY32.dll. I am not aware of any specific change or update when this started happening. I have found a bunch of... | Have discovered that this only occurs when the script is run on a different drive to the one where the EXE is located. As a work around for this I have simply moved the scripts execution. Apparently the DLL relates to SSL, which isn't relevant to what I'm doing, so this is a suitable workaround. I'm guessing that the p... | vmware-cmd causes "perl.exe - Ordinal Not Found" error My automated script for starting and stopping VMWare Server virtual machines has stopped working. vmware-cmd has started raising the error: The ordinal 3288 could not be located in the dynamic link library LIBEAY32.dll. I am not aware of any specific change or upda... | TITLE:
vmware-cmd causes "perl.exe - Ordinal Not Found" error
QUESTION:
My automated script for starting and stopping VMWare Server virtual machines has stopped working. vmware-cmd has started raising the error: The ordinal 3288 could not be located in the dynamic link library LIBEAY32.dll. I am not aware of any speci... | [
"vmware"
] | 0 | 1 | 3,137 | 3 | 0 | 2008-08-27T11:42:05.430000 | 2008-08-27T13:24:28.850000 |
29,943 | 29,987 | How do I submit a form when the return key is pressed? | How do I submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there. I am using a custom div instead of that. | This is the cleanest answer: Name: Pwd: Better yet, if you are using JavaScript to submit the form using the custom div, you should also use JavaScript to create it, and to set the display:none style on the button. This way users with JavaScript disabled will still see the submit button and can click on it. It has been... | How do I submit a form when the return key is pressed? How do I submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there. I am using a custom div instead of that. | TITLE:
How do I submit a form when the return key is pressed?
QUESTION:
How do I submit an HTML form when the return key is pressed and if there are no buttons in the form? The submit button is not there. I am using a custom div instead of that.
ANSWER:
This is the cleanest answer: Name: Pwd: Better yet, if you are u... | [
"javascript",
"html"
] | 88 | 70 | 253,246 | 15 | 0 | 2008-08-27T11:56:50.060000 | 2008-08-27T12:38:30.893000 |
29,971 | 29,978 | What is the best way to setup an integration testing server? | Setting up an integration server, I’m in doubt about the best approach regarding using multiple tasks to complete the build. Is the best way to set all in just one big-job or make small dependent ones? | You definitely want to break up the tasks. Here is a nice example of CruiseControl.NET configuration that has different targets (tasks) for each step. It also uses a common.build file which can be shared among projects with little customization. http://code.google.com/p/dot-net-reference-app/source/browse/#svn/trunk | What is the best way to setup an integration testing server? Setting up an integration server, I’m in doubt about the best approach regarding using multiple tasks to complete the build. Is the best way to set all in just one big-job or make small dependent ones? | TITLE:
What is the best way to setup an integration testing server?
QUESTION:
Setting up an integration server, I’m in doubt about the best approach regarding using multiple tasks to complete the build. Is the best way to set all in just one big-job or make small dependent ones?
ANSWER:
You definitely want to break u... | [
"continuous-integration",
"integration-testing"
] | 5 | 3 | 477 | 7 | 0 | 2008-08-27T12:20:48.237000 | 2008-08-27T12:27:58.113000 |
29,976 | 30,536 | Best practice for dynamically added Web.UI.ITemplate classes | We have a couple of ASP.Net dataview column templates that are dynamically added to the dataview depending on columns selected by users. These templated cells need to handle custom databindings: public class CustomColumnTemplate: ITemplate { public void InstantiateIn( Control container ) { //create a new label Label co... | I have worked extensively with templated control and I have not found a better solution. Why are you referencing the contentLable in the event handler? The sender is the label you can cast it to the label and have the reference to the label. Like below. //add a custom data binding contentLabel.DataBinding += (object se... | Best practice for dynamically added Web.UI.ITemplate classes We have a couple of ASP.Net dataview column templates that are dynamically added to the dataview depending on columns selected by users. These templated cells need to handle custom databindings: public class CustomColumnTemplate: ITemplate { public void Insta... | TITLE:
Best practice for dynamically added Web.UI.ITemplate classes
QUESTION:
We have a couple of ASP.Net dataview column templates that are dynamically added to the dataview depending on columns selected by users. These templated cells need to handle custom databindings: public class CustomColumnTemplate: ITemplate {... | [
".net",
"asp.net"
] | 4 | 2 | 2,067 | 2 | 0 | 2008-08-27T12:26:28.520000 | 2008-08-27T16:00:03.640000 |
29,980 | 30,678 | How should I test a method that populates a list from a DataReader? | So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible. The code I'm working on needs to populate, let's say a List from a DataReader that returns all the fields required for a functioning Foo. Howeve... | To make this less tedious, you will need to encapsulate/refactor the mapping between the DataReader and the Object you hold in the list. There is quite of few steps to encapsulate that logic out. If that is the road you want to take, I can post code for you. I am just not sure how practical it would be to post the code... | How should I test a method that populates a list from a DataReader? So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible. The code I'm working on needs to populate, let's say a List from a DataReade... | TITLE:
How should I test a method that populates a list from a DataReader?
QUESTION:
So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible. The code I'm working on needs to populate, let's say a Lis... | [
"c#",
"unit-testing",
"tdd",
"mocking"
] | 5 | 1 | 825 | 6 | 0 | 2008-08-27T12:29:09.200000 | 2008-08-27T17:22:46.140000 |
29,988 | 30,001 | How to send email from a program _without_ using a preexisting account? | I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.) I've been told you could do some stuff with telneting to port 25, but I'm very fuzzy... | As long as your account is on gmail.com, set up gmail-smtp-in.l.google.com as the outgoing SMTP-server in your program. You do not need to provide a password to send email to gmail-accounts when using that server. | How to send email from a program _without_ using a preexisting account? I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.) I've been to... | TITLE:
How to send email from a program _without_ using a preexisting account?
QUESTION:
I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email acco... | [
".net",
"email",
"smtp"
] | 10 | 8 | 6,420 | 6 | 0 | 2008-08-27T12:40:40.373000 | 2008-08-27T12:50:09.120000 |
30,003 | 30,020 | How to compare an html entity with jQuery | I have the following html code: ⇑ Header title I would like to toggle between up arrow and down arrow each time the user clicks the span tag. function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I have tried with.text() too if(arrow == "⇓") { $("#"+id+" span").html("⇑"); } else { $("#"+id+" span").htm... | When the HTML is parsed, what JQuery sees in the DOM is a UPWARDS DOUBLE ARROW ("⇑"), not the entity reference. Thus, in your Javascript code you should test for "⇑" or "\u21d1". Also, you need to change what you're switching to: function expandCollapse(id) { var arrow = $("#"+id+" span").html(); if(arrow == "\u21d1") ... | How to compare an html entity with jQuery I have the following html code: ⇑ Header title I would like to toggle between up arrow and down arrow each time the user clicks the span tag. function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I have tried with.text() too if(arrow == "⇓") { $("#"+id+" span")... | TITLE:
How to compare an html entity with jQuery
QUESTION:
I have the following html code: ⇑ Header title I would like to toggle between up arrow and down arrow each time the user clicks the span tag. function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I have tried with.text() too if(arrow == "⇓") {... | [
"javascript",
"jquery",
"html-entities"
] | 11 | 17 | 7,412 | 5 | 0 | 2008-08-27T12:51:26.073000 | 2008-08-27T13:03:20.977000 |
30,004 | 30,388 | Can you use LINQ tools such as SQLMetal with an access database? | I'm creating a small database application to teach myself the following concepts C# programming.Net 3.5 framework WPF LINQ ORM I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use SQLMetal to generate the ORM code from a Microsoft Access database. Does anyon... | For an embedded database, you can use SQL Server Compact Edition. Unlike SQL Server Express, it is not compatible with the LINQ to SQL designer, but it is fully compatible with the command-line SQLMetal. It has a few advantages over SQL Express, like to ability to use embedded or run from a file. Microsoft has a very h... | Can you use LINQ tools such as SQLMetal with an access database? I'm creating a small database application to teach myself the following concepts C# programming.Net 3.5 framework WPF LINQ ORM I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use SQLMetal to g... | TITLE:
Can you use LINQ tools such as SQLMetal with an access database?
QUESTION:
I'm creating a small database application to teach myself the following concepts C# programming.Net 3.5 framework WPF LINQ ORM I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to... | [
"c#",
"linq-to-sql",
"ms-access"
] | 6 | 4 | 1,959 | 4 | 0 | 2008-08-27T12:51:57.353000 | 2008-08-27T15:08:31.610000 |
30,005 | 32,878 | How do I fire an event when a iframe has finished loading in jQuery? | I have to load a PDF within a page. Ideally I would like to have a loading animated gif which is replaced once the PDF has loaded. | I'm pretty certain that it cannot be done. Pretty much anything else than PDF works, even Flash. (Tested on Safari, Firefox 3, IE 7) Too bad. | How do I fire an event when a iframe has finished loading in jQuery? I have to load a PDF within a page. Ideally I would like to have a loading animated gif which is replaced once the PDF has loaded. | TITLE:
How do I fire an event when a iframe has finished loading in jQuery?
QUESTION:
I have to load a PDF within a page. Ideally I would like to have a loading animated gif which is replaced once the PDF has loaded.
ANSWER:
I'm pretty certain that it cannot be done. Pretty much anything else than PDF works, even Fla... | [
"javascript",
"jquery"
] | 99 | 38 | 189,791 | 14 | 0 | 2008-08-27T12:52:29.927000 | 2008-08-28T17:38:18.357000 |
30,018 | 30,023 | How do I select an XML-node based on its content? | How can I use XPath to select an XML-node based on its content? If I e.g. have the following xml and I want to select the -node that contains Ritchie to get the author's full name: The C Programming Language Ritchie, Dennis M. Kernighan, Brian W. Joel on Software Spolsky, Joel | /books/book/authors/author[contains(., 'Ritchie')] or //author[contains(., 'Ritchie')] | How do I select an XML-node based on its content? How can I use XPath to select an XML-node based on its content? If I e.g. have the following xml and I want to select the -node that contains Ritchie to get the author's full name: The C Programming Language Ritchie, Dennis M. Kernighan, Brian W. Joel on Software Spolsk... | TITLE:
How do I select an XML-node based on its content?
QUESTION:
How can I use XPath to select an XML-node based on its content? If I e.g. have the following xml and I want to select the -node that contains Ritchie to get the author's full name: The C Programming Language Ritchie, Dennis M. Kernighan, Brian W. Joel ... | [
"xml",
"xpath"
] | 16 | 23 | 11,825 | 3 | 0 | 2008-08-27T13:01:25.770000 | 2008-08-27T13:04:16.217000 |
30,026 | 30,034 | Features common to all regex flavors? | I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a standard subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capabilities vary between tools/languages? | Compare Regular Expression Flavors http://www.regular-expressions.info/refflavors.html | Features common to all regex flavors? I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a standard subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capab... | TITLE:
Features common to all regex flavors?
QUESTION:
I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a standard subset of regex capabilities that all regex-enabled tools/languages will support? ... | [
"regex",
"language-agnostic"
] | 10 | 12 | 1,491 | 6 | 0 | 2008-08-27T13:05:38.600000 | 2008-08-27T13:08:30.010000 |
30,036 | 30,197 | JavaScript and Threads | Is there some way to do multi-threading in JavaScript? | See http://caniuse.com/#search=worker for the most up-to-date support info. The following was the state of support circa 2009. The words you want to google for are JavaScript Worker Threads Apart from from Gears there's nothing available right now, but there's plenty of talk about how to implement this so I guess watch... | JavaScript and Threads Is there some way to do multi-threading in JavaScript? | TITLE:
JavaScript and Threads
QUESTION:
Is there some way to do multi-threading in JavaScript?
ANSWER:
See http://caniuse.com/#search=worker for the most up-to-date support info. The following was the state of support circa 2009. The words you want to google for are JavaScript Worker Threads Apart from from Gears the... | [
"javascript",
"multithreading"
] | 158 | 112 | 173,507 | 13 | 0 | 2008-08-27T13:09:10.760000 | 2008-08-27T14:02:12.037000 |
30,049 | 45,869 | Should DOM splitText and normalise compose to give the identity? | I got embroiled in a discussion about DOM implementation quirks yesterday, with gave rise to an interesting question regarding Text.splitText and Element.normalise behaviours, and how they should behave. In DOM Level 1 Core, Text.splitText is defined as... Breaks this Text node into two Text nodes at the specified offs... | I was on the DOM Working Group in the early days; I'm sure we meant for textNode to contain the new joined value, but if we didn't say it in the spec, it's possible that some implementation might create a new node instead of reusing textNode, though that would require more work for the implementors. When in doubt, prog... | Should DOM splitText and normalise compose to give the identity? I got embroiled in a discussion about DOM implementation quirks yesterday, with gave rise to an interesting question regarding Text.splitText and Element.normalise behaviours, and how they should behave. In DOM Level 1 Core, Text.splitText is defined as..... | TITLE:
Should DOM splitText and normalise compose to give the identity?
QUESTION:
I got embroiled in a discussion about DOM implementation quirks yesterday, with gave rise to an interesting question regarding Text.splitText and Element.normalise behaviours, and how they should behave. In DOM Level 1 Core, Text.splitTe... | [
"xml",
"dom"
] | 8 | 5 | 379 | 3 | 0 | 2008-08-27T13:13:34.600000 | 2008-09-05T13:51:00.943000 |
30,058 | 30,079 | How can I launch the Google Maps iPhone application from within my own native application? | The Apple Developer Documentation (link is dead now) explains that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps application that is provided as standard with the iPhone will launch. How can I launch the same Google Maps application with a specific address... | For iOS 5.1.1 and lower, use the openURL method of UIApplication. It will perform the normal iPhone magical URL reinterpretation. so [someUIApplication openURL:[NSURL URLWithString:@"http://maps.google.com/maps?q=London"]] should invoke the Google maps app. From iOS 6, you'll be invoking Apple's own Maps app. For this,... | How can I launch the Google Maps iPhone application from within my own native application? The Apple Developer Documentation (link is dead now) explains that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps application that is provided as standard with the iP... | TITLE:
How can I launch the Google Maps iPhone application from within my own native application?
QUESTION:
The Apple Developer Documentation (link is dead now) explains that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps application that is provided as st... | [
"ios",
"objective-c",
"google-maps"
] | 70 | 65 | 99,385 | 16 | 0 | 2008-08-27T13:15:40.493000 | 2008-08-27T13:26:18.517000 |
30,062 | 30,072 | Boolean Field in Oracle | Yesterday I wanted to add a boolean field to an Oracle table. However, there isn't actually a boolean data type in Oracle. Does anyone here know the best way to simulate a boolean? Googling the subject discovered several approaches Use an integer and just don't bother assigning anything other than 0 or 1 to it. Use a c... | I found this link useful. Here is the paragraph highlighting some of the pros/cons of each approach. The most commonly seen design is to imitate the many Boolean-like flags that Oracle's data dictionary views use, selecting 'Y' for true and 'N' for false. However, to interact correctly with host environments, such as J... | Boolean Field in Oracle Yesterday I wanted to add a boolean field to an Oracle table. However, there isn't actually a boolean data type in Oracle. Does anyone here know the best way to simulate a boolean? Googling the subject discovered several approaches Use an integer and just don't bother assigning anything other th... | TITLE:
Boolean Field in Oracle
QUESTION:
Yesterday I wanted to add a boolean field to an Oracle table. However, there isn't actually a boolean data type in Oracle. Does anyone here know the best way to simulate a boolean? Googling the subject discovered several approaches Use an integer and just don't bother assigning... | [
"oracle",
"boolean",
"sqldatatypes"
] | 153 | 89 | 219,569 | 9 | 0 | 2008-08-27T13:16:58.883000 | 2008-08-27T13:23:06.247000 |
30,067 | 52,893 | Should I migrate to ASP.NET MVC? | I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few days and wanted to know, based... | If you are quite happy with WebForms today, then maybe ASP.NET MVC isn't for you. I have been frustrated with WebForms for a really long time. I'm definitely not alone here. The smart-client, stateful abstraction over the web breaks down severely in complex scenarios. I happen to love HTML, Javascript, and CSS. WebForm... | Should I migrate to ASP.NET MVC? I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a f... | TITLE:
Should I migrate to ASP.NET MVC?
QUESTION:
I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that... | [
"asp.net-mvc"
] | 52 | 65 | 9,792 | 20 | 0 | 2008-08-27T13:20:15.287000 | 2008-09-09T21:00:18.693000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.