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
74,461
74,877
Silverlight- DataGrid control - Selection Changed event interfering with sorting
I'm currently playing with the Silverlight(Beta 2) Datagrid control. Before I wired up the SelectionChanged event, the grid would sort perfectly by clicking on the header. Now, when the grid is clicked, it will fire the SelectionChanged event when I click the header to sort. Is there any way around this? In a semi-rela...
That looks like a Silverlight bug to me. I've just tried it and what's happening on my end is that the SelectionChanged event fires twice when you click the column header and to make matters worse, the index of the selected item doesn't stay synched with the currently selected item. I'd suggest you work your way around...
Silverlight- DataGrid control - Selection Changed event interfering with sorting I'm currently playing with the Silverlight(Beta 2) Datagrid control. Before I wired up the SelectionChanged event, the grid would sort perfectly by clicking on the header. Now, when the grid is clicked, it will fire the SelectionChanged ev...
TITLE: Silverlight- DataGrid control - Selection Changed event interfering with sorting QUESTION: I'm currently playing with the Silverlight(Beta 2) Datagrid control. Before I wired up the SelectionChanged event, the grid would sort perfectly by clicking on the header. Now, when the grid is clicked, it will fire the S...
[ "vb.net", "silverlight", "web-services", "xaml", "datagrid" ]
2
4
17,774
4
0
2008-09-16T16:52:20.180000
2008-09-16T17:36:12.213000
74,466
74,671
How do I use an icon that is a resource in WPF?
I have a.ico file that is embedded as a resource (build action set to resource). I am trying to create a NotifyIcon. How can I reference my icon? notifyIcon = new NotifyIcon(); notifyIcon.Icon =?? // my icon file is called MyIcon.ico and is embedded
Your icon file should be added to one of your project assemblies and its Build Action should be set to Resource. After adding a reference to the assembly, you can create a NotifyIcon like this: System.Windows.Forms.NotifyIcon icon = new System.Windows.Forms.NotifyIcon(); Stream iconStream = Application.GetResourceStrea...
How do I use an icon that is a resource in WPF? I have a.ico file that is embedded as a resource (build action set to resource). I am trying to create a NotifyIcon. How can I reference my icon? notifyIcon = new NotifyIcon(); notifyIcon.Icon =?? // my icon file is called MyIcon.ico and is embedded
TITLE: How do I use an icon that is a resource in WPF? QUESTION: I have a.ico file that is embedded as a resource (build action set to resource). I am trying to create a NotifyIcon. How can I reference my icon? notifyIcon = new NotifyIcon(); notifyIcon.Icon =?? // my icon file is called MyIcon.ico and is embedded ANS...
[ "wpf", "resources", "icons" ]
74
117
116,704
5
0
2008-09-16T16:52:34.067000
2008-09-16T17:13:28.477000
74,471
74,495
Redundant Call to Object.ToString()
I have a function that takes, amongst others, a parameter declared as int privateCount. When I want to call ToString() on this param, ReSharper greys it out and marks it as a redundant call. So, curious as I am, I remove the ToString(), and the code still builds! How can a C# compiler allow this, where str is a string?...
The + operator for string is overloaded to call String.Concat passing in the left and right side of the expression. Thus: string x = "123" + 45; Gets compiled to: String.Concat("123", 45); Since String.Concat takes in two objects, the right hand side (45) is boxed and then ToString() is called on it. Note that this "ov...
Redundant Call to Object.ToString() I have a function that takes, amongst others, a parameter declared as int privateCount. When I want to call ToString() on this param, ReSharper greys it out and marks it as a redundant call. So, curious as I am, I remove the ToString(), and the code still builds! How can a C# compile...
TITLE: Redundant Call to Object.ToString() QUESTION: I have a function that takes, amongst others, a parameter declared as int privateCount. When I want to call ToString() on this param, ReSharper greys it out and marks it as a redundant call. So, curious as I am, I remove the ToString(), and the code still builds! Ho...
[ "c#", ".net", "resharper" ]
11
20
4,200
4
0
2008-09-16T16:52:36.763000
2008-09-16T16:54:38.617000
74,484
74,537
Why should I care about compacting an MS Access .mdb file?
We distribute an application that uses an MS Access.mdb file. Somebody has noticed that after opening the file in MS Access the file size shrinks a lot. That suggests that the file is a good candidate for compacting, but we don't supply the means for our users to do that. So, my question is, does it matter? Do we care?...
In addition to making your database smaller, it'll recompute the indexes on your tables and defragment your tables which can make access faster. It'll also find any inconsistencies that should never happen in your database, but might, due to bugs or crashes in Access. It's not totally without risk though -- a bug in Ac...
Why should I care about compacting an MS Access .mdb file? We distribute an application that uses an MS Access.mdb file. Somebody has noticed that after opening the file in MS Access the file size shrinks a lot. That suggests that the file is a good candidate for compacting, but we don't supply the means for our users ...
TITLE: Why should I care about compacting an MS Access .mdb file? QUESTION: We distribute an application that uses an MS Access.mdb file. Somebody has noticed that after opening the file in MS Access the file size shrinks a lot. That suggests that the file is a good candidate for compacting, but we don't supply the me...
[ "ms-access" ]
4
12
4,244
9
0
2008-09-16T16:53:40.567000
2008-09-16T16:58:40.930000
74,494
75,434
Limit dev environment to e-mail only certain domains for testing (XP smtp IIS)
I'm developing a website on an XP virtual machine and have an SMTP virtual server set up in IIS -- it delivers mail just fine. What I would like is to confirm that any emails the site sends are only going to a specific domain. The XP firewall seems to only involve incoming connections, I can't block outgoing TCP on por...
Here's one idea: Under Advanced Delivery options ( SMTP Virtual Server Properties > Delivery tab > Advanced ). There you can set a "Smart Host" which is the SMTP server that will be used to actually send the mail, so you could possibly have it deliver directly to the specific domain's incoming SMTP server.
Limit dev environment to e-mail only certain domains for testing (XP smtp IIS) I'm developing a website on an XP virtual machine and have an SMTP virtual server set up in IIS -- it delivers mail just fine. What I would like is to confirm that any emails the site sends are only going to a specific domain. The XP firewal...
TITLE: Limit dev environment to e-mail only certain domains for testing (XP smtp IIS) QUESTION: I'm developing a website on an XP virtual machine and have an SMTP virtual server set up in IIS -- it delivers mail just fine. What I would like is to confirm that any emails the site sends are only going to a specific doma...
[ "iis", "testing", "windows-xp", "smtp" ]
2
1
2,346
2
0
2008-09-16T16:54:31.190000
2008-09-16T18:26:33.810000
74,514
74,802
What is the "best" canonical implementation of Equals() for reference types?
Implementing Equals() for reference types is harder than it seems. My current canonical implementation goes like this: public bool Equals( MyClass obj ) { // If both refer to the same reference they are equal. if( ReferenceEquals( obj, this ) ) return true; // If the other object is null they are not equal because in ...
I wrote a fairly comprehensive guide to this a while back. For a start your equals implementations should be shared (i.e. the overload taking an object should pass through to the one taking a strongly typed object). Additionally you need to consider things such as your object should be immutable because of the need to ...
What is the "best" canonical implementation of Equals() for reference types? Implementing Equals() for reference types is harder than it seems. My current canonical implementation goes like this: public bool Equals( MyClass obj ) { // If both refer to the same reference they are equal. if( ReferenceEquals( obj, this ) ...
TITLE: What is the "best" canonical implementation of Equals() for reference types? QUESTION: Implementing Equals() for reference types is harder than it seems. My current canonical implementation goes like this: public bool Equals( MyClass obj ) { // If both refer to the same reference they are equal. if( ReferenceEq...
[ "c#", ".net", "equals" ]
6
4
1,349
6
0
2008-09-16T16:56:24.850000
2008-09-16T17:27:11.207000
74,519
81,893
Using 7-Zip from Delphi?
I would like to use the 7-Zip DLLs from Delphi but have not been able to find decent documentation or examples. Does anyone know how to use the 7-Zip DLLs from Delphi?
As of release 1.102 the JEDI Code Library has support for 7-Zip built into the JclCompression unit. Haven't used it myself yet, though.
Using 7-Zip from Delphi? I would like to use the 7-Zip DLLs from Delphi but have not been able to find decent documentation or examples. Does anyone know how to use the 7-Zip DLLs from Delphi?
TITLE: Using 7-Zip from Delphi? QUESTION: I would like to use the 7-Zip DLLs from Delphi but have not been able to find decent documentation or examples. Does anyone know how to use the 7-Zip DLLs from Delphi? ANSWER: As of release 1.102 the JEDI Code Library has support for 7-Zip built into the JclCompression unit. ...
[ "delphi", "7zip" ]
27
31
34,306
7
0
2008-09-16T16:57:03.947000
2008-09-17T10:39:09.960000
74,521
97,463
I'm looking to use Visual Studio to write and compile using the open source version of Qt4
Does anyone have details in setting up Qt4 in Visual Studio 2008? Links to other resources would be appreciated as well. I already know that the commercial version of Qt has applications to this end. I also realize that I'll probably need to compile from source as the installer for the open source does not support Visu...
It's even simpler now with QT4, you no longer need the patch. Basically you just need to supply "-spec win32-msvc2008" to configure. There are detailed instructions here http://tom.paschenda.org/blog/?p=28 The visual studio add-in is also open-source and available.
I'm looking to use Visual Studio to write and compile using the open source version of Qt4 Does anyone have details in setting up Qt4 in Visual Studio 2008? Links to other resources would be appreciated as well. I already know that the commercial version of Qt has applications to this end. I also realize that I'll prob...
TITLE: I'm looking to use Visual Studio to write and compile using the open source version of Qt4 QUESTION: Does anyone have details in setting up Qt4 in Visual Studio 2008? Links to other resources would be appreciated as well. I already know that the commercial version of Qt has applications to this end. I also real...
[ "visual-studio-2008", "qt" ]
4
1
703
2
0
2008-09-16T16:57:11.840000
2008-09-18T22:02:29.793000
74,526
78,498
TFS annotate/blame summary report for a project
In Team Foundation Server, I know that you can use the Annotate feature to see who last edited each line in a particular file (equivalent to "Blame" in CVS). What I'd like to do is akin to running Annotate on every file in a project, and get a summary report of all the developers who have edited a file in the project, ...
It's easy enough to use the "tf.exe history" command recursively across a directory of files in TFS. This will tell you who changed what files. However what you're after is a little bit more than this - you want to know if the latest versions of any files have lines written by a particular user. The Team Foundation Pow...
TFS annotate/blame summary report for a project In Team Foundation Server, I know that you can use the Annotate feature to see who last edited each line in a particular file (equivalent to "Blame" in CVS). What I'd like to do is akin to running Annotate on every file in a project, and get a summary report of all the de...
TITLE: TFS annotate/blame summary report for a project QUESTION: In Team Foundation Server, I know that you can use the Annotate feature to see who last edited each line in a particular file (equivalent to "Blame" in CVS). What I'd like to do is akin to running Annotate on every file in a project, and get a summary re...
[ "visual-studio", "tfs", "tfs-code-review" ]
15
17
8,353
6
0
2008-09-16T16:57:52.803000
2008-09-17T00:00:12.930000
74,560
74,584
VisualSVN Server wants a username and password
I've renamed my server and am trying to get to the VisualSVN Server repository via TortoiseSVN. In this post Gordon helped me find the right command - thanks Gordon. Now VisualSVN Server is asking me for a username and password. I don't recall setting one and if I did I've forgotten it. Any idea how to reset this usern...
It depends on how your Visual SVN Server is set up. If you are using native windows authentication, just enter you domain username and password. Otherwise, you will have to log into the machine running Visual SVN Server and reset your password there. Visual SVN Server provides a convenient tool for managing users, pass...
VisualSVN Server wants a username and password I've renamed my server and am trying to get to the VisualSVN Server repository via TortoiseSVN. In this post Gordon helped me find the right command - thanks Gordon. Now VisualSVN Server is asking me for a username and password. I don't recall setting one and if I did I've...
TITLE: VisualSVN Server wants a username and password QUESTION: I've renamed my server and am trying to get to the VisualSVN Server repository via TortoiseSVN. In this post Gordon helped me find the right command - thanks Gordon. Now VisualSVN Server is asking me for a username and password. I don't recall setting one...
[ "svn", "tortoisesvn", "visualsvn-server" ]
8
9
10,194
1
0
2008-09-16T17:01:03.890000
2008-09-16T17:03:42.587000
74,561
74,736
How to write static code analyzer for .net
I am interested in writing static code analyzer for vb.net to see if it conforms to my company standard coding guidelines. Please advise from where i have to start.
FXCop is a good start for coding problems/mistakes, StyleCop is good for coding style (obviously), but if neither of those two work then you then you can either write a parser yourself or use the VBCodeProvider class in the.Net Framework
How to write static code analyzer for .net I am interested in writing static code analyzer for vb.net to see if it conforms to my company standard coding guidelines. Please advise from where i have to start.
TITLE: How to write static code analyzer for .net QUESTION: I am interested in writing static code analyzer for vb.net to see if it conforms to my company standard coding guidelines. Please advise from where i have to start. ANSWER: FXCop is a good start for coding problems/mistakes, StyleCop is good for coding style...
[ "vb.net", "code-analysis" ]
5
1
794
8
0
2008-09-16T17:01:05.013000
2008-09-16T17:20:03.470000
74,586
74,814
Installing just Quicktime libraries on Windows
There's Quicktime SDK for Windows, but any application that uses it needs quicktime runtime libraries to be installed on the system (SDK itself just has headers and library stubs, and not the actual DLLs). If my application uses Quicktime, I'd like to install the necessary libraries with it's installer, thus not requir...
If you need to redistribute QuickTime, see QuickTime Licensing for details. You're not allowed to redistribute any of the QuickTime libraries without a written agreement with Apple. Many CD-replication companies will actually request proof of this agreement before printing large numbers of CDs. I would definitely not d...
Installing just Quicktime libraries on Windows There's Quicktime SDK for Windows, but any application that uses it needs quicktime runtime libraries to be installed on the system (SDK itself just has headers and library stubs, and not the actual DLLs). If my application uses Quicktime, I'd like to install the necessary...
TITLE: Installing just Quicktime libraries on Windows QUESTION: There's Quicktime SDK for Windows, but any application that uses it needs quicktime runtime libraries to be installed on the system (SDK itself just has headers and library stubs, and not the actual DLLs). If my application uses Quicktime, I'd like to ins...
[ "windows", "installation", "quicktime" ]
1
3
8,674
3
0
2008-09-16T17:04:03.787000
2008-09-16T17:28:41.827000
74,616
75,502
How To Detect If Type is Another Generic Type
example: public static void DoSomething (IDictionary items) { items.Keys.Each(key => { if (items[key] **is IEnumerable **) { /* do something */ } else { /* do something else */ } } Can this be done without using reflection? How do I say IEnumerable in C#? Should I just use IEnumerable since IEnumerable<> implements IEn...
The previously accepted answer is nice but it is wrong. Thankfully, the error is a small one. Checking for IEnumerable is not enough if you really want to know about the generic version of the interface; there are a lot of classes that implement only the nongeneric interface. I'll give the answer in a minute. First, th...
How To Detect If Type is Another Generic Type example: public static void DoSomething (IDictionary items) { items.Keys.Each(key => { if (items[key] **is IEnumerable **) { /* do something */ } else { /* do something else */ } } Can this be done without using reflection? How do I say IEnumerable in C#? Should I just use ...
TITLE: How To Detect If Type is Another Generic Type QUESTION: example: public static void DoSomething (IDictionary items) { items.Keys.Each(key => { if (items[key] **is IEnumerable **) { /* do something */ } else { /* do something else */ } } Can this be done without using reflection? How do I say IEnumerable in C#? ...
[ "c#" ]
35
43
13,314
9
0
2008-09-16T17:07:53.733000
2008-09-16T18:33:28.003000
74,620
74,652
Date.getTime() not including time?
Can't understand why the following takes place: String date = "06-04-2007 07:05"; SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm"); Date myDate = fmt.parse(date); System.out.println(myDate); //Mon Jun 04 07:05:00 EDT 2007 long timestamp = myDate.getTime(); System.out.println(timestamp); //1180955100000 ...
What milliseconds? You are providing only minutes information in the first example, whereas your second example grabs current date from the system with milliseconds, what is it you're looking for? String date = "06-04-2007 07:05:00.999"; SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss.S"); Date myDate ...
Date.getTime() not including time? Can't understand why the following takes place: String date = "06-04-2007 07:05"; SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm"); Date myDate = fmt.parse(date); System.out.println(myDate); //Mon Jun 04 07:05:00 EDT 2007 long timestamp = myDate.getTime(); System.out.p...
TITLE: Date.getTime() not including time? QUESTION: Can't understand why the following takes place: String date = "06-04-2007 07:05"; SimpleDateFormat fmt = new SimpleDateFormat("MM-dd-yyyy HH:mm"); Date myDate = fmt.parse(date); System.out.println(myDate); //Mon Jun 04 07:05:00 EDT 2007 long timestamp = myDate.getTi...
[ "java", "date", "timestamp", "gettime" ]
7
21
47,971
9
0
2008-09-16T17:08:16.943000
2008-09-16T17:11:48.527000
74,625
74,672
What is the best way to force yourself to master vi?
A good while ago, I read an article by the creator of viemu, clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has a great set of graphical cheat sheets that teach the basics a few bits at a time. I'm c...
First of all, you may want to pick up Vim; it has a vastly superior feature set along with everything vi has. That said, it takes discipline to learn. If you have a job and can't afford the productivity hit (without getting fired), I'd suggest taking on a weekend project for the sole purpose of learning the editor. Kee...
What is the best way to force yourself to master vi? A good while ago, I read an article by the creator of viemu, clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has a great set of graphical cheat she...
TITLE: What is the best way to force yourself to master vi? QUESTION: A good while ago, I read an article by the creator of viemu, clearing up a lot of the misconceptions about vi, as well as explaining why it's a good idea (and why it's been very popular for the last 30 years+). The same guy also has a great set of g...
[ "vim", "editor", "text-editor", "vi" ]
209
127
59,066
60
0
2008-09-16T17:08:38.957000
2008-09-16T17:13:36.043000
74,626
96,288
How do you force a CIFS connection to unmount
I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unkillable while you wait. I can't even run ls in my home directory because there is a symlink pointing inside the CIFS mount...
I use lazy unmount: umount -l (that's a lowercase L ) Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)
How do you force a CIFS connection to unmount I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unkillable while you wait. I can't even run ls in my home directory because the...
TITLE: How do you force a CIFS connection to unmount QUESTION: I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unkillable while you wait. I can't even run ls in my home dir...
[ "linux", "samba", "smb", "cifs" ]
169
204
244,559
13
0
2008-09-16T17:08:39.503000
2008-09-18T19:59:16.440000
74,689
74,717
Tools to effectively manage the information?
How do you guys manage the information overflow? What are the tools that you guys use? One of the usefull tool is RSS feed reader. Does Any body uses any other tools or any other ways to effectively manage the information?
Be an information snob. If the blog doesn't absolutely rock your world, don't read it. It's so easy to get bogged down, even obsessed, with too much information. No matter what tools you have, you're still human and can only read so many words per day.
Tools to effectively manage the information? How do you guys manage the information overflow? What are the tools that you guys use? One of the usefull tool is RSS feed reader. Does Any body uses any other tools or any other ways to effectively manage the information?
TITLE: Tools to effectively manage the information? QUESTION: How do you guys manage the information overflow? What are the tools that you guys use? One of the usefull tool is RSS feed reader. Does Any body uses any other tools or any other ways to effectively manage the information? ANSWER: Be an information snob. I...
[ "information-management" ]
3
2
503
12
0
2008-09-16T17:14:52.700000
2008-09-16T17:18:28.963000
74,690
76,699
How do I store the window size between sessions in Qt?
I have a QMainWindow in a Qt application. When I close it I want it to store its current restore size (the size of the window when it is not maximized). This works well when I close the window in restore mode (that is, not maximized). But if I close the window if it is maximized, then next time i start the application ...
Use the QWidget::saveGeometry feature to write the current settings into the registry.(The registry is accessed using QSettings). Then use restoreGeometry() upon startup to return to the previous state.
How do I store the window size between sessions in Qt? I have a QMainWindow in a Qt application. When I close it I want it to store its current restore size (the size of the window when it is not maximized). This works well when I close the window in restore mode (that is, not maximized). But if I close the window if i...
TITLE: How do I store the window size between sessions in Qt? QUESTION: I have a QMainWindow in a Qt application. When I close it I want it to store its current restore size (the size of the window when it is not maximized). This works well when I close the window in restore mode (that is, not maximized). But if I clo...
[ "qt", "window", "size", "restore" ]
21
18
11,721
4
0
2008-09-16T17:15:00.157000
2008-09-16T20:33:35.437000
74,696
75,346
On Windows Mobile device, what is the best way to display an OK button instead of the X button?
I have a C++ program that when run, by default, displays the X in the upper right corner. Clicking X, minimizes the program. I've added code using the SHInitDialog function to change the X to OK, so that clicking OK exits the program. My question: Is there a better method that applies to the window, since SHInitDialog ...
With Windows Mobile 5.0 and higher, using the CreateWindowEx function passing it WS_EX_CAPTIONOKBTN for the extended style works. @ctacke SHDoneButton may have also worked but I wanted to change the main window without handling it like a dialogbox, which is basically what SHInitDialog is doing.
On Windows Mobile device, what is the best way to display an OK button instead of the X button? I have a C++ program that when run, by default, displays the X in the upper right corner. Clicking X, minimizes the program. I've added code using the SHInitDialog function to change the X to OK, so that clicking OK exits th...
TITLE: On Windows Mobile device, what is the best way to display an OK button instead of the X button? QUESTION: I have a C++ program that when run, by default, displays the X in the upper right corner. Clicking X, minimizes the program. I've added code using the SHInitDialog function to change the X to OK, so that cl...
[ "c++", "windows-mobile" ]
2
2
472
3
0
2008-09-16T17:15:49.143000
2008-09-16T18:18:32.033000
74,723
1,052,920
Can you send a signal to Windows Explorer to make it refresh the systray icons?
This problem has been afflicting me for quite a while and it's been really annoying. Every time I login after a reboot/power cycle the explorer takes some time to show up. I've taken the step of waiting for all the services to boot up and then I login, but it doesn't make any difference. The result is always the same: ...
Take a look at this blog entry: REFRESHING THE TASKBAR NOTIFICATION AREA. I am using this code to refresh the system tray to get rid of orphaned icons and it works perfectly. The blog entry is very informative and gives a great explanation of the steps the author performed to discover his solution. #define FW(x,y) Find...
Can you send a signal to Windows Explorer to make it refresh the systray icons? This problem has been afflicting me for quite a while and it's been really annoying. Every time I login after a reboot/power cycle the explorer takes some time to show up. I've taken the step of waiting for all the services to boot up and t...
TITLE: Can you send a signal to Windows Explorer to make it refresh the systray icons? QUESTION: This problem has been afflicting me for quite a while and it's been really annoying. Every time I login after a reboot/power cycle the explorer takes some time to show up. I've taken the step of waiting for all the service...
[ "icons", "windows-explorer", "system-tray", "systray" ]
14
13
21,686
9
0
2008-09-16T17:18:59.557000
2009-06-27T14:33:02.797000
74,728
78,182
Deploying VSTO Project to Server
Is it possible to place an application using vsto if the office is not installed? It doesn't appear to be so, but I was wondering if anyone had a work-around.
VSTO wraps Office's Automation interfaces. Office is doing the work under the covers, so must be installed.
Deploying VSTO Project to Server Is it possible to place an application using vsto if the office is not installed? It doesn't appear to be so, but I was wondering if anyone had a work-around.
TITLE: Deploying VSTO Project to Server QUESTION: Is it possible to place an application using vsto if the office is not installed? It doesn't appear to be so, but I was wondering if anyone had a work-around. ANSWER: VSTO wraps Office's Automation interfaces. Office is doing the work under the covers, so must be inst...
[ "deployment", "ms-office", "vsto" ]
1
2
586
2
0
2008-09-16T17:19:33.237000
2008-09-16T23:02:03.507000
74,790
74,988
Is there a way for my binary to react to some global hotkeys in Linux?
Is it possible to listen for a certain hotkey (e.g: Ctrl - I ) and then perform a specific action? My application is written in C, will only run on Linux, and it doesn't have a GUI. Are there any libraries that help with this kind of task? EDIT: as an example, amarok has global shortcuts, so for example if you map a co...
How global do your hotkeys need to be? Is it enough for them to be global for a X session? In that case you should be able to open an Xlib connection and listen for the events you need. Ordinarily keyboard events in X are delivered to the window that currently has the focus, and propagated up the hierarchy until they a...
Is there a way for my binary to react to some global hotkeys in Linux? Is it possible to listen for a certain hotkey (e.g: Ctrl - I ) and then perform a specific action? My application is written in C, will only run on Linux, and it doesn't have a GUI. Are there any libraries that help with this kind of task? EDIT: as ...
TITLE: Is there a way for my binary to react to some global hotkeys in Linux? QUESTION: Is it possible to listen for a certain hotkey (e.g: Ctrl - I ) and then perform a specific action? My application is written in C, will only run on Linux, and it doesn't have a GUI. Are there any libraries that help with this kind ...
[ "c", "linux", "hotkeys" ]
4
5
748
5
0
2008-09-16T17:25:27.870000
2008-09-16T17:46:19.397000
74,818
213,983
What causes a velocity Template.merge() failure? How does one avoid it?
Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some throw a RuntimeException with the message "Template.merge() failure - Unable to render Velocity Template, '/template.vm'". We have not been able to reproduce the problem and the documentation on the web is pretty insufficie...
What version of Velocity are you using? There were some race conditions in old versions that caused this. Most were squashed in the Velocity 1.5 release. Though i would personally recommend using Velocity 1.6-beta1. It has vastly improved performance (memory and speed) and a lot of minor bug fixes that didn't make it i...
What causes a velocity Template.merge() failure? How does one avoid it? Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some throw a RuntimeException with the message "Template.merge() failure - Unable to render Velocity Template, '/template.vm'". We have not been able to rep...
TITLE: What causes a velocity Template.merge() failure? How does one avoid it? QUESTION: Our team has been experiencing a recurring problem with velocity templates. Upon rendering, some throw a RuntimeException with the message "Template.merge() failure - Unable to render Velocity Template, '/template.vm'". We have no...
[ "java", "velocity" ]
2
3
3,633
5
0
2008-09-16T17:29:01.530000
2008-10-17T22:00:23.167000
74,829
74,833
How to run a script as root on Mac OS X?
What should I type on the Mac OS X terminal to run a script as root?
As in any unix-based environment, you can use the sudo command: $ sudo script-name It will ask for your password (your own, not a separate root password).
How to run a script as root on Mac OS X? What should I type on the Mac OS X terminal to run a script as root?
TITLE: How to run a script as root on Mac OS X? QUESTION: What should I type on the Mac OS X terminal to run a script as root? ANSWER: As in any unix-based environment, you can use the sudo command: $ sudo script-name It will ask for your password (your own, not a separate root password).
[ "macos", "terminal" ]
39
49
219,927
5
0
2008-09-16T17:30:20.730000
2008-09-16T17:31:16.250000
74,844
76,829
Bash or KornShell (ksh)?
I am not new to *nix, however lately I have been spending a lot of time at the prompt. My question is what are the advantages of using KornShell (ksh) or Bash Shell? Where are the pitfalls of using one over the other? Looking to understand from the perspective of a user, rather than purely scripting.
Bash. The various UNIX and Linux implementations have various different source level implementations of ksh, some of which are real ksh, some of which are pdksh implementations and some of which are just symlinks to some other shell that has a "ksh" personality. This can lead to weird differences in execution behavior....
Bash or KornShell (ksh)? I am not new to *nix, however lately I have been spending a lot of time at the prompt. My question is what are the advantages of using KornShell (ksh) or Bash Shell? Where are the pitfalls of using one over the other? Looking to understand from the perspective of a user, rather than purely scri...
TITLE: Bash or KornShell (ksh)? QUESTION: I am not new to *nix, however lately I have been spending a lot of time at the prompt. My question is what are the advantages of using KornShell (ksh) or Bash Shell? Where are the pitfalls of using one over the other? Looking to understand from the perspective of a user, rathe...
[ "bash", "shell", "unix", "scripting", "ksh" ]
73
48
121,266
12
0
2008-09-16T17:32:30.413000
2008-09-16T20:43:39.890000
74,847
74,923
What is the recommended error_reporting() setting for development? What about E_STRICT?
Typically I use E_ALL to see anything that PHP might say about my code to try and improve it. I just noticed a error constant E_STRICT, but have never used or heard about it, is this a good setting to use for development? The manual says: Run-time notices. Enable to have PHP suggest changes to your code which will ensu...
In PHP 5, the things covered by E_STRICT are not covered by E_ALL, so to get the most information, you need to combine them: error_reporting(E_ALL | E_STRICT); In PHP 5.4, E_STRICT will be included in E_ALL, so you can use just E_ALL. You can also use error_reporting(-1); which will always enable all errors. Which is m...
What is the recommended error_reporting() setting for development? What about E_STRICT? Typically I use E_ALL to see anything that PHP might say about my code to try and improve it. I just noticed a error constant E_STRICT, but have never used or heard about it, is this a good setting to use for development? The manual...
TITLE: What is the recommended error_reporting() setting for development? What about E_STRICT? QUESTION: Typically I use E_ALL to see anything that PHP might say about my code to try and improve it. I just noticed a error constant E_STRICT, but have never used or heard about it, is this a good setting to use for devel...
[ "php", "error-reporting" ]
29
44
20,613
8
0
2008-09-16T17:32:45.717000
2008-09-16T17:39:46.307000
74,865
74,878
How can I cause subversion to check out projects from other repositories?
I recently was working with a subversion project that checked out code not only from the repository I was working with, but also from a separate repository on a different server. How can I configure my repository to do this? I'm using the subversion client version 1.3.2 on Linux, and I also have access to TortoiseSVN v...
See svn:externals: Sometimes it is useful to construct a working copy that is made out of a number of different checkouts. For example, you may want different subdirectories to come from different locations in a repository, or perhaps from different repositories altogether. You could certainly setup such a scenario by ...
How can I cause subversion to check out projects from other repositories? I recently was working with a subversion project that checked out code not only from the repository I was working with, but also from a separate repository on a different server. How can I configure my repository to do this? I'm using the subvers...
TITLE: How can I cause subversion to check out projects from other repositories? QUESTION: I recently was working with a subversion project that checked out code not only from the repository I was working with, but also from a separate repository on a different server. How can I configure my repository to do this? I'm...
[ "svn", "tortoisesvn", "svn-externals" ]
3
11
457
4
0
2008-09-16T17:34:46.023000
2008-09-16T17:36:19.890000
74,879
74,939
Any tools to generate an XSD schema from an XML instance document?
I am looking for a tool which will take an XML instance document and output a corresponding XSD schema. I certainly recognize that the generated XSD schema will be limited when compared to creating a schema by hand (it probably won't handle optional or repeating elements, or data constraints), but it could at least ser...
the Microsoft XSD inference tool is a good, free solution. Many XML editing tools, such as XmlSpy (mentioned by @Garth Gilmour) or OxygenXML Editor also have that feature. They're rather expensive, though. BizTalk Server also has an XSD inferring tool as well. edit: I just discovered the.net XmlSchemaInference class, s...
Any tools to generate an XSD schema from an XML instance document? I am looking for a tool which will take an XML instance document and output a corresponding XSD schema. I certainly recognize that the generated XSD schema will be limited when compared to creating a schema by hand (it probably won't handle optional or ...
TITLE: Any tools to generate an XSD schema from an XML instance document? QUESTION: I am looking for a tool which will take an XML instance document and output a corresponding XSD schema. I certainly recognize that the generated XSD schema will be limited when compared to creating a schema by hand (it probably won't h...
[ "xml", "xsd", "schema", "generator" ]
153
69
202,119
10
0
2008-09-16T17:36:26.940000
2008-09-16T17:41:19.923000
74,880
74,948
Delegating a task in and getting notified when it completes (in C#)
Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#: SomeMethod { // Member of AClass{} DoSomething; Start WorkerMethod() from BClass in another thread; DoSomethingElse; } Then, when WorkerMethod() is complete, run this: void SomeOtherMethod() // Also mem...
The BackgroundWorker class was added to.NET 2.0 for this exact purpose. In a nutshell you do: BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += delegate { myBClass.DoHardWork(); } worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(SomeOtherMethod); worker.RunWorkerAsync(); You can also add...
Delegating a task in and getting notified when it completes (in C#) Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#: SomeMethod { // Member of AClass{} DoSomething; Start WorkerMethod() from BClass in another thread; DoSomethingElse; } Then, when Work...
TITLE: Delegating a task in and getting notified when it completes (in C#) QUESTION: Conceptually, I would like to accomplish the following but have had trouble understand how to code it properly in C#: SomeMethod { // Member of AClass{} DoSomething; Start WorkerMethod() from BClass in another thread; DoSomethingElse;...
[ "c#", "delegates", "notifications" ]
9
13
2,799
7
0
2008-09-16T17:36:36.283000
2008-09-16T17:41:52.870000
74,883
499,837
How do I compile mod_dontdothat on Windows
I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this? Edit: I've tried compiling the file according to the readme on the site and I've tried to add extra libs to reduce the link errors. Ive got the following installed: Apache 2.2.9 Visual Studio 2008 ActivePerl apxs-win32 from ApacheL...
I managed to compile the module. Prerequisites: Apache 2.2.11 apxs-win32 from www.apachelounge.com Visual Studio 2005 Active Perl 5.8.8 (you need perl for apxs-win32 installation) Here is a step-by-step guide. Download these packages: http://subversion.tigris.org/files/documents/15/44595/svn-win32-1.5.5_dev.zip (we nee...
How do I compile mod_dontdothat on Windows I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this? Edit: I've tried compiling the file according to the readme on the site and I've tried to add extra libs to reduce the link errors. Ive got the following installed: Apache 2.2.9 Visual Stu...
TITLE: How do I compile mod_dontdothat on Windows QUESTION: I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this? Edit: I've tried compiling the file according to the readme on the site and I've tried to add extra libs to reduce the link errors. Ive got the following installed: Apach...
[ "svn", "apache" ]
2
7
2,681
3
0
2008-09-16T17:36:51.213000
2009-02-01T00:01:31.467000
74,886
74,920
How can I create a command line (unix/linux) instruction that uses variables to execute numerous commands?
I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a time (long story; nutshell: one is broken and I can't figure out which one). So I need to do something like: sudo mv backup/g...
Put the following into a file named gemmove: #!/bin/bash if [ "x$1" == x ]; then echo "Must have an arg" exit 1 fi for d in gem doc specification; do mv "backup/$d/$1" "$d" done then do chmod a+x gemmove and then call sudo /path/to/gemmove foo to move the foo gem from the backup dirs into the real ones
How can I create a command line (unix/linux) instruction that uses variables to execute numerous commands? I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a time (long story; ...
TITLE: How can I create a command line (unix/linux) instruction that uses variables to execute numerous commands? QUESTION: I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a ...
[ "bash", "shell", "command-line" ]
1
5
657
3
0
2008-09-16T17:37:02.243000
2008-09-16T17:39:38.867000
74,892
75,103
Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px?
The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alte...
8 pixels is the cutoff. The reason is because JPEG images are simply an array of 8x8 DCT blocks; if the image resolution isn't mod8 in both directions, the encoder has to pad the sides up to the next mod8 resolution. This in practice is not very expensive bit-wise; what's much worse are the cases when an image has shar...
Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px? The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a multiple 1MCU bloc...
TITLE: Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px? QUESTION: The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a ...
[ "image", "compression", "jpeg", "lossy-compression" ]
12
22
3,996
5
0
2008-09-16T17:37:38.980000
2008-09-16T17:57:30.070000
74,902
74,934
Uninstall Mono from Mac OS X v10.5 Leopard
I installed Mono on my iMac last night and I immidiately had a change of heart! I don't think Mono is ready for prime time. The Mono website says to run the following script to uninstall: #!/bin/sh -x #This script removes Mono from an OS X System. It must be run as root rm -r /Library/Frameworks/Mono.framework rm -r /L...
The above script simply deletes everything related to Mono on your system -- and since the developers wrote it, I'm sure they didn't miss anything:) Unlike some other operating systems made by software companies that rhyme with "Macrosoft", uninstalling software in OS X is as simple as deleting the files, 99% of the ti...
Uninstall Mono from Mac OS X v10.5 Leopard I installed Mono on my iMac last night and I immidiately had a change of heart! I don't think Mono is ready for prime time. The Mono website says to run the following script to uninstall: #!/bin/sh -x #This script removes Mono from an OS X System. It must be run as root rm -r ...
TITLE: Uninstall Mono from Mac OS X v10.5 Leopard QUESTION: I installed Mono on my iMac last night and I immidiately had a change of heart! I don't think Mono is ready for prime time. The Mono website says to run the following script to uninstall: #!/bin/sh -x #This script removes Mono from an OS X System. It must be ...
[ "mono", "osx-leopard" ]
20
11
27,990
7
0
2008-09-16T17:38:20.850000
2008-09-16T17:40:50.563000
74,928
74,970
Tool to parse a file
I'm trying to figure out the best way to parse a GE Logician MEL trace file to make it easier to read. It has segments like >{!gDYNAMIC_3205_1215032915_810 = (clYN)} execute>GDYNAMIC_3205_1215032915_810 = "Yes, No" results>"Yes, No" execute>end results>"Yes, No" >{!gDYNAMIC_3205_1215032893_294 = (clYN)} execute>GDYNAM...
Make a grammar using ANTLR. If you're using C, lex/yacc are native. ANTLR creates native parsers in Java, Python and.NET. Your output looks like a repl; try asking the vendor for a spec on the input language.
Tool to parse a file I'm trying to figure out the best way to parse a GE Logician MEL trace file to make it easier to read. It has segments like >{!gDYNAMIC_3205_1215032915_810 = (clYN)} execute>GDYNAMIC_3205_1215032915_810 = "Yes, No" results>"Yes, No" execute>end results>"Yes, No" >{!gDYNAMIC_3205_1215032893_294 = (...
TITLE: Tool to parse a file QUESTION: I'm trying to figure out the best way to parse a GE Logician MEL trace file to make it easier to read. It has segments like >{!gDYNAMIC_3205_1215032915_810 = (clYN)} execute>GDYNAMIC_3205_1215032915_810 = "Yes, No" results>"Yes, No" execute>end results>"Yes, No" >{!gDYNAMIC_3205_...
[ "parsing" ]
3
5
554
7
0
2008-09-16T17:40:02.627000
2008-09-16T17:44:09.323000
74,947
164,465
How can i combine two columns containing Richtext data/files
What is the best way to maniupulate richtext / *.rtf data in SQL server 2005 / 2008 I have looked at ocx solutions. Maybe creating some CLR stored procs?? The problem is that I have several notes written in richtext that need to be combined for ease of reporting. Like SELECT @Notes = @Notes + RTFColumn FROM Notestable ...
CLR would be the equivalent of writing a program and might not work as efficiently. The database isn't really designed to do what you are asking of it and, a CLR sproc that handled it would be blocking, on many levels. So you would be better off writing a program that manually processed through the rows to do what you ...
How can i combine two columns containing Richtext data/files What is the best way to maniupulate richtext / *.rtf data in SQL server 2005 / 2008 I have looked at ocx solutions. Maybe creating some CLR stored procs?? The problem is that I have several notes written in richtext that need to be combined for ease of report...
TITLE: How can i combine two columns containing Richtext data/files QUESTION: What is the best way to maniupulate richtext / *.rtf data in SQL server 2005 / 2008 I have looked at ocx solutions. Maybe creating some CLR stored procs?? The problem is that I have several notes written in richtext that need to be combined ...
[ "sql-server" ]
0
0
315
2
0
2008-09-16T17:41:49.813000
2008-10-02T20:37:03.763000
74,957
75,091
Is there a PowerShell "string does not contain" cmdlet or syntax?
In PowerShell I'm reading in a text file. I'm then doing a Foreach-Object over the text file and am only interested in the lines that do NOT contain strings that are in $arrayOfStringsNotInterestedIn. What is the syntax for this? Get-Content $filename | Foreach-Object {$_}
If $arrayofStringsNotInterestedIn is an [array] you should use -notcontains: Get-Content $FileName | foreach-object { ` if ($arrayofStringsNotInterestedIn -notcontains $_) { $) } or better (IMO) Get-Content $FileName | where { $arrayofStringsNotInterestedIn -notcontains $_}
Is there a PowerShell "string does not contain" cmdlet or syntax? In PowerShell I'm reading in a text file. I'm then doing a Foreach-Object over the text file and am only interested in the lines that do NOT contain strings that are in $arrayOfStringsNotInterestedIn. What is the syntax for this? Get-Content $filename | ...
TITLE: Is there a PowerShell "string does not contain" cmdlet or syntax? QUESTION: In PowerShell I'm reading in a text file. I'm then doing a Foreach-Object over the text file and am only interested in the lines that do NOT contain strings that are in $arrayOfStringsNotInterestedIn. What is the syntax for this? Get-Co...
[ "powershell" ]
32
47
182,748
3
0
2008-09-16T17:42:41.713000
2008-09-16T17:56:12.603000
74,986
588,987
XBAP Application, can these work in Google Chrome?
I'm developing a.NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome.
XBAP applications do work in google chrome, however you have to set your environments PATH variable to the directory where xpcom.dll is located. for example SET PATH=PATH;"C:\Program Files\Mozilla Firefox"
XBAP Application, can these work in Google Chrome? I'm developing a.NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome.
TITLE: XBAP Application, can these work in Google Chrome? QUESTION: I'm developing a.NET 3.5 XBAP application that runs perfectly fine in FF3 and IE6/7 etc. I'm just wondering if its possible to get these to run under other browsers, specifically (as its in the limelight at the moment) Google Chrome. ANSWER: XBAP app...
[ "c#", ".net", "google-chrome", "xbap" ]
24
21
34,042
4
0
2008-09-16T17:45:57.853000
2009-02-26T03:35:52.360000
74,993
75,024
Which resources should one monitor on a Linux server running a web-server or database
When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load. Some examples for this would be CPU utilization, memory usage, and perhaps disk space. What other resource should I...
As many as you can afford to, and can then graph/understand/look at the results. Monitoring resources is useful for not only capacity planning, but anomaly detection, and anomaly detection significantly helps your ability to detect security events. You have a decent start with your basic graphs. I'd want to also monito...
Which resources should one monitor on a Linux server running a web-server or database When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load. Some examples for this would ...
TITLE: Which resources should one monitor on a Linux server running a web-server or database QUESTION: When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load. Some exampl...
[ "linux", "performance", "system-administration" ]
6
6
2,905
9
0
2008-09-16T17:46:50.987000
2008-09-16T17:50:11.633000
75,001
109,518
Why isn't there a viable mod_ruby for Apache yet?
As popular as Ruby and Rails are, it seems like this problem would already be solved. JRuby and mod_rails are all fine and dandy, but why isn't there an Apache mod for just straight Ruby?
The basic problem is this: for a long time, MRI was the only feasible Ruby Implementation. MRI has a number of problems that make it hard to embed it into another application (which is basically what mod_ruby does: it embeds MRI in Apache), especially a multi-threaded one (which Apache is). It is not particularly threa...
Why isn't there a viable mod_ruby for Apache yet? As popular as Ruby and Rails are, it seems like this problem would already be solved. JRuby and mod_rails are all fine and dandy, but why isn't there an Apache mod for just straight Ruby?
TITLE: Why isn't there a viable mod_ruby for Apache yet? QUESTION: As popular as Ruby and Rails are, it seems like this problem would already be solved. JRuby and mod_rails are all fine and dandy, but why isn't there an Apache mod for just straight Ruby? ANSWER: The basic problem is this: for a long time, MRI was the...
[ "ruby-on-rails", "ruby", "apache" ]
12
18
1,470
5
0
2008-09-16T17:47:41
2008-09-20T21:42:21.830000
75,011
75,066
Does Scripting.Dictionary's RemoveAll() method release all of its elements first?
In a VB6 application, I have a Dictionary whose keys are String s and values are instances of a custom class. If I call RemoveAll() on the Dictionary, will it first free the custom objects? Or do I explicitly need to do this myself? Dim d as Scripting.Dictionary d("a") = New clsCustom d("b") = New clsCustom ' Are the...
Yes, all objects in the Dictionary will be released after a call to RemoveAll(). From a performance (as in speed) standpoint I would say those lines setting the variables to Nothing are unnecessary, because the code has to first look them up based on the key names whereas RemoveAll() will enumerate and release everythi...
Does Scripting.Dictionary's RemoveAll() method release all of its elements first? In a VB6 application, I have a Dictionary whose keys are String s and values are instances of a custom class. If I call RemoveAll() on the Dictionary, will it first free the custom objects? Or do I explicitly need to do this myself? Dim d...
TITLE: Does Scripting.Dictionary's RemoveAll() method release all of its elements first? QUESTION: In a VB6 application, I have a Dictionary whose keys are String s and values are instances of a custom class. If I call RemoveAll() on the Dictionary, will it first free the custom objects? Or do I explicitly need to do ...
[ "vb6", "memory-management", "dictionary" ]
2
4
4,339
3
0
2008-09-16T17:49:05.707000
2008-09-16T17:54:06.490000
75,014
82,025
Detecting concurrent modifications?
In a multi-threaded application I'm working on, we occasionally see ConcurrentModificationExceptions on our Lists (which are mostly ArrayList, sometimes Vectors). But there are other times when I think concurrent modifications are happening because iterating through the collection appears to be missing items, but no ex...
Your original question seems to be asking for an iterator that sees live updates to the underlying collection while remaining thread-safe. This is an incredibly expensive problem to solve in the general case, which is why none of the standard collection classes do it. There are lots of ways of achieving partial solutio...
Detecting concurrent modifications? In a multi-threaded application I'm working on, we occasionally see ConcurrentModificationExceptions on our Lists (which are mostly ArrayList, sometimes Vectors). But there are other times when I think concurrent modifications are happening because iterating through the collection ap...
TITLE: Detecting concurrent modifications? QUESTION: In a multi-threaded application I'm working on, we occasionally see ConcurrentModificationExceptions on our Lists (which are mostly ArrayList, sometimes Vectors). But there are other times when I think concurrent modifications are happening because iterating through...
[ "java", "collections" ]
10
4
6,916
12
0
2008-09-16T17:49:22.370000
2008-09-17T11:04:26.763000
75,052
259,891
How to stop a mp3 file from being downloaded by flash when in streaming mode
I have a flash player that has a set of songs loaded via an xml file. The files dont start getting stream until you pick one. If I quickly cycle through each of the 8 files, then flash starts trying to download each of the 8 files at the same time. I'm wondering if there is a way to clear the file that is being downloa...
Check out Sound.Close(). From the docs: " Closes the stream, causing any download of data to cease. No data may be read from the stream after the close() method is called. " This is the source code example from the linked docs: package { import flash.display.Sprite; import flash.net.URLRequest; import flash.media.Sound...
How to stop a mp3 file from being downloaded by flash when in streaming mode I have a flash player that has a set of songs loaded via an xml file. The files dont start getting stream until you pick one. If I quickly cycle through each of the 8 files, then flash starts trying to download each of the 8 files at the same ...
TITLE: How to stop a mp3 file from being downloaded by flash when in streaming mode QUESTION: I have a flash player that has a set of songs loaded via an xml file. The files dont start getting stream until you pick one. If I quickly cycle through each of the 8 files, then flash starts trying to download each of the 8 ...
[ "flash", "streaming" ]
1
1
823
2
0
2008-09-16T17:52:56.167000
2008-11-03T20:44:26.123000
75,064
95,084
Beginning Java EE
I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is the best applicatio...
"what java enterprise applications are, how they are different from normal java classes etc" Well they are normal classes. They are ran by an application server. The "application server" is often just a JVM, but sometimes enhanced or modified or extended by the vendor. But that shouldn't be any concern to you. The appl...
Beginning Java EE I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is t...
TITLE: Beginning Java EE QUESTION: I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes et...
[ "jakarta-ee" ]
7
16
9,353
4
0
2008-09-16T17:54:02.187000
2008-09-18T18:07:17.003000
75,076
75,297
Obtain parameter values from a stack frame in .NET?
I would like to be able to obtain all the parameter values from the stack frame in.NET. A bit like how you're able to see the values in the call stack when in the Visual Studio debugger. My approach has concentrated on using the StackFrame class and then to reflect over a ParameterInfo array. I've had success with refl...
It seems it can't be done that way. It will only provide meta information about the method and its parameters. Not the actual value at the time of the callstack. Some suggest deriving your classes from ContextBoundObject and use IMessageSink to be notified off all method calls and the values of the parameters. This is ...
Obtain parameter values from a stack frame in .NET? I would like to be able to obtain all the parameter values from the stack frame in.NET. A bit like how you're able to see the values in the call stack when in the Visual Studio debugger. My approach has concentrated on using the StackFrame class and then to reflect ov...
TITLE: Obtain parameter values from a stack frame in .NET? QUESTION: I would like to be able to obtain all the parameter values from the stack frame in.NET. A bit like how you're able to see the values in the call stack when in the Visual Studio debugger. My approach has concentrated on using the StackFrame class and ...
[ "c#", ".net", "reflection" ]
21
10
8,992
2
0
2008-09-16T17:54:56.380000
2008-09-16T18:13:42.390000
75,105
75,155
What datatype should be used for storing phone numbers in SQL Server 2005?
I need to store phone numbers in a table. Please suggest which datatype should I use? Wait. Please read on before you hit reply.. This field needs to be indexed heavily as Sales Reps can use this field for searching (including wild character search). As of now, we are expecting phone numbers to come in a number of form...
Does this include: International numbers? Extensions? Other information besides the actual number (like "ask for bobby")? If all of these are no, I would use a 10 char field and strip out all non-numeric data. If the first is a yes and the other two are no, I'd use two varchar(50) fields, one for the original input and...
What datatype should be used for storing phone numbers in SQL Server 2005? I need to store phone numbers in a table. Please suggest which datatype should I use? Wait. Please read on before you hit reply.. This field needs to be indexed heavily as Sales Reps can use this field for searching (including wild character sea...
TITLE: What datatype should be used for storing phone numbers in SQL Server 2005? QUESTION: I need to store phone numbers in a table. Please suggest which datatype should I use? Wait. Please read on before you hit reply.. This field needs to be indexed heavily as Sales Reps can use this field for searching (including ...
[ "sql-server", "indexing" ]
103
71
437,168
17
0
2008-09-16T17:57:31.257000
2008-09-16T18:02:48.187000
75,123
75,178
Remove columns from DataTable in C#
I have a DataSet which I get a DataTable from that I am being passed back from a function call. It has 15-20 columns, however I only want 10 columns of the data. Is there a way to remove those columns that I don't want, copy the DataTable to another that has only the columns defined that I want or is it just better to ...
Aside from limiting the columns selected to reduce bandwidth and memory: DataTable t; t.Columns.Remove("columnName"); t.Columns.RemoveAt(columnIndex);
Remove columns from DataTable in C# I have a DataSet which I get a DataTable from that I am being passed back from a function call. It has 15-20 columns, however I only want 10 columns of the data. Is there a way to remove those columns that I don't want, copy the DataTable to another that has only the columns defined ...
TITLE: Remove columns from DataTable in C# QUESTION: I have a DataSet which I get a DataTable from that I am being passed back from a function call. It has 15-20 columns, however I only want 10 columns of the data. Is there a way to remove those columns that I don't want, copy the DataTable to another that has only th...
[ "c#", "asp.net" ]
148
367
377,164
4
0
2008-09-16T18:00:05.183000
2008-09-16T18:04:39.803000
75,134
75,259
How to make jQuery effects run in sequence, not simultaneously?
How do I have two effects in jQuery run in sequence, not simultaneously? Take this piece of code for example: $("#show-projects").click(function() { $(".page:visible").fadeOut("normal"); $("#projects").fadeIn("normal"); }); The fadeOut and the fadeIn run simultaneously, how do I make them run one after the other?
You can supply a callback to the effects functions that run after the effect has completed. $("#show-projects").click(function() { $(".page:visible").fadeOut("normal", function() { $("#projects").fadeIn("normal"); }); });
How to make jQuery effects run in sequence, not simultaneously? How do I have two effects in jQuery run in sequence, not simultaneously? Take this piece of code for example: $("#show-projects").click(function() { $(".page:visible").fadeOut("normal"); $("#projects").fadeIn("normal"); }); The fadeOut and the fadeIn run s...
TITLE: How to make jQuery effects run in sequence, not simultaneously? QUESTION: How do I have two effects in jQuery run in sequence, not simultaneously? Take this piece of code for example: $("#show-projects").click(function() { $(".page:visible").fadeOut("normal"); $("#projects").fadeIn("normal"); }); The fadeOut an...
[ "javascript", "jquery" ]
16
32
32,164
4
0
2008-09-16T18:00:40.687000
2008-09-16T18:10:27.403000
75,145
75,177
How do you quickly find the URL for a .NET framework method on MSDN?
How to you find the URL that represents the documentation of a.NET framework method on the MSDN website? For example, I want to embed the URL for the.NET framework method into some comments in some code. The normal "mangled" URL that one gets searching MSDN isn't very friendly looking: http://msdn.microsoft.com/library...
It's simple -- just add the name of the method to the end of http://msdn.microsoft.com//library/. For example, to find the URL for the System.Byte.ToString method go to http://msdn.microsoft.com//library/System.Byte.ToString
How do you quickly find the URL for a .NET framework method on MSDN? How to you find the URL that represents the documentation of a.NET framework method on the MSDN website? For example, I want to embed the URL for the.NET framework method into some comments in some code. The normal "mangled" URL that one gets searchin...
TITLE: How do you quickly find the URL for a .NET framework method on MSDN? QUESTION: How to you find the URL that represents the documentation of a.NET framework method on the MSDN website? For example, I want to embed the URL for the.NET framework method into some comments in some code. The normal "mangled" URL that...
[ ".net", "msdn" ]
1
2
275
6
0
2008-09-16T18:02:03.727000
2008-09-16T18:04:38.790000
75,153
75,307
General Development Notes
During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse. I need a place to keep the solution(what I did), and I need to find it somehow, which may be m...
Jeff Atwood recommends using Stack Overflow for this kind of thing. Post a question (your problem) and then post an answer (the solution you found). This lets you share the information with the world, and maybe get some valuable feedback or better solutions. (Wow, I got downvoted for repeating what Jeff Atwood said. I ...
General Development Notes During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse. I need a place to keep the solution(what I did), and I need to find ...
TITLE: General Development Notes QUESTION: During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse. I need a place to keep the solution(what I did), a...
[ "code-snippets", "knowledge-management" ]
4
3
1,515
13
0
2008-09-16T18:02:37.953000
2008-09-16T18:14:33.587000
75,159
83,666
What is the easiest way to get total number for lines of code (LOC) in SQL Server?
I need to provide statistics on how many lines of code (LOC) associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored procedures, functions, triggers, etc. How can I easily get that info? Can it be done (accurately) wi...
In Management Studio, right click the database you want a line count for... select Tasks -> Generate Scripts, you can select script options in the Scripts Wizard to include or exclude objects, when you have it set the way you like it can generate to a new query window
What is the easiest way to get total number for lines of code (LOC) in SQL Server? I need to provide statistics on how many lines of code (LOC) associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored procedures, funct...
TITLE: What is the easiest way to get total number for lines of code (LOC) in SQL Server? QUESTION: I need to provide statistics on how many lines of code (LOC) associated with a system. The application part is easy but I need to also include any code residing within the SQL Server database. This would apply to stored...
[ "sql-server", "database", "t-sql", "statistics" ]
2
5
2,178
3
0
2008-09-16T18:03:17.420000
2008-09-17T14:13:26.467000
75,168
81,858
Is there a working on-the-fly compilation in NetBeans 6.5 and how well is it doing?
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java files. This feature is well known from Eclipse: Simply store the file and the compiled class is stored, too. Is NetBeans working the same way? If not, how is it ticking?
Yes, it's the same I believe... Here's a video showing it in action
Is there a working on-the-fly compilation in NetBeans 6.5 and how well is it doing? I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java files. This feature is well known from Eclipse: Simply store the file and the compiled class is stored, too. Is NetBeans working the same way? If n...
TITLE: Is there a working on-the-fly compilation in NetBeans 6.5 and how well is it doing? QUESTION: I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java files. This feature is well known from Eclipse: Simply store the file and the compiled class is stored, too. Is NetBeans working ...
[ "java", "netbeans", "compilation" ]
0
1
246
1
0
2008-09-16T18:03:54.173000
2008-09-17T10:32:56.403000
75,180
75,202
How to display a dynamically allocated array in the Visual Studio debugger?
If you have a statically allocated array, the Visual Studio debugger can easily display all of the array elements. However, if you have an array allocated dynamically and pointed to by a pointer, it will only display the first element of the array when you click the + to expand it. Is there an easy way to tell the debu...
Yes, simple. say you have char *a = new char[10]; writing in the debugger: a,10 would show you the content as if it were an array.
How to display a dynamically allocated array in the Visual Studio debugger? If you have a statically allocated array, the Visual Studio debugger can easily display all of the array elements. However, if you have an array allocated dynamically and pointed to by a pointer, it will only display the first element of the ar...
TITLE: How to display a dynamically allocated array in the Visual Studio debugger? QUESTION: If you have a statically allocated array, the Visual Studio debugger can easily display all of the array elements. However, if you have an array allocated dynamically and pointed to by a pointer, it will only display the first...
[ "c++", "c", "visual-studio", "debugging" ]
158
220
70,896
9
0
2008-09-16T18:04:40.257000
2008-09-16T18:06:26.743000
75,181
75,228
Problem accessing the content of a div when that content came from an Ajax call
Here's a very simple Prototype example. All it does is, on window load, an ajax call which sticks some html into a div. The thing that's confusing is the context in which Prototype understands that the div actually has stuff in it. If you look at the onSuccess part of the ajax call, you'll see that at that point $('con...
The first letter of AJAX stands for "asynchronous". This means that the AJAX call is performed in the background, i.e. the AJAX request call immediately returns. This means that the code immediately after it is normally actually executed before the onSuccess handler gets called (and before the AJAX request has even fin...
Problem accessing the content of a div when that content came from an Ajax call Here's a very simple Prototype example. All it does is, on window load, an ajax call which sticks some html into a div. The thing that's confusing is the context in which Prototype understands that the div actually has stuff in it. If you l...
TITLE: Problem accessing the content of a div when that content came from an Ajax call QUESTION: Here's a very simple Prototype example. All it does is, on window load, an ajax call which sticks some html into a div. The thing that's confusing is the context in which Prototype understands that the div actually has stu...
[ "javascript", "dom", "prototypejs" ]
0
5
1,373
4
0
2008-09-16T18:04:42.427000
2008-09-16T18:08:21.963000
75,182
88,716
Detecting a chroot jail from within
How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detection. [edit 20080916 142430 EST] Simply looking around t...
The inode for / will always be 2 if it's the root directory of an ext2/ext3/ext4 filesystem, but you may be chrooted inside a complete filesystem. If it's just chroot (and not some other virtualization), you could run mount and compare the mounted filesystems against what you see. Verify that every mount point has inod...
Detecting a chroot jail from within How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detection. [edit 20080916...
TITLE: Detecting a chroot jail from within QUESTION: How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detecti...
[ "linux", "unix", "posix", "bsd", "chroot" ]
22
13
17,262
8
0
2008-09-16T18:04:42.457000
2008-09-17T23:36:39.733000
75,191
87,648
What is an unsigned char?
In C/C++, what an unsigned char is used for? How is it different from a regular char?
In C++, there are three distinct character types: char signed char unsigned char 1. char If you are using character types for text, use the unqualified char: it is the type of character literals like 'a' or '0' (in C++ only, in C their type is int ) it is the type that makes up C strings like "abcde" It also works out ...
What is an unsigned char? In C/C++, what an unsigned char is used for? How is it different from a regular char?
TITLE: What is an unsigned char? QUESTION: In C/C++, what an unsigned char is used for? How is it different from a regular char? ANSWER: In C++, there are three distinct character types: char signed char unsigned char 1. char If you are using character types for text, use the unqualified char: it is the type of chara...
[ "c++", "c", "char" ]
547
615
738,302
16
0
2008-09-16T18:05:18.557000
2008-09-17T21:04:17.353000
75,213
75,262
scope resolution operator without a scope
In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:::foo();
It means global scope. You might need to use this operator when you have conflicting functions or variables in the same scope and you need to use a global one. You might have something like: void bar(); // this is a global function class foo { void some_func() {::bar(); } // this function is calling the global bar() a...
scope resolution operator without a scope In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:::foo();
TITLE: scope resolution operator without a scope QUESTION: In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:::foo(); ANSWER: It means global scope. You might need to use this operator when you have conflicting functions or variables in the same scope and you need to...
[ "c++" ]
77
92
14,752
6
0
2008-09-16T18:06:50.643000
2008-09-16T18:10:38.807000
75,218
75,439
How can I detect when an Exception's been thrown globally in Java?
How can I detect when an Exception has been thrown anywhere in my application? I'm try to auto-magically send myself an email whenever an exception is thrown anywhere in my Java Desktop Application. I figure this way I can be more proactive. I know I could just explicitly log and notify myself whenever an exception occ...
You probobly don't want to mail on any exception. There are lots of code in the JDK that actaully depend on exceptions to work normally. What I presume you are more inerested in are uncaught exceptions. If you are catching the exceptions you should handle notifications there. In a desktop app there are two places to wo...
How can I detect when an Exception's been thrown globally in Java? How can I detect when an Exception has been thrown anywhere in my application? I'm try to auto-magically send myself an email whenever an exception is thrown anywhere in my Java Desktop Application. I figure this way I can be more proactive. I know I co...
TITLE: How can I detect when an Exception's been thrown globally in Java? QUESTION: How can I detect when an Exception has been thrown anywhere in my application? I'm try to auto-magically send myself an email whenever an exception is thrown anywhere in my Java Desktop Application. I figure this way I can be more proa...
[ "java", "exception" ]
27
37
13,130
10
0
2008-09-16T18:07:34.837000
2008-09-16T18:26:45.837000
75,246
75,757
What are the implications of running a Microsoft access database in both 2003 and 2007?
What are the implications of running a Microsoft Access Database in both 2003 and 2007? Is there some class I forgot to take? The program was originally built in office 2003, and then run in 2007. Issues seem to happen when the machine it is being run on has both 2003 and 2007 on it. The issue would also appear to stem...
Microsoft's official position is that installing multiple office versions on the same pc is not supported and not recommended, and Access 2007 seems to be designed to prove that to us! That said, you can avoid most issues by doing the following: 1 - Splitting the db into a back end and front end. Place the back end (ta...
What are the implications of running a Microsoft access database in both 2003 and 2007? What are the implications of running a Microsoft Access Database in both 2003 and 2007? Is there some class I forgot to take? The program was originally built in office 2003, and then run in 2007. Issues seem to happen when the mach...
TITLE: What are the implications of running a Microsoft access database in both 2003 and 2007? QUESTION: What are the implications of running a Microsoft Access Database in both 2003 and 2007? Is there some class I forgot to take? The program was originally built in office 2003, and then run in 2007. Issues seem to ha...
[ "ms-access", "vba" ]
1
1
2,196
3
0
2008-09-16T18:09:19.810000
2008-09-16T19:01:59.090000
75,255
5,200,638
How do you start running the program over again in gdb with 'target remote'?
When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again. When you're running gdb on an embedded system, as with the command target localhost:3210, how do you start the program over again without quitting and restarting your ...
You are looking for Multi-Process Mode for gdbserver and set remote exec-file filename
How do you start running the program over again in gdb with 'target remote'? When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again. When you're running gdb on an embedded system, as with the command target localhost:3210, ...
TITLE: How do you start running the program over again in gdb with 'target remote'? QUESTION: When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again. When you're running gdb on an embedded system, as with the command targe...
[ "embedded", "gdb", "debugging" ]
41
13
93,214
9
0
2008-09-16T18:10:03.910000
2011-03-05T00:09:54.203000
75,258
155,447
How to make a Side-by-Side Compiler for .NET
Nikhil Kothari's Script# is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the.NET runtime. I've been rather interested in how, using the.NET platform, one can write a compiler for a la...
It's important to realize that all a compiler does is take a source language (C# in this case), parse it so the compiler has a representation that makes sense to it and not humans (this is the abstract syntax tree), and then does a naive code generation to the target language (msil is the target for languages that run ...
How to make a Side-by-Side Compiler for .NET Nikhil Kothari's Script# is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the.NET runtime. I've been rather interested in how, using the.NE...
TITLE: How to make a Side-by-Side Compiler for .NET QUESTION: Nikhil Kothari's Script# is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the.NET runtime. I've been rather interested in...
[ ".net", "language-design", "compiler-theory" ]
7
2
835
3
0
2008-09-16T18:10:18.760000
2008-09-30T22:47:14.340000
75,261
75,395
Why isn't Scalar::Util::Numeric installing correctly?
I got this output when running sudo cpan Scalar::Util::Numeric jmm@freekbox:~/bfwsandbox/sa/angel/astroportal/dtu8e/resources$ sudo cpan Scalar::Util::Numeric [sudo] password for jmm: CPAN: Storable loaded ok Going to read /home/jmm/.cpan/Metadata Database was generated on Tue, 09 Sep 2008 16:02:51 GMT CPAN: LWP::UserA...
You're missing your C library development headers. You should install a package that has them. These are necessary to install this module because it has to compile some non-perl C code and needs to know more about your system. I can't tell what kind of operating system you're on, but it looks like linux. If it's debian...
Why isn't Scalar::Util::Numeric installing correctly? I got this output when running sudo cpan Scalar::Util::Numeric jmm@freekbox:~/bfwsandbox/sa/angel/astroportal/dtu8e/resources$ sudo cpan Scalar::Util::Numeric [sudo] password for jmm: CPAN: Storable loaded ok Going to read /home/jmm/.cpan/Metadata Database was gener...
TITLE: Why isn't Scalar::Util::Numeric installing correctly? QUESTION: I got this output when running sudo cpan Scalar::Util::Numeric jmm@freekbox:~/bfwsandbox/sa/angel/astroportal/dtu8e/resources$ sudo cpan Scalar::Util::Numeric [sudo] password for jmm: CPAN: Storable loaded ok Going to read /home/jmm/.cpan/Metadata ...
[ "perl", "installation", "cpan" ]
2
11
3,159
3
0
2008-09-16T18:10:36.437000
2008-09-16T18:22:50.870000
75,267
75,314
In how many languages is Null not equal to anything not even Null?
In how many languages is Null not equal to anything not even Null?
It's this way in SQL (as a logic language) because null means unknown/undefined. However, in programming languages (like say, C++ or C#), a null pointer/reference is a specific value with a specific meaning -- nothing. Two nothings are equivilent, but two unknowns are not. The confusion comes from the fact that the sam...
In how many languages is Null not equal to anything not even Null? In how many languages is Null not equal to anything not even Null?
TITLE: In how many languages is Null not equal to anything not even Null? QUESTION: In how many languages is Null not equal to anything not even Null? ANSWER: It's this way in SQL (as a logic language) because null means unknown/undefined. However, in programming languages (like say, C++ or C#), a null pointer/refere...
[ "sql", "ruby", "oracle", "language-agnostic", "vb6" ]
7
15
2,054
7
0
2008-09-16T18:10:55.750000
2008-09-16T18:15:01.713000
75,270
75,290
Open Source Database Plugin For Eclipse?
Does anyone know of a good open source plugin for database querying and exploring within Eclipse? The active Database Exploring plugin within Eclipse is really geared around being associated with a Java project. While I am just trying to run ad-hoc queries and explore the schema. I am effectively looking for a just a c...
I use SQL Explorer. It comes as an Eclipse plugin or standalone. http://eclipsesql.sourceforge.net/
Open Source Database Plugin For Eclipse? Does anyone know of a good open source plugin for database querying and exploring within Eclipse? The active Database Exploring plugin within Eclipse is really geared around being associated with a Java project. While I am just trying to run ad-hoc queries and explore the schema...
TITLE: Open Source Database Plugin For Eclipse? QUESTION: Does anyone know of a good open source plugin for database querying and exploring within Eclipse? The active Database Exploring plugin within Eclipse is really geared around being associated with a Java project. While I am just trying to run ad-hoc queries and ...
[ "database", "eclipse", "ide" ]
6
1
11,263
2
0
2008-09-16T18:11:15.420000
2008-09-16T18:13:11.407000
75,273
75,283
"Could not reformat the document" in ASP.NET, VS2008
I'm in an ASP.NET UserControl. When I type Control-K, Control-D to reformat all the markup, I get a series of messages from VS 2008: "Could not reformat the document. The original format was restored." "Could not complete the action." "The operation could not be completed. The parameter is incorrect." Anybody know what...
There's probably some malformed markup somewhere in your document. Have you tried it on a fresh document?
"Could not reformat the document" in ASP.NET, VS2008 I'm in an ASP.NET UserControl. When I type Control-K, Control-D to reformat all the markup, I get a series of messages from VS 2008: "Could not reformat the document. The original format was restored." "Could not complete the action." "The operation could not be comp...
TITLE: "Could not reformat the document" in ASP.NET, VS2008 QUESTION: I'm in an ASP.NET UserControl. When I type Control-K, Control-D to reformat all the markup, I get a series of messages from VS 2008: "Could not reformat the document. The original format was restored." "Could not complete the action." "The operation...
[ "asp.net", "visual-studio", "visual-studio-2008", "user-controls" ]
10
9
11,628
11
0
2008-09-16T18:11:47.307000
2008-09-16T18:12:40.050000
75,282
75,306
SelectedIndexChanged event handler getting old index
I'm handling the onSelectIndexChanged event. An event is raised when the DropDownList selection changes. the problem is that the DropDownList still returns the old values for SelectedValue and SelectedIndex. What am I doing wrong? Here is the DropDownList definition from the aspx file: Route: Here is the DropDownList O...
Do you have any code in page load that is by chance re-defaulting the value to the first value? When the page reloads do you see the new value?
SelectedIndexChanged event handler getting old index I'm handling the onSelectIndexChanged event. An event is raised when the DropDownList selection changes. the problem is that the DropDownList still returns the old values for SelectedValue and SelectedIndex. What am I doing wrong? Here is the DropDownList definition ...
TITLE: SelectedIndexChanged event handler getting old index QUESTION: I'm handling the onSelectIndexChanged event. An event is raised when the DropDownList selection changes. the problem is that the DropDownList still returns the old values for SelectedValue and SelectedIndex. What am I doing wrong? Here is the DropDo...
[ "c#", "asp.net", "webforms" ]
9
13
9,423
5
0
2008-09-16T18:12:33.937000
2008-09-16T18:14:21.577000
75,312
75,355
Multicolor cursor in X
X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors. Is there a way to create a multicolored cursor in X?
You probably need to use the X Cursor Extensions. See the XCURSOR(3) manpage and the X11/Xcursor/Xcursor.h header file.
Multicolor cursor in X X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors. Is there a way to create a multicolored cursor in X?
TITLE: Multicolor cursor in X QUESTION: X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors. Is there a way to create a multicolored cursor in X? ANSWER: You probably need t...
[ "x11", "mouse-cursor" ]
1
2
743
1
0
2008-09-16T18:14:48.283000
2008-09-16T18:19:07.790000
75,340
81,045
XSLT processing in/from ruby
Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Perl, but I'm worried about reso...
I would recomment to shell out call to "xsltproc", which comes with the libxslt libraries in linux and does the work. Or if you are using JRuby by any chance, then you have several xslt parsers for java that you can really really easily use from your ruby program.
XSLT processing in/from ruby Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Per...
TITLE: XSLT processing in/from ruby QUESTION: Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a she...
[ "xml", "ruby", "linux", "xslt" ]
3
1
756
2
0
2008-09-16T18:18:03.563000
2008-09-17T08:14:47.047000
75,347
75,465
Execute an insert and then log in one SQL command
I've been asked to implement some code that will update a row in a MS SQL Server database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in stored procs you can do the update and then call execute on another stored pr...
Either run them both in the same statement (separate the separate commands by a semi-colon) or a use a transaction so you can rollback the first statement if the 2nd fails.
Execute an insert and then log in one SQL command I've been asked to implement some code that will update a row in a MS SQL Server database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in stored procs you can do the...
TITLE: Execute an insert and then log in one SQL command QUESTION: I've been asked to implement some code that will update a row in a MS SQL Server database and then use a stored proc to insert the update in a history table. We can't add a stored proc to do this since we don't control the database. I know in stored pr...
[ "sql", "sql-server" ]
0
1
366
6
0
2008-09-16T18:18:37.430000
2008-09-16T18:28:46.330000
75,361
75,398
Force numerical order on a SQL Server 2005 varchar column, containing letters and numbers?
I have a column containing the strings 'Operator (1)' and so on until 'Operator (600)' so far. I want to get them numerically ordered and I've come up with select colname from table order by cast(replace(replace(colname,'Operator (',''),')','') as int) which is very very ugly. Better suggestions?
It's that, InStr()/SubString(), changing Operator(1) to Operator(001), storing the n in Operator(n) separately, or creating a computed column that hides the ugly string manipulation. What you have seems fine.
Force numerical order on a SQL Server 2005 varchar column, containing letters and numbers? I have a column containing the strings 'Operator (1)' and so on until 'Operator (600)' so far. I want to get them numerically ordered and I've come up with select colname from table order by cast(replace(replace(colname,'Operator...
TITLE: Force numerical order on a SQL Server 2005 varchar column, containing letters and numbers? QUESTION: I have a column containing the strings 'Operator (1)' and so on until 'Operator (600)' so far. I want to get them numerically ordered and I've come up with select colname from table order by cast(replace(replace...
[ "sql", "sql-server", "sql-order-by" ]
0
2
2,153
5
0
2008-09-16T18:19:24.620000
2008-09-16T18:23:16.063000
75,379
75,760
How to make embedded servlet engine instantiate servlets eagerly?
The problem is simple, but I'm struggling a bit already. Server server = new Server(8080); Context context = new Context(server, "/", Context.NO_SESSIONS); context.addServlet(MainPageView.class, "/"); context.addServlet(UserView.class, "/signup"); server.start(); That's a pretty standard piece of code that you can find...
I'm not sure why using Guice make's Justin's option not work for you. What exactly is getting injected in? I'm not sure if this would help you at all because it is very similar to what Justin wrote above but if you do it this way, Jetty will do the actually instantiating. Context context = new Context(server, "/", Cont...
How to make embedded servlet engine instantiate servlets eagerly? The problem is simple, but I'm struggling a bit already. Server server = new Server(8080); Context context = new Context(server, "/", Context.NO_SESSIONS); context.addServlet(MainPageView.class, "/"); context.addServlet(UserView.class, "/signup"); server...
TITLE: How to make embedded servlet engine instantiate servlets eagerly? QUESTION: The problem is simple, but I'm struggling a bit already. Server server = new Server(8080); Context context = new Context(server, "/", Context.NO_SESSIONS); context.addServlet(MainPageView.class, "/"); context.addServlet(UserView.class, ...
[ "java", "servlets", "jetty" ]
1
2
2,184
2
0
2008-09-16T18:21:08.110000
2008-09-16T19:02:25.343000
75,385
75,596
Make VS compiler catch signed/unsigned assignments?
The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments. Is there anyway to make it catch these? I'm already at W4 but thought (hoped) there may be another setting somewhe...
You need to enable warning 4365 to catch the assignment. That might be tricky - you need to enable ALL warnings - use /Wall which enables lots of warnings, so you may have some trouble seeing the warning occur, but it does.
Make VS compiler catch signed/unsigned assignments? The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments. Is there anyway to make it catch these? I'm already at W4 but ...
TITLE: Make VS compiler catch signed/unsigned assignments? QUESTION: The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments. Is there anyway to make it catch these? I'm ...
[ "c++", "c", "visual-studio" ]
4
6
1,681
3
0
2008-09-16T18:21:47.360000
2008-09-16T18:43:13.037000
75,400
78,364
NHibernate to not cache a property
How can I configure NHibernate to not cache a file? I know I can create a method that does an HSQL, but can I through a configuration setting in the.xml file or the hibernate xml file itself to not cache a property?
You cannot set secondary caching settings at property level (as far as I know), but you can individually tune cache settings for each entity directly in their XML files. For instance: Where the cache "usage" property can be any of the following values: read-write: assures read committed isolation, makes sure data is co...
NHibernate to not cache a property How can I configure NHibernate to not cache a file? I know I can create a method that does an HSQL, but can I through a configuration setting in the.xml file or the hibernate xml file itself to not cache a property?
TITLE: NHibernate to not cache a property QUESTION: How can I configure NHibernate to not cache a file? I know I can create a method that does an HSQL, but can I through a configuration setting in the.xml file or the hibernate xml file itself to not cache a property? ANSWER: You cannot set secondary caching settings ...
[ ".net", "nhibernate", "caching" ]
2
4
1,473
1
0
2008-09-16T18:23:28.263000
2008-09-16T23:32:38.783000
75,401
75,483
What are the uses of "using" in C#?
User kokos answered the wonderful Hidden Features of C# question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?
The reason for the using statement is to ensure that the object is disposed as soon as it goes out of scope, and it doesn't require explicit code to ensure that this happens. As in Understanding the 'using' statement in C# (codeproject) and Using objects that implement IDisposable (microsoft), the C# compiler converts ...
What are the uses of "using" in C#? User kokos answered the wonderful Hidden Features of C# question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?
TITLE: What are the uses of "using" in C#? QUESTION: User kokos answered the wonderful Hidden Features of C# question by mentioning the using keyword. Can you elaborate on that? What are the uses of using? ANSWER: The reason for the using statement is to ensure that the object is disposed as soon as it goes out of sc...
[ "c#", "using", "using-statement" ]
359
538
329,801
29
0
2008-09-16T18:23:45.937000
2008-09-16T18:30:43.673000
75,428
76,401
mmc could not create the snap in error when launching internet information services
I am getting this error when trying to run internet information services on a Virtual Machine running windows XP. Anyone have any idea?
I was able to get the solution from somewhere else and here it is: regsvr32 %windir%\system32\inetsrv\inetmgr.dll
mmc could not create the snap in error when launching internet information services I am getting this error when trying to run internet information services on a Virtual Machine running windows XP. Anyone have any idea?
TITLE: mmc could not create the snap in error when launching internet information services QUESTION: I am getting this error when trying to run internet information services on a Virtual Machine running windows XP. Anyone have any idea? ANSWER: I was able to get the solution from somewhere else and here it is: regsvr...
[ "iis", "iis-5" ]
7
15
16,048
1
0
2008-09-16T18:26:05.760000
2008-09-16T20:10:32.373000
75,432
75,452
How can I prevent URLDownloadToFile from retrieving from the cache?
I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version.
Call DeleteUrlCacheEntry with the same URL just prior to calling URLDownloadToFile. You will need to link against Wininet.lib
How can I prevent URLDownloadToFile from retrieving from the cache? I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version.
TITLE: How can I prevent URLDownloadToFile from retrieving from the cache? QUESTION: I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version. ANSWER: Call DeleteUrlCacheEntry with the same URL ...
[ "c++", "winapi", "wininet" ]
5
11
7,050
4
0
2008-09-16T18:26:15.197000
2008-09-16T18:27:40.203000
75,440
75,467
How do I get the string with name of a class?
What method do I call to get the name of a class?
In [1]: class Test:...: pass...: In [2]: Test.__name__ Out[2]: 'Test'
How do I get the string with name of a class? What method do I call to get the name of a class?
TITLE: How do I get the string with name of a class? QUESTION: What method do I call to get the name of a class? ANSWER: In [1]: class Test:...: pass...: In [2]: Test.__name__ Out[2]: 'Test'
[ "python" ]
56
70
53,866
6
0
2008-09-16T18:26:47.427000
2008-09-16T18:28:51.977000
75,441
75,481
Nant and changing file properties (read-only to writable)
As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this?
Use the < attrib > task. For example, to make the file "test.txt" read/write, you would use
Nant and changing file properties (read-only to writable) As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this?
TITLE: Nant and changing file properties (read-only to writable) QUESTION: As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this? ANSWER: Use the < attrib > task. For example, to make the...
[ "nant" ]
9
11
2,782
2
0
2008-09-16T18:26:50.750000
2008-09-16T18:30:39.010000
75,463
75,510
Hierarchical Group Permissions Theory/Resources?
Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resources to help me along. Some Background: I'm buildi...
The manual for CakePHP has an excellent description of how Access Control Lists work. http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html
Hierarchical Group Permissions Theory/Resources? Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resour...
TITLE: Hierarchical Group Permissions Theory/Resources? QUESTION: Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able t...
[ "permissions", "theory", "usergroups" ]
2
3
3,778
4
0
2008-09-16T18:28:31.120000
2008-09-16T18:34:27.487000
75,479
75,503
Eclipse RCP app fails to start
I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neither are reached. I know I don't have much specifi...
Have you checked the logs in runtime/.metadata folder?, Also make sure to validate all plugins in the runtime. Having them as a dependency doesn't necessarily mean they are added to the runtime. This is probably the biggest gotcha when launching an rcp app.
Eclipse RCP app fails to start I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neither are reached. I...
TITLE: Eclipse RCP app fails to start QUESTION: I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neit...
[ "java", "eclipse", "rcp" ]
1
1
668
3
0
2008-09-16T18:30:24.703000
2008-09-16T18:33:42.107000
75,482
75,682
How can I pre-compress files with mod_deflate in Apache 2.x?
I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested. This is something that, I believe, mod_gzip did in Apache 1.x automa...
This functionality was misplaced in mod_gzip anyway. In Apache 2.x, you do that with content negotiation. Specifically, you need to enable MultiViews with the Options directive and you need to specify your encoding types with the AddEncoding directive.
How can I pre-compress files with mod_deflate in Apache 2.x? I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested. This is...
TITLE: How can I pre-compress files with mod_deflate in Apache 2.x? QUESTION: I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are ...
[ "apache", "http", "gzip", "mod-deflate", "content-encoding" ]
35
13
14,800
8
0
2008-09-16T18:30:41.380000
2008-09-16T18:53:16.897000
75,487
75,532
What are the major new 'core' features of MS SQL Server 2008?
I'm looking mainly at things like new SQL syntax, new kinds of locking, new capabilities etc. Not so much in the surrounding services like data warehousing and reports...
Did you check the whitepaper on the website? SQL Server 2008 Overview. I cannot recall off the top of my head, but it atleast has a nice database to object linking functionality. They have geospatial types too, if you need to use those.
What are the major new 'core' features of MS SQL Server 2008? I'm looking mainly at things like new SQL syntax, new kinds of locking, new capabilities etc. Not so much in the surrounding services like data warehousing and reports...
TITLE: What are the major new 'core' features of MS SQL Server 2008? QUESTION: I'm looking mainly at things like new SQL syntax, new kinds of locking, new capabilities etc. Not so much in the surrounding services like data warehousing and reports... ANSWER: Did you check the whitepaper on the website? SQL Server 2008...
[ "sql-server" ]
2
0
325
8
0
2008-09-16T18:31:22.610000
2008-09-16T18:36:30.010000
75,489
75,674
Formatting a long timestamp into a Date with JSTL
I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work. Any advice? Thanks.
The parseDate and formatDate tags work, but they work with Date objects. You can call new java.util.Date(longvalue) to get a date object, then pass that to the standard tag. somewhere other than the jsp create your date object. long longvalue =...;//from database. java.util.Date dateValue = new java.util.Date(longvalue...
Formatting a long timestamp into a Date with JSTL I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work....
TITLE: Formatting a long timestamp into a Date with JSTL QUESTION: I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to sa...
[ "java", "jsp", "jstl" ]
18
8
42,770
2
0
2008-09-16T18:31:42.843000
2008-09-16T18:52:40.297000
75,495
75,606
WPF UserControl Design Time Size
When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fill whatever container I place it in. ...
In Visual Studio add the Width and Height attribute to your UserControl XAML, but in the code-behind insert this public UserControl1() { InitializeComponent(); if (LicenseManager.UsageMode!= LicenseUsageMode.Designtime) { this.Width = double.NaN;; this.Height = double.NaN;; } } This checks to see if the control is runn...
WPF UserControl Design Time Size When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fill w...
TITLE: WPF UserControl Design Time Size QUESTION: When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control wil...
[ "wpf", "user-controls", "autosize" ]
52
39
41,591
9
0
2008-09-16T18:32:10.097000
2008-09-16T18:44:07.230000
75,500
75,567
Best way to convert pdf files to tiff files
I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal.
Use Imagemagick, or better yet, Ghostscript. http://www.ibm.com/developerworks/library/l-graf2/#N101C2 has an example for imagemagick: convert foo.pdf pages-%03d.tiff http://www.asmail.be/msg0055376363.html has an example for ghostscript: gs -q -dNOPAUSE -sDEVICE=tiffg4 -sOutputFile=a.tif foo.pdf -c quit I would instal...
Best way to convert pdf files to tiff files I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal.
TITLE: Best way to convert pdf files to tiff files QUESTION: I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal. ANSWER: Use Imagemagick, or better yet, Ghostscript. http://ww...
[ "pdf", "image", "tiff" ]
80
74
177,227
13
0
2008-09-16T18:32:44.293000
2008-09-16T18:39:45.493000
75,508
75,668
Trying to convert bunch of jpegs into a movie
I have 28,000 images I need to convert into a movie. I tried mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o../output-msmpeg4v2.avi But it seems to crap out at 7500 frames. The files are named webcam_2007-04-16_070804.jpg webcam_2007-04-16_071004.jpg webcam_2007-04-1...
Shove the list of images in a file, one per line. Then use mf://@filename
Trying to convert bunch of jpegs into a movie I have 28,000 images I need to convert into a movie. I tried mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o../output-msmpeg4v2.avi But it seems to crap out at 7500 frames. The files are named webcam_2007-04-16_070804.jpg...
TITLE: Trying to convert bunch of jpegs into a movie QUESTION: I have 28,000 images I need to convert into a movie. I tried mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o../output-msmpeg4v2.avi But it seems to crap out at 7500 frames. The files are named webcam_200...
[ "video", "encoding" ]
3
2
3,219
5
0
2008-09-16T18:34:08.907000
2008-09-16T18:51:43.513000
75,526
75,658
What are the key components of web accessibility?
I understand that some countries have laws regarding website accessibility. In general, what are the minimum requirements that a website must meet to be accessible, regardless of country? Or, in lieu of minimum requirements, what are some specific things that websites should have to make the accessible?
W3C publishes Web Content Accessibility Guidelines: http://www.w3.org/TR/WAI-WEBCONTENT/ If you want a quick summary list, look for the yellow-highlighted lines in that document. Each guideline is also broken down into specific requirements ("checkpoints") in one of three priorities - to claim any kind of accessibility...
What are the key components of web accessibility? I understand that some countries have laws regarding website accessibility. In general, what are the minimum requirements that a website must meet to be accessible, regardless of country? Or, in lieu of minimum requirements, what are some specific things that websites s...
TITLE: What are the key components of web accessibility? QUESTION: I understand that some countries have laws regarding website accessibility. In general, what are the minimum requirements that a website must meet to be accessible, regardless of country? Or, in lieu of minimum requirements, what are some specific thin...
[ "accessibility" ]
2
4
731
4
0
2008-09-16T18:36:01.320000
2008-09-16T18:50:40.817000
75,577
79,675
Databinding ApplicationSettings to Custom Components
I have a custom component where I have implemented INotifyPropertyChanged and IBindableComponent. However, when I try to databind a property, the designer adds this line: this.component11.TestString = global::WindowsFormsApplication2.Properties.Settings.Default.Setting; instead of creating a binding as it does with a T...
Try: [ DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden ), EditorBrowsable( EditorBrowsableState.Advanced ), Browsable( false ) ] public BindingContext BindingContext {... } [ ParenthesizePropertyName( true ), RefreshProperties( RefreshProperties.All ), DesignerSerializationVisibility( DesignerS...
Databinding ApplicationSettings to Custom Components I have a custom component where I have implemented INotifyPropertyChanged and IBindableComponent. However, when I try to databind a property, the designer adds this line: this.component11.TestString = global::WindowsFormsApplication2.Properties.Settings.Default.Setti...
TITLE: Databinding ApplicationSettings to Custom Components QUESTION: I have a custom component where I have implemented INotifyPropertyChanged and IBindableComponent. However, when I try to databind a property, the designer adds this line: this.component11.TestString = global::WindowsFormsApplication2.Properties.Sett...
[ "c#", "data-binding", "custom-component" ]
1
2
1,441
1
0
2008-09-16T18:41:04.023000
2008-09-17T03:31:41.377000
75,608
75,702
Serializing SQL CE data to XML
I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries. I had hoped to take advantage of.net's built-in XML-based serialization like in DataTable...
Assuming cmd is your SqlCeCommand.... using(var dr = cmd.ExecuteReader()) { DataSet ds = new DataSet(); DataTable dt = ds.Tables.Add(); dt.Load(dr); ds.WriteXML(...); }
Serializing SQL CE data to XML I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries. I had hoped to take advantage of.net's built-in XML-based ...
TITLE: Serializing SQL CE data to XML QUESTION: I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries. I had hoped to take advantage of.net's b...
[ ".net", "xml", ".net-2.0", "sql-server-ce" ]
2
4
1,869
3
0
2008-09-16T18:44:22.673000
2008-09-16T18:56:35.703000
75,614
234,229
Using Lock pages in memory without being Administrator on Windows Vista and 2008 Server
The following question answers how to get large memory pages on Windows: " how do i run my app with large pages in windows ". The problem I'm trying to solve is how do I configure it on Vista and 2008 Server. Normally you just allow a specific user to lock pages in memory and you are done. However on Vista and 2008 thi...
On Vista and Windows 2008, you're getting bitten by UAC. People in the Administrators group have a restricted token, which doesn't contain all of their privileges. The UAC elevation prompt is used to turn on the extra privileges. I'm assuming that the "lock pages in memory" privilege is one of the extras. The real "Adm...
Using Lock pages in memory without being Administrator on Windows Vista and 2008 Server The following question answers how to get large memory pages on Windows: " how do i run my app with large pages in windows ". The problem I'm trying to solve is how do I configure it on Vista and 2008 Server. Normally you just allow...
TITLE: Using Lock pages in memory without being Administrator on Windows Vista and 2008 Server QUESTION: The following question answers how to get large memory pages on Windows: " how do i run my app with large pages in windows ". The problem I'm trying to solve is how do I configure it on Vista and 2008 Server. Norma...
[ "windows", "admin-rights" ]
0
1
1,918
2
0
2008-09-16T18:44:55.683000
2008-10-24T16:21:58.090000
75,621
75,923
How to use form values from an unbound form
I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date,...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned_data field unless I call is_valid(). But is_valid(...
If you add this method to your form class: def get_cleaned_or_initial(self, fieldname): if hasattr(self, 'cleaned_data'): return self.cleaned_data.get(fieldname) else: return self[fieldname].field.initial you could then re-write your code as: if request.method == 'GET': form = MyForm() else: form = MyForm(request.metho...
How to use form values from an unbound form I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date,...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned_data f...
TITLE: How to use form values from an unbound form QUESTION: I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date,...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access ...
[ "python", "django" ]
10
7
5,437
3
0
2008-09-16T18:45:34.387000
2008-09-16T19:18:57.910000
75,650
75,782
Best way to do Visual Studio post build deployment in a team environment?
I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the solution each projects deployment is handled in the post-build event to that develop...
If you are using Visual Studio 2005 or later, project files are MSBUild files. Inside the MsBuild file, there is an "AfterBuild" target. I would recommend using this to do your deployment tasks, instead of the Post Build Event. By using MSBuild tasks, you are more prepared to move into a Continuous Integration system l...
Best way to do Visual Studio post build deployment in a team environment? I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the solution e...
TITLE: Best way to do Visual Studio post build deployment in a team environment? QUESTION: I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they bu...
[ "visual-studio", "deployment", "build" ]
1
1
1,375
2
0
2008-09-16T18:49:36.717000
2008-09-16T19:04:08.570000
75,652
75,665
Is there a Firefox add-on to use vim to edit textboxes?
or "How do I answer questions on SO in Firefox using gVim inside the textboxes?"
It's All Text! From the extension page: At the bottom right corner of any edit box, a little edit button will appear. Click it. If this is the first time you've used "It's All Text!" then you will be asked to set your preferences, most importantly the editor. The web page will pop up in your selected editor. When you s...
Is there a Firefox add-on to use vim to edit textboxes? or "How do I answer questions on SO in Firefox using gVim inside the textboxes?"
TITLE: Is there a Firefox add-on to use vim to edit textboxes? QUESTION: or "How do I answer questions on SO in Firefox using gVim inside the textboxes?" ANSWER: It's All Text! From the extension page: At the bottom right corner of any edit box, a little edit button will appear. Click it. If this is the first time yo...
[ "firefox", "vim" ]
71
46
20,295
18
0
2008-09-16T18:49:41.523000
2008-09-16T18:51:29.600000
75,691
599,954
how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#?
I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. how can i capture a photo from USB connected digital still camera device in my windows application?
If you use the Windows Image Acquisition Library, you'll see events there for capturing camera new picture events. I had a similar requirement and wrote a test rig; we went down to the local camera store and tried every camera they had. The only cameras we could find that supported this functionality were the Nikon D-s...
how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#? I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. how can i capture a photo from US...
TITLE: how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#? QUESTION: I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. how can i captu...
[ "c#", "vb.net", "image-capture" ]
6
6
25,786
6
0
2008-09-16T18:54:13.227000
2009-03-01T15:21:46.397000
75,693
78,112
Is it possible to offline a disk in a raidz zfs pool?
When i try to offline a disk in a zfs raidz pool (the raidz pool is not mirrored), zfs says that the disk cannot be taken offline because it has no valid mirror. Isn't one of the properties of raidz that it has a redundant disk (or even 2 disks in raidz2)...?
Could you give a bit more about your configuration please? What are the commands you are using? If I'm understanding your question that should work. Note that: You cannot take a pool offline to the point where it becomes faulted. For example, you cannot take offline two devices out of a RAID-Z configuration, nor can yo...
Is it possible to offline a disk in a raidz zfs pool? When i try to offline a disk in a zfs raidz pool (the raidz pool is not mirrored), zfs says that the disk cannot be taken offline because it has no valid mirror. Isn't one of the properties of raidz that it has a redundant disk (or even 2 disks in raidz2)...?
TITLE: Is it possible to offline a disk in a raidz zfs pool? QUESTION: When i try to offline a disk in a zfs raidz pool (the raidz pool is not mirrored), zfs says that the disk cannot be taken offline because it has no valid mirror. Isn't one of the properties of raidz that it has a redundant disk (or even 2 disks in ...
[ "linux", "filesystems", "solaris", "zfs" ]
1
1
3,253
1
0
2008-09-16T18:54:52.117000
2008-09-16T22:49:32.070000
75,696
77,452
PostgreSQL 8.3 privileges not updated - wrong usage?
I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them? sirprize=# CREATE DATABASE testdb; CREATE DATABASE sirprize=# GRANT ALL PRIVILEGES ON DATABASE testdb TO testuser; GRANT sirprize=# \c testdb You...
\z Shows your table, view, and sequence permissions, for the objects contained within the Database. It does not show permissions on the database itself. If you create a table or some other object within 'testdb', it will then show up in \z 's output. You can see which Databases exist on your system with \l (or \l+ for ...
PostgreSQL 8.3 privileges not updated - wrong usage? I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them? sirprize=# CREATE DATABASE testdb; CREATE DATABASE sirprize=# GRANT ALL PRIVILEGES ON DATABA...
TITLE: PostgreSQL 8.3 privileges not updated - wrong usage? QUESTION: I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them? sirprize=# CREATE DATABASE testdb; CREATE DATABASE sirprize=# GRANT ALL PR...
[ "postgresql", "authentication", "roles", "privileges" ]
7
12
24,476
1
0
2008-09-16T18:55:41.210000
2008-09-16T21:41:57.397000
75,700
78,479
JPA Multiple Transaction Managers
I have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. I want to use annotation based transactions (@Transactional), to not mess around with TransactionStatus...
I guess you have 2 choices If your use-cases never require updates to both databases within the same transaction, then you can use two JpaTransactionManagers, but I'm not sure you will be able to use the @Transactional approach? In this case, you would need to fallback on the older mechanism of using a simple Transacti...
JPA Multiple Transaction Managers I have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. I want to use annotation based transactions (@Transactional), to not ...
TITLE: JPA Multiple Transaction Managers QUESTION: I have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. I want to use annotation based transactions (@Trans...
[ "java", "spring", "orm", "jpa", "transactions" ]
12
10
21,891
2
0
2008-09-16T18:56:20.243000
2008-09-16T23:56:40.503000
75,701
78,235
What happens to global variables declared in a DLL?
Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded?
In a Windows C++ DLL, all global objects (including static members of classes) will be constructed just before the calling of the DllMain with DLL_PROCESS_ATTACH, and they will be destroyed just after the call of the DllMain with DLL_PROCESS_DETACH. Now, you must consider three problems: 0 - Of course, global non-const...
What happens to global variables declared in a DLL? Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded?
TITLE: What happens to global variables declared in a DLL? QUESTION: Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded? ANSWER: In a Windows C++ DLL, all global objects (including static members of classes) will...
[ "c++", "windows", "dll" ]
45
46
51,833
6
0
2008-09-16T18:56:21.770000
2008-09-16T23:11:06.293000
75,704
75,880
How do I check to see if a value is an integer in MySQL?
I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what I am looking for.
I'll assume you want to check a string value. One nice way is the REGEXP operator, matching the string to a regular expression. Simply do select field from table where field REGEXP '^-?[0-9]+$'; this is reasonably fast. If your field is numeric, just test for ceil(field) = field instead.
How do I check to see if a value is an integer in MySQL? I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what I am looking for.
TITLE: How do I check to see if a value is an integer in MySQL? QUESTION: I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what I am looking for. ANSWER: I'll assume you wan...
[ "mysql" ]
143
246
183,991
12
0
2008-09-16T18:56:53.830000
2008-09-16T19:13:47.313000
75,713
77,322
WPF Can't Databind to an Interface?
I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties. Here's the class I'm using as a datasource: public interface IPerson { string UserId { get; set; } string UserName { get; set; } string Email { get; set; } } public class Person: EntityBas...
I'm not familiar with entlib's policy injection, but I'm pretty sure that your problem lies there, and not in the fact that you're using an interface. If you were to replace var person = PolicyInjection.Wrap (new Person()); with IPerson person = new Person(); surely it would work?
WPF Can't Databind to an Interface? I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties. Here's the class I'm using as a datasource: public interface IPerson { string UserId { get; set; } string UserName { get; set; } string Email { get; set;...
TITLE: WPF Can't Databind to an Interface? QUESTION: I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties. Here's the class I'm using as a datasource: public interface IPerson { string UserId { get; set; } string UserName { get; set; } string...
[ "wpf", "data-binding", "interface" ]
2
3
2,654
4
0
2008-09-16T18:58:08.723000
2008-09-16T21:28:52.153000
75,722
75,755
Is there a better deterministic disposal pattern than nested "using"s?
In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further: using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open)) { using (BufferedStream bs = new BufferedStream(fs)) { using (StreamRead...
You don't have to nest with multiple usings: using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open)) using (BufferedStream bs = new BufferedStream(fs)) using (StreamReader sr = new StreamReader(bs)) { // all three get disposed when you're done } In.NET Core, there's a new using statement which allows you t...
Is there a better deterministic disposal pattern than nested "using"s? In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further: using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open)) {...
TITLE: Is there a better deterministic disposal pattern than nested "using"s? QUESTION: In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further: using (FileStream fs = new FileStream("c:\file.txt",...
[ "c#", "c++", "using", "raii" ]
20
41
2,213
10
0
2008-09-16T18:59:07.130000
2008-09-16T19:01:51.180000