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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
50,606 | 09/08/2008 20:36:45 | 2,535 | 08/22/2008 17:36:15 | 78 | 4 | Wordpress Category Template Question | I am looking at using a custom template for a set of categories. Is it possible to use a category template (like category-4.php) on a parent category and have the children use that template as well? | wordpress | templates | null | null | null | null | open | Wordpress Category Template Question
===
I am looking at using a custom template for a set of categories. Is it possible to use a category template (like category-4.php) on a parent category and have the children use that template as well? | 0 |
50,612 | 09/08/2008 20:39:24 | 4,530 | 09/04/2008 17:16:43 | 16 | 1 | Software Development Quality | Other than the number of bugs found, how do you measure software development quality? I'm looking for something on the positive side. | software-quality | null | null | null | null | null | open | Software Development Quality
===
Other than the number of bugs found, how do you measure software development quality? I'm looking for something on the positive side. | 0 |
50,618 | 09/08/2008 20:41:49 | 5,278 | 09/08/2008 20:41:49 | 1 | 0 | What is the point of the finally block? | Syntax aside, what is the difference between
try {
}
catch() {
}
finally {
x = 3;
}
and
try {
}
catch() {
}
x = 3;
| finally | null | null | null | null | null | open | What is the point of the finally block?
===
Syntax aside, what is the difference between
try {
}
catch() {
}
finally {
x = 3;
}
and
try {
}
catch() {
}
x = 3;
| 0 |
50,650 | 09/08/2008 20:51:46 | 3,315 | 08/27/2008 20:06:25 | 23 | 2 | How to convice a project sponsor that all fuctions in your code should have unit tests | Non technical people in most cases do not see any value in writing unit tests. They just want to have basic code completed and do not spend money and time on such things like unit tests. Later, every day they just to ask to fix a one bug more. Projects are missing deadlines and they still don't see value in good automated tests. | unit-testing | project-management | null | null | null | null | open | How to convice a project sponsor that all fuctions in your code should have unit tests
===
Non technical people in most cases do not see any value in writing unit tests. They just want to have basic code completed and do not spend money and time on such things like unit tests. Later, every day they just to ask to fix a one bug more. Projects are missing deadlines and they still don't see value in good automated tests. | 0 |
50,684 | 09/08/2008 21:03:47 | 2,191 | 08/20/2008 20:39:36 | 189 | 6 | Other ways to encrypt WCF Connections | I'm currently working on a project that requires encrypted data be passed between WCF hosts. As I understand it there are only 2 ways to ensure that data passed over WCF is secure.
1. Using Certificates
2. Using a Domain (or having the same username and password on every machine on the network)
Using certificates can be expensive and complicated to manage and since we're not guaranteed to have a server class machine at every deployment a Domain is also out of the question. Having every machine use the same username and password is also problematic if that password ever needs to be changed.
Currently we use OpenSSH to tunnel our connections between hosts. Is there another option built into the framework that I'm unaware of? | c# | security | wcf | null | null | null | open | Other ways to encrypt WCF Connections
===
I'm currently working on a project that requires encrypted data be passed between WCF hosts. As I understand it there are only 2 ways to ensure that data passed over WCF is secure.
1. Using Certificates
2. Using a Domain (or having the same username and password on every machine on the network)
Using certificates can be expensive and complicated to manage and since we're not guaranteed to have a server class machine at every deployment a Domain is also out of the question. Having every machine use the same username and password is also problematic if that password ever needs to be changed.
Currently we use OpenSSH to tunnel our connections between hosts. Is there another option built into the framework that I'm unaware of? | 0 |
50,702 | 09/08/2008 21:10:49 | 1,215 | 08/13/2008 13:32:36 | 83 | 15 | linq - how do you do a query for items in one query source that are not in another one? | If I have 2 query sources how do I find ones that are in one that are not in the other?
example of join to find items in both:
var results = from item1 in qs1.Items
join item2 in qs2 on item1.field1 equals item2.field2
select item1;
So what would the linq code be to return the items in qs1 that are not in qs2? | linq | null | null | null | null | null | open | linq - how do you do a query for items in one query source that are not in another one?
===
If I have 2 query sources how do I find ones that are in one that are not in the other?
example of join to find items in both:
var results = from item1 in qs1.Items
join item2 in qs2 on item1.field1 equals item2.field2
select item1;
So what would the linq code be to return the items in qs1 that are not in qs2? | 0 |
50,704 | 09/08/2008 21:11:10 | 483 | 08/06/2008 08:54:52 | 259 | 19 | What is a good way to format logs? | I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc).
I'm would like to format my logs to store the text with formatting, date/time and potentially other meta data later. My first thoughts was all XML but this could impact my ability to write a fast search tool later. My current idea is Date/Time + text in one file with meta-data stored in another XML file, referenced by line number.
Is this a good solution? Also, where and how should I store the formatting commands? The original ANSI tags would disrupt the plain but having them in two different files might be awkward. | c# | logging | parsing | null | null | null | open | What is a good way to format logs?
===
I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc).
I'm would like to format my logs to store the text with formatting, date/time and potentially other meta data later. My first thoughts was all XML but this could impact my ability to write a fast search tool later. My current idea is Date/Time + text in one file with meta-data stored in another XML file, referenced by line number.
Is this a good solution? Also, where and how should I store the formatting commands? The original ANSI tags would disrupt the plain but having them in two different files might be awkward. | 0 |
50,707 | 09/08/2008 21:14:47 | 4,786 | 09/05/2008 15:29:10 | 34 | 1 | Which books are considered classics for .Net? | So Far I know CLR via C# is considered one
| .net | books | null | null | null | 09/25/2011 21:54:13 | not constructive | Which books are considered classics for .Net?
===
So Far I know CLR via C# is considered one
| 4 |
50,723 | 09/08/2008 21:22:57 | 5,196 | 09/08/2008 12:39:19 | 31 | 2 | Rss feed for game programmer? | I was browsing [this thread][1], which has good recommendation but a bit too general for me.
So, if anyone has a collection of nice game programming feeds,please share them. :)
(both general and specific topics are welcome)
[1]: http://stackoverflow.com/questions/5119/what-are-the-best-rss-feeds-for-programmersdevelopers | graphics | rss | ai | feeds | null | null | open | Rss feed for game programmer?
===
I was browsing [this thread][1], which has good recommendation but a bit too general for me.
So, if anyone has a collection of nice game programming feeds,please share them. :)
(both general and specific topics are welcome)
[1]: http://stackoverflow.com/questions/5119/what-are-the-best-rss-feeds-for-programmersdevelopers | 0 |
50,737 | 09/08/2008 21:29:38 | 5,056 | 09/07/2008 15:43:17 | 228 | 26 | Can I have TortoiseSVN auto-add files? | Is there a way to have TortoiseSVN (or any other tool) auto-add any new .cs files I create within a directory to my working copy so I don't have to remember which files I created at the end of the day? | tortoisesvn | subversion | null | null | null | null | open | Can I have TortoiseSVN auto-add files?
===
Is there a way to have TortoiseSVN (or any other tool) auto-add any new .cs files I create within a directory to my working copy so I don't have to remember which files I created at the end of the day? | 0 |
50,744 | 09/08/2008 21:33:09 | 5,548 | 09/10/2008 12:45:40 | 33 | 3 | Wait until file is unlocked in .Net | What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? EG: Is there a WaitOnFile() somewhere in the framework?
I have a service that uses a FileSystemWatcher to look for files that are to be transmitted to an FTP site, but the File Created event fires before the other process has finished writing the file.
The ideal solution would have a timeout period so the thread doesn't hang forever before giving up. | .net | .net-3.5 | file | null | null | null | open | Wait until file is unlocked in .Net
===
What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? EG: Is there a WaitOnFile() somewhere in the framework?
I have a service that uses a FileSystemWatcher to look for files that are to be transmitted to an FTP site, but the File Created event fires before the other process has finished writing the file.
The ideal solution would have a timeout period so the thread doesn't hang forever before giving up. | 0 |
50,746 | 09/08/2008 21:34:10 | 5,289 | 09/08/2008 21:34:09 | 1 | 0 | Visual Studio 2008 "randomly" hangs on test run | We are using VS 2008 Team System with the automated test suite, and upon running tests the test host "randomly" locks up. I actually have to kill the VSTestHost process and re-run the tests to get something to happen, otherwise all tests sit in a "pending" state.
Has anyone experience similar behavior and know of a fix? We have 3 developers here experiencing the same behavior. | visual-studio | null | null | null | null | null | open | Visual Studio 2008 "randomly" hangs on test run
===
We are using VS 2008 Team System with the automated test suite, and upon running tests the test host "randomly" locks up. I actually have to kill the VSTestHost process and re-run the tests to get something to happen, otherwise all tests sit in a "pending" state.
Has anyone experience similar behavior and know of a fix? We have 3 developers here experiencing the same behavior. | 0 |
50,747 | 09/08/2008 21:34:16 | 91 | 08/01/2008 17:55:22 | 6,211 | 253 | Response.StatusCode and Internet Explorer - Display custom message? | I am implementing a HttpRequestValidationException in my Application_Error Handler, and if possible, I want to display a custom message.
Now, I'm thinking about the StatusCode. In my current example, it sends a 200, which I think should not be done. I would like to send the (IMHO) more appropriate 400 Bad Request instead. However, at the same time, I would like to use Response.Write to enter a custom message. Firefox displays it properly, but IE7 gives me the Default unhelpful Internet Explorer Error Page.
On one side, I guess that Internet Explorer just assumes that everything <> 200 is simply not having any "good" content, and the [RFC is not really clear][1] here.
So I just wonder, is sending a HTTP 200 for an Error Page caused by a HttpRequestValidationException good practice or not? Are there good alternatives?
[1]: http://tools.ietf.org/html/rfc2616#section-10.4.1 | asp.net | http | internet-explorer-7 | null | null | null | open | Response.StatusCode and Internet Explorer - Display custom message?
===
I am implementing a HttpRequestValidationException in my Application_Error Handler, and if possible, I want to display a custom message.
Now, I'm thinking about the StatusCode. In my current example, it sends a 200, which I think should not be done. I would like to send the (IMHO) more appropriate 400 Bad Request instead. However, at the same time, I would like to use Response.Write to enter a custom message. Firefox displays it properly, but IE7 gives me the Default unhelpful Internet Explorer Error Page.
On one side, I guess that Internet Explorer just assumes that everything <> 200 is simply not having any "good" content, and the [RFC is not really clear][1] here.
So I just wonder, is sending a HTTP 200 for an Error Page caused by a HttpRequestValidationException good practice or not? Are there good alternatives?
[1]: http://tools.ietf.org/html/rfc2616#section-10.4.1 | 0 |
9,617,531 | 03/08/2012 12:16:36 | 1,256,955 | 03/08/2012 12:03:39 | 1 | 0 | MySQL LineString intersections with Linestring or Polygon | I have a problem with mySQL spatial functions. My target is to find out if a LINESTRING object is passing through a POLYGON object or not. To determine that I've tried to experiment with two LINESTRING objects to determine if they cross or not.
SET @ls='LINESTRING (0 0, 1 1, 2 2, 3 3)'; -- original linestring
SET @lp='LINESTRING (0 1, 1 2, 2 3, 3 4)'; -- parallel linestring
SET @lx='LINESTRING (0 3, 1 2, 2 1, 3 0)'; -- crossed linestring
i've tried several functions to reach my goal:
SELECT crosses(GeomFromText(@ls), GeomFromText(@lx)); -- crossing linestrings
returns 0;
SELECT intersects(GeomFromText(@ls), GeomFromText(@lp)); -- parallel linestrings
returns 1;
SELECT overlaps(GeomFromText(@ls), GeomFromText(@lp)); -- parallel linestrings
returns 1;
I understand that it is the question of boundary comparison or sth but is there a way (or a function, or a simple solution) how to reach my goal? Other possibility would be to check if a POINT in LINESTRING is within a POLYGON but I was wondering if there's another way to do this?
solution provided in http://stackoverflow.com/questions/4604430/mysql-great-circle-intersection-do-two-roads-cross doesn't help me unfortunately..
| php | mysql | polygon | spatial | null | null | open | MySQL LineString intersections with Linestring or Polygon
===
I have a problem with mySQL spatial functions. My target is to find out if a LINESTRING object is passing through a POLYGON object or not. To determine that I've tried to experiment with two LINESTRING objects to determine if they cross or not.
SET @ls='LINESTRING (0 0, 1 1, 2 2, 3 3)'; -- original linestring
SET @lp='LINESTRING (0 1, 1 2, 2 3, 3 4)'; -- parallel linestring
SET @lx='LINESTRING (0 3, 1 2, 2 1, 3 0)'; -- crossed linestring
i've tried several functions to reach my goal:
SELECT crosses(GeomFromText(@ls), GeomFromText(@lx)); -- crossing linestrings
returns 0;
SELECT intersects(GeomFromText(@ls), GeomFromText(@lp)); -- parallel linestrings
returns 1;
SELECT overlaps(GeomFromText(@ls), GeomFromText(@lp)); -- parallel linestrings
returns 1;
I understand that it is the question of boundary comparison or sth but is there a way (or a function, or a simple solution) how to reach my goal? Other possibility would be to check if a POINT in LINESTRING is within a POLYGON but I was wondering if there's another way to do this?
solution provided in http://stackoverflow.com/questions/4604430/mysql-great-circle-intersection-do-two-roads-cross doesn't help me unfortunately..
| 0 |
9,617,533 | 03/08/2012 12:16:53 | 801,773 | 06/16/2011 15:24:04 | 415 | 9 | Wordpress Term exist not having desired effect | I'm struggling to get this to work.
Basically, I'm running a WP query to retrieve multiple posts from my custom post-type.
In the loop, I want to conditionally echo stuff, depending on what term is assigned to that post.
I've created a taxonomy called 'file-types' and have assigned this to my custom post type.
As I understand terms, terms are like the children of taxonomy. "Not literally"
-------------
My problem, my PHP below just seems to echo the last condition, which is nothing.
And I've 100% assigned these terms to my posts.
The only thing I have not tried is changing 'term_taxonomy' to a 'term_taxonomy_id' - but I cannot for the life of me find out how to find the ID of my taxonomy.
<br />
Can any one help me understand why nothing is being echo'ed? Many Thanks
<br />
<br />
<?php
if (term_exists(array(
'term_id' => 4,
'term_taxonomy' => 'file-formats'
))) {
echo 'PDF' ;
}
else if (term_exists(array(
'term_id' => 6,
'term_taxonomy' => 'file-formats'
))) {
echo 'PPT' ;
}
else if (term_exists(array(
'term_id' => 5,
'term_taxonomy' => 'file-formats'
))) {
echo 'MOV' ;
}
else {
echo '' ;
}
?>
| wordpress | taxonomy | term | null | null | null | open | Wordpress Term exist not having desired effect
===
I'm struggling to get this to work.
Basically, I'm running a WP query to retrieve multiple posts from my custom post-type.
In the loop, I want to conditionally echo stuff, depending on what term is assigned to that post.
I've created a taxonomy called 'file-types' and have assigned this to my custom post type.
As I understand terms, terms are like the children of taxonomy. "Not literally"
-------------
My problem, my PHP below just seems to echo the last condition, which is nothing.
And I've 100% assigned these terms to my posts.
The only thing I have not tried is changing 'term_taxonomy' to a 'term_taxonomy_id' - but I cannot for the life of me find out how to find the ID of my taxonomy.
<br />
Can any one help me understand why nothing is being echo'ed? Many Thanks
<br />
<br />
<?php
if (term_exists(array(
'term_id' => 4,
'term_taxonomy' => 'file-formats'
))) {
echo 'PDF' ;
}
else if (term_exists(array(
'term_id' => 6,
'term_taxonomy' => 'file-formats'
))) {
echo 'PPT' ;
}
else if (term_exists(array(
'term_id' => 5,
'term_taxonomy' => 'file-formats'
))) {
echo 'MOV' ;
}
else {
echo '' ;
}
?>
| 0 |
9,617,521 | 03/08/2012 12:15:35 | 614,208 | 02/12/2011 12:56:02 | 582 | 33 | Difference in between mysql_num_rows and mysql_affected_rows | I want to know what is the difference in between `mysql_num_rows` and `mysql_affected_rows`.How to know when it should use.Any help and suggestions will be highly appreciable.Examples are most welcome. | mysql | mysqldump | null | null | null | null | open | Difference in between mysql_num_rows and mysql_affected_rows
===
I want to know what is the difference in between `mysql_num_rows` and `mysql_affected_rows`.How to know when it should use.Any help and suggestions will be highly appreciable.Examples are most welcome. | 0 |
9,617,538 | 03/08/2012 12:17:05 | 658,011 | 03/13/2011 23:21:41 | 978 | 49 | Preload layout with Ruby on Rails | My application has to do a rather time-consuming operation only on the first 'show' action of the page.
I have a certain layout in `app/views/layouts/application.html.erb` that I would like to show from the very first second, so that a spinner alongside with an informative message would be inside this layout, letting the user know that the operation will take some time to finish. After this operation is finished, I would like to substitute this message by the real content, if possible changing this via AJAX, but I would not mind to just refresh the page for the time being.
I have this in my show action, the costly process is 'load_suggestions' (around 5sec).
respond_to do |format|
format.html do
if @issue.suggestions == []
load_suggestions
end
end
format.xml { render :xml => @issue }
format.js
end
I believe that this post - http://stackoverflow.com/questions/4831755/show-loading-screen-while-performing-task-in-rails-3 - has some rather interesting information for what I try to accomplish. Basically I would include this javascript function in `views/issues/show.js.erb`. Problem is that if I include it there, it would get called every single time, and that is not what I intend it to do.
Any suggestions, clues, guidance?
| jquery | ruby-on-rails | ajax | partial | null | null | open | Preload layout with Ruby on Rails
===
My application has to do a rather time-consuming operation only on the first 'show' action of the page.
I have a certain layout in `app/views/layouts/application.html.erb` that I would like to show from the very first second, so that a spinner alongside with an informative message would be inside this layout, letting the user know that the operation will take some time to finish. After this operation is finished, I would like to substitute this message by the real content, if possible changing this via AJAX, but I would not mind to just refresh the page for the time being.
I have this in my show action, the costly process is 'load_suggestions' (around 5sec).
respond_to do |format|
format.html do
if @issue.suggestions == []
load_suggestions
end
end
format.xml { render :xml => @issue }
format.js
end
I believe that this post - http://stackoverflow.com/questions/4831755/show-loading-screen-while-performing-task-in-rails-3 - has some rather interesting information for what I try to accomplish. Basically I would include this javascript function in `views/issues/show.js.erb`. Problem is that if I include it there, it would get called every single time, and that is not what I intend it to do.
Any suggestions, clues, guidance?
| 0 |
9,617,539 | 03/08/2012 12:17:12 | 1,256,874 | 03/08/2012 11:21:12 | 1 | 0 | get custom field value using Grocery CRUD CodeIgniter | How can i get value of a field from another table on my method? and of course i have the primary key of its table.
i want to do something in add/edit action like this
if(is_empty(value_field_from_another_table)){
$crud->edit_fields('first','second');
$crud->add_fields('first','second');
}else{
$crud->edit_fields('first');
$crud->add_fields('first');
}
| php | codeigniter | grocery-crud | null | null | null | open | get custom field value using Grocery CRUD CodeIgniter
===
How can i get value of a field from another table on my method? and of course i have the primary key of its table.
i want to do something in add/edit action like this
if(is_empty(value_field_from_another_table)){
$crud->edit_fields('first','second');
$crud->add_fields('first','second');
}else{
$crud->edit_fields('first');
$crud->add_fields('first');
}
| 0 |
9,617,543 | 03/08/2012 12:17:41 | 883,954 | 08/08/2011 11:26:47 | 56 | 9 | ios 5 uiwebview shadows | i'm trying to display pdf file in uiwebview. my pdf files have different size.
one can see the shadow or gradient outside of pdf in uiwebview.
i've tried different solution but with no luck. see the link.
how can i get rid of those shadows?
![uiwebview shadow][1]
[duplicate with answer, but not working for me][2]
the code accepted as aswer there:
webView.backgroundColor = [UIColor whiteColor];
for (UIView* subView in [webView subviews])
{
if ([subView isKindOfClass:[UIScrollView class]]) {
for (UIView* shadowView in [subView subviews])
{
if ([shadowView isKindOfClass:[UIImageView class]]) {
[shadowView setHidden:YES];
}
}
}
}
[1]: http://i.stack.imgur.com/vkDMy.png
[2]: http://stackoverflow.com/questions/3009063/remove-gradient-background-from-uiwebview | ios | pdf | ios5 | uiwebview | null | null | open | ios 5 uiwebview shadows
===
i'm trying to display pdf file in uiwebview. my pdf files have different size.
one can see the shadow or gradient outside of pdf in uiwebview.
i've tried different solution but with no luck. see the link.
how can i get rid of those shadows?
![uiwebview shadow][1]
[duplicate with answer, but not working for me][2]
the code accepted as aswer there:
webView.backgroundColor = [UIColor whiteColor];
for (UIView* subView in [webView subviews])
{
if ([subView isKindOfClass:[UIScrollView class]]) {
for (UIView* shadowView in [subView subviews])
{
if ([shadowView isKindOfClass:[UIImageView class]]) {
[shadowView setHidden:YES];
}
}
}
}
[1]: http://i.stack.imgur.com/vkDMy.png
[2]: http://stackoverflow.com/questions/3009063/remove-gradient-background-from-uiwebview | 0 |
9,617,545 | 03/08/2012 12:17:48 | 264,273 | 02/02/2010 11:25:23 | 961 | 42 | how can I untrack files in a branch that is not my current branch | I have 2 git branches 'Master' and 'Work'.
I had been working on my 'Work' Branch for a while. In work I untracked all my *.png files and added *.png to my gitignore.
The master branch is still tracking *.png.
Now I can't checkout my master branch because git is complaining that my untracked files would be over written by checkout.
I can't checkout my master branch and merge my work branch into it.
How can I tell my master branch to stop tracking *.png.
I know you usually use rm -r --cached to remove files but I only know how to do that from the current branch. | git | null | null | null | null | null | open | how can I untrack files in a branch that is not my current branch
===
I have 2 git branches 'Master' and 'Work'.
I had been working on my 'Work' Branch for a while. In work I untracked all my *.png files and added *.png to my gitignore.
The master branch is still tracking *.png.
Now I can't checkout my master branch because git is complaining that my untracked files would be over written by checkout.
I can't checkout my master branch and merge my work branch into it.
How can I tell my master branch to stop tracking *.png.
I know you usually use rm -r --cached to remove files but I only know how to do that from the current branch. | 0 |
9,617,546 | 03/08/2012 12:17:48 | 854,190 | 07/20/2011 14:51:30 | 6 | 1 | Distributed Map configured programmatically, is not visible on the other node in the cluster(checked through Hazelcast cmd prompt) | I started exploring hazelcast cache. On my laptop, i have 2 instances of hazelcast running.
One from my eclipse, and other from bin/run.bat
I did this from my eclipse sample program.
IMap t= Hazelcast.getMap("test");
test.put(3, "three");
Now, i went to the hazelcast prompt in the run.bat shell, and tried "test.entries". Its not listing any entries..
Can somebody please let me know What would have gone wrong!
Thanks | hazelcast | null | null | null | null | null | open | Distributed Map configured programmatically, is not visible on the other node in the cluster(checked through Hazelcast cmd prompt)
===
I started exploring hazelcast cache. On my laptop, i have 2 instances of hazelcast running.
One from my eclipse, and other from bin/run.bat
I did this from my eclipse sample program.
IMap t= Hazelcast.getMap("test");
test.put(3, "three");
Now, i went to the hazelcast prompt in the run.bat shell, and tried "test.entries". Its not listing any entries..
Can somebody please let me know What would have gone wrong!
Thanks | 0 |
9,617,548 | 03/08/2012 12:17:51 | 647,019 | 03/06/2011 15:00:59 | 3 | 0 | Is it possible to call other class instance within ability in CanCan? | The problem is I have two models - Project and Ticket (which belongs to project). I want to deny access to tickets creation upon Project expiration (i.e. I want user couldn't create new ticket for expired project).
How can I deny the creation of a ticket for user in CanCan Ability?
Something like
if user.role? :superuser
can :read, :all
can :create, Ticket do |ticket|
ticket.project.expired?
end
end
The problem is "project" method is not defined anywhere.
I would much appreciated some help. | ruby-on-rails | cancan | null | null | null | null | open | Is it possible to call other class instance within ability in CanCan?
===
The problem is I have two models - Project and Ticket (which belongs to project). I want to deny access to tickets creation upon Project expiration (i.e. I want user couldn't create new ticket for expired project).
How can I deny the creation of a ticket for user in CanCan Ability?
Something like
if user.role? :superuser
can :read, :all
can :create, Ticket do |ticket|
ticket.project.expired?
end
end
The problem is "project" method is not defined anywhere.
I would much appreciated some help. | 0 |
9,617,550 | 03/08/2012 12:18:04 | 863,441 | 07/26/2011 12:34:44 | 1 | 0 | Drupal / Rules: flagging multiple terms on user save | i almost have this working:
drupal 7: My intention is to have a Rule which flags multiple taxonomy terms on behalf of that user, when the user is created. The list of terms to be flagged is a (custom) term reference field on the user.
With the following settings, the rule is able to flag the first term in the list, but doesn't do anything with the rest:
EVENTS <br>
After saving a new user account<br>
CONDITIONS<br>
NOT User is blocked<br>
ACTIONS<br>
Flag a taxonomy_term<br>
<br>
the selector for the action is <em>account:field-termreference:0</em>, which is obviously the 1st term in the list, and as mentioned - this succeeds in flagging this one term. I tried adding a loop for the action with the selector <em>account:field-termreference</em>, but that didn't get it.
an clue what i'm missing here? thanks...
| drupal | rules | flags | null | null | null | open | Drupal / Rules: flagging multiple terms on user save
===
i almost have this working:
drupal 7: My intention is to have a Rule which flags multiple taxonomy terms on behalf of that user, when the user is created. The list of terms to be flagged is a (custom) term reference field on the user.
With the following settings, the rule is able to flag the first term in the list, but doesn't do anything with the rest:
EVENTS <br>
After saving a new user account<br>
CONDITIONS<br>
NOT User is blocked<br>
ACTIONS<br>
Flag a taxonomy_term<br>
<br>
the selector for the action is <em>account:field-termreference:0</em>, which is obviously the 1st term in the list, and as mentioned - this succeeds in flagging this one term. I tried adding a loop for the action with the selector <em>account:field-termreference</em>, but that didn't get it.
an clue what i'm missing here? thanks...
| 0 |
9,617,552 | 03/08/2012 12:18:09 | 1,061,173 | 11/23/2011 04:43:02 | 1 | 0 | How native process can communicate to chrome extension (lastpass do this) | I know that lastpass extension have a binary component to communicate passwords between browsers (to firefox and IE). What mechanisms can be utilized by chrome extension to communicate with other system processes? | google-chrome-extension | null | null | null | null | null | open | How native process can communicate to chrome extension (lastpass do this)
===
I know that lastpass extension have a binary component to communicate passwords between browsers (to firefox and IE). What mechanisms can be utilized by chrome extension to communicate with other system processes? | 0 |
9,617,553 | 03/08/2012 12:18:10 | 391,605 | 07/14/2010 13:22:02 | 319 | 23 | Excel VBA : Get hwnd value of a CommandButton | I'm going nuts here...
How do you find the "hwnd" value of a **CommandButton**, in an Excel 2007 Form ?
I've Googled, I've tried all kinds of suggestions (most of which suggest that a command button has a **.hwnd** member property - but it doesn't) and haven't found an answer.
I can get the *Form's* hwnd value, and (in theory) should be able to use a EnumChildWindows to find sub-windows, including my button, but this also doesn't work.
Has anyone managed to do this ? | excel | hwnd | null | null | null | null | open | Excel VBA : Get hwnd value of a CommandButton
===
I'm going nuts here...
How do you find the "hwnd" value of a **CommandButton**, in an Excel 2007 Form ?
I've Googled, I've tried all kinds of suggestions (most of which suggest that a command button has a **.hwnd** member property - but it doesn't) and haven't found an answer.
I can get the *Form's* hwnd value, and (in theory) should be able to use a EnumChildWindows to find sub-windows, including my button, but this also doesn't work.
Has anyone managed to do this ? | 0 |
50,762 | 09/08/2008 21:41:57 | 2,171 | 08/20/2008 18:04:57 | 63 | 2 | Windows Low Level Disk Question | I need to programmatically determine out how many sectors, heads, and cylinders are on a physical disk from Windows XP. Does anyone know the API for determining this? Where might Windows expose this information?
Thanks,
Terry | windows | harddrive | null | null | null | null | open | Windows Low Level Disk Question
===
I need to programmatically determine out how many sectors, heads, and cylinders are on a physical disk from Windows XP. Does anyone know the API for determining this? Where might Windows expose this information?
Thanks,
Terry | 0 |
50,771 | 09/08/2008 21:46:25 | 3,453 | 08/28/2008 16:17:15 | 46 | 3 | ASP.NET AJAX Load Balancing Issues | This would be a question for anyone who has code in the App_Code folder and uses a hardware load balancer.
When a file in the App_Code folder, and the site is not pre-compiled iis will generate random file names for these files.
server1 "/ajax/SomeControl, App_Code.tjazq3hb.ashx"
server2 "/ajax/SomeControl, App_Code.wzp3akyu.ashx"
So when a user posts the page and gets transfered to the other server nothing works.
Does anyone have a solution for this? I could change to a pre-compiled web-site, but we would loose the ability for our QA department to just promote the changed files.
| asp.net | ajax | loadbalancing | null | null | null | open | ASP.NET AJAX Load Balancing Issues
===
This would be a question for anyone who has code in the App_Code folder and uses a hardware load balancer.
When a file in the App_Code folder, and the site is not pre-compiled iis will generate random file names for these files.
server1 "/ajax/SomeControl, App_Code.tjazq3hb.ashx"
server2 "/ajax/SomeControl, App_Code.wzp3akyu.ashx"
So when a user posts the page and gets transfered to the other server nothing works.
Does anyone have a solution for this? I could change to a pre-compiled web-site, but we would loose the ability for our QA department to just promote the changed files.
| 0 |
50,774 | 09/08/2008 21:47:54 | 5,287 | 09/08/2008 21:29:47 | 1 | 3 | Visual Studio 2005 crashes on start-up | In my work environment, Visual Studio currently crashes every time I start our main project unless I delete the .suo (solution options) and .ncb (C++ Intellisense symbols) files.
Obviously, I've found a workaround. Is there a more permanent solution than this? | visual-studio | crash | intellisense | null | null | null | open | Visual Studio 2005 crashes on start-up
===
In my work environment, Visual Studio currently crashes every time I start our main project unless I delete the .suo (solution options) and .ncb (C++ Intellisense symbols) files.
Obviously, I've found a workaround. Is there a more permanent solution than this? | 0 |
50,786 | 09/08/2008 21:51:02 | 685 | 08/07/2008 19:18:05 | 172 | 14 | How do I get ms-access to connect to ms-sql as a different user? | How do I get ms-access to connect (through ODBC) to an ms-sql as a different user than their Active Directory ID?
I don't want to specify an account in the ODBC connection, I want to do in the ms-access side to hide it from my users. Doing it in the ODBC connection would put me right back in to the original situation I'm trying to avoid.
Yes, this relates to a previous question: http://beta.stackoverflow.com/questions/50164/ | ms-access | odbc | ms-sql | null | null | null | open | How do I get ms-access to connect to ms-sql as a different user?
===
How do I get ms-access to connect (through ODBC) to an ms-sql as a different user than their Active Directory ID?
I don't want to specify an account in the ODBC connection, I want to do in the ms-access side to hide it from my users. Doing it in the ODBC connection would put me right back in to the original situation I'm trying to avoid.
Yes, this relates to a previous question: http://beta.stackoverflow.com/questions/50164/ | 0 |
50,794 | 09/08/2008 21:57:42 | 2,566 | 08/22/2008 22:30:40 | 68 | 9 | how does unix handle full path name with space and arguments ? | how does unix handle full path name with space and arguments ?
in windows we quote the path and add the commandline arguments after, how is it in unix ?
> "c:\foo folder with space\foo.exe" -help | path | unix | null | null | null | null | open | how does unix handle full path name with space and arguments ?
===
how does unix handle full path name with space and arguments ?
in windows we quote the path and add the commandline arguments after, how is it in unix ?
> "c:\foo folder with space\foo.exe" -help | 0 |
50,799 | 09/08/2008 21:59:07 | 5,281 | 09/08/2008 20:55:41 | 1 | 0 | What version of TinyMCE will work in Drupal 5 with google chrome? | My drupal site (internal) will not display the TinyMCE editor when using Google Chrome browser. Has anyone gotten TinyMCE to work with Chrome in Drupal 5? | drupal | tinymce | null | null | null | null | open | What version of TinyMCE will work in Drupal 5 with google chrome?
===
My drupal site (internal) will not display the TinyMCE editor when using Google Chrome browser. Has anyone gotten TinyMCE to work with Chrome in Drupal 5? | 0 |
50,801 | 09/08/2008 21:59:23 | 4,925 | 09/06/2008 17:59:37 | 1 | 0 | What's the best way to get the fractional part of a float in PHP? | Simple one: How would you find the fractional part of a floating point number in PHP? For example, if I have the value 1.25, I want to return 0.25. | php | null | null | null | null | null | open | What's the best way to get the fractional part of a float in PHP?
===
Simple one: How would you find the fractional part of a floating point number in PHP? For example, if I have the value 1.25, I want to return 0.25. | 0 |
50,819 | 09/08/2008 22:10:00 | 1,343 | 08/14/2008 15:46:01 | 231 | 41 | #line and jump to line | Do any editors honer C #line directives with regards to goto line features?
*Context:*
I'm working on a code generator and need to jump to a line of the output but the line is specified relative to the the #line directive I'm adding.
I can drop them but then finding the input line is even a worse pain | text-editor | preprocessor | null | null | null | null | open | #line and jump to line
===
Do any editors honer C #line directives with regards to goto line features?
*Context:*
I'm working on a code generator and need to jump to a line of the output but the line is specified relative to the the #line directive I'm adding.
I can drop them but then finding the input line is even a worse pain | 0 |
50,822 | 09/08/2008 22:13:27 | 5,296 | 09/08/2008 22:13:27 | 1 | 0 | Message passing in a plug-in framework problem | First off, there's a bit of background to this issue available on my blog:
* <http://www.alastairsmith.me.uk/coding/2008/06/25/message-passing-a-plug-framework.html>
* <http://www.alastairsmith.me.uk/coding/2008/07/31/message-passing-2.html>
I'm aware that the descriptions aren't hugely clear, so I'll try to summarise what I'm attempting as best I can here. The application is a personal finance program. Further background on the framework itself is available at the end of this post.
There are a number of different types of plug-in that the framework can handle (e.g., accounts, export, reporting, etc.). However, I'm focussing on one particular class of plug-in, so-called data plug-ins, as it is this class that is causing me problems. I have one class of data plug-in for accounts, one for transactions, etc.
I'm midway through a vast re-factoring that has left me with the following architecture for data plug-ins:
* The data plug-in object (implementing intialisation, installation and plug-in metadata) [implements `IDataPlugin<FactoryType>`]
* The data object (such as an account) [implements, e.g., `IAccount`]
* A factory to create instances of the data object [implements, e.g., `IAccountFactory`]
Previously the data object and the plug-in object were combined into one, but this meant that a new transaction plug-in had to be instantiated for each transaction recorded in the account which caused a number of problems. Unfortunately, that re-factoring has broken my message passing. The data object implements `INotifyPropertyChanged`, and so I've hit a new problem, and one that I'm not sure how to work around: the plug-in object is registering events with the message broker, but it's the data objects that actually fires the events. This means that <strong>the subscribing plug-in currently has to subscribe to each created account, transaction, etc.!</strong> This is clearly not scalable.
As far as I can tell at the moment I have two possible solutions:
1. Make the data plug-in object a go-between for the data-objects and message broker, possibly batching change notifications. I don't like this because it adds another layer of complexity to the messaging system that I feel I should be able to do without.
2. Junk the current event-based implementation and use something else that's more easily manageable (in-memory WCF?!)
So I guess I'm really asking:
1. how would you solve this problem?
2. what potential solutions do you think I've overlooked?
3. is my approach even vaguely on-track/sensible?! :-)
Many thanks in advance for the time and effort you put into your responses. As you will be able to tell from the dates of the blog posts, some variant of this problem has been taxing me for quite a long time now! As such, any and all responses will be greatly appreciated.
The background to the framework itself is as follows:
> My plug-in framework consists of three main components: a plug-in broker, a preferences' manager and a message broker. The plug-in broker does the bread-and-butter plug-in stuff: discovering and creating plug-ins. The preferences' manager manages user preferences for the framework and individual plug-ins, such as which plug-ins are enabled, where data should be saved, etc. Communication is via publish/subscribe, with the message broker sitting in the middle, gathering all published message types and managing subscriptions. The publish/subscribe is currently implemented via the .NET `INotifyPropertyChanged` interface, which provides one event called `PropertyChanged`; the message broker builds a list of all plug-ins implementing `INotifyPropertyChanged` and subscribes other plug-ins this event. The purpose of the message passing is to allow the account and transaction plug-ins to notify the storage plug-ins that data has changed so that it may be saved. | c# | plugins | message-passing | null | null | null | open | Message passing in a plug-in framework problem
===
First off, there's a bit of background to this issue available on my blog:
* <http://www.alastairsmith.me.uk/coding/2008/06/25/message-passing-a-plug-framework.html>
* <http://www.alastairsmith.me.uk/coding/2008/07/31/message-passing-2.html>
I'm aware that the descriptions aren't hugely clear, so I'll try to summarise what I'm attempting as best I can here. The application is a personal finance program. Further background on the framework itself is available at the end of this post.
There are a number of different types of plug-in that the framework can handle (e.g., accounts, export, reporting, etc.). However, I'm focussing on one particular class of plug-in, so-called data plug-ins, as it is this class that is causing me problems. I have one class of data plug-in for accounts, one for transactions, etc.
I'm midway through a vast re-factoring that has left me with the following architecture for data plug-ins:
* The data plug-in object (implementing intialisation, installation and plug-in metadata) [implements `IDataPlugin<FactoryType>`]
* The data object (such as an account) [implements, e.g., `IAccount`]
* A factory to create instances of the data object [implements, e.g., `IAccountFactory`]
Previously the data object and the plug-in object were combined into one, but this meant that a new transaction plug-in had to be instantiated for each transaction recorded in the account which caused a number of problems. Unfortunately, that re-factoring has broken my message passing. The data object implements `INotifyPropertyChanged`, and so I've hit a new problem, and one that I'm not sure how to work around: the plug-in object is registering events with the message broker, but it's the data objects that actually fires the events. This means that <strong>the subscribing plug-in currently has to subscribe to each created account, transaction, etc.!</strong> This is clearly not scalable.
As far as I can tell at the moment I have two possible solutions:
1. Make the data plug-in object a go-between for the data-objects and message broker, possibly batching change notifications. I don't like this because it adds another layer of complexity to the messaging system that I feel I should be able to do without.
2. Junk the current event-based implementation and use something else that's more easily manageable (in-memory WCF?!)
So I guess I'm really asking:
1. how would you solve this problem?
2. what potential solutions do you think I've overlooked?
3. is my approach even vaguely on-track/sensible?! :-)
Many thanks in advance for the time and effort you put into your responses. As you will be able to tell from the dates of the blog posts, some variant of this problem has been taxing me for quite a long time now! As such, any and all responses will be greatly appreciated.
The background to the framework itself is as follows:
> My plug-in framework consists of three main components: a plug-in broker, a preferences' manager and a message broker. The plug-in broker does the bread-and-butter plug-in stuff: discovering and creating plug-ins. The preferences' manager manages user preferences for the framework and individual plug-ins, such as which plug-ins are enabled, where data should be saved, etc. Communication is via publish/subscribe, with the message broker sitting in the middle, gathering all published message types and managing subscriptions. The publish/subscribe is currently implemented via the .NET `INotifyPropertyChanged` interface, which provides one event called `PropertyChanged`; the message broker builds a list of all plug-ins implementing `INotifyPropertyChanged` and subscribes other plug-ins this event. The purpose of the message passing is to allow the account and transaction plug-ins to notify the storage plug-ins that data has changed so that it may be saved. | 0 |
50,824 | 09/08/2008 22:14:32 | 122 | 08/02/2008 07:56:07 | 3,907 | 184 | Can XML comments go anywhere? | I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting the comment with ALL queries either at the top or bottom.
So my question: is it valid XML to place it at either location? For example, above the XML Declaration:
<!-- Queries used: ... -->
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
...
</dataset>
Or below the root node:
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
...
</dataset>
<!-- Queries used: ... -->
I plan to initially try above the XML Declaration, but I have doubts on if that is valid XML, despite the claim from [wikipedia][1]:
> Comments can be placed anywhere in the tree, including in the text if the content of the element is text or #PCDATA.
I plan to post back if this works, but it would be nice to know if it is an official XML standard.
[1]: http://en.wikipedia.org/wiki/Xml#Well-formed_documents:_XML_syntax | xml | comments | null | null | null | null | open | Can XML comments go anywhere?
===
I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting the comment with ALL queries either at the top or bottom.
So my question: is it valid XML to place it at either location? For example, above the XML Declaration:
<!-- Queries used: ... -->
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
...
</dataset>
Or below the root node:
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
...
</dataset>
<!-- Queries used: ... -->
I plan to initially try above the XML Declaration, but I have doubts on if that is valid XML, despite the claim from [wikipedia][1]:
> Comments can be placed anywhere in the tree, including in the text if the content of the element is text or #PCDATA.
I plan to post back if this works, but it would be nice to know if it is an official XML standard.
[1]: http://en.wikipedia.org/wiki/Xml#Well-formed_documents:_XML_syntax | 0 |
50,829 | 09/08/2008 22:18:27 | 1,343 | 08/14/2008 15:46:01 | 231 | 41 | How to log mallocs | This is a bit hypothetical and grossly simplified but...
Assume a program that will be calling functions written by third parties. These parties can be assumed to be non-hostile but can't be assumed to be "competent". Each function will take some arguments, have side effects and return a value. They have no state while they are not running.
The objective is to ensure they can't cause memory leaks by logging all mallocs (and the like) and then freeing everything after the function exits.
Is this possible? Is this practical?
p.s. The important part to me is ensuring that no allocations persist so removing memory leaks without doing that are not useful to me. | malloc | null | null | null | null | null | open | How to log mallocs
===
This is a bit hypothetical and grossly simplified but...
Assume a program that will be calling functions written by third parties. These parties can be assumed to be non-hostile but can't be assumed to be "competent". Each function will take some arguments, have side effects and return a value. They have no state while they are not running.
The objective is to ensure they can't cause memory leaks by logging all mallocs (and the like) and then freeing everything after the function exits.
Is this possible? Is this practical?
p.s. The important part to me is ensuring that no allocations persist so removing memory leaks without doing that are not useful to me. | 0 |
50,845 | 09/08/2008 22:25:48 | 1,560 | 08/16/2008 17:17:39 | 78 | 2 | How to click on an AutoCompleteExtender with Watin | For my acceptance testing I'm writing text into the auto complete extender and I need to click on the populated list.
In order to populate the list I have to use AppendText instead of TypeText, otherwise the textbox looses focus before the list is populated.
Now my problem is when I try to click on the populated list. I've tried searching the UL element and clicking on it; but it's not firing the click event on the list.
Then I tried to search the list by tagname and value:
Element element = Browser.Element(Find.By("tagname", "li") && Find.ByValue("lookupString"));
but it's not finding it, has anyone been able to do what I'm trying to do? | watin | autocompleteextender | null | null | null | null | open | How to click on an AutoCompleteExtender with Watin
===
For my acceptance testing I'm writing text into the auto complete extender and I need to click on the populated list.
In order to populate the list I have to use AppendText instead of TypeText, otherwise the textbox looses focus before the list is populated.
Now my problem is when I try to click on the populated list. I've tried searching the UL element and clicking on it; but it's not firing the click event on the list.
Then I tried to search the list by tagname and value:
Element element = Browser.Element(Find.By("tagname", "li") && Find.ByValue("lookupString"));
but it's not finding it, has anyone been able to do what I'm trying to do? | 0 |
50,853 | 09/08/2008 22:27:45 | 5,236 | 09/08/2008 16:36:03 | 1 | 0 | What is a reason that LINQ to SQL wouldn't generate a collection based on a relationship? | I have a relationship between two entities (e1 and e2) and e1 has a collection of e2, however I have a similar relationship set up between (e2 and e3), yet e2 does not contain a collection of e3's, any reason why this would happen? Anything I can post to make this easier to figure out? | linq-to-sql | null | null | null | null | null | open | What is a reason that LINQ to SQL wouldn't generate a collection based on a relationship?
===
I have a relationship between two entities (e1 and e2) and e1 has a collection of e2, however I have a similar relationship set up between (e2 and e3), yet e2 does not contain a collection of e3's, any reason why this would happen? Anything I can post to make this easier to figure out? | 0 |
50,854 | 09/08/2008 22:28:12 | 326 | 08/04/2008 16:59:58 | 228 | 17 | What are the pros/cons of available shopping cart solutions? | I'd like to know what everyone's experiences are with various shopping cart solutions. I'm considering Google Checkout heavily, but would like to know of alternatives, and any reasons for or against those alternatives. At this point, teh technology stack doesn't really matter - but please specify what stack is being used if you suggest a solution. | shopping-cart | null | null | null | null | 04/01/2012 05:42:40 | not constructive | What are the pros/cons of available shopping cart solutions?
===
I'd like to know what everyone's experiences are with various shopping cart solutions. I'm considering Google Checkout heavily, but would like to know of alternatives, and any reasons for or against those alternatives. At this point, teh technology stack doesn't really matter - but please specify what stack is being used if you suggest a solution. | 4 |
50,863 | 09/08/2008 22:34:41 | 4,099 | 09/01/2008 18:59:39 | 21 | 3 | sql 2005 roles | What role should I give a sql login if I need the login to be able to create a database, and create additional logins and add users based on those logins to the database i created? This is sql 2005. | sql2005 | null | null | null | null | null | open | sql 2005 roles
===
What role should I give a sql login if I need the login to be able to create a database, and create additional logins and add users based on those logins to the database i created? This is sql 2005. | 0 |
50,864 | 09/08/2008 22:37:28 | 5,301 | 09/08/2008 22:36:18 | 1 | 0 | Student projects: do they influence employment prospects? | I am a BSc student who is going to start the last year of my degree
and I am wondering how relevant my final year project choice is going
to be when looking for a job next year - and how it will affect what
jobs will be open/closed to me when searching for my first
programming/developer job.
I presently have a couple of options for my final year project/
dissertation:
- Robotics/pattern recognition: one of my second year professors does
research in Robotics/visual pattern recognition and has invited me to
work with him during my final year project. It would be in Python as
it has good APIs/libraries in this field.
- A document repository system: with a database and some networked
elements (client/server), probably using apache jackrabbit and java on
the server and C#/WPF/.Net stack to develop the client. C# because
bezier curves in WPF is a snap and I have a particular type of GUI in
mind for the client component. This is my own idea/project.
The first one sounds the most fun and in all likelihood will be the
one time that I am involved in real research (I am 35 and have a
family). The second one sounds closer to what real-world development
is. My past work experience did not involve programming, or IT.
All thoughts/comments are appreciated! Thanks, Luis | homework | graduate | null | null | null | null | open | Student projects: do they influence employment prospects?
===
I am a BSc student who is going to start the last year of my degree
and I am wondering how relevant my final year project choice is going
to be when looking for a job next year - and how it will affect what
jobs will be open/closed to me when searching for my first
programming/developer job.
I presently have a couple of options for my final year project/
dissertation:
- Robotics/pattern recognition: one of my second year professors does
research in Robotics/visual pattern recognition and has invited me to
work with him during my final year project. It would be in Python as
it has good APIs/libraries in this field.
- A document repository system: with a database and some networked
elements (client/server), probably using apache jackrabbit and java on
the server and C#/WPF/.Net stack to develop the client. C# because
bezier curves in WPF is a snap and I have a particular type of GUI in
mind for the client component. This is my own idea/project.
The first one sounds the most fun and in all likelihood will be the
one time that I am involved in real research (I am 35 and have a
family). The second one sounds closer to what real-world development
is. My past work experience did not involve programming, or IT.
All thoughts/comments are appreciated! Thanks, Luis | 0 |
50,890 | 09/08/2008 22:48:43 | 5,261 | 09/08/2008 18:44:40 | 1 | 3 | Average User Download Speeds | Any ideas what the average user's download speed is? I'm working on a site that streams video and am trying to figure out what an average download speed as to determine quality.
I know i might be comparing apples with oranges but I'm just looking for something to get a basis for where to start. | internet | download | user | performance | average | null | open | Average User Download Speeds
===
Any ideas what the average user's download speed is? I'm working on a site that streams video and am trying to figure out what an average download speed as to determine quality.
I know i might be comparing apples with oranges but I'm just looking for something to get a basis for where to start. | 0 |
50,898 | 09/08/2008 22:56:22 | 3,447 | 08/28/2008 15:51:49 | 21 | 2 | Nest a GridView within Repeater | Are there disadvantages to nesting a GridView within a Repeater and then binding each repeated GridView during the Repeater's `ItemDataBound` event? What are some alternative solutions? A simple scenario would be repeating a list of US states and displaying a table of cities and city populations for each state. | c# | asp.net | data-binding | gridview | repeater | null | open | Nest a GridView within Repeater
===
Are there disadvantages to nesting a GridView within a Repeater and then binding each repeated GridView during the Repeater's `ItemDataBound` event? What are some alternative solutions? A simple scenario would be repeating a list of US states and displaying a table of cities and city populations for each state. | 0 |
50,900 | 09/08/2008 22:57:20 | 438 | 08/05/2008 18:28:20 | 26 | 5 | Best way to detect a retail build from a debug build? .net | So I have about 10 short css files that I use with mvc app.
There are like
error.css
login.css
etc...
Just some really short css files that make updating and editing easy (At least for me). What I want is something that will optimize the if else branch and not incorporate it within the final bits. I want to do something like this
if(Debug.Mode){
<link rel="stylesheet" type="text/css" href="error.css" />
<link rel="stylesheet" type="text/css" href="login.css" />
<link rel="stylesheet" type="text/css" href="menu.css" />
<link rel="stylesheet" type="text/css" href="page.css" />
} else {
<link rel="stylesheet" type="text/css" href="site.css" />
}
I'll have a msbuild task that will combine all the css files, minimize them and all that good stuff. I just need to know if there is a way to remove the if else branch in the final bits.
| .net | debugging | retail | null | null | null | open | Best way to detect a retail build from a debug build? .net
===
So I have about 10 short css files that I use with mvc app.
There are like
error.css
login.css
etc...
Just some really short css files that make updating and editing easy (At least for me). What I want is something that will optimize the if else branch and not incorporate it within the final bits. I want to do something like this
if(Debug.Mode){
<link rel="stylesheet" type="text/css" href="error.css" />
<link rel="stylesheet" type="text/css" href="login.css" />
<link rel="stylesheet" type="text/css" href="menu.css" />
<link rel="stylesheet" type="text/css" href="page.css" />
} else {
<link rel="stylesheet" type="text/css" href="site.css" />
}
I'll have a msbuild task that will combine all the css files, minimize them and all that good stuff. I just need to know if there is a way to remove the if else branch in the final bits.
| 0 |
50,914 | 09/08/2008 23:06:34 | 2,118 | 08/20/2008 12:54:09 | 384 | 16 | Search by hash? | I had the idea of a search engine that would index web items like other search engines do now but would only store the file's title, url and a hash of the contents.
This way it would be easy to find items on the web if you already had them and didn't know where they came from or wanted to know all the places that something appeared.
More useful for non textual items like images, executables and archives.
I was wondering if there is already something similar? | search | hash | utilities | null | null | null | open | Search by hash?
===
I had the idea of a search engine that would index web items like other search engines do now but would only store the file's title, url and a hash of the contents.
This way it would be easy to find items on the web if you already had them and didn't know where they came from or wanted to know all the places that something appeared.
More useful for non textual items like images, executables and archives.
I was wondering if there is already something similar? | 0 |
50,923 | 09/08/2008 23:10:53 | 4,883 | 09/06/2008 10:24:59 | 336 | 2 | How do you create a weak reference to an object in Python? | How do you create a weak reference to an object in Python? | python | null | null | null | null | null | open | How do you create a weak reference to an object in Python?
===
How do you create a weak reference to an object in Python? | 0 |
50,931 | 09/08/2008 23:14:45 | 2,614 | 08/23/2008 16:30:32 | 1 | 4 | Redirecting non-www URL to www | I'm using [Helicon's ISAPI Rewrite 3][1], which basically enables .htaccess in IIS. I need to redirect a non-www URL to the www version, i.e. example.com should redirect to www.example.com. I used the following rule from the examples but it affects subdomains:
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]
This works for most part, but is also redirect sub.example.com to www.sub.example.com. How can I rewrite the above rule so that subdomains do not get redirected?
[1]: http://www.helicontech.com/isapi_rewrite/ | .htaccess | isapi-rewrite | null | null | null | null | open | Redirecting non-www URL to www
===
I'm using [Helicon's ISAPI Rewrite 3][1], which basically enables .htaccess in IIS. I need to redirect a non-www URL to the www version, i.e. example.com should redirect to www.example.com. I used the following rule from the examples but it affects subdomains:
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]
This works for most part, but is also redirect sub.example.com to www.sub.example.com. How can I rewrite the above rule so that subdomains do not get redirected?
[1]: http://www.helicontech.com/isapi_rewrite/ | 0 |
50,945 | 09/08/2008 23:26:12 | 4,883 | 09/06/2008 10:24:59 | 346 | 2 | Can you do a partial checkout with svn? | If I had 20 directories under trunk/ with lots of files in each and only needed 3 of those directories, would it be possible to do an svn checkout with only those 3 directories under trunk? | subversion | null | null | null | null | null | open | Can you do a partial checkout with svn?
===
If I had 20 directories under trunk/ with lots of files in each and only needed 3 of those directories, would it be possible to do an svn checkout with only those 3 directories under trunk? | 0 |
50,954 | 09/08/2008 23:31:08 | 3,517 | 08/28/2008 22:29:27 | 1 | 1 | Application Testing | Is the real benefit in TDD the actual testing of the application, or the benefits that writing a testable application brings to the table? I ask becuase I feel too often the converstation revolves so much around testing, and not the total benefits package. | tdd | null | null | null | null | null | open | Application Testing
===
Is the real benefit in TDD the actual testing of the application, or the benefits that writing a testable application brings to the table? I ask becuase I feel too often the converstation revolves so much around testing, and not the total benefits package. | 0 |
50,965 | 09/08/2008 23:39:52 | 2,915 | 08/25/2008 23:15:12 | 2,236 | 96 | Will random data appended to a JPG make it unusable? | So, to simplify my life I want to be able to append from 1 to 7 additional characters on the end of some jpg images my program is processing*.
Having tried this out with a few programs, it appears they are fine with the additional characters, which occur after the [FF D9 that specifies the end of the image][1] - so it appears that the file format is well defined enough that the 'corruption' I'm adding at the end shouldn't matter.
I can always post process the files later if needed, but my preference is to do the simplest thing possible - which is to let them remain (I'm decrypting other file types and they won't mind, so having a special case is annoying).
I figure with all the talk of [Steganography][2] hullaballo years ago, someone has some input here...
-Adam
* (encryption processing by 8 byte blocks, I don't want to save pre-encrypted file size, so append 0x00 to input data, and leave them there after decoding)
[1]: http://en.wikipedia.org/wiki/JPEG#Syntax_and_structure
[2]: http://en.wikipedia.org/wiki/Steganography | hacks | jpg | file-format | steganography | null | null | open | Will random data appended to a JPG make it unusable?
===
So, to simplify my life I want to be able to append from 1 to 7 additional characters on the end of some jpg images my program is processing*.
Having tried this out with a few programs, it appears they are fine with the additional characters, which occur after the [FF D9 that specifies the end of the image][1] - so it appears that the file format is well defined enough that the 'corruption' I'm adding at the end shouldn't matter.
I can always post process the files later if needed, but my preference is to do the simplest thing possible - which is to let them remain (I'm decrypting other file types and they won't mind, so having a special case is annoying).
I figure with all the talk of [Steganography][2] hullaballo years ago, someone has some input here...
-Adam
* (encryption processing by 8 byte blocks, I don't want to save pre-encrypted file size, so append 0x00 to input data, and leave them there after decoding)
[1]: http://en.wikipedia.org/wiki/JPEG#Syntax_and_structure
[2]: http://en.wikipedia.org/wiki/Steganography | 0 |
50,983 | 09/08/2008 23:58:17 | 1,190 | 08/13/2008 12:15:38 | 1,255 | 98 | Are there any languages that implement generics _well_? | I liked the discussion at [Differences in Generics][1], and was wondering whether there were any languages that used this feature particularly well.
I really dislike Java's `List<? extends Foo>` for a `List` of things that are Liskov-substitutable for `Foo`. Why can't `List<Foo>` cover that?
And honestly, `Comparable<? super Bar>`?
I also can't remember for the life of my why you should never return an Array of generics:
public T[] getAll<T>() { ... }
I never liked templates in C++, but that was mostly because none of the compilers could ever spit out a remotely meaningful error message for them. One time I actually did a `make realclean && make` 17 times to get something to compile; I never did figure out why the 17th time was the charm.
So, who actually _likes_ using generics in their pet language?
[1]: http://stackoverflow.com/questions/31693/differences-in-generics | language-agnostic | generics | null | null | null | null | open | Are there any languages that implement generics _well_?
===
I liked the discussion at [Differences in Generics][1], and was wondering whether there were any languages that used this feature particularly well.
I really dislike Java's `List<? extends Foo>` for a `List` of things that are Liskov-substitutable for `Foo`. Why can't `List<Foo>` cover that?
And honestly, `Comparable<? super Bar>`?
I also can't remember for the life of my why you should never return an Array of generics:
public T[] getAll<T>() { ... }
I never liked templates in C++, but that was mostly because none of the compilers could ever spit out a remotely meaningful error message for them. One time I actually did a `make realclean && make` 17 times to get something to compile; I never did figure out why the 17th time was the charm.
So, who actually _likes_ using generics in their pet language?
[1]: http://stackoverflow.com/questions/31693/differences-in-generics | 0 |
51,002 | 09/09/2008 00:11:34 | 5,004 | 09/07/2008 10:03:29 | 23 | 0 | Java Desktop application framework | I am working on designing and building a desktop application. I am thinking about using eclipse or netbeans for the base of this application. However, I have never built on either of these platforms. I am personally leaning to using netbeans because it seams like that platform is an easer learning curve. But, I wanted to ask people that have actually build on these platforms before which one is easier to use?
My personal definition of easer is as follows:
* Easy to get started with
* Consistent and logical API
* Good documentation
* Easy to build and deploy
Thanks very much,
Josh
| java | eclipse | desktop | platform | netbeans | null | open | Java Desktop application framework
===
I am working on designing and building a desktop application. I am thinking about using eclipse or netbeans for the base of this application. However, I have never built on either of these platforms. I am personally leaning to using netbeans because it seams like that platform is an easer learning curve. But, I wanted to ask people that have actually build on these platforms before which one is easier to use?
My personal definition of easer is as follows:
* Easy to get started with
* Consistent and logical API
* Good documentation
* Easy to build and deploy
Thanks very much,
Josh
| 0 |
51,007 | 09/09/2008 00:23:28 | 1,815 | 08/18/2008 17:31:15 | 76 | 5 | Lack of operator overloading in ActionScript 3.0 | One of the things I miss the most in ActionScript is the lack of operator overloading, in particular ==. I kind of work around this issue by adding a "Compare" method to my classes, but that doesn't help in many cases, like when you want to use things like the built in Dictionary.
Is there a good way to work around this problem? | flash | actionscript-3 | null | null | null | null | open | Lack of operator overloading in ActionScript 3.0
===
One of the things I miss the most in ActionScript is the lack of operator overloading, in particular ==. I kind of work around this issue by adding a "Compare" method to my classes, but that doesn't help in many cases, like when you want to use things like the built in Dictionary.
Is there a good way to work around this problem? | 0 |
403,431 | 12/31/2008 16:44:25 | 24,545 | 10/02/2008 15:44:37 | 1,265 | 45 | Switching from Java to C++ - what's the easy way? | I have ~2 years of experience in Java programming, and it is basically the first programming language I have made **serious and intensive** use of. Currently, I need start switching to C++ for some assignments I have. Up until now I have been very comfortable with Java, and it's concepts made lots of sense to me.
Just off the top of my head: things like generics, calls by-reference, heap and stack allocation, useful APIs (Collections etc...), GC, strong typed varibles, etc... All of those made lots of sense in my head.
Now, needing to move to C++, what are the main points I should put aside, and start thinking about differently? How did any of you accomplish this? Common pitfalls? Good references? I'm not looking for any books or the like, just the most concise and relevant information I need to get up and running quickly in C++. | c++ | java | programming-languages | null | null | null | open | Switching from Java to C++ - what's the easy way?
===
I have ~2 years of experience in Java programming, and it is basically the first programming language I have made **serious and intensive** use of. Currently, I need start switching to C++ for some assignments I have. Up until now I have been very comfortable with Java, and it's concepts made lots of sense to me.
Just off the top of my head: things like generics, calls by-reference, heap and stack allocation, useful APIs (Collections etc...), GC, strong typed varibles, etc... All of those made lots of sense in my head.
Now, needing to move to C++, what are the main points I should put aside, and start thinking about differently? How did any of you accomplish this? Common pitfalls? Good references? I'm not looking for any books or the like, just the most concise and relevant information I need to get up and running quickly in C++. | 0 |
403,433 | 12/31/2008 16:44:27 | 47,204 | 12/17/2008 20:45:23 | 22 | 0 | making the value of a table equal to another value in a different table | i have a small problem with a program that im writing. I have a table - stocks which contains information(products, barcodes etc.) about items stored in a fridge. I then have another table - shop which acts like a shop,containing loads of products and their barcodes.some of the products in the shop table are in the stock table at the moment, and there is a boolenan field called stock which tells us if that product is in the stock table or not, if its equal to 1, it is in the fridge, if it is equal to 0, it is not in the fridge. Two fields in the stocks table are amount and quantity. The amount is what is in the fridge at the moment, the quantity is what has to be in the fridge at all times. When something is taken out of the fridge, that product's amount amount drops by 1. Each barcode in the stocks table has a matching one in the shop table. I need to make a query to the database from a python program which will order products from the shops table when the amount(whats in the fridge) is less than the quantity(whats meant to be in the fridge at all times). So you need to take the barcode of a row in the stocks table where the amount is less than the quantity and match that up to the barcode in the shops table. Then in the row of that matching barcode you need to set stock = 1.
I'would be really happy if somebody could help me with this as i really am finding it difficult to write this function. below is the checkin and checkout functions if that will help.
thanks a million
lincoln
**checkin**
def check_in():
db = MySQLdb.connect(host='localhost', user='root', passwd='$$', db='fillmyfridge')
cursor=db.cursor(MySQLdb.cursors.DictCursor)
user_input=raw_input('please enter the product barcode that you wish to checkin to the fridge: \n')
cursor.execute("""update shop set stock = 1 where barcode = %s""", (user_input))
db.commit()
numrows = int(cursor.rowcount)
if numrows >= 1:
row = cursor.fetchone()
print row["product"]
cursor.execute('update stock set amount = amount + 1 where product = %s', row["product"])
db.commit()
cursor.execute('udpate shop set stock = 1 where barcode = user_input')
db.commit()
else:
new_prodname = raw_input('what is the name of the product and press enter: \n')
cursor.execute('insert into shop (product, barcode, category) values (%s, %s, %s)', (new_prodname, user_input, new_prodname))
cursor = db.cursor()
query = ('select * from shop where product = %s', (new_prodname))
cursor.execute(query):
db.commit()
numrows = int(cursor.rowcount)
if numrows<1:
cursor.execute('insert into atock (barcode, quantity, amount, product) values (%s, 1, 1, %s)', (user_input, new_prodname))
db.commit()
cursor.execute('insert into shop (product, barcode, category, stock) values (%s, %s, %s, 1)', (new_prodname, user_input, new_prodname))
print new_prodname
print 'has been added to the fridge stock'
else:
cursor.execute('update atock set amount = amount + 1 where product = %s', (new_prodname))
db.commit()
cursor.execute('insert into shop (product, barcode, category, stock) values (%s, %s, %s, 1)', (new_prodname, user_input, new_prodname))
print new_prodname
print 'has been added to the fridge stock'
**checkout**
import MySQLdb
def check_out():
db = MySQLdb.connect(host='localhost', user='root', passwd='$$', db='fillmyfridge')
cursor=db.cursor()
user_input=raw_input('please enter the product barcode you wish to remove from the fridge: \n')
query = cursor.execute('update stock set instock=0, howmanytoorder=howmanytoorder + 1, amount = amount - 1 where barcode = %s', (user_input))
if cursor.execute(query):
db.commit()
print 'the following product has been removed from the fridge nd needs to be ordered'
cursor.execute('update shop set stock = 0 where barcode = %s' (user_input)
db.commit()
else:
return 0
thanks again.
lincoln | python | mysql | tables. | null | null | null | open | making the value of a table equal to another value in a different table
===
i have a small problem with a program that im writing. I have a table - stocks which contains information(products, barcodes etc.) about items stored in a fridge. I then have another table - shop which acts like a shop,containing loads of products and their barcodes.some of the products in the shop table are in the stock table at the moment, and there is a boolenan field called stock which tells us if that product is in the stock table or not, if its equal to 1, it is in the fridge, if it is equal to 0, it is not in the fridge. Two fields in the stocks table are amount and quantity. The amount is what is in the fridge at the moment, the quantity is what has to be in the fridge at all times. When something is taken out of the fridge, that product's amount amount drops by 1. Each barcode in the stocks table has a matching one in the shop table. I need to make a query to the database from a python program which will order products from the shops table when the amount(whats in the fridge) is less than the quantity(whats meant to be in the fridge at all times). So you need to take the barcode of a row in the stocks table where the amount is less than the quantity and match that up to the barcode in the shops table. Then in the row of that matching barcode you need to set stock = 1.
I'would be really happy if somebody could help me with this as i really am finding it difficult to write this function. below is the checkin and checkout functions if that will help.
thanks a million
lincoln
**checkin**
def check_in():
db = MySQLdb.connect(host='localhost', user='root', passwd='$$', db='fillmyfridge')
cursor=db.cursor(MySQLdb.cursors.DictCursor)
user_input=raw_input('please enter the product barcode that you wish to checkin to the fridge: \n')
cursor.execute("""update shop set stock = 1 where barcode = %s""", (user_input))
db.commit()
numrows = int(cursor.rowcount)
if numrows >= 1:
row = cursor.fetchone()
print row["product"]
cursor.execute('update stock set amount = amount + 1 where product = %s', row["product"])
db.commit()
cursor.execute('udpate shop set stock = 1 where barcode = user_input')
db.commit()
else:
new_prodname = raw_input('what is the name of the product and press enter: \n')
cursor.execute('insert into shop (product, barcode, category) values (%s, %s, %s)', (new_prodname, user_input, new_prodname))
cursor = db.cursor()
query = ('select * from shop where product = %s', (new_prodname))
cursor.execute(query):
db.commit()
numrows = int(cursor.rowcount)
if numrows<1:
cursor.execute('insert into atock (barcode, quantity, amount, product) values (%s, 1, 1, %s)', (user_input, new_prodname))
db.commit()
cursor.execute('insert into shop (product, barcode, category, stock) values (%s, %s, %s, 1)', (new_prodname, user_input, new_prodname))
print new_prodname
print 'has been added to the fridge stock'
else:
cursor.execute('update atock set amount = amount + 1 where product = %s', (new_prodname))
db.commit()
cursor.execute('insert into shop (product, barcode, category, stock) values (%s, %s, %s, 1)', (new_prodname, user_input, new_prodname))
print new_prodname
print 'has been added to the fridge stock'
**checkout**
import MySQLdb
def check_out():
db = MySQLdb.connect(host='localhost', user='root', passwd='$$', db='fillmyfridge')
cursor=db.cursor()
user_input=raw_input('please enter the product barcode you wish to remove from the fridge: \n')
query = cursor.execute('update stock set instock=0, howmanytoorder=howmanytoorder + 1, amount = amount - 1 where barcode = %s', (user_input))
if cursor.execute(query):
db.commit()
print 'the following product has been removed from the fridge nd needs to be ordered'
cursor.execute('update shop set stock = 0 where barcode = %s' (user_input)
db.commit()
else:
return 0
thanks again.
lincoln | 0 |
403,662 | 12/31/2008 18:10:12 | 20,730 | 09/22/2008 20:31:29 | -40 | 0 | how to convert a string in c++ or c to integer array . | how to convert string into array off integers ?? can i use of sstream? because atoi doesnt work !! | c | c++ | null | null | null | null | open | how to convert a string in c++ or c to integer array .
===
how to convert string into array off integers ?? can i use of sstream? because atoi doesnt work !! | 0 |
403,756 | 12/31/2008 18:44:04 | 37,418 | 11/13/2008 18:00:22 | 132 | 6 | Benefits of using a constructor? | In my quest in trying to learn more about OOP in PHP. I have come across the constructor function a good few times and simply can't ignore it anymore. In my understanding, the constructor is called upon the moment I create an object, is this correct?
But why would I need to create this constructor if I can use "normal" functions or methods as their called?
cheers,
Keith | php | oop | constructor | null | null | null | open | Benefits of using a constructor?
===
In my quest in trying to learn more about OOP in PHP. I have come across the constructor function a good few times and simply can't ignore it anymore. In my understanding, the constructor is called upon the moment I create an object, is this correct?
But why would I need to create this constructor if I can use "normal" functions or methods as their called?
cheers,
Keith | 0 |
403,769 | 12/31/2008 18:49:11 | 22,392 | 09/25/2008 20:52:44 | 63 | 0 | Trying to add a ToolStrip to a ToolStripPanel side-by-side with an existing ToolStrip | I'm using .net 2.0 with Visual Studio 2005 and I am trying to add two different toolstrips to the top of the form such that they show up side-by-side. I want it to be like Word 2003, where you can add multiple toolstrips to the same row and have them show up in line with each other, rather than dedicating a row to each toolstrip.
So I added a ToolStripPanel and docked it to the top of the form (I didn't use a ToolStripContainer because I don't need all the extra panels; I just need the one at the top). I added both toolstrips and I can get them to show up in the designer window side-by-side, but at runtime the ToolStripPanel separates the toolstrips and gives each toolstrip its own dedicated row. As if to add insult to injury, when i stop debugging and return back to the designer, I am finding that the designer is moving the toolstrips to their own row as well! Am I doing something wrong here? I have been Googling all day and found some information about a ToolStripPanelRow object, but I don't see an easy way to add toolstrips to it (i.e. it doesn't have a ToolStripPanelRow.Controls.Add method or anything like that), all it has is a Controls() property that returns an Array of control objects, and I haven't had much luck trying to add items to that array.
In the interests of full disclosure I should warn you that I have the ToolStripPanel and one of the toolstrips added to a baseclass form, and I am trying to add the other toolstrip to a subclass form that inherits from the baseclass form. The ToolStripPanel and ToolStrip in the baseclass form are both declared "Protected Friend", so this should be working. As I mentioned, the subclass form's designer window will allow me to do it (at least, for a time).
If anyone can help me get this working or at least shed some light on why it isn't, I would be extremely grateful. | .net-2.0 | toolstrip | toolstrippanel | gui | visual-studio-2005 | null | open | Trying to add a ToolStrip to a ToolStripPanel side-by-side with an existing ToolStrip
===
I'm using .net 2.0 with Visual Studio 2005 and I am trying to add two different toolstrips to the top of the form such that they show up side-by-side. I want it to be like Word 2003, where you can add multiple toolstrips to the same row and have them show up in line with each other, rather than dedicating a row to each toolstrip.
So I added a ToolStripPanel and docked it to the top of the form (I didn't use a ToolStripContainer because I don't need all the extra panels; I just need the one at the top). I added both toolstrips and I can get them to show up in the designer window side-by-side, but at runtime the ToolStripPanel separates the toolstrips and gives each toolstrip its own dedicated row. As if to add insult to injury, when i stop debugging and return back to the designer, I am finding that the designer is moving the toolstrips to their own row as well! Am I doing something wrong here? I have been Googling all day and found some information about a ToolStripPanelRow object, but I don't see an easy way to add toolstrips to it (i.e. it doesn't have a ToolStripPanelRow.Controls.Add method or anything like that), all it has is a Controls() property that returns an Array of control objects, and I haven't had much luck trying to add items to that array.
In the interests of full disclosure I should warn you that I have the ToolStripPanel and one of the toolstrips added to a baseclass form, and I am trying to add the other toolstrip to a subclass form that inherits from the baseclass form. The ToolStripPanel and ToolStrip in the baseclass form are both declared "Protected Friend", so this should be working. As I mentioned, the subclass form's designer window will allow me to do it (at least, for a time).
If anyone can help me get this working or at least shed some light on why it isn't, I would be extremely grateful. | 0 |
51,017 | 09/09/2008 00:39:44 | 577 | 08/06/2008 21:36:25 | 403 | 17 | Determining the performance consequences of PHP code | How can you determine the performance consequences of your PHP code if you are not familiar with the internals? Are there ways to figure out how your code is being executed (besides simply load testing it)? I am looking for things like memory usage, execution time for algorithms.
Perhaps Joel would say, "learn C, then read the internals", but I really don't have time to learn C right now (though I'd love to, actually). | php | performance | null | null | null | null | open | Determining the performance consequences of PHP code
===
How can you determine the performance consequences of your PHP code if you are not familiar with the internals? Are there ways to figure out how your code is being executed (besides simply load testing it)? I am looking for things like memory usage, execution time for algorithms.
Perhaps Joel would say, "learn C, then read the internals", but I really don't have time to learn C right now (though I'd love to, actually). | 0 |
51,019 | 09/09/2008 00:40:53 | 4,883 | 09/06/2008 10:24:59 | 356 | 2 | What does it mean when a postgres process is "idle in transaction"? | On a server that I'm looking at, the output of "ps ax | grep postgres" I see 9 postgres processes that look like the following:
postgres: user db 127.0.0.1(55658) idle in transaction
Does this mean that some of the processes are hung, waiting for a transaction to be committed? Any pointers to relevant documentation are appreciated. | postgresql | null | null | null | null | null | open | What does it mean when a postgres process is "idle in transaction"?
===
On a server that I'm looking at, the output of "ps ax | grep postgres" I see 9 postgres processes that look like the following:
postgres: user db 127.0.0.1(55658) idle in transaction
Does this mean that some of the processes are hung, waiting for a transaction to be committed? Any pointers to relevant documentation are appreciated. | 0 |
51,021 | 09/09/2008 00:41:03 | 2,653 | 08/23/2008 23:43:40 | 358 | 23 | Raising Exceptions vs Throwing Exceptions | Ruby has two different exceptions mechanisms: Throw/Catch and Raise/Rescue.
Why do we have two?
When should you use one and not the other? | ruby | exception | null | null | null | null | open | Raising Exceptions vs Throwing Exceptions
===
Ruby has two different exceptions mechanisms: Throw/Catch and Raise/Rescue.
Why do we have two?
When should you use one and not the other? | 0 |
51,022 | 09/09/2008 00:41:03 | 5,304 | 09/09/2008 00:22:24 | 1 | 0 | What is the simplest way to write web apps in Haskell? | I would like to use Haskell more for my projects, and I think if I can get started using it for web apps, it would really help that cause. I have tried happs once or twice but had trouble getting off the ground. Are there simpler/more conventional (more like lamp) frameworks out there that I can use or should I just give happs another try? | haskell | null | null | null | null | null | open | What is the simplest way to write web apps in Haskell?
===
I would like to use Haskell more for my projects, and I think if I can get started using it for web apps, it would really help that cause. I have tried happs once or twice but had trouble getting off the ground. Are there simpler/more conventional (more like lamp) frameworks out there that I can use or should I just give happs another try? | 0 |
51,027 | 09/09/2008 00:46:48 | 2,976 | 08/26/2008 09:42:25 | 579 | 40 | Database system that is not relational. | What are the other types of database systems out there. I've recently came across couchDB that handles data in a non relational way. It got me thinking about what other models are other people is using.
So, I want to know what other types of data model is out there. (I'm not looking for any specifics, just want to look at how other people are handling data storage, my interest are purely academic)
The ones I already know are:
1. RDBMS (mysql,postgres etc..)
2. Document based approach (couchDB, lotus notes)
3. Key/value pair (BerkeleyDB) | database | null | null | null | null | null | open | Database system that is not relational.
===
What are the other types of database systems out there. I've recently came across couchDB that handles data in a non relational way. It got me thinking about what other models are other people is using.
So, I want to know what other types of data model is out there. (I'm not looking for any specifics, just want to look at how other people are handling data storage, my interest are purely academic)
The ones I already know are:
1. RDBMS (mysql,postgres etc..)
2. Document based approach (couchDB, lotus notes)
3. Key/value pair (BerkeleyDB) | 0 |
51,028 | 09/09/2008 00:47:21 | 5,304 | 09/09/2008 00:22:24 | 1 | 0 | Is there a simple way in Haskell to call a shell command in Windows without the command window popping up? | I wrote a Haskell program that runs backup processes periodically on a Windows machine use rsync. But everytime I run the rsync command, a command window opens up to the top of all the windows. I would like to get rid of this window. What is the simplest way to do this? | windows | haskell | commandline | commandwindow | null | 09/17/2008 16:48:07 | off topic | Is there a simple way in Haskell to call a shell command in Windows without the command window popping up?
===
I wrote a Haskell program that runs backup processes periodically on a Windows machine use rsync. But everytime I run the rsync command, a command window opens up to the top of all the windows. I would like to get rid of this window. What is the simplest way to do this? | 2 |
51,032 | 09/09/2008 00:48:23 | 1,597 | 08/17/2008 10:01:21 | 103 | 10 | C++ - foo( void ) | Consider these two function definitions
void foo(){}
void foo(void){}
Is there any difference between these two? If not, why is the void argument there? Aesthetic reasons?
| c++ | arguments | null | null | null | null | open | C++ - foo( void )
===
Consider these two function definitions
void foo(){}
void foo(void){}
Is there any difference between these two? If not, why is the void argument there? Aesthetic reasons?
| 0 |
51,050 | 09/09/2008 01:00:38 | 2,443 | 08/22/2008 10:53:30 | 389 | 27 | What are some good usability guidelines an average developer should follow? | I'm not a usability specialist, and I really don't care to be one.
I just want a small set of rules of thumb that I can follow while coding my User Interfaces so that my product has decent usability.
At first I thought that this question would be easy to answer "Use your common sense", but if it's so common among us developers we wouldn't, as a group, have a reputation for our horrible interfaces.
Any Suggestions? | usability | guildelines | null | null | null | 07/05/2012 05:07:33 | not constructive | What are some good usability guidelines an average developer should follow?
===
I'm not a usability specialist, and I really don't care to be one.
I just want a small set of rules of thumb that I can follow while coding my User Interfaces so that my product has decent usability.
At first I thought that this question would be easy to answer "Use your common sense", but if it's so common among us developers we wouldn't, as a group, have a reputation for our horrible interfaces.
Any Suggestions? | 4 |
51,054 | 09/09/2008 01:05:28 | 1,862 | 08/18/2008 23:53:20 | 1,517 | 122 | Batch file to delete files older than N days | I am looking for a way to delete all files older than 7 days in an MS-DOS batch file. I've search around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the task. Similar things can be [done in BASH][1] in just a couple lines of code. It seems that something at least remotely easy could be done for batch files windows. I'm looking for a solution that works in a standard windows command prompt, without any extra utilities. Please no PowersHell or Cygwin either.
[1]: http://stackoverflow.com/questions/25785/delete-all-but-the-most-recent-x-files-in-bash | date | batch | command | cmd.exe | delete | null | open | Batch file to delete files older than N days
===
I am looking for a way to delete all files older than 7 days in an MS-DOS batch file. I've search around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the task. Similar things can be [done in BASH][1] in just a couple lines of code. It seems that something at least remotely easy could be done for batch files windows. I'm looking for a solution that works in a standard windows command prompt, without any extra utilities. Please no PowersHell or Cygwin either.
[1]: http://stackoverflow.com/questions/25785/delete-all-but-the-most-recent-x-files-in-bash | 0 |
51,088 | 09/09/2008 01:45:24 | 1,075 | 08/12/2008 10:13:30 | 1,254 | 76 | Plugin for R# similar to CodeRush "statement highlight" | See here [http://www.hanselman.com/blog/InSearchOfThePerfectMonospacedProgrammersFontInconsolata.aspx][1] - for want of a better description - the statement block highlighting. I understand this is a feature of CodeRush - does R# have either anything similar, or a plugin to do the same?
[1]: http://www.hanselman.com/blog/InSearchOfThePerfectMonospacedProgrammersFontInconsolata.aspx | resharper | codehighlighter | null | null | null | null | open | Plugin for R# similar to CodeRush "statement highlight"
===
See here [http://www.hanselman.com/blog/InSearchOfThePerfectMonospacedProgrammersFontInconsolata.aspx][1] - for want of a better description - the statement block highlighting. I understand this is a feature of CodeRush - does R# have either anything similar, or a plugin to do the same?
[1]: http://www.hanselman.com/blog/InSearchOfThePerfectMonospacedProgrammersFontInconsolata.aspx | 0 |
51,092 | 09/09/2008 01:49:32 | 5,295 | 09/08/2008 22:12:56 | 1 | 0 | SQL: aggregate function and group by | Consider the Oracle "emp" table. I'd like to get the employees with the top salary with department = 20 and job = clerk. Also assume that there is no "empno" column, and that the primary key involves a number of columns. You can do this with:
select * from scott.emp
where
deptno = 20 and job = 'CLERK'
and sal = (
select max(sal) from scott.emp
where deptno = 20 and job = 'CLERK')
This works, but I have to duplicate the test deptno = 20 and job = 'CLERK', which I would like to avoid. Is there a more elegant way to write this, maybe using a group by? BTW, if this matters, I am using Oracle. | sql | oracle | aggregate | null | null | null | open | SQL: aggregate function and group by
===
Consider the Oracle "emp" table. I'd like to get the employees with the top salary with department = 20 and job = clerk. Also assume that there is no "empno" column, and that the primary key involves a number of columns. You can do this with:
select * from scott.emp
where
deptno = 20 and job = 'CLERK'
and sal = (
select max(sal) from scott.emp
where deptno = 20 and job = 'CLERK')
This works, but I have to duplicate the test deptno = 20 and job = 'CLERK', which I would like to avoid. Is there a more elegant way to write this, maybe using a group by? BTW, if this matters, I am using Oracle. | 0 |
51,093 | 09/09/2008 01:49:55 | 357 | 08/05/2008 01:29:23 | 1,152 | 64 | Ubuntu 32 bit maximum address space | Jeff covered this a while back [on his blog][1] in terms of 32 bit Vista.
Does the same 32 bit 4 GB memory cap that applies in 32 bit Vista apply to 32 bit Ubuntu? Are there any 32 bit operating systems that have creatively solved this problem?
[1]: http://www.codinghorror.com/blog/archives/000811.html | memory | ubuntu | operating-system | null | null | null | open | Ubuntu 32 bit maximum address space
===
Jeff covered this a while back [on his blog][1] in terms of 32 bit Vista.
Does the same 32 bit 4 GB memory cap that applies in 32 bit Vista apply to 32 bit Ubuntu? Are there any 32 bit operating systems that have creatively solved this problem?
[1]: http://www.codinghorror.com/blog/archives/000811.html | 0 |
51,094 | 09/09/2008 01:50:45 | 245 | 08/04/2008 00:38:47 | 632 | 16 | Payment Processors - What do I need to know if I want to accept credit cards on my website? | [This question][1] talks about different payment processors and what they cost, but I'm looking for the answer to what do I need to do if I want to accept credit card payments?
What if I need to *store* credit card numbers for customers?
[PCI Data Security][2], which is apparently the standard for storing credit card info, has a bunch of general requirements, but [how does one implement them][3]?
And what about the vendors, like [Visa][4], who have their own best practices?
Do I need to have keyfob access to the machine? What about physically protecting it from hackers in the building? Or even what if someone got their hands on the backup files with the sql server data files on it?
[1]: http://stackoverflow.com/questions/2556/whats-the-best-online-payment-processing-solution
[2]: https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml
[3]: http://en.wikipedia.org/wiki/PCI_DSS
[4]: http://usa.visa.com/merchants/risk_management/cisp_payment_applications.html | e-commerce | pci | security | null | null | 05/18/2012 15:13:42 | not constructive | Payment Processors - What do I need to know if I want to accept credit cards on my website?
===
[This question][1] talks about different payment processors and what they cost, but I'm looking for the answer to what do I need to do if I want to accept credit card payments?
What if I need to *store* credit card numbers for customers?
[PCI Data Security][2], which is apparently the standard for storing credit card info, has a bunch of general requirements, but [how does one implement them][3]?
And what about the vendors, like [Visa][4], who have their own best practices?
Do I need to have keyfob access to the machine? What about physically protecting it from hackers in the building? Or even what if someone got their hands on the backup files with the sql server data files on it?
[1]: http://stackoverflow.com/questions/2556/whats-the-best-online-payment-processing-solution
[2]: https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml
[3]: http://en.wikipedia.org/wiki/PCI_DSS
[4]: http://usa.visa.com/merchants/risk_management/cisp_payment_applications.html | 4 |
51,098 | 09/09/2008 01:56:09 | 271 | 08/04/2008 10:25:01 | 567 | 35 | Modifying a spreadsheet using a VB macro | I have two spreadsheets... when one gets modified in a certain way I want to have a macro run that modifies the second in an appropriate manner. I've already isolated the event I need to act on (the modification of any cell in a particular column), I just can't seem to find any concrete information on accessing and modifying another spreadsheet (this spreadsheet is located on a different LAN share also... the user has access to both, though).
Any help would be great. References on how to do this or something similar are just as good as concrete code samples. | excel | vba | macros | null | null | null | open | Modifying a spreadsheet using a VB macro
===
I have two spreadsheets... when one gets modified in a certain way I want to have a macro run that modifies the second in an appropriate manner. I've already isolated the event I need to act on (the modification of any cell in a particular column), I just can't seem to find any concrete information on accessing and modifying another spreadsheet (this spreadsheet is located on a different LAN share also... the user has access to both, though).
Any help would be great. References on how to do this or something similar are just as good as concrete code samples. | 0 |
51,108 | 09/09/2008 02:05:36 | 4,910 | 09/06/2008 14:49:31 | 23 | 3 | Spartan Programming | I really enjoyed [Jeff's post][1] on [Spartan Programming][2]. I agree that code like that is a joy to read. Unfortunately, I'm not so sure it would necessarily be a joy to work with.
For years I have read about and adhered to the "one-expression-per-line" practice. I have fought the good fight and held my ground when many programming books countered this advice with example code like:
while (bytes = read(...))
{
...
}
while (GetMessage(...))
{
...
}
Recently, I've advocated one expression per line for more practical reasons - debugging and production support. Getting a log file from production that claims a NullPointer exception at "line 65" which reads:
ObjectA a = getTheUser(session.getState().getAccount().getAccountNumber());
is frustrating and entirely avoidable. Short of grabbing an expert with the code that can choose the "most likely" object that was null ... this is a real practical pain.
One expression per line also helps out quite a bit while stepping through code. I practice this with the assumption that most modern compilers can optimize away all the superfluous temp objects I've just created ...
I try to be neat - but cluttering my code with explicit objects sure feels laborious and at times, does not make the code easier to browse - but it really has come in handy when tracing things down in production or stepping through my or someone else's code.
What style do *you* advocate and can you rationalize it in a practical sense?
[1]: http://www.codinghorror.com/blog/archives/001148.html
[2]: http://ssdl-wiki.cs.technion.ac.il/wiki/index.php/Spartan_programming
| language-agnostic | style | spartan | null | null | null | open | Spartan Programming
===
I really enjoyed [Jeff's post][1] on [Spartan Programming][2]. I agree that code like that is a joy to read. Unfortunately, I'm not so sure it would necessarily be a joy to work with.
For years I have read about and adhered to the "one-expression-per-line" practice. I have fought the good fight and held my ground when many programming books countered this advice with example code like:
while (bytes = read(...))
{
...
}
while (GetMessage(...))
{
...
}
Recently, I've advocated one expression per line for more practical reasons - debugging and production support. Getting a log file from production that claims a NullPointer exception at "line 65" which reads:
ObjectA a = getTheUser(session.getState().getAccount().getAccountNumber());
is frustrating and entirely avoidable. Short of grabbing an expert with the code that can choose the "most likely" object that was null ... this is a real practical pain.
One expression per line also helps out quite a bit while stepping through code. I practice this with the assumption that most modern compilers can optimize away all the superfluous temp objects I've just created ...
I try to be neat - but cluttering my code with explicit objects sure feels laborious and at times, does not make the code easier to browse - but it really has come in handy when tracing things down in production or stepping through my or someone else's code.
What style do *you* advocate and can you rationalize it in a practical sense?
[1]: http://www.codinghorror.com/blog/archives/001148.html
[2]: http://ssdl-wiki.cs.technion.ac.il/wiki/index.php/Spartan_programming
| 0 |
51,109 | 09/09/2008 02:06:13 | 5,309 | 09/09/2008 01:21:26 | 1 | 0 | Win32 List-View Control SubItem padding for custom-drawn SubItems? | When using custom-draw to draw the entire contents of a ListView SubItem (in
Report view), it would be nice to be able to apply the same left and right
padding that is applied for non-custom-drawn items.
Is there a way to programmatically retrieve this padding value? Is it
related to the width of a particular character (" " or "w" or something?) or
is it a fixed value (6px on left and 3px on right or something) or...? | windows | winapi | null | null | null | null | open | Win32 List-View Control SubItem padding for custom-drawn SubItems?
===
When using custom-draw to draw the entire contents of a ListView SubItem (in
Report view), it would be nice to be able to apply the same left and right
padding that is applied for non-custom-drawn items.
Is there a way to programmatically retrieve this padding value? Is it
related to the width of a particular character (" " or "w" or something?) or
is it a fixed value (6px on left and 3px on right or something) or...? | 0 |
51,113 | 09/09/2008 02:08:36 | 4,541 | 09/04/2008 17:37:04 | 102 | 2 | What's the best way to detect if an IDataReader is empty? | It seems like IDataReader.Read() is always true at least one time (If I'm wrong about this let me know.) So how do you tell if it has no records without just wrapping it in a try/catch? | c# | ado.net | null | null | null | null | open | What's the best way to detect if an IDataReader is empty?
===
It seems like IDataReader.Read() is always true at least one time (If I'm wrong about this let me know.) So how do you tell if it has no records without just wrapping it in a try/catch? | 0 |
51,114 | 09/09/2008 02:09:25 | 506 | 08/06/2008 12:56:30 | 85 | 12 | ASP.NET 3.5 Without Microsoft SQL Server - What do I lose? | I was just assigned to do a CMS using ASP.net 3.5 and MySQL. I am kind of new to ASP.NET development (quite sufficient with C#) and **I am wondering what major ASP.NET and general .NET features I am losing when I don't have the option to use Microsoft SQL Server.**
I know already from quick Googling that I lose LINQ (and I was really looking forward to using this to build my model layer!), but I am not sure what other handy features I will lose. Since I've been relying on ASP.net tutorials which assume that you use MS SQL Server, I feel a chunk of my ASP.net knowledge just become invalid.
Thanks!
| asp.net | mysql | null | null | null | null | open | ASP.NET 3.5 Without Microsoft SQL Server - What do I lose?
===
I was just assigned to do a CMS using ASP.net 3.5 and MySQL. I am kind of new to ASP.NET development (quite sufficient with C#) and **I am wondering what major ASP.NET and general .NET features I am losing when I don't have the option to use Microsoft SQL Server.**
I know already from quick Googling that I lose LINQ (and I was really looking forward to using this to build my model layer!), but I am not sure what other handy features I will lose. Since I've been relying on ASP.net tutorials which assume that you use MS SQL Server, I feel a chunk of my ASP.net knowledge just become invalid.
Thanks!
| 0 |
51,124 | 09/09/2008 02:16:44 | 5,023 | 09/07/2008 12:27:27 | 1 | 3 | Usefulness of SQL Server "with encryption" statement | Recently a friend and I were talking about securing stored procedure code in a SQL server database.
From distant memory, I'm pretty certain that "with encryption" is incredibly easily broken in all versions of SQL Server, however he said it has been greatly improved in SQL 2005. As a result I have not seriously considered it as a security option in any systems I have ever worked on.
So in what scenarious could "with encryption" be used, and when should it be avoided at all costs? | sql-server | null | null | null | null | null | open | Usefulness of SQL Server "with encryption" statement
===
Recently a friend and I were talking about securing stored procedure code in a SQL server database.
From distant memory, I'm pretty certain that "with encryption" is incredibly easily broken in all versions of SQL Server, however he said it has been greatly improved in SQL 2005. As a result I have not seriously considered it as a security option in any systems I have ever worked on.
So in what scenarious could "with encryption" be used, and when should it be avoided at all costs? | 0 |
51,126 | 09/09/2008 02:21:26 | 1,496 | 08/15/2008 21:59:26 | 1 | 0 | How do you Modify TextBox Control Tab Stops | When you use a Windows Forms TextBox, the default number of tab stops (spaces) is 8. How do you modify this? | c# | .net | winforms | null | null | null | open | How do you Modify TextBox Control Tab Stops
===
When you use a Windows Forms TextBox, the default number of tab stops (spaces) is 8. How do you modify this? | 0 |
51,129 | 09/09/2008 02:24:08 | 245 | 08/04/2008 00:38:47 | 657 | 19 | How do I get a value from an XML web service in C#? | In C#, if I need to open an HTTP connection, download XML and get one value from the result, how would I do that?
For consistency, imagine the webservice is at www.webservice.com and that if you pass it the POST argument fXML=1 it gives you back
<xml><somekey>somevalue</somekey></xml>
I'd like it to spit out "somevalue". | c# | xml | null | null | null | null | open | How do I get a value from an XML web service in C#?
===
In C#, if I need to open an HTTP connection, download XML and get one value from the result, how would I do that?
For consistency, imagine the webservice is at www.webservice.com and that if you pass it the POST argument fXML=1 it gives you back
<xml><somekey>somevalue</somekey></xml>
I'd like it to spit out "somevalue". | 0 |
51,130 | 09/09/2008 02:24:18 | 3,347 | 08/28/2008 03:11:14 | 228 | 39 | How many real world developers are involved with the Demoscene? | I grew up learning to code based on what I've experienced with the [demoscene][1]. It seems to be a pretty sparse subculture in the US. How many developers watch or participate in the scene?
Teaser: If you haven't checked out the scene before, take a look at one of my favorite: [Debris][2]. Watch on [demoscene.tv][3] or download the [app][4] (179k) and run it yourself. No video, all realtime rendering and audio. Think, a small group of guys wrote this for a competition on their free time.
[1]: http://en.wikipedia.org/wiki/Demoscene
[2]: http://www.pouet.net/prod.php?which=30244
[3]: http://demoscene.tv/page.php?id=172&lang=uk&vsmaction=view_prod&id_prod=12909
[4]: http://www.scene.org/file.php?file=/parties/2007/breakpoint07/demo/fr-041_debris.zip&fileinfo | demoscene | null | null | null | null | null | open | How many real world developers are involved with the Demoscene?
===
I grew up learning to code based on what I've experienced with the [demoscene][1]. It seems to be a pretty sparse subculture in the US. How many developers watch or participate in the scene?
Teaser: If you haven't checked out the scene before, take a look at one of my favorite: [Debris][2]. Watch on [demoscene.tv][3] or download the [app][4] (179k) and run it yourself. No video, all realtime rendering and audio. Think, a small group of guys wrote this for a competition on their free time.
[1]: http://en.wikipedia.org/wiki/Demoscene
[2]: http://www.pouet.net/prod.php?which=30244
[3]: http://demoscene.tv/page.php?id=172&lang=uk&vsmaction=view_prod&id_prod=12909
[4]: http://www.scene.org/file.php?file=/parties/2007/breakpoint07/demo/fr-041_debris.zip&fileinfo | 0 |
51,135 | 09/09/2008 02:30:05 | 2,923 | 08/26/2008 02:33:00 | 1 | 2 | Define realtime on the web for business | It drives me nuts to hear business proponents using the term realtime for web-based systems. I'm becoming the crazy in the room, chanting, "There is no such thing as realtime on the web! We're in banking, not the rocket launch/ship navigation/airplane autopilot business!"
Anyone have anything better for performance specifications than realtime, or its horrible hybrid, near-realtime? | architecture | requirements | analysis | null | null | null | open | Define realtime on the web for business
===
It drives me nuts to hear business proponents using the term realtime for web-based systems. I'm becoming the crazy in the room, chanting, "There is no such thing as realtime on the web! We're in banking, not the rocket launch/ship navigation/airplane autopilot business!"
Anyone have anything better for performance specifications than realtime, or its horrible hybrid, near-realtime? | 0 |
51,139 | 09/09/2008 02:33:47 | 4,550 | 09/04/2008 17:50:43 | 109 | 11 | How to insert a row into a dataset via SSIS | I'm trying to create an SSIS package that takes data from an XML data source and for each row inserts another row with some preset values. Any ideas? I'm thinking I could use a DataReader source to generate the preset values by doing the following:
SELECT 'foo' as 'attribute1', 'bar' as 'attribute2'
The question is, how would I insert one row of this type for every row in the XML data source? | sql-server | ssis | null | null | null | null | open | How to insert a row into a dataset via SSIS
===
I'm trying to create an SSIS package that takes data from an XML data source and for each row inserts another row with some preset values. Any ideas? I'm thinking I could use a DataReader source to generate the preset values by doing the following:
SELECT 'foo' as 'attribute1', 'bar' as 'attribute2'
The question is, how would I insert one row of this type for every row in the XML data source? | 0 |
51,146 | 09/09/2008 02:41:26 | 5,309 | 09/09/2008 01:21:26 | 1 | 0 | Win32 ToolTip disappears never to re-appear with Commctl 6 | I'm creating a [ToolTip](http://msdn.microsoft.com/en-us/library/bb760250(VS.85).aspx) window and adding tools to it using the flags
TTF_IDISHWND | TTF_SUBCLASS. (c++, win32)
I have a manifest file such that my program uses the new WindowsXP themes
(comctrl32 version 6).
When I hover over a registered tool, the tip appears.
Good.
When I click the mouse, the tip disappears.
Ok.
However, moving away from the tool and back
again does not make the tip re-appear. I need to hover over a different tool
and then come back to my tool to get the tip to come back.
When I remove my manifest file (to use the older non-XP comctrl32), the
problem goes away.
After doing some experimentation, I discovered the following differences
between ToolTips in Comctl32 version 5 (old) and Comctl32 version 6 (new):
- New TTF_TRANSPARENT ToolTips (when used In-Place) actually return
HTCLIENT from WM_NCITTEST if a mouse button is down, thus getting
WM_LBUTTONDOWN and stealing focus for a moment before vanishing. This causes
the application's border to flash.
- Old TTF_TRANSPARENT ToolTips always return HTTRANSPARENT from WM_NCHITTEST,
and thus never get WM_LBUTTONDOWN themselves and never steal focus. (This seems to be just aesthetic, but may impact the next point...)
- New ToolTips seem not to get WM_TIMER events after a mouse-click, and
only resume getting (a bunch of) timer events after being de-activated and
re-activated. Thus, they do not re-display their tip window after a mouse
click and release.
- Old ToolTips get a WM_TIMER message as soon as the mouse is moved again
after click/release, so they are ready to re-display their tip.
Thus, as a comctl32 workaround, I had to:
- subclass the TOOLTIPS_CLASS window and always return HTTRANSPARENT from
WM_NCHITTEST if the tool asked for transparency.
- avoid using TTF_SUBCLASS and rather process the mouse messages myself so
I could de-activate/re-activate upon receiving WM_xBUTTONUP.
I assume that the change in internal behavior was to accommodate the new "clickable" features in ToolTips like hyperlinks, but the hover behavior appears to be thus broken.
Does anyone know of a better solution than my subclass workaround? Am I missing some other point? | windows | winapi | null | null | null | null | open | Win32 ToolTip disappears never to re-appear with Commctl 6
===
I'm creating a [ToolTip](http://msdn.microsoft.com/en-us/library/bb760250(VS.85).aspx) window and adding tools to it using the flags
TTF_IDISHWND | TTF_SUBCLASS. (c++, win32)
I have a manifest file such that my program uses the new WindowsXP themes
(comctrl32 version 6).
When I hover over a registered tool, the tip appears.
Good.
When I click the mouse, the tip disappears.
Ok.
However, moving away from the tool and back
again does not make the tip re-appear. I need to hover over a different tool
and then come back to my tool to get the tip to come back.
When I remove my manifest file (to use the older non-XP comctrl32), the
problem goes away.
After doing some experimentation, I discovered the following differences
between ToolTips in Comctl32 version 5 (old) and Comctl32 version 6 (new):
- New TTF_TRANSPARENT ToolTips (when used In-Place) actually return
HTCLIENT from WM_NCITTEST if a mouse button is down, thus getting
WM_LBUTTONDOWN and stealing focus for a moment before vanishing. This causes
the application's border to flash.
- Old TTF_TRANSPARENT ToolTips always return HTTRANSPARENT from WM_NCHITTEST,
and thus never get WM_LBUTTONDOWN themselves and never steal focus. (This seems to be just aesthetic, but may impact the next point...)
- New ToolTips seem not to get WM_TIMER events after a mouse-click, and
only resume getting (a bunch of) timer events after being de-activated and
re-activated. Thus, they do not re-display their tip window after a mouse
click and release.
- Old ToolTips get a WM_TIMER message as soon as the mouse is moved again
after click/release, so they are ready to re-display their tip.
Thus, as a comctl32 workaround, I had to:
- subclass the TOOLTIPS_CLASS window and always return HTTRANSPARENT from
WM_NCHITTEST if the tool asked for transparency.
- avoid using TTF_SUBCLASS and rather process the mouse messages myself so
I could de-activate/re-activate upon receiving WM_xBUTTONUP.
I assume that the change in internal behavior was to accommodate the new "clickable" features in ToolTips like hyperlinks, but the hover behavior appears to be thus broken.
Does anyone know of a better solution than my subclass workaround? Am I missing some other point? | 0 |
51,148 | 09/09/2008 02:54:06 | 1,292 | 08/14/2008 12:37:56 | 23 | 2 | How do I find out if a process is already running using c#? | I have C# winforms application that needs to start an external exe from time to time, but I do not wish to start another process if one is already running, but rather switch to it.
So how in C# would I so this in the example below?
using System.Diagnostics;
...
Process foo = new Process();
foo.StartInfo.FileName = @"C:\bar\foo.exe";
foo.StartInfo.Arguments = "Username Password";
bool isRunning = //TODO: Check to see if process foo.exe is already running
if (isRunning)
{
//TODO: Switch to foo.exe process
}
else
{
foo.Start();
}
| c# | winforms | external-process | null | null | null | open | How do I find out if a process is already running using c#?
===
I have C# winforms application that needs to start an external exe from time to time, but I do not wish to start another process if one is already running, but rather switch to it.
So how in C# would I so this in the example below?
using System.Diagnostics;
...
Process foo = new Process();
foo.StartInfo.FileName = @"C:\bar\foo.exe";
foo.StartInfo.Arguments = "Username Password";
bool isRunning = //TODO: Check to see if process foo.exe is already running
if (isRunning)
{
//TODO: Switch to foo.exe process
}
else
{
foo.Start();
}
| 0 |
51,150 | 09/09/2008 02:58:15 | 5,309 | 09/09/2008 01:21:26 | 6 | 0 | Why does clicking a child window not always bring the application to the foreground? | When an application is behind another applications and
I click on my application's taskbar icon, I expect the entire application to
come to the top of the z-order, even if an app-modal, WS_POPUP dialog box is
open.
However, some of the time, for some of my (and others') dialog boxes, only the dialog box comes to the front; the rest of the application stays behind.
I've looked at Spy++ and for the ones that work correctly, I can see
WM_WINDOWPOSCHANGING being sent to the dialog's parent. For the ones that
leave the rest of the application behind, WM_WINDOWPOSCHANGING is not being
sent to the dialog's parent.
I have an example where one dialog usually brings the whole app with it and the other does not. Both the working dialog box and the non-working dialog box have the same window style, substyle, parent, owner, ontogeny.
In short, both are WS_POPUPWINDOW windows created with DialogBoxParam(),
having passed in identical HWNDs as the third argument.
Has anyone else noticed this behavioral oddity in Windows programs? What messages does the TaskBar send to the application when I click its button? Who's responsibility is it to ensure that *all* of the application's windows come to the foreground?
In my case the base parentage is an MDI frame...does that factor in somehow? | windows | winapi | null | null | null | null | open | Why does clicking a child window not always bring the application to the foreground?
===
When an application is behind another applications and
I click on my application's taskbar icon, I expect the entire application to
come to the top of the z-order, even if an app-modal, WS_POPUP dialog box is
open.
However, some of the time, for some of my (and others') dialog boxes, only the dialog box comes to the front; the rest of the application stays behind.
I've looked at Spy++ and for the ones that work correctly, I can see
WM_WINDOWPOSCHANGING being sent to the dialog's parent. For the ones that
leave the rest of the application behind, WM_WINDOWPOSCHANGING is not being
sent to the dialog's parent.
I have an example where one dialog usually brings the whole app with it and the other does not. Both the working dialog box and the non-working dialog box have the same window style, substyle, parent, owner, ontogeny.
In short, both are WS_POPUPWINDOW windows created with DialogBoxParam(),
having passed in identical HWNDs as the third argument.
Has anyone else noticed this behavioral oddity in Windows programs? What messages does the TaskBar send to the application when I click its button? Who's responsibility is it to ensure that *all* of the application's windows come to the foreground?
In my case the base parentage is an MDI frame...does that factor in somehow? | 0 |
51,156 | 09/09/2008 03:11:59 | 131 | 08/02/2008 08:58:50 | 106 | 2 | Is there a way of selecting the last item of a list with CSS? | Say I have a list as follows:
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
Is there a CSS selector that will allow me to directly select the last item of a list? In this case item 3.
Cheers! | css | selectors | null | null | null | null | open | Is there a way of selecting the last item of a list with CSS?
===
Say I have a list as follows:
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
Is there a CSS selector that will allow me to directly select the last item of a list? In this case item 3.
Cheers! | 0 |
51,157 | 09/09/2008 03:13:18 | 5,309 | 09/09/2008 01:21:26 | 6 | 0 | Can the Weblogic default handler display the list of contexts? | In Jetty, if there is no deployment at '/' then the [DefaultHandler](http://www.mortbay.org/jetty/jetty-6/xref/org/mortbay/jetty/handler/DefaultHandler.html) displays a list of known contexts. This is very useful during development.
Is it possible to configure BEA Weblogic to provide a similar convenience? | java | java-ee | weblogic | null | null | null | open | Can the Weblogic default handler display the list of contexts?
===
In Jetty, if there is no deployment at '/' then the [DefaultHandler](http://www.mortbay.org/jetty/jetty-6/xref/org/mortbay/jetty/handler/DefaultHandler.html) displays a list of known contexts. This is very useful during development.
Is it possible to configure BEA Weblogic to provide a similar convenience? | 0 |
51,165 | 09/09/2008 03:25:15 | 5,304 | 09/09/2008 00:22:24 | 18 | 3 | How do you do string comparison in javascript? | I have a list of data object to sort. I want to do something like
<pre>list.sort(function(item1, item2){
return item1.attr - item2.attr;
})
</pre>
to sort it based on a string attribute of the object. But found that the minus(-) operator does not work for strings in javascript. So how do you do string comparison? | javascript | string | basic | null | null | null | open | How do you do string comparison in javascript?
===
I have a list of data object to sort. I want to do something like
<pre>list.sort(function(item1, item2){
return item1.attr - item2.attr;
})
</pre>
to sort it based on a string attribute of the object. But found that the minus(-) operator does not work for strings in javascript. So how do you do string comparison? | 0 |
51,176 | 09/09/2008 03:40:22 | 5,136 | 09/08/2008 05:49:47 | 1 | 0 | Seperating concerns with Linq To SQL and DTO's | I recently started a new webforms project and decided to seperate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following:
(from c in dataContext.Customers
where c.Active == true
select new DTO.Customer
{
CustomerID = c.CustomerID,
Name = c.CustomerName,
...
}).ToList()
Although building the DTO objects adds work, this feels like a better approach to a tight binding between Business & Data layers and means I can test the Business layer without a database being present.
My question is, is this good practice?, Is there a way of generating the DTO's (maybe via SQLMetal), and what other problems might I strike as the project progresses. | c# | dto-mapping | null | null | null | null | open | Seperating concerns with Linq To SQL and DTO's
===
I recently started a new webforms project and decided to seperate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following:
(from c in dataContext.Customers
where c.Active == true
select new DTO.Customer
{
CustomerID = c.CustomerID,
Name = c.CustomerName,
...
}).ToList()
Although building the DTO objects adds work, this feels like a better approach to a tight binding between Business & Data layers and means I can test the Business layer without a database being present.
My question is, is this good practice?, Is there a way of generating the DTO's (maybe via SQLMetal), and what other problems might I strike as the project progresses. | 0 |
51,180 | 09/09/2008 03:41:23 | 4,458 | 09/03/2008 22:10:02 | 1 | 1 | How do I stop visual studio from automatically inserting asterisk during a block comment? | I'm tearing my hair out with this one. If I start a block comment ( /* ) in VS.NET 2005+ then carriage return, VS insists that I have another asterisk ( * ). I know there's an option to turn this off but I just can't find it. Anyone know how to turn this feature off? | visual-studio | tips-and-tricks | null | null | null | null | open | How do I stop visual studio from automatically inserting asterisk during a block comment?
===
I'm tearing my hair out with this one. If I start a block comment ( /* ) in VS.NET 2005+ then carriage return, VS insists that I have another asterisk ( * ). I know there's an option to turn this off but I just can't find it. Anyone know how to turn this feature off? | 0 |
51,195 | 09/09/2008 03:51:31 | 4,639 | 09/04/2008 23:07:22 | 30 | 1 | How to get hashes out of arrays in Perl? | I want to write a little "DBQuery" function in perl so I can have one-liners which send an SQL statement and receive back and an array of hashes, i.e. a recordset. However, I'm running into an issue with Perl syntax (and probably some odd pointer/reference issue) which is preventing me from packing out the information from the hash that I'm getting from the database. The sample code below demonstrates the issue.
I can get the data "Jim" out of a hash inside an array with this syntax:
print $records[$index]{'firstName'}
returns "Jim"
but if I copy the hash record in the array to its own hash variable first, then I strangely can't access the data anymore in that hash:
<pre><code>
%row = $records[$index];
$row{'firstName'};
</code></pre>
returns "" (blank)
Here is the full sample code showing the problem. Any help is appreciated:
<pre><code>
my @records = (
{'id' => 1, 'firstName' => 'Jim'},
{'id' => 2, 'firstName' => 'Joe'}
);
my @records2 = ();
$numberOfRecords = scalar(@records);
print "number of records: " . $numberOfRecords . "\n";
for(my $index=0; $index < $numberOfRecords; $index++) {
#works
print 'you can print the records like this: ' . $records[$index]{'firstName'} . "\n";
#does NOT work
%row = $records[$index];
print 'but not like this: ' . $row{'firstName'} . "\n";
}
</code></pre> | perl | arrays | hash | null | null | null | open | How to get hashes out of arrays in Perl?
===
I want to write a little "DBQuery" function in perl so I can have one-liners which send an SQL statement and receive back and an array of hashes, i.e. a recordset. However, I'm running into an issue with Perl syntax (and probably some odd pointer/reference issue) which is preventing me from packing out the information from the hash that I'm getting from the database. The sample code below demonstrates the issue.
I can get the data "Jim" out of a hash inside an array with this syntax:
print $records[$index]{'firstName'}
returns "Jim"
but if I copy the hash record in the array to its own hash variable first, then I strangely can't access the data anymore in that hash:
<pre><code>
%row = $records[$index];
$row{'firstName'};
</code></pre>
returns "" (blank)
Here is the full sample code showing the problem. Any help is appreciated:
<pre><code>
my @records = (
{'id' => 1, 'firstName' => 'Jim'},
{'id' => 2, 'firstName' => 'Joe'}
);
my @records2 = ();
$numberOfRecords = scalar(@records);
print "number of records: " . $numberOfRecords . "\n";
for(my $index=0; $index < $numberOfRecords; $index++) {
#works
print 'you can print the records like this: ' . $records[$index]{'firstName'} . "\n";
#does NOT work
%row = $records[$index];
print 'but not like this: ' . $row{'firstName'} . "\n";
}
</code></pre> | 0 |
51,202 | 09/09/2008 03:58:06 | 1,533 | 08/16/2008 12:20:13 | 119 | 19 | Can a STP template be hidden from subsite creation page? | When a template is added using the addtemplate stsadm command, it becomes available to everyone when creating a subsite. Is there any way to make it only available when a site collection is being created? | sharepoint | templates | moss | null | null | null | open | Can a STP template be hidden from subsite creation page?
===
When a template is added using the addtemplate stsadm command, it becomes available to everyone when creating a subsite. Is there any way to make it only available when a site collection is being created? | 0 |
51,210 | 09/09/2008 04:08:54 | 5,266 | 09/08/2008 19:40:56 | 1 | 3 | Best way to deal with RoutingError in Rails 2.1.x? | So. I'm playing with the routing.rb code in Rails 2.1, and trying to to get it to the point where I can do something useful with the RoutingError exception that is thrown when it can't find the appropriate path.
This is a somewhat tricky problem, because there are some class of URLs which are just plain BAD: the /azenv.php bot attacks, the people typing /bar/foo/baz into the URL, etc... we don't want that.
Then there's subtle routing problems, where we do want to be notified: /artists/<badid> for example, or /<year>/<month>/<day>. In these situations, we may want an error being thrown, or not... or we get Google sending us URLs which used to be valid but are no longer because people deleted them.
In each of these situations, I want a way to contain, analyze and filter the path that we get back, or at least some Railsy way to manage routing past the normal 'fallback catchall' url. Does this exist? | ruby | ruby-on-rails | routing | null | null | null | open | Best way to deal with RoutingError in Rails 2.1.x?
===
So. I'm playing with the routing.rb code in Rails 2.1, and trying to to get it to the point where I can do something useful with the RoutingError exception that is thrown when it can't find the appropriate path.
This is a somewhat tricky problem, because there are some class of URLs which are just plain BAD: the /azenv.php bot attacks, the people typing /bar/foo/baz into the URL, etc... we don't want that.
Then there's subtle routing problems, where we do want to be notified: /artists/<badid> for example, or /<year>/<month>/<day>. In these situations, we may want an error being thrown, or not... or we get Google sending us URLs which used to be valid but are no longer because people deleted them.
In each of these situations, I want a way to contain, analyze and filter the path that we get back, or at least some Railsy way to manage routing past the normal 'fallback catchall' url. Does this exist? | 0 |
51,211 | 09/09/2008 04:09:12 | 361 | 08/05/2008 04:20:27 | 539 | 23 | E-commerce tutorials | I've never done anything with e-commerce before but I was asked today if I could build such a site. Building a website is within my experience but I'm not sure about the nitty gritty parts like processing credit cards and ssl certificates. I was wondering if anybody had any useful tutorials or hints about where to start. Ideally I would like to work with ASP.net MVC, but I wouldn't object to a framework. I've read a couple of other questions on credit card processing and I've also stumbled across <http://blog.wekeroad.com/mvc-storefront/mvc-storefront-part-1/> which seems like it will be very useful.
I suppose my question is: where should I go to learn about e-commerce?
| e-commerce | null | null | null | null | null | open | E-commerce tutorials
===
I've never done anything with e-commerce before but I was asked today if I could build such a site. Building a website is within my experience but I'm not sure about the nitty gritty parts like processing credit cards and ssl certificates. I was wondering if anybody had any useful tutorials or hints about where to start. Ideally I would like to work with ASP.net MVC, but I wouldn't object to a framework. I've read a couple of other questions on credit card processing and I've also stumbled across <http://blog.wekeroad.com/mvc-storefront/mvc-storefront-part-1/> which seems like it will be very useful.
I suppose my question is: where should I go to learn about e-commerce?
| 0 |
51,212 | 09/09/2008 04:09:15 | 2,386 | 08/22/2008 00:33:19 | 556 | 27 | How to write a download progress indicator in Python? | I am writing a little application to download files over http (as, for example, described [here][1]).
I also want to include a little download progress indicator showing the percentage of the download progress.
Here is what I came up with:
<pre>
sys.stdout.write(rem_file + "...")
urllib.urlretrieve(rem_file, loc_file, reporthook=dlProgress)
def dlProgress(count, blockSize, totalSize):
percent = int(count*blockSize*100/totalSize)
sys.stdout.write("%2d%%" % percent)
sys.stdout.write("\b\b\b")
sys.stdout.flush()
</pre>
Output: MyFileName... 9%
Any other ideas or recommendations to do this?
One thing that's somewhat annoying is the blinking cursor in the terminal on the first digit of the percentage. Is there a way to prevent this? Is there a way to hide the cursor?
[1]: http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python#22776 | python | null | null | null | null | null | open | How to write a download progress indicator in Python?
===
I am writing a little application to download files over http (as, for example, described [here][1]).
I also want to include a little download progress indicator showing the percentage of the download progress.
Here is what I came up with:
<pre>
sys.stdout.write(rem_file + "...")
urllib.urlretrieve(rem_file, loc_file, reporthook=dlProgress)
def dlProgress(count, blockSize, totalSize):
percent = int(count*blockSize*100/totalSize)
sys.stdout.write("%2d%%" % percent)
sys.stdout.write("\b\b\b")
sys.stdout.flush()
</pre>
Output: MyFileName... 9%
Any other ideas or recommendations to do this?
One thing that's somewhat annoying is the blinking cursor in the terminal on the first digit of the percentage. Is there a way to prevent this? Is there a way to hide the cursor?
[1]: http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python#22776 | 0 |
51,217 | 09/09/2008 04:19:24 | 4,491 | 09/04/2008 06:44:23 | 240 | 8 | How would you set up an Subversion repository for in house software projects | I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or open source setting. In addition there are stored procedures and database scripts that need to be kept in sync with the code. | svn | version-control | database | sourcecode | null | null | open | How would you set up an Subversion repository for in house software projects
===
I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or open source setting. In addition there are stored procedures and database scripts that need to be kept in sync with the code. | 0 |
51,224 | 09/09/2008 04:30:42 | 3,742 | 08/30/2008 14:08:11 | 55 | 10 | Regular Expression to match valid dates | I'm trying to write a regular expression that validates a date. The regex needs to match the following
- M/D/YYYY
- MM/DD/YYYY
- Single digit months can start with a leading zero (eg: 03/12/2008)
- Single digit days can start with a leading zero (eg: 3/02/2008)
- CANNOT include February 30 or February 31 (eg: 2/31/2008)
So far I have ^(([1-9]|1[012])[-/.]([1-9]|[12][0-9]|3[01])[-/.](19|20)\d\d)|((1[012]|0[1-9])(3[01]|2\d|1\d|0[1-9])(19|20)\d\d)|((1[012]|0[1-9])[-/.](3[01]|2\d|1\d|0[1-9])[-/.](19|20)\d\d)$
This matches properly EXCEPT it still includes 2/30/2008 & 2/31/2008.
Does anyone have a better suggestion? | regex | date | null | null | null | null | open | Regular Expression to match valid dates
===
I'm trying to write a regular expression that validates a date. The regex needs to match the following
- M/D/YYYY
- MM/DD/YYYY
- Single digit months can start with a leading zero (eg: 03/12/2008)
- Single digit days can start with a leading zero (eg: 3/02/2008)
- CANNOT include February 30 or February 31 (eg: 2/31/2008)
So far I have ^(([1-9]|1[012])[-/.]([1-9]|[12][0-9]|3[01])[-/.](19|20)\d\d)|((1[012]|0[1-9])(3[01]|2\d|1\d|0[1-9])(19|20)\d\d)|((1[012]|0[1-9])[-/.](3[01]|2\d|1\d|0[1-9])[-/.](19|20)\d\d)$
This matches properly EXCEPT it still includes 2/30/2008 & 2/31/2008.
Does anyone have a better suggestion? | 0 |
51,233 | 09/09/2008 04:38:55 | 2,386 | 08/22/2008 00:33:19 | 566 | 27 | How can I retrieve the page title of a webpage using Python? | How can I retrieve the page title of a webpage (title html tag) using Python?
| python | html | null | null | null | null | open | How can I retrieve the page title of a webpage using Python?
===
How can I retrieve the page title of a webpage (title html tag) using Python?
| 0 |
51,238 | 09/09/2008 04:47:33 | 1,249 | 08/13/2008 19:56:10 | 351 | 30 | How do I conditionally set a column to it's default value with MySqlParameter? | I have a table in a MySql database that stores user accounts. One of the columns, expires, stores an expiration date but defaults to NULL. I need to be able to remove an expiration date and set it back to the default value.
Currently, all of my CRUD routines are written using MySqlCommand with parameters. Can this be done directly with a MySqlParameter, or do I have to create an alternate command object to handle this eventuality? | c# | .net | sql | mysql | null | null | open | How do I conditionally set a column to it's default value with MySqlParameter?
===
I have a table in a MySql database that stores user accounts. One of the columns, expires, stores an expiration date but defaults to NULL. I need to be able to remove an expiration date and set it back to the default value.
Currently, all of my CRUD routines are written using MySqlCommand with parameters. Can this be done directly with a MySqlParameter, or do I have to create an alternate command object to handle this eventuality? | 0 |
51,256 | 09/09/2008 05:27:00 | 831 | 08/09/2008 06:37:00 | 89 | 5 | How to upload a file to a WCF Service? | I've build a WCF Service to accept a file and write it to disk. The front-end consists of a page with SWFUpload which is handling the upload on the client side. Apparently, SWFUpload posts the data with a Content Type of: multipart/form-data.
I would think this ok but on the Service side I get an error. The error is "ProtocolException" expecting text/xml. I've tried different message encodings in the bindings but nothing seems to work.
How can I get this file uploaded using multipart/form-data?
| web-services | wcf | null | null | null | null | open | How to upload a file to a WCF Service?
===
I've build a WCF Service to accept a file and write it to disk. The front-end consists of a page with SWFUpload which is handling the upload on the client side. Apparently, SWFUpload posts the data with a Content Type of: multipart/form-data.
I would think this ok but on the Service side I get an error. The error is "ProtocolException" expecting text/xml. I've tried different message encodings in the bindings but nothing seems to work.
How can I get this file uploaded using multipart/form-data?
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.