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
171,878
171,996
Browsing directory without using mapped drive
Is there an app or way to browse a directory that requires different login credentials without using a mapped drive? The issue is given one login credential Windows Explorer only allows you to map it to one drive and disallows using the same login credential to map to a different drive.
That's simply not true...you can authenticate with the same login credentials to multiple servers. What you can't do is: Be automatically authenticated to the 2nd server Connect to the same server with different credentials My understanding is that the reason for both problems is that Windows stores the credentials by ...
Browsing directory without using mapped drive Is there an app or way to browse a directory that requires different login credentials without using a mapped drive? The issue is given one login credential Windows Explorer only allows you to map it to one drive and disallows using the same login credential to map to a dif...
TITLE: Browsing directory without using mapped drive QUESTION: Is there an app or way to browse a directory that requires different login credentials without using a mapped drive? The issue is given one login credential Windows Explorer only allows you to map it to one drive and disallows using the same login credenti...
[ "directory", "mapped-drive" ]
1
1
640
2
0
2008-10-05T12:14:57.733000
2008-10-05T13:41:20.323000
171,899
171,992
Best generic strategy to group items using multiple criteria
I have a simple, real life problem I want to solve using an OO approach. My harddrive is a mess. I have 1.500.000 files, duplicates, complete duplicate folders, and so on... The first step, of course, is parsing all the files into my database. No problems so far, now I got a lot of nice entries which are kind of "natur...
I don't have a solution (and would love to see one), but I might suggest extracting metadata from your files besides the obvious name, size and timestamps. in-band metadata such as MP3 ID3 tags, version information for EXEs / DLLs, HTML title and keywords, Summary information for Office documents etc. Even image files ...
Best generic strategy to group items using multiple criteria I have a simple, real life problem I want to solve using an OO approach. My harddrive is a mess. I have 1.500.000 files, duplicates, complete duplicate folders, and so on... The first step, of course, is parsing all the files into my database. No problems so ...
TITLE: Best generic strategy to group items using multiple criteria QUESTION: I have a simple, real life problem I want to solve using an OO approach. My harddrive is a mess. I have 1.500.000 files, duplicates, complete duplicate folders, and so on... The first step, of course, is parsing all the files into my databas...
[ "file", "directory-structure" ]
7
2
418
3
0
2008-10-05T12:30:24.427000
2008-10-05T13:40:22.600000
171,924
171,932
How do I syntax check a Bash script without running it?
Is it possible to check a bash script syntax without executing it? Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts?
bash -n scriptname Perhaps an obvious caveat: this validates syntax but won't check if your bash script tries to execute a command that isn't in your path, like ech hello instead of echo hello.
How do I syntax check a Bash script without running it? Is it possible to check a bash script syntax without executing it? Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts?
TITLE: How do I syntax check a Bash script without running it? QUESTION: Is it possible to check a bash script syntax without executing it? Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts? ANSWER: bash -n scriptname Perhaps an obvious caveat: this validates syntax but won...
[ "linux", "bash", "unix", "syntax", "gnu" ]
323
460
293,079
10
0
2008-10-05T12:51:25.120000
2008-10-05T12:55:00.523000
171,928
172,000
jquery-ui-dialog - How to hook into dialog close event
I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but that doesn't cover the user closing with escape or the x in the top ri...
I have found it! You can catch the close event using the following code: $('div#popup_content').on('dialogclose', function(event) { alert('closed'); }); Obviously I can replace the alert with whatever I need to do. Edit: As of Jquery 1.7, the bind() has become on()
jquery-ui-dialog - How to hook into dialog close event I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but that doesn't co...
TITLE: jquery-ui-dialog - How to hook into dialog close event QUESTION: I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked b...
[ "javascript", "jquery", "jquery-ui", "modal-dialog", "jquery-ui-dialog" ]
194
256
284,947
11
0
2008-10-05T12:52:53.197000
2008-10-05T13:42:54.967000
171,948
172,054
What does it mean to run a virtual OS in "headless mode"?
I've been hearing a lot about about how the new version of VMWare Fusion can run virtual operating systems in "headless mode". A Google search makes it clear that other virtualisation products also have similar features, however, I have not been able to find a good description of what this actually means? What is happe...
Headless mode means that the virtual machine is running in the background without any foreground elements visible (like the Vmware Fusion application) You would have no screen to see running the front end; i.e. the screen/console would not be visible, even though the operating system is running, and would typically hav...
What does it mean to run a virtual OS in "headless mode"? I've been hearing a lot about about how the new version of VMWare Fusion can run virtual operating systems in "headless mode". A Google search makes it clear that other virtualisation products also have similar features, however, I have not been able to find a g...
TITLE: What does it mean to run a virtual OS in "headless mode"? QUESTION: I've been hearing a lot about about how the new version of VMWare Fusion can run virtual operating systems in "headless mode". A Google search makes it clear that other virtualisation products also have similar features, however, I have not bee...
[ "vmware", "virtualization" ]
28
31
21,031
2
0
2008-10-05T13:11:01.897000
2008-10-05T14:20:58.603000
171,952
171,957
Is there a destructor for Java?
Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect? To make my question more specific, I am writing an application that deals with data and the specification say that there should be a 'reset' button that brings the application ba...
Because Java is a garbage collected language you cannot predict when (or even if) an object will be destroyed. Hence there is no direct equivalent of a destructor. There is an inherited method called finalize, but this is called entirely at the discretion of the garbage collector. So for classes that need to explicitly...
Is there a destructor for Java? Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect? To make my question more specific, I am writing an application that deals with data and the specification say that there should be a 'reset' butto...
TITLE: Is there a destructor for Java? QUESTION: Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect? To make my question more specific, I am writing an application that deals with data and the specification say that there should ...
[ "java", "garbage-collection", "destructor", "finalize" ]
670
586
675,006
25
0
2008-10-05T13:12:25.450000
2008-10-05T13:17:15.533000
171,970
171,974
How can I find the method that called the current method?
When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I am hoping to find a cleaner more explicit way, something ...
Try this: using System.Diagnostics; // Get call stack StackTrace stackTrace = new StackTrace(); // Get calling method name Console.WriteLine(stackTrace.GetFrame(1).GetMethod().Name); one-liner: (new System.Diagnostics.StackTrace()).GetFrame(1).GetMethod().Name
How can I find the method that called the current method? When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I...
TITLE: How can I find the method that called the current method? QUESTION: When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the ...
[ "c#", ".net", "logging", "stack-trace", "system.diagnostics" ]
652
661
368,449
18
0
2008-10-05T13:28:41.797000
2008-10-05T13:33:34.003000
172,018
172,043
When updating a whole project's root, how can I exclude svn externals from being updated?
Is there a way to exclude all svn externals when doing a recursive update? Is there a way to exclude only 1 of all of the svn externals when doing a recursive update? Basically I'd like to cut down the svn update time, and a couple of the SVN externals that I have will just about never get updated.
Yes, there is an option for this (to ignore all): > svn update --ignore-externals I don't know of any option to specifically ignore one or some externals while updating the rest.
When updating a whole project's root, how can I exclude svn externals from being updated? Is there a way to exclude all svn externals when doing a recursive update? Is there a way to exclude only 1 of all of the svn externals when doing a recursive update? Basically I'd like to cut down the svn update time, and a coupl...
TITLE: When updating a whole project's root, how can I exclude svn externals from being updated? QUESTION: Is there a way to exclude all svn externals when doing a recursive update? Is there a way to exclude only 1 of all of the svn externals when doing a recursive update? Basically I'd like to cut down the svn update...
[ "svn", "svn-externals" ]
11
26
9,371
3
0
2008-10-05T13:55:26.050000
2008-10-05T14:12:29.103000
172,040
175,273
How do you develop against OpenID locally
I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me type in a username and then passes that back to my main ap...
The libraries at OpenID Enabled ship with examples that are sufficient to run a local test provider. Look in the examples/djopenid/ directory of the python-openid source distribution. Running that will give you an instance of this test provider.
How do you develop against OpenID locally I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets me type in a userna...
TITLE: How do you develop against OpenID locally QUESTION: I'm developing a website (in Django) that uses OpenID to authenticate users. As I'm currently only running on my local machine I can't authenticate using one of the OpenID providers on the web. So I figure I need to run a local OpenID server that simply lets m...
[ "python", "django", "openid" ]
42
15
6,010
7
0
2008-10-05T14:08:42.483000
2008-10-06T17:22:39.190000
172,050
240,615
GPSID - Poll Driver V2.0
On the page http://msdn.microsoft.com/en-us/library/bb202066.aspx If references something called "POLL Driver V2" however this is the only place I can see that talks about this. I'm extermely interested in the GPSSetDeviceParam: GPS_QUERY_FIX call but after searching for about 2 hours on this, I couldn't find any infor...
According to MS, GPSID - Poll Driver v2.0 are not made available to ISV's in WM6.1. They are evaluating including this in a future version of the OS. My solution along the same lines was to create a Windows CE notification that fires at a predetermined interval. Then when my app receives the notification, I set the pow...
GPSID - Poll Driver V2.0 On the page http://msdn.microsoft.com/en-us/library/bb202066.aspx If references something called "POLL Driver V2" however this is the only place I can see that talks about this. I'm extermely interested in the GPSSetDeviceParam: GPS_QUERY_FIX call but after searching for about 2 hours on this, ...
TITLE: GPSID - Poll Driver V2.0 QUESTION: On the page http://msdn.microsoft.com/en-us/library/bb202066.aspx If references something called "POLL Driver V2" however this is the only place I can see that talks about this. I'm extermely interested in the GPSSetDeviceParam: GPS_QUERY_FIX call but after searching for about...
[ "windows-mobile" ]
2
2
451
1
0
2008-10-05T14:17:53.260000
2008-10-27T16:56:01.757000
172,060
172,073
Why does FileSystemWatcher create multiple change events when I copy a file to the directory
I've written a small test application using the.Net FileSystemWatcher to keep an eye on a directory. When I copy a large-ish (a few Mb) file into that directory I get the following events listed (see screenshot - and ignore the Delete event to begin with). alt text http://robinwilson.homelinux.com/FSW.png I get a creat...
According to the documentation (see the first bullet point under Events and Buffer Sizes ): Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a comple...
Why does FileSystemWatcher create multiple change events when I copy a file to the directory I've written a small test application using the.Net FileSystemWatcher to keep an eye on a directory. When I copy a large-ish (a few Mb) file into that directory I get the following events listed (see screenshot - and ignore the...
TITLE: Why does FileSystemWatcher create multiple change events when I copy a file to the directory QUESTION: I've written a small test application using the.Net FileSystemWatcher to keep an eye on a directory. When I copy a large-ish (a few Mb) file into that directory I get the following events listed (see screensho...
[ ".net", "filesystems", "filesystemwatcher" ]
4
11
5,949
2
0
2008-10-05T14:24:11.593000
2008-10-05T14:37:56.213000
172,066
172,097
Django UserProfile... without a password
I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat is that I'd also like to be able to enable an account for th...
A user profile (as returned by django.contrib.auth.models.User.get_profile ) doesn't extend the User table - the model you specify as the profile model with the AUTH_PROFILE_MODULE setting is just a model which has a ForeignKey to User. get_profile and the setting are really just a convenience API for accessing an inst...
Django UserProfile... without a password I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat is that I'd also li...
TITLE: Django UserProfile... without a password QUESTION: I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat i...
[ "python", "database", "django", "django-authentication", "django-users" ]
4
8
7,500
7
0
2008-10-05T14:29:56.730000
2008-10-05T14:53:46.883000
172,084
172,115
Is it possible to generate a database from the Entity Data Model (edmx) file?
In Linq to SQL it is possible to generate the database from the dbml file. Is it possible to generate a database from the Entity Data Model? I wish to accomplish the same thing using the edmx file.
Not until the next version, as you can read on the Entity Framework Design blog: http://blogs.msdn.com/efdesign/archive/2008/09/10/model-first.aspx
Is it possible to generate a database from the Entity Data Model (edmx) file? In Linq to SQL it is possible to generate the database from the dbml file. Is it possible to generate a database from the Entity Data Model? I wish to accomplish the same thing using the edmx file.
TITLE: Is it possible to generate a database from the Entity Data Model (edmx) file? QUESTION: In Linq to SQL it is possible to generate the database from the dbml file. Is it possible to generate a database from the Entity Data Model? I wish to accomplish the same thing using the edmx file. ANSWER: Not until the nex...
[ ".net", "entity-framework" ]
2
3
2,563
1
0
2008-10-05T14:47:46.273000
2008-10-05T15:09:24.107000
172,095
965,857
Slow SoapHttpClientProtocol constructor
I'm doing some experiments with Microsoft Dynamics CRM. You interact with it through web services and I have added a Web Reference to my project. The web service interface is very rich, and the generated "Reference.cs" is some 90k loc. I'm using the web reference in a console application. I often change something, reco...
The following is ripped from this thread on the VMWare forums: Hi folks, We've found that sgen.exe does work. It'just that there is a couple of additional steps beyond pre-generating the serializer dll's that we missed in this thread. Here is the detailed instruction PROBLEM When using the VIM 2.0 SDK from.NET requires...
Slow SoapHttpClientProtocol constructor I'm doing some experiments with Microsoft Dynamics CRM. You interact with it through web services and I have added a Web Reference to my project. The web service interface is very rich, and the generated "Reference.cs" is some 90k loc. I'm using the web reference in a console app...
TITLE: Slow SoapHttpClientProtocol constructor QUESTION: I'm doing some experiments with Microsoft Dynamics CRM. You interact with it through web services and I have added a Web Reference to my project. The web service interface is very rich, and the generated "Reference.cs" is some 90k loc. I'm using the web referenc...
[ "c#", ".net", "performance", "xml-serialization", "soaphttpclientprotocol" ]
30
38
13,146
6
0
2008-10-05T14:52:52.597000
2009-06-08T16:48:37.450000
172,102
172,135
Deserialize jSON Google AJAX Translation API
I've got the JSON coming back like this: { "responseData": [{ "responseData": { "translatedText": "elefante" }, "responseDetails": null, "responseStatus": 200 }, { "responseData": { "translatedText": "Burro" }, "responseDetails": null, "responseStatus": 200 }], "responseDetails": null, "responseStatus": 200 } And I nee...
you should think about the JSON object graph represented in that string. You can nest types for deserializating objects with different properties/fields using generics like so: class Response < T > { public ResponseData < T > [] responseData = new ResponseData < T > [0]; public HttpStatusCode responseStatus; public obj...
Deserialize jSON Google AJAX Translation API I've got the JSON coming back like this: { "responseData": [{ "responseData": { "translatedText": "elefante" }, "responseDetails": null, "responseStatus": 200 }, { "responseData": { "translatedText": "Burro" }, "responseDetails": null, "responseStatus": 200 }], "responseDeta...
TITLE: Deserialize jSON Google AJAX Translation API QUESTION: I've got the JSON coming back like this: { "responseData": [{ "responseData": { "translatedText": "elefante" }, "responseDetails": null, "responseStatus": 200 }, { "responseData": { "translatedText": "Burro" }, "responseDetails": null, "responseStatus": 200...
[ "c#", "ajax", "json", "google-translate" ]
3
4
2,761
1
0
2008-10-05T14:59:20.210000
2008-10-05T15:22:55.517000
172,110
172,119
How do I elegantly print the date in RFC822 format in Perl?
How can I elegantly print the date in RFC822 format in Perl?
use POSIX qw(strftime); print strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time())). "\n";
How do I elegantly print the date in RFC822 format in Perl? How can I elegantly print the date in RFC822 format in Perl?
TITLE: How do I elegantly print the date in RFC822 format in Perl? QUESTION: How can I elegantly print the date in RFC822 format in Perl? ANSWER: use POSIX qw(strftime); print strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time())). "\n";
[ "perl", "datetime", "date", "rfc822" ]
18
30
11,475
4
0
2008-10-05T15:05:41.417000
2008-10-05T15:12:41.027000
172,111
172,136
How to get notified when a drive letter becomes available
Is it possible to get notified (without polling, but via an event) when a drive letter becomes accessible. For example if you have an external hard drive that always appears as drive F - is it possible to have an event raised when that is connected and F becomes accessible?
Okay.. found what I was looking for:) Take a look at this VBScript: ( source ): strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colEvents = objWMIService.ExecNotificationQuery _ ("Select * From __InstanceOperationEvent Within 10 Where " _ & "TargetInstance isa 'Win32_Lo...
How to get notified when a drive letter becomes available Is it possible to get notified (without polling, but via an event) when a drive letter becomes accessible. For example if you have an external hard drive that always appears as drive F - is it possible to have an event raised when that is connected and F becomes...
TITLE: How to get notified when a drive letter becomes available QUESTION: Is it possible to get notified (without polling, but via an event) when a drive letter becomes accessible. For example if you have an external hard drive that always appears as drive F - is it possible to have an event raised when that is conne...
[ ".net", "filesystems" ]
1
1
400
2
0
2008-10-05T15:06:08.467000
2008-10-05T15:23:27.027000
172,130
839,020
How to remove paths from tabs in Visual Studio 2008?
Is there a way to stop the path showing in a source code tab in Visual Studio 2008? Currently when developing an ASP.NET site, I get the path from the root plus the filename - truncated when it gets too long. So something like: MyDir/MyPage.aspx for a short path and filename, or: MyDir/MyLong...yPage.aspx for a longer ...
Tabs Studio add-in can remove path from tab in Visual Studio 2008. See Removing path from tab name blog post for the example screenshots.
How to remove paths from tabs in Visual Studio 2008? Is there a way to stop the path showing in a source code tab in Visual Studio 2008? Currently when developing an ASP.NET site, I get the path from the root plus the filename - truncated when it gets too long. So something like: MyDir/MyPage.aspx for a short path and ...
TITLE: How to remove paths from tabs in Visual Studio 2008? QUESTION: Is there a way to stop the path showing in a source code tab in Visual Studio 2008? Currently when developing an ASP.NET site, I get the path from the root plus the filename - truncated when it gets too long. So something like: MyDir/MyPage.aspx for...
[ "visual-studio", "visual-studio-2008", "ide", "tabs" ]
2
0
1,281
3
0
2008-10-05T15:19:03.930000
2009-05-08T09:32:31.550000
172,133
172,139
UTF8 vs. UTF16 vs. char* vs. what? Someone explain this mess to me!
I've managed to mostly ignore all this multi-byte character stuff, but now I need to do some UI work and I know my ignorance in this area is going to catch up with me! Can anyone explain in a few paragraphs or less just what I need to know so that I can localize my applications? What types should I be using (I use both...
Check out Joel Spolsky's The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) EDIT 20140523: Also, watch Characters, Symbols and the Unicode Miracle by Tom Scott on YouTube - it's just under ten minutes, and a wonderful explanation of the brillian...
UTF8 vs. UTF16 vs. char* vs. what? Someone explain this mess to me! I've managed to mostly ignore all this multi-byte character stuff, but now I need to do some UI work and I know my ignorance in this area is going to catch up with me! Can anyone explain in a few paragraphs or less just what I need to know so that I ca...
TITLE: UTF8 vs. UTF16 vs. char* vs. what? Someone explain this mess to me! QUESTION: I've managed to mostly ignore all this multi-byte character stuff, but now I need to do some UI work and I know my ignorance in this area is going to catch up with me! Can anyone explain in a few paragraphs or less just what I need to...
[ "string", "utf-8", "character-encoding", "utf-16", "multibyte" ]
34
76
27,707
5
0
2008-10-05T15:22:07.107000
2008-10-05T15:25:30.643000
172,151
221,712
Which data structure for linking text with audio in Java
I want to write a program in which plays an audio file that reads a text. I want to highlite the current syllable that the audiofile plays in green and the rest of the current word in red. What kind of datastructure should I use to store the audio file and the information that tells the program when to switch to the ne...
This is a slightly left-field suggestion, but have you looked at Karaoke software? It may not be seen as "serious" enough, but it sounds very similar to what you're doing. For example, Aegisub is a subtitling program that lets you create subtitles in the SSA/ASS format. It has karaoke tools for hilighting the chosen wo...
Which data structure for linking text with audio in Java I want to write a program in which plays an audio file that reads a text. I want to highlite the current syllable that the audiofile plays in green and the rest of the current word in red. What kind of datastructure should I use to store the audio file and the in...
TITLE: Which data structure for linking text with audio in Java QUESTION: I want to write a program in which plays an audio file that reads a text. I want to highlite the current syllable that the audiofile plays in green and the rest of the current word in red. What kind of datastructure should I use to store the aud...
[ "java", "audio" ]
2
3
421
4
0
2008-10-05T15:35:35.193000
2008-10-21T12:50:11.527000
172,156
172,382
What does "Total Length of columns in constraint is too long" err mean in Informix?
I get the Total length of columns in constraint is too long. erro from the following sql] Failed to execute: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHAR(255) NOT NULL, FLAGS INTEGER NOT NULL, MONITOR_NAME VARCHAR(255) NOT NULL, CLASSNA...
Your primary key constraint is 785 bytes (255+20+255+255). If you increase your database page size to 4K it should work, barely. You should also reconsider if you need your columns to be as wide as you are defining them. I found a discussion group where an engineer, Radhika Gadde, describes that the maximum index size ...
What does "Total Length of columns in constraint is too long" err mean in Informix? I get the Total length of columns in constraint is too long. erro from the following sql] Failed to execute: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHA...
TITLE: What does "Total Length of columns in constraint is too long" err mean in Informix? QUESTION: I get the Total length of columns in constraint is too long. erro from the following sql] Failed to execute: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, AC...
[ "sql", "informix" ]
1
3
1,325
2
0
2008-10-05T15:42:27.613000
2008-10-05T18:16:16.243000
172,164
173,550
Apache or lighttpd
For development, I use a local LAMP stack, for production I'm using MediaTemple's Django Container (which I'm loving BTW). MT's container uses lighthttpd. Honestly I've never had any other experience with it. I've always used Apache. I've been doing some reading: Onlamp TextDrive Linux.com Here's are questions: What st...
The way you interface between the web server and Django might have even a greater impact on performance than the choice of web server software. For instance, mod_python is known to be heavy on RAM. This question and its answers discuss other web server options as well. I wouldn't be concerned on compatibility issues wi...
Apache or lighttpd For development, I use a local LAMP stack, for production I'm using MediaTemple's Django Container (which I'm loving BTW). MT's container uses lighthttpd. Honestly I've never had any other experience with it. I've always used Apache. I've been doing some reading: Onlamp TextDrive Linux.com Here's are...
TITLE: Apache or lighttpd QUESTION: For development, I use a local LAMP stack, for production I'm using MediaTemple's Django Container (which I'm loving BTW). MT's container uses lighthttpd. Honestly I've never had any other experience with it. I've always used Apache. I've been doing some reading: Onlamp TextDrive Li...
[ "django", "apache", "lighttpd" ]
12
3
2,624
5
0
2008-10-05T15:46:40.757000
2008-10-06T08:08:48.463000
172,175
172,220
How do you bind a DropDownList in a GridView in the EditItemTemplate Field?
Here's my code in a gridview that is bound at runtime:... <%# Eval("opponent.name") %>... I want to bind the dropdownlist "ddgvOpp" but i don't know how. I should, but I don't. Here's what I have, but I keep getting an "Object reference" error, which makes sense: protected void gvResults_RowDataBound(object sender, Gri...
Ok, I guess I'm just dumb. I figured it out. In the RowDataBound event, simply add the following conditional: if (myGridView.EditIndex == e.Row.RowIndex) { //do work }
How do you bind a DropDownList in a GridView in the EditItemTemplate Field? Here's my code in a gridview that is bound at runtime:... <%# Eval("opponent.name") %>... I want to bind the dropdownlist "ddgvOpp" but i don't know how. I should, but I don't. Here's what I have, but I keep getting an "Object reference" error,...
TITLE: How do you bind a DropDownList in a GridView in the EditItemTemplate Field? QUESTION: Here's my code in a gridview that is bound at runtime:... <%# Eval("opponent.name") %>... I want to bind the dropdownlist "ddgvOpp" but i don't know how. I should, but I don't. Here's what I have, but I keep getting an "Object...
[ "asp.net", "data-binding", "gridview" ]
8
6
42,626
5
0
2008-10-05T15:53:35.703000
2008-10-05T16:27:52.950000
172,176
172,205
Indexing URL's in SQL Server 2005
What is the best way to deal with storing and indexing URL's in SQL Server 2005? I have a WebPage table that stores metadata and content about Web Pages. I also have many other tables related to the WebPage table. They all use URL as a key. The problem is URL's can be very large, and using them as a key makes the index...
I'd use a normal identity column as the primary key. You say: This keeps all the associated indexes smaller and more efficient but it makes importing data a bit of a pain. Each import for the associated tables has to first lookup what the id of a url is before inserting data in the tables. Yes, but the pain is probably...
Indexing URL's in SQL Server 2005 What is the best way to deal with storing and indexing URL's in SQL Server 2005? I have a WebPage table that stores metadata and content about Web Pages. I also have many other tables related to the WebPage table. They all use URL as a key. The problem is URL's can be very large, and u...
TITLE: Indexing URL's in SQL Server 2005 QUESTION: What is the best way to deal with storing and indexing URL's in SQL Server 2005? I have a WebPage table that stores metadata and content about Web Pages. I also have many other tables related to the WebPage table. They all use URL as a key. The problem is URL's can be...
[ "sql-server", "performance" ]
3
4
733
5
0
2008-10-05T15:54:07.200000
2008-10-05T16:17:15.687000
172,192
172,218
How can I show the result of a POST request as an image?
I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit. I could simply pass the record ID to the ...
In the end, I think quering the database will probably be faster. To get a small string (say up to 2000 characters) from the database is very quick and probably faster than having the user post it all the time, especially if there is more than 1 on a page. The best option would be create the image once and cache it if ...
How can I show the result of a POST request as an image? I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url c...
TITLE: How can I show the result of a POST request as an image? QUESTION: I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into probl...
[ "html", "ajax", "image", "post", "get" ]
2
5
7,955
6
0
2008-10-05T16:07:15.800000
2008-10-05T16:27:06.027000
172,199
172,273
good resource for socket errors?
Where can I find a list of all types of bsd style socket errors?
In the documentation? For instance, for connect(), see: % man connect... ECONNREFUSED No-one listening on the remote address. EISCONN The socket is already connected. ENETUNREACH Network is unreachable.
good resource for socket errors? Where can I find a list of all types of bsd style socket errors?
TITLE: good resource for socket errors? QUESTION: Where can I find a list of all types of bsd style socket errors? ANSWER: In the documentation? For instance, for connect(), see: % man connect... ECONNREFUSED No-one listening on the remote address. EISCONN The socket is already connected. ENETUNREACH Network is unre...
[ "c++", "c", "sockets" ]
2
6
1,266
4
0
2008-10-05T16:12:52.623000
2008-10-05T16:53:48.467000
172,203
172,922
Why does System.Net.Mail fail where System.Web.Mail works
I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't get them both to work with smtp.att.yahoo.com. I get the SMTP settings from my own Web.config keys. These settings work when I send using System.Web.Mail, but fail with System.Net.Mail. Here is the code that grabs my settings, and works ...
I've learned the answer. The answer is: Because System.Net.Mail does not support "implicit" SSL, only "explicit" SSL.
Why does System.Net.Mail fail where System.Web.Mail works I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't get them both to work with smtp.att.yahoo.com. I get the SMTP settings from my own Web.config keys. These settings work when I send using System.Web.Mail, but fail with System.Net...
TITLE: Why does System.Net.Mail fail where System.Web.Mail works QUESTION: I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't get them both to work with smtp.att.yahoo.com. I get the SMTP settings from my own Web.config keys. These settings work when I send using System.Web.Mail, but fa...
[ ".net", "asp.net", "email", "smtp" ]
6
10
4,430
3
0
2008-10-05T16:16:08.763000
2008-10-06T00:43:23.200000
172,209
175,639
Is it possible to get perforce to behave like subversion?
Can perforce be adjusted so I don't need to "open files for edit"? Someone told me that this was a "feature", and that s/he guessed it could be turned off.
See http://www.perforce.com/perforce/doc.081/manuals/p4guide/02_config.html (section Configuring workspace options ). You can set the allwrite option, but even then you would have to do the offline synchronization or something like checking out all files and doing p4 revert -a (revert unchanged files) to find out which...
Is it possible to get perforce to behave like subversion? Can perforce be adjusted so I don't need to "open files for edit"? Someone told me that this was a "feature", and that s/he guessed it could be turned off.
TITLE: Is it possible to get perforce to behave like subversion? QUESTION: Can perforce be adjusted so I don't need to "open files for edit"? Someone told me that this was a "feature", and that s/he guessed it could be turned off. ANSWER: See http://www.perforce.com/perforce/doc.081/manuals/p4guide/02_config.html (se...
[ "svn", "version-control", "perforce" ]
3
1
1,065
5
0
2008-10-05T16:19:52.827000
2008-10-06T18:40:12.497000
172,227
188,558
What is the max length of an Informix column and can it be increased?
I am trying to create a table with the following: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHAR(255) NOT NULL, FLAGS INTEGER NOT NULL, MONITOR_NAME VARCHAR(255) NOT NULL, CLASSNAME VARCHAR(255) NOT NULL, STR0 VARCHAR(255), STR1 VARCHAR(2...
It would help if the SQL statement was syntactically valid and if you provided the exact error message. When reformatted and syntax corrected, the statement looks like: CREATE TABLE gtw_workflow_mon ( workflow_name VARCHAR(255) NOT NULL, workflow_loaded NUMERIC(20) NOT NULL, activity_name VARCHAR(255) NOT NULL, flags I...
What is the max length of an Informix column and can it be increased? I am trying to create a table with the following: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHAR(255) NOT NULL, FLAGS INTEGER NOT NULL, MONITOR_NAME VARCHAR(255) NOT NU...
TITLE: What is the max length of an Informix column and can it be increased? QUESTION: I am trying to create a table with the following: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHAR(255) NOT NULL, FLAGS INTEGER NOT NULL, MONITOR_NAME V...
[ "sql", "database", "informix" ]
3
11
12,021
1
0
2008-10-05T16:30:11.883000
2008-10-09T18:26:44.470000
172,258
179,200
Resetting all items in a TiddlyWiki/CheckboxPlugin checklist
I've written up a weekly-review GTD checklist for myself in TiddlyWiki, using CheckboxPlugin. After I'm finished with it each week, I'd like to click one link to uncheck (reset) all of the items on it, so it's ready for the next use. I'm storing the check information as tags on a separate tiddler page. I should be able...
It took a while, but I figured it out (thanks to ELS's answer for the inspiration): This only works because I'm storing the tags in a separate tiddler, and using the InlineJavascriptPlugin.
Resetting all items in a TiddlyWiki/CheckboxPlugin checklist I've written up a weekly-review GTD checklist for myself in TiddlyWiki, using CheckboxPlugin. After I'm finished with it each week, I'd like to click one link to uncheck (reset) all of the items on it, so it's ready for the next use. I'm storing the check inf...
TITLE: Resetting all items in a TiddlyWiki/CheckboxPlugin checklist QUESTION: I've written up a weekly-review GTD checklist for myself in TiddlyWiki, using CheckboxPlugin. After I'm finished with it each week, I'd like to click one link to uncheck (reset) all of the items on it, so it's ready for the next use. I'm sto...
[ "javascript", "tiddlywiki" ]
0
0
1,476
2
0
2008-10-05T16:47:58.167000
2008-10-07T16:03:00.770000
172,262
172,274
C++ #include and #import difference
What is the difference between #include and #import in C++?
#import is a Microsoft-specific thing, apparently for COM or.NET stuff only. #include is a standard C/C++ preprocessor statement, used for including header (or occasionally other source code) files in your source code file.
C++ #include and #import difference What is the difference between #include and #import in C++?
TITLE: C++ #include and #import difference QUESTION: What is the difference between #include and #import in C++? ANSWER: #import is a Microsoft-specific thing, apparently for COM or.NET stuff only. #include is a standard C/C++ preprocessor statement, used for including header (or occasionally other source code) files...
[ "c++", "visual-c++", "gcc", "import", "include" ]
113
72
86,247
6
0
2008-10-05T16:50:17.273000
2008-10-05T16:54:19.403000
172,265
172,671
How can I control the name of generic WCF return types?
I've got a WCF Web Service method whose prototype is: [OperationContract] Response > GetCustomers(); When I add the service reference to a client, Visual Studio (2005) creates a type called "ResponseOfArrayOfCustomerrleXg3IC" that is a wrapper for "Response >". Is there any way I can control the wrapper name? ResponseO...
You can define your own name in the DataContract attribute like this: [DataContract(Name = "ResponseOf{0}")] public class Response Note that in your example the {0} will be replaced and your proxy reference type will be ResponseOfArrayOfCustomer. More info here: WCF: Serialization and Generics
How can I control the name of generic WCF return types? I've got a WCF Web Service method whose prototype is: [OperationContract] Response > GetCustomers(); When I add the service reference to a client, Visual Studio (2005) creates a type called "ResponseOfArrayOfCustomerrleXg3IC" that is a wrapper for "Response >". Is...
TITLE: How can I control the name of generic WCF return types? QUESTION: I've got a WCF Web Service method whose prototype is: [OperationContract] Response > GetCustomers(); When I add the service reference to a client, Visual Studio (2005) creates a type called "ResponseOfArrayOfCustomerrleXg3IC" that is a wrapper fo...
[ "wcf", "web-services", "generics" ]
8
18
4,964
3
0
2008-10-05T16:50:58.223000
2008-10-05T21:07:01
172,278
172,309
PL/SQL: How to execute an SP which preforms a DML and has a return value?
I have a stored procedure with the following header: FUNCTION SaveShipment (p_user_id IN INTEGER, p_transaction_id IN INTEGER, p_vehicle_code IN VARCHAR2 DEFAULT NULL, p_seals IN VARCHAR2 DEFAULT NULL) RETURN INTEGER; And I am having trouble running it from TOAD's Editor. I cannot run it as part of a select from dual s...
Are you calling the stored procedure from another SP? I think the syntax is (if I recall correctly): declare c integer; begin c:=storedProc(...parameters...); Hope this helps.
PL/SQL: How to execute an SP which preforms a DML and has a return value? I have a stored procedure with the following header: FUNCTION SaveShipment (p_user_id IN INTEGER, p_transaction_id IN INTEGER, p_vehicle_code IN VARCHAR2 DEFAULT NULL, p_seals IN VARCHAR2 DEFAULT NULL) RETURN INTEGER; And I am having trouble runn...
TITLE: PL/SQL: How to execute an SP which preforms a DML and has a return value? QUESTION: I have a stored procedure with the following header: FUNCTION SaveShipment (p_user_id IN INTEGER, p_transaction_id IN INTEGER, p_vehicle_code IN VARCHAR2 DEFAULT NULL, p_seals IN VARCHAR2 DEFAULT NULL) RETURN INTEGER; And I am h...
[ "oracle", "syntax", "plsql" ]
1
2
518
2
0
2008-10-05T16:58:09.223000
2008-10-05T17:10:48.200000
172,279
172,291
What is obj folder generated for?
Possible Duplicate: What are the obj and bin folders (created by Visual Studio) used for? The default output path for any project is Visual studio is bin/Debug, but I have noticed that obj folder is also generated which again contains dll and pdb files. Can someone tell me why is this folder generated?
"obj" folder is used to store temporary object files and other files used to create the final binary. Further reading here
What is obj folder generated for? Possible Duplicate: What are the obj and bin folders (created by Visual Studio) used for? The default output path for any project is Visual studio is bin/Debug, but I have noticed that obj folder is also generated which again contains dll and pdb files. Can someone tell me why is this ...
TITLE: What is obj folder generated for? QUESTION: Possible Duplicate: What are the obj and bin folders (created by Visual Studio) used for? The default output path for any project is Visual studio is bin/Debug, but I have noticed that obj folder is also generated which again contains dll and pdb files. Can someone te...
[ "c#", ".net", "visual-studio", "build-process" ]
92
104
46,093
1
0
2008-10-05T16:58:21.047000
2008-10-05T17:03:30.477000
172,300
172,358
What is the state of the art user interface for browsing complex version control system history?
When using Mercurial I sometimes find that it is hard to understand the relationship between changesets when there are thousands of changesets, and sometimes ten or more active branches at any one time. Currently, I use hgview which is okay, and while it makes a reasonable attempt to represent the parent relationships ...
the gitk(1) tool for git is what I use at work. Note that it takes a git rev-list constraint so you can limit what you see. You definitely want to begin doing such selective picking in the long run when the amount of commits go up.
What is the state of the art user interface for browsing complex version control system history? When using Mercurial I sometimes find that it is hard to understand the relationship between changesets when there are thousands of changesets, and sometimes ten or more active branches at any one time. Currently, I use hgv...
TITLE: What is the state of the art user interface for browsing complex version control system history? QUESTION: When using Mercurial I sometimes find that it is hard to understand the relationship between changesets when there are thousands of changesets, and sometimes ten or more active branches at any one time. Cu...
[ "git", "version-control", "mercurial", "visualization" ]
8
6
498
2
0
2008-10-05T17:06:12.217000
2008-10-05T17:57:15.157000
172,302
174,037
What's a good algorithm for editing a "schedule" most efficiently?
This is for a small scheduling app. I need an algorithm to efficiently compare two "schedules", find differences, and update only the data rows which have been changed, as well as entries in another table having this table as a foreign key. This is a big question, so I'll say right away I'm looking for either general a...
I have worked extensively with periods, but I'm afraid I don't understand entirely how table A and B work together, perhaps it's the word subsume that I don't understand. Can you give some concrete examples of what you want done? Do you mean that timespans recorded in table A contains entirely timespans in table B, lik...
What's a good algorithm for editing a "schedule" most efficiently? This is for a small scheduling app. I need an algorithm to efficiently compare two "schedules", find differences, and update only the data rows which have been changed, as well as entries in another table having this table as a foreign key. This is a bi...
TITLE: What's a good algorithm for editing a "schedule" most efficiently? QUESTION: This is for a small scheduling app. I need an algorithm to efficiently compare two "schedules", find differences, and update only the data rows which have been changed, as well as entries in another table having this table as a foreign...
[ "database", "algorithm", "diff" ]
2
7
505
5
0
2008-10-05T17:07:21.077000
2008-10-06T12:12:24.697000
172,303
172,316
Is there a regular expression to detect a valid regular expression?
Is it possible to detect a valid regular expression with another regular expression? If so please give example code below.
/ ^ # start of string ( # first group start (?: (?:[^?+*{}()[\]\\|]+ # literals and ^, $ | \\. # escaped characters | \[ (?: \^?\\. | \^[^\\] | [^\\^] ) # character classes (?: [^\]\\]+ | \\. )* \] | \( (?:\?[:=!]|\?<[=!]|\?>)? (?1)?? \) # parenthesis, with recursive content | \(\? (?:R|[+-]?\d+) \) # recursive matchin...
Is there a regular expression to detect a valid regular expression? Is it possible to detect a valid regular expression with another regular expression? If so please give example code below.
TITLE: Is there a regular expression to detect a valid regular expression? QUESTION: Is it possible to detect a valid regular expression with another regular expression? If so please give example code below. ANSWER: / ^ # start of string ( # first group start (?: (?:[^?+*{}()[\]\\|]+ # literals and ^, $ | \\. # escap...
[ "regex" ]
1,158
1,069
260,788
10
0
2008-10-05T17:07:35.227000
2008-10-05T17:15:56.067000
172,306
214,601
How are you planning on handling the migration to Python 3?
I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction: Will you have a python 2 and python 3 version to be maintained concurrently or will you simply have a python 3 version once it's finished? Have you alre...
Here's the general plan for Twisted. I was originally going to blog this, but then I thought: why blog about it when I could get points for it? Wait until somebody cares. Right now, nobody has Python 3. We're not going to spend a bunch of effort until at least one actual user has come forth and said "I need Python 3.0 ...
How are you planning on handling the migration to Python 3? I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction: Will you have a python 2 and python 3 version to be maintained concurrently or will you simp...
TITLE: How are you planning on handling the migration to Python 3? QUESTION: I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction: Will you have a python 2 and python 3 version to be maintained concurrentl...
[ "python", "migration", "python-3.x", "python-2to3" ]
52
90
10,387
7
0
2008-10-05T17:08:30.467000
2008-10-18T04:59:57.047000
172,318
172,323
Solaris timezone in C (missing %z on strftime)
I have an application that writes to another application and needs to provide the date + timezone of the system. I have been using strftime with the %z argument to get the timezone, and it has been working very well on Linux. However, last week we decided to merge it to solaris just to find out that %z is not present. ...
%z is not POSIX. You will have to calculate the offset yourself by finding the difference between localtime and gmtime. For a Perl example, see here.
Solaris timezone in C (missing %z on strftime) I have an application that writes to another application and needs to provide the date + timezone of the system. I have been using strftime with the %z argument to get the timezone, and it has been working very well on Linux. However, last week we decided to merge it to so...
TITLE: Solaris timezone in C (missing %z on strftime) QUESTION: I have an application that writes to another application and needs to provide the date + timezone of the system. I have been using strftime with the %z argument to get the timezone, and it has been working very well on Linux. However, last week we decided...
[ "c", "solaris", "strftime" ]
1
2
1,649
1
0
2008-10-05T17:18:05.750000
2008-10-05T17:25:22.600000
172,320
172,369
Same class, different namespaces, a way to simplify?
I'm working with a webservice that offers almost duplicated code across two namesspaces. Lets say for example PigFeet and HorseFeet, both namespaces contain a Feet class and other code that works with the Feet class requires it to be part of that same namespace. Right now In my code I'm forced to do something like this...
The namespace isn't the problem - it's simply that the 2 classes aren't related, so there's no inheritance chain that you can use for polymorphism. You'll need to look at something like duck typing, or an adapter pattern, or building your own proxy classes to get yourself to a common interface. For small numbers of imp...
Same class, different namespaces, a way to simplify? I'm working with a webservice that offers almost duplicated code across two namesspaces. Lets say for example PigFeet and HorseFeet, both namespaces contain a Feet class and other code that works with the Feet class requires it to be part of that same namespace. Righ...
TITLE: Same class, different namespaces, a way to simplify? QUESTION: I'm working with a webservice that offers almost duplicated code across two namesspaces. Lets say for example PigFeet and HorseFeet, both namespaces contain a Feet class and other code that works with the Feet class requires it to be part of that sa...
[ "c#", "namespaces" ]
3
2
3,401
4
0
2008-10-05T17:21:53.373000
2008-10-05T18:07:00.083000
172,321
172,328
How do you do ALSA in Mono?
Does anyone know how to access ALSA (low-level audio API) in Linux using Mono? NOTE: I'm hoping to access ALSA using PInvoke.
I believe there are not any bindings for Mono. You could look at the Python ALSA bindings and the Mono D-BUS bindings and try to build your own. However, it would probably be better and easier for you to just use GStreamer. The Mono GStreamer bindings are mature and work well.
How do you do ALSA in Mono? Does anyone know how to access ALSA (low-level audio API) in Linux using Mono? NOTE: I'm hoping to access ALSA using PInvoke.
TITLE: How do you do ALSA in Mono? QUESTION: Does anyone know how to access ALSA (low-level audio API) in Linux using Mono? NOTE: I'm hoping to access ALSA using PInvoke. ANSWER: I believe there are not any bindings for Mono. You could look at the Python ALSA bindings and the Mono D-BUS bindings and try to build your...
[ ".net", "linux", "mono", "ffi", "alsa" ]
3
2
1,692
1
0
2008-10-05T17:24:55.923000
2008-10-05T17:30:21.157000
172,343
196,281
Blackbox type data logging
In a Linux embedded application I'm developing, there is the need to record some events that happen from time to time. These records are saved on a MTD flash device and once written there is no need to change them or do efficient searches, but read access is required to show the data back to the user. A big problem is ...
We are using plain old syslogd to a YAFFS2 partition on NAND flash, it appears to work well: when messages are sent to the logger and power is removed immediately after (<100ms) the message is there and the log never appears to corrupt. This is based on observation rather than my explicitly knowing that everything will...
Blackbox type data logging In a Linux embedded application I'm developing, there is the need to record some events that happen from time to time. These records are saved on a MTD flash device and once written there is no need to change them or do efficient searches, but read access is required to show the data back to ...
TITLE: Blackbox type data logging QUESTION: In a Linux embedded application I'm developing, there is the need to record some events that happen from time to time. These records are saved on a MTD flash device and once written there is no need to change them or do efficient searches, but read access is required to show...
[ "linux", "logging", "embedded", "filesystems", "corruption" ]
3
1
744
5
0
2008-10-05T17:43:28.320000
2008-10-12T23:24:25.853000
172,353
172,378
How to push a key and release it using C#?
I am writing a C# program which captures signals from a external device, and sends keystrokes to another application. I am using SendKeys and it works fine. SendKeys does "press" a key by holding and releasing it immediately. I would like to make it push key and release it at will. My question is: "is there a way to se...
I don't think it's possible from.NET directly You could try using keybd_event native call by p/invoking the function as described here: http://pinvoke.net/default.aspx/user32.keybd_event The MSDN for keybd_event is here: http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx Hope that helps!
How to push a key and release it using C#? I am writing a C# program which captures signals from a external device, and sends keystrokes to another application. I am using SendKeys and it works fine. SendKeys does "press" a key by holding and releasing it immediately. I would like to make it push key and release it at ...
TITLE: How to push a key and release it using C#? QUESTION: I am writing a C# program which captures signals from a external device, and sends keystrokes to another application. I am using SendKeys and it works fine. SendKeys does "press" a key by holding and releasing it immediately. I would like to make it push key ...
[ "c#", "keyboard" ]
8
5
6,469
4
0
2008-10-05T17:52:03.903000
2008-10-05T18:11:45.003000
172,365
172,377
Is it possible to print just the canvas element?
I've created a web page that lets you input some information and then draws an image in a canvas element based on that info. I have it pretty much working the way I want except for the printing. Is there a way to print out the canvas element or is creating a new window to draw in, the only way to do it? Update: The ans...
You could try something like this: @media print { * { display:none; } #SOME-CANVAS-ID { display:block; } } I'm not sure if a canvas is block by default, but you could try something along the lines of that and see if it works. The idea is that it will hide everything (*) for print media, except for some other arbitrary...
Is it possible to print just the canvas element? I've created a web page that lets you input some information and then draws an image in a canvas element based on that info. I have it pretty much working the way I want except for the printing. Is there a way to print out the canvas element or is creating a new window t...
TITLE: Is it possible to print just the canvas element? QUESTION: I've created a web page that lets you input some information and then draws an image in a canvas element based on that info. I have it pretty much working the way I want except for the printing. Is there a way to print out the canvas element or is creat...
[ "javascript", "printing", "canvas" ]
3
5
5,557
3
0
2008-10-05T18:04:24.317000
2008-10-05T18:10:58.233000
172,388
172,433
What is the difference between an nanokernel and an exokernel?
I understand that they are both supposed to be small, but what are the key differences between the two?
Exokernel is an operating system from MIT (and a class of it's variants) which handles relatively little hardware abstraction. In exokernel, the low-level responsibilities of controlling hardware (particularly memory allocation ) are often left in the hands of the developer. Many developers would probably prefer to hav...
What is the difference between an nanokernel and an exokernel? I understand that they are both supposed to be small, but what are the key differences between the two?
TITLE: What is the difference between an nanokernel and an exokernel? QUESTION: I understand that they are both supposed to be small, but what are the key differences between the two? ANSWER: Exokernel is an operating system from MIT (and a class of it's variants) which handles relatively little hardware abstraction....
[ "kernel" ]
17
26
8,591
2
0
2008-10-05T18:21:28.587000
2008-10-05T18:43:36.890000
172,392
172,458
What symmetric cypher to use for encrypting messages?
I haven't a clue about encryption at all. But I need it. How? Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restriction). Say you want to make sure only your nodes can read the messag...
Your first thought should be channel security - either SSL/TLS, or IPSec. Admittedly, these both have a certain amount of setup overhead, IPSec more than SSL/TLS, especially when it comes to PKI etc. - but it more than pays for itself in simplicity of development, reliability, security, and more. Just make sure you're ...
What symmetric cypher to use for encrypting messages? I haven't a clue about encryption at all. But I need it. How? Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design restriction). Say you...
TITLE: What symmetric cypher to use for encrypting messages? QUESTION: I haven't a clue about encryption at all. But I need it. How? Say you have a system of nodes communicating with each other on a network via asynchronous messages. The nodes do not maintain session information about other nodes (this is a design res...
[ "python", "security", "encryption" ]
5
7
2,837
7
0
2008-10-05T18:23:19.677000
2008-10-05T18:52:23.160000
172,393
172,413
How do I get the max data size of every column in an IQueryable using LINQ
I have a method that takes an IQueryable. Is there a LINQ query that will give me back the size of each column in the IQueryable? To be more clear: this is Linq-to-objects. I want to get the length of the ToString() of each "column".
It depends. If you mean is there a completely generic way to make this determination the answer is no. All IQueryable will give access to is the Type of each expression. There is no way to arbitrarily map a Type to a column size. If on the other hand you have the ability to map a Type to members and member type to a co...
How do I get the max data size of every column in an IQueryable using LINQ I have a method that takes an IQueryable. Is there a LINQ query that will give me back the size of each column in the IQueryable? To be more clear: this is Linq-to-objects. I want to get the length of the ToString() of each "column".
TITLE: How do I get the max data size of every column in an IQueryable using LINQ QUESTION: I have a method that takes an IQueryable. Is there a LINQ query that will give me back the size of each column in the IQueryable? To be more clear: this is Linq-to-objects. I want to get the length of the ToString() of each "co...
[ "linq", "linq-to-objects" ]
0
1
979
3
0
2008-10-05T18:23:21.050000
2008-10-05T18:34:24.787000
172,397
172,527
How do I use BGGA closures prototype on standard Mac JDK6?
I am trying to use the BGGA closures prototype with an existing JDK 6 (standard on Mac OS X Leopard). The sample code I'm compiling is from a BGGA tutorial: public static void main(String[] args) { // function with no arguments; return value is always 42 int answer = { => 42 }.invoke(); System.out.println(answer); } I ...
The TAR file distribution includes a modified javac.bat with a complete command line, including "-source 7", which is probably what you are missing here.
How do I use BGGA closures prototype on standard Mac JDK6? I am trying to use the BGGA closures prototype with an existing JDK 6 (standard on Mac OS X Leopard). The sample code I'm compiling is from a BGGA tutorial: public static void main(String[] args) { // function with no arguments; return value is always 42 int an...
TITLE: How do I use BGGA closures prototype on standard Mac JDK6? QUESTION: I am trying to use the BGGA closures prototype with an existing JDK 6 (standard on Mac OS X Leopard). The sample code I'm compiling is from a BGGA tutorial: public static void main(String[] args) { // function with no arguments; return value i...
[ "java", "eclipse", "maven-2", "closures", "bgga" ]
2
1
334
2
0
2008-10-05T18:25:48.203000
2008-10-05T19:47:26.153000
172,408
172,846
What DB design to use for collecting configurable demographic data?
I'm working on an application for a charitable student organization. The application will track participation and fund-raising for (primarily) student participants in an event. One of the things we'd like to do is collect some demographic information about students who register for the event from our enterprise directo...
Here are my thoughts: You shouldn't tie in demographics with registration. It doesn't make sense logically and this can always lead to practical issues. You can instead create a demographics history table, e.g. StudentID, StartDate, EndDate, xxxDemographics, yyyDemographics...) Different academic insituttions have may ...
What DB design to use for collecting configurable demographic data? I'm working on an application for a charitable student organization. The application will track participation and fund-raising for (primarily) student participants in an event. One of the things we'd like to do is collect some demographic information a...
TITLE: What DB design to use for collecting configurable demographic data? QUESTION: I'm working on an application for a charitable student organization. The application will track participation and fund-raising for (primarily) student participants in an event. One of the things we'd like to do is collect some demogra...
[ "sql-server", "database", "database-design" ]
0
1
834
2
0
2008-10-05T18:31:44.823000
2008-10-05T23:34:26.117000
172,436
200,819
.NET Table Adapters: Get vs. Fill?
I always seem to use Get when working with data (strongly typed or otherwise) from the database and I have never really needed to use Fill although I just as easily could use Fill instead of get when pulling out and updating data. Can anyone provide guidance as to the implications and gotchas of each method? In what si...
A particular gotcha of Fill, if the table already contains data is that you could get unique index exceptions when, for example, the query returns a row whose primary key is already in the table. I've worked with a lot of data-bound Windows Forms code where edit controls or a grid on the form is bound to a table and th...
.NET Table Adapters: Get vs. Fill? I always seem to use Get when working with data (strongly typed or otherwise) from the database and I have never really needed to use Fill although I just as easily could use Fill instead of get when pulling out and updating data. Can anyone provide guidance as to the implications and...
TITLE: .NET Table Adapters: Get vs. Fill? QUESTION: I always seem to use Get when working with data (strongly typed or otherwise) from the database and I have never really needed to use Fill although I just as easily could use Fill instead of get when pulling out and updating data. Can anyone provide guidance as to th...
[ ".net", "database", "ado.net", "dataset", "strong-typing" ]
12
3
9,195
4
0
2008-10-05T18:45:14.170000
2008-10-14T11:43:36.423000
172,439
172,454
How do I split a multi-line string into multiple lines?
I have a multi-line string that I want to do an operation on each line, like so: inputString = """Line 1 Line 2 Line 3""" I want to iterate on each line: for line in inputString: doStuff()
inputString.splitlines() Will give you a list with each item, the splitlines() method is designed to split each line into a list element.
How do I split a multi-line string into multiple lines? I have a multi-line string that I want to do an operation on each line, like so: inputString = """Line 1 Line 2 Line 3""" I want to iterate on each line: for line in inputString: doStuff()
TITLE: How do I split a multi-line string into multiple lines? QUESTION: I have a multi-line string that I want to do an operation on each line, like so: inputString = """Line 1 Line 2 Line 3""" I want to iterate on each line: for line in inputString: doStuff() ANSWER: inputString.splitlines() Will give you a list wi...
[ "python", "string", "split" ]
353
537
547,040
7
0
2008-10-05T18:46:27.430000
2008-10-05T18:50:59.307000
172,443
264,805
GetOpt library for C#
I'm looking for a getopt library for c#. So far I found a few ( phpguru, XGetOptCS, getoptfordotnet ) but these look more like unfinished attempts that only support a part of C's getopt. Is there a full getopt c# implementation?
Here is a.NET Implementation of getopt: http://www.codeplex.com/getopt
GetOpt library for C# I'm looking for a getopt library for c#. So far I found a few ( phpguru, XGetOptCS, getoptfordotnet ) but these look more like unfinished attempts that only support a part of C's getopt. Is there a full getopt c# implementation?
TITLE: GetOpt library for C# QUESTION: I'm looking for a getopt library for c#. So far I found a few ( phpguru, XGetOptCS, getoptfordotnet ) but these look more like unfinished attempts that only support a part of C's getopt. Is there a full getopt c# implementation? ANSWER: Here is a.NET Implementation of getopt: ht...
[ "c#", "getopt" ]
29
9
18,142
8
0
2008-10-05T18:47:30.047000
2008-11-05T10:40:42.830000
172,448
181,737
Palm/Garnet OS Icon format?
I have googled around and not seen any info. What format and icon color depths are used for applications?
The Palm OS icon format is a variation of it's bitmap format. Palm OS supports a concept called bitmap families where multiple bitmaps of different color depths and pixel densities are bundled together, with the appropriate one chosen at runtime. An icon is just a bitmap stored in a 'tAIN' resource as part of the appli...
Palm/Garnet OS Icon format? I have googled around and not seen any info. What format and icon color depths are used for applications?
TITLE: Palm/Garnet OS Icon format? QUESTION: I have googled around and not seen any info. What format and icon color depths are used for applications? ANSWER: The Palm OS icon format is a variation of it's bitmap format. Palm OS supports a concept called bitmap families where multiple bitmaps of different color depth...
[ "icons", "file-format", "palm-os", "garnet-os" ]
2
3
397
1
0
2008-10-05T18:49:05.647000
2008-10-08T07:53:24.297000
172,486
172,492
What (pure) Python library to use for AES 256 encryption?
I am looking for a (preferably pure) python library to do AES 256 encryption and decryption. This library should support the CBC cipher mode and use PKCS7 padding according to the answer to an earlier question of mine. The library should at least work on Mac OS X (10.4) and Windows XP. Ideally just by dropping it into ...
PyCrypto should be the one for you. Edit 02/10/2020: unfortunately I cannot delete this post, since it's the accepted answer. As people pointed out in the comments, this library is not mantained anymore and probably also vulnerable from a security point of view. So please, take a look to the below answers instead.
What (pure) Python library to use for AES 256 encryption? I am looking for a (preferably pure) python library to do AES 256 encryption and decryption. This library should support the CBC cipher mode and use PKCS7 padding according to the answer to an earlier question of mine. The library should at least work on Mac OS ...
TITLE: What (pure) Python library to use for AES 256 encryption? QUESTION: I am looking for a (preferably pure) python library to do AES 256 encryption and decryption. This library should support the CBC cipher mode and use PKCS7 padding according to the answer to an earlier question of mine. The library should at lea...
[ "python", "encryption", "aes" ]
32
13
34,367
5
0
2008-10-05T19:14:49.137000
2008-10-05T19:25:48.083000
172,504
172,531
So - which exciting algorithms have you "discovered" recently?
I like to read about new and clever algorithms. And I like to think out of the box, so all kinds of algorithms from all fields of computation are welcome. From time to time I read research papers to keep up with the current research and expand my horizon. I also like to learn new tricks. Unfortunately I tend to concent...
It's not something completely new or exciting, but I like the Levenshtein Distance. The Levenshtein Distance is often referred to as the edit distance between two strings and is basically a metric that measures the difference between two strings by counting the minimum number of operations to convert one string to the ...
So - which exciting algorithms have you "discovered" recently? I like to read about new and clever algorithms. And I like to think out of the box, so all kinds of algorithms from all fields of computation are welcome. From time to time I read research papers to keep up with the current research and expand my horizon. I...
TITLE: So - which exciting algorithms have you "discovered" recently? QUESTION: I like to read about new and clever algorithms. And I like to think out of the box, so all kinds of algorithms from all fields of computation are welcome. From time to time I read research papers to keep up with the current research and ex...
[ "algorithm", "language-agnostic" ]
15
9
1,323
10
0
2008-10-05T19:33:48.847000
2008-10-05T19:50:02.590000
172,510
172,545
How to track third-party sources with ClearCase without a headache?
First of all: I am not an experienced ClearCase user, but I have lots of experience with other VCS and *nix command-line tools. WIth ClearCase, I use command-line tool ("cleartool") working in a Unix shell. Problem: I have a small set of sources stored in the ClearCase. Once in a while a fresh.tgz with the same sources...
I just want to be sure: You do know about clearfsimport, right? Because after reading (may be too quickly) your question, that command may be what you are after... That is what I thought... If you need more details, leave a comment to this answer. I will monitor those.
How to track third-party sources with ClearCase without a headache? First of all: I am not an experienced ClearCase user, but I have lots of experience with other VCS and *nix command-line tools. WIth ClearCase, I use command-line tool ("cleartool") working in a Unix shell. Problem: I have a small set of sources stored...
TITLE: How to track third-party sources with ClearCase without a headache? QUESTION: First of all: I am not an experienced ClearCase user, but I have lots of experience with other VCS and *nix command-line tools. WIth ClearCase, I use command-line tool ("cleartool") working in a Unix shell. Problem: I have a small set...
[ "version-control", "clearcase" ]
1
2
1,064
3
0
2008-10-05T19:37:00.323000
2008-10-05T20:01:39.587000
172,524
173,162
Populate a form with data from an associative array with jQuery
Last time I asked about the reverse process, and got some very efficient answers. I'm aiming for least lines of code here. I have a form of fields and an associative array in the {fieldname:data} format, I want to populate a corresponding form with it.
When I did this for a project, I found that setting the value of select fields, radio buttons and checkboxes necessitated more complex code, something along the lines of: jQuery.each(data, function (name,value) { jQuery("input[name='"+name+"'],select[name='"+name+"']").each(function() { switch (this.nodeName.toLowerCas...
Populate a form with data from an associative array with jQuery Last time I asked about the reverse process, and got some very efficient answers. I'm aiming for least lines of code here. I have a form of fields and an associative array in the {fieldname:data} format, I want to populate a corresponding form with it.
TITLE: Populate a form with data from an associative array with jQuery QUESTION: Last time I asked about the reverse process, and got some very efficient answers. I'm aiming for least lines of code here. I have a form of fields and an associative array in the {fieldname:data} format, I want to populate a corresponding...
[ "javascript", "jquery" ]
8
7
10,640
4
0
2008-10-05T19:44:50.870000
2008-10-06T03:59:30.777000
172,526
172,879
SQL Cursors...Any use cases you would defend?
I'll go first. I'm 100% in the set-operations camp. But what happens when the set logic on the entire desired input domain leads to a such a large retrieval that the query slows down significantly, comes to a crawl, or basically takes infinite time? That's one case where I'll use a itty-bitty cursor (or a while loop) o...
Sure, there are a number of places where cursors might be better than set-based operations. One is if you're updating a lot of data in a table (for example a SQL Agent job to pre-compute data on a schedule) then you might use cursors to do it in multiple small sets rather than one large one to reduce the amount of conc...
SQL Cursors...Any use cases you would defend? I'll go first. I'm 100% in the set-operations camp. But what happens when the set logic on the entire desired input domain leads to a such a large retrieval that the query slows down significantly, comes to a crawl, or basically takes infinite time? That's one case where I'...
TITLE: SQL Cursors...Any use cases you would defend? QUESTION: I'll go first. I'm 100% in the set-operations camp. But what happens when the set logic on the entire desired input domain leads to a such a large retrieval that the query slows down significantly, comes to a crawl, or basically takes infinite time? That's...
[ "sql", "sql-server", "t-sql", "set" ]
2
2
2,590
10
0
2008-10-05T19:46:22.067000
2008-10-06T00:04:13.077000
172,544
172,575
Ignore folders/files when Directory.GetFiles() is denied access
I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process stops. How do I ignore this exception (and ignore the protected f...
You will have to do the recursion manually; don't use AllDirectories - look one folder at a time, then try getting the files from sub-dirs. Untested, but something like below (note uses a delegate rather than building an array): using System; using System.IO; static class Program { static void Main() { string path = ""...
Ignore folders/files when Directory.GetFiles() is denied access I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process s...
TITLE: Ignore folders/files when Directory.GetFiles() is denied access QUESTION: I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception...
[ "c#", "getfiles" ]
82
50
104,460
9
0
2008-10-05T20:00:45.377000
2008-10-05T20:21:29.983000
172,546
172,608
How to use CMFCListCtrl with CListView?
I'd like to use the new CMFCListCtrl features with my CListView class (and, of course, the new CMFCHeaderCtrl inside it). Unfortunately, you can't use Attach() or SubclassWindow() because the SysListView32 window is already associated with a CListView object. Do I have to override CListView's OnCmdMsg() and route all m...
I'd inherit from CFormView and let the CMFCListCtrl occupy the complete dialog of the form view.
How to use CMFCListCtrl with CListView? I'd like to use the new CMFCListCtrl features with my CListView class (and, of course, the new CMFCHeaderCtrl inside it). Unfortunately, you can't use Attach() or SubclassWindow() because the SysListView32 window is already associated with a CListView object. Do I have to overrid...
TITLE: How to use CMFCListCtrl with CListView? QUESTION: I'd like to use the new CMFCListCtrl features with my CListView class (and, of course, the new CMFCHeaderCtrl inside it). Unfortunately, you can't use Attach() or SubclassWindow() because the SysListView32 window is already associated with a CListView object. Do...
[ "mfc", "mfc-feature-pack" ]
1
2
3,935
3
0
2008-10-05T20:02:09.617000
2008-10-05T20:34:42.407000
172,552
172,556
Where to create temp files when access to /tmp/ is denied?
I wrote a short bash script to complete a task that involves creating a temporary directory and storing various files in it and performing various operations on it. In my first pass I just created the temp dir at /tmp/$$.$script", but then I tested the script on a computer where I didn't have write access to /tmp/, and...
Many systems also have a /var/tmp. If the sysadmin doesn't want you writing in to /tmp, presumably they have provided some alternative… is the $TMPDIR environment variable set? For example, on my Mac: $ echo $TMPDIR /var/folders/jf/jfu4pjGtGGGkUuuq8HL7UE+++TI/-Tmp-/
Where to create temp files when access to /tmp/ is denied? I wrote a short bash script to complete a task that involves creating a temporary directory and storing various files in it and performing various operations on it. In my first pass I just created the temp dir at /tmp/$$.$script", but then I tested the script o...
TITLE: Where to create temp files when access to /tmp/ is denied? QUESTION: I wrote a short bash script to complete a task that involves creating a temporary directory and storing various files in it and performing various operations on it. In my first pass I just created the temp dir at /tmp/$$.$script", but then I t...
[ "command-line" ]
3
7
1,949
5
0
2008-10-05T20:04:37.070000
2008-10-05T20:07:37.843000
172,559
172,582
Most efficient way to index a returned array?
function returnsAnArray () { return array ('test'); } echo returnsAnArray ()[0]; generates a syntax error in PHP. What's the most efficient way to directly obtain an element from a returned array without assigning the result to a temp variable?
Here's one way, using the list language construct function returnsAnArray () { return array ('test'); } list($foo)=returnsAnArray(); You could grab a sequence of elements from an offset by combining this with array_slice list($third,$fourth,$fifth)=array_slice(returnsAnArray(), 2, 3);
Most efficient way to index a returned array? function returnsAnArray () { return array ('test'); } echo returnsAnArray ()[0]; generates a syntax error in PHP. What's the most efficient way to directly obtain an element from a returned array without assigning the result to a temp variable?
TITLE: Most efficient way to index a returned array? QUESTION: function returnsAnArray () { return array ('test'); } echo returnsAnArray ()[0]; generates a syntax error in PHP. What's the most efficient way to directly obtain an element from a returned array without assigning the result to a temp variable? ANSWER: H...
[ "php" ]
7
5
1,259
7
0
2008-10-05T20:09:57.370000
2008-10-05T20:23:24.893000
172,573
172,603
Is there a better Java implementation of SSH2 than JSch?
I've been using JSch for a couple of weeks now. It seems to work okay, but its API is a little bit cumbersome. I'm also a little off put by its total lack of documentation (not even javadoc style comments). Has anyone used a good Java SSH2 library that they'd recommend. I'm particularly interested in SCP file transfer ...
I am using J2SSH, works pretty well. I don't know how it compares to JSch though.
Is there a better Java implementation of SSH2 than JSch? I've been using JSch for a couple of weeks now. It seems to work okay, but its API is a little bit cumbersome. I'm also a little off put by its total lack of documentation (not even javadoc style comments). Has anyone used a good Java SSH2 library that they'd rec...
TITLE: Is there a better Java implementation of SSH2 than JSch? QUESTION: I've been using JSch for a couple of weeks now. It seems to work okay, but its API is a little bit cumbersome. I'm also a little off put by its total lack of documentation (not even javadoc style comments). Has anyone used a good Java SSH2 libra...
[ "java", "ssh" ]
8
5
6,640
2
0
2008-10-05T20:20:14.603000
2008-10-05T20:32:25.530000
172,587
172,592
What is the difference between g++ and gcc?
What is the difference between g++ and gcc? Which one of them should be used for general c++ development?
gcc and g++ are compiler-drivers of the GNU Compiler Collection (which was once upon a time just the GNU C Compiler ). Even though they automatically determine which backends ( cc1 cc1plus...) to call depending on the file-type, unless overridden with -x language, they have some differences. The probably most important...
What is the difference between g++ and gcc? What is the difference between g++ and gcc? Which one of them should be used for general c++ development?
TITLE: What is the difference between g++ and gcc? QUESTION: What is the difference between g++ and gcc? Which one of them should be used for general c++ development? ANSWER: gcc and g++ are compiler-drivers of the GNU Compiler Collection (which was once upon a time just the GNU C Compiler ). Even though they automat...
[ "c++", "gcc", "g++" ]
1,170
937
637,649
11
0
2008-10-05T20:25:13.563000
2008-10-05T20:26:59.520000
172,588
172,680
How to discover the type of media inserted in a DVD/CD drive? (java)
When I insert a DVD or CD, I want to programmatically know what type of media(DVD or CD) is it.
IMHO impossible to get this solved with pure Java. The only thing you can do is via the FileSystemView and detect whether a certain file is a cd/dvd drive but not if it contains a CD or DVD as media. Although a one can perform an educated guess by getting the total used space. For a working solution you'll need at leas...
How to discover the type of media inserted in a DVD/CD drive? (java) When I insert a DVD or CD, I want to programmatically know what type of media(DVD or CD) is it.
TITLE: How to discover the type of media inserted in a DVD/CD drive? (java) QUESTION: When I insert a DVD or CD, I want to programmatically know what type of media(DVD or CD) is it. ANSWER: IMHO impossible to get this solved with pure Java. The only thing you can do is via the FileSystemView and detect whether a cert...
[ "java", "multimedia" ]
4
2
632
1
0
2008-10-05T20:25:56.683000
2008-10-05T21:19:21.113000
172,599
172,940
Tool: ETL from an ODBC to SQL 05?
I just want a simple tool that will help me quickly write scripts/packages that I can schedule to run. My transform requirements are pretty simple (changing column names, merging/splitting tables, and date conversions). I'll sacrifice flexibility for speed of development on this one. Any come to mind?
SQL Server 2005? SSIS (but I wouldn't call it simple, but then again out of the list of things you gave, only the naming is really simple) You can actually script package creation using C# (.NET/whatever, presumably even PowerShell). Resources here and here EDIT: (hope you don't mind me butting in here Cade) Check that...
Tool: ETL from an ODBC to SQL 05? I just want a simple tool that will help me quickly write scripts/packages that I can schedule to run. My transform requirements are pretty simple (changing column names, merging/splitting tables, and date conversions). I'll sacrifice flexibility for speed of development on this one. A...
TITLE: Tool: ETL from an ODBC to SQL 05? QUESTION: I just want a simple tool that will help me quickly write scripts/packages that I can schedule to run. My transform requirements are pretty simple (changing column names, merging/splitting tables, and date conversions). I'll sacrifice flexibility for speed of developm...
[ "sql", "database", "odbc", "etl" ]
0
1
620
4
0
2008-10-05T20:30:49.543000
2008-10-06T00:59:40.157000
172,600
172,639
Typing generic values (C#)
When I try this with a generic class where this.value is T: if (this.value.GetType() == typeof(int)) { ((int)this.value)++; } else { throw new InvalidOperationException ("T must be an int to perform this operation"); } I get a compile-time error: "Cannot convert type 'T' to 'int'" What should I do to perform an integra...
Unfortunately, it is very hard to convince the compiler about specific T implementations. One (nasty) approach is to cast to object in the middle (note this will box and unbox value-types): int i = (int)(object)this.value; i++; this.value = (T)(object)i; Ugly but it works. In.NET 3.5 I have some better wrappers for gen...
Typing generic values (C#) When I try this with a generic class where this.value is T: if (this.value.GetType() == typeof(int)) { ((int)this.value)++; } else { throw new InvalidOperationException ("T must be an int to perform this operation"); } I get a compile-time error: "Cannot convert type 'T' to 'int'" What should...
TITLE: Typing generic values (C#) QUESTION: When I try this with a generic class where this.value is T: if (this.value.GetType() == typeof(int)) { ((int)this.value)++; } else { throw new InvalidOperationException ("T must be an int to perform this operation"); } I get a compile-time error: "Cannot convert type 'T' to ...
[ "c#", "generics" ]
13
24
7,809
5
0
2008-10-05T20:31:05.610000
2008-10-05T20:51:06.210000
172,614
172,621
Does Objective-C compile to native code or byte-code?
On OS X, does Objective-C compile to native code or byte-code? Can Objective-C programs be compiled on Linux?
Objective-C is compiled to native code by either GCC or LLVM[*]. You can compile ObjC programs on Linux (the generic GCC will happily support ObjC, though it uses a different runtime library than either of the Apple ones). For a cross-platform API similar to Cocoa (i.e. derived from Cocoa) which will happily work on Li...
Does Objective-C compile to native code or byte-code? On OS X, does Objective-C compile to native code or byte-code? Can Objective-C programs be compiled on Linux?
TITLE: Does Objective-C compile to native code or byte-code? QUESTION: On OS X, does Objective-C compile to native code or byte-code? Can Objective-C programs be compiled on Linux? ANSWER: Objective-C is compiled to native code by either GCC or LLVM[*]. You can compile ObjC programs on Linux (the generic GCC will hap...
[ "objective-c", "linux", "cocoa", "macos" ]
10
19
5,229
4
0
2008-10-05T20:35:40.720000
2008-10-05T20:40:25.950000
172,631
172,750
A platform for easy creation of custom websites?
I'm in a small business of hosting my clients' websites, and a lot of times they ask me to create one from scratch. I'm no designer, but I can code CSS/HTML, AJAX, PHP. However, I'm not willing to create sites from scratch, knowing how much is involved. In the past, I've tried using design templates, but they proved to...
No, Joomla is huge and heavy, is not a reliable solution. I recommend you Movable Type. It's written in PERL but have native support for multi-sites and multi-domains. Which is kinda cool:) Also, You can try Expression Engine whch also have some nice features for multi-domain users with one setup. Anyhow, the best solu...
A platform for easy creation of custom websites? I'm in a small business of hosting my clients' websites, and a lot of times they ask me to create one from scratch. I'm no designer, but I can code CSS/HTML, AJAX, PHP. However, I'm not willing to create sites from scratch, knowing how much is involved. In the past, I've...
TITLE: A platform for easy creation of custom websites? QUESTION: I'm in a small business of hosting my clients' websites, and a lot of times they ask me to create one from scratch. I'm no designer, but I can code CSS/HTML, AJAX, PHP. However, I'm not willing to create sites from scratch, knowing how much is involved....
[ "web-services" ]
0
1
309
4
0
2008-10-05T20:47:48.620000
2008-10-05T22:15:00.643000
172,646
172,672
How do I store an XML value in my .NET App.Config file
I am trying to store an xml value in my app.config file. The app.config does not like this and I cannot use the </code> construct to ignore the XML'ness of my value.</p> <p>Is there a way to do it?</p> <p>Value example:<code><FieldRef Name='LinkfileName' Nullable='True'/><FieldRef Name='Web' Nullable='True'/></code><...
You can save an XML document as text in an attribute value if you escape the character entities: <FieldRef Name="Linkfilename"... You can then use XmlDocument.Load() to parse the text value. Note that this won't work for your example because your value is an XML document fragment and not a well-formed XML document. You...
How do I store an XML value in my .NET App.Config file I am trying to store an xml value in my app.config file. The app.config does not like this and I cannot use the </code> construct to ignore the XML'ness of my value.</p> <p>Is there a way to do it?</p> <p>Value example:<code><FieldRef Name='LinkfileName' Nullable...
TITLE: How do I store an XML value in my .NET App.Config file QUESTION: I am trying to store an xml value in my app.config file. The app.config does not like this and I cannot use the </code> construct to ignore the XML'ness of my value.</p> <p>Is there a way to do it?</p> <p>Value example:<code><FieldRef Name='Link...
[ ".net", "xml", "configuration", "app-config" ]
7
7
7,921
1
0
2008-10-05T20:54:14.490000
2008-10-05T21:08:05.990000
172,648
172,656
Is there an agreed ideal schema for tagging
I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema? I still want to support having photos as part of an album. Right now i have a few tables: Photos PhotoID PhotoAlb...
There are various schemas which are effective, each with their own performance implications for the common queries you'll need as the number of tagged items grows: http://howto.philippkeller.com/2005/04/24/Tags-Database-schemas/ http://howto.philippkeller.com/2005/06/19/Tagsystems-performance-tests/ Personally, I like ...
Is there an agreed ideal schema for tagging I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema? I still want to support having photos as part of an album. Right now ...
TITLE: Is there an agreed ideal schema for tagging QUESTION: I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema? I still want to support having photos as part of an...
[ "sql", "schema", "tagging" ]
24
31
13,393
7
0
2008-10-05T20:54:45.703000
2008-10-05T20:58:41.827000
172,653
177,621
Design Tab Control with Visual Studio 2008 (without SP1)
Is there any way (maybe directly editing resource files) to configure a Tab Control (add/remove tabs and their captions and contents) at design time with Visual Studio 2008 without SP1 (I heard that SP1 has such feature)? P.S.: I use c++ with wtl
I don't think it's possible. The dialog script does not support the Tab control directly, instead, it inserts a generic "CONTROL" statement in which the control "SysTabControl32" is inserted. You need to assign the pages in code. The new feature in VS 2008 SP1 has to do with the WPF controls, but since you mention that...
Design Tab Control with Visual Studio 2008 (without SP1) Is there any way (maybe directly editing resource files) to configure a Tab Control (add/remove tabs and their captions and contents) at design time with Visual Studio 2008 without SP1 (I heard that SP1 has such feature)? P.S.: I use c++ with wtl
TITLE: Design Tab Control with Visual Studio 2008 (without SP1) QUESTION: Is there any way (maybe directly editing resource files) to configure a Tab Control (add/remove tabs and their captions and contents) at design time with Visual Studio 2008 without SP1 (I heard that SP1 has such feature)? P.S.: I use c++ with wt...
[ "c++", "visual-studio-2008" ]
1
0
4,499
2
0
2008-10-05T20:57:19.833000
2008-10-07T08:35:46.787000
172,658
172,666
Operator Overloading with C# Extension Methods
I'm attempting to use extension methods to add an operater overload to the C# StringBuilder class. Specifically, given StringBuilder sb, I'd like sb += "text" to become equivalent to sb.Append("text"). Here's the syntax for creating an extension method for StringBuilder: public static class sbExtensions { public static...
This is not currently possible, because extension methods must be in static classes, and static classes can't have operator overloads. But the feature is being discussed for some future release of C#. Mads talked a bit more about implementing it in this video from 2017. On why it isn't currently implemented, Mads Torge...
Operator Overloading with C# Extension Methods I'm attempting to use extension methods to add an operater overload to the C# StringBuilder class. Specifically, given StringBuilder sb, I'd like sb += "text" to become equivalent to sb.Append("text"). Here's the syntax for creating an extension method for StringBuilder: p...
TITLE: Operator Overloading with C# Extension Methods QUESTION: I'm attempting to use extension methods to add an operater overload to the C# StringBuilder class. Specifically, given StringBuilder sb, I'd like sb += "text" to become equivalent to sb.Append("text"). Here's the syntax for creating an extension method fo...
[ "c#", "extension-methods", "operator-overloading" ]
193
165
62,101
7
0
2008-10-05T20:59:03.527000
2008-10-05T21:04:11.473000
172,663
172,673
Creating a News Ticker which is updated from an RSS Feed - Javascript/any language
I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this? I would prefer Javascript but any language is acceptable.
There are are several good examples of this on this DynamicDrive page, although one of the requirements is that you can run PHP on your site. PHP here is used to fetch the actual feeds and allow your ticker to access them locally via an AJAX call. There are several other projects out there built on JQuery, and the basi...
Creating a News Ticker which is updated from an RSS Feed - Javascript/any language I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this? I would prefer Javascript but any language is acceptable.
TITLE: Creating a News Ticker which is updated from an RSS Feed - Javascript/any language QUESTION: I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this? I would prefer Javascript but any language is acceptable. ANSWER: There are are several good examples of this on this ...
[ "javascript", "rss", "news-ticker" ]
0
1
4,199
2
0
2008-10-05T21:00:38.517000
2008-10-05T21:11:08.447000
172,681
172,695
WCF DataContracts
I have a WCF service hosted for internal clients - we have control of all the clients. We will therefore be using a data contracts library to negate the need for proxy generation. I would like to use some readonly properties and have some datacontracts without default constructors. Thanks for your help...
Readonly properties are fine as long as you mark the (non-readonly) field as the [DataMember], not the property. Unlike XmlSerializer, IIRC DataContractSerializer doesn't use the default ctor - it uses a separate reflection mechanism to create uninitialized instances. Except on mono's " Olive " (WCF port), where it doe...
WCF DataContracts I have a WCF service hosted for internal clients - we have control of all the clients. We will therefore be using a data contracts library to negate the need for proxy generation. I would like to use some readonly properties and have some datacontracts without default constructors. Thanks for your hel...
TITLE: WCF DataContracts QUESTION: I have a WCF service hosted for internal clients - we have control of all the clients. We will therefore be using a data contracts library to negate the need for proxy generation. I would like to use some readonly properties and have some datacontracts without default constructors. T...
[ ".net", "wcf", "datacontract", "serialization" ]
13
27
9,254
1
0
2008-10-05T21:20:16.527000
2008-10-05T21:31:16.583000
172,682
172,689
Getting quickly up to speed on ASP.NET for an experienced coder
I have a contract in the offering from a client to develop an intranet application for capturing/manipulating/displaying a fairly complex set of marketing data. I've done this sort of thing before so the analysis, database etc. holds no issues for me, but the client would most likely prefer ASP.NET as they have some (s...
Since you're an experienced coder, I would suggest simply diving in and you'll pick it up as you go. From your list of skills, it is most like Delphi (Event-Driven programming). http://www.codeproject.com is very helpful and has many articles on ASP.NET, including ones for beginners and experts. I would also suggest an...
Getting quickly up to speed on ASP.NET for an experienced coder I have a contract in the offering from a client to develop an intranet application for capturing/manipulating/displaying a fairly complex set of marketing data. I've done this sort of thing before so the analysis, database etc. holds no issues for me, but ...
TITLE: Getting quickly up to speed on ASP.NET for an experienced coder QUESTION: I have a contract in the offering from a client to develop an intranet application for capturing/manipulating/displaying a fairly complex set of marketing data. I've done this sort of thing before so the analysis, database etc. holds no i...
[ "asp.net" ]
5
6
461
5
0
2008-10-05T21:22:25.320000
2008-10-05T21:27:02.410000
172,691
172,755
How to tell if the user's using 24 hour time using Cocoa
I'm trying to determine if the user is using 24 hour or 12 hour time, and there doesn't seem to be a good way to figure this out other than creating an NSDateFormatter and searching the format string for the period field ('a' character) Here's what I'm doing now: NSDateFormatter *formatter = [[NSDateFormatter alloc] in...
This information is provided in NSUserDefaults. Maybe under the NSShortTimeDateFormatString key? (Still requires parsing of course). (Use NSLog(@"%@", [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]); to dump all the pre-defined user defaults). Not quite sure why you want to do this - I bet you have a ...
How to tell if the user's using 24 hour time using Cocoa I'm trying to determine if the user is using 24 hour or 12 hour time, and there doesn't seem to be a good way to figure this out other than creating an NSDateFormatter and searching the format string for the period field ('a' character) Here's what I'm doing now:...
TITLE: How to tell if the user's using 24 hour time using Cocoa QUESTION: I'm trying to determine if the user is using 24 hour or 12 hour time, and there doesn't seem to be a good way to figure this out other than creating an NSDateFormatter and searching the format string for the period field ('a' character) Here's w...
[ "objective-c", "cocoa", "macos" ]
2
2
555
2
0
2008-10-05T21:28:30.893000
2008-10-05T22:16:02.217000
172,706
172,708
In a project, is there a choice of database systems?
In almost all projects, the choice of the database system is 'almost' automatic.. if you're coding "in the Microsoft stack" you'll go with SQLServer, in the Linux world the default is MySQL, and for corporate in-house project most shops have decided on some default like Oracle or IBM DB2. What are your thoughts?
My customers often stipulate what database engine we will be using. We write.net apps against non-SQLServer dbs regularly. In the long run, it's better for the customer because they get to maintain what they know.
In a project, is there a choice of database systems? In almost all projects, the choice of the database system is 'almost' automatic.. if you're coding "in the Microsoft stack" you'll go with SQLServer, in the Linux world the default is MySQL, and for corporate in-house project most shops have decided on some default l...
TITLE: In a project, is there a choice of database systems? QUESTION: In almost all projects, the choice of the database system is 'almost' automatic.. if you're coding "in the Microsoft stack" you'll go with SQLServer, in the Linux world the default is MySQL, and for corporate in-house project most shops have decided...
[ "database" ]
6
1
416
8
0
2008-10-05T21:36:58.490000
2008-10-05T21:39:31.637000
172,711
172,758
Calculating time diff across midnight
This is the one thing I could never get to work. My problem is to detect the end of one day and the start of the next and then splitting the diff into each day. Imagine you want to calculate a pay rate but it has to span across midnight. It also applies to calculating time to run on timed system, or time diff it should...
This is obviously a trivial problem in systems where the starting and ending times are data structures that contain both date and time. But there are plenty of systems that don't do this. It's very common for timekeeping systems to have a single record that contains a date, a start time, and an end time. In this case, ...
Calculating time diff across midnight This is the one thing I could never get to work. My problem is to detect the end of one day and the start of the next and then splitting the diff into each day. Imagine you want to calculate a pay rate but it has to span across midnight. It also applies to calculating time to run o...
TITLE: Calculating time diff across midnight QUESTION: This is the one thing I could never get to work. My problem is to detect the end of one day and the start of the next and then splitting the diff into each day. Imagine you want to calculate a pay rate but it has to span across midnight. It also applies to calcula...
[ "algorithm", "time" ]
2
7
6,022
5
0
2008-10-05T21:39:33.803000
2008-10-05T22:17:58.843000
172,735
172,845
Create/Use User-defined functions in System.Data.SQLite?
User-Defined Functions & Collating Sequences Full support for user-defined functions and collating sequences means that in many cases if SQLite doesn't have a feature, you can write it yourself in your favorite.NET language. Writing UDF's and collating sequences has never been easier I spotted this bit on the C# SQLite...
Robert Simpson has a great example of a REGEX function you can use in your sqlite queries: // taken from http://sqlite.phxsoftware.com/forums/p/348/1457.aspx#1457 [SQLiteFunction(Name = "REGEXP", Arguments = 2, FuncType = FunctionType.Scalar)] class MyRegEx: SQLiteFunction { public override object Invoke(object[] args)...
Create/Use User-defined functions in System.Data.SQLite? User-Defined Functions & Collating Sequences Full support for user-defined functions and collating sequences means that in many cases if SQLite doesn't have a feature, you can write it yourself in your favorite.NET language. Writing UDF's and collating sequences ...
TITLE: Create/Use User-defined functions in System.Data.SQLite? QUESTION: User-Defined Functions & Collating Sequences Full support for user-defined functions and collating sequences means that in many cases if SQLite doesn't have a feature, you can write it yourself in your favorite.NET language. Writing UDF's and co...
[ "c#", "sqlite", "system.data.sqlite" ]
51
70
34,027
1
0
2008-10-05T22:00:55.040000
2008-10-05T23:33:44.073000
172,739
172,763
Looking for DES algorithm tutorial
I am studying for cryptography and I somehow stuck on understanding how DES works. Because it is around for a long time there should be nice tutorials like fancy diagrams, videos etc around the net. I searched but with no luck. Has anyone spotted anything "easy-to-digest" for the brain?
Bruce Schneier's Applied Cryptography is probably the funniest analysis you will find of it, but it is certainly not easy.
Looking for DES algorithm tutorial I am studying for cryptography and I somehow stuck on understanding how DES works. Because it is around for a long time there should be nice tutorials like fancy diagrams, videos etc around the net. I searched but with no luck. Has anyone spotted anything "easy-to-digest" for the brai...
TITLE: Looking for DES algorithm tutorial QUESTION: I am studying for cryptography and I somehow stuck on understanding how DES works. Because it is around for a long time there should be nice tutorials like fancy diagrams, videos etc around the net. I searched but with no luck. Has anyone spotted anything "easy-to-di...
[ "algorithm", "cryptography", "des" ]
0
1
2,801
6
0
2008-10-05T22:03:43.473000
2008-10-05T22:21:21.647000
172,745
172,827
Play a single note with DirectMusic
I'm using DirectMusic for MIDI playback in an application I'm developing. Does anyone know if it's possible to use DirectMusic to play individual notes? Currently, I'm converting an in-memory data structure that represents entire 'songs' into a MIDI buffer and playing it back through DirectMusic. I'd like to be able to...
I believe that stuffing your note messages into a DirectMusicBuffer8 and then playing that is indeed the simplest way to do it. I assume you're aware that DirectMusic is deprecated, not recommended for new development etc. etc.
Play a single note with DirectMusic I'm using DirectMusic for MIDI playback in an application I'm developing. Does anyone know if it's possible to use DirectMusic to play individual notes? Currently, I'm converting an in-memory data structure that represents entire 'songs' into a MIDI buffer and playing it back through...
TITLE: Play a single note with DirectMusic QUESTION: I'm using DirectMusic for MIDI playback in an application I'm developing. Does anyone know if it's possible to use DirectMusic to play individual notes? Currently, I'm converting an in-memory data structure that represents entire 'songs' into a MIDI buffer and playi...
[ "midi", "xaudio2", "directmusic" ]
5
1
810
2
0
2008-10-05T22:09:27.660000
2008-10-05T23:20:01.247000
172,748
172,756
How to show fullscreen popup window in javascript?
Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This: window.open(src, 'newWin', 'fullscreen="yes"') apparently only worked for old version of IE.
Use screen.availWidth and screen.availHeight to calculate a suitable size for the height and width parameters in window.open() Although this is likely to be close, it will not be maximised, nor accurate for everyone, especially if all the toolbars are shown.
How to show fullscreen popup window in javascript? Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This: window.open(src, 'newWin', 'fullscreen="yes"') apparently only worked for old version of IE.
TITLE: How to show fullscreen popup window in javascript? QUESTION: Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This: window.open(src, 'newWin', 'fullscreen="yes"') apparently only worked for old version of IE. ANSWER: Use screen.availWidth and ...
[ "javascript", "html", "popup" ]
52
52
94,760
5
0
2008-10-05T22:12:28.777000
2008-10-05T22:17:20.530000
172,751
172,774
XML DOM vs ADO DataSet
I have the option of storing data in memory either as an XML document or multi-table ADO dataset. The web page utilizing this object will be selectively retrieving data items based on keys. Does either of these objects have a clear performance advantage over the other?
A DataSet is already an XML Document, sort of. One of the additional perks you get with the dataset is relationship between tables, so you can actually query the DataSet as an in-memory database. XML is really good, especially in certain situations, but searching lots of data. If it's items based on keys with no relati...
XML DOM vs ADO DataSet I have the option of storing data in memory either as an XML document or multi-table ADO dataset. The web page utilizing this object will be selectively retrieving data items based on keys. Does either of these objects have a clear performance advantage over the other?
TITLE: XML DOM vs ADO DataSet QUESTION: I have the option of storing data in memory either as an XML document or multi-table ADO dataset. The web page utilizing this object will be selectively retrieving data items based on keys. Does either of these objects have a clear performance advantage over the other? ANSWER: ...
[ "asp.net", "xml", "ado.net" ]
0
0
687
3
0
2008-10-05T22:15:03.203000
2008-10-05T22:34:21.773000
172,777
172,792
Combined post-operators?
We're all familiar with the pre- and post-increment operators, e.g. c++; // c = c + 1 ++c; // ditto and the "combined operators" which extend this principle: c += 5; // c = c + 5 s.= ", world"; // s = s. ", world"; e.g. PHP I've often had a need for a 'post-combined operator', which would allow: s =. "Hello "; // s = "...
A basic objection to the example as-given is that it'd create ambiguity: a=-5; //'a = -5' or 'a =- 5'? b=*p; //'b = *p' or 'b =* p'? c=.5; //'c =.5' or 'c =. 5'? Edit: But no, I'm not aware of any languages that use them. Presumably this is because they were omitted from C from whence most other languages derive their ...
Combined post-operators? We're all familiar with the pre- and post-increment operators, e.g. c++; // c = c + 1 ++c; // ditto and the "combined operators" which extend this principle: c += 5; // c = c + 5 s.= ", world"; // s = s. ", world"; e.g. PHP I've often had a need for a 'post-combined operator', which would allow...
TITLE: Combined post-operators? QUESTION: We're all familiar with the pre- and post-increment operators, e.g. c++; // c = c + 1 ++c; // ditto and the "combined operators" which extend this principle: c += 5; // c = c + 5 s.= ", world"; // s = s. ", world"; e.g. PHP I've often had a need for a 'post-combined operator',...
[ "syntax", "language-features", "language-design" ]
1
3
289
3
0
2008-10-05T22:41:47.673000
2008-10-05T22:54:07.820000
172,781
172,789
Subversion large repos import/checkout
My normal work flow to create a new repository with subversion is to create a new repos, do a checkout of the repos root, create my branches tags and trunk folders and place in the trunk my initial files. Then I do a commit of this "initial import", delete the checked out repos from my hard drive and do a checkout of t...
There is - it's called an "in-place import", and it's covered in the Subversion FAQ here: http://subversion.tigris.org/faq.html#in-place-import What you're really doing is creating a new empty project in the repository, checking out the empty project your local folder - which turns your folder into a working copy - and...
Subversion large repos import/checkout My normal work flow to create a new repository with subversion is to create a new repos, do a checkout of the repos root, create my branches tags and trunk folders and place in the trunk my initial files. Then I do a commit of this "initial import", delete the checked out repos fr...
TITLE: Subversion large repos import/checkout QUESTION: My normal work flow to create a new repository with subversion is to create a new repos, do a checkout of the repos root, create my branches tags and trunk folders and place in the trunk my initial files. Then I do a commit of this "initial import", delete the ch...
[ "svn", "repository", "commit", "svn-checkout" ]
7
14
4,742
5
0
2008-10-05T22:43:59.930000
2008-10-05T22:51:30.633000
172,793
172,817
Good dynamic programming language for .net recommendation
Well, after a long time writing.net programs in C# I started to feel angry and frustrated about all that syntactic trash that comes with statically typed languages. Now I want to change to dynamically typed languages, that takes advantage of CLI. So I searched a bit around and I didn't like of what I saw. I first looke...
I'd still use Boo. I'm not sure why you believe Boo has been halted. Development sometimes seems slow, but there are multiple people currently working on bug fixes as demonstrated by this list of recently fixed issues (bugs). For those unfamiliar with Boo, it's very similar to Python, but includes things that Python do...
Good dynamic programming language for .net recommendation Well, after a long time writing.net programs in C# I started to feel angry and frustrated about all that syntactic trash that comes with statically typed languages. Now I want to change to dynamically typed languages, that takes advantage of CLI. So I searched a...
TITLE: Good dynamic programming language for .net recommendation QUESTION: Well, after a long time writing.net programs in C# I started to feel angry and frustrated about all that syntactic trash that comes with statically typed languages. Now I want to change to dynamically typed languages, that takes advantage of CL...
[ "c#", ".net", "ironpython", "boo" ]
9
7
1,366
8
0
2008-10-05T22:54:22.063000
2008-10-05T23:13:30.730000
172,798
173,676
Lisp in the real world
I have experimented with Lisp (actually Scheme) and found it to be a very beautiful language that I am interested in learning more about. However, it appears that Lisp is never used in serious projects, and I haven't seen it listed as a desired skill on any job posting. I am interested in hearing from anyone who has us...
Franz, Inc. provides an inexhaustive list of success stories on their website. However: Please don't assume Lisp is only useful for Animation and Graphics, AI, Bioinformatics, B2B and E-Commerce, Data Mining, EDA/Semiconductor applications, Expert Systems, Finance, Intelligent Agents, Knowledge Management, Mechanical C...
Lisp in the real world I have experimented with Lisp (actually Scheme) and found it to be a very beautiful language that I am interested in learning more about. However, it appears that Lisp is never used in serious projects, and I haven't seen it listed as a desired skill on any job posting. I am interested in hearing...
TITLE: Lisp in the real world QUESTION: I have experimented with Lisp (actually Scheme) and found it to be a very beautiful language that I am interested in learning more about. However, it appears that Lisp is never used in serious projects, and I haven't seen it listed as a desired skill on any job posting. I am int...
[ "clojure", "lisp", "scheme", "common-lisp" ]
148
87
33,807
38
0
2008-10-05T22:56:52.400000
2008-10-06T09:27:30.833000
172,811
172,860
Is there a way I can tell whether an SMTP server is expecting a client to connect using "implicit" SSL versus "explicit" SSL?
SSL can either be "explicit" or "implicit" as explained by this link: http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm System.Net.Mail only support "explicit" SSL, as explained here: http://blogs.msdn.com/webdav_101/archive/2008/06/02/system-net-mail-with-ssl-to-authenticate-against-port-4...
Ordinarily this is governed by convention. SMTP running on port 25 (the normal case) uses explicit SSL. SMTPS running on port 465 uses implicit SSL. Mail submission running on port 587 uses explicit SSL. To tell for sure, telnet to the port, as in "telnet mail.example.com 25". If you see a plain text banner where the s...
Is there a way I can tell whether an SMTP server is expecting a client to connect using "implicit" SSL versus "explicit" SSL? SSL can either be "explicit" or "implicit" as explained by this link: http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm System.Net.Mail only support "explicit" SSL, ...
TITLE: Is there a way I can tell whether an SMTP server is expecting a client to connect using "implicit" SSL versus "explicit" SSL? QUESTION: SSL can either be "explicit" or "implicit" as explained by this link: http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm System.Net.Mail only suppor...
[ ".net", "ssl", "smtp", "system.net" ]
3
10
10,579
1
0
2008-10-05T23:10:26.587000
2008-10-05T23:44:38.763000
172,812
172,816
How can I override a table width property in CSS
I have the following style in an external CSS file called first.css table { width: 100%; } This makes the tables fill their container. If there are only two small columns they appear too far from each other. To force the columns to appear nearer I have added this style table { width: 50%; } to a new file called second....
You can use: table { width: auto; } in second.css, to strictly make "the html behave as if there was never been a width property". But I'm not 100% sure this is exactly what you want - if not, please clarify!
How can I override a table width property in CSS I have the following style in an external CSS file called first.css table { width: 100%; } This makes the tables fill their container. If there are only two small columns they appear too far from each other. To force the columns to appear nearer I have added this style t...
TITLE: How can I override a table width property in CSS QUESTION: I have the following style in an external CSS file called first.css table { width: 100%; } This makes the tables fill their container. If there are only two small columns they appear too far from each other. To force the columns to appear nearer I have ...
[ "css" ]
11
28
21,828
3
0
2008-10-05T23:10:29.813000
2008-10-05T23:12:41.387000
172,814
172,965
.NET Firebug like UI assistance
I am tasked with a project whereby I need to create a scaled down version of a Firebug like UI where the user can load an HTML page, and as they hover the mouse over the elements they'll be highlighted. The app will allow the users to select a table to be screen-scraped....haven't got to that part as yet. Any advice? T...
Well, I haven't used the Firebug UI, but I have done exactly what you describe using the.NET 2.0 WebBrowser control in a WinForms app. Basically I added the WebBrowser and a Timer control to the form then in the timer elapsed event, I query the mouse position using the GetCursorPos native function and use the WebBrowse...
.NET Firebug like UI assistance I am tasked with a project whereby I need to create a scaled down version of a Firebug like UI where the user can load an HTML page, and as they hover the mouse over the elements they'll be highlighted. The app will allow the users to select a table to be screen-scraped....haven't got to...
TITLE: .NET Firebug like UI assistance QUESTION: I am tasked with a project whereby I need to create a scaled down version of a Firebug like UI where the user can load an HTML page, and as they hover the mouse over the elements they'll be highlighted. The app will allow the users to select a table to be screen-scraped...
[ ".net", "firebug" ]
0
3
309
1
0
2008-10-05T23:11:53.477000
2008-10-06T01:22:47.800000
172,831
172,870
How often do you worry about how many if cases will need to be processed?
If you have the following: $var = 3; // we'll say it's set to 3 for this example if ($var == 4) { // do something } else if ($var == 5) { // do something } else if ($var == 2) { // do something } else if ($var == 3) { // do something } else { // do something } If say 80% of the time $var is 3, do you worry about the fa...
Here's how we did it when I used to write software for radar systems. (Speed matters in radar. It's one of the few places where "real time" actually means "real" instead of "fast".) [I'll switch to Python syntax, it's easier for me and I'm sure you can interpret it.] if var <= 3: if var == 2: # do something elif var ==...
How often do you worry about how many if cases will need to be processed? If you have the following: $var = 3; // we'll say it's set to 3 for this example if ($var == 4) { // do something } else if ($var == 5) { // do something } else if ($var == 2) { // do something } else if ($var == 3) { // do something } else { // ...
TITLE: How often do you worry about how many if cases will need to be processed? QUESTION: If you have the following: $var = 3; // we'll say it's set to 3 for this example if ($var == 4) { // do something } else if ($var == 5) { // do something } else if ($var == 2) { // do something } else if ($var == 3) { // do some...
[ "language-agnostic", "optimization", "performance", "if-statement" ]
4
13
526
10
0
2008-10-05T23:22:52.067000
2008-10-05T23:56:13
172,841
190,302
Selection overridden by formatter
I have applied a Formatter to a JFormattedTextField using a FormatterFactory, when a user clicks into the text field I want to select the contents. A focus listener does not work as expected because the formatter gets called, which eventually causes the value to be reset which ultimately de-selects the fields contents....
Quick and dirty workaround is to use EventQueue.invokeLater from your focusListener. EventQueue.invokeLater(new Runnable(){ public void run() { yourTextField.selectAll();} });
Selection overridden by formatter I have applied a Formatter to a JFormattedTextField using a FormatterFactory, when a user clicks into the text field I want to select the contents. A focus listener does not work as expected because the formatter gets called, which eventually causes the value to be reset which ultimate...
TITLE: Selection overridden by formatter QUESTION: I have applied a Formatter to a JFormattedTextField using a FormatterFactory, when a user clicks into the text field I want to select the contents. A focus listener does not work as expected because the formatter gets called, which eventually causes the value to be re...
[ "java", "swing", "caret", "formatter" ]
1
2
139
2
0
2008-10-05T23:28:37.343000
2008-10-10T06:07:31.797000
172,854
172,995
How do you specify that an exception should be expected using Boost.Test?
I have a Boost unit test case which causes the object under test to throw an exception (that's the test, to cause an exception). How do I specify in the test to expect that particular exception. I can specify that the test should have a certain number of failures by using BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES but that...
Doesn't this work? BOOST_CHECK_THROW (expression, an_exception_type); That should cause the test to pass if the expression throws the given exception type or fail otherwise. If you need a different severity than 'CHECK', you could also use BOOST_WARN_THROW() or BOOST_REQUIRE_THROW() instead. See the documentation
How do you specify that an exception should be expected using Boost.Test? I have a Boost unit test case which causes the object under test to throw an exception (that's the test, to cause an exception). How do I specify in the test to expect that particular exception. I can specify that the test should have a certain n...
TITLE: How do you specify that an exception should be expected using Boost.Test? QUESTION: I have a Boost unit test case which causes the object under test to throw an exception (that's the test, to cause an exception). How do I specify in the test to expect that particular exception. I can specify that the test shoul...
[ "c++", "unit-testing", "exception", "boost-test" ]
30
49
13,826
2
0
2008-10-05T23:38:29.057000
2008-10-06T01:41:56.250000
172,863
172,878
What are the greatest benefits of LLVM?
Does anyone have experience with LLVM, llvm-gcc, or Clang? The whole idea behind llvm seems very intriguing to me and I'm interested in seeing how it performs. I just don't want to dump a whole lot of time into trying the tools out if the tools are not ready for production. If you have experience with the tools, what d...
I've had an initial play around with LLVM and working through this tutorial left me very very excited about it's potential; the idea that I can use it to build a JIT into an app with relative ease has me stoked. I haven't gone deep enough to be able to offer any kind of useful opinion on it's limitations, stability, pe...
What are the greatest benefits of LLVM? Does anyone have experience with LLVM, llvm-gcc, or Clang? The whole idea behind llvm seems very intriguing to me and I'm interested in seeing how it performs. I just don't want to dump a whole lot of time into trying the tools out if the tools are not ready for production. If yo...
TITLE: What are the greatest benefits of LLVM? QUESTION: Does anyone have experience with LLVM, llvm-gcc, or Clang? The whole idea behind llvm seems very intriguing to me and I'm interested in seeing how it performs. I just don't want to dump a whole lot of time into trying the tools out if the tools are not ready for...
[ "c++", "c", "llvm", "clang" ]
45
21
10,488
4
0
2008-10-05T23:48:08.350000
2008-10-06T00:03:41.407000
172,867
256,321
Is there an easier way to track scope changes in ExtremePlanner?
I am about to join a new software team midway through a project. They are using ExtremePlanner to track their progress. While they tracking tasks completed, they are not tracking how the estimated size of the project is changing over time. In the short time I have been monitoring the project this estimate has changed f...
If this is an Agile project (e.g., using Scrum, XP, etc.), then presumably you are working in iterations (or sprints). So my question would be - do things change so frequently within a single iteration that you need to measure those? Typically an agile project steers by freezing functionality within a single iteration....
Is there an easier way to track scope changes in ExtremePlanner? I am about to join a new software team midway through a project. They are using ExtremePlanner to track their progress. While they tracking tasks completed, they are not tracking how the estimated size of the project is changing over time. In the short ti...
TITLE: Is there an easier way to track scope changes in ExtremePlanner? QUESTION: I am about to join a new software team midway through a project. They are using ExtremePlanner to track their progress. While they tracking tasks completed, they are not tracking how the estimated size of the project is changing over tim...
[ "project-management", "scheduling" ]
1
2
161
1
0
2008-10-05T23:55:12.907000
2008-11-02T00:36:16.127000
172,869
173,173
How to determine if a JNI (jogl) is available at runtime?
I'm working on a source-code visualization project that uses the Processing core library. The processing library has the option to use the jogl OpenGL library to render graphics which really improves performance. However, the JNI files that jogl uses aren't necessarily available at runtime, depending on who is using th...
Simple just try to load the class with your ClassLoader using loadClass and catch a ClassNotFound exception and UnsatisfiedLinkError to do fallback functionality.
How to determine if a JNI (jogl) is available at runtime? I'm working on a source-code visualization project that uses the Processing core library. The processing library has the option to use the jogl OpenGL library to render graphics which really improves performance. However, the JNI files that jogl uses aren't nece...
TITLE: How to determine if a JNI (jogl) is available at runtime? QUESTION: I'm working on a source-code visualization project that uses the Processing core library. The processing library has the option to use the jogl OpenGL library to render graphics which really improves performance. However, the JNI files that jog...
[ "java", "java-native-interface", "jogl" ]
1
2
419
2
0
2008-10-05T23:56:08.567000
2008-10-06T04:06:18.390000
172,871
173,742
How to manage documents for many tasks/projects
I'm probably asking for the world, but is there any Windows-based software for easily managing lots of tasks/projects and all the associated documents (spreadsheets, Word documents, other files) that can be quickly navigated/searched. I deal with probably 10-20 active projects and tasks, some lasting only a day or so, ...
I've had this same problem. I believe the answer hasn't yet been invented (if I had the time, I'd write it myself and make millions). Essentially we need to steal GMail's idea of 'labels' and use it to completely replace windows explorer for management of digital resources. The idea would be simply that you would 'labe...
How to manage documents for many tasks/projects I'm probably asking for the world, but is there any Windows-based software for easily managing lots of tasks/projects and all the associated documents (spreadsheets, Word documents, other files) that can be quickly navigated/searched. I deal with probably 10-20 active pro...
TITLE: How to manage documents for many tasks/projects QUESTION: I'm probably asking for the world, but is there any Windows-based software for easily managing lots of tasks/projects and all the associated documents (spreadsheets, Word documents, other files) that can be quickly navigated/searched. I deal with probabl...
[ "project-management", "task-tracking" ]
2
2
1,493
8
0
2008-10-05T23:56:28.770000
2008-10-06T09:58:39.397000
172,888
172,896
F# defining/using a type/module in another file in the same project
This will hopefully be an easy one. I have an F# project (latest F# CTP) with two files (Program.fs, Stack.fs). In Stack.fs I have a simple namespace and type definition Stack.fs namespace Col type Stack=... Now I try to include the namespace in Program.fs by declaring open Col This doesn't work and gives me the error...
What order are the files in the.fsproj file? Stack.fs needs to come before Program.fs for Program.fs to be able to 'see' it. See also the start of http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!444.entry and the end of http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!347.entry
F# defining/using a type/module in another file in the same project This will hopefully be an easy one. I have an F# project (latest F# CTP) with two files (Program.fs, Stack.fs). In Stack.fs I have a simple namespace and type definition Stack.fs namespace Col type Stack=... Now I try to include the namespace in Progr...
TITLE: F# defining/using a type/module in another file in the same project QUESTION: This will hopefully be an easy one. I have an F# project (latest F# CTP) with two files (Program.fs, Stack.fs). In Stack.fs I have a simple namespace and type definition Stack.fs namespace Col type Stack=... Now I try to include the ...
[ "f#" ]
86
95
28,760
5
0
2008-10-06T00:12:12.780000
2008-10-06T00:20:10.203000
172,895
173,027
Table Creation DDL from Microsoft Access
Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure? I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tables from the Access definitions.
Thanks for the other suggestions. While I was waiting I wrote some VBA code to do it. It's not perfect, but did the job for me. Option Compare Database Public Function TableCreateDDL(TableDef As TableDef) As String Dim fldDef As Field Dim FieldIndex As Integer Dim fldName As String, fldDataInfo As String Dim DDL As St...
Table Creation DDL from Microsoft Access Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure? I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tables from the Acces...
TITLE: Table Creation DDL from Microsoft Access QUESTION: Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure? I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tab...
[ "sql", "ms-access" ]
20
23
25,594
6
0
2008-10-06T00:19:53.700000
2008-10-06T02:12:00.680000