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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
137,935 | 137,942 | How to jump to an occurrence from Vim search list | In Vim editor I opted ]I on a function (in C++ code). This presented a list, which says 'Press ENTER or type command to continue'. Now to jump to an occurrence say 6, I type 6 - but this is not working. What commands can I type in such a case, and how do I jump to Nth occurrence from this list? Update: Actually I tried... | It should present you a list like: 1: 345 my_func (int var) 2: 4523 my_func (int var) 3: 10032 my_func (3); The second column is line numbers. Type:345 to jump to line 345. | How to jump to an occurrence from Vim search list In Vim editor I opted ]I on a function (in C++ code). This presented a list, which says 'Press ENTER or type command to continue'. Now to jump to an occurrence say 6, I type 6 - but this is not working. What commands can I type in such a case, and how do I jump to Nth o... | TITLE:
How to jump to an occurrence from Vim search list
QUESTION:
In Vim editor I opted ]I on a function (in C++ code). This presented a list, which says 'Press ENTER or type command to continue'. Now to jump to an occurrence say 6, I type 6 - but this is not working. What commands can I type in such a case, and how ... | [
"search",
"vim",
"ctags"
] | 6 | 2 | 2,447 | 7 | 0 | 2008-09-26T05:40:17.240000 | 2008-09-26T05:44:02.037000 |
137,950 | 152,007 | How does cherrypy handle user threads? | I'm working on a django app right and I'm using cherrypy as the server. Cherrypy creates a new thread for every page view. I'd like to be able to access all of these threads (threads responsible for talking to django) from within any of them. More specifically I'd like to be able to access the thread_data for each of t... | CherryPy's wsgiserver doesn't create a new thread for every request--it uses a pool. Each of those worker threads is a subclass of threading.Thread, so all of them should be accessible via threading.enumerate(). However, if you're talking specifically about cherrypy.thread_data, that's something else: a threading.local... | How does cherrypy handle user threads? I'm working on a django app right and I'm using cherrypy as the server. Cherrypy creates a new thread for every page view. I'd like to be able to access all of these threads (threads responsible for talking to django) from within any of them. More specifically I'd like to be able ... | TITLE:
How does cherrypy handle user threads?
QUESTION:
I'm working on a django app right and I'm using cherrypy as the server. Cherrypy creates a new thread for every page view. I'd like to be able to access all of these threads (threads responsible for talking to django) from within any of them. More specifically I'... | [
"django",
"multithreading",
"concurrency",
"cherrypy"
] | 4 | 6 | 3,068 | 2 | 0 | 2008-09-26T05:47:57.610000 | 2008-09-30T06:52:22.780000 |
137,951 | 138,093 | Reading all values from an ASP.NET datagrid using javascript | I have an ASP.NET Datagrid with several text boxes and drop down boxes inside it. I want to read all the values in the grid using a JavaScript function. How do i go about it? | And here's an example using Microsoft AJAX framework: var txts = $get('client_id_of_datagrid').getElementsByTagName('input'); var ddls = $get('client_id_of_datagrid').getElementsByTagName('select');
for(var i=0;i And for no framework replace $get with document.getElementById. Really, jQuery is the best idea. | Reading all values from an ASP.NET datagrid using javascript I have an ASP.NET Datagrid with several text boxes and drop down boxes inside it. I want to read all the values in the grid using a JavaScript function. How do i go about it? | TITLE:
Reading all values from an ASP.NET datagrid using javascript
QUESTION:
I have an ASP.NET Datagrid with several text boxes and drop down boxes inside it. I want to read all the values in the grid using a JavaScript function. How do i go about it?
ANSWER:
And here's an example using Microsoft AJAX framework: var... | [
"asp.net",
"javascript"
] | 0 | 1 | 2,159 | 2 | 0 | 2008-09-26T05:49:09.760000 | 2008-09-26T07:05:36.037000 |
137,952 | 138,186 | Vim Markdown highlighting (list items and code block conflicts) | I decide to learn more about vim and its syntax highlighting. Using examples for others, I am creating my own syntax file for Markdown. I have seen mkd.vim and it has this problem too. My issue is between list items and code block highlighting. Code Block definition: first line is blank second line begins with at least... | Just make sure that the definition of mkdListItem is after the definition of mkdCodeBlock, like this: syn match mkdCodeBlock /\(\s\{4,}\|\t\{1,}\).*\n/ contained nextgroup=mkdCodeBlock hi link mkdCodeBlock comment
syn region mkdListItem start=/\s*[-*+]\s\+/ matchgroup=pdcListText end=".*" contained nextgroup=mkdListIt... | Vim Markdown highlighting (list items and code block conflicts) I decide to learn more about vim and its syntax highlighting. Using examples for others, I am creating my own syntax file for Markdown. I have seen mkd.vim and it has this problem too. My issue is between list items and code block highlighting. Code Block ... | TITLE:
Vim Markdown highlighting (list items and code block conflicts)
QUESTION:
I decide to learn more about vim and its syntax highlighting. Using examples for others, I am creating my own syntax file for Markdown. I have seen mkd.vim and it has this problem too. My issue is between list items and code block highlig... | [
"regex",
"vim",
"syntax",
"markdown",
"highlight"
] | 11 | 7 | 3,771 | 3 | 0 | 2008-09-26T05:50:16.653000 | 2008-09-26T07:43:12.497000 |
137,975 | 138,012 | What are drawbacks or disadvantages of singleton pattern? | The singleton pattern is a fully paid up member of the GoF 's patterns book, but it lately seems rather orphaned by the developer world. I still use quite a lot of singletons, especially for factory classes, and while you have to be a bit careful about multithreading issues (like any class actually), I fail to see why ... | Paraphrased from Brian Button: They are generally used as a global instance, why is that so bad? Because you hide the dependencies of your application in your code, instead of exposing them through the interfaces. Making something global to avoid passing it around is a code smell. They violate the single responsibility... | What are drawbacks or disadvantages of singleton pattern? The singleton pattern is a fully paid up member of the GoF 's patterns book, but it lately seems rather orphaned by the developer world. I still use quite a lot of singletons, especially for factory classes, and while you have to be a bit careful about multithre... | TITLE:
What are drawbacks or disadvantages of singleton pattern?
QUESTION:
The singleton pattern is a fully paid up member of the GoF 's patterns book, but it lately seems rather orphaned by the developer world. I still use quite a lot of singletons, especially for factory classes, and while you have to be a bit caref... | [
"design-patterns",
"singleton"
] | 2,169 | 1,430 | 644,645 | 36 | 0 | 2008-09-26T06:02:00.727000 | 2008-09-26T06:13:44.630000 |
137,998 | 156,332 | Q's on pgsql | I'm a newbie to pgsql. I have few questionss on it: 1) I know it is possible to access columns by., but when I try to access columns like.. it throwing error like Cross-database references are not implemented How do I implement it? 2) We have 10+ tables and 6 of have 2000+ rows. Is it fine to maintain all of them in on... | Cross Database exists in PostGreSQL for years now. You must prefix the name of the database by the database name (and, of course, have the right to query on it). You'll come with something like this: SELECT alias_1.col1, alias_2.col3 FROM table_1 as alias_1, database_b.table_2 as alias_2 WHERE... If your database is on... | Q's on pgsql I'm a newbie to pgsql. I have few questionss on it: 1) I know it is possible to access columns by., but when I try to access columns like.. it throwing error like Cross-database references are not implemented How do I implement it? 2) We have 10+ tables and 6 of have 2000+ rows. Is it fine to maintain all ... | TITLE:
Q's on pgsql
QUESTION:
I'm a newbie to pgsql. I have few questionss on it: 1) I know it is possible to access columns by., but when I try to access columns like.. it throwing error like Cross-database references are not implemented How do I implement it? 2) We have 10+ tables and 6 of have 2000+ rows. Is it fin... | [
"postgresql"
] | 0 | 1 | 292 | 3 | 0 | 2008-09-26T06:09:10.040000 | 2008-10-01T05:25:39.297000 |
138,004 | 1,464,210 | Do you know update site addresses for *latest* eclipse components? | I am looking for all addresses related to: 3.x eclipse itself (milestones and/or integration builds) 3.x other components (GEF, GMF, EMF,...) In the spirit of answering my own question, I do have an answer for: 3.5 eclipse itself, with some details and caveats, 3.6 Helios, with the steps involved to follow the updates.... | For eclipse 3.6 Helios (see above for eclipse3.5 ), from " Catching up with Milestones and I-Builds " The p2 repos for Eclipse are not only for the stable releases, but also for the Milestones, I Builds and Nightly builds: See Eclipse Project Updates Sites Milestones: http://download.eclipse.org/eclipse/updates/3.6mile... | Do you know update site addresses for *latest* eclipse components? I am looking for all addresses related to: 3.x eclipse itself (milestones and/or integration builds) 3.x other components (GEF, GMF, EMF,...) In the spirit of answering my own question, I do have an answer for: 3.5 eclipse itself, with some details and ... | TITLE:
Do you know update site addresses for *latest* eclipse components?
QUESTION:
I am looking for all addresses related to: 3.x eclipse itself (milestones and/or integration builds) 3.x other components (GEF, GMF, EMF,...) In the spirit of answering my own question, I do have an answer for: 3.5 eclipse itself, with... | [
"eclipse",
"build",
"p2"
] | 11 | 2 | 6,126 | 3 | 0 | 2008-09-26T06:10:52.143000 | 2009-09-23T06:10:21.550000 |
138,009 | 140,819 | Is the best approach a typed or not typed view in ASP.NET MVC? | In ASP.NET MVC it's possible to choice between having a typed view were you define in the codebehind what kind of data the view can should expect. But it's also possible to not define this and just pass any kind of data to view in a ViewData container. What would the best model here or should I mix depending on what ki... | I would recommend always using the strongly typed ViewData... that way you have compile time checking, intellisense, you don't have to do casting in your view, and the ability to refactor your code much easier. | Is the best approach a typed or not typed view in ASP.NET MVC? In ASP.NET MVC it's possible to choice between having a typed view were you define in the codebehind what kind of data the view can should expect. But it's also possible to not define this and just pass any kind of data to view in a ViewData container. What... | TITLE:
Is the best approach a typed or not typed view in ASP.NET MVC?
QUESTION:
In ASP.NET MVC it's possible to choice between having a typed view were you define in the codebehind what kind of data the view can should expect. But it's also possible to not define this and just pass any kind of data to view in a ViewDa... | [
"asp.net-mvc"
] | 2 | 5 | 243 | 3 | 0 | 2008-09-26T06:13:05.163000 | 2008-09-26T17:30:44.353000 |
138,028 | 138,055 | Is it possible to call a COM API from Java? | Is it possible to call a COM API from Java (specifically the HP/Mercury Quality Center OTA API)? If so, what's the best way? Is something like JACOB appropriate? Code fragments would be helpful for the basics:-) | jacob: yes, http://sourceforge.net/projects/jacob-project/ is an active project that will suite your purpose pretty well. you can see multiple examples: http://jacob-project.wiki.sourceforge.net/Event+Callbacks but if you want something that is more tested and are willing to pay money, then go for http://www.nevaobject... | Is it possible to call a COM API from Java? Is it possible to call a COM API from Java (specifically the HP/Mercury Quality Center OTA API)? If so, what's the best way? Is something like JACOB appropriate? Code fragments would be helpful for the basics:-) | TITLE:
Is it possible to call a COM API from Java?
QUESTION:
Is it possible to call a COM API from Java (specifically the HP/Mercury Quality Center OTA API)? If so, what's the best way? Is something like JACOB appropriate? Code fragments would be helpful for the basics:-)
ANSWER:
jacob: yes, http://sourceforge.net/pr... | [
"java",
"api",
"com",
"hp-quality-center"
] | 9 | 10 | 14,197 | 5 | 0 | 2008-09-26T06:26:10.373000 | 2008-09-26T06:41:28.247000 |
138,029 | 138,258 | Get Bound Event Handler in Tkinter | After a bind a method to an event of a Tkinter element is there a way to get the method back? >>> root = Tkinter.Tk() >>> frame = Tkinter.Frame(root, width=100, height=100) >>> frame.bind(' ', lambda e: pprint('Click')) # function needed >>> frame.pack() >>> bound_event_method = frame.??? | The associated call to do that for the tk C API would be Get_GetCommandInfo which places information about the command in the Tcl_CmdInfo structure pointed to by infoPtr However this function is not used anywhere in _tkinter.c which is the binding for tk used by python trough Tkinter.py. Therefore it is impossible to g... | Get Bound Event Handler in Tkinter After a bind a method to an event of a Tkinter element is there a way to get the method back? >>> root = Tkinter.Tk() >>> frame = Tkinter.Frame(root, width=100, height=100) >>> frame.bind(' ', lambda e: pprint('Click')) # function needed >>> frame.pack() >>> bound_event_method = frame... | TITLE:
Get Bound Event Handler in Tkinter
QUESTION:
After a bind a method to an event of a Tkinter element is there a way to get the method back? >>> root = Tkinter.Tk() >>> frame = Tkinter.Frame(root, width=100, height=100) >>> frame.bind(' ', lambda e: pprint('Click')) # function needed >>> frame.pack() >>> bound_ev... | [
"python",
"user-interface",
"events",
"tkinter"
] | 2 | 2 | 2,790 | 3 | 0 | 2008-09-26T06:26:17.520000 | 2008-09-26T08:15:25.680000 |
138,040 | 138,062 | How to create a resizable CDialog in MFC? | I have to create a dialog based application, instead of old CFormView type of design. But CDialog produces fixed-size dialogs. How can I create dialog based applications with resizable dialogs? | In the RC resource file if the dialog has this style similar to this it will be fixed size: IDD_DIALOG_DIALOG DIALOGEX 0, 0, 320, 201 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU If the dialog has this style it will be sizeable: IDD_DIALOG_DIALOG DIALOGEX 0, 0, 320, 201 STYLE WS_POPUP | WS_VISIBLE | WS_CAPT... | How to create a resizable CDialog in MFC? I have to create a dialog based application, instead of old CFormView type of design. But CDialog produces fixed-size dialogs. How can I create dialog based applications with resizable dialogs? | TITLE:
How to create a resizable CDialog in MFC?
QUESTION:
I have to create a dialog based application, instead of old CFormView type of design. But CDialog produces fixed-size dialogs. How can I create dialog based applications with resizable dialogs?
ANSWER:
In the RC resource file if the dialog has this style simi... | [
"winapi",
"mfc"
] | 29 | 27 | 59,595 | 7 | 0 | 2008-09-26T06:31:51.827000 | 2008-09-26T06:46:44.100000 |
138,043 | 150,974 | Find the next TCP port in .NET | I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with a dynamically assigned new open TCP port. I know that TcpClient will assign a new client side port when I open a connection to a given server. Is there a simple way to find the next open TCP port in.NET? I need the actual number,... | Here is what I was looking for: static int FreeTcpPort() { TcpListener l = new TcpListener(IPAddress.Loopback, 0); l.Start(); int port = ((IPEndPoint)l.LocalEndpoint).Port; l.Stop(); return port; } | Find the next TCP port in .NET I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with a dynamically assigned new open TCP port. I know that TcpClient will assign a new client side port when I open a connection to a given server. Is there a simple way to find the next open TCP port in... | TITLE:
Find the next TCP port in .NET
QUESTION:
I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with a dynamically assigned new open TCP port. I know that TcpClient will assign a new client side port when I open a connection to a given server. Is there a simple way to find the nex... | [
"c#",
".net",
"wcf",
"networking",
"tcp"
] | 86 | 154 | 54,820 | 8 | 0 | 2008-09-26T06:33:50.900000 | 2008-09-29T22:15:52.567000 |
138,045 | 138,079 | Is there something like Python's getattr() in C#? | Is there something like Python's getattr() in C#? I would like to create a window by reading a list which contains the names of controls to put on the window. | There is also Type.InvokeMember. public static class ReflectionExt { public static object GetAttr(this object obj, string name) { Type type = obj.GetType(); BindingFlags flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetProperty;
return type.InvokeMember(name, flags, Type.DefaultBinder, obj, null);... | Is there something like Python's getattr() in C#? Is there something like Python's getattr() in C#? I would like to create a window by reading a list which contains the names of controls to put on the window. | TITLE:
Is there something like Python's getattr() in C#?
QUESTION:
Is there something like Python's getattr() in C#? I would like to create a window by reading a list which contains the names of controls to put on the window.
ANSWER:
There is also Type.InvokeMember. public static class ReflectionExt { public static o... | [
"c#",
"python",
"user-interface"
] | 15 | 13 | 3,696 | 4 | 0 | 2008-09-26T06:35:30.007000 | 2008-09-26T06:57:23.420000 |
138,060 | 181,484 | TFS Build Server drop location error | We're using TFS Build Server to ensure that all files checked in by developers are going to compile to a working source tree, cuz there's nothing worse than a broken build! Anyway we've having some problems with the drop location that Build Server wants to use, we keep getting this error: TFS209011: Could not create dr... | It looks like the problem is to do with our install of Windows 2003, we have "Web Edition" installed and it is limited to just 10 connections. I ended up with a post of the MSDN forums in which I got this answer: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3967598&SiteID=1&mode=1 | TFS Build Server drop location error We're using TFS Build Server to ensure that all files checked in by developers are going to compile to a working source tree, cuz there's nothing worse than a broken build! Anyway we've having some problems with the drop location that Build Server wants to use, we keep getting this ... | TITLE:
TFS Build Server drop location error
QUESTION:
We're using TFS Build Server to ensure that all files checked in by developers are going to compile to a working source tree, cuz there's nothing worse than a broken build! Anyway we've having some problems with the drop location that Build Server wants to use, we ... | [
"tfs",
"tfsbuild",
"network-share"
] | 1 | 0 | 1,153 | 2 | 0 | 2008-09-26T06:45:42.043000 | 2008-10-08T05:44:40.237000 |
138,071 | 138,082 | Catching exceptions within .aspx and .ascx pages | The questions says everything, take this example code: Now if an error gets thrown somewhere inside these controlls (that are located in a master page) they will take down the entire site, how would one catch these exceptions? | You can catch all exception not handled elswhere in the Global.asax page / class. Look at: protected void Application_Error(Object sender, EventArgs e) method. | Catching exceptions within .aspx and .ascx pages The questions says everything, take this example code: Now if an error gets thrown somewhere inside these controlls (that are located in a master page) they will take down the entire site, how would one catch these exceptions? | TITLE:
Catching exceptions within .aspx and .ascx pages
QUESTION:
The questions says everything, take this example code: Now if an error gets thrown somewhere inside these controlls (that are located in a master page) they will take down the entire site, how would one catch these exceptions?
ANSWER:
You can catch all... | [
"c#",
".net",
"asp.net",
"exception",
"error-handling"
] | 2 | 6 | 3,882 | 5 | 0 | 2008-09-26T06:54:20.290000 | 2008-09-26T06:58:44.180000 |
138,080 | 138,107 | Emulate hard disk in .NET | Is there a way to emulate a disk drive in.NET, intercepting read/write/lock operations? I would like to create something with a front-end similar to GMail Drive in C#. Thanks, Tom | I use the Eldos Callback File System myself for this purpose, but although it's good, it's not exactly cheap. There are some free/cheap projects as well, and I'm sure one of them was mentioned in a similar question on SO recently -- can't find it anymore at the moment, though. Stability tends to be a major issue, thoug... | Emulate hard disk in .NET Is there a way to emulate a disk drive in.NET, intercepting read/write/lock operations? I would like to create something with a front-end similar to GMail Drive in C#. Thanks, Tom | TITLE:
Emulate hard disk in .NET
QUESTION:
Is there a way to emulate a disk drive in.NET, intercepting read/write/lock operations? I would like to create something with a front-end similar to GMail Drive in C#. Thanks, Tom
ANSWER:
I use the Eldos Callback File System myself for this purpose, but although it's good, i... | [
".net",
"emulation",
"hard-drive"
] | 4 | 1 | 3,362 | 6 | 0 | 2008-09-26T06:57:35.120000 | 2008-09-26T07:10:05.433000 |
138,096 | 138,315 | How to add a Page to Frame using code in WPF | I have a Window where I have put a Frame. I would like to add a Page to the Frame when I click a button that is also on the Window but not in the Frame. There are several buttons in the Window and each click on a button should load a different Page in the Frame. Since I'm a total newbie on this WPF stuff it's quite pos... | the Frame class exposes a method named "Navigate" that takes the content you want to show in your frame as parameter. try calling myFrame.Navigate(myPageObject); this should work | How to add a Page to Frame using code in WPF I have a Window where I have put a Frame. I would like to add a Page to the Frame when I click a button that is also on the Window but not in the Frame. There are several buttons in the Window and each click on a button should load a different Page in the Frame. Since I'm a ... | TITLE:
How to add a Page to Frame using code in WPF
QUESTION:
I have a Window where I have put a Frame. I would like to add a Page to the Frame when I click a button that is also on the Window but not in the Frame. There are several buttons in the Window and each click on a button should load a different Page in the F... | [
"wpf"
] | 10 | 19 | 44,644 | 2 | 0 | 2008-09-26T07:07:01.697000 | 2008-09-26T08:33:48.397000 |
138,097 | 138,098 | How do I find my PID in Java or JRuby on Linux? | I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid. Is there another way to obtain the PID? | If you have procfs installed, you can find the process id via the /proc/self symlink, which points to a directory whose name is the pid (there are also files here with other pertinent information, including the PID, but the directory is all you need in this case). Thus, with Java, you can do: String pid = new File("/pr... | How do I find my PID in Java or JRuby on Linux? I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid. Is there another way to obtain the PID? | TITLE:
How do I find my PID in Java or JRuby on Linux?
QUESTION:
I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid. Is there another way to obta... | [
"java",
"linux",
"jruby",
"pid"
] | 13 | 26 | 7,751 | 6 | 0 | 2008-09-26T07:07:11.867000 | 2008-09-26T07:07:17.013000 |
138,099 | 144,894 | How do I add a type to GWT's Serialization Policy whitelist? | GWT's serializer has limited java.io.Serializable support, but for security reasons there is a whitelist of types it supports. The documentation I've found, for example this FAQ entry says that any types you want to serialize "must be included in the serialization policy whitelist", and that the list is generated at co... | Any specific types that you include in your service interface and any types that they reference will be automatically whitelisted, as long as they implement java.io.Serializable, eg: public String getStringForDates(ArrayList dates); Will result in ArrayList and Date both being included on the whitelist. It gets trickie... | How do I add a type to GWT's Serialization Policy whitelist? GWT's serializer has limited java.io.Serializable support, but for security reasons there is a whitelist of types it supports. The documentation I've found, for example this FAQ entry says that any types you want to serialize "must be included in the serializ... | TITLE:
How do I add a type to GWT's Serialization Policy whitelist?
QUESTION:
GWT's serializer has limited java.io.Serializable support, but for security reasons there is a whitelist of types it supports. The documentation I've found, for example this FAQ entry says that any types you want to serialize "must be includ... | [
"java",
"serialization",
"gwt",
"whitelist"
] | 35 | 11 | 33,138 | 9 | 0 | 2008-09-26T07:07:51.273000 | 2008-09-28T00:50:16.177000 |
138,105 | 138,199 | Delphi Pop Up menu visibility | Is there a way in Delphi 7 to find out if a pop-up menu is visible (shown on the screen) or not, since it lacks a Visible property. | You could make your own flag by setting it in the OnPopup event. The problem is knowing when the popupmenu is closed. Peter Below has a solution for that. But my I ask why you would want this? Maybe there is a better way to solve the underlying problem. | Delphi Pop Up menu visibility Is there a way in Delphi 7 to find out if a pop-up menu is visible (shown on the screen) or not, since it lacks a Visible property. | TITLE:
Delphi Pop Up menu visibility
QUESTION:
Is there a way in Delphi 7 to find out if a pop-up menu is visible (shown on the screen) or not, since it lacks a Visible property.
ANSWER:
You could make your own flag by setting it in the OnPopup event. The problem is knowing when the popupmenu is closed. Peter Below h... | [
"delphi",
"popupmenu"
] | 4 | 4 | 8,655 | 2 | 0 | 2008-09-26T07:09:54.107000 | 2008-09-26T07:48:37.273000 |
138,115 | 138,148 | Change order of images in icon file | Is there an app that can change the order of images inside an icon? Thanks! | What you'll need to do that is a resource editor. A google search will reveal many free ones out there. The restorator is a great one, but not free and over-priced IMO. Any decent resource editor will allow you to see icons in the exe or dll and save them or replace them. I don't know of any that will allow you to reor... | Change order of images in icon file Is there an app that can change the order of images inside an icon? Thanks! | TITLE:
Change order of images in icon file
QUESTION:
Is there an app that can change the order of images inside an icon? Thanks!
ANSWER:
What you'll need to do that is a resource editor. A google search will reveal many free ones out there. The restorator is a great one, but not free and over-priced IMO. Any decent r... | [
"windows-xp",
"icons"
] | 0 | 2 | 1,303 | 4 | 0 | 2008-09-26T07:14:12.927000 | 2008-09-26T07:28:59.973000 |
138,117 | 138,134 | how to send rich text message in system.net.mail | how to send rich text message in system.net.mail need code for send a mail as html | //create the mail message MailMessage mail = new MailMessage();
//set the addresses mail.From = new MailAddress("me@mycompany.com"); mail.To.Add("you@yourcompany.com");
//set the content mail.Subject = "This is an email"; mail.Body = " This is bold This is blue "; mail.IsBodyHtml = true;
//send the message SmtpClien... | how to send rich text message in system.net.mail how to send rich text message in system.net.mail need code for send a mail as html | TITLE:
how to send rich text message in system.net.mail
QUESTION:
how to send rich text message in system.net.mail need code for send a mail as html
ANSWER:
//create the mail message MailMessage mail = new MailMessage();
//set the addresses mail.From = new MailAddress("me@mycompany.com"); mail.To.Add("you@yourcompan... | [
".net"
] | 0 | 1 | 3,091 | 3 | 0 | 2008-09-26T07:14:21.413000 | 2008-09-26T07:23:39.410000 |
138,122 | 138,143 | How to create a very big bitmap in C++/MFC / GDI | I'd like to be able to create a large (say 20,000 x 20,000) pixel bitmap in a C++ MFC application, using a CDC derived class to write to the bitmap. I've tried using memory DCs as described in the MSDN docs, but these appear to be restricted to sizes compatible with the current display driver. I'm currently using a bit... | CDC and CBitmap appears to only support device dependant bitmaps, you might have more luck creating your bitmap with::CreateDIBSection, then attaching a CBitmap to that. The raw GDI interfaces are a little hoary, unfortunately. You probably won't have much luck with 20,000 x 20,000 at 32 BPP, at least in a 32-bit appli... | How to create a very big bitmap in C++/MFC / GDI I'd like to be able to create a large (say 20,000 x 20,000) pixel bitmap in a C++ MFC application, using a CDC derived class to write to the bitmap. I've tried using memory DCs as described in the MSDN docs, but these appear to be restricted to sizes compatible with the ... | TITLE:
How to create a very big bitmap in C++/MFC / GDI
QUESTION:
I'd like to be able to create a large (say 20,000 x 20,000) pixel bitmap in a C++ MFC application, using a CDC derived class to write to the bitmap. I've tried using memory DCs as described in the MSDN docs, but these appear to be restricted to sizes co... | [
"c++",
"mfc",
"bitmap",
"gdi",
"cdc"
] | 1 | 2 | 6,042 | 5 | 0 | 2008-09-26T07:16:55.477000 | 2008-09-26T07:27:46.467000 |
138,124 | 138,150 | When does the Community believe that it is appropriate to use a Singleton? | Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's excellent earlier question about the Singleton pattern, I thought I would ask "when does the Community believe that it is appropriate to use a Singleton?" Let me offer up an example to critique: I have an "IconManager" singleton. I... | Your IconManager implements the factory pattern, it builds icons. And you probably only need one factory to build icons. So no problems for this case to use a singleton IMHO. I've built software with several of these centralized factories and everything worked out fine. See also this thread: Most common examples of mis... | When does the Community believe that it is appropriate to use a Singleton? Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's excellent earlier question about the Singleton pattern, I thought I would ask "when does the Community believe that it is appropriate to use a Singleton?" L... | TITLE:
When does the Community believe that it is appropriate to use a Singleton?
QUESTION:
Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's excellent earlier question about the Singleton pattern, I thought I would ask "when does the Community believe that it is appropriate to u... | [
"design-patterns",
"singleton"
] | 0 | 1 | 468 | 4 | 0 | 2008-09-26T07:20:02.820000 | 2008-09-26T07:29:31.173000 |
138,133 | 1,438,327 | Is there a standard framework for .NET parameter validation that uses attributes? | Is there a standard framework (maybe part of Enterprise Library... or.NET itself) that allows you to do common parameter validation in method attributes? | Microsoft Code Contracts, which are part of.NET Framework since 4.0 CTP and are available for earlier.NET Framework versions as a stand-alone package, allow to specify coding assumptions. This includes specifying pre-conditions which can verify parameters. An example use for parameter checking would be (copied from Cod... | Is there a standard framework for .NET parameter validation that uses attributes? Is there a standard framework (maybe part of Enterprise Library... or.NET itself) that allows you to do common parameter validation in method attributes? | TITLE:
Is there a standard framework for .NET parameter validation that uses attributes?
QUESTION:
Is there a standard framework (maybe part of Enterprise Library... or.NET itself) that allows you to do common parameter validation in method attributes?
ANSWER:
Microsoft Code Contracts, which are part of.NET Framework... | [
"c#",
".net",
"validation",
"attributes",
"parameters"
] | 8 | 4 | 5,060 | 6 | 0 | 2008-09-26T07:23:39.330000 | 2009-09-17T11:39:57.093000 |
138,142 | 138,210 | BUILTIN\Administrators removed - how to undo it | SQL Server 2000 Standard, Windows 2003 My coworker removed 'BUILTIN\Administrators' group from SQL Server which results in 'SQL Server Agent' not working. All my TSQLs to synchronize databases stopped working. I have Administrator rights on the server and my database user is in sysadmin role. Does any one have idea how... | You don't want to re-add 'BUILTIN\Administrators' as it is a SQL Server 2000 security flaw. All domain administrators will have full sysadmin rights to your SQL Server to drop databases etc. Find the account that is running SQL Agent (Right click SQL Server agent in enterprise manager and select properties). Then add t... | BUILTIN\Administrators removed - how to undo it SQL Server 2000 Standard, Windows 2003 My coworker removed 'BUILTIN\Administrators' group from SQL Server which results in 'SQL Server Agent' not working. All my TSQLs to synchronize databases stopped working. I have Administrator rights on the server and my database user... | TITLE:
BUILTIN\Administrators removed - how to undo it
QUESTION:
SQL Server 2000 Standard, Windows 2003 My coworker removed 'BUILTIN\Administrators' group from SQL Server which results in 'SQL Server Agent' not working. All my TSQLs to synchronize databases stopped working. I have Administrator rights on the server an... | [
"sql-server",
"t-sql"
] | 3 | 3 | 12,912 | 3 | 0 | 2008-09-26T07:27:28.200000 | 2008-09-26T07:53:26.687000 |
138,153 | 3,761,803 | Is ncurses available for windows? | Are there any ncurses libraries in C/C++ for Windows that emulate ncurses in native resizable Win32 windows ( not in console mode)? | There's an ongoing effort for a PDCurses port: http://www.mail-archive.com/pdcurses-l@lightlink.com/msg00129.html http://www.projectpluto.com/win32a.htm | Is ncurses available for windows? Are there any ncurses libraries in C/C++ for Windows that emulate ncurses in native resizable Win32 windows ( not in console mode)? | TITLE:
Is ncurses available for windows?
QUESTION:
Are there any ncurses libraries in C/C++ for Windows that emulate ncurses in native resizable Win32 windows ( not in console mode)?
ANSWER:
There's an ongoing effort for a PDCurses port: http://www.mail-archive.com/pdcurses-l@lightlink.com/msg00129.html http://www.pr... | [
"c++",
"c",
"ncurses"
] | 73 | 39 | 133,399 | 2 | 0 | 2008-09-26T07:30:33.090000 | 2010-09-21T15:25:45.047000 |
138,157 | 138,206 | Java - Console-like web applet | Hey, I've been developing an application in the windows console with Java, and want to put it online in all of its console-graphics-glory. Is there a simple web applet API I can use to port my app over? I'm just using basic System.out and System.in functionality, but I'm happy to rebuild my I/O wrappers. I think someth... | Sure, just make into an applet, put a small swing UI on it with a JFrame with two components - one for writing output to, and one for entering inputs from. Embed the applet in the page. | Java - Console-like web applet Hey, I've been developing an application in the windows console with Java, and want to put it online in all of its console-graphics-glory. Is there a simple web applet API I can use to port my app over? I'm just using basic System.out and System.in functionality, but I'm happy to rebuild ... | TITLE:
Java - Console-like web applet
QUESTION:
Hey, I've been developing an application in the windows console with Java, and want to put it online in all of its console-graphics-glory. Is there a simple web applet API I can use to port my app over? I'm just using basic System.out and System.in functionality, but I'm... | [
"java",
"api",
"console",
"applet"
] | 5 | 4 | 6,064 | 5 | 0 | 2008-09-26T07:33:29.073000 | 2008-09-26T07:52:10.993000 |
138,159 | 138,166 | PHP alias @ function | I'm new to PHP and I'm confused seeing some examples calling a function with a @ prefix like @mysql_ping(). What is it for? Googling / searching is not much of a help since @ gets discarded and 'alias' is not good enough keyword. | @ suppresses errors, warnings and notices. You can use it for good purpose if you complement it with a custom error handler or with due check of $php_errormsg variable so you can handle errors properly. In my experience, this proper usage is not seen very much and is instead used a lot in the bad way, just to hide erro... | PHP alias @ function I'm new to PHP and I'm confused seeing some examples calling a function with a @ prefix like @mysql_ping(). What is it for? Googling / searching is not much of a help since @ gets discarded and 'alias' is not good enough keyword. | TITLE:
PHP alias @ function
QUESTION:
I'm new to PHP and I'm confused seeing some examples calling a function with a @ prefix like @mysql_ping(). What is it for? Googling / searching is not much of a help since @ gets discarded and 'alias' is not good enough keyword.
ANSWER:
@ suppresses errors, warnings and notices.... | [
"php",
"operators",
"error-suppression"
] | 5 | 15 | 3,276 | 7 | 0 | 2008-09-26T07:33:53.533000 | 2008-09-26T07:36:29.083000 |
138,174 | 138,537 | How would you go about auto-detecting Textile versus Markdown? | I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / develop both a JavaScript and a PHP solution so I can provide live previews as we... | Consider that users might only use one specific syntax element in a posting, so you'd have to check for everything. Looking for "h1." obviously only works if the user uses exactly that element. It's pretty easy with things like headers, but consider that markdown formats *this* as this and Textile will convert that to ... | How would you go about auto-detecting Textile versus Markdown? I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / develop both a Jav... | TITLE:
How would you go about auto-detecting Textile versus Markdown?
QUESTION:
I'm considering supporting both Textile and Markdown on a current project. I would prefer not forcing users to choose one or the other. Is there a way to auto-detect which the user is using? How would you go about this? I'd like to find / ... | [
"php",
"javascript",
"markdown",
"textile"
] | 4 | 7 | 615 | 3 | 0 | 2008-09-26T07:38:43.680000 | 2008-09-26T09:55:54.427000 |
138,175 | 139,773 | DotNetNuke vulnerabilities | Anyone familiar with specific security issues in the current version of DotNetNuke? (I've already checked out their site, securityfocus, etc...) I've reopened the question, since my client developed their system using DotNetNuke - hence it is a programming question. I just need to know some issues regarding this platfo... | DNN Vulnerability information will be at: http://www.dotnetnuke.com/News/SecurityPolicy/tabid/940/Default.aspx | DotNetNuke vulnerabilities Anyone familiar with specific security issues in the current version of DotNetNuke? (I've already checked out their site, securityfocus, etc...) I've reopened the question, since my client developed their system using DotNetNuke - hence it is a programming question. I just need to know some i... | TITLE:
DotNetNuke vulnerabilities
QUESTION:
Anyone familiar with specific security issues in the current version of DotNetNuke? (I've already checked out their site, securityfocus, etc...) I've reopened the question, since my client developed their system using DotNetNuke - hence it is a programming question. I just n... | [
"security",
"dotnetnuke"
] | 8 | 10 | 3,849 | 3 | 0 | 2008-09-26T07:38:49.590000 | 2008-09-26T14:12:56.747000 |
138,177 | 138,197 | Moving from ints to GUIDs as primary keys | I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it? Thank you! Addition I do understand the process in general, so I need more detailed advices, for example, how to fill new GUID column. Using default value newid(... | Create a new column for the guid value in the master table. Use the uniqueidentifier data type, make it not null with a newid() default so all existing rows will be populated. Create new uniqueidentifier columns in the child tables. Run update statements to build the guild relationships using the exisitng int relations... | Moving from ints to GUIDs as primary keys I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it? Thank you! Addition I do understand the process in general, so I need more detailed advices, for example, how to fill n... | TITLE:
Moving from ints to GUIDs as primary keys
QUESTION:
I use several referenced tables with integer primary keys. Now I want to change ints to GUIDs leaving all references intact. What is the easiest way to do it? Thank you! Addition I do understand the process in general, so I need more detailed advices, for exam... | [
"sql",
"sql-server",
"foreign-keys",
"primary-key",
"guid"
] | 9 | 13 | 4,317 | 7 | 0 | 2008-09-26T07:40:27.043000 | 2008-09-26T07:48:08.883000 |
138,178 | 138,208 | In Visual Studio, when would I want to use the Test View? | For managing unit tests in Visual Studio, I use the Test List Editor. There's also a Test View which looks similar but more limited. When would I want to use the Test View as opposed to the Test List Editor or any of the other test windows? | For me the test view is a nice compact list that fits better on screen(if i need it on screen at all) as i use a seperate portrait monitor for most of the vs tool windows. | In Visual Studio, when would I want to use the Test View? For managing unit tests in Visual Studio, I use the Test List Editor. There's also a Test View which looks similar but more limited. When would I want to use the Test View as opposed to the Test List Editor or any of the other test windows? | TITLE:
In Visual Studio, when would I want to use the Test View?
QUESTION:
For managing unit tests in Visual Studio, I use the Test List Editor. There's also a Test View which looks similar but more limited. When would I want to use the Test View as opposed to the Test List Editor or any of the other test windows?
AN... | [
"visual-studio",
"unit-testing",
"visual-studio-2008",
"visual-studio-2005"
] | 0 | 0 | 403 | 1 | 0 | 2008-09-26T07:41:34.030000 | 2008-09-26T07:53:03.503000 |
138,203 | 138,339 | How to generate a PDF from an embedded report definition without server or UI? | Is it possible for a stand alone executable to generate a report and output it as PDF (or one of the other export options available from the report viewer) without displaying the ReportViewer control? The report definition should be embedded in the executable and should not use the Reporting Services web service. | Actually you don't need a ReportViewer at all, you can directly instantiate and use a LocalReport: LocalReport report = new LocalReport(); report.ReportPath = "templatepath"; // or use file from resource with report.ReportEmbeddedResource
// add parameters, datasource, etc.
Warning[] warnings; string[] streamids; str... | How to generate a PDF from an embedded report definition without server or UI? Is it possible for a stand alone executable to generate a report and output it as PDF (or one of the other export options available from the report viewer) without displaying the ReportViewer control? The report definition should be embedded... | TITLE:
How to generate a PDF from an embedded report definition without server or UI?
QUESTION:
Is it possible for a stand alone executable to generate a report and output it as PDF (or one of the other export options available from the report viewer) without displaying the ReportViewer control? The report definition ... | [
"reporting-services"
] | 5 | 7 | 5,065 | 3 | 0 | 2008-09-26T07:50:36.507000 | 2008-09-26T08:48:19.410000 |
138,211 | 138,307 | Squid Programming | Does anybody know a good tutorial about Squid plug-in development? | There is one in the squid documentation. IIRC it's fairly straightforward - squid forks a process and passes data down a pipe to the process. A somewhat out-of-date but still relevant programmer's guide can be found Here. | Squid Programming Does anybody know a good tutorial about Squid plug-in development? | TITLE:
Squid Programming
QUESTION:
Does anybody know a good tutorial about Squid plug-in development?
ANSWER:
There is one in the squid documentation. IIRC it's fairly straightforward - squid forks a process and passes data down a pipe to the process. A somewhat out-of-date but still relevant programmer's guide can b... | [
"squid"
] | 3 | 3 | 2,496 | 4 | 0 | 2008-09-26T07:54:06.717000 | 2008-09-26T08:31:25.220000 |
138,250 | 138,260 | How to read the RGB value of a given pixel in Python? | If I open an image with open("image.jpg"), how can I get the RGB values of a pixel assuming I have the coordinates of the pixel? Then, how can I do the reverse of this? Starting with a blank graphic, 'write' a pixel with a certain RGB value? I would prefer if I didn't have to download any additional libraries. | It's probably best to use the Python Image Library to do this which I'm afraid is a separate download. The easiest way to do what you want is via the load() method on the Image object which returns a pixel access object which you can manipulate like an array: from PIL import Image
im = Image.open('dead_parrot.jpg') # ... | How to read the RGB value of a given pixel in Python? If I open an image with open("image.jpg"), how can I get the RGB values of a pixel assuming I have the coordinates of the pixel? Then, how can I do the reverse of this? Starting with a blank graphic, 'write' a pixel with a certain RGB value? I would prefer if I didn... | TITLE:
How to read the RGB value of a given pixel in Python?
QUESTION:
If I open an image with open("image.jpg"), how can I get the RGB values of a pixel assuming I have the coordinates of the pixel? Then, how can I do the reverse of this? Starting with a blank graphic, 'write' a pixel with a certain RGB value? I woul... | [
"python",
"graphics",
"rgb",
"pixel"
] | 191 | 254 | 483,435 | 13 | 0 | 2008-09-26T08:10:50.857000 | 2008-09-26T08:15:56.583000 |
138,255 | 138,341 | How would I go about taking a snapshot of a process to preserve its state for future investigation? Is this possible? | Whether this is possible I don't know, but it would mighty useful! I have a process that fails periodically (running in Windows 2000). I then have just one chance to react to it before having to restart it and painfully wait for it to fail again. I didn't write the process so don't have the source to debug. The failure... | I think minidump is what you are looking for. You can also used Userdump: The User Mode Process Dumper (userdump) dumps any running Win32 processes memory image (including system processes such as csrss.exe, winlogon.exe, services.exe, etc) on the fly, without attaching a debugger, or terminating target processes. Gene... | How would I go about taking a snapshot of a process to preserve its state for future investigation? Is this possible? Whether this is possible I don't know, but it would mighty useful! I have a process that fails periodically (running in Windows 2000). I then have just one chance to react to it before having to restart... | TITLE:
How would I go about taking a snapshot of a process to preserve its state for future investigation? Is this possible?
QUESTION:
Whether this is possible I don't know, but it would mighty useful! I have a process that fails periodically (running in Windows 2000). I then have just one chance to react to it before... | [
"process",
"state",
"snapshot"
] | 1 | 2 | 2,987 | 2 | 0 | 2008-09-26T08:14:46.040000 | 2008-09-26T08:49:21.450000 |
138,261 | 138,792 | Select Query in SQL + All the values in columns | I am having a table Table1 with columns id1, id2, id3 all the columns are nullable I may enter null or value to all columns in rows. My question is I need to select the rows whose all the column values should not be null. Thanks There are totally around 300 columns in the table. I can't do the is null property for all ... | You need to do this: SELECT * FROM yourtable WHERE column1 IS NOT NULL AND column2 IS NOT NULL AND column3 IS NOT NULL AND.... | Select Query in SQL + All the values in columns I am having a table Table1 with columns id1, id2, id3 all the columns are nullable I may enter null or value to all columns in rows. My question is I need to select the rows whose all the column values should not be null. Thanks There are totally around 300 columns in the... | TITLE:
Select Query in SQL + All the values in columns
QUESTION:
I am having a table Table1 with columns id1, id2, id3 all the columns are nullable I may enter null or value to all columns in rows. My question is I need to select the rows whose all the column values should not be null. Thanks There are totally around ... | [
"asp.net",
"sql-server"
] | 4 | 2 | 5,727 | 9 | 0 | 2008-09-26T08:16:31.700000 | 2008-09-26T11:12:06.083000 |
138,273 | 138,285 | What are hashtables and hashmaps and their typical use cases? | I have recently run across these terms few times but I am quite confused how they work and when they are usualy implemented? | Well, think of it this way. If you use an array, a simple index-based data structure, and fill it up with random stuff, finding a particular entry gets to be a more and more expensive operation as you fill it with data, since you basically have to start searching from one end toward the other, until you find the one yo... | What are hashtables and hashmaps and their typical use cases? I have recently run across these terms few times but I am quite confused how they work and when they are usualy implemented? | TITLE:
What are hashtables and hashmaps and their typical use cases?
QUESTION:
I have recently run across these terms few times but I am quite confused how they work and when they are usualy implemented?
ANSWER:
Well, think of it this way. If you use an array, a simple index-based data structure, and fill it up with ... | [
"language-agnostic",
"hashtable",
"hashmap"
] | 42 | 76 | 37,816 | 4 | 0 | 2008-09-26T08:19:32.583000 | 2008-09-26T08:25:12.100000 |
138,279 | 138,283 | Is the hash of a GUID unique? | I create a GUID (as a string) and get the hash of it. Can I consider this hash to be unique? | Not as reliably unique as the GUID itself, no. Just to expand, you are reducing your uniqueness by a factor of 4, going from 16 bytes to 4 bytes of possible combinations. As pointed out in the comments the hash size will make a difference. The 4 byte thing was an assumption, horrible at best I know, that it may be used... | Is the hash of a GUID unique? I create a GUID (as a string) and get the hash of it. Can I consider this hash to be unique? | TITLE:
Is the hash of a GUID unique?
QUESTION:
I create a GUID (as a string) and get the hash of it. Can I consider this hash to be unique?
ANSWER:
Not as reliably unique as the GUID itself, no. Just to expand, you are reducing your uniqueness by a factor of 4, going from 16 bytes to 4 bytes of possible combinations.... | [
"hash",
"guid",
"unique"
] | 26 | 22 | 31,258 | 7 | 0 | 2008-09-26T08:22:50.843000 | 2008-09-26T08:24:28.390000 |
138,280 | 138,282 | How can I improve CVS performance in a multi-site scenario? | I am currently working in a project with developers working on three sites. One of the sites is in Delhi, India while the other two are in Europe. The communication between the European offices and the office in Delhi has poor bandwidth and quite bad latency, and a CVS update from there often takes 5-10 minutes even th... | Why isn't switching an option? I would highly recommend to switch to SVN or git instead. And that you do this conversion as soon as possible... like today:) There are even svn tools/guides and git tools/guides out there that will do this CVS conversion for you. I personally use and love SVN for my work, but based on yo... | How can I improve CVS performance in a multi-site scenario? I am currently working in a project with developers working on three sites. One of the sites is in Delhi, India while the other two are in Europe. The communication between the European offices and the office in Delhi has poor bandwidth and quite bad latency, ... | TITLE:
How can I improve CVS performance in a multi-site scenario?
QUESTION:
I am currently working in a project with developers working on three sites. One of the sites is in Delhi, India while the other two are in Europe. The communication between the European offices and the office in Delhi has poor bandwidth and q... | [
"performance",
"cvs"
] | 1 | 1 | 863 | 2 | 0 | 2008-09-26T08:23:07.723000 | 2008-09-26T08:23:49.733000 |
138,292 | 141,984 | For your semantic web type application, do you use RDF or a proprietary model for the internal representation? | If you've worked on a project that stores data for use with the semantic web, do you use RDF or even OWL as the internal data format or do you have your own data model/ontology that you map to RDF for interoperability? If you use RDF, what are your experiences with implementing various things like cyclical class hierac... | I work alongside the Jena team at HP (indeed, have contributed to Jena myself), so using Jena is a fairly straightforward choice in our team. However, there are more reasons than just "next-bench" convenience. The various standards for the semantic web contain quite a bit of detail and complexity, and getting that righ... | For your semantic web type application, do you use RDF or a proprietary model for the internal representation? If you've worked on a project that stores data for use with the semantic web, do you use RDF or even OWL as the internal data format or do you have your own data model/ontology that you map to RDF for interope... | TITLE:
For your semantic web type application, do you use RDF or a proprietary model for the internal representation?
QUESTION:
If you've worked on a project that stores data for use with the semantic web, do you use RDF or even OWL as the internal data format or do you have your own data model/ontology that you map t... | [
"rdf",
"semantic-web"
] | 4 | 3 | 647 | 2 | 0 | 2008-09-26T08:27:22.737000 | 2008-09-26T21:09:08.493000 |
138,308 | 138,365 | Config Files for Biztalk Host Processes | A single Biztalk Server can have multiple Host processes. Is it possible to create an application config file for each host process? For example I would like to use Unity or log4net or whatever which needs such a configuration file. Edit: Thanks at David Hall. To elaborate a bit more: We have 12 Biztalk Servers in a gr... | If I interpret your question correctly, you want to be able to have a separate version of the BTSNTSvs.exe.config file for each host instance? So as well as the BizTalkServerApplication host instance, you have YourHostInstance host instances that you want to have a separate config for? I don't 100% know that you cannot... | Config Files for Biztalk Host Processes A single Biztalk Server can have multiple Host processes. Is it possible to create an application config file for each host process? For example I would like to use Unity or log4net or whatever which needs such a configuration file. Edit: Thanks at David Hall. To elaborate a bit ... | TITLE:
Config Files for Biztalk Host Processes
QUESTION:
A single Biztalk Server can have multiple Host processes. Is it possible to create an application config file for each host process? For example I would like to use Unity or log4net or whatever which needs such a configuration file. Edit: Thanks at David Hall. T... | [
"biztalk",
"configuration-files"
] | 3 | 4 | 1,266 | 1 | 0 | 2008-09-26T08:31:49.120000 | 2008-09-26T08:58:50.990000 |
138,309 | 138,358 | Is it possible to manipulate an SVG document embedded in an HTML doc with JavaScript? | I have made a SVG image, or more like mini application, for viewing graphs of data. I want to include this in a HTML page, and call methods on the SVG image. Example: Is it at all possible to call methods on the SVG document? If so, how do I declare the methods to expose in the SVG file, and how do I call them from the... | Solution: in svg: in html (using prototype to add event listeners): | Is it possible to manipulate an SVG document embedded in an HTML doc with JavaScript? I have made a SVG image, or more like mini application, for viewing graphs of data. I want to include this in a HTML page, and call methods on the SVG image. Example: Is it at all possible to call methods on the SVG document? If so, h... | TITLE:
Is it possible to manipulate an SVG document embedded in an HTML doc with JavaScript?
QUESTION:
I have made a SVG image, or more like mini application, for viewing graphs of data. I want to include this in a HTML page, and call methods on the SVG image. Example: Is it at all possible to call methods on the SVG ... | [
"javascript",
"html",
"svg"
] | 22 | 13 | 15,949 | 7 | 0 | 2008-09-26T08:32:03.240000 | 2008-09-26T08:55:58.297000 |
138,311 | 138,372 | How do I turn off CSRF protection in a rails app? | The CSRF prevention built in to Rails is causing some problems for some automated load testing we are doing, and I want to turn it off for the duration of the process. How do I do this? | I love simple questions with clear answers. #I go in application.rb self.allow_forgery_protection = false If you want to do this for testing only you can move that into one of the environment files (obviously, you'll be touching Application then rather than self ). You could also write something like: #I still go in ap... | How do I turn off CSRF protection in a rails app? The CSRF prevention built in to Rails is causing some problems for some automated load testing we are doing, and I want to turn it off for the duration of the process. How do I do this? | TITLE:
How do I turn off CSRF protection in a rails app?
QUESTION:
The CSRF prevention built in to Rails is causing some problems for some automated load testing we are doing, and I want to turn it off for the duration of the process. How do I do this?
ANSWER:
I love simple questions with clear answers. #I go in appl... | [
"ruby-on-rails",
"security",
"csrf"
] | 21 | 30 | 8,686 | 2 | 0 | 2008-09-26T08:32:50.973000 | 2008-09-26T09:01:03.637000 |
138,313 | 143,455 | How to extract img src, title and alt from html using php? | I would like to create a page where all images which reside on my website are listed with title and alternative representation. I already wrote me a little program to find and load all HTML files, but now I am stuck at how to extract src, title and alt from this HTML: src ="/image/fluffybunny.jpg" title ="Harvey the bu... | EDIT: now that I know better Using regexp to solve this kind of problem is a bad idea and will likely lead in unmaintainable and unreliable code. Better use an HTML parser. Solution With regexp In that case it's better to split the process into two parts: get all the img tag extract their metadata I will assume your do... | How to extract img src, title and alt from html using php? I would like to create a page where all images which reside on my website are listed with title and alternative representation. I already wrote me a little program to find and load all HTML files, but now I am stuck at how to extract src, title and alt from thi... | TITLE:
How to extract img src, title and alt from html using php?
QUESTION:
I would like to create a page where all images which reside on my website are listed with title and alternative representation. I already wrote me a little program to find and load all HTML files, but now I am stuck at how to extract src, titl... | [
"php",
"html",
"regex",
"html-parsing",
"html-content-extraction"
] | 165 | 217 | 342,461 | 10 | 0 | 2008-09-26T08:33:05.950000 | 2008-09-27T11:33:36.887000 |
138,318 | 138,329 | linux to compile multiple java file | here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a file person.java (it is the Same file, just a one line modification. now, on my shell, im on my /user/ directory and i try to do javac */person.java the shell returns the following error, person.java:14: duplicate class: person Is th... | I think the problem here might be, that javac tries to compile everything in one go, which naturally results in duplicated class definitions. A simple way to resolve this would be find. -name '*.java' -exec javac {} \; Edit: Or to be more precise find. -name 'person.java' -maxdepth 2 -exec javac {} \; | linux to compile multiple java file here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a file person.java (it is the Same file, just a one line modification. now, on my shell, im on my /user/ directory and i try to do javac */person.java the shell returns the following error, person.ja... | TITLE:
linux to compile multiple java file
QUESTION:
here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a file person.java (it is the Same file, just a one line modification. now, on my shell, im on my /user/ directory and i try to do javac */person.java the shell returns the followin... | [
"linux",
"shell",
"javac"
] | 1 | 8 | 2,523 | 2 | 0 | 2008-09-26T08:34:33.840000 | 2008-09-26T08:42:04.587000 |
138,321 | 144,310 | How can I use ClearCase to "add to source control ..." recursively? | I unpacked a zip-file delivery into a clearcase view. Now I want to add the complete file tree to the repository. The GUI only provides an "Add to source control..." for individual files/directories. Do you know how to recursively add the whole tree? (I'm on a Windows system, but have Cygwin installed.) | I would rather go with the clearfsimport script, better equipped to import multiple times the same set of files, and automatically: add new files, make new version of existing files previously imported (but modified in the source set of files re-imported) remove files already imported but no longer present in the sourc... | How can I use ClearCase to "add to source control ..." recursively? I unpacked a zip-file delivery into a clearcase view. Now I want to add the complete file tree to the repository. The GUI only provides an "Add to source control..." for individual files/directories. Do you know how to recursively add the whole tree? (... | TITLE:
How can I use ClearCase to "add to source control ..." recursively?
QUESTION:
I unpacked a zip-file delivery into a clearcase view. Now I want to add the complete file tree to the repository. The GUI only provides an "Add to source control..." for individual files/directories. Do you know how to recursively add... | [
"version-control",
"clearcase"
] | 47 | 64 | 76,322 | 10 | 0 | 2008-09-26T08:35:41.937000 | 2008-09-27T19:41:03.940000 |
138,331 | 864,439 | Any decent text diff/merge engine for .NET? | Requirements: free, preferably open-source implemented in one of the.NET managed langs Google found these: A Generic, Reusable Diff Algorithm on codeproject An O(ND) Difference Algorithm for C# Diff/Merge/Patch Library for C#/.NET by Joshua Tauberer EDIT: No apps please, only libraries. | You can grab the COM component that uses Google's Diff/Patch/Match. It works from.NET. Update, 2010 Oct 17: The Google Diff/Patch/Merge code has been ported to C#. The COM component still works, but if you're coming from.NET, you'll wanna use the.NET port directly. | Any decent text diff/merge engine for .NET? Requirements: free, preferably open-source implemented in one of the.NET managed langs Google found these: A Generic, Reusable Diff Algorithm on codeproject An O(ND) Difference Algorithm for C# Diff/Merge/Patch Library for C#/.NET by Joshua Tauberer EDIT: No apps please, only... | TITLE:
Any decent text diff/merge engine for .NET?
QUESTION:
Requirements: free, preferably open-source implemented in one of the.NET managed langs Google found these: A Generic, Reusable Diff Algorithm on codeproject An O(ND) Difference Algorithm for C# Diff/Merge/Patch Library for C#/.NET by Joshua Tauberer EDIT: No... | [
".net",
"merge",
"diff"
] | 116 | 93 | 61,152 | 4 | 0 | 2008-09-26T08:42:34.650000 | 2009-05-14T16:42:58.053000 |
138,334 | 138,832 | Starting to learn Windbg | After being troubled by an issue that I simply did not have the knowledge to debug, I've just decided that I have to learn how to use Windbg. My only problem: I have no clue where to start:-( I'm not really a WinApi-Guy, having use languages that abstract the Windows Api away from me usually. So I just wonder: What is ... | For a book, try Advanced Windows Debugging (Addison-Wesley Microsoft Technology Series) (source: knowfree.net ) Also, for a great reference sheet, see Common WinDbg Commands (Thematically Grouped) by Robert Kuster. | Starting to learn Windbg After being troubled by an issue that I simply did not have the knowledge to debug, I've just decided that I have to learn how to use Windbg. My only problem: I have no clue where to start:-( I'm not really a WinApi-Guy, having use languages that abstract the Windows Api away from me usually. S... | TITLE:
Starting to learn Windbg
QUESTION:
After being troubled by an issue that I simply did not have the knowledge to debug, I've just decided that I have to learn how to use Windbg. My only problem: I have no clue where to start:-( I'm not really a WinApi-Guy, having use languages that abstract the Windows Api away ... | [
"debugging",
"windbg"
] | 50 | 26 | 10,750 | 6 | 0 | 2008-09-26T08:45:15.843000 | 2008-09-26T11:17:50.407000 |
138,348 | 138,360 | Playground Projects | When I am unsure about some thing for a project, I usually use a small separate project and make it my playground for things need to be tested. How do you do that? | This depends on what I want to try out. For simple algorithmic stuff, I have a console application that consists of many classes, one for every thing I want to try out. This way I have everything inside a single project and can browse through the ideas and approaches I've tried out during the years. I use folders for n... | Playground Projects When I am unsure about some thing for a project, I usually use a small separate project and make it my playground for things need to be tested. How do you do that? | TITLE:
Playground Projects
QUESTION:
When I am unsure about some thing for a project, I usually use a small separate project and make it my playground for things need to be tested. How do you do that?
ANSWER:
This depends on what I want to try out. For simple algorithmic stuff, I have a console application that consi... | [
"testing"
] | 0 | 1 | 264 | 5 | 0 | 2008-09-26T08:52:32.707000 | 2008-09-26T08:57:42.133000 |
138,353 | 139,009 | Dynamic radio button creation | In wxPython, if I create a list of radio buttons and place the list initially, is it possible to change the contents in that list later? For example, I have a panel that uses a boxSizer to place the widgets initially. One of those widgets is a list of radio buttons (I have also tried a normal radiobox). I would like to... | To make new list elements appear in correct places, you have to re-layout the grid after adding new elements to it. For example, to add a few new items, you could call: def addNewSkills(self, newSkillList): '''newSkillList is a list of skill names you want to add''' for skillName in newSkillList: newRadioButton = wx.Ra... | Dynamic radio button creation In wxPython, if I create a list of radio buttons and place the list initially, is it possible to change the contents in that list later? For example, I have a panel that uses a boxSizer to place the widgets initially. One of those widgets is a list of radio buttons (I have also tried a nor... | TITLE:
Dynamic radio button creation
QUESTION:
In wxPython, if I create a list of radio buttons and place the list initially, is it possible to change the contents in that list later? For example, I have a panel that uses a boxSizer to place the widgets initially. One of those widgets is a list of radio buttons (I hav... | [
"python",
"user-interface",
"layout",
"wxpython"
] | 2 | 1 | 2,320 | 3 | 0 | 2008-09-26T08:54:37.787000 | 2008-09-26T12:06:40.560000 |
138,355 | 138,763 | Calling .NET assembly from Java: JVM crashes | I have a third party.NET Assembly and a large Java application. I need to call mothods provided by the.NET class library from the Java application. The assembly is not COM-enabled. I have searched the net and so far i have the following: C# code (cslib.cs): using System;
namespace CSLib { public class CSClass { public... | OK, the mystery is solved. The JVM crash is caused by unhandled System.IO.FileNotFoundException. The exception is thrown because the.NET assembly is searched in the folder where the calling exe file resides. The mscorlib.dll is in the Global Assembly Cache, so it works. The CPP application exe is in the same folder as ... | Calling .NET assembly from Java: JVM crashes I have a third party.NET Assembly and a large Java application. I need to call mothods provided by the.NET class library from the Java application. The assembly is not COM-enabled. I have searched the net and so far i have the following: C# code (cslib.cs): using System;
na... | TITLE:
Calling .NET assembly from Java: JVM crashes
QUESTION:
I have a third party.NET Assembly and a large Java application. I need to call mothods provided by the.NET class library from the Java application. The assembly is not COM-enabled. I have searched the net and so far i have the following: C# code (cslib.cs):... | [
"c#",
"java",
"integration"
] | 11 | 10 | 15,304 | 4 | 0 | 2008-09-26T08:55:29.390000 | 2008-09-26T11:05:41.357000 |
138,361 | 138,406 | How much faster is C++ than C#? | Or is it now the other way around? From what I've heard there are some areas in which C# proves to be faster than C++, but I've never had the guts to test it by myself. Thought any of you could explain these differences in detail or point me to the right place for information on this. | There is no strict reason why a bytecode based language like C# or Java that has a JIT cannot be as fast as C++ code. However C++ code used to be significantly faster for a long time, and also today still is in many cases. This is mainly due to the more advanced JIT optimizations being complicated to implement, and the... | How much faster is C++ than C#? Or is it now the other way around? From what I've heard there are some areas in which C# proves to be faster than C++, but I've never had the guts to test it by myself. Thought any of you could explain these differences in detail or point me to the right place for information on this. | TITLE:
How much faster is C++ than C#?
QUESTION:
Or is it now the other way around? From what I've heard there are some areas in which C# proves to be faster than C++, but I've never had the guts to test it by myself. Thought any of you could explain these differences in detail or point me to the right place for infor... | [
"c#",
"c++",
"performance",
"benchmarking"
] | 317 | 416 | 236,881 | 29 | 0 | 2008-09-26T08:57:46.937000 | 2008-09-26T09:10:17.873000 |
138,371 | 138,450 | Class structure pattern question. What should I choose? | What are (if any)the implied assumptions or restrictions and the differences of designing like: A) this: class SampleClass1 { IWorker workerA; IWorker workerB;
void setWorkerA(IWorker w); void setWorkerB(IWorker w); WorkResult doWork(); } B) versus this: class SampleClass2 { WorkResult doWork(IWorker workerA, IWorker ... | In option (A) you are creating what is known as a Function Object or Functor, this is a design pattern that is well documented. The two main advantages are: The workers can be set by in one place and then the object used elsewhere The object can retain state between calls Also if you are using a dependency injection fr... | Class structure pattern question. What should I choose? What are (if any)the implied assumptions or restrictions and the differences of designing like: A) this: class SampleClass1 { IWorker workerA; IWorker workerB;
void setWorkerA(IWorker w); void setWorkerB(IWorker w); WorkResult doWork(); } B) versus this: class Sa... | TITLE:
Class structure pattern question. What should I choose?
QUESTION:
What are (if any)the implied assumptions or restrictions and the differences of designing like: A) this: class SampleClass1 { IWorker workerA; IWorker workerB;
void setWorkerA(IWorker w); void setWorkerB(IWorker w); WorkResult doWork(); } B) ver... | [
"class-design"
] | 6 | 5 | 590 | 8 | 0 | 2008-09-26T09:00:45.603000 | 2008-09-26T09:26:48.753000 |
138,374 | 141,026 | How do I close a connection early? | I'm attempting to do an AJAX call (via JQuery) that will initiate a fairly long process. I'd like the script to simply send a response indicating that the process has started, but JQuery won't return the response until the PHP script is done running. I've tried this with a "close" header (below), and also with output b... | The following PHP manual page (incl. user-notes) suggests multiple instructions on how to close the TCP connection to the browser without ending the PHP script: Connection handling Docs Supposedly it requires a bit more than sending a close header. OP then confirms: yup, this did the trick: pointing to user-note #71172... | How do I close a connection early? I'm attempting to do an AJAX call (via JQuery) that will initiate a fairly long process. I'd like the script to simply send a response indicating that the process has started, but JQuery won't return the response until the PHP script is done running. I've tried this with a "close" hea... | TITLE:
How do I close a connection early?
QUESTION:
I'm attempting to do an AJAX call (via JQuery) that will initiate a fairly long process. I'd like the script to simply send a response indicating that the process has started, but JQuery won't return the response until the PHP script is done running. I've tried this ... | [
"php",
"jquery",
"ajax"
] | 112 | 102 | 84,441 | 20 | 0 | 2008-09-26T09:02:00.780000 | 2008-09-26T18:04:33.213000 |
138,379 | 138,473 | SHGetFolderPath() 32 bit vs 64 bit | What happens if I use SHGetFolderPath api call in a 32 bit system with CSIDL_PROGRAM_FILESx86 folder id instead of the CSIDL_PROGRAM_FILES id? Theoretically CSIDL_PROGRAM_FILESx86 should map to C:\program files (x86) in a 64 bit system but what does it map to in a 32 bit system where this path doesn't exist? | The different scenarios are described in this article on MSDN. The interpretation of certain KNOWNFOLDERID values depends on whether the folder is part of a 32-bit or 64-bit application and whether that application is running on a 32-bit or 64-bit operating system. If your application needs to distinguish between, for ... | SHGetFolderPath() 32 bit vs 64 bit What happens if I use SHGetFolderPath api call in a 32 bit system with CSIDL_PROGRAM_FILESx86 folder id instead of the CSIDL_PROGRAM_FILES id? Theoretically CSIDL_PROGRAM_FILESx86 should map to C:\program files (x86) in a 64 bit system but what does it map to in a 32 bit system where ... | TITLE:
SHGetFolderPath() 32 bit vs 64 bit
QUESTION:
What happens if I use SHGetFolderPath api call in a 32 bit system with CSIDL_PROGRAM_FILESx86 folder id instead of the CSIDL_PROGRAM_FILES id? Theoretically CSIDL_PROGRAM_FILESx86 should map to C:\program files (x86) in a 64 bit system but what does it map to in a 32... | [
"winapi",
"shell",
"64-bit",
"path",
"32-bit"
] | 1 | 10 | 10,823 | 2 | 0 | 2008-09-26T09:04:40.400000 | 2008-09-26T09:33:43.857000 |
138,383 | 138,390 | What are the equivalents of colored grep? | Sometimes coloring a logfile or other gives a good overview when looking for stuff and behaviors I just saw that grep have a coloring feature grep -C 99999 --color What other methods are there? | For searching source code, I use ack. It's got a lot of options that make sense for searching code (such as automatically ignoring SCM directories). | What are the equivalents of colored grep? Sometimes coloring a logfile or other gives a good overview when looking for stuff and behaviors I just saw that grep have a coloring feature grep -C 99999 --color What other methods are there? | TITLE:
What are the equivalents of colored grep?
QUESTION:
Sometimes coloring a logfile or other gives a good overview when looking for stuff and behaviors I just saw that grep have a coloring feature grep -C 99999 --color What other methods are there?
ANSWER:
For searching source code, I use ack. It's got a lot of o... | [
"debugging",
"unix",
"logging",
"command-line",
"grep"
] | 11 | 15 | 7,808 | 5 | 0 | 2008-09-26T09:05:24.377000 | 2008-09-26T09:06:52.797000 |
138,392 | 138,434 | Simple toggle function with IE6 | I'm facing a problem with IE6. I took the toggle function from this website but when I apply it to my page I get the error (only in IE6): Could not get the display property. Invalid argument. I can get the display property, but the error is thrown when I want to set to the new value. EDIT: I know that several developer... | Are you trying to set the display-property to "table-row" by any change? That is not supported by IE6. A tip is to set display to an empty string. It makes the browser use the default value for the element. | Simple toggle function with IE6 I'm facing a problem with IE6. I took the toggle function from this website but when I apply it to my page I get the error (only in IE6): Could not get the display property. Invalid argument. I can get the display property, but the error is thrown when I want to set to the new value. EDI... | TITLE:
Simple toggle function with IE6
QUESTION:
I'm facing a problem with IE6. I took the toggle function from this website but when I apply it to my page I get the error (only in IE6): Could not get the display property. Invalid argument. I can get the display property, but the error is thrown when I want to set to ... | [
"css",
"internet-explorer"
] | 3 | 3 | 1,351 | 1 | 0 | 2008-09-26T09:07:08.100000 | 2008-09-26T09:18:09.260000 |
138,393 | 138,404 | Can you run a version 3 .Net binary on a version 2 CLR install? | We're considering writing the next version of out project in using.Net 3, but are wondering if we can take the hit on forcing end users to install the.net framework version 3. | If you want to ensure you are only using.NET 2.0 compatible functionality then you should only use.NET 2.0 assemblies. Then you know your safe and sound. | Can you run a version 3 .Net binary on a version 2 CLR install? We're considering writing the next version of out project in using.Net 3, but are wondering if we can take the hit on forcing end users to install the.net framework version 3. | TITLE:
Can you run a version 3 .Net binary on a version 2 CLR install?
QUESTION:
We're considering writing the next version of out project in using.Net 3, but are wondering if we can take the hit on forcing end users to install the.net framework version 3.
ANSWER:
If you want to ensure you are only using.NET 2.0 comp... | [
".net",
"clr"
] | 0 | 2 | 284 | 3 | 0 | 2008-09-26T09:07:10.580000 | 2008-09-26T09:08:51.263000 |
138,408 | 139,146 | ToolTipping a Drop Down list | I have a drop down list in a GridView. The data inside the drop down list has variable length but the drop down list is of a fixed size. How can a tooltip be displayed over each item without selecting any item from the drop down list? I have googled but come across samples where the tooltip is displayed over a currentl... | I'm going to pressume that this will eventually have to work in IE? If so, it isn't pretty. IE6 doesn't support the "title" attribute on OPTION elements. There is an ugly, but potentially usable workaround listed here on the MSDN Internet Explorer forum threads: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=357... | ToolTipping a Drop Down list I have a drop down list in a GridView. The data inside the drop down list has variable length but the drop down list is of a fixed size. How can a tooltip be displayed over each item without selecting any item from the drop down list? I have googled but come across samples where the tooltip... | TITLE:
ToolTipping a Drop Down list
QUESTION:
I have a drop down list in a GridView. The data inside the drop down list has variable length but the drop down list is of a fixed size. How can a tooltip be displayed over each item without selecting any item from the drop down list? I have googled but come across samples... | [
"asp.net",
"drop-down-menu",
"tooltip"
] | 2 | 0 | 673 | 1 | 0 | 2008-09-26T09:10:39.713000 | 2008-09-26T12:33:35.927000 |
138,411 | 138,461 | Catching a tab close event in web browser? | Is there any way of knowing if the user closes a tab in a web browser? Specifically IE7, but also FireFox and others as well. I would like to be able to handle this situation from our asp code if the current tab containing our web site closes. | Attach an " onbeforeunload " event. It can execute code just before the browser/tab closes. | Catching a tab close event in web browser? Is there any way of knowing if the user closes a tab in a web browser? Specifically IE7, but also FireFox and others as well. I would like to be able to handle this situation from our asp code if the current tab containing our web site closes. | TITLE:
Catching a tab close event in web browser?
QUESTION:
Is there any way of knowing if the user closes a tab in a web browser? Specifically IE7, but also FireFox and others as well. I would like to be able to handle this situation from our asp code if the current tab containing our web site closes.
ANSWER:
Attach... | [
"asp-classic"
] | 4 | 2 | 10,576 | 7 | 0 | 2008-09-26T09:11:07.140000 | 2008-09-26T09:29:18.313000 |
138,412 | 138,492 | How to sort columns in an ASP.NET GridView if using a custom DataSource? | I can't get my GridView to enable a user to sort a column of data when I'm using a custom SqlDataSource. I have a GridView in which the code in the ASP reference to it in the HTML is minimal: In the code-behind I attach a dynamically-created SqlDataSource (the columns it contains are not always the same so the SQL used... | First you need to add an event: Then that event looks like: protected void gvName_Sorting( object sender, GridViewSortEventArgs e ) {... //rebind gridview } You basically have to get your data again. You're right that it looks messy and there is a better way: ASP.Net MVC Unfortunately that's a drastically different pag... | How to sort columns in an ASP.NET GridView if using a custom DataSource? I can't get my GridView to enable a user to sort a column of data when I'm using a custom SqlDataSource. I have a GridView in which the code in the ASP reference to it in the HTML is minimal: In the code-behind I attach a dynamically-created SqlDa... | TITLE:
How to sort columns in an ASP.NET GridView if using a custom DataSource?
QUESTION:
I can't get my GridView to enable a user to sort a column of data when I'm using a custom SqlDataSource. I have a GridView in which the code in the ASP reference to it in the HTML is minimal: In the code-behind I attach a dynamic... | [
"c#",
"asp.net",
"gridview",
"sqldatasource"
] | 5 | 4 | 36,942 | 4 | 0 | 2008-09-26T09:11:39.027000 | 2008-09-26T09:39:15.823000 |
138,419 | 138,439 | SQL Compact select top 1 | While porting an application from SQL 2005 to SQL Server Compact Edition, I found that I need to port this command: SELECT TOP 1 Id FROM tblJob WHERE Holder_Id IS NULL But SQL Server Compact Edition doesn't support the TOP keyword. How can I port this command? | SELECT TOP(1) Id FROM tblJob WHERE Holder_Id IS NULL Need the brackets as far as I know. reference: http://technet.microsoft.com/en-us/library/bb686896.aspx addition: likewise, only for version 3.5 onwards | SQL Compact select top 1 While porting an application from SQL 2005 to SQL Server Compact Edition, I found that I need to port this command: SELECT TOP 1 Id FROM tblJob WHERE Holder_Id IS NULL But SQL Server Compact Edition doesn't support the TOP keyword. How can I port this command? | TITLE:
SQL Compact select top 1
QUESTION:
While porting an application from SQL 2005 to SQL Server Compact Edition, I found that I need to port this command: SELECT TOP 1 Id FROM tblJob WHERE Holder_Id IS NULL But SQL Server Compact Edition doesn't support the TOP keyword. How can I port this command?
ANSWER:
SELECT ... | [
"sql-server",
"sql-server-ce"
] | 13 | 30 | 23,757 | 5 | 0 | 2008-09-26T09:13:04.950000 | 2008-09-26T09:20:02.047000 |
138,422 | 1,392,794 | Landscape printing from HTML | I have a HTML report, which needs to be printed landscape because of the many columns. It there a way to do this, without the user having to change the document settings? And what are the options amongst browsers. | In your CSS you can set the @page property as shown below. @media print{@page {size: landscape}} The @page is part of CSS 2.1 specification however this size is not as highlighted by the answer to the question Is @Page { size:landscape} obsolete?: CSS 2.1 no longer specifies the size attribute. The current working draf... | Landscape printing from HTML I have a HTML report, which needs to be printed landscape because of the many columns. It there a way to do this, without the user having to change the document settings? And what are the options amongst browsers. | TITLE:
Landscape printing from HTML
QUESTION:
I have a HTML report, which needs to be printed landscape because of the many columns. It there a way to do this, without the user having to change the document settings? And what are the options amongst browsers.
ANSWER:
In your CSS you can set the @page property as show... | [
"html",
"css",
"printing"
] | 311 | 478 | 544,869 | 18 | 0 | 2008-09-26T09:13:49.677000 | 2009-09-08T08:50:50.727000 |
138,425 | 138,464 | How to determine from within Java which .NET framework is installed | From within my Java program I want to determine which.NET Framework is installed on the system. What is the best (and easiest) way to do this? Answer Thanks scubabbl! It worked to check the directory System.getenv( "WINDIR" ) + "\\Microsoft.NET\\Framework" for its directories starting with the letter "v". | From what I understand, the actual file structure in c:\windows\Microsoft.Net\Framework has folders with versions of.Net installed. On my computer, I have folders up to v3.5, or c:\windows\Microsoft.Net\Framework\v3.5. There are lots of issues with this, including security issues though. The second, and probably better... | How to determine from within Java which .NET framework is installed From within my Java program I want to determine which.NET Framework is installed on the system. What is the best (and easiest) way to do this? Answer Thanks scubabbl! It worked to check the directory System.getenv( "WINDIR" ) + "\\Microsoft.NET\\Framew... | TITLE:
How to determine from within Java which .NET framework is installed
QUESTION:
From within my Java program I want to determine which.NET Framework is installed on the system. What is the best (and easiest) way to do this? Answer Thanks scubabbl! It worked to check the directory System.getenv( "WINDIR" ) + "\\Mic... | [
"java",
".net-3.5"
] | 3 | 5 | 1,713 | 2 | 0 | 2008-09-26T09:16:09.467000 | 2008-09-26T09:29:40.933000 |
138,432 | 138,465 | What's the best way to detect web applications attacks? | What is the best way to survey and detect bad users behavior or attacks like deny of services or exploits on my web app? I know server's statistics (like Awstats ) are very useful for that kind of purpose, specially to see 3XX, 4XX and 5XX errors ( here's an Awstats example page ) which are often bots or bad intentione... | Log everything. Then examine the logs by hand, and find things that are uninteresting and write a parser that discards those log entries. Once you've done that, rinse and repeat until you're left with just the interesting things. Now that you have only interesting log entries to read, decide which ones are dangerous an... | What's the best way to detect web applications attacks? What is the best way to survey and detect bad users behavior or attacks like deny of services or exploits on my web app? I know server's statistics (like Awstats ) are very useful for that kind of purpose, specially to see 3XX, 4XX and 5XX errors ( here's an Awsta... | TITLE:
What's the best way to detect web applications attacks?
QUESTION:
What is the best way to survey and detect bad users behavior or attacks like deny of services or exploits on my web app? I know server's statistics (like Awstats ) are very useful for that kind of purpose, specially to see 3XX, 4XX and 5XX errors... | [
"security",
"web-applications",
"exploit",
"denial-of-service"
] | 1 | 3 | 1,229 | 5 | 0 | 2008-09-26T09:18:01.473000 | 2008-09-26T09:30:02.180000 |
138,441 | 139,119 | How to figure out the current Biztalk Host Process | I would like to know at runtime in which of several possible host processes my current code is executing. The host processes have configured names at the Biztalk management level, but I need to know which process I'm in from inside the code. I didn't find any supported way to do this and I'm even stuck with the search ... | As far as I know, there isn't any "simple" way of doing it. One (somewhat backwards) way of getting that info would be to use the ExplorerOM API to query the management configuration data and figure out where you're executing and what host/handler you're running in. For example, if you're doing this from a PipelineComp... | How to figure out the current Biztalk Host Process I would like to know at runtime in which of several possible host processes my current code is executing. The host processes have configured names at the Biztalk management level, but I need to know which process I'm in from inside the code. I didn't find any supported... | TITLE:
How to figure out the current Biztalk Host Process
QUESTION:
I would like to know at runtime in which of several possible host processes my current code is executing. The host processes have configured names at the Biztalk management level, but I need to know which process I'm in from inside the code. I didn't ... | [
"process",
"biztalk"
] | 0 | 1 | 481 | 1 | 0 | 2008-09-26T09:20:52.013000 | 2008-09-26T12:30:13.547000 |
138,444 | 138,447 | SQL Reporting services - Out of Memory Exception | I am having some 10 lac records in my single SQL Table. I need to load this much record in my record. I need to know whether this will load. when i tried loading to report its showing out of memory exception. | This is impossible to answer unless you expand your question. What language are you using? Which report generating framwork? How does the SQL query look like? Edit: Ah, ok, Microsoft SQL Reporting Services. Well, it should easily handle queries on tables with millions of tuples, I'm sure. It all depends on how you have... | SQL Reporting services - Out of Memory Exception I am having some 10 lac records in my single SQL Table. I need to load this much record in my record. I need to know whether this will load. when i tried loading to report its showing out of memory exception. | TITLE:
SQL Reporting services - Out of Memory Exception
QUESTION:
I am having some 10 lac records in my single SQL Table. I need to load this much record in my record. I need to know whether this will load. when i tried loading to report its showing out of memory exception.
ANSWER:
This is impossible to answer unless... | [
"asp.net",
"sql",
"reporting-services"
] | 0 | 0 | 4,269 | 3 | 0 | 2008-09-26T09:22:01.653000 | 2008-09-26T09:24:12.507000 |
138,448 | 138,475 | Is there any way to create a stand-alone ButtonSpec in Krypton Toolkit? | I need to create a button that has the same style as ButtonSpec with its type set to Context, is there any way to create a ButtonSpec that isn't directly attached to another control, or have I missed a simple style option on another control? | You cannot get a standalone ButtonSpec but you do not need one. Create a KryptonButton and then set the ButtonStyle to be ButtonSpec and it will draw in the same way as a ButtonSpec that is present in other controls. You could use a KryptonDropButton if you need it to show a KryptonContextMenu when pressed. | Is there any way to create a stand-alone ButtonSpec in Krypton Toolkit? I need to create a button that has the same style as ButtonSpec with its type set to Context, is there any way to create a ButtonSpec that isn't directly attached to another control, or have I missed a simple style option on another control? | TITLE:
Is there any way to create a stand-alone ButtonSpec in Krypton Toolkit?
QUESTION:
I need to create a button that has the same style as ButtonSpec with its type set to Context, is there any way to create a ButtonSpec that isn't directly attached to another control, or have I missed a simple style option on anoth... | [
".net",
"user-interface",
"krypton-toolkit"
] | 2 | 2 | 499 | 1 | 0 | 2008-09-26T09:24:15.127000 | 2008-09-26T09:33:50.377000 |
138,449 | 141,816 | How to convert a Unicode character to its ASCII equivalent | Here's the problem: In C# I'm getting information from a legacy ACCESS database..NET converts the content of the database (in the case of this problem a string) to Unicode before handing the content to me. How do I convert this Unicode string back to it's ASCII equivalent? Edit Unicode char 710 is indeed MODIFIER LETTE... | Okay, let's elaborate. Both csgero and bzlm pointed in the right direction. Because of blzm's reply I looked up the Windows-1252 page on wiki and found that it's called a codepage. The wikipedia article for Code page which stated the following: No formal standard existed for these ‘ extended character sets ’; IBM merel... | How to convert a Unicode character to its ASCII equivalent Here's the problem: In C# I'm getting information from a legacy ACCESS database..NET converts the content of the database (in the case of this problem a string) to Unicode before handing the content to me. How do I convert this Unicode string back to it's ASCII... | TITLE:
How to convert a Unicode character to its ASCII equivalent
QUESTION:
Here's the problem: In C# I'm getting information from a legacy ACCESS database..NET converts the content of the database (in the case of this problem a string) to Unicode before handing the content to me. How do I convert this Unicode string ... | [
"c#",
".net",
"unicode",
"ascii"
] | 14 | 11 | 72,004 | 5 | 0 | 2008-09-26T09:25:34.607000 | 2008-09-26T20:37:17.027000 |
138,457 | 138,874 | Javascript: How to reload entire frameset onload() event including frame where Javascript is called | Is there a way to reload an entire frameset using Javascript onload() event? function logout() { /*... */ // reload entire frame top.location.reload(); } This cause all frames to reload but the URL of the frame where this was called didn't changed to the URL specified in the framset. | As I understood it, you want to reload each frame in a frameset using the original URL as stated in. This little function can do that (put it into the document holding the frameset): this.reloadChildFrames = function() { var allFrames = document.getElementsByTagName("frame"); for (var i = 0; i < allFrames.length; i++) ... | Javascript: How to reload entire frameset onload() event including frame where Javascript is called Is there a way to reload an entire frameset using Javascript onload() event? function logout() { /*... */ // reload entire frame top.location.reload(); } This cause all frames to reload but the URL of the frame where thi... | TITLE:
Javascript: How to reload entire frameset onload() event including frame where Javascript is called
QUESTION:
Is there a way to reload an entire frameset using Javascript onload() event? function logout() { /*... */ // reload entire frame top.location.reload(); } This cause all frames to reload but the URL of t... | [
"javascript"
] | 2 | 5 | 12,432 | 1 | 0 | 2008-09-26T09:29:01.353000 | 2008-09-26T11:28:18.977000 |
138,493 | 138,495 | How to do a SQL NOT NULL with a DateTime? | How does one handle a DateTime with a NOT NULL? I want to do something like this: SELECT * FROM someTable WHERE thisDateTime IS NOT NULL But how? | erm it does work? I've just tested it? /****** Object: Table [dbo].[DateTest] Script Date: 09/26/2008 10:44:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[DateTest]( [Date1] [datetime] NULL, [Date2] [datetime] NOT NULL ) ON [PRIMARY]
GO Insert into DateTest (Date1,Date2) VALUES (NULL,'... | How to do a SQL NOT NULL with a DateTime? How does one handle a DateTime with a NOT NULL? I want to do something like this: SELECT * FROM someTable WHERE thisDateTime IS NOT NULL But how? | TITLE:
How to do a SQL NOT NULL with a DateTime?
QUESTION:
How does one handle a DateTime with a NOT NULL? I want to do something like this: SELECT * FROM someTable WHERE thisDateTime IS NOT NULL But how?
ANSWER:
erm it does work? I've just tested it? /****** Object: Table [dbo].[DateTest] Script Date: 09/26/2008 10:... | [
"sql-server"
] | 19 | 26 | 170,102 | 4 | 0 | 2008-09-26T09:39:40.423000 | 2008-09-26T09:42:17.877000 |
138,496 | 138,810 | Generating a report by date range in rails | How would you go about producing reports by user selected date ranges in a rails app? What are the best date range pickers? edit in response to patrick: I am looking for a bit of both widget and active record advice but what I am really curious about is how to restfully display a date ranged list based on user selected... | Are we asking an interface question here (i.e. you want a widget) or an ActiveRecord question? Date Picking Widgets 1) Default Rails Solution: See date_select documentation here. 2) Use a plugin: Why write code? I personally like the CalendarDateSelect plugin, using a pair of the suckers when I need a range. 3) Adapt a... | Generating a report by date range in rails How would you go about producing reports by user selected date ranges in a rails app? What are the best date range pickers? edit in response to patrick: I am looking for a bit of both widget and active record advice but what I am really curious about is how to restfully displa... | TITLE:
Generating a report by date range in rails
QUESTION:
How would you go about producing reports by user selected date ranges in a rails app? What are the best date range pickers? edit in response to patrick: I am looking for a bit of both widget and active record advice but what I am really curious about is how t... | [
"ruby-on-rails",
"report",
"date-range"
] | 22 | 32 | 12,801 | 2 | 0 | 2008-09-26T09:42:26.407000 | 2008-09-26T11:14:41.210000 |
138,497 | 138,538 | Iterate all files in a directory using a 'for' loop | How can I iterate over each file in a directory using a for loop? And how could I tell if a certain entry is a directory or if it's just a file? | This lists all the files (and only the files) in the current directory and its subdirectories recursively: for /r %i in (*) do echo %i Also if you run that command in a batch file you need to double the % signs. for /r %%i in (*) do echo %%i (thanks @agnul) | Iterate all files in a directory using a 'for' loop How can I iterate over each file in a directory using a for loop? And how could I tell if a certain entry is a directory or if it's just a file? | TITLE:
Iterate all files in a directory using a 'for' loop
QUESTION:
How can I iterate over each file in a directory using a for loop? And how could I tell if a certain entry is a directory or if it's just a file?
ANSWER:
This lists all the files (and only the files) in the current directory and its subdirectories re... | [
"windows",
"batch-file",
"for-loop",
"cmd"
] | 454 | 621 | 826,334 | 17 | 0 | 2008-09-26T09:42:34.160000 | 2008-09-26T09:56:07.017000 |
138,501 | 138,567 | Sorting nvarchar column as integer | I have mixed data i nvarchar column (words and numbers). Which is fastest way to sort data in this column in Numeric Order. Result example: 1 2 3... 10 11... aaaa aaab b ba ba... | Use this: ORDER BY CASE WHEN ISNUMERIC(column) = 1 THEN 0 ELSE 1 END, CASE WHEN ISNUMERIC(column) = 1 THEN CAST(column AS INT) ELSE 0 END, column This works as expected. Note: You say fastest way. This sql was fast for me to produce, but the execution plan shows a table-scan, followed by a scalar computation. This coul... | Sorting nvarchar column as integer I have mixed data i nvarchar column (words and numbers). Which is fastest way to sort data in this column in Numeric Order. Result example: 1 2 3... 10 11... aaaa aaab b ba ba... | TITLE:
Sorting nvarchar column as integer
QUESTION:
I have mixed data i nvarchar column (words and numbers). Which is fastest way to sort data in this column in Numeric Order. Result example: 1 2 3... 10 11... aaaa aaab b ba ba...
ANSWER:
Use this: ORDER BY CASE WHEN ISNUMERIC(column) = 1 THEN 0 ELSE 1 END, CASE WHEN... | [
"sql-server",
"t-sql",
"sorting"
] | 4 | 15 | 18,128 | 7 | 0 | 2008-09-26T09:43:21.023000 | 2008-09-26T10:03:39.727000 |
138,502 | 592,466 | Pure Python XSLT library | Is there an XSLT library that is pure Python? Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support. I really only need basic XSLT support, and speed is not a major issue. | Unfortunately there are no pure-python XSLT processors at the moment. If you need something that is more platform independent, you may want to use a Java-based XSLT processor like Saxon. 4Suite is working on a pure-python XPath parser, but it doesn't look like a pure XSLT processor will be out for some time. Perhaps it... | Pure Python XSLT library Is there an XSLT library that is pure Python? Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support. I really only need basic XSLT support, and speed is not a major issue. | TITLE:
Pure Python XSLT library
QUESTION:
Is there an XSLT library that is pure Python? Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support. I really only need basic XSLT support, and speed is not a major issue.
ANSWER:
Unfortunately there are no pure-python X... | [
"python",
"xml",
"xslt"
] | 21 | 10 | 9,529 | 5 | 0 | 2008-09-26T09:43:43.287000 | 2009-02-26T21:13:59.540000 |
138,508 | 138,595 | MVC, where do the classes go? | My understanding of the MVC is as follows (incase it's horribly wrong, I am afterall new to it) Models are the things that interface with the database Views are the design/layout of the page Controllers are where everything starts and are essentially the page logic I'm using CodeIgniter but I would hazard a guess it's ... | Model is the wrong word to use when discussing what to do with products: each product is a value object (VO) (or data transfer objet/DTO, whatever fits in your mouth better). Value objects generally have the same fields that a table contains. In your case ProductVO should have the fields that are in Products table. Mod... | MVC, where do the classes go? My understanding of the MVC is as follows (incase it's horribly wrong, I am afterall new to it) Models are the things that interface with the database Views are the design/layout of the page Controllers are where everything starts and are essentially the page logic I'm using CodeIgniter bu... | TITLE:
MVC, where do the classes go?
QUESTION:
My understanding of the MVC is as follows (incase it's horribly wrong, I am afterall new to it) Models are the things that interface with the database Views are the design/layout of the page Controllers are where everything starts and are essentially the page logic I'm us... | [
"php",
"model-view-controller",
"oop"
] | 6 | 4 | 2,148 | 5 | 0 | 2008-09-26T09:46:15.837000 | 2008-09-26T10:08:51.133000 |
138,511 | 138,518 | What are Java command line options to set to allow JVM to be remotely debugged? | I know there's some JAVA_OPTS to set to remotely debug a Java program. What are they and what do they mean? | I have this article bookmarked on setting this up for Java 5 and below. Basically run it with: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044 For Java 5 and above, run it with: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044 If you want Java to wait for you to connect before ex... | What are Java command line options to set to allow JVM to be remotely debugged? I know there's some JAVA_OPTS to set to remotely debug a Java program. What are they and what do they mean? | TITLE:
What are Java command line options to set to allow JVM to be remotely debugged?
QUESTION:
I know there's some JAVA_OPTS to set to remotely debug a Java program. What are they and what do they mean?
ANSWER:
I have this article bookmarked on setting this up for Java 5 and below. Basically run it with: -Xdebug -X... | [
"java",
"debugging"
] | 396 | 383 | 554,455 | 9 | 0 | 2008-09-26T09:47:29.687000 | 2008-09-26T09:50:32.020000 |
138,514 | 139,099 | How can I set the ValidationGroup dynamically | I have a ASP.NET 2.0 webpage with 2 UserControls (.ascx). Each UserControl contains a bunch of validators. Placing a ValidationSummary on the page will display all validation errors, of both UserControl's. Placing a ValidationSummary in each UserControl will display all the errors of both controls twice. What I want is... | If you use ValidationGroups, the validation only occurs if the control causing the postback is assign to the same ValidationGroup. If you want to use a single control to postback you can still do this but you would need to explicitly call the Page.Validate method. Page.Validate(MyValidationGroup1); Page.Validate(MyVali... | How can I set the ValidationGroup dynamically I have a ASP.NET 2.0 webpage with 2 UserControls (.ascx). Each UserControl contains a bunch of validators. Placing a ValidationSummary on the page will display all validation errors, of both UserControl's. Placing a ValidationSummary in each UserControl will display all the... | TITLE:
How can I set the ValidationGroup dynamically
QUESTION:
I have a ASP.NET 2.0 webpage with 2 UserControls (.ascx). Each UserControl contains a bunch of validators. Placing a ValidationSummary on the page will display all validation errors, of both UserControl's. Placing a ValidationSummary in each UserControl wi... | [
"asp.net",
"validation",
"validationsummary"
] | 2 | 2 | 8,153 | 2 | 0 | 2008-09-26T09:48:37.890000 | 2008-09-26T12:27:11.353000 |
138,521 | 138,553 | Is it feasible to compile Python to machine code? | How feasible would it be to compile Python (possibly via an intermediate C representation) into machine code? Presumably it would need to link to a Python runtime library, and any parts of the Python standard library which were Python themselves would need to be compiled (and linked in) too. Also, you would need to bun... | Try ShedSkin Python-to-C++ compiler, but it is far from perfect. Also there is Psyco - Python JIT if only speedup is needed. But IMHO this is not worth the effort. For speed-critical parts of code best solution would be to write them as C/C++ extensions. | Is it feasible to compile Python to machine code? How feasible would it be to compile Python (possibly via an intermediate C representation) into machine code? Presumably it would need to link to a Python runtime library, and any parts of the Python standard library which were Python themselves would need to be compile... | TITLE:
Is it feasible to compile Python to machine code?
QUESTION:
How feasible would it be to compile Python (possibly via an intermediate C representation) into machine code? Presumably it would need to link to a Python runtime library, and any parts of the Python standard library which were Python themselves would ... | [
"python",
"c",
"linker",
"compilation"
] | 159 | 36 | 115,858 | 10 | 0 | 2008-09-26T09:51:51.907000 | 2008-09-26T10:00:15.553000 |
138,533 | 138,767 | Java Swing: Ctrl+F1 does not work globally, but each other key combination | I have a swing gui with a tabbed pane in the north. Several key events are added to its input map: InputMap paneInputMap = pane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); paneInputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_E, KeyEvent.CTRL_MASK ), "finish"); paneInputMap.put( KeyStroke.getKeyStroke( ... | So that this gets an answer, here's the solution copied from your edit in the question.;-) The ToolTipManager registeres the Key Ctrl + F1 to display the tooltip text if the key combination is pressed. So if a button with a tooltip is focused, Ctrl + F1 is handled by the ToolTipManager. Otherwise my action is called. | Java Swing: Ctrl+F1 does not work globally, but each other key combination I have a swing gui with a tabbed pane in the north. Several key events are added to its input map: InputMap paneInputMap = pane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); paneInputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_E, ... | TITLE:
Java Swing: Ctrl+F1 does not work globally, but each other key combination
QUESTION:
I have a swing gui with a tabbed pane in the north. Several key events are added to its input map: InputMap paneInputMap = pane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); paneInputMap.put( KeyStroke.getKeyStrok... | [
"java",
"swing",
"keyevent"
] | 4 | 2 | 2,601 | 2 | 0 | 2008-09-26T09:55:29.247000 | 2008-09-26T11:06:25.503000 |
138,547 | 195,786 | Can't view full-text catalogs in SQL Server 2008 with Advanced Services | I'm using SQL Server 2008 with Advanced Services on my Vista Home Premium. I'd installed Full-text searching during installation, The SQL Full-text Filter Daemon Launcher is running thorough an admin user account. When I go to a database through the SQL Server Management Studio, I don't see the "Storage" option under t... | Ok, the answer is: SQL Management Studio Basic doesn't support Full-text catalogs. Catalogs can only be created via T-SQL. This is a feature that might be added in the future. | Can't view full-text catalogs in SQL Server 2008 with Advanced Services I'm using SQL Server 2008 with Advanced Services on my Vista Home Premium. I'd installed Full-text searching during installation, The SQL Full-text Filter Daemon Launcher is running thorough an admin user account. When I go to a database through th... | TITLE:
Can't view full-text catalogs in SQL Server 2008 with Advanced Services
QUESTION:
I'm using SQL Server 2008 with Advanced Services on my Vista Home Premium. I'd installed Full-text searching during installation, The SQL Full-text Filter Daemon Launcher is running thorough an admin user account. When I go to a d... | [
"sql-server",
"full-text-search"
] | 1 | 1 | 1,136 | 2 | 0 | 2008-09-26T09:58:37.913000 | 2008-10-12T18:03:21.447000 |
138,552 | 138,615 | Can Regex be used for this particular string manipulation? | I need to replace character (say) x with character (say) P in a string, but only if it is contained in a quoted substring. An example makes it clearer: axbx'cxdxe'fxgh'ixj'k -> axbx'cPdPe'fxgh'iPj'k Let's assume, for the sake of simplicity, that quotes always come in pairs. The obvious way is to just process the string... | I was able to do this with Python: >>> import re >>> re.sub(r"x(?=[^']*'([^']|'[^']*')*$)", "P", "axbx'cxdxe'fxgh'ixj'k") "axbx'cPdPe'fxgh'iPj'k" What this does is use the non-capturing match (?=...) to check that the character x is within a quoted string. It looks for some nonquote characters up to the next quote, the... | Can Regex be used for this particular string manipulation? I need to replace character (say) x with character (say) P in a string, but only if it is contained in a quoted substring. An example makes it clearer: axbx'cxdxe'fxgh'ixj'k -> axbx'cPdPe'fxgh'iPj'k Let's assume, for the sake of simplicity, that quotes always c... | TITLE:
Can Regex be used for this particular string manipulation?
QUESTION:
I need to replace character (say) x with character (say) P in a string, but only if it is contained in a quoted substring. An example makes it clearer: axbx'cxdxe'fxgh'ixj'k -> axbx'cPdPe'fxgh'iPj'k Let's assume, for the sake of simplicity, th... | [
"c#",
"python",
"regex",
"language-agnostic"
] | 7 | 8 | 4,912 | 9 | 0 | 2008-09-26T10:00:10.920000 | 2008-09-26T10:18:50.423000 |
138,555 | 138,561 | How to convert HTML to XHTML? | I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done? To be a bit more clear here, my application has to do the conversion automatically at runtime. I don't look for a tool that helps... | Convert from HTML to XML with HTML Tidy Downloadable Binaries JRoppert, For your need, i guess you might want to look at the Sources c:\temp>tidy -help tidy [option...] [file...] [option...] [file...] Utility to clean up and pretty print HTML/XHTML/XML see http://tidy.sourceforge.net/
Options for HTML Tidy for Windows... | How to convert HTML to XHTML? I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done? To be a bit more clear here, my application has to do the conversion automatically at runtime. I do... | TITLE:
How to convert HTML to XHTML?
QUESTION:
I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done? To be a bit more clear here, my application has to do the conversion automaticall... | [
"c#",
".net",
"html",
"xhtml",
"converters"
] | 23 | 24 | 26,777 | 7 | 0 | 2008-09-26T10:00:18.470000 | 2008-09-26T10:02:32.803000 |
138,558 | 159,510 | VB FFT - stuck understanding relationship of results to frequency | Trying to understand an fft (Fast Fourier Transform) routine I'm using (stealing)(recycling) Input is an array of 512 data points which are a sample waveform. Test data is generated into this array. fft transforms this array into frequency domain. Trying to understand relationship between freq, period, sample rate and ... | If you ignore the imaginary part, the frequency distribution is linear across bins: Frequency@i = (Sampling rate/2)*(i/Nbins). So for your first example, assumming you had 256 bins, the largest bin corresponds to a frequency of 1000/2 * 6/256 = 11.7 Hz. Since your input was 10Hz, I'd guess that bin 5 (9.7Hz) also had a... | VB FFT - stuck understanding relationship of results to frequency Trying to understand an fft (Fast Fourier Transform) routine I'm using (stealing)(recycling) Input is an array of 512 data points which are a sample waveform. Test data is generated into this array. fft transforms this array into frequency domain. Trying... | TITLE:
VB FFT - stuck understanding relationship of results to frequency
QUESTION:
Trying to understand an fft (Fast Fourier Transform) routine I'm using (stealing)(recycling) Input is an array of 512 data points which are a sample waveform. Test data is generated into this array. fft transforms this array into freque... | [
"vba",
"audio",
"signal-processing",
"fft"
] | 3 | 2 | 3,890 | 8 | 0 | 2008-09-26T10:01:29.903000 | 2008-10-01T20:19:34.687000 |
138,565 | 138,590 | PHP Class Database Connection Scope Issue | For a new project that I'm doing in PHP I've created an SQLMethods class to connect to the database and perform queries. Tonight was the first night that I actually got to test it (I wrote it a week or so ago and forgot about it) and an unexpected error occured: When it was calling my ExecuteQuery() function, it wouldn... | you should declare $SQLConnection in your class, and you should refer to it as $this->SQLConnection and not simply $SQLConnection. | PHP Class Database Connection Scope Issue For a new project that I'm doing in PHP I've created an SQLMethods class to connect to the database and perform queries. Tonight was the first night that I actually got to test it (I wrote it a week or so ago and forgot about it) and an unexpected error occured: When it was cal... | TITLE:
PHP Class Database Connection Scope Issue
QUESTION:
For a new project that I'm doing in PHP I've created an SQLMethods class to connect to the database and perform queries. Tonight was the first night that I actually got to test it (I wrote it a week or so ago and forgot about it) and an unexpected error occure... | [
"php",
"mysql",
"class",
"scope",
"code-reuse"
] | 1 | 7 | 2,694 | 3 | 0 | 2008-09-26T10:03:25.453000 | 2008-09-26T10:07:49.140000 |
138,575 | 138,648 | How can I create database tables from XSD files? | I have a set of XSDs from which I generate data access classes, stored procedures and more. What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me? This is not the same as Create DB table from dataset table, as I do not have dataset tables, but XS... | Commercial Product: Altova's XML Spy. Note that there's no general solution to this. An XSD can easily describe something that does not map to a relational database. While you can try to "automate" this, your XSD's must be designed with a relational database in mind, or it won't work out well. If the XSD's have feature... | How can I create database tables from XSD files? I have a set of XSDs from which I generate data access classes, stored procedures and more. What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me? This is not the same as Create DB table from datas... | TITLE:
How can I create database tables from XSD files?
QUESTION:
I have a set of XSDs from which I generate data access classes, stored procedures and more. What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me? This is not the same as Create D... | [
".net",
"sql",
"database",
"xsd",
"code-generation"
] | 38 | 26 | 159,228 | 8 | 0 | 2008-09-26T10:04:26.887000 | 2008-09-26T10:29:28.667000 |
138,607 | 149,803 | Simple ColdFusion script works in IE but not Firefox? | I have a very simple bit of script that changes the status of an item in a MySql database - it works fine in IE7, but if I try it in Firefox, it looks like it's worked, but hasn't... Which is extremely odd. The code is very simple - first I get the details of the record I'm looking for: // Get the Product Attribute det... | I found the cause of the problem... Firebug. I haven't the slightest idea what Firebug thinks it's doing, if I remove the 'cflocation' tag from the script (the one that takes the user back to the summary page), then it works fine. But if I keep it in, Firebug seems to run the function again before forwarding the browse... | Simple ColdFusion script works in IE but not Firefox? I have a very simple bit of script that changes the status of an item in a MySql database - it works fine in IE7, but if I try it in Firefox, it looks like it's worked, but hasn't... Which is extremely odd. The code is very simple - first I get the details of the re... | TITLE:
Simple ColdFusion script works in IE but not Firefox?
QUESTION:
I have a very simple bit of script that changes the status of an item in a MySql database - it works fine in IE7, but if I try it in Firefox, it looks like it's worked, but hasn't... Which is extremely odd. The code is very simple - first I get the... | [
"mysql",
"firefox",
"coldfusion",
"internet-explorer-7"
] | 4 | 3 | 1,680 | 6 | 0 | 2008-09-26T10:15:35.737000 | 2008-09-29T17:39:39.423000 |
138,608 | 138,637 | Sql Server 2005 efficiency savings? | Are there good efficiency savings using Sql Server 2005 over Sql Server 2000? Or does it just have more services etc Has anyone seen their system work any quicker after making the upgrade? | The surrounding tools such as Analysis Services were substantially rewritten and can get you a variety of wins depending on your requirements. However I don't see a lot of really fundamental changes from 2000 to 2005 in the core database engine. There are some improvements that may get you better performance in certain... | Sql Server 2005 efficiency savings? Are there good efficiency savings using Sql Server 2005 over Sql Server 2000? Or does it just have more services etc Has anyone seen their system work any quicker after making the upgrade? | TITLE:
Sql Server 2005 efficiency savings?
QUESTION:
Are there good efficiency savings using Sql Server 2005 over Sql Server 2000? Or does it just have more services etc Has anyone seen their system work any quicker after making the upgrade?
ANSWER:
The surrounding tools such as Analysis Services were substantially r... | [
"sql-server",
"performance",
"upgrade"
] | 2 | 1 | 223 | 6 | 0 | 2008-09-26T10:16:36.077000 | 2008-09-26T10:25:45.493000 |
138,617 | 140,050 | How to create a GET request with parameters, using JSF and navigation-rules? | Is there a way to create an html link using h:outputLink, other JSF tag or code to create a non faces request (HTTP GET) with request parameters? For example I have the following navigation-rule showMessage /showMessage.jsf In my page I would like to output the following html code: click to see the message I could just... | This is an interesting idea. I'd be curious to know how it pans out in practice. Getting the navigation rules Navigation is handled by the NavigationHandler. Getting hold of the NavigationHandler isn't difficult, but the API does not expose the rules it uses. As I see it, you can: parse faces-config.xml on initializati... | How to create a GET request with parameters, using JSF and navigation-rules? Is there a way to create an html link using h:outputLink, other JSF tag or code to create a non faces request (HTTP GET) with request parameters? For example I have the following navigation-rule showMessage /showMessage.jsf In my page I would ... | TITLE:
How to create a GET request with parameters, using JSF and navigation-rules?
QUESTION:
Is there a way to create an html link using h:outputLink, other JSF tag or code to create a non faces request (HTTP GET) with request parameters? For example I have the following navigation-rule showMessage /showMessage.jsf I... | [
"java",
"jsf",
"redirect",
"navigation"
] | 11 | 12 | 44,802 | 4 | 0 | 2008-09-26T10:19:12.247000 | 2008-09-26T15:00:42.967000 |
138,624 | 154,866 | LabVIEW Objects | I have a base class object array into which I have typecasted many different child class objects and am passing it to a sub vi. Is there any way by which I can find out the original type of the object of each individual elements in the array? Thanks... | For posterity, this was crossposted to the LAVA forums. The user Aristos Queue, one of the developers of LabVIEW's native OO features, answered with the following: Using a dynamic dispatch method in every class is the recommended way of handling this, although the recommendation is to create a method that does whatever... | LabVIEW Objects I have a base class object array into which I have typecasted many different child class objects and am passing it to a sub vi. Is there any way by which I can find out the original type of the object of each individual elements in the array? Thanks... | TITLE:
LabVIEW Objects
QUESTION:
I have a base class object array into which I have typecasted many different child class objects and am passing it to a sub vi. Is there any way by which I can find out the original type of the object of each individual elements in the array? Thanks...
ANSWER:
For posterity, this was ... | [
"object",
"labview"
] | 3 | 3 | 1,843 | 2 | 0 | 2008-09-26T10:20:25.600000 | 2008-09-30T20:23:27.510000 |
138,631 | 139,022 | Hibernate global filtration criteria | Is there a way to add a single criteria on a session factory(configuration) level which will apply to all entities retrieved with a Session? We have a requirement to not delete any rows from our database but "mark" deleted entities as such so that they will not participate in any further operations. I know that we can ... | The Hibernate Documentation elaborates on this a little more. It looks like the best way to handle this is with Filters. First, you define a fitler on a class or collection like so: Then you attach it to a class or collection:... Alas, you must do this with every class you want soft-deleted. But you may be able to map ... | Hibernate global filtration criteria Is there a way to add a single criteria on a session factory(configuration) level which will apply to all entities retrieved with a Session? We have a requirement to not delete any rows from our database but "mark" deleted entities as such so that they will not participate in any fu... | TITLE:
Hibernate global filtration criteria
QUESTION:
Is there a way to add a single criteria on a session factory(configuration) level which will apply to all entities retrieved with a Session? We have a requirement to not delete any rows from our database but "mark" deleted entities as such so that they will not par... | [
"java",
"hibernate"
] | 2 | 2 | 585 | 1 | 0 | 2008-09-26T10:21:45.020000 | 2008-09-26T12:10:35.137000 |
138,638 | 138,779 | can I expose a class from another .net namespace as a class in my namespace? | Can I expose a class from another.net namespace as a class in my namespace? I use a class - antlr.collections.AST - as the return type for a function belonging to a class in my namespace; as a result, the user has to have using antlr.collections; using myNamespace; at the top of their files in order to use my function.... | Bear in mind that the consumers of your code won't actually need to have using statements. Those are there to make their lives easier, so they don't have to type antlr.collections.Foo and antlr.collections.Bar all over their source. The bigger "impact" (if indeed there really is a severe one) is that the consumer of yo... | can I expose a class from another .net namespace as a class in my namespace? Can I expose a class from another.net namespace as a class in my namespace? I use a class - antlr.collections.AST - as the return type for a function belonging to a class in my namespace; as a result, the user has to have using antlr.collectio... | TITLE:
can I expose a class from another .net namespace as a class in my namespace?
QUESTION:
Can I expose a class from another.net namespace as a class in my namespace? I use a class - antlr.collections.AST - as the return type for a function belonging to a class in my namespace; as a result, the user has to have usi... | [
"c#",
".net",
"namespaces"
] | 3 | 4 | 4,254 | 6 | 0 | 2008-09-26T10:26:11.763000 | 2008-09-26T11:10:07.993000 |
138,641 | 138,690 | Feature branches in CVS? | I'm duty-bound by policy to use CVS in this certain project, so even though I'd really to switch to something else, like Git, I cannot. So, my real question goes like this: We have a convention that we create a new branch in CVS every time we make a release (we also tag, but that is besides the point). We call these ve... | If you are the only one developing on the feature-branch, you could simply use Git as your "sandbox development" system and then once you have the changes done, merge them into your CVS repository. You still gain the benefit of source control for your intermediate work product. | Feature branches in CVS? I'm duty-bound by policy to use CVS in this certain project, so even though I'd really to switch to something else, like Git, I cannot. So, my real question goes like this: We have a convention that we create a new branch in CVS every time we make a release (we also tag, but that is besides the... | TITLE:
Feature branches in CVS?
QUESTION:
I'm duty-bound by policy to use CVS in this certain project, so even though I'd really to switch to something else, like Git, I cannot. So, my real question goes like this: We have a convention that we create a new branch in CVS every time we make a release (we also tag, but t... | [
"cvs",
"version-control",
"branch"
] | 5 | 5 | 896 | 4 | 0 | 2008-09-26T10:28:25.800000 | 2008-09-26T10:50:53.123000 |
138,643 | 138,678 | How do I redirect a page after successful validation with form_remote_for()? | I'm using form_remote_for() to do validation on a form's data so that my rails app can show the user errors without reloading the page. I'm having troubles redirecting the page if there are no errors. Here is my code: def create # Validate the data if error_count > 0 render:update do |page| page.replace_html(div_id, er... | I thought about this some more and realized that I needed the page to redirect instead of the request I was handling. So I tried the following and it works great. def create # Validate the data if error_count > 0 render:update do |page| page.replace_html(div_id, error_text) end else # Save the data render:update do |pa... | How do I redirect a page after successful validation with form_remote_for()? I'm using form_remote_for() to do validation on a form's data so that my rails app can show the user errors without reloading the page. I'm having troubles redirecting the page if there are no errors. Here is my code: def create # Validate the... | TITLE:
How do I redirect a page after successful validation with form_remote_for()?
QUESTION:
I'm using form_remote_for() to do validation on a form's data so that my rails app can show the user errors without reloading the page. I'm having troubles redirecting the page if there are no errors. Here is my code: def cre... | [
"ruby-on-rails"
] | 0 | 4 | 1,190 | 1 | 0 | 2008-09-26T10:29:02.880000 | 2008-09-26T10:44:55.463000 |
138,670 | 138,861 | How unique is the php session id | How unique is the php session id? I got the impression from various things that I've read that I should not rely on two users never getting the same sessionid. Isn't it a GUID? | Session_id can indeed be duplicated, but the probability is very low. If you have a website with a fair traffic, it may happens once in you web site life, and will just annoy one user for one session. This is not worth to care about unless you expect to build a very high traffic website or a service for the bank indust... | How unique is the php session id How unique is the php session id? I got the impression from various things that I've read that I should not rely on two users never getting the same sessionid. Isn't it a GUID? | TITLE:
How unique is the php session id
QUESTION:
How unique is the php session id? I got the impression from various things that I've read that I should not rely on two users never getting the same sessionid. Isn't it a GUID?
ANSWER:
Session_id can indeed be duplicated, but the probability is very low. If you have a... | [
"php",
"session",
"guid"
] | 92 | 44 | 79,276 | 10 | 0 | 2008-09-26T10:41:50.883000 | 2008-09-26T11:25:54.770000 |
138,680 | 138,709 | Vim extension (via Python)? | is it possible to extend vim functionality via custom extension (preferably, written in Python)? What I need ideally is custom command when in command mode. E.g. ESC:do_this:do_that | vim supports scripting in python (and in perl as well, I think). You just have to make sure that the vim distribution you are using has been compiled with python support. If you are using a Linux system, you can download the source and then compile it with./configure --enable-pythoninterp make sudo make install Inside ... | Vim extension (via Python)? is it possible to extend vim functionality via custom extension (preferably, written in Python)? What I need ideally is custom command when in command mode. E.g. ESC:do_this:do_that | TITLE:
Vim extension (via Python)?
QUESTION:
is it possible to extend vim functionality via custom extension (preferably, written in Python)? What I need ideally is custom command when in command mode. E.g. ESC:do_this:do_that
ANSWER:
vim supports scripting in python (and in perl as well, I think). You just have to m... | [
"python",
"vim"
] | 10 | 20 | 8,401 | 3 | 0 | 2008-09-26T10:45:57.020000 | 2008-09-26T10:55:13.347000 |
138,696 | 140,042 | Is there a way to have managed processes in Perl (i.e. a threads replacement that actually works)? | I have a multithreded application in perl for which I have to rely on several non-thread safe modules, so I have been using fork() ed processes with kill() signals as a message passing interface. The problem is that the signal handlers are a bit erratic (to say the least) and often end up with processes that get killed... | Have a look at forks.pm, a "drop-in replacement for Perl threads using fork()" which makes for much more sensible memory usage (but don't use it on Win32). It will allow you to declare "shared" variables and then it automatically passes changes made to such variables between the processes (similar to how threads.pm doe... | Is there a way to have managed processes in Perl (i.e. a threads replacement that actually works)? I have a multithreded application in perl for which I have to rely on several non-thread safe modules, so I have been using fork() ed processes with kill() signals as a message passing interface. The problem is that the s... | TITLE:
Is there a way to have managed processes in Perl (i.e. a threads replacement that actually works)?
QUESTION:
I have a multithreded application in perl for which I have to rely on several non-thread safe modules, so I have been using fork() ed processes with kill() signals as a message passing interface. The pro... | [
"perl",
"multithreading",
"fork",
"signals"
] | 3 | 4 | 408 | 4 | 0 | 2008-09-26T10:52:46.287000 | 2008-09-26T14:58:26.997000 |
138,703 | 138,725 | Any way to automatically wrap comments at column 80 in Visual Studio 2008? ..or display where column 80 is? | Is there any way to automatically wrap comments at the 80-column boundary as you type them?..or failing that, any way to display a faint line at the coulmn 80 boundary to make wrapping them manually a little easier? Several other IDEs I use have one or other of those functions and it makes writing comments that wrap in... | Take a look at the question here: Hidden Features of Visual Studio (2005-2010)? It shows how to do that: "Under "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor" Create a String called "Guides" with the value "RGB(255,0,0) 79" to have a red line at column 80 in the text editor." | Any way to automatically wrap comments at column 80 in Visual Studio 2008? ..or display where column 80 is? Is there any way to automatically wrap comments at the 80-column boundary as you type them?..or failing that, any way to display a faint line at the coulmn 80 boundary to make wrapping them manually a little easi... | TITLE:
Any way to automatically wrap comments at column 80 in Visual Studio 2008? ..or display where column 80 is?
QUESTION:
Is there any way to automatically wrap comments at the 80-column boundary as you type them?..or failing that, any way to display a faint line at the coulmn 80 boundary to make wrapping them manu... | [
"visual-studio-2008",
"comments",
"word-wrap"
] | 13 | 14 | 5,315 | 9 | 0 | 2008-09-26T10:53:43.617000 | 2008-09-26T10:58:35.400000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.