PostId
int64 4
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 1
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -55
461k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
21.5k
| Title
stringlengths 3
250
| BodyMarkdown
stringlengths 5
30k
⌀ | Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 32
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18,764 | 08/20/2008 20:38:50 | 357 | 08/05/2008 01:29:23 | 725 | 47 | What's the difference between a Table Scan and a Clustered Index Scan? | Since both a Table Scan and a Clustered Index Scan essentially scan all records in the table, why is a Clustered Index Scan supposedly better? | sql | sql-server | indexing | null | null | null | open | What's the difference between a Table Scan and a Clustered Index Scan?
===
Since both a Table Scan and a Clustered Index Scan essentially scan all records in the table, why is a Clustered Index Scan supposedly better? | 0 |
18,765 | 08/20/2008 20:39:36 | 2,191 | 08/20/2008 20:39:36 | 1 | 0 | Importing C++ enumerations into C# | I'm currently working on creating a new C# project that needs to interact with an older C++ application. There is an error enumeration that already exists in the C++ app that I need to use in the C# app.
I don't want to just redeclare the enumeration in C# because that could cause sync issues down the line if the files aren't updated together.
All that being said my question is this:
Is there a way for me to taken an enumeration declared like so:
typedef enum
{
eDEVICEINT_ERR_FATAL = 0x10001
...
} eDeviceIntErrCodes;
and use it in a C# program like so:
eDeviceIntErrCodes.eDEVICEINT_ERR_FATAL
| c# | c++ | null | null | null | null | open | Importing C++ enumerations into C#
===
I'm currently working on creating a new C# project that needs to interact with an older C++ application. There is an error enumeration that already exists in the C++ app that I need to use in the C# app.
I don't want to just redeclare the enumeration in C# because that could cause sync issues down the line if the files aren't updated together.
All that being said my question is this:
Is there a way for me to taken an enumeration declared like so:
typedef enum
{
eDEVICEINT_ERR_FATAL = 0x10001
...
} eDeviceIntErrCodes;
and use it in a C# program like so:
eDeviceIntErrCodes.eDEVICEINT_ERR_FATAL
| 0 |
18,772 | 08/20/2008 20:42:04 | 31,505 | 2008-09-01 | 374 | 14 | How to create a new instance of Sql Server 2005 | I forgot my password for Sql Server 2005. Windows Authentication is not enabled so I cannot login. How can I remove the current instance and create a new db instance? Or is there a better solution exists? | sql2005 | null | null | null | null | null | open | How to create a new instance of Sql Server 2005
===
I forgot my password for Sql Server 2005. Windows Authentication is not enabled so I cannot login. How can I remove the current instance and create a new db instance? Or is there a better solution exists? | 0 |
18,783 | 08/20/2008 20:45:15 | 357 | 08/05/2008 01:29:23 | 725 | 47 | SQL - What are your favorite performance tricks? | When you have a query or stored procedure that needs performance tuning, what are some of the first things you try? | sql | sql-server | performance | null | null | 11/28/2011 01:23:55 | not constructive | SQL - What are your favorite performance tricks?
===
When you have a query or stored procedure that needs performance tuning, what are some of the first things you try? | 4 |
18,787 | 08/20/2008 20:46:23 | 105 | 08/01/2008 23:29:32 | 43 | 4 | Asp.net MVC User Control ViewData | When a controller renders a view based on a model you can get the properties from the ViewData collection using the indexer (ie. ViewData["Property"]). However, I have a shared user control that I tried to call using the following:
return View("Message", new { DisplayMessage = "This is a test" });
and on my Message control I had this:
<%= ViewData["DisplayMessage"] %>
I would think this would render the DisplayMessage correctly, however, null is being returned. After a heavy dose of tinkering around, I finally created a "MessageData" class in order to strongly type my user control:
public class MessageControl : ViewUserControl<MessageData>
and now this call works:
return View("Message", new MessageData() { DisplayMessage = "This is a test" });
and can be displayed like this:
<%= ViewData.Model.DisplayMessage %>
Why wouldn't the DisplayMessage property be added to the ViewData (ie. ViewData["DisplayMessage"]) collection without strong typing the user control? Is this by design? Wouldn't it make sense that ViewData would contain a key for "DisplayMessage"? | asp.net-mvc | viewdata | viewusercontrol | null | null | null | open | Asp.net MVC User Control ViewData
===
When a controller renders a view based on a model you can get the properties from the ViewData collection using the indexer (ie. ViewData["Property"]). However, I have a shared user control that I tried to call using the following:
return View("Message", new { DisplayMessage = "This is a test" });
and on my Message control I had this:
<%= ViewData["DisplayMessage"] %>
I would think this would render the DisplayMessage correctly, however, null is being returned. After a heavy dose of tinkering around, I finally created a "MessageData" class in order to strongly type my user control:
public class MessageControl : ViewUserControl<MessageData>
and now this call works:
return View("Message", new MessageData() { DisplayMessage = "This is a test" });
and can be displayed like this:
<%= ViewData.Model.DisplayMessage %>
Why wouldn't the DisplayMessage property be added to the ViewData (ie. ViewData["DisplayMessage"]) collection without strong typing the user control? Is this by design? Wouldn't it make sense that ViewData would contain a key for "DisplayMessage"? | 0 |
18,803 | 08/20/2008 20:53:05 | 2,134 | 08/20/2008 13:58:24 | 19 | 2 | Is UML practical ? | In college I've had numerous design and UML oriented courses, and I recognize that UML can be used to benefit a software project, especially use-case mapping, but is it really practical? I've done a few co-op work terms, and it appears that UML is not used heavily in the industry (outside of IBM). Is it worth the time during a project to create UML diagrams? Also, I find that class diagrams are generally not useful, because it's just faster to look at the header file for a class. Specifically which diagrams are the most useful? | uml | project-management | diagram | bestpractices | null | 02/27/2012 03:42:11 | not constructive | Is UML practical ?
===
In college I've had numerous design and UML oriented courses, and I recognize that UML can be used to benefit a software project, especially use-case mapping, but is it really practical? I've done a few co-op work terms, and it appears that UML is not used heavily in the industry (outside of IBM). Is it worth the time during a project to create UML diagrams? Also, I find that class diagrams are generally not useful, because it's just faster to look at the header file for a class. Specifically which diagrams are the most useful? | 4 |
18,814 | 08/20/2008 20:56:54 | 2,196 | 08/20/2008 20:54:36 | 1 | 0 | Best UML Application for MAC OSX / Cross Platform | What is the best mac based or even better cross platform UML Application available both costed and opensource / freeware? | mac | uml | cross | platofrm | null | 09/11/2011 17:26:36 | not constructive | Best UML Application for MAC OSX / Cross Platform
===
What is the best mac based or even better cross platform UML Application available both costed and opensource / freeware? | 4 |
18,836 | 08/20/2008 21:03:54 | 1,438 | 08/15/2008 15:44:20 | 106 | 13 | Why doesn't **find** find anything? | I'm looking for shell scripts files installed on my system, but **find** doesn't work:
$ find /usr -name *.sh
But I know there are a ton of scripts out there. For instance:
$ ls /usr/local/lib/*.sh
/usr/local/lib/tclConfig.sh
/usr/local/lib/tkConfig.sh
Why doesn't **find** work?
| unix | bash | shell | ksh | strawman | null | open | Why doesn't **find** find anything?
===
I'm looking for shell scripts files installed on my system, but **find** doesn't work:
$ find /usr -name *.sh
But I know there are a ton of scripts out there. For instance:
$ ls /usr/local/lib/*.sh
/usr/local/lib/tclConfig.sh
/usr/local/lib/tkConfig.sh
Why doesn't **find** work?
| 0 |
18,847 | 08/20/2008 21:06:13 | 1,130,097 | 08/16/2008 14:58:30 | 90 | 16 | Which are your productivity tools? | What tools do you use to boost up your application development? | productivity | software-tools | null | null | null | null | open | Which are your productivity tools?
===
What tools do you use to boost up your application development? | 0 |
18,858 | 08/20/2008 21:10:20 | 2,118 | 08/20/2008 12:54:09 | 1 | 0 | Batch code indenters and beautifiers | Does anyone here know of good batch file code indenters or beautifiers?
Specifically for PHP, JS and SGML-languages.
Preferably with options as to style. | codingstyle | null | null | null | null | null | open | Batch code indenters and beautifiers
===
Does anyone here know of good batch file code indenters or beautifiers?
Specifically for PHP, JS and SGML-languages.
Preferably with options as to style. | 0 |
18,861 | 08/20/2008 21:11:34 | 428,190 | 08/09/2008 23:23:13 | 175 | 31 | What did I do wrong here? [Javascript Regex] | So I am writing a registration form and I need the display name to be only numbers, letters and underscores. Have a look at my code and tell me what I'm doing wrong.
<form method="post" action="/" onsubmit="return check_form()">
<input type="text" id="display-name" name="display-name" maxlength="255" />
<input type="submit" />
</form>
<script type="text/javascript">
<!--
var name_regex = /^([a-zA-Z0-9_])+/
function check_form()
{
if (!name_regex.test(document.forms[0].elements[0].value))
{
document.forms[0].elements[0].focus()
alert("Your display name may only contain letters, numbers and underscores")
return false
}
}
-->
</script>
It's obviously been trimmed down to not include anything not related to the problem but even this snippet doesn't work. | javascript | regex | null | null | null | null | open | What did I do wrong here? [Javascript Regex]
===
So I am writing a registration form and I need the display name to be only numbers, letters and underscores. Have a look at my code and tell me what I'm doing wrong.
<form method="post" action="/" onsubmit="return check_form()">
<input type="text" id="display-name" name="display-name" maxlength="255" />
<input type="submit" />
</form>
<script type="text/javascript">
<!--
var name_regex = /^([a-zA-Z0-9_])+/
function check_form()
{
if (!name_regex.test(document.forms[0].elements[0].value))
{
document.forms[0].elements[0].focus()
alert("Your display name may only contain letters, numbers and underscores")
return false
}
}
-->
</script>
It's obviously been trimmed down to not include anything not related to the problem but even this snippet doesn't work. | 0 |
18,869 | 08/20/2008 21:16:24 | 1,449 | 08/15/2008 16:25:48 | 29 | 3 | How to install a plugin for QtWebKit | I am running a Qt 4.5 commercial snapshot and want to use a plugin that i downloaded (it's a .so file) in my QWebView. Is there a specific location where I need to place this file? Can I grab it using the QWebPluginFactory? | qt | c++ | null | null | null | null | open | How to install a plugin for QtWebKit
===
I am running a Qt 4.5 commercial snapshot and want to use a plugin that i downloaded (it's a .so file) in my QWebView. Is there a specific location where I need to place this file? Can I grab it using the QWebPluginFactory? | 0 |
18,889 | 08/20/2008 21:25:07 | 1,975 | 08/19/2008 16:30:04 | 21 | 8 | SQL 2008 Dialect Support for NHibernate | Is anyone working on or know if there exists a SQL 2k8 Dialect for NHibernate? | nhibernate | sql2008 | null | null | null | null | open | SQL 2008 Dialect Support for NHibernate
===
Is anyone working on or know if there exists a SQL 2k8 Dialect for NHibernate? | 0 |
18,912 | 08/20/2008 21:35:59 | 238 | 08/03/2008 21:42:37 | 674 | 37 | How to find keys of a hash? | I know in javascript Objects double as hashes but i have been unable to find a built in function to get the keys
var h = {a:'b',c:'d'};
I want something like
var k = h.keys() ; // k = ['a','c'];
It is simple to write a function myself to iterate over the items and add the keys to an array that I return, but is there a standard cleaner way to do that ?
I keep feeling it must be a simple built in function that I missed but I can't find it! | javascript | hash | object | keys | null | null | open | How to find keys of a hash?
===
I know in javascript Objects double as hashes but i have been unable to find a built in function to get the keys
var h = {a:'b',c:'d'};
I want something like
var k = h.keys() ; // k = ['a','c'];
It is simple to write a function myself to iterate over the items and add the keys to an array that I return, but is there a standard cleaner way to do that ?
I keep feeling it must be a simple built in function that I missed but I can't find it! | 0 |
18,918 | 08/20/2008 21:41:09 | 1,013 | 08/11/2008 13:24:18 | 123 | 13 | Can I access ASP.NET Development server in an intranet? | Im testing an ASP.NEt site. When I execute it, it starts the ASP.NET Development Server and opens up a page.
Now I want to test it in the intranet I have.
1. Can I use this server or I need to configure IIS in this machine?
2. Do I need to configure something for it to work?
I've changed the localhost to the correct IP and I opened up the firewall.
Thanks
| asp.net | null | null | null | null | null | open | Can I access ASP.NET Development server in an intranet?
===
Im testing an ASP.NEt site. When I execute it, it starts the ASP.NET Development Server and opens up a page.
Now I want to test it in the intranet I have.
1. Can I use this server or I need to configure IIS in this machine?
2. Do I need to configure something for it to work?
I've changed the localhost to the correct IP and I opened up the firewall.
Thanks
| 0 |
18,920 | 08/20/2008 21:43:23 | 1,858 | 08/18/2008 22:50:18 | 8 | 0 | Can you set, or where is, the local document root? | When opening a file from your hard drive into your browser, where is the document root? To illustrate, given the following HTML code, if the page is opened from the local machine(file:///) then where should the css file be for the browser to find it?
<link href="/temp/test.css" rel="stylesheet" type="text/css" />
| html | css | directory | null | null | null | open | Can you set, or where is, the local document root?
===
When opening a file from your hard drive into your browser, where is the document root? To illustrate, given the following HTML code, if the page is opened from the local machine(file:///) then where should the css file be for the browser to find it?
<link href="/temp/test.css" rel="stylesheet" type="text/css" />
| 0 |
18,932 | 08/20/2008 21:51:29 | 357 | 08/05/2008 01:29:23 | 760 | 53 | SQL - How can I remove duplicate rows? | What is the best way to remove duplicate rows from a fairly large table?
The rows of course will not be perfect duplicates because of the existence of the RowID identity field.
MyTable
-----------
RowID int not null identity(1,1) primary key,
Col1 varchar(20) not null,
Col2 varchar(2048) not null,
Col3 tinyint not null
| sql | sql-server | null | null | null | null | open | SQL - How can I remove duplicate rows?
===
What is the best way to remove duplicate rows from a fairly large table?
The rows of course will not be perfect duplicates because of the existence of the RowID identity field.
MyTable
-----------
RowID int not null identity(1,1) primary key,
Col1 varchar(20) not null,
Col2 varchar(2048) not null,
Col3 tinyint not null
| 0 |
18,936 | 08/20/2008 21:53:28 | 1,061 | 08/12/2008 01:10:24 | 46 | 13 | Good Cheat Sheets? | I currently have a really good MySQL cheat sheet which comes in handy for all the extra details i don't deal with on a daily basis.
I was wondering what cheat sheets other people are using?
I'm interested in vi/vim, regex, linux, python etc. as that's where i tend to have the basic day-to-day knowledge but then keep forgetting more complicated commands or options which i don't use often. However, please feel free to post links to any good cheat sheets you may use as i'm sure others will find them useful. | cheatsheet | null | null | null | null | null | open | Good Cheat Sheets?
===
I currently have a really good MySQL cheat sheet which comes in handy for all the extra details i don't deal with on a daily basis.
I was wondering what cheat sheets other people are using?
I'm interested in vi/vim, regex, linux, python etc. as that's where i tend to have the basic day-to-day knowledge but then keep forgetting more complicated commands or options which i don't use often. However, please feel free to post links to any good cheat sheets you may use as i'm sure others will find them useful. | 0 |
18,943 | 08/20/2008 21:56:21 | 199 | 08/03/2008 12:26:21 | 542 | 24 | Obscuring network proxy password in plain text files on Linux/UNIX-likes | Typically in a large network a computer needs to operate behind an authenticated proxy - any connections to the outside world require a username/password which is often the password a user uses to log into email, workstation etc.
This means having to put the network password in the <code>apt.conf</code> file as well as typically the <code>http\_proxy, ftp\_proxy</code> and <code>https\_proxy</code> environment variables.
I realise that with <code>apt.conf</code> that you could set <code>chmod 600</code> (which it isn't by default on Ubuntu/Debian!) but on our system there are people who need root priveleges .I also realise that technically you cannot protect your password 100% against someone with root access but is there a way where you can at least not have it in plain text? Protecting passwords in <code>~/profile</code> is just as problematic.
I only ask since the other day, I entirely by accident discovered somebody elses password in this way when comparing configuration files across systems.
| security | linux | unix | apt | null | null | open | Obscuring network proxy password in plain text files on Linux/UNIX-likes
===
Typically in a large network a computer needs to operate behind an authenticated proxy - any connections to the outside world require a username/password which is often the password a user uses to log into email, workstation etc.
This means having to put the network password in the <code>apt.conf</code> file as well as typically the <code>http\_proxy, ftp\_proxy</code> and <code>https\_proxy</code> environment variables.
I realise that with <code>apt.conf</code> that you could set <code>chmod 600</code> (which it isn't by default on Ubuntu/Debian!) but on our system there are people who need root priveleges .I also realise that technically you cannot protect your password 100% against someone with root access but is there a way where you can at least not have it in plain text? Protecting passwords in <code>~/profile</code> is just as problematic.
I only ask since the other day, I entirely by accident discovered somebody elses password in this way when comparing configuration files across systems.
| 0 |
18,952 | 08/20/2008 22:01:16 | 1,293 | 08/14/2008 12:38:08 | 86 | 13 | What is your reporting tool of choice? | Every project invariably needs some type of reporting functionality. From a foreach loop in your language of choice to a full blow BI platform.
> To get the job done what tools, widgets, platforms has the group used with success, frustration and failure? | sql | reporting | bi | business-intelligence | null | 10/05/2011 05:18:37 | not constructive | What is your reporting tool of choice?
===
Every project invariably needs some type of reporting functionality. From a foreach loop in your language of choice to a full blow BI platform.
> To get the job done what tools, widgets, platforms has the group used with success, frustration and failure? | 4 |
18,955 | 08/20/2008 22:02:38 | 685 | 08/07/2008 19:18:05 | 38 | 7 | Disabling multi-line fields in MS Access | Is there a way to disable entering multi-line entries in a Text Box (i.e., I'd like to stop my users from doing ctrl-enter to get a newline)? | ms-access | null | null | null | null | null | open | Disabling multi-line fields in MS Access
===
Is there a way to disable entering multi-line entries in a Text Box (i.e., I'd like to stop my users from doing ctrl-enter to get a newline)? | 0 |
18,959 | 08/20/2008 22:06:11 | 2,206 | 08/20/2008 22:06:11 | 1 | 0 | How to match linux device path to windows drive name? | I'm writing an application that on some stage performs low-level disk operations in Linux environment. The app actually consists of 2 parts, one runs on Windows and interacts with a user and another is a linux part that runs from a LiveCD. User makes a choice of Windows drive letters and then a linux part performs actions with corresponding partitions. The problem is finding a match between a Windows drive letter (like C:) and a linux device name (like /dev/sda1). This is my current solution that I rate as ugly:
- store partitions information (i.e. drive letter, number of blocks, drive serial number etc.) in Windows in some pre-defined place (i.e. the root of the system partition).
- read a list of partitions from /proc/partitions. Get only those partitions that has major number for SCSI or IDE hard drives and minor number that identifies them as real partitions and not the whole disks.
- Try to mount each of them with either ntfs or vfat file systems. Check whether the mounted partition contains the information stored by Windows app.
- Upon finding the required information written by the Windows app make the actual match. For each partition found in /proc/partitions acquire drive serial number (via HDIO_GET_IDENTITY syscall), number of blocks (from /proc/partitions) and drive offset (/sys/blocks/drive_path/partition_name/start), compare this to the Windows information and if this matches - store a Windows drive letter along with a linux device name.
There are a couple of problems in this scheme:
- This is ugly. Writing data in Windows and then reading it in Linux makes testing a nightmare.
- linux device major number is compared only with IDE or SCSI devices. This would probably fail, i.e. on USB or FireWire disks. It's possible to add these types of disks, but limiting the app to only known subset of possible devices seems to be rather bad idea.
- looks like HDIO_GET_IDENTITY works only on IDE and SATA drives.
- /sys/block hack may not work on other than IDE or SATA drives.
Any ideas on how to improve this schema? Perhaps there is another way to determine windows names without writing all the data in windows app?
P.S. The language of the app is C++. I can't change this. | c++ | linux | name | drive | null | null | open | How to match linux device path to windows drive name?
===
I'm writing an application that on some stage performs low-level disk operations in Linux environment. The app actually consists of 2 parts, one runs on Windows and interacts with a user and another is a linux part that runs from a LiveCD. User makes a choice of Windows drive letters and then a linux part performs actions with corresponding partitions. The problem is finding a match between a Windows drive letter (like C:) and a linux device name (like /dev/sda1). This is my current solution that I rate as ugly:
- store partitions information (i.e. drive letter, number of blocks, drive serial number etc.) in Windows in some pre-defined place (i.e. the root of the system partition).
- read a list of partitions from /proc/partitions. Get only those partitions that has major number for SCSI or IDE hard drives and minor number that identifies them as real partitions and not the whole disks.
- Try to mount each of them with either ntfs or vfat file systems. Check whether the mounted partition contains the information stored by Windows app.
- Upon finding the required information written by the Windows app make the actual match. For each partition found in /proc/partitions acquire drive serial number (via HDIO_GET_IDENTITY syscall), number of blocks (from /proc/partitions) and drive offset (/sys/blocks/drive_path/partition_name/start), compare this to the Windows information and if this matches - store a Windows drive letter along with a linux device name.
There are a couple of problems in this scheme:
- This is ugly. Writing data in Windows and then reading it in Linux makes testing a nightmare.
- linux device major number is compared only with IDE or SCSI devices. This would probably fail, i.e. on USB or FireWire disks. It's possible to add these types of disks, but limiting the app to only known subset of possible devices seems to be rather bad idea.
- looks like HDIO_GET_IDENTITY works only on IDE and SATA drives.
- /sys/block hack may not work on other than IDE or SATA drives.
Any ideas on how to improve this schema? Perhaps there is another way to determine windows names without writing all the data in windows app?
P.S. The language of the app is C++. I can't change this. | 0 |
18,984 | 08/20/2008 22:27:56 | 1,588 | 08/17/2008 01:05:22 | 29 | 2 | What do you think of developing for the command line first? | What are your opinions on developing for the command line first, then adding a GUI on after the fact by simply calling the command line methods?
eg.
W:\ todo AddTask "meeting with John, re: login peer review" "John's office" "2008-08-22" "14:00"
loads todo.exe and calls a function called AddTask that does some validation and throws the meeting in a database.
Eventually you add in a screen for this:
============================================================
Event: [meeting with John, re: login peer review]
Location: [John's office]
Date: [Fri. Aug. 22, 2008]
Time: [ 2:00 PM]
[Clear] [Submit]
============================================================
When you click submit, it calls the same AddTask function.
Is this considered:
* a good way to code
* just for the newbies
* horrendous!. | technique | language-agnostic | null | null | null | null | open | What do you think of developing for the command line first?
===
What are your opinions on developing for the command line first, then adding a GUI on after the fact by simply calling the command line methods?
eg.
W:\ todo AddTask "meeting with John, re: login peer review" "John's office" "2008-08-22" "14:00"
loads todo.exe and calls a function called AddTask that does some validation and throws the meeting in a database.
Eventually you add in a screen for this:
============================================================
Event: [meeting with John, re: login peer review]
Location: [John's office]
Date: [Fri. Aug. 22, 2008]
Time: [ 2:00 PM]
[Clear] [Submit]
============================================================
When you click submit, it calls the same AddTask function.
Is this considered:
* a good way to code
* just for the newbies
* horrendous!. | 0 |
18,985 | 08/20/2008 22:29:22 | 486 | 08/06/2008 09:19:11 | 355 | 37 | Javascript Beautifier | I am looking for a code beautifier that supports javascript and works on both windows and linux and can be used in batch scripts. Any recommendations? | javascript | formatting | null | null | null | null | open | Javascript Beautifier
===
I am looking for a code beautifier that supports javascript and works on both windows and linux and can be used in batch scripts. Any recommendations? | 0 |
19,003 | 08/20/2008 22:38:32 | 1,992 | 08/19/2008 18:04:16 | 71 | 8 | Should my website abandon username/password authentication in favor of OpenID? | Question in title. | website | openid | null | null | null | 07/10/2011 20:40:07 | not constructive | Should my website abandon username/password authentication in favor of OpenID?
===
Question in title. | 4 |
19,011 | 08/20/2008 22:42:04 | 270 | 08/04/2008 10:21:45 | 11 | 2 | Best practice for storing large amounts of data with J2ME | I am developing a J2ME application that has a large amount of data to store on the device (in the region of 1MB but variable). I can't rely on the file system so I'm stuck the Record Management System (RMS), which allows multiple record stores but each have a limited size. My initial target platform, Blackberry, limits each to 64KB.
I'm wondering if anyone else has had to tackle the problem of storing a large amount of data in the RMS and how they managed it? I'm thinking of having to calculate record sizes and split one data set accross multiple stores if its too large, but that adds a lot of complexity to keep it intact.
There is lots of different types of data being stored but only one set in particular will exceed the 64KB limit. | java | java-me | rms | null | null | null | open | Best practice for storing large amounts of data with J2ME
===
I am developing a J2ME application that has a large amount of data to store on the device (in the region of 1MB but variable). I can't rely on the file system so I'm stuck the Record Management System (RMS), which allows multiple record stores but each have a limited size. My initial target platform, Blackberry, limits each to 64KB.
I'm wondering if anyone else has had to tackle the problem of storing a large amount of data in the RMS and how they managed it? I'm thinking of having to calculate record sizes and split one data set accross multiple stores if its too large, but that adds a lot of complexity to keep it intact.
There is lots of different types of data being stored but only one set in particular will exceed the 64KB limit. | 0 |
19,014 | 08/20/2008 22:44:17 | 536 | 08/06/2008 15:30:22 | 335 | 12 | Using Lucene to search for email addresses | I want to use Lucene (in particular, Lucene.NET) to search for email address domains.
E.g. I want to search for "@gmail.com" to find all emails sent to a gmail address.
Running a Lucene query for "*@gmail.com" results in an error, asterisks cannot be at the start of queries. Running a query for "@gmail.com" doesn't return any matches.
How can I do this? | lucene | lucene.net | .net | search | null | null | open | Using Lucene to search for email addresses
===
I want to use Lucene (in particular, Lucene.NET) to search for email address domains.
E.g. I want to search for "@gmail.com" to find all emails sent to a gmail address.
Running a Lucene query for "*@gmail.com" results in an error, asterisks cannot be at the start of queries. Running a query for "@gmail.com" doesn't return any matches.
How can I do this? | 0 |
19,019 | 08/20/2008 22:45:54 | 1,185 | 08/13/2008 12:02:03 | 503 | 55 | Ideal Computer for Software Development | What would you consider the ideal computer configuration for software development? Also, what upgrades would you look at for a development computer? | productivity | hardware | null | null | null | null | open | Ideal Computer for Software Development
===
What would you consider the ideal computer configuration for software development? Also, what upgrades would you look at for a development computer? | 0 |
19,030 | 08/20/2008 22:50:55 | 745 | 08/08/2008 13:47:26 | 219 | 15 | How to check set of files conform to a naming scheme | I have a bunch of files (TV episodes, although that is fairly arbitrary) that I want to check match a specific naming/organisation scheme..
Currently: I have three arrays of regex, one for valid filenames, one for files missing an episode name, and one for valid paths.
Then, I loop though each valid-filename regex, if it matches, append it to a "valid" dict, if not, do the same with the missing-ep-name regexs, if it matches this I append it to an "invalid" dict with an error code (2:'missing epsiode name'), if it matches neither, it gets added to invalid with the 'malformed name' error code.
The current code can be found [here](http://github.com/dbr/checktveps/tree/8a6dc68ad61e684c8d8f0ca1dc37a22d1c51aa82/2checkTvEps.py)
I want to add a rule that checks for the presence of a folder.jpg file in each directory, but to add this would make the code substantially more messy in it's current state..
How could I write this system in a more expandable way?
The rules it needs to check would be..
- File is in the format `Show Name - [01x23] - Episode Name.avi` or `Show Name - [01xSpecial02] - Special Name.avi` or `Show Name - [01xExtra01] - Extra Name.avi`
- If filename is in the format `Show Name - [01x23].avi` display it a 'missing episode name' section of the output
- The path should be in the format `Show Name/season 2/the_file.avi` (where season 2 should be the correct season number in the filename)
- each `Show Name/season 1/` folder should contain "folder.jpg"
.any ideas? While I'm trying to check TV episodes, this concept/code should be able to apply to many things..
The only thought I had was a list of dicts in the format:
checker = [
{
'name':'valid files',
'type':'file',
'function':check_valid(), # runs check_valid() on all files
'status':0 # if it returns True, this is the status the file gets
} | python | validation | naming | null | null | null | open | How to check set of files conform to a naming scheme
===
I have a bunch of files (TV episodes, although that is fairly arbitrary) that I want to check match a specific naming/organisation scheme..
Currently: I have three arrays of regex, one for valid filenames, one for files missing an episode name, and one for valid paths.
Then, I loop though each valid-filename regex, if it matches, append it to a "valid" dict, if not, do the same with the missing-ep-name regexs, if it matches this I append it to an "invalid" dict with an error code (2:'missing epsiode name'), if it matches neither, it gets added to invalid with the 'malformed name' error code.
The current code can be found [here](http://github.com/dbr/checktveps/tree/8a6dc68ad61e684c8d8f0ca1dc37a22d1c51aa82/2checkTvEps.py)
I want to add a rule that checks for the presence of a folder.jpg file in each directory, but to add this would make the code substantially more messy in it's current state..
How could I write this system in a more expandable way?
The rules it needs to check would be..
- File is in the format `Show Name - [01x23] - Episode Name.avi` or `Show Name - [01xSpecial02] - Special Name.avi` or `Show Name - [01xExtra01] - Extra Name.avi`
- If filename is in the format `Show Name - [01x23].avi` display it a 'missing episode name' section of the output
- The path should be in the format `Show Name/season 2/the_file.avi` (where season 2 should be the correct season number in the filename)
- each `Show Name/season 1/` folder should contain "folder.jpg"
.any ideas? While I'm trying to check TV episodes, this concept/code should be able to apply to many things..
The only thought I had was a list of dicts in the format:
checker = [
{
'name':'valid files',
'type':'file',
'function':check_valid(), # runs check_valid() on all files
'status':0 # if it returns True, this is the status the file gets
} | 0 |
19,035 | 08/20/2008 22:53:25 | 1,992 | 08/19/2008 18:04:16 | 88 | 8 | Javascript Load Order | Hey I am working with both [amq.js][1] (ActiveMQ) and [Google Maps][2]. I load my scripts in this order
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>AMQ & Maps Demo</title>
<!-- Stylesheet -->
<link rel="stylesheet" type="text/css" href="style.css"></link>
<!-- Google APIs -->
<script type="text/javascript" src="http://www.google.com/jsapi?key=abcdefg"></script>
<!-- Active MQ -->
<script type="text/javascript" src="amq/amq.js"></script>
<script type="text/javascript">amq.uri='amq';</script>
<!-- Application -->
<script type="text/javascript" src="application.js"></script>
</head>
However in my application.js it loads Maps fine but I get an error when trying to subscribe to a Topic with AMQ. AMQ depends on prototype which the error console in FireFox says object is not defined. I think I have a problem with using the amq object before the script is finished loading. **Is there a way to make sure both scripts load before I use them in my application.js?**
Google has this nice function call google.setOnLoadCallback(initialize); which works great. I'm not sure amq.js has something like this.
[1]: http://activemq.apache.org/ajax.html
[2]: http://code.google.com/apis/maps/documentation/reference.html | javascript | api | google-maps | activemq | null | null | open | Javascript Load Order
===
Hey I am working with both [amq.js][1] (ActiveMQ) and [Google Maps][2]. I load my scripts in this order
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>AMQ & Maps Demo</title>
<!-- Stylesheet -->
<link rel="stylesheet" type="text/css" href="style.css"></link>
<!-- Google APIs -->
<script type="text/javascript" src="http://www.google.com/jsapi?key=abcdefg"></script>
<!-- Active MQ -->
<script type="text/javascript" src="amq/amq.js"></script>
<script type="text/javascript">amq.uri='amq';</script>
<!-- Application -->
<script type="text/javascript" src="application.js"></script>
</head>
However in my application.js it loads Maps fine but I get an error when trying to subscribe to a Topic with AMQ. AMQ depends on prototype which the error console in FireFox says object is not defined. I think I have a problem with using the amq object before the script is finished loading. **Is there a way to make sure both scripts load before I use them in my application.js?**
Google has this nice function call google.setOnLoadCallback(initialize); which works great. I'm not sure amq.js has something like this.
[1]: http://activemq.apache.org/ajax.html
[2]: http://code.google.com/apis/maps/documentation/reference.html | 0 |
19,047 | 08/20/2008 23:02:18 | 234 | 08/03/2008 20:25:38 | 1,756 | 131 | TortoiseSVN side-by-side configuration is incorrect | After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no longer available.
When attempting to run it manually, I get this error:
The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log for more detail
The application log shows this
Activation context generation failed for "C:\Program Files\TortoiseSVN\bin\TortoiseSVN.dll".
Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30411.0" could not be found.
Please use sxstrace.exe for detailed diagnosis. | tortoisesvn | winsxs | null | null | null | null | open | TortoiseSVN side-by-side configuration is incorrect
===
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no longer available.
When attempting to run it manually, I get this error:
The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log for more detail
The application log shows this
Activation context generation failed for "C:\Program Files\TortoiseSVN\bin\TortoiseSVN.dll".
Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30411.0" could not be found.
Please use sxstrace.exe for detailed diagnosis. | 0 |
19,084 | 08/20/2008 23:38:25 | 159 | 08/02/2008 18:20:52 | 228 | 9 | A good p2p file transfer program for LANs | I'm looking for a good p2p program for transferring files over a LAN preferably one that works over multiple operating systems. Any suggestions? | p2p | lan | null | null | null | null | open | A good p2p file transfer program for LANs
===
I'm looking for a good p2p program for transferring files over a LAN preferably one that works over multiple operating systems. Any suggestions? | 0 |
19,089 | 08/20/2008 23:46:13 | 233 | 08/03/2008 20:19:32 | 305 | 21 | How do I do an Upsert Into Table? | I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage.
So far I have this (simplified):
DECLARE @ResultTable table
(
StaffName nvarchar(100),
Stage1Count int,
Stage2Count int
)
INSERT INTO @ResultTable (StaffName, Stage1Count)
SELECT StaffName, COUNT(*) FROM ViewJob
WHERE InStage1 = 1
GROUP BY StaffName
INSERT INTO @ResultTable (StaffName, Stage2Count)
SELECT StaffName, COUNT(*) FROM ViewJob
WHERE InStage2 = 1
GROUP BY StaffName
The problem with that is that the rows don't combine. So if a staff member has jobs in stage1 and stage2 there's two rows in @ResultTable. What I would really like to do is to update the row if one exists for the staff member and insert a new row if one doesn't exist.
Does anyone know how to do this, or can suggest a different approach?
I would really like to avoid using cursors to iterate on the list of users (but that's my fall back option).
I'm using SQL Server 2005. | sql | sql-server | t-sql | null | null | null | open | How do I do an Upsert Into Table?
===
I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage.
So far I have this (simplified):
DECLARE @ResultTable table
(
StaffName nvarchar(100),
Stage1Count int,
Stage2Count int
)
INSERT INTO @ResultTable (StaffName, Stage1Count)
SELECT StaffName, COUNT(*) FROM ViewJob
WHERE InStage1 = 1
GROUP BY StaffName
INSERT INTO @ResultTable (StaffName, Stage2Count)
SELECT StaffName, COUNT(*) FROM ViewJob
WHERE InStage2 = 1
GROUP BY StaffName
The problem with that is that the rows don't combine. So if a staff member has jobs in stage1 and stage2 there's two rows in @ResultTable. What I would really like to do is to update the row if one exists for the staff member and insert a new row if one doesn't exist.
Does anyone know how to do this, or can suggest a different approach?
I would really like to avoid using cursors to iterate on the list of users (but that's my fall back option).
I'm using SQL Server 2005. | 0 |
19,113 | 08/21/2008 00:14:56 | 1,043 | 08/11/2008 18:08:32 | 691 | 45 | Should menu items always be enabled? And how do you tell the user? | So one of the things that has been talked about a few times on the podcast is whether menu items should always be enabled to prevent "WHY ISN'T THIS AVAILABLE!" frustration for the end user.
This strikes me as a good idea, but then there's the issue of communicating the lack of availability (and the reason why) to the user. Is there anything better than just popping up a message box with a blurb of text?
As I'm about to start on a fairly sizeable cross-platform Windows / Mac app I thought I'd throw this out to hear the wisdom of the SO crowd.
Thanks,
A. | user-interface | null | null | null | null | null | open | Should menu items always be enabled? And how do you tell the user?
===
So one of the things that has been talked about a few times on the podcast is whether menu items should always be enabled to prevent "WHY ISN'T THIS AVAILABLE!" frustration for the end user.
This strikes me as a good idea, but then there's the issue of communicating the lack of availability (and the reason why) to the user. Is there anything better than just popping up a message box with a blurb of text?
As I'm about to start on a fairly sizeable cross-platform Windows / Mac app I thought I'd throw this out to hear the wisdom of the SO crowd.
Thanks,
A. | 0 |
19,122 | 08/21/2008 00:20:34 | 306 | 08/04/2008 14:09:03 | 186 | 15 | Bash Pipe Handling | Does anyone know how bash handles sending data through pipes?
cat file.txt | tail -20
Does this command print all the contents of file.txt into a buffer, which is then read by tail? Or does this command, say, print the contents of file.txt line by line, and then pause at each line for tail to process, and then ask for more data?
The reason I ask is that I'm writing a program on an embedded device that basically performs a sequence of operations on some chunk of data, where the output of one operation is send off as the input of the next operation. I would like to know how linux (bash) handles this so please give me a general answer, not specifically what happens when I run "cat file.txt | tail -20".
Thank you in advance for your responses! | linux | bash | embedded | devices | pipes | null | open | Bash Pipe Handling
===
Does anyone know how bash handles sending data through pipes?
cat file.txt | tail -20
Does this command print all the contents of file.txt into a buffer, which is then read by tail? Or does this command, say, print the contents of file.txt line by line, and then pause at each line for tail to process, and then ask for more data?
The reason I ask is that I'm writing a program on an embedded device that basically performs a sequence of operations on some chunk of data, where the output of one operation is send off as the input of the next operation. I would like to know how linux (bash) handles this so please give me a general answer, not specifically what happens when I run "cat file.txt | tail -20".
Thank you in advance for your responses! | 0 |
19,127 | 08/21/2008 00:24:15 | 364 | 08/05/2008 05:33:41 | 280 | 17 | Best way to fix CSS/JS drop-down problem in IE7 when page includes Google Map | I have a page using < ul > lists for navigation (Javascript changes the styling to display or not on mouseover).
This is working fine for me _except_ in IE6 and IE7 when I have a Google Map on the page.
In this case the drop-down simply does not work. However, the page continues to work in FireFox 2.
I have done a little bit of research and discovered that this may be an example of the IE Select Box Bug, but I am not sure as the Google Map appears to be using a < div >, not an < iframe >.
Has anyone else encountered a problem similar to this, and if so do they have any recommendations on the best way to overcome this problem? | css | ie6 | ie | ie7 | js | null | open | Best way to fix CSS/JS drop-down problem in IE7 when page includes Google Map
===
I have a page using < ul > lists for navigation (Javascript changes the styling to display or not on mouseover).
This is working fine for me _except_ in IE6 and IE7 when I have a Google Map on the page.
In this case the drop-down simply does not work. However, the page continues to work in FireFox 2.
I have done a little bit of research and discovered that this may be an example of the IE Select Box Bug, but I am not sure as the Google Map appears to be using a < div >, not an < iframe >.
Has anyone else encountered a problem similar to this, and if so do they have any recommendations on the best way to overcome this problem? | 0 |
19,132 | 08/21/2008 00:28:00 | 1,684 | 08/18/2008 00:31:07 | 1 | 0 | Expression Versus Statement | I'm asking with regards to c#, but I assume its the same in most other languages.
Does anyone have a good definition of both and what the differences are.
Thanks in advance. | c# | statement | expression | null | null | null | open | Expression Versus Statement
===
I'm asking with regards to c#, but I assume its the same in most other languages.
Does anyone have a good definition of both and what the differences are.
Thanks in advance. | 0 |
19,147 | 08/21/2008 00:33:59 | 483 | 08/06/2008 08:54:52 | 176 | 18 | What is the correct way to create a single instance application? | Using C# and WPF under .net (rather than WindowsForms or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.
The code needs to also inform the already running instance that the user tried to start a second one, and maybe also pass any command line arguments if any existed. | c# | .net | wpf | mutex | null | null | open | What is the correct way to create a single instance application?
===
Using C# and WPF under .net (rather than WindowsForms or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.
The code needs to also inform the already running instance that the user tried to start a second one, and maybe also pass any command line arguments if any existed. | 0 |
19,151 | 08/21/2008 00:36:11 | 145 | 08/02/2008 14:40:17 | 465 | 21 | Build a Basic Python Iterator | How would one create an iterative function (or iterator object) in python? | python | object | iterator | null | null | null | open | Build a Basic Python Iterator
===
How would one create an iterative function (or iterator object) in python? | 0 |
19,155 | 08/21/2008 00:38:37 | 242 | 08/03/2008 22:55:19 | 259 | 23 | How do I become a programmer who 'gets things done'? | In reference to Joel's '[smart and gets things done](http://www.joelonsoftware.com/items/2007/06/05.html)' idea...
**How do I improve my 'gets things done' ability?**
I'm not super smart, but working on being smarter than I am.
Attending user groups, reading blogs and books, asking and answering on forums etc.
But I'm having trouble with the 'get things done' part.
I'm OK at overcoming '[institutional inertia](http://www.joelonsoftware.com/articles/fog0000000073.html)', as Joel put it, but not very good at getting things done on a smaller scale.
I want to improve my _day-to-day_ productivity.
What have you found helps you to 'gets things done'?
ps - And I know 'just doing them' is the obvious answer.
| productivity | null | null | null | null | null | open | How do I become a programmer who 'gets things done'?
===
In reference to Joel's '[smart and gets things done](http://www.joelonsoftware.com/items/2007/06/05.html)' idea...
**How do I improve my 'gets things done' ability?**
I'm not super smart, but working on being smarter than I am.
Attending user groups, reading blogs and books, asking and answering on forums etc.
But I'm having trouble with the 'get things done' part.
I'm OK at overcoming '[institutional inertia](http://www.joelonsoftware.com/articles/fog0000000073.html)', as Joel put it, but not very good at getting things done on a smaller scale.
I want to improve my _day-to-day_ productivity.
What have you found helps you to 'gets things done'?
ps - And I know 'just doing them' is the obvious answer.
| 0 |
19,162 | 08/21/2008 00:46:52 | 1,852 | 08/18/2008 22:02:44 | 1 | 1 | PHP Script to populate MySQL tables | Is anyone aware of a script/class (preferably in PHP) that would parse a given MySQL table's structure and then fill it with x number of rows of random test data based on the field types? I have never seen or heard of something like this and thought I would check before writing one myself. | php | mysql | testing | data-sets | test-data | null | open | PHP Script to populate MySQL tables
===
Is anyone aware of a script/class (preferably in PHP) that would parse a given MySQL table's structure and then fill it with x number of rows of random test data based on the field types? I have never seen or heard of something like this and thought I would check before writing one myself. | 0 |
19,164 | 08/21/2008 00:47:22 | 1,175 | 08/13/2008 10:21:54 | 319 | 49 | Do You Really Know Your Programming Languages? | I am often amazed at how little some of my colleagues know or care about their craft. Something that constantly frustrates me is that people don't want to learn any more than they need to about the programming languages they use every day.
Many programmers seem content to learn some pidgin sub-dialect, and stick with that. If they see a keyword or construct that they aren't familiar with, they'll complain that the code is "tricky."
What would you think of a civil engineer who shied away from calculus because it had "all those tricky math symbols?"
I'm not suggesting that we all need to become "language lawyers." But if you make your living as a programmer, and claim to be a competent user of language X, then I think at a minimum you should know the following:
- What are all the keywords of the language?
- What are all the valid syntactic forms?
- How are memory, files, and other operating system resources managed?
- Where is the official language specification and library reference for the language?
The last one is the one that really gets me. Many programmers seem to have no idea that there is a "specification" or "standard" for any particular language. I still talk to people who think that Microsoft invented C++, and that if a program doesn't compile under VC6, it's not a valid C++ program.
Programmers these days have it easy when it comes to obtaining specs. Newer languages like C#, Java, Python, Ruby, etc. all have their documentation available for free from the vendors' web sites. Older languages and platforms often have standards controlled by standards bodies that demand payment for specs, but even that shouldn't be a deterrent: the C++ standard is available from ISO for $30 (and why am I the only person I know who has a copy?).
Programming is hard enough even when you do know the language. If you don't, I don't see how you have a chance.
What do the rest of you think? Am I right, or should we all be content with the typical level of programming language expertise? | language-features | language-agnostic | rant | null | null | null | open | Do You Really Know Your Programming Languages?
===
I am often amazed at how little some of my colleagues know or care about their craft. Something that constantly frustrates me is that people don't want to learn any more than they need to about the programming languages they use every day.
Many programmers seem content to learn some pidgin sub-dialect, and stick with that. If they see a keyword or construct that they aren't familiar with, they'll complain that the code is "tricky."
What would you think of a civil engineer who shied away from calculus because it had "all those tricky math symbols?"
I'm not suggesting that we all need to become "language lawyers." But if you make your living as a programmer, and claim to be a competent user of language X, then I think at a minimum you should know the following:
- What are all the keywords of the language?
- What are all the valid syntactic forms?
- How are memory, files, and other operating system resources managed?
- Where is the official language specification and library reference for the language?
The last one is the one that really gets me. Many programmers seem to have no idea that there is a "specification" or "standard" for any particular language. I still talk to people who think that Microsoft invented C++, and that if a program doesn't compile under VC6, it's not a valid C++ program.
Programmers these days have it easy when it comes to obtaining specs. Newer languages like C#, Java, Python, Ruby, etc. all have their documentation available for free from the vendors' web sites. Older languages and platforms often have standards controlled by standards bodies that demand payment for specs, but even that shouldn't be a deterrent: the C++ standard is available from ISO for $30 (and why am I the only person I know who has a copy?).
Programming is hard enough even when you do know the language. If you don't, I don't see how you have a chance.
What do the rest of you think? Am I right, or should we all be content with the typical level of programming language expertise? | 0 |
19,173 | 08/21/2008 00:56:45 | 2,031 | 08/19/2008 21:26:01 | 81 | 9 | Are there reasons not to use JSONP for AJA~X requests? | If you're building an AJA~Xy app, are there any downsides to using JSONP requests/responses even if you're not planning on any cross-domain requests? The only thing I can think of is that there are a couple extra bytes for the callback wrapper... | ajax | json | jsonp | null | null | null | open | Are there reasons not to use JSONP for AJA~X requests?
===
If you're building an AJA~Xy app, are there any downsides to using JSONP requests/responses even if you're not planning on any cross-domain requests? The only thing I can think of is that there are a couple extra bytes for the callback wrapper... | 0 |
19,185 | 08/21/2008 01:15:00 | 1,185 | 08/13/2008 12:02:03 | 563 | 57 | Is there a way to check to see if the user is currently idle? | There is some documentation on the internet that shows that Windows changes the behavior of the NotifyIcon.BalloonTipShown command if the user is currently idle and this is [detected by checking for keyboard and mouse events][1]. I am currently working on an application that spends most of its time in the system tray, but pop-ups up multiple balloon tips from time to time and I would like to prevent the user from missing any of them if they are currently away from the system. Since any currently displayed balloon tips are destroyed if a new one is displayed, I want to hold off on displaying them if the user is away.
As such, is there any way to check to see if the user is currently idle if the application is minimized to the system tray?
[1]: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=343411&SiteID=1 | .net | windows | user-interface | null | null | null | open | Is there a way to check to see if the user is currently idle?
===
There is some documentation on the internet that shows that Windows changes the behavior of the NotifyIcon.BalloonTipShown command if the user is currently idle and this is [detected by checking for keyboard and mouse events][1]. I am currently working on an application that spends most of its time in the system tray, but pop-ups up multiple balloon tips from time to time and I would like to prevent the user from missing any of them if they are currently away from the system. Since any currently displayed balloon tips are destroyed if a new one is displayed, I want to hold off on displaying them if the user is away.
As such, is there any way to check to see if the user is currently idle if the application is minimized to the system tray?
[1]: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=343411&SiteID=1 | 0 |
19,193 | 08/21/2008 01:28:06 | 2,222 | 08/21/2008 01:28:06 | 1 | 0 | How to make a tree in C++? | How do I make a tree data structure in C++ that uses iterators instead of pointers? I couldn't find anything in the STL that can do this. What I would like to do is to be able to create and manipulate trees like this:
#include <iostream>
#include <tree>
using namespace std;
int main()
{
tree<int> myTree;
tree<int>::iterator i = myTree.root();
*i = 42;
tree<int>::iterator j = i.add_child();
*j = 777;
j = j.parent();
if (i == myTree.root() && i == j) cout << "i and j are both pointing to the root\n";
return 0;
} | c++ | tree | iterator | null | null | null | open | How to make a tree in C++?
===
How do I make a tree data structure in C++ that uses iterators instead of pointers? I couldn't find anything in the STL that can do this. What I would like to do is to be able to create and manipulate trees like this:
#include <iostream>
#include <tree>
using namespace std;
int main()
{
tree<int> myTree;
tree<int>::iterator i = myTree.root();
*i = 42;
tree<int>::iterator j = i.add_child();
*j = 777;
j = j.parent();
if (i == myTree.root() && i == j) cout << "i and j are both pointing to the root\n";
return 0;
} | 0 |
19,201 | 08/21/2008 01:45:23 | 1,965 | 08/19/2008 15:51:08 | 132 | 6 | Accurev SCM | Does anyone use Accurev for Source Control Management? We are switching (eventually) from StarTeam to Accurev.
My initial impression is that the GUI tool is severely lacking, however the underlying engine, and the branches as streams concept is incredible.
The biggest difficulty we are facing is assessing our own DIY tools that interfaced with starteam, and either replacing them with DIY new tools, or finding and purchasing appropriate replacements.
Additionally, is anyone using the AccuWork component for Issue management? Starteam had a very nice change request system, and AccuWork does not come close to matching it. We are evaluating either using Accuwork, or buying a 3rd party package such as JIRA.
Opinions?
| accurev | null | null | null | null | null | open | Accurev SCM
===
Does anyone use Accurev for Source Control Management? We are switching (eventually) from StarTeam to Accurev.
My initial impression is that the GUI tool is severely lacking, however the underlying engine, and the branches as streams concept is incredible.
The biggest difficulty we are facing is assessing our own DIY tools that interfaced with starteam, and either replacing them with DIY new tools, or finding and purchasing appropriate replacements.
Additionally, is anyone using the AccuWork component for Issue management? Starteam had a very nice change request system, and AccuWork does not come close to matching it. We are evaluating either using Accuwork, or buying a 3rd party package such as JIRA.
Opinions?
| 0 |
19,235 | 08/21/2008 02:31:16 | 1,782 | 08/18/2008 14:30:58 | 230 | 19 | Agile architectures | I am starting my graduate thesis and the subject will be "agile architectures"
Basically, it will start with a description of traditional software development methologies, and the subsequent birth of agile methodologies, finishing with recommendations and a design of a flexible application architecture easily adaptable to the inherent changes in software construction.
My question is, what patterns and design practices would you recommend for such an architecture?
I'm interested in patterns that allow for maximization of class decoupling like dependency injection, high maintanability, and maximum abstraction from the specific problem. | architecture | oop | patterns | null | null | 09/04/2011 05:25:36 | not constructive | Agile architectures
===
I am starting my graduate thesis and the subject will be "agile architectures"
Basically, it will start with a description of traditional software development methologies, and the subsequent birth of agile methodologies, finishing with recommendations and a design of a flexible application architecture easily adaptable to the inherent changes in software construction.
My question is, what patterns and design practices would you recommend for such an architecture?
I'm interested in patterns that allow for maximization of class decoupling like dependency injection, high maintanability, and maximum abstraction from the specific problem. | 4 |
19,236 | 08/21/2008 02:33:48 | 1,965 | 08/19/2008 15:51:08 | 151 | 9 | Forms Authentication across Applications | I'm working on a internal web based tool for my company. Part of this tool is another application (The Cruise Control Dashboard) that runs in its own Virtual Directory under my root application.
I wanted to limit access to this internal application by setting up Forms Authentication on it, and having a login form in the root application.
I put the following into the root applications web.config:
<location path="ccnet">
<system.web>
<authentication mode="Forms">
<forms loginUrl="/default.aspx" timeout="5000"/>
</authentication>
<authorization>
<allow users="?"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
However, the Forms Authentication does not appear to be working, it does not redirect back to the login page when I access that application directly.
I have a feeling I have the <allow> and <deny> tags set wrong. Can someone clarify? | asp.net | authentication | cruisecontrol.net | null | null | null | open | Forms Authentication across Applications
===
I'm working on a internal web based tool for my company. Part of this tool is another application (The Cruise Control Dashboard) that runs in its own Virtual Directory under my root application.
I wanted to limit access to this internal application by setting up Forms Authentication on it, and having a login form in the root application.
I put the following into the root applications web.config:
<location path="ccnet">
<system.web>
<authentication mode="Forms">
<forms loginUrl="/default.aspx" timeout="5000"/>
</authentication>
<authorization>
<allow users="?"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
However, the Forms Authentication does not appear to be working, it does not redirect back to the login page when I access that application directly.
I have a feeling I have the <allow> and <deny> tags set wrong. Can someone clarify? | 0 |
19,245 | 08/21/2008 02:43:23 | 1,100 | 08/12/2008 11:58:29 | 28 | 4 | IIS 6/COM+ hangs | I have a web application that sometimes just hangs over heavy load. To make it come back I have to kill the "dllhost.exe" process. **Does someone know what to do?**
This is an Classic ASP (VBScript) app with lots of COM+ objects.
The server has the following configuration:
- Intel Core 2 Duo 2.2 GHz / 4 GB RAM
- Windows Server 2003 Web Edition SP2
- IIS 6.0 | iis | crash | dll | classicasp | asp | null | open | IIS 6/COM+ hangs
===
I have a web application that sometimes just hangs over heavy load. To make it come back I have to kill the "dllhost.exe" process. **Does someone know what to do?**
This is an Classic ASP (VBScript) app with lots of COM+ objects.
The server has the following configuration:
- Intel Core 2 Duo 2.2 GHz / 4 GB RAM
- Windows Server 2003 Web Edition SP2
- IIS 6.0 | 0 |
19,280 | 08/21/2008 03:20:05 | 184 | 08/03/2008 05:34:19 | 480 | 7 | Code to ask yes/no question in javascript | I could only find the function `confirm()` that gives OK/Cancel buttons. Is there any way to give Yes/No buttons? | javascript | null | null | null | null | null | open | Code to ask yes/no question in javascript
===
I could only find the function `confirm()` that gives OK/Cancel buttons. Is there any way to give Yes/No buttons? | 0 |
19,294 | 08/21/2008 03:33:25 | 1,894 | 08/19/2008 07:05:25 | 21 | 4 | Calling base Methods When Overriding Page Level Events | In my code behind I wire up my events like so:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
btnUpdateUser.Click += btnUpateUserClick;
}
I've done it this way because that's what I've seen in examples. Does the base.OnInit() method need to be called? Will it be implicitly be called? Is it better to call it at the beginning of the method or at the end? What would be an example where confusion over the base method can get you in trouble? | asp.net | events | webform | null | null | null | open | Calling base Methods When Overriding Page Level Events
===
In my code behind I wire up my events like so:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
btnUpdateUser.Click += btnUpateUserClick;
}
I've done it this way because that's what I've seen in examples. Does the base.OnInit() method need to be called? Will it be implicitly be called? Is it better to call it at the beginning of the method or at the end? What would be an example where confusion over the base method can get you in trouble? | 0 |
19,295 | 08/21/2008 03:36:38 | 1,310 | 08/14/2008 13:42:16 | 317 | 18 | Database backed i18n for java web-app | I'd like to use a database to store i18n key/value pairs so we can modify / reload the i18n data at runtime. Has anyone done this? Or does anyone have an idea of how to implement this? I've read several threads on this, but I haven't seen a workable solution.
| java | internationalization | null | null | null | null | open | Database backed i18n for java web-app
===
I'd like to use a database to store i18n key/value pairs so we can modify / reload the i18n data at runtime. Has anyone done this? Or does anyone have an idea of how to implement this? I've read several threads on this, but I haven't seen a workable solution.
| 0 |
19,314 | 08/21/2008 03:58:11 | 1,436 | 08/15/2008 15:43:19 | 293 | 17 | Alternatives to Windows Workflow Foundation? | I've been using WWF for a while as part of an internal call center application (ASP.NET), and while learning it was a good practice in understanding how a state machine based workflow system *should* work, I am definitely not in love with WWF itself. In my opinion it is:
1. Overly complex, especially for use within web apps (all that threaded runtime stuff)
2. Immature (ever worked with that horrible designer?)
3. Anemic in its current feature set
Does anyone have a suggestion for a better .NET based workflow framework? Specifically, I am looking for the following features:
1. State machine based (mapping states to available actions)
2. A focus on user permissions (controlling who has access to what actions)
3. The ability to run workflows as timed background tasks (for example, to send out reminders for items that have been sitting in a certain state for x days)
That's really all I need. I don't need to be able to "drag and drop" any activities or visually design the flow. I am perfectly comfortable writing actual code once a particular action is triggered. | asp.net | workflow | null | null | null | null | open | Alternatives to Windows Workflow Foundation?
===
I've been using WWF for a while as part of an internal call center application (ASP.NET), and while learning it was a good practice in understanding how a state machine based workflow system *should* work, I am definitely not in love with WWF itself. In my opinion it is:
1. Overly complex, especially for use within web apps (all that threaded runtime stuff)
2. Immature (ever worked with that horrible designer?)
3. Anemic in its current feature set
Does anyone have a suggestion for a better .NET based workflow framework? Specifically, I am looking for the following features:
1. State machine based (mapping states to available actions)
2. A focus on user permissions (controlling who has access to what actions)
3. The ability to run workflows as timed background tasks (for example, to send out reminders for items that have been sitting in a certain state for x days)
That's really all I need. I don't need to be able to "drag and drop" any activities or visually design the flow. I am perfectly comfortable writing actual code once a particular action is triggered. | 0 |
19,318 | 08/21/2008 04:07:59 | 419 | 08/05/2008 14:48:22 | 1,724 | 108 | Calling ASP.NET web service from ASP using SOAPClient | I have an ASP.NET webservice with along the lines of:
[WebService(Namespace = "http://internalservice.net/messageprocessing")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class ProvisioningService : WebService
{
[WebMethod]
public XmlDocument ProcessMessage(XmlDocument message)
{
// ... do stuff
}
}
I am calling the web service from ASP using something like:
provWSDL = "http://servername:12011/MessageProcessor.asmx?wsdl"
Set service = CreateObject("MSSOAP.SoapClient30")
service.ClientProperty("ServerHTTPRequest") = True
Call service.MSSoapInit(provWSDL)
xmlMessage = "<request><task>....various xml</task></request>"
result = service.ProcessMessage(xmlMessage)
The problem I am encountering is that when the XML reaches the ProcessMessage method, the web service plumbing has added a default namespace along the way. i.e. if I set a breakpoint inside ProcessMessage(XmlDocument message) I see:
<request xmlns="http://internalservice.net/messageprocessing">
<task>....various xml</task>
</request>
When I capture packets on the wire I can see that the inbound XML to the web service is unmolested so it's the .NET WS stack that's adding this namespace. If I call the web service from a .NET client (Add web reference etc) then the default namespace is empty, as it should be.
It's been so long since I used the ASP/SOAP toolkit to call into .NET webservices, I can't remember all the clever tricks I used to pull to get around stuff like this.
Any ideas? One solution is to knock up a COM callable .NET proxy that takes the XML as a string param and calls the WS on my behalf, but it's an extra layer of complexity/work I hoped not to do.
Thanks for looking.
Kev
| soap | webservices | asp.net | .net | classicasp | null | open | Calling ASP.NET web service from ASP using SOAPClient
===
I have an ASP.NET webservice with along the lines of:
[WebService(Namespace = "http://internalservice.net/messageprocessing")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class ProvisioningService : WebService
{
[WebMethod]
public XmlDocument ProcessMessage(XmlDocument message)
{
// ... do stuff
}
}
I am calling the web service from ASP using something like:
provWSDL = "http://servername:12011/MessageProcessor.asmx?wsdl"
Set service = CreateObject("MSSOAP.SoapClient30")
service.ClientProperty("ServerHTTPRequest") = True
Call service.MSSoapInit(provWSDL)
xmlMessage = "<request><task>....various xml</task></request>"
result = service.ProcessMessage(xmlMessage)
The problem I am encountering is that when the XML reaches the ProcessMessage method, the web service plumbing has added a default namespace along the way. i.e. if I set a breakpoint inside ProcessMessage(XmlDocument message) I see:
<request xmlns="http://internalservice.net/messageprocessing">
<task>....various xml</task>
</request>
When I capture packets on the wire I can see that the inbound XML to the web service is unmolested so it's the .NET WS stack that's adding this namespace. If I call the web service from a .NET client (Add web reference etc) then the default namespace is empty, as it should be.
It's been so long since I used the ASP/SOAP toolkit to call into .NET webservices, I can't remember all the clever tricks I used to pull to get around stuff like this.
Any ideas? One solution is to knock up a COM callable .NET proxy that takes the XML as a string param and calls the WS on my behalf, but it's an extra layer of complexity/work I hoped not to do.
Thanks for looking.
Kev
| 0 |
19,339 | 08/21/2008 04:29:07 | 680 | 08/07/2008 17:29:04 | 355 | 13 | A Transpose/Unzip Function in Python | I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.
**For example:**
original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
# and I want to become...
result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4])
Is there a builtin function that does that? | python | list | matrix | transpose | null | null | open | A Transpose/Unzip Function in Python
===
I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.
**For example:**
original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
# and I want to become...
result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4])
Is there a builtin function that does that? | 0 |
19,347 | 08/21/2008 04:46:02 | 396 | 08/05/2008 12:46:44 | 288 | 15 | What is the best way to go from Java/C# to C++? | At my university most of my classes have been in Java. I have also recently learned C# (and the Visual Studio environment) at a summer internship. Now I'm taking an Intro to Computer Graphics class and the grad student teaching the class prefers us to use C++ to access the OpenGL bindings via GLUT.
Does anyone have any good resources on how to make a good transition from Java/C# to C++? Obviously pointers are going to be a big issue, but any other things I should be looking out for? Any tutorials, guides, etc. would be very helpful!
Thanks! | c++ | java | c# | visual-studio | transition | null | open | What is the best way to go from Java/C# to C++?
===
At my university most of my classes have been in Java. I have also recently learned C# (and the Visual Studio environment) at a summer internship. Now I'm taking an Intro to Computer Graphics class and the grad student teaching the class prefers us to use C++ to access the OpenGL bindings via GLUT.
Does anyone have any good resources on how to make a good transition from Java/C# to C++? Obviously pointers are going to be a big issue, but any other things I should be looking out for? Any tutorials, guides, etc. would be very helpful!
Thanks! | 0 |
19,349 | 08/21/2008 04:50:13 | 49 | 08/01/2008 13:29:21 | 1,847 | 61 | "Data Execution Prevention" kills (VS2008) local ASP.Net Development Server (aka Cassini) on Vista 64 | Occasionally i find that while debugging an asp.net application (written in visual studio 2008, running on Vista 64) the local ASP.Net development server (i.e. 'Cassini') stops responding.
A message often comes up telling me that "Data Execution Prevention (DEP)" has killed WebDev.WebServer.exe
The event logs simply tell me that "WebDev.WebServer.exe has stopped working"
I've heard that this 'problem' presents itself more often on Vista64 because DEP is on by default.
Hence, turning DEP off may 'solve' the problem:
But i'm wondering:
*Is there a known bug/situation with Cassini that causes DEP to kill the process?*
*Alternatively, what is the practical danger of disabling Data Execution Prevention?*
| asp.net | cassini | dep | null | null | null | open | "Data Execution Prevention" kills (VS2008) local ASP.Net Development Server (aka Cassini) on Vista 64
===
Occasionally i find that while debugging an asp.net application (written in visual studio 2008, running on Vista 64) the local ASP.Net development server (i.e. 'Cassini') stops responding.
A message often comes up telling me that "Data Execution Prevention (DEP)" has killed WebDev.WebServer.exe
The event logs simply tell me that "WebDev.WebServer.exe has stopped working"
I've heard that this 'problem' presents itself more often on Vista64 because DEP is on by default.
Hence, turning DEP off may 'solve' the problem:
But i'm wondering:
*Is there a known bug/situation with Cassini that causes DEP to kill the process?*
*Alternatively, what is the practical danger of disabling Data Execution Prevention?*
| 0 |
19,353 | 08/21/2008 04:56:33 | 536 | 08/06/2008 15:30:22 | 335 | 13 | Detecting audio silence in WAV files using C# | I'm tasked with building a .NET client app to detect silence in a WAV files.
Is this possible with the built-in Windows APIs? Or alternately, any good libraries out there to help with this? | c# | .net | audio | null | null | null | open | Detecting audio silence in WAV files using C#
===
I'm tasked with building a .NET client app to detect silence in a WAV files.
Is this possible with the built-in Windows APIs? Or alternately, any good libraries out there to help with this? | 0 |
19,355 | 08/21/2008 04:59:53 | 708 | 08/08/2008 06:10:02 | 306 | 12 | How to manage Configuration Settings for each Developer | In a .NET project, say you have a configuration setting - like a connection string - stored in a app.config file, which is different for each developer on your team (they may be using a local SQL Server, or a specific server instance, or using a remote server, etc).
How can you structure your solution so that each developer can have their own development "preferences" (i.e. not checked into source control), but provide a default connection string that is checked into source control (thereby supplying the correct defaults for a build process or new developers).
| .net | configurationfiles | null | null | null | null | open | How to manage Configuration Settings for each Developer
===
In a .NET project, say you have a configuration setting - like a connection string - stored in a app.config file, which is different for each developer on your team (they may be using a local SQL Server, or a specific server instance, or using a remote server, etc).
How can you structure your solution so that each developer can have their own development "preferences" (i.e. not checked into source control), but provide a default connection string that is checked into source control (thereby supplying the correct defaults for a build process or new developers).
| 0 |
19,358 | 08/21/2008 05:02:08 | 446,497 | 08/18/2008 01:08:53 | 128 | 17 | Experience documentation about Shared Nothing Architecture | Do you have any experience of designing a Real Shared-Nothing Architecture?
Would you have some readings to recommend me? | architecture | shared-nothing | null | null | null | null | open | Experience documentation about Shared Nothing Architecture
===
Do you have any experience of designing a Real Shared-Nothing Architecture?
Would you have some readings to recommend me? | 0 |
19,387 | 08/21/2008 05:57:14 | 2,237 | 08/21/2008 05:46:37 | 1 | 0 | Rich GUI OS X Frameworks? | What would you recommend for OS X development of a graphical application like those possible in WPF?
My specific background is in Smalltalk & Java, but I currently work mostly in DHTML/.NET (ASP.NET/C#). | gui | wpf | framework | null | null | null | open | Rich GUI OS X Frameworks?
===
What would you recommend for OS X development of a graphical application like those possible in WPF?
My specific background is in Smalltalk & Java, but I currently work mostly in DHTML/.NET (ASP.NET/C#). | 0 |
19,388 | 08/21/2008 05:57:59 | 2,238 | 08/21/2008 05:51:27 | 1 | 0 | GOTO command in PHP6? | I've heard rumors that PHP6 is planning on introducing a "goto" command. What is it supposed to be doing, once PHP6 gets out?
I've tried searching a bit, but haven't found anything awfully descriptive. I understand that it won't be a "`GOTO 10`"-like command... | php | language-features | null | null | null | null | open | GOTO command in PHP6?
===
I've heard rumors that PHP6 is planning on introducing a "goto" command. What is it supposed to be doing, once PHP6 gets out?
I've tried searching a bit, but haven't found anything awfully descriptive. I understand that it won't be a "`GOTO 10`"-like command... | 0 |
19,401 | 08/21/2008 06:14:17 | 1,478 | 08/15/2008 19:37:57 | 85 | 9 | Anyway to stop Windows bringing app to front when displaying a context menu on tray icon? | We are experiencing this annoying problem where we have a context menu on our tray icon, if we display this context menu we **have** to SetForegroundWindow and bring it to the front. This is really annoying and not at all what we want.
Is there a workaround, I notice that Outlook MS Messenger and other MS apps do not suffer this, perhaps they are not using a standard menu and have had to write their own ... why dont they release this code if they have?
This article describes the 'as design' behaviour: [Menus for Notification Icons Do Not Work Correctly][1]
[1]: http://support.microsoft.com/kb/135788 | windows | trayicon | null | null | null | null | open | Anyway to stop Windows bringing app to front when displaying a context menu on tray icon?
===
We are experiencing this annoying problem where we have a context menu on our tray icon, if we display this context menu we **have** to SetForegroundWindow and bring it to the front. This is really annoying and not at all what we want.
Is there a workaround, I notice that Outlook MS Messenger and other MS apps do not suffer this, perhaps they are not using a standard menu and have had to write their own ... why dont they release this code if they have?
This article describes the 'as design' behaviour: [Menus for Notification Icons Do Not Work Correctly][1]
[1]: http://support.microsoft.com/kb/135788 | 0 |
19,409 | 08/21/2008 06:20:08 | 61 | 08/01/2008 14:21:00 | 601 | 55 | Incrementing from 0 to 100 in assembly language. | This is kinda oddball, but I was poking around with the GNU assembler today (I want to be able to at least read the syntax), and was trying to get this little contrived example of mine to work. Namely I just want to go from 0 to 100, printing out numbers all the while. So a few minutes later I come up with this:
# count.s: print the numbers from 0 to 100.
.text
string: .asciz "%d\n"
.globl _main
_main:
movl $0, %eax # The starting point/current value.
movl $100, %ebx # The ending point.
_loop:
# Display the current value.
pushl %eax
pushl $string
call _printf
addl $8, %esp
# Check against the ending value.
cmpl %eax, %ebx
je _end
# Increment the current value.
incl %eax
jmp _loop
_end:
All I get from this is 3 printed over and over again. Like I said, just a little contrived example, so don't worry too much about it, it's not a life or death problem. | gas | assembly | null | null | null | null | open | Incrementing from 0 to 100 in assembly language.
===
This is kinda oddball, but I was poking around with the GNU assembler today (I want to be able to at least read the syntax), and was trying to get this little contrived example of mine to work. Namely I just want to go from 0 to 100, printing out numbers all the while. So a few minutes later I come up with this:
# count.s: print the numbers from 0 to 100.
.text
string: .asciz "%d\n"
.globl _main
_main:
movl $0, %eax # The starting point/current value.
movl $100, %ebx # The ending point.
_loop:
# Display the current value.
pushl %eax
pushl $string
call _printf
addl $8, %esp
# Check against the ending value.
cmpl %eax, %ebx
je _end
# Increment the current value.
incl %eax
jmp _loop
_end:
All I get from this is 3 printed over and over again. Like I said, just a little contrived example, so don't worry too much about it, it's not a life or death problem. | 0 |
19,412 | 08/21/2008 06:28:49 | 473 | 08/06/2008 05:51:32 | 1 | 0 | How to request a random row in SQL? | What is the best way to request a random row in pure SQL? | sql | null | null | null | null | null | open | How to request a random row in SQL?
===
What is the best way to request a random row in pure SQL? | 0 |
19,433 | 08/21/2008 07:06:38 | 1,915 | 08/19/2008 14:11:04 | 1 | 0 | What is a good free library for editing MP3s/FLACs? | What is a good free library for editing MP3s/FLACs.
By editing I mean:
- Cutting audio file into multiple parts
- Joining multiple audio files together
- Increase playback speed of file without affecting the pitch (eg. podcasts up to 1.3x)
- Re-encoding audio file from Flac -> MP3 or vice versa | audio | free | null | null | null | null | open | What is a good free library for editing MP3s/FLACs?
===
What is a good free library for editing MP3s/FLACs.
By editing I mean:
- Cutting audio file into multiple parts
- Joining multiple audio files together
- Increase playback speed of file without affecting the pitch (eg. podcasts up to 1.3x)
- Re-encoding audio file from Flac -> MP3 or vice versa | 0 |
19,436 | 08/21/2008 07:13:24 | 1,013 | 08/11/2008 13:24:18 | 125 | 13 | Delete Datalist row with multiple primary keys | I have a datalist with a OnDeleteCommand="Delete_Command".
I want the delete a record with multiple primary Keys but I do not know how to access it from the Delete_Command event.
If I use DataKeyField I'm limited to only one key.
Any workarounds for this?
Thank you | asp.net | null | null | null | null | null | open | Delete Datalist row with multiple primary keys
===
I have a datalist with a OnDeleteCommand="Delete_Command".
I want the delete a record with multiple primary Keys but I do not know how to access it from the Delete_Command event.
If I use DataKeyField I'm limited to only one key.
Any workarounds for this?
Thank you | 0 |
19,437 | 08/21/2008 07:16:16 | 1,199,387 | 08/06/2008 23:58:10 | 256 | 17 | Custom font in SQL Server 2005 Reporting Services | I'm having issues with my SQL Reporting Services reports. I'm using a custom font for report headers, and when deployed to the server it does not render correctly when I print or export to PDF/TIFF. I have installed the font on the server. Is there anything else I need to do in order to use custom fonts?
When viewing the font in the browser it looks correct - since all client computers have the font installed... | sql | reporting-services | null | null | null | null | open | Custom font in SQL Server 2005 Reporting Services
===
I'm having issues with my SQL Reporting Services reports. I'm using a custom font for report headers, and when deployed to the server it does not render correctly when I print or export to PDF/TIFF. I have installed the font on the server. Is there anything else I need to do in order to use custom fonts?
When viewing the font in the browser it looks correct - since all client computers have the font installed... | 0 |
19,442 | 08/21/2008 07:26:27 | 479 | 08/06/2008 08:37:10 | 142 | 10 | how to allow files starting with period and no extension in windows 2003 server? | How can I create this file in a directory in windows 2003 SP2:
.hgignore
I get error: You must type a file name.
| mercurial | windows2003server | null | null | null | 02/15/2011 19:56:23 | off topic | how to allow files starting with period and no extension in windows 2003 server?
===
How can I create this file in a directory in windows 2003 SP2:
.hgignore
I get error: You must type a file name.
| 2 |
19,445 | 08/21/2008 07:29:46 | 713 | 08/08/2008 06:44:13 | 93 | 12 | What Content Management does your workplace use? | I noticed a lack of Content Management tags all up in the pool.<br>
So here is a quick and dirty survey to get things started.
1) What UCM solution is your company using? <br>
2) How big is your company?<br>
3) Are you happy with the implementation?<br>
<br><br>
ME:<br>
1) The company I work for uses Oracle ECM (formerly Stellent UCM).<br>
2) We have somewhere over 10,000 employees across Australia, New Zealand and Indonesia.<br>
3) It works! Having worked with the system for a while now. I can see where the initial implementation went wrong. Its 3 years later and it is *Rewrite Time!* (Three year itch?)
| oracle | contentmanagement | ucm | null | null | null | open | What Content Management does your workplace use?
===
I noticed a lack of Content Management tags all up in the pool.<br>
So here is a quick and dirty survey to get things started.
1) What UCM solution is your company using? <br>
2) How big is your company?<br>
3) Are you happy with the implementation?<br>
<br><br>
ME:<br>
1) The company I work for uses Oracle ECM (formerly Stellent UCM).<br>
2) We have somewhere over 10,000 employees across Australia, New Zealand and Indonesia.<br>
3) It works! Having worked with the system for a while now. I can see where the initial implementation went wrong. Its 3 years later and it is *Rewrite Time!* (Three year itch?)
| 0 |
19,448 | 08/21/2008 07:33:10 | 1,043 | 08/11/2008 18:08:32 | 752 | 46 | In a DDS file can you detect textures with 0/1 alpha bits? | In my engine I have a need to be able to detect DXT1 textures that have texels with 0 alpha (e.g. a cutout for a window frame). This is easy for textures I compress myself, but I'm not sure about textures that are already compressed.
Is there an easy way to tell from the header whether a DDS image contains alpha?
| graphics | directx | dds | null | null | null | open | In a DDS file can you detect textures with 0/1 alpha bits?
===
In my engine I have a need to be able to detect DXT1 textures that have texels with 0 alpha (e.g. a cutout for a window frame). This is easy for textures I compress myself, but I'm not sure about textures that are already compressed.
Is there an easy way to tell from the header whether a DDS image contains alpha?
| 0 |
19,454 | 08/21/2008 07:49:56 | 832 | 08/09/2008 06:51:40 | 991 | 84 | Enforce Attribute Decoration of Classes/Methods | Following on from my recent question on [Large, Complex Objects as a Web Service Result](http://stackoverflow.com/questions/17725/large-complex-objects-as-a-web-service-result). I have been thinking about how I can ensure all future child classes are serializable to XML.
Now, obviously I could implement the [IXmlSerializable](http://msdn.microsoft.com/en-us/library/system.xml.serialization.ixmlserializable.aspx) interface and then chuck a reader/writer to it but I would like to avoid that since it then means I need to instantiate a reader/writer whenever I want to do it, and 99.99% of the time I am going to be working with a _string_ so I may just write my own.
However, to serialize to XML, I am simply decorating the class and its members with the _Xml???_ attributes ( _XmlRoot_ , _XmlElement_ etc.) and then passing it to the _XmlSerializer_ and a _StringWriter_ to get the string. Which is all good. I intend to put the method to return the string into a generic utility method so I dont need to worry about type etc.
The this that concerns me is this: If I do not decorate the class(es) with the required attributes an error is not thrown until run time..
**Is there any way to enforce attribute decoration? Can this be done with FxCop?** (I have not used FxCop yet) | c# | xml | serialization | attributes | codingstandards | null | open | Enforce Attribute Decoration of Classes/Methods
===
Following on from my recent question on [Large, Complex Objects as a Web Service Result](http://stackoverflow.com/questions/17725/large-complex-objects-as-a-web-service-result). I have been thinking about how I can ensure all future child classes are serializable to XML.
Now, obviously I could implement the [IXmlSerializable](http://msdn.microsoft.com/en-us/library/system.xml.serialization.ixmlserializable.aspx) interface and then chuck a reader/writer to it but I would like to avoid that since it then means I need to instantiate a reader/writer whenever I want to do it, and 99.99% of the time I am going to be working with a _string_ so I may just write my own.
However, to serialize to XML, I am simply decorating the class and its members with the _Xml???_ attributes ( _XmlRoot_ , _XmlElement_ etc.) and then passing it to the _XmlSerializer_ and a _StringWriter_ to get the string. Which is all good. I intend to put the method to return the string into a generic utility method so I dont need to worry about type etc.
The this that concerns me is this: If I do not decorate the class(es) with the required attributes an error is not thrown until run time..
**Is there any way to enforce attribute decoration? Can this be done with FxCop?** (I have not used FxCop yet) | 0 |
19,461 | 08/21/2008 08:02:12 | 1,384,652 | 08/01/2008 12:01:23 | 1,145 | 64 | Click an image, get coordinates | I know it can be done and I even have a vague idea of how to do it but it stops at being vague.
I have a standard HTML image tag with an image in it, 100 by 100 pixels in size. I want people to be able to click the image and for that to pass the X and Y that they click into a function.
The coordinates need to be relative to the image top and left.
Thank you in advance for any help. | javascript | null | null | null | null | null | open | Click an image, get coordinates
===
I know it can be done and I even have a vague idea of how to do it but it stops at being vague.
I have a standard HTML image tag with an image in it, 100 by 100 pixels in size. I want people to be able to click the image and for that to pass the X and Y that they click into a function.
The coordinates need to be relative to the image top and left.
Thank you in advance for any help. | 0 |
19,466 | 08/21/2008 08:06:06 | 115 | 08/02/2008 05:44:40 | 240 | 44 | Check file permissions | How can I check file permissions, without having to run operating system specific command via passthru() or exec()? | php | file-permissions | null | null | null | null | open | Check file permissions
===
How can I check file permissions, without having to run operating system specific command via passthru() or exec()? | 0 |
19,471 | 08/21/2008 08:10:14 | 260 | 08/04/2008 08:21:41 | 44 | 1 | Weird yellow bar pops-up: 'Microsoft Data Access - Remote Data Services | When I am accessing my site from any computer I see this warning popping up:
"This web site wants to run the following add-on: 'Microsoft Data
Access - Remote Data Services Dat...' from 'Microsoft Corporation'. If
you trust the web site and the add-on and want to allow it to run,
click here..."
I am guessing this is some kind of virus or something. I would like to know how to remove this from my site. | security | internet-explorer-7 | null | null | null | null | open | Weird yellow bar pops-up: 'Microsoft Data Access - Remote Data Services
===
When I am accessing my site from any computer I see this warning popping up:
"This web site wants to run the following add-on: 'Microsoft Data
Access - Remote Data Services Dat...' from 'Microsoft Corporation'. If
you trust the web site and the add-on and want to allow it to run,
click here..."
I am guessing this is some kind of virus or something. I would like to know how to remove this from my site. | 0 |
19,481 | 08/21/2008 08:25:46 | 1,193 | 08/13/2008 12:23:37 | 33 | 5 | Data binding is a bad idea? | Another discussion (we've been having a lot of them these days!) in our work is whether data binding is a bad idea or not.
Personally, I think it is A BAD THING.
My reasons are thrice:
1) It circumvents my well architectured MVP framework - with databinding, the view communicates bi-directionally with a model. Ewww.
2) It promotes hooking up view controls to datafields at design time. In my experience, this leads to vital code (binding column A to Field X) being obscure and hidden away in some designer file. IMO this code should be explicit and in-your-face, so that it is easy to modify and see what is going on, without having to use a clunky designer interface.
3) Relating to Point 1) this direct binding makes it harder to isolate each component (view, model, controller/presenter) and unit-test.
The PROS are that it is easy to set up, and you can take advantage of some nice features (validation etc) which come with the plumbing already done for you.
But for me, databinding becomes much more of a hindrance when dealing with a large data-centric application.
Any thoughts?
| bestpractices | data-binding | null | null | null | null | open | Data binding is a bad idea?
===
Another discussion (we've been having a lot of them these days!) in our work is whether data binding is a bad idea or not.
Personally, I think it is A BAD THING.
My reasons are thrice:
1) It circumvents my well architectured MVP framework - with databinding, the view communicates bi-directionally with a model. Ewww.
2) It promotes hooking up view controls to datafields at design time. In my experience, this leads to vital code (binding column A to Field X) being obscure and hidden away in some designer file. IMO this code should be explicit and in-your-face, so that it is easy to modify and see what is going on, without having to use a clunky designer interface.
3) Relating to Point 1) this direct binding makes it harder to isolate each component (view, model, controller/presenter) and unit-test.
The PROS are that it is easy to set up, and you can take advantage of some nice features (validation etc) which come with the plumbing already done for you.
But for me, databinding becomes much more of a hindrance when dealing with a large data-centric application.
Any thoughts?
| 0 |
19,487 | 08/21/2008 08:32:34 | 5 | 07/31/2008 14:22:31 | 1,871 | 86 | What's the best way to go from a Photoshop mockup to semantic HTML and CSS? | I generally use a manual process:
1. Look at the page, figure out the semantic elements, and build the HTML
2. Slice up the images I think I'll need
3. Start writing CSS
4. Tweak and repeat different steps as necessary
Got a better approach, or a tool? | html | css | null | null | null | null | open | What's the best way to go from a Photoshop mockup to semantic HTML and CSS?
===
I generally use a manual process:
1. Look at the page, figure out the semantic elements, and build the HTML
2. Slice up the images I think I'll need
3. Start writing CSS
4. Tweak and repeat different steps as necessary
Got a better approach, or a tool? | 0 |
19,493 | 08/21/2008 08:42:17 | 1,174 | 08/13/2008 10:17:21 | 21 | 4 | mod_rewrite rule to redirect all requests except for one specific path | I'm trying to redirect all requests to my domain to another domain using mod_rewrite in an Apache 2.2 VirtualHost declaration. There is one exception to this -- I'd like all requests to the <code>/audio</code> path *not* to be redirected.
I've written a RewriteCond and RewriteRule to do this but it's not quite right and I can't figure out why. The regular expression contains a negative lookahead for the string "/audio", but for some reason this isn't matching. Here's the definition:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*\.)?mydomain\.net(?!/audio) [NC]
RewriteRule ^(.*)$ http://www.newdomain.net [L,R=301]
If I change the RewriteCond to:
RewriteCond %{HTTP_HOST} ^(.*\.)?mydomain\.net/(?!audio) [NC]
(i.e. put the forward slash outside of the negative lookahead part) then it works, but the downside of this is that requests to mydomain.net without a trailing slash will not be redirected.
Can anyone point out what I'm doing wrong?
(Note: the angle brackets around the domain in the RewriteRule bit above are being added by StackOverflow.com -- they are not there in the actual code!) | apache | mod-rewrite | null | null | null | null | open | mod_rewrite rule to redirect all requests except for one specific path
===
I'm trying to redirect all requests to my domain to another domain using mod_rewrite in an Apache 2.2 VirtualHost declaration. There is one exception to this -- I'd like all requests to the <code>/audio</code> path *not* to be redirected.
I've written a RewriteCond and RewriteRule to do this but it's not quite right and I can't figure out why. The regular expression contains a negative lookahead for the string "/audio", but for some reason this isn't matching. Here's the definition:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*\.)?mydomain\.net(?!/audio) [NC]
RewriteRule ^(.*)$ http://www.newdomain.net [L,R=301]
If I change the RewriteCond to:
RewriteCond %{HTTP_HOST} ^(.*\.)?mydomain\.net/(?!audio) [NC]
(i.e. put the forward slash outside of the negative lookahead part) then it works, but the downside of this is that requests to mydomain.net without a trailing slash will not be redirected.
Can anyone point out what I'm doing wrong?
(Note: the angle brackets around the domain in the RewriteRule bit above are being added by StackOverflow.com -- they are not there in the actual code!) | 0 |
19,516 | 08/21/2008 09:12:00 | 366 | 08/05/2008 06:49:49 | 79 | 2 | SQL2005: Linking a table to multiple tables and retaining Ref Integrity? | Here is a simplification of my database:
<pre>Table: Property
Fields: ID, Address
Table: Quote
Fields: ID, PropertyID, BespokeQuoteFields...
Table: Job
Fields: ID, PropertyID, BespokeJobFields...</pre>
Then we have other tables that relate to the **Quote** and **Job** tables individually.
I now need to add a **Message** table where users can record telephone messages left by customers regarding Jobs and Quotes.
I could create two identical tables (**QuoteMessage** and **JobMessage**), but this violates the DRY principal and seems messy.
I could create one **Message** table:
<pre>Table: Message
Fields: ID, RelationID, RelationType, OtherFields...</pre>
But this stops me from using constraints to enforce my referential integrity. I can also forsee it creating problems with the devlopment side using Linq to SQL later on.
Is there an elegant solution to this problem, or am I ultimately going to have to hack something together?
Burns | database | sql2005 | referential-integrity | null | null | null | open | SQL2005: Linking a table to multiple tables and retaining Ref Integrity?
===
Here is a simplification of my database:
<pre>Table: Property
Fields: ID, Address
Table: Quote
Fields: ID, PropertyID, BespokeQuoteFields...
Table: Job
Fields: ID, PropertyID, BespokeJobFields...</pre>
Then we have other tables that relate to the **Quote** and **Job** tables individually.
I now need to add a **Message** table where users can record telephone messages left by customers regarding Jobs and Quotes.
I could create two identical tables (**QuoteMessage** and **JobMessage**), but this violates the DRY principal and seems messy.
I could create one **Message** table:
<pre>Table: Message
Fields: ID, RelationID, RelationType, OtherFields...</pre>
But this stops me from using constraints to enforce my referential integrity. I can also forsee it creating problems with the devlopment side using Linq to SQL later on.
Is there an elegant solution to this problem, or am I ultimately going to have to hack something together?
Burns | 0 |
19,517 | 08/21/2008 09:23:56 | 4,367 | 08/21/2008 09:23:55 | 1 | 0 | Is anybody using the Specter BDD Framework? | I was reading the example chapter from [the book by Ayende][1] and on the website of [the Boo language][2] I saw a reference to the [Specter BDD Framework][3].
I am wondering if anybody is using it in their project, how that works out and if there are more examples and/or suggested readings.
Just in case you are wondering, I'm a C# developer and so I plan to use it in a C#/.NET environment.
[1]: http://www.manning.com/rahien/
[2]: http://boo.codehaus.org/
[3]: http://specter.sourceforge.net/ | c# | .net | boo | bdd | null | null | open | Is anybody using the Specter BDD Framework?
===
I was reading the example chapter from [the book by Ayende][1] and on the website of [the Boo language][2] I saw a reference to the [Specter BDD Framework][3].
I am wondering if anybody is using it in their project, how that works out and if there are more examples and/or suggested readings.
Just in case you are wondering, I'm a C# developer and so I plan to use it in a C#/.NET environment.
[1]: http://www.manning.com/rahien/
[2]: http://boo.codehaus.org/
[3]: http://specter.sourceforge.net/ | 0 |
19,519 | 08/21/2008 09:25:33 | 834 | 08/09/2008 07:29:24 | 91 | 10 | Do you use virtualized desktops for legacy/seldom used applications? | I wondered if anyone uses virtualized desktop PCs (running WinXP Pro or older) to have some old applications that are seldom used available for some ongoing tasks.
Say you have a really old project that every once in a while needs a document update in a database system or something like that. The database application is running on a virtualized desktop that is only started when needed.
I think we could save energy, hardware and space if we would virtualize some of those old boxes. Any setups in your company? | virtualization | legacy | desktop | null | null | null | open | Do you use virtualized desktops for legacy/seldom used applications?
===
I wondered if anyone uses virtualized desktop PCs (running WinXP Pro or older) to have some old applications that are seldom used available for some ongoing tasks.
Say you have a really old project that every once in a while needs a document update in a database system or something like that. The database application is running on a virtualized desktop that is only started when needed.
I think we could save energy, hardware and space if we would virtualize some of those old boxes. Any setups in your company? | 0 |
19,551 | 08/21/2008 09:53:59 | 1,007 | 08/11/2008 12:50:43 | 140 | 7 | How to plan your learning process efficiently? | I wonder is there a good strategy to use when you're about to start learning completely new stuff.
For example, you want to learn LISP and you know nothing about functional programming and you've been always working with imperative languages, or you want to learn Aspect-Oriented programming and have no clue what's all about.
There are usually plenty of books and tutorials on the subject but you aren't sure there most of them are of any good.
So, how should you plan your learning process in order to get on the right track or to realize that isn't the right thing for you without wasting much time? Or how to grasp the essential concepts of a new technology?
I'm pretty sure there are lot of people who would change the way they learned their first programming language.
There are some questions which look like this one ([1][1],[2][2],[3][3]), but I think I'm trying to ask more general question here.
[1]: http://stackoverflow.com/questions/19347/what-is-the-best-way-to-go-from-javac-to-c
[2]: http://stackoverflow.com/questions/14599/aspnet-model-view-controller-mvc-where-do-i-start-from
[3]: http://stackoverflow.com/questions/1576/what-should-a-longtime-windows-user-know-when-starting-to-use-linux
| self-improvement | null | null | null | null | 03/01/2012 19:48:18 | not constructive | How to plan your learning process efficiently?
===
I wonder is there a good strategy to use when you're about to start learning completely new stuff.
For example, you want to learn LISP and you know nothing about functional programming and you've been always working with imperative languages, or you want to learn Aspect-Oriented programming and have no clue what's all about.
There are usually plenty of books and tutorials on the subject but you aren't sure there most of them are of any good.
So, how should you plan your learning process in order to get on the right track or to realize that isn't the right thing for you without wasting much time? Or how to grasp the essential concepts of a new technology?
I'm pretty sure there are lot of people who would change the way they learned their first programming language.
There are some questions which look like this one ([1][1],[2][2],[3][3]), but I think I'm trying to ask more general question here.
[1]: http://stackoverflow.com/questions/19347/what-is-the-best-way-to-go-from-javac-to-c
[2]: http://stackoverflow.com/questions/14599/aspnet-model-view-controller-mvc-where-do-i-start-from
[3]: http://stackoverflow.com/questions/1576/what-should-a-longtime-windows-user-know-when-starting-to-use-linux
| 4 |
19,553 | 08/21/2008 09:57:26 | 1,163 | 08/13/2008 07:44:23 | 1 | 1 | obligatorily function call | I have a "Status" class in C#, used like this:
Status MyFunction()
{
if(...) // something bad
return new Status(false, "Something went wrong")
else
return new Status(true, "OK");
}
You get the idea.
All callers of MyFunction *should* check the returned Status:
Status myStatus = MyFunction();
if ( ! myStatus.IsOK() )
// handle it, show a message,...
Lazy callers however can ignore the Status.
MyFunction(); // call function and ignore returned Status
or
{
Status myStatus = MyFunction();
} // loose all references to myStatus, without calling IsOK() on it
Is it possible to make this impossible? e.g. an throw exception
**In general**: is it possible to write a C# class on which you *have* to call a certain function?
In the C++ version of the Status class, I can write a test on some private bool bIsChecked in the *destructor* and ring some bells when someone doesn't check this instance.
What is the equivalent option in C#?
I read somewhere that "You don't want a destructor in your C# class"
Is the Dispose method of the IDisposable interface an option?
In this case there are no unmanaged resources to free.
Additionally, it is not determined *when* the GC will dispose the object.
When it eventually gets disposed, is it still possible to know where and when you ignored that specific Status instance?
The "using" keyword does help, but again, it is not *required* for lazy callers.
Thanks in advance!
Jan | c# | dispose | destructor | gc | null | null | open | obligatorily function call
===
I have a "Status" class in C#, used like this:
Status MyFunction()
{
if(...) // something bad
return new Status(false, "Something went wrong")
else
return new Status(true, "OK");
}
You get the idea.
All callers of MyFunction *should* check the returned Status:
Status myStatus = MyFunction();
if ( ! myStatus.IsOK() )
// handle it, show a message,...
Lazy callers however can ignore the Status.
MyFunction(); // call function and ignore returned Status
or
{
Status myStatus = MyFunction();
} // loose all references to myStatus, without calling IsOK() on it
Is it possible to make this impossible? e.g. an throw exception
**In general**: is it possible to write a C# class on which you *have* to call a certain function?
In the C++ version of the Status class, I can write a test on some private bool bIsChecked in the *destructor* and ring some bells when someone doesn't check this instance.
What is the equivalent option in C#?
I read somewhere that "You don't want a destructor in your C# class"
Is the Dispose method of the IDisposable interface an option?
In this case there are no unmanaged resources to free.
Additionally, it is not determined *when* the GC will dispose the object.
When it eventually gets disposed, is it still possible to know where and when you ignored that specific Status instance?
The "using" keyword does help, but again, it is not *required* for lazy callers.
Thanks in advance!
Jan | 0 |
19,589 | 08/21/2008 10:27:59 | 1,297 | 08/14/2008 12:51:22 | 106 | 16 | Loading System.ServiceModel configuration section using ConfigurationManager | Using C# .NET 3.5 and WCF, I'm trying to write out some of the WCF configuration in a client application (the name of the server the client is connecting to).
The obvious way is to use ConfigurationManager to load the configuration section and write out the data I need.
var serviceModelSection = ConfigurationManager.GetSection("system.serviceModel");
Appears to always return null.
var serviceModelSection = ConfigurationManager.GetSection("appSettings");
Works perfectly.
The configuration section is present in the App.config but for some reason ConfigurationManager refuses to load the system.ServiceModel section.
I want to avoid manually loading the xxx.exe.config file and using XPath but if I have to resort to that I will. Just seems like a bit of a hack.
Any suggestions? | c# | .net | xml | wcf | configurationmanager | null | open | Loading System.ServiceModel configuration section using ConfigurationManager
===
Using C# .NET 3.5 and WCF, I'm trying to write out some of the WCF configuration in a client application (the name of the server the client is connecting to).
The obvious way is to use ConfigurationManager to load the configuration section and write out the data I need.
var serviceModelSection = ConfigurationManager.GetSection("system.serviceModel");
Appears to always return null.
var serviceModelSection = ConfigurationManager.GetSection("appSettings");
Works perfectly.
The configuration section is present in the App.config but for some reason ConfigurationManager refuses to load the system.ServiceModel section.
I want to avoid manually loading the xxx.exe.config file and using XPath but if I have to resort to that I will. Just seems like a bit of a hack.
Any suggestions? | 0 |
19,604 | 08/21/2008 10:53:54 | 1,929 | 08/19/2008 14:25:01 | 1 | 0 | Best TinyMce editor Image Manager / File upload for Asp.net Mvc | What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones?
I'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight and more jquery friendly).
Sadly TinyMce doesn't come with the Image Manager or Document Manager integrated like FCKeditor but you must buy them as plugins form Moxiecode.
I've looked other plugins but till now I've not find any decend and light solution that works with asp.net mvc framework.
Any suggestions?
| asp.net | asp.net-mvc | .net-2.0 | null | null | null | open | Best TinyMce editor Image Manager / File upload for Asp.net Mvc
===
What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones?
I'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight and more jquery friendly).
Sadly TinyMce doesn't come with the Image Manager or Document Manager integrated like FCKeditor but you must buy them as plugins form Moxiecode.
I've looked other plugins but till now I've not find any decend and light solution that works with asp.net mvc framework.
Any suggestions?
| 0 |
19,611 | 08/21/2008 10:58:40 | 1,630 | 08/17/2008 17:03:19 | 430 | 41 | How to patch on Windows? | Given a [patch][1] file, what's the easiest way to apply this patch on the source files under Windows?
[1]: http://en.wikipedia.org/wiki/Patch_(Unix) | windows | patch | null | null | null | null | open | How to patch on Windows?
===
Given a [patch][1] file, what's the easiest way to apply this patch on the source files under Windows?
[1]: http://en.wikipedia.org/wiki/Patch_(Unix) | 0 |
19,642 | 08/21/2008 11:42:41 | 1,075 | 08/12/2008 10:13:30 | 520 | 45 | Suggested gaming platform to learn - Direct X (C++), Open GL or XNA | My nephew is an aspiring game developer. I have taught him a bit of C/C++, and suggested he learn that for a start.
Once he has come to grips with that, which game/graphics API's do people suggest he learn?
I would think DirectX would be current industry standard, but with more games looking to go X-platform then maybe Open-GL would be a good starting point?
I have briefly looked at XNA, maybe that would be a nice easy step to take before jumping to a more complex framework?
| gamedevelopment | directx | xna | opengl | null | 07/03/2012 13:28:10 | not constructive | Suggested gaming platform to learn - Direct X (C++), Open GL or XNA
===
My nephew is an aspiring game developer. I have taught him a bit of C/C++, and suggested he learn that for a start.
Once he has come to grips with that, which game/graphics API's do people suggest he learn?
I would think DirectX would be current industry standard, but with more games looking to go X-platform then maybe Open-GL would be a good starting point?
I have briefly looked at XNA, maybe that would be a nice easy step to take before jumping to a more complex framework?
| 4 |
19,653 | 08/21/2008 11:47:11 | 33 | 08/01/2008 12:32:10 | 408 | 30 | Is Visual C++ memory managed by the Dot Net framework | I have recently had the [issue accessing MAPI through the dot net framework][1] receiving the memory access violation errors.
To get around this I deceied to use this [code project dll][2] to get around this issue but still have the problems highlighted.
I have never used visual C++ myself however one thought is that the C++ core is compiled in visual studio 2005 using visual C++ and this may suffer the same issues if the memory is managed by the framework.
Does anyone know if this is the case?
[1]: http://blogs.msdn.com/mstehle/archive/2007/10/03/fyi-why-are-mapi-and-cdo-1-21-not-supported-in-managed-net-code.aspx
[2]: http://www.codeproject.com/KB/IP/CMapiEx.aspx | .net | memory | visual-c++ | null | null | null | open | Is Visual C++ memory managed by the Dot Net framework
===
I have recently had the [issue accessing MAPI through the dot net framework][1] receiving the memory access violation errors.
To get around this I deceied to use this [code project dll][2] to get around this issue but still have the problems highlighted.
I have never used visual C++ myself however one thought is that the C++ core is compiled in visual studio 2005 using visual C++ and this may suffer the same issues if the memory is managed by the framework.
Does anyone know if this is the case?
[1]: http://blogs.msdn.com/mstehle/archive/2007/10/03/fyi-why-are-mapi-and-cdo-1-21-not-supported-in-managed-net-code.aspx
[2]: http://www.codeproject.com/KB/IP/CMapiEx.aspx | 0 |
19,654 | 08/21/2008 11:48:03 | 1,951 | 08/19/2008 15:06:09 | 362 | 23 | Introducing Python | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | php | python | languages | null | null | null | open | Introducing Python
===
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | 0 |
19,656 | 08/21/2008 11:49:08 | 2,260 | 08/21/2008 11:39:22 | 1 | 0 | How to find an implementation of a C# interface in the current assembly with a specific name? | I have an Interface called <code>IStep</code> that can do some computation (See "Execution in the Kingdom of Nouns"). At runtime, I want to select the appropriate implementation by class name.
<pre>
// use like this:
IStep step = GetStep(sName);
</pre> | c# | linq | reflection | linq-to-objects | null | null | open | How to find an implementation of a C# interface in the current assembly with a specific name?
===
I have an Interface called <code>IStep</code> that can do some computation (See "Execution in the Kingdom of Nouns"). At runtime, I want to select the appropriate implementation by class name.
<pre>
// use like this:
IStep step = GetStep(sName);
</pre> | 0 |
19,708 | 08/21/2008 12:22:44 | 497 | 08/06/2008 11:31:57 | 1 | 2 | Fast(er) way to get file inode using PHP | To grab the inode of a file in PHP, you can use this:
$fs = stat($file);
echo $fs['ino'];
The problem with this is EVERYWHERE says it's slow and you should avoid it. So the question becomes what's the fast(er) way to do it? | php | inode | null | null | null | null | open | Fast(er) way to get file inode using PHP
===
To grab the inode of a file in PHP, you can use this:
$fs = stat($file);
echo $fs['ino'];
The problem with this is EVERYWHERE says it's slow and you should avoid it. So the question becomes what's the fast(er) way to do it? | 0 |
19,709 | 08/21/2008 12:22:45 | 1,895 | 08/19/2008 07:17:07 | 6 | 4 | If email is not the answer then what is? | In my office email is one of the primary means of communication. Developers are spread around the world, so you can't always meet up and time differences mean that phone/VOIP is not always practical.
I find email hard to manage. You end up with hundreds/thousands of emails in various threads. You get CC'ed on stuff that is of marginal interest to you. Some emails have a useful lifespan on minutes or hours, but you still have to manually delete them.
I'm stuck with Outlook, but gain some benefit from:
1. Arrange by Conversation. So I can easily see if someone has already replied. I often just delete the earlier messages if I can assume that their content will be duplicated in the later ones. One problem is that my own replies will be in my Sent Items
2. Google Desktop Search. Infinitely quicker than Outlook's
So what are the alternatives for office communication?
1. IM - Great for ephemeral info and you can tell if the recipient is around. But not generally archived.
2. Twitter/Identi.ca microblogging - Could be used to track history of group communications if you can work around confidentiality and message length
3. Wiki - I like wikis, but getting people to use them can be hard and no good for instant response. A better place for reference information than directly in emails
Something like Gmail/Gtalk with its searchable archive would be an improvement on what we have, but I don't know how this could integrate with 'standards' like Outlook.
This has been a stream of consciousness question inspired by
[Zen Habits]<http://zenhabits.net/2008/08/12-new-rules-of-working-you-should-embrace-today/>. | email | productivity | null | null | null | 09/04/2011 05:24:51 | off topic | If email is not the answer then what is?
===
In my office email is one of the primary means of communication. Developers are spread around the world, so you can't always meet up and time differences mean that phone/VOIP is not always practical.
I find email hard to manage. You end up with hundreds/thousands of emails in various threads. You get CC'ed on stuff that is of marginal interest to you. Some emails have a useful lifespan on minutes or hours, but you still have to manually delete them.
I'm stuck with Outlook, but gain some benefit from:
1. Arrange by Conversation. So I can easily see if someone has already replied. I often just delete the earlier messages if I can assume that their content will be duplicated in the later ones. One problem is that my own replies will be in my Sent Items
2. Google Desktop Search. Infinitely quicker than Outlook's
So what are the alternatives for office communication?
1. IM - Great for ephemeral info and you can tell if the recipient is around. But not generally archived.
2. Twitter/Identi.ca microblogging - Could be used to track history of group communications if you can work around confidentiality and message length
3. Wiki - I like wikis, but getting people to use them can be hard and no good for instant response. A better place for reference information than directly in emails
Something like Gmail/Gtalk with its searchable archive would be an improvement on what we have, but I don't know how this could integrate with 'standards' like Outlook.
This has been a stream of consciousness question inspired by
[Zen Habits]<http://zenhabits.net/2008/08/12-new-rules-of-working-you-should-embrace-today/>. | 2 |
19,713 | 08/21/2008 12:24:23 | 1,228 | 08/13/2008 13:58:55 | 616 | 39 | Interlocked.Exchange, but not for booleans? | Is there an equivalent for Interlocked.Exchange for boolean? i.e., an atomic exchange of values that returns the previous value and doesn't require locks? | .net | multithreading | null | null | null | null | open | Interlocked.Exchange, but not for booleans?
===
Is there an equivalent for Interlocked.Exchange for boolean? i.e., an atomic exchange of values that returns the previous value and doesn't require locks? | 0 |
19,721 | 08/21/2008 12:28:47 | 2,086 | 08/20/2008 10:43:39 | 16 | 2 | How do I secure my new web server (Server 2008)? | I've just put my new server up on an IP address with a domain pointing to it. I need to be able to remote admin it. I've opened the firewall for Remote Desktop and HTTP traffic. Is this going to be secure enough? I guess I should probably rename the administrator user... | security | null | null | null | null | null | open | How do I secure my new web server (Server 2008)?
===
I've just put my new server up on an IP address with a domain pointing to it. I need to be able to remote admin it. I've opened the firewall for Remote Desktop and HTTP traffic. Is this going to be secure enough? I guess I should probably rename the administrator user... | 0 |
19,725 | 08/21/2008 12:30:49 | 2,266 | 08/21/2008 12:17:35 | 1 | 0 | How do I unregister COM dlls initially added with RegSvr32 when the /u arg doesn't work? | Right, initially ran:
c:\regsvr32 Amazing.dll
then, (accidentally - I might add) I must have run it again, and (indeed) again when new versions of 'Amazing.dll' were released. Yes - I know *now* I should've run:
c:\regsvr32 /u Amazing.dll
beforehand - but hey! I forgot.
To cut to the chase, when add the COM reference in VS, I can see 3 instances of 'Amazing' all pointing to the same location (c:\Amazing.dll), running regsvr32 /u removes one of the references, the second time - does nothing...
How do I get rid of these references?
Am I looking at a regedit scenario? - If so - what *exactly* happens if I delete one of the keys???
Cheers
Chris | regsvr32 | com | visualstudioreferences | null | null | null | open | How do I unregister COM dlls initially added with RegSvr32 when the /u arg doesn't work?
===
Right, initially ran:
c:\regsvr32 Amazing.dll
then, (accidentally - I might add) I must have run it again, and (indeed) again when new versions of 'Amazing.dll' were released. Yes - I know *now* I should've run:
c:\regsvr32 /u Amazing.dll
beforehand - but hey! I forgot.
To cut to the chase, when add the COM reference in VS, I can see 3 instances of 'Amazing' all pointing to the same location (c:\Amazing.dll), running regsvr32 /u removes one of the references, the second time - does nothing...
How do I get rid of these references?
Am I looking at a regedit scenario? - If so - what *exactly* happens if I delete one of the keys???
Cheers
Chris | 0 |
19,728 | 08/21/2008 12:31:54 | 1,683 | 08/18/2008 00:30:32 | 45 | 6 | What is the best strategy for retainment of large data sets? | I'm leading a project where we'll be recording metrics data. I'd like to retain the data for years. However, I'd also like to keep the primary table from becoming bloated with data that, while necessary for long term trending, isn't required for short term reporting.
What is the best strategy for handling this situation? Simply archive the old data to another table? Or "roll it up" via some consolidation of the data itself (and then store it off to a different table)? Or something else entirely?
Thanks. | database-design | data | null | null | null | null | open | What is the best strategy for retainment of large data sets?
===
I'm leading a project where we'll be recording metrics data. I'd like to retain the data for years. However, I'd also like to keep the primary table from becoming bloated with data that, while necessary for long term trending, isn't required for short term reporting.
What is the best strategy for handling this situation? Simply archive the old data to another table? Or "roll it up" via some consolidation of the data itself (and then store it off to a different table)? Or something else entirely?
Thanks. | 0 |
19,744 | 08/21/2008 12:36:42 | 1,545 | 08/16/2008 14:28:42 | 134 | 19 | Trigger without a transaction? | Is it possible to create a Trigger that will not be in a transaction?
I want to update data on a linked server with a trigger but due to firewall issues we can't create a distributed transaction between the two servers. | sql-server | triggers | t-sql | null | null | null | open | Trigger without a transaction?
===
Is it possible to create a Trigger that will not be in a transaction?
I want to update data on a linked server with a trigger but due to firewall issues we can't create a distributed transaction between the two servers. | 0 |
19,746 | 08/21/2008 12:37:23 | 909 | 08/10/2008 09:56:57 | 61 | 8 | Views in seperate assemblies in ASP.NET MVC | I'm trying to create a webapplication where I want to be able to plug-in seperate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine.
If I want to use a view, I'm stuck on the ones that are defined in the core project, because of the dynamic compiling of the ASPX part. I'm looking for a proper way to enclose ASPX files in a different assembly, without having to go through the whole deployment step. Am I missing something obvious? Or should I resort to creating my views programmatically? | c# | mvc | plugins | null | null | null | open | Views in seperate assemblies in ASP.NET MVC
===
I'm trying to create a webapplication where I want to be able to plug-in seperate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine.
If I want to use a view, I'm stuck on the ones that are defined in the core project, because of the dynamic compiling of the ASPX part. I'm looking for a proper way to enclose ASPX files in a different assembly, without having to go through the whole deployment step. Am I missing something obvious? Or should I resort to creating my views programmatically? | 0 |
19,756 | 08/21/2008 12:45:05 | 726 | 08/08/2008 12:04:53 | 249 | 14 | Suitable E-R notation for introductory DB design course? Good/free diagram tools? | I've taught a database design course for a few years now, starting off each time using the [Crow's Foot][1] diagram notation for our entity-relationship models. I can't believe anyone seriously uses the [Chen notation][2] (especially for attributes), and I don't find the [IDEF1X relationship symbols][3] intuitive at all, particularly for students new to the concepts of cardinality and participation.
Thanks to tools like [ERwin][4], I'm aware of the popularity of methodologies like IDEF1X, but has anyone found greater success with a different modelling notation in an educational setting?
And while we're at it, does anyone know of a good--preferably free and online--diagramming tool that supports these notations? [Gliffy][5] seems to have good support for Crow's Foot, and the free basic edition seems capable for an introductory course. Any others?
[1]: http://en.wikipedia.org/wiki/Entity-relationship_model#Crow.27s_Foot
[2]: http://en.wikipedia.org/wiki/Image:ER_Diagram_MMORPG.png
[3]: http://commons.wikimedia.org/wiki/Image:Data_model_in_IDEF1X.png
[4]: http://en.wikipedia.org/wiki/CA_ERwin_Data_Modeler
[5]: http://www.gliffy.com/ | database-design | diagram | entity-relationship | null | null | null | open | Suitable E-R notation for introductory DB design course? Good/free diagram tools?
===
I've taught a database design course for a few years now, starting off each time using the [Crow's Foot][1] diagram notation for our entity-relationship models. I can't believe anyone seriously uses the [Chen notation][2] (especially for attributes), and I don't find the [IDEF1X relationship symbols][3] intuitive at all, particularly for students new to the concepts of cardinality and participation.
Thanks to tools like [ERwin][4], I'm aware of the popularity of methodologies like IDEF1X, but has anyone found greater success with a different modelling notation in an educational setting?
And while we're at it, does anyone know of a good--preferably free and online--diagramming tool that supports these notations? [Gliffy][5] seems to have good support for Crow's Foot, and the free basic edition seems capable for an introductory course. Any others?
[1]: http://en.wikipedia.org/wiki/Entity-relationship_model#Crow.27s_Foot
[2]: http://en.wikipedia.org/wiki/Image:ER_Diagram_MMORPG.png
[3]: http://commons.wikimedia.org/wiki/Image:Data_model_in_IDEF1X.png
[4]: http://en.wikipedia.org/wiki/CA_ERwin_Data_Modeler
[5]: http://www.gliffy.com/ | 0 |
19,766 | 08/21/2008 12:49:12 | 1,827 | 08/18/2008 18:43:12 | 1 | 0 | How do I make a list with checkboxes in Java Swing? | What would be the best way to have a list of items with a checkbox each in Java Swing? I.e. a JList with items that have some text and a checkbox each? | java | swing | null | null | null | null | open | How do I make a list with checkboxes in Java Swing?
===
What would be the best way to have a list of items with a checkbox each in Java Swing? I.e. a JList with items that have some text and a checkbox each? | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.