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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49,252 | 09/08/2008 06:54:26 | 5,004 | 09/07/2008 10:03:29 | 23 | 0 | ruby method names | For a project I am working on in ruby I am overriding the method_missing method so that I can set variables using a method call like this: `Object.variable_name= 'new value'` (similar to setting variables in an ActiveRecord object). However, after implementing this I found out that many of the variable names have periods (.) in them. I have found this work arround: `Object.send('variable.name=', 'new value')`. However, I am wondering is there a way to escape the period so that I can use `Object.variable.name= 'new value'`?
Thanks,
Josh | ruby | null | null | null | null | null | open | ruby method names
===
For a project I am working on in ruby I am overriding the method_missing method so that I can set variables using a method call like this: `Object.variable_name= 'new value'` (similar to setting variables in an ActiveRecord object). However, after implementing this I found out that many of the variable names have periods (.) in them. I have found this work arround: `Object.send('variable.name=', 'new value')`. However, I am wondering is there a way to escape the period so that I can use `Object.variable.name= 'new value'`?
Thanks,
Josh | 0 |
49,260 | 09/08/2008 07:15:17 | 5,146 | 09/08/2008 07:15:16 | 1 | 0 | Deploying a project using LINQ to SQL |
I am working on a winforms application using LINQ to SQL - and am building the app using a SQL Express instance on my workstation. The final installation of the project will be on a proper SQL Server 2005.
The database has the same name, and all tables are identical but the hostname is different. The only way I have found to make it work from one machine to the next is to delete all of the objects from my .mdbl, save the project, connect to the other server, drag all of the references back on, and rebuild...
What's the correct way of making LINQ to SQL apps use a new database without rebuilding in visual studio?
| linq-to-sql | deployment | null | null | null | null | open | Deploying a project using LINQ to SQL
===
I am working on a winforms application using LINQ to SQL - and am building the app using a SQL Express instance on my workstation. The final installation of the project will be on a proper SQL Server 2005.
The database has the same name, and all tables are identical but the hostname is different. The only way I have found to make it work from one machine to the next is to delete all of the objects from my .mdbl, save the project, connect to the other server, drag all of the references back on, and rebuild...
What's the correct way of making LINQ to SQL apps use a new database without rebuilding in visual studio?
| 0 |
49,263 | 09/08/2008 07:21:20 | 1,353,085 | 09/08/2008 06:22:18 | 1 | 0 | Approximate string matching algorithms | Here at work, we often need to find a string from the list of strings that is the closest match to some other input string. Currently, we are using Needleman-Wunsch algorithm. The algorithm often returns a lot of false-positives (if we set the minimum-score too low), sometimes it doesn't find a match when it should (when the minimum-score is too high) and, most of the times, we need to check the results by hand. We thought we should try other alternatives.
Do you have any experiences with the algorithms?
Do you know how the algorithms compare to one another?
I'd really appreciate some advice.
PS: We're coding in C#, but you shouldn't care about it - I'm asking about the algorithms in general. | algorithm | string | null | null | null | null | open | Approximate string matching algorithms
===
Here at work, we often need to find a string from the list of strings that is the closest match to some other input string. Currently, we are using Needleman-Wunsch algorithm. The algorithm often returns a lot of false-positives (if we set the minimum-score too low), sometimes it doesn't find a match when it should (when the minimum-score is too high) and, most of the times, we need to check the results by hand. We thought we should try other alternatives.
Do you have any experiences with the algorithms?
Do you know how the algorithms compare to one another?
I'd really appreciate some advice.
PS: We're coding in C#, but you shouldn't care about it - I'm asking about the algorithms in general. | 0 |
49,267 | 09/08/2008 07:28:36 | 3,147 | 08/27/2008 01:00:22 | 78 | 12 | Embedded custom-tag in dynamic content (nested tag) not rendering. | Embedded custom-tag in dynamic content (nested tag) not rendering.
I have a page that pulls dynamic content from a javabean and passes the list of objects to a custom tag for processing into html. Within each object is a bunch of html to be output that contains a second custom tag that I would like to also be rendered. The problem is that the tag invocation is rendered as plaintext.
An example might serve me better.
1 Pull information from a database and return it to the page via a javabean. Send this info to a custom tag for outputting.
<jsp:useBean id="ImportantNoticeBean" scope="page" class="com.mysite.beans.ImportantNoticeProcessBean"/> <%-- Declare the bean --%>
<c:forEach var="noticeBean" items="${ImportantNoticeBean.importantNotices}"> <%-- Get the info --%>
<mysite:notice importantNotice="${noticeBean}"/> <%-- give it to the tag for processing --%>
</c:forEach>
this tag should output a box div like so
*SNIP* class for custom tag def and method setup etc
out.println("<div class=\"importantNotice\">");
out.println(" " + importantNotice.getMessage());
out.println(" <div class=\"importantnoticedates\">Posted: " + importantNotice.getDateFrom() + " End: " + importantNotice.getDateTo()</div>");
out.println(" <div class=\"noticeAuthor\">- " + importantNotice.getAuthor() + "</div>");
out.println("</div>");
*SNIP*
This renders fine and as expected
<div class="importantNotice">
<p>This is a very important message. Everyone should pay attenton to it.</p>
<div class="importantnoticedates">Posted: 2008-09-08 End: 2008-09-08</div>
<div class="noticeAuthor">- The author</div>
</div>
2 If, in the above example, for instance, I were to have a custom tag in the importantNotice.getMessage() String:
*SNIP* "This is a very important message. Everyone should pay attenton to it. <mysite:quote author="Some Guy">Quote this</mysite:quote>" *SNIP*
The important notice renders fine but the quote tag will not be processed and simply inserted into the string and put as plain text/html tag.
<div class="importantNotice">
<p>This is a very important message. Everyone should pay attenton to it. <mysite:quote author="Some Guy">Quote this</mysite:quote></p>
<div class="importantnoticedates">Posted: 2008-09-08 End: 2008-09-08</div>
<div class="noticeAuthor">- The author</div>
</div>
Rather than
<div class="importantNotice">
<p>This is a very important message. Everyone should pay attenton to it. <div class="quote">Quote this <span class="authorofquote">Some Guy</span></div></p> // or wahtever I choose as the output
<div class="importantnoticedates">Posted: 2008-09-08 End: 2008-09-08</div>
<div class="noticeAuthor">- The author</div>
</div>
I know this has to do with processors and pre-processors but I am not to sure about how to make this work. | java | jsp | jstl | custon-tag | null | null | open | Embedded custom-tag in dynamic content (nested tag) not rendering.
===
Embedded custom-tag in dynamic content (nested tag) not rendering.
I have a page that pulls dynamic content from a javabean and passes the list of objects to a custom tag for processing into html. Within each object is a bunch of html to be output that contains a second custom tag that I would like to also be rendered. The problem is that the tag invocation is rendered as plaintext.
An example might serve me better.
1 Pull information from a database and return it to the page via a javabean. Send this info to a custom tag for outputting.
<jsp:useBean id="ImportantNoticeBean" scope="page" class="com.mysite.beans.ImportantNoticeProcessBean"/> <%-- Declare the bean --%>
<c:forEach var="noticeBean" items="${ImportantNoticeBean.importantNotices}"> <%-- Get the info --%>
<mysite:notice importantNotice="${noticeBean}"/> <%-- give it to the tag for processing --%>
</c:forEach>
this tag should output a box div like so
*SNIP* class for custom tag def and method setup etc
out.println("<div class=\"importantNotice\">");
out.println(" " + importantNotice.getMessage());
out.println(" <div class=\"importantnoticedates\">Posted: " + importantNotice.getDateFrom() + " End: " + importantNotice.getDateTo()</div>");
out.println(" <div class=\"noticeAuthor\">- " + importantNotice.getAuthor() + "</div>");
out.println("</div>");
*SNIP*
This renders fine and as expected
<div class="importantNotice">
<p>This is a very important message. Everyone should pay attenton to it.</p>
<div class="importantnoticedates">Posted: 2008-09-08 End: 2008-09-08</div>
<div class="noticeAuthor">- The author</div>
</div>
2 If, in the above example, for instance, I were to have a custom tag in the importantNotice.getMessage() String:
*SNIP* "This is a very important message. Everyone should pay attenton to it. <mysite:quote author="Some Guy">Quote this</mysite:quote>" *SNIP*
The important notice renders fine but the quote tag will not be processed and simply inserted into the string and put as plain text/html tag.
<div class="importantNotice">
<p>This is a very important message. Everyone should pay attenton to it. <mysite:quote author="Some Guy">Quote this</mysite:quote></p>
<div class="importantnoticedates">Posted: 2008-09-08 End: 2008-09-08</div>
<div class="noticeAuthor">- The author</div>
</div>
Rather than
<div class="importantNotice">
<p>This is a very important message. Everyone should pay attenton to it. <div class="quote">Quote this <span class="authorofquote">Some Guy</span></div></p> // or wahtever I choose as the output
<div class="importantnoticedates">Posted: 2008-09-08 End: 2008-09-08</div>
<div class="noticeAuthor">- The author</div>
</div>
I know this has to do with processors and pre-processors but I am not to sure about how to make this work. | 0 |
49,269 | 09/08/2008 07:30:47 | 976 | 08/11/2008 10:53:45 | 6 | 1 | Reading default application settings in C# | I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors with a button for reverting to default color settings. By default value I mean what I set in Settings.settings at design time. Is there a way to read the default settings from Properties.Settings? I was hoping there would be something like:
Color defCellColor = Properties.Settings.Default.CellBackgroundColor.DefaultValue;
or even:
Color defCellColor = (Color)Properties.Settings.Default.GetDefaultValue("CellBackgroundColor");
| c# | .net | winforms | null | null | null | open | Reading default application settings in C#
===
I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors with a button for reverting to default color settings. By default value I mean what I set in Settings.settings at design time. Is there a way to read the default settings from Properties.Settings? I was hoping there would be something like:
Color defCellColor = Properties.Settings.Default.CellBackgroundColor.DefaultValue;
or even:
Color defCellColor = (Color)Properties.Settings.Default.GetDefaultValue("CellBackgroundColor");
| 0 |
49,274 | 09/08/2008 07:41:00 | 2,018 | 08/19/2008 20:14:45 | 933 | 82 | Safe integer parsing in Ruby | I have a string, say `'123'`, and I want to convert it to `123`.
I know you can simply do `some_string.to_i`, but that converts `'lolipops'` to `0`, which is not he effect I have in mind. I want it to blow up in my face when I try to convert something invalid, with a nice and painful `Exception`. Otherwise, I can't distinguish between a valid `0` and something that just isn't a number at all. | ruby | null | null | null | null | null | open | Safe integer parsing in Ruby
===
I have a string, say `'123'`, and I want to convert it to `123`.
I know you can simply do `some_string.to_i`, but that converts `'lolipops'` to `0`, which is not he effect I have in mind. I want it to blow up in my face when I try to convert something invalid, with a nice and painful `Exception`. Otherwise, I can't distinguish between a valid `0` and something that just isn't a number at all. | 0 |
49,284 | 09/08/2008 07:49:37 | 3,196 | 08/27/2008 12:51:03 | 11 | 1 | File downloads in IE6 | I've come across a rather interesing (and frustrating) problem with IE6. We are serving up some server generated pdfs and then simply setting headers in PHP to force a browser download of the file. Works fine and all, except in IE6 but **only** if the windows user account is set to standard user (ie. not administrator).
Since this is for a corporate environment, of course all their accounts are setup this way. Weird thing is, that in the download dialog, the Content-Type is not recognized:
<code>
header( 'Pragma: public' );
header( 'Expires: 0' );
header( 'Cache-Control: must-revalidate, pre-check=0, post-check=0' );
header( 'Cache-Control: public' );
header( 'Content-Description: File Transfer' );
header( 'Content-Type: application/pdf' );
header( 'Content-Disposition: attachment; filename="xxx.pdf"' );
header( 'Content-Transfer-Encoding: binary' );
echo $content;
exit;
</code>
I also tried writing the file content to a temporary file first so I could also set the <code>Content-Length</code> in the header but that didn't help. | php | internet-explorer-6 | download | null | null | null | open | File downloads in IE6
===
I've come across a rather interesing (and frustrating) problem with IE6. We are serving up some server generated pdfs and then simply setting headers in PHP to force a browser download of the file. Works fine and all, except in IE6 but **only** if the windows user account is set to standard user (ie. not administrator).
Since this is for a corporate environment, of course all their accounts are setup this way. Weird thing is, that in the download dialog, the Content-Type is not recognized:
<code>
header( 'Pragma: public' );
header( 'Expires: 0' );
header( 'Cache-Control: must-revalidate, pre-check=0, post-check=0' );
header( 'Cache-Control: public' );
header( 'Content-Description: File Transfer' );
header( 'Content-Type: application/pdf' );
header( 'Content-Disposition: attachment; filename="xxx.pdf"' );
header( 'Content-Transfer-Encoding: binary' );
echo $content;
exit;
</code>
I also tried writing the file content to a temporary file first so I could also set the <code>Content-Length</code> in the header but that didn't help. | 0 |
49,299 | 09/08/2008 08:14:33 | 5,147 | 09/08/2008 07:23:50 | 1 | 2 | Will PRISM help? | I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the work will happen but now I need the following behavior: I need a menu on my main Shell and when each one of the options gets clicked (like customers, suppliers, etc) I need to find the module and load it into the region (Only 1 view at a time)?
Does anybody know of any sample applications with this type of behavior? All the samples are more focused on having all the modules loaded on the main shell? And should my menu bar also be a module?
| wpf | prism | cal | cag | null | null | open | Will PRISM help?
===
I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the work will happen but now I need the following behavior: I need a menu on my main Shell and when each one of the options gets clicked (like customers, suppliers, etc) I need to find the module and load it into the region (Only 1 view at a time)?
Does anybody know of any sample applications with this type of behavior? All the samples are more focused on having all the modules loaded on the main shell? And should my menu bar also be a module?
| 0 |
49,302 | 09/08/2008 08:19:47 | 1,127,460 | 08/28/2008 09:38:19 | 178 | 9 | How to Identify Postback event in Page_Load | We have some legacy code that needs to identify in the Page_Load which event caused the postback.
At the moment this is implemented by checking the Request data like this...
if (Request.Form["__EVENTTARGET"] != null
&& (Request.Form["__EVENTTARGET"].IndexOf("BaseGrid") > -1 // BaseGrid event ( e.g. sort)
|| Request.Form["btnSave"] != null // Save button
This is pretty ugly and breaks if someone renames a control. Is there a better way of doing this?
Rewriting each page so that it does not need to check this in Page_Load is not an option at the moment.
| c# | asp.net | null | null | null | null | open | How to Identify Postback event in Page_Load
===
We have some legacy code that needs to identify in the Page_Load which event caused the postback.
At the moment this is implemented by checking the Request data like this...
if (Request.Form["__EVENTTARGET"] != null
&& (Request.Form["__EVENTTARGET"].IndexOf("BaseGrid") > -1 // BaseGrid event ( e.g. sort)
|| Request.Form["btnSave"] != null // Save button
This is pretty ugly and breaks if someone renames a control. Is there a better way of doing this?
Rewriting each page so that it does not need to check this in Page_Load is not an option at the moment.
| 0 |
49,307 | 09/08/2008 08:25:55 | 5,148 | 09/08/2008 07:27:11 | 1 | 0 | Parallel Traversals in Matlab | Using the **zip** function, Python allows for loops to traverse multiple sequences in parallel.
> for (x,y) in zip(List1, List2):
Does Matlab have an equivalent syntax? If not, what is the best way to iterate over two parallel arrays at the same time using Matlab?
| python | matlab | null | null | null | null | open | Parallel Traversals in Matlab
===
Using the **zip** function, Python allows for loops to traverse multiple sequences in parallel.
> for (x,y) in zip(List1, List2):
Does Matlab have an equivalent syntax? If not, what is the best way to iterate over two parallel arrays at the same time using Matlab?
| 0 |
49,310 | 09/08/2008 08:28:28 | 123 | 08/02/2008 08:01:26 | 1,115 | 53 | How do you keep track of programming/technology events in your location? | The major events such as Microsoft PDC or Google Developer Day or the Business of Software ;) are widely advertised and discussed.
But i am sure lot of other interesting events on Leadership skills, Softskills, management training and etc which happens silently right in city that you realize just bit late.
How do you manage to keep track of these things? Are there any technical events alerts serive?
| management | slightly-offtopic | training-events | null | null | null | open | How do you keep track of programming/technology events in your location?
===
The major events such as Microsoft PDC or Google Developer Day or the Business of Software ;) are widely advertised and discussed.
But i am sure lot of other interesting events on Leadership skills, Softskills, management training and etc which happens silently right in city that you realize just bit late.
How do you manage to keep track of these things? Are there any technical events alerts serive?
| 0 |
49,316 | 09/08/2008 08:34:37 | 1,116 | 08/12/2008 13:25:41 | 697 | 41 | Sharepoint scheduling with SSRS issue. | I have some scheduled SSRS reports (integrated mode) that get emailed by subscription.
All of a sudden the reports have stopped being emailed. I get the error:
Failure sending mail: Report Server has encountered a SharePoint error.
I don't even know where to start to look as I can't get into SSRS and my Sharepoint knowledge is lacking.
Can you help?
| sharepoint | reporting-services | moss | null | null | null | open | Sharepoint scheduling with SSRS issue.
===
I have some scheduled SSRS reports (integrated mode) that get emailed by subscription.
All of a sudden the reports have stopped being emailed. I get the error:
Failure sending mail: Report Server has encountered a SharePoint error.
I don't even know where to start to look as I can't get into SSRS and my Sharepoint knowledge is lacking.
Can you help?
| 0 |
49,330 | 09/08/2008 08:44:10 | 3,315 | 08/27/2008 20:06:25 | 11 | 1 | VS 2005 & 2008 library linking | Is it correct to link a library (.lib) compiled with VS 2005 with a program which is compiled with VS 2008? Both library and my program are written in C++. This program is run on Windows Mobile 6 Professional emulator.
This seems to work, there are no linking errors. However the program crashes during startup because strange things happen inside the linked library. E.g. lib can return a vector of characters with size of big negative number.
There are no such problems when the program is compiled with VS 2005. | vs2008 | linker | vc++ | vs2006 | null | null | open | VS 2005 & 2008 library linking
===
Is it correct to link a library (.lib) compiled with VS 2005 with a program which is compiled with VS 2008? Both library and my program are written in C++. This program is run on Windows Mobile 6 Professional emulator.
This seems to work, there are no linking errors. However the program crashes during startup because strange things happen inside the linked library. E.g. lib can return a vector of characters with size of big negative number.
There are no such problems when the program is compiled with VS 2005. | 0 |
49,334 | 09/08/2008 08:46:36 | 2,819 | 08/25/2008 11:36:24 | 1 | 0 | Querying collections of value type in the Criteria API in Hibernate | In my database, I have an entity table (let's call it Entity). Each entity can have a number of entity types, and the set of entity types is static. Therefore, there is a connecting table that contains rows of the entity id and the name of the entity type. In my code, EntityType is an enum, and Entity is a Hibernate-mapped class.<br>
in the Entity code, the mapping looks like this:
@CollectionOfElements
@JoinTable(
name = "ENTITY-ENTITY-TYPE",
joinColumns = @JoinColumn(name = "ENTITY-ID")
)
@Column(name="ENTITY-TYPE")
public Set<EntityType> getEntityTypes() {
return entityTypes;
}
Oh, did I mention I'm using annotations?<br>
Now, what I'd like to do is create an HQL query or search using a Criteria for all Entity objects of a specific entity type.<p>
[This][1] page in the Hibernate forum says this is impossible, but then this page is 18 months old. Can anyone tell me if this feature has been implemented in one of the latest releases of Hibernate, or planned for the coming release?
Thanks,<br>
Yuval =8-)
[1]: http://opensource.atlassian.com/projects/hibernate/browse/HHH-869?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel | hibernate | enums | hql | null | null | null | open | Querying collections of value type in the Criteria API in Hibernate
===
In my database, I have an entity table (let's call it Entity). Each entity can have a number of entity types, and the set of entity types is static. Therefore, there is a connecting table that contains rows of the entity id and the name of the entity type. In my code, EntityType is an enum, and Entity is a Hibernate-mapped class.<br>
in the Entity code, the mapping looks like this:
@CollectionOfElements
@JoinTable(
name = "ENTITY-ENTITY-TYPE",
joinColumns = @JoinColumn(name = "ENTITY-ID")
)
@Column(name="ENTITY-TYPE")
public Set<EntityType> getEntityTypes() {
return entityTypes;
}
Oh, did I mention I'm using annotations?<br>
Now, what I'd like to do is create an HQL query or search using a Criteria for all Entity objects of a specific entity type.<p>
[This][1] page in the Hibernate forum says this is impossible, but then this page is 18 months old. Can anyone tell me if this feature has been implemented in one of the latest releases of Hibernate, or planned for the coming release?
Thanks,<br>
Yuval =8-)
[1]: http://opensource.atlassian.com/projects/hibernate/browse/HHH-869?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel | 0 |
49,345 | 09/08/2008 09:07:04 | 123 | 08/02/2008 08:01:26 | 1,125 | 53 | C Code formatting/beautification tool.. | When working on large code base with large team, its real challenge to maintain code quality and coding style.
well, controlling code quality is a huge topic on its own. But control of code style could be simplified with a tool.
We started using [indent][1]. Its real neat tool with huge set of [options to configure][2]. In the beginning we were fiddling with the source and had some scripts but finally settled with [UniversalIndentGUI][3] which comes with few more beautifiers such as [GreatCode][4], [Artistic Style][5], [Uncrustify][6], [BCPP][7] etc.
***[I merely wanted to add this as information instead of question. But please add your views, opinions if you have any other interesting findings! Cheers]***
[1]: http://www.gnu.org/software/indent/
[2]: http://gnuwin32.sourceforge.net/downlinks/indent-doc-zip.php
[3]: http://universalindent.sourceforge.net/
[4]: http://sourceforge.net/projects/gcgreatcode
[5]: http://astyle.sourceforge.net/
[6]: http://uncrustify.sourceforge.net/
[7]: http://invisible-island.net/bcpp/ | c | tips-and-tricks | beautification | code-formatting | null | null | open | C Code formatting/beautification tool..
===
When working on large code base with large team, its real challenge to maintain code quality and coding style.
well, controlling code quality is a huge topic on its own. But control of code style could be simplified with a tool.
We started using [indent][1]. Its real neat tool with huge set of [options to configure][2]. In the beginning we were fiddling with the source and had some scripts but finally settled with [UniversalIndentGUI][3] which comes with few more beautifiers such as [GreatCode][4], [Artistic Style][5], [Uncrustify][6], [BCPP][7] etc.
***[I merely wanted to add this as information instead of question. But please add your views, opinions if you have any other interesting findings! Cheers]***
[1]: http://www.gnu.org/software/indent/
[2]: http://gnuwin32.sourceforge.net/downlinks/indent-doc-zip.php
[3]: http://universalindent.sourceforge.net/
[4]: http://sourceforge.net/projects/gcgreatcode
[5]: http://astyle.sourceforge.net/
[6]: http://uncrustify.sourceforge.net/
[7]: http://invisible-island.net/bcpp/ | 0 |
49,346 | 09/08/2008 09:07:39 | 1,127,460 | 08/28/2008 09:38:19 | 185 | 9 | How to prevent a hyperlink from linking. | Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that it appears as a label, without actually having to replace the control with a label? Maybe using CSS or setting an attribute?
I know that marking it as disabled works but then it gets displayed differently (greyed out). | asp.net | css | null | null | null | null | open | How to prevent a hyperlink from linking.
===
Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that it appears as a label, without actually having to replace the control with a label? Maybe using CSS or setting an attribute?
I know that marking it as disabled works but then it gets displayed differently (greyed out). | 0 |
49,350 | 09/08/2008 09:13:27 | 5,139 | 09/08/2008 05:56:32 | 1 | 0 | Practical solution to center vertically and horizontally in HTML that works in FF, IE6 and IE7 | What can be a practical solution to center vertically and horizontally content in HTML that works in Firefox, IE6 and IE7?
Some details:
- I am looking for solution for the entire page.
- When minimizing window, scrolling should appear only when all white space is gone.
In other words, width of screen should be represented as:
"leftSpace width=(screenWidth-widthOfCenteredElement)/2"+
"centeredElement width=widthOfCenteredElement"+
"rightSpace width=(screenWidth-widthOfCenteredElement)/2"
And the same for the height:
"topSpace height=(screenHeight-heightOfCenteredElement)/2"+
"centeredElement height=heightOfCenteredElement"+
"bottomSpace height=(screenWidth-heightOfCenteredElement)/2"
- By practical I mean that use of tables is OK. I intend to use this layout mostly for special pages like login. So CSS purity is not so important here, while following standards is desirable for future compatibility.
| html | css | null | null | null | null | open | Practical solution to center vertically and horizontally in HTML that works in FF, IE6 and IE7
===
What can be a practical solution to center vertically and horizontally content in HTML that works in Firefox, IE6 and IE7?
Some details:
- I am looking for solution for the entire page.
- When minimizing window, scrolling should appear only when all white space is gone.
In other words, width of screen should be represented as:
"leftSpace width=(screenWidth-widthOfCenteredElement)/2"+
"centeredElement width=widthOfCenteredElement"+
"rightSpace width=(screenWidth-widthOfCenteredElement)/2"
And the same for the height:
"topSpace height=(screenHeight-heightOfCenteredElement)/2"+
"centeredElement height=heightOfCenteredElement"+
"bottomSpace height=(screenWidth-heightOfCenteredElement)/2"
- By practical I mean that use of tables is OK. I intend to use this layout mostly for special pages like login. So CSS purity is not so important here, while following standards is desirable for future compatibility.
| 0 |
49,352 | 09/08/2008 09:16:30 | 3,590 | 08/29/2008 08:09:23 | 129 | 20 | how to make cruisecontrol only build one project at a time | I have just set up cruise control.net on our build server, and I am unable to find a setting to tell it to only build one project at a time.
Any ideas? | cruisecontrol.net | build-automation | null | null | null | null | open | how to make cruisecontrol only build one project at a time
===
I have just set up cruise control.net on our build server, and I am unable to find a setting to tell it to only build one project at a time.
Any ideas? | 0 |
49,355 | 09/08/2008 09:19:42 | 1,776 | 08/18/2008 14:21:43 | 213 | 19 | Problem with Oracle Application Server SSL Certificates | We've got an Apache instance deployed through Oracle Application Server. It's currently installed with the default wallet, and, the self-signed certificate. We've got a GEOTRUST certificiate, imported the Trusted Roots and imported the new Cert to the Wallet Manager. We've then updated the SSL properties of the VHOST and the HTTP_SERVER through Enterprise Manager.
Things have restarted fine, however, we now can't connect to the Apache service, we're getting the error:
"call to NZ function nzos_Handshake failed"
This seems to point to a problem with the root Certs, but, in my opinion these are registered with the Wallet correctly.
Anyone seen this before and have some pointers?
Thanks
Andrew | oracle | apache | ssl | null | null | null | open | Problem with Oracle Application Server SSL Certificates
===
We've got an Apache instance deployed through Oracle Application Server. It's currently installed with the default wallet, and, the self-signed certificate. We've got a GEOTRUST certificiate, imported the Trusted Roots and imported the new Cert to the Wallet Manager. We've then updated the SSL properties of the VHOST and the HTTP_SERVER through Enterprise Manager.
Things have restarted fine, however, we now can't connect to the Apache service, we're getting the error:
"call to NZ function nzos_Handshake failed"
This seems to point to a problem with the root Certs, but, in my opinion these are registered with the Wallet correctly.
Anyone seen this before and have some pointers?
Thanks
Andrew | 0 |
49,356 | 09/08/2008 09:19:43 | 3,984 | 09/01/2008 07:10:04 | 1 | 1 | What is a good repository layout for releases and projects in Subversion? | We have the standard Subversion trunk/branches/tags layout. We have several branches for medium- and long-term projects, but none so far for a release. This is approaching fast.
Should we:
1. Mix release branches and project branches together?
2. Create a releases folder? If so, is there a better name than releases?
3. Create a projects folder and move the current branches there? If so, is there a better name than projects? I've seen "sandbox" and "spike" in other repositories.
4. Something else altogether? | subversion | null | null | null | null | null | open | What is a good repository layout for releases and projects in Subversion?
===
We have the standard Subversion trunk/branches/tags layout. We have several branches for medium- and long-term projects, but none so far for a release. This is approaching fast.
Should we:
1. Mix release branches and project branches together?
2. Create a releases folder? If so, is there a better name than releases?
3. Create a projects folder and move the current branches there? If so, is there a better name than projects? I've seen "sandbox" and "spike" in other repositories.
4. Something else altogether? | 0 |
49,368 | 09/08/2008 09:30:29 | 1,968 | 08/19/2008 15:59:21 | 2,962 | 197 | CSS2 Attribute Selectors with Regex | [CSS Attribute selectors](http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors) allow the selection of elements based on attribute values. Unfortunately, I've not used them in years (mainly because they're not supported by all modern browsers). However, I remember distinctly that I was able to use them to adorn all external links with an icon, by using a code similar to the following:
a[href=http] {
background: url(external-uri);
padding-left: 12px;
}
The above code doesn't work. My question is: **How does it work?** How do I select all `<a>` tags whose `href` attribute starts with `"http"`? The official CSS spec (linked above) doesn't even mention that this is possible. But I do remember doing this.
(*Note*: The obvious solution would be to use `class` attributes for distinction. I want to avoid this because I have little influence of the way the HTML code is built. All I can edit is the CSS code.) | css | selectors | null | null | null | null | open | CSS2 Attribute Selectors with Regex
===
[CSS Attribute selectors](http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors) allow the selection of elements based on attribute values. Unfortunately, I've not used them in years (mainly because they're not supported by all modern browsers). However, I remember distinctly that I was able to use them to adorn all external links with an icon, by using a code similar to the following:
a[href=http] {
background: url(external-uri);
padding-left: 12px;
}
The above code doesn't work. My question is: **How does it work?** How do I select all `<a>` tags whose `href` attribute starts with `"http"`? The official CSS spec (linked above) doesn't even mention that this is possible. But I do remember doing this.
(*Note*: The obvious solution would be to use `class` attributes for distinction. I want to avoid this because I have little influence of the way the HTML code is built. All I can edit is the CSS code.) | 0 |
49,378 | 09/08/2008 09:38:22 | 2,720 | 08/24/2008 17:15:55 | 33 | 3 | Deploy MySQL Server + DB with .Net application. | HI All,
We have a .Net 2.0 application which is has a MySQL backend. We want to be able to deploy MySQl and the DB when we install the application and im trying to find the best solution. The current setup is to copy the required files to a folder on the local machine and then perform a "NET START" commands to install and start the mysql service. Then we restore a backup of the DB to this newly created mysql instance using bat files. Its not an ideal solution at all and im trying ton come up with something more robust.
The issues are User rights on Vista, and all sorts of small things around installing and starting the service. Its far too fragile to be reliable or at least it appears that way when i am testing it. This is a Client/Server type setup so we only need to install one Server per office but i want to make sure its as hassle free as possible and with as few screens as possible.
How would you do it?
| mysql | vb.net | deployment | installation | database | null | open | Deploy MySQL Server + DB with .Net application.
===
HI All,
We have a .Net 2.0 application which is has a MySQL backend. We want to be able to deploy MySQl and the DB when we install the application and im trying to find the best solution. The current setup is to copy the required files to a folder on the local machine and then perform a "NET START" commands to install and start the mysql service. Then we restore a backup of the DB to this newly created mysql instance using bat files. Its not an ideal solution at all and im trying ton come up with something more robust.
The issues are User rights on Vista, and all sorts of small things around installing and starting the service. Its far too fragile to be reliable or at least it appears that way when i am testing it. This is a Client/Server type setup so we only need to install one Server per office but i want to make sure its as hassle free as possible and with as few screens as possible.
How would you do it?
| 0 |
49,379 | 09/08/2008 09:38:58 | 959 | 08/11/2008 05:23:02 | 85 | 9 | How to lock compiled Java Classes to prevent decompilation | I know this must be very well discussed topic on Internet but I could not come to any conclusion after referring them.
Many people do suggest obfuscator but they just do rename classes / methods / fields with tough to remember character sequences but what about sensitive constant values ?
For example, you have developed the encryption / decryption component based on Password Based encryption technique. Now in this case any average Java person can use JAD (http://www.kpdus.com/jad.html) to decompile the class file and easily retrieve the password value (defined as constant) as well as SALT and in turn can decrypt the data by writing small independent program !
Or you suggest to build such sensitive components in Native code (e.g. VC++) and call them via JNI.
| java | jvm | decompiling | null | null | null | open | How to lock compiled Java Classes to prevent decompilation
===
I know this must be very well discussed topic on Internet but I could not come to any conclusion after referring them.
Many people do suggest obfuscator but they just do rename classes / methods / fields with tough to remember character sequences but what about sensitive constant values ?
For example, you have developed the encryption / decryption component based on Password Based encryption technique. Now in this case any average Java person can use JAD (http://www.kpdus.com/jad.html) to decompile the class file and easily retrieve the password value (defined as constant) as well as SALT and in turn can decrypt the data by writing small independent program !
Or you suggest to build such sensitive components in Native code (e.g. VC++) and call them via JNI.
| 0 |
49,382 | 09/08/2008 09:40:55 | 184 | 08/03/2008 05:34:19 | 2,124 | 36 | What are the preferred conventions in naming attributes, methods and classes in different languages? | Are the naming conventions similar in different languages? If not, what are the differences? | programming-languages | naming | null | null | null | null | open | What are the preferred conventions in naming attributes, methods and classes in different languages?
===
Are the naming conventions similar in different languages? If not, what are the differences? | 0 |
49,402 | 09/08/2008 10:06:06 | 5,085 | 09/07/2008 19:09:10 | 1 | 0 | Creating batch jobs in PowerShell | Imagine a DOS style .cmd file which is used to launch interdependent windowed applications in the right order.
Example:
1) Launch a server application by calling an exe with parameters.
2) Wait for the server to become initialized (or a fixed amount of time).
3) Launch client application by calling an exe with parameters.
What is the simplest way of accomplishing this kind of batch job in PowerShell?
| powershell | batch | null | null | null | null | open | Creating batch jobs in PowerShell
===
Imagine a DOS style .cmd file which is used to launch interdependent windowed applications in the right order.
Example:
1) Launch a server application by calling an exe with parameters.
2) Wait for the server to become initialized (or a fixed amount of time).
3) Launch client application by calling an exe with parameters.
What is the simplest way of accomplishing this kind of batch job in PowerShell?
| 0 |
49,403 | 09/08/2008 10:07:03 | 4,003 | 09/01/2008 09:32:58 | 46 | 5 | How do you parse a filename in bash? | I have a filename in a format like:
> `system-source-yyyymmdd.dat`
I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter. | bash | parse | null | null | null | null | open | How do you parse a filename in bash?
===
I have a filename in a format like:
> `system-source-yyyymmdd.dat`
I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter. | 0 |
49,404 | 09/08/2008 10:07:28 | 1,008 | 08/11/2008 12:53:05 | 145 | 12 | SQL Query to get latest price | I have a table containing prices for a lot of different "things" in a MS SQL 2005 table. There are hundreds of records per thing per day and the different things gets price updates at different times.
ID int NOT NULL,
ThingID int NOT NULL,
PriceDateTime datetime NOT NULL,
Price decimal(18,4) NOT NULL
I need to get today's latest prices for a group of things. The below query works but I'm getting hundreds of rows back and I have to loop trough them and only extract the latest one per ThingID. How can I (e.g. via a GROUP BY) say that I want the latest one per ThingID? Or will I have to use subqueries?
SELECT *
FROM Thing
WHERE ThingID IN (1,2,3,4,5,6)
AND PriceDate > cast( convert(varchar(20), getdate(), 106) as DateTime)
| sql-server | mssql | query | null | null | null | open | SQL Query to get latest price
===
I have a table containing prices for a lot of different "things" in a MS SQL 2005 table. There are hundreds of records per thing per day and the different things gets price updates at different times.
ID int NOT NULL,
ThingID int NOT NULL,
PriceDateTime datetime NOT NULL,
Price decimal(18,4) NOT NULL
I need to get today's latest prices for a group of things. The below query works but I'm getting hundreds of rows back and I have to loop trough them and only extract the latest one per ThingID. How can I (e.g. via a GROUP BY) say that I want the latest one per ThingID? Or will I have to use subqueries?
SELECT *
FROM Thing
WHERE ThingID IN (1,2,3,4,5,6)
AND PriceDate > cast( convert(varchar(20), getdate(), 106) as DateTime)
| 0 |
49,416 | 09/08/2008 10:17:39 | 4,021 | 09/01/2008 12:23:44 | 113 | 9 | GSM Modems, PCs, SMS and Telephone Calls | What all would be the requirements for the following scenario:
> A GSM modem connected to a PC running
> a web based (ASP.NET) application. In
> the application the user selects a
> phone number from a list of phone nos.
> When he clicks on a button named the
> PC should call the selected phone
> number. When the person on the phone
> responds he should be able to have a
> conversation with the PC user.
> Similarly there should be a facility
> to send SMS.
Now I don't want any code listings. I just need to know what would be the requirements besides asp.net, database for storing phone numbers, and GSM modem.
Any help in terms of reference websites would be highly appreciated. | asp.net | null | null | null | null | null | open | GSM Modems, PCs, SMS and Telephone Calls
===
What all would be the requirements for the following scenario:
> A GSM modem connected to a PC running
> a web based (ASP.NET) application. In
> the application the user selects a
> phone number from a list of phone nos.
> When he clicks on a button named the
> PC should call the selected phone
> number. When the person on the phone
> responds he should be able to have a
> conversation with the PC user.
> Similarly there should be a facility
> to send SMS.
Now I don't want any code listings. I just need to know what would be the requirements besides asp.net, database for storing phone numbers, and GSM modem.
Any help in terms of reference websites would be highly appreciated. | 0 |
49,421 | 09/08/2008 10:23:30 | 5,080 | 09/07/2008 18:56:33 | 13 | 0 | How to shortcut time before data after first hit in browser |
<p>We have a couple of large solutions, each with about 30 individual projects (class libraries and nested websites). It takes about 2 minutes to do a full rebuild all.</p>
A couple of specs on the system:
* Visual Studio 2005, C#
* Primary project is a Web Application Project
* 40 projects in total (4 Web projects)
* We use the internal VS webserver
* We extensively use user controls, right down to a user control which contains a textbox
* We have a couple of inline web projects that allows us to do partial deployment
* About 120 user controls
* About 200.000 lines of code (incl. HTML)
* We use Source Safe
<p>What I would like to know is how to bring down the time it takes when hitting the site with a browser for the first time. And, I'm not talking about post full deployment - I'm talking about doing a small change in the code, build, refresh browser.<br>
<br>
This first hit, takes about 1 minute 15 seconds before data gets back. </p>
<p>To speed things up, I have experimented a little with Ram disks, specifically changing the <compilation> attribute in web.config, setting the tempDirectory to my Ram disk.
This does speed things up a bit. Interestingly though, this totally removed ALL IO access during first hit from the browser.</p>
<b>Remarks</b><br>
We never do a full compile during development, only partial. For example, the class library being worked on is compiled and then the main site is compiled which then copies the binaries from the class library to the bin directory).
I understand that the asp.net engine needs to parse all the ascx/aspx files after critical files have been changed (bin dir for example) but, what I don't understand is why it needs to do that when only <i>one</i> library dll has been modified.
So, anybody know of a way to either:
Sub segment the solutions to provide faster first hit or fine tune settings in config files or something.
And, again: I'm only talking about development, NOT production deployment, so doing the pre-built compile option is not applicable.
Thanks, Ruvan
| vs2005 | asp.net | null | null | null | null | open | How to shortcut time before data after first hit in browser
===
<p>We have a couple of large solutions, each with about 30 individual projects (class libraries and nested websites). It takes about 2 minutes to do a full rebuild all.</p>
A couple of specs on the system:
* Visual Studio 2005, C#
* Primary project is a Web Application Project
* 40 projects in total (4 Web projects)
* We use the internal VS webserver
* We extensively use user controls, right down to a user control which contains a textbox
* We have a couple of inline web projects that allows us to do partial deployment
* About 120 user controls
* About 200.000 lines of code (incl. HTML)
* We use Source Safe
<p>What I would like to know is how to bring down the time it takes when hitting the site with a browser for the first time. And, I'm not talking about post full deployment - I'm talking about doing a small change in the code, build, refresh browser.<br>
<br>
This first hit, takes about 1 minute 15 seconds before data gets back. </p>
<p>To speed things up, I have experimented a little with Ram disks, specifically changing the <compilation> attribute in web.config, setting the tempDirectory to my Ram disk.
This does speed things up a bit. Interestingly though, this totally removed ALL IO access during first hit from the browser.</p>
<b>Remarks</b><br>
We never do a full compile during development, only partial. For example, the class library being worked on is compiled and then the main site is compiled which then copies the binaries from the class library to the bin directory).
I understand that the asp.net engine needs to parse all the ascx/aspx files after critical files have been changed (bin dir for example) but, what I don't understand is why it needs to do that when only <i>one</i> library dll has been modified.
So, anybody know of a way to either:
Sub segment the solutions to provide faster first hit or fine tune settings in config files or something.
And, again: I'm only talking about development, NOT production deployment, so doing the pre-built compile option is not applicable.
Thanks, Ruvan
| 0 |
49,426 | 09/08/2008 10:25:47 | 3,849 | 08/31/2008 11:30:28 | 1 | 0 | How do you manage your app when the database goes offline? | Take a .Net Winforms App.. mix in a flakey wireless network connection, stir with a few users who like to simply pull the blue plug out occasionally and for good measure, add a Systems Admin that decides to reboot the SQL server box without warning now and again just to keep everyone on their toes.
What are the suggestions and strategies for handling this sort of scenario in respect to :
- Error Handling - for example, do you wrap every
call to the server with a Try/Catch
or do you rely on some form of
Generic Error Handling to manage
this? If so what does it look like?
- Application Management - for example, do you
disable the app and not allow users
to interact with it until a
connection is detected again? What would you do?
| .net | sql-server | error-handling | null | null | null | open | How do you manage your app when the database goes offline?
===
Take a .Net Winforms App.. mix in a flakey wireless network connection, stir with a few users who like to simply pull the blue plug out occasionally and for good measure, add a Systems Admin that decides to reboot the SQL server box without warning now and again just to keep everyone on their toes.
What are the suggestions and strategies for handling this sort of scenario in respect to :
- Error Handling - for example, do you wrap every
call to the server with a Try/Catch
or do you rely on some form of
Generic Error Handling to manage
this? If so what does it look like?
- Application Management - for example, do you
disable the app and not allow users
to interact with it until a
connection is detected again? What would you do?
| 0 |
49,430 | 09/08/2008 10:29:53 | 5,170 | 09/08/2008 10:27:38 | 1 | 0 | Animation Extender Problems | I have just started working with the AnimationExtender. I am using it to show a new div with a list gathered from a database when a button is pressed. The problem is the button needs to do a postback to get this list as I don't want to make the call to the database unless it's needed. The postback however stops the animation mid flow and resets it. The button is within an update panel.
Ideally I would want the animation to start once the postback is complete and the list has been gathered. I have looked into using the ScriptManager to detect when the postback is complete and have made some progress. I have added two javascript methods to the page.
function linkPostback() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(playAnimation)
}
function playAnimation() {
var onclkBehavior = $find("ctl00_btnOpenList").get_OnClickBehavior().get_animation();
onclkBehavior.play();
}
And I’ve changed the btnOpenList.OnClientClick=”linkPostback();”
This almost solves the problem. I’m still get some animation stutter. The animation starts to play before the postback and then plays properly after postback. Using the onclkBehavior.pause() has no effect. I can get around this by setting the AnimationExtender.Enabled = false and setting it to true in the buttons postback event. This however works only once as now the AnimationExtender is enabled again. I have also tried disabling the AnimationExtender via javascript but this has no effect.
Is there a way of playing the animations only via javascript calls? I need to decouple the automatic link to the
buttons click event so I can control when the animation is fired.
Hope that makes sense.
Thanks
DG
| c# | ajaxtoolkit | animationextender | null | null | null | open | Animation Extender Problems
===
I have just started working with the AnimationExtender. I am using it to show a new div with a list gathered from a database when a button is pressed. The problem is the button needs to do a postback to get this list as I don't want to make the call to the database unless it's needed. The postback however stops the animation mid flow and resets it. The button is within an update panel.
Ideally I would want the animation to start once the postback is complete and the list has been gathered. I have looked into using the ScriptManager to detect when the postback is complete and have made some progress. I have added two javascript methods to the page.
function linkPostback() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(playAnimation)
}
function playAnimation() {
var onclkBehavior = $find("ctl00_btnOpenList").get_OnClickBehavior().get_animation();
onclkBehavior.play();
}
And I’ve changed the btnOpenList.OnClientClick=”linkPostback();”
This almost solves the problem. I’m still get some animation stutter. The animation starts to play before the postback and then plays properly after postback. Using the onclkBehavior.pause() has no effect. I can get around this by setting the AnimationExtender.Enabled = false and setting it to true in the buttons postback event. This however works only once as now the AnimationExtender is enabled again. I have also tried disabling the AnimationExtender via javascript but this has no effect.
Is there a way of playing the animations only via javascript calls? I need to decouple the automatic link to the
buttons click event so I can control when the animation is fired.
Hope that makes sense.
Thanks
DG
| 0 |
49,431 | 09/08/2008 10:30:47 | 3,263 | 08/27/2008 15:33:09 | 65 | 10 | Trigger UpdatePanel on mouse over (as tooltip) | I need to display aditional information, like a tooltip, but it's a lot of info (about 500 - 600 characters) on the items in a RadioButtonList.
I now trigger the update on a PanelUpdate when the user selects an item in the RadioButtonList,using **OnSelectedIndexChanged** and **AutoPostBack**. What I would like to do, is trigger this on **onMouseHover** (ie. user holds the mouse a second or two over the item) rather than mouse click but I cannot find a way to do this.
| asp.net | javascript | ajax | null | null | null | open | Trigger UpdatePanel on mouse over (as tooltip)
===
I need to display aditional information, like a tooltip, but it's a lot of info (about 500 - 600 characters) on the items in a RadioButtonList.
I now trigger the update on a PanelUpdate when the user selects an item in the RadioButtonList,using **OnSelectedIndexChanged** and **AutoPostBack**. What I would like to do, is trigger this on **onMouseHover** (ie. user holds the mouse a second or two over the item) rather than mouse click but I cannot find a way to do this.
| 0 |
49,442 | 09/08/2008 10:39:44 | 5,156 | 09/08/2008 09:50:54 | 1 | 1 | When to create Interface Builder plug-in for custom view? | When do you recommend integrating a custom view into Interface Builder with a plug-in? When skimming through Apple's [Interface Builder Plug-In Programming Guide][1] I found:
> - Are your custom objects going to be used by only one application?
> - Do your custom objects rely on state information found only in your application?
> - Would it be problematic to encapsulate your custom views in a standalone library or framework?
>If you answered yes to any of the preceding questions, your objects may not be good candidates for a plug-in.
That answers some of my questions, but I would still like your thoughts on when it's a good idea. What are the benefits and how big of a time investment is it?
[1]: http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBPlugInGuide/CreatingPluginBundle/chapter_2_section_3.html#//apple_ref/doc/uid/TP40004323-CH4-DontLinkElementID_15 "Interface Builder Plug-In Programming Guide" | osx | objectivec | cocoa | interfacebuilder | null | null | open | When to create Interface Builder plug-in for custom view?
===
When do you recommend integrating a custom view into Interface Builder with a plug-in? When skimming through Apple's [Interface Builder Plug-In Programming Guide][1] I found:
> - Are your custom objects going to be used by only one application?
> - Do your custom objects rely on state information found only in your application?
> - Would it be problematic to encapsulate your custom views in a standalone library or framework?
>If you answered yes to any of the preceding questions, your objects may not be good candidates for a plug-in.
That answers some of my questions, but I would still like your thoughts on when it's a good idea. What are the benefits and how big of a time investment is it?
[1]: http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBPlugInGuide/CreatingPluginBundle/chapter_2_section_3.html#//apple_ref/doc/uid/TP40004323-CH4-DontLinkElementID_15 "Interface Builder Plug-In Programming Guide" | 0 |
49,450 | 09/08/2008 10:50:39 | 1,344 | 08/14/2008 16:03:00 | 1,889 | 139 | How do I export (and then import) a Subversion repo? | I'm just about wrapped up on a project where I was using a commercial SVN provider to store the source code. The web host the customer ultimately picked includes a repository as part of the hosting package, so, now that the project is over, I'd like to relocate the repository to their web host and discontinue the commercial account.
How would I go about doing this? | version-control | versioning | subversion | import | export | null | open | How do I export (and then import) a Subversion repo?
===
I'm just about wrapped up on a project where I was using a commercial SVN provider to store the source code. The web host the customer ultimately picked includes a repository as part of the hosting package, so, now that the project is over, I'd like to relocate the repository to their web host and discontinue the commercial account.
How would I go about doing this? | 0 |
49,455 | 09/08/2008 10:55:13 | 4,966 | 09/07/2008 03:47:16 | 11 | 5 | How does one decrypt a PDF with an owner password, but no user password? | Although the [PDF specification][1] is available from Adobe, it's not exactly the simplest document to read through. PDF allows documents to be encrypted so that either a user password and/or an owner password is required to do various things with the document (display, print, etc). A common use is to lock a PDF so that end users can read it without entering any password, but a password is required to do anything else.
I'm trying to parse PDFs that are locked in this way (to get the same privileges as you would get opening them in any reader). Using an empty string as the user password doesn't work, but it seems (section 3.5.2 of the spec) that there has to be a user password to create the hash for the admin password.
What I would like is either an explanation of how to do this, or any code that I can read (ideally Python, C, or C++, but anything readable will do) that does this so that I can understand what I'm meant to be doing.
[1]: http://www.adobe.com/devnet/pdf/pdf_reference.html | pdf | password | decrypt | python | c++ | null | open | How does one decrypt a PDF with an owner password, but no user password?
===
Although the [PDF specification][1] is available from Adobe, it's not exactly the simplest document to read through. PDF allows documents to be encrypted so that either a user password and/or an owner password is required to do various things with the document (display, print, etc). A common use is to lock a PDF so that end users can read it without entering any password, but a password is required to do anything else.
I'm trying to parse PDFs that are locked in this way (to get the same privileges as you would get opening them in any reader). Using an empty string as the user password doesn't work, but it seems (section 3.5.2 of the spec) that there has to be a user password to create the hash for the admin password.
What I would like is either an explanation of how to do this, or any code that I can read (ideally Python, C, or C++, but anything readable will do) that does this so that I can understand what I'm meant to be doing.
[1]: http://www.adobe.com/devnet/pdf/pdf_reference.html | 0 |
49,456 | 09/08/2008 10:55:58 | 1,583 | 08/16/2008 20:54:12 | 311 | 11 | How to recover a deleted branch in TFS? | I deleted a branch in TFS and just found out that I need the changes that were on it.
How do I recover the branch or the changes done on it? | version-control | tfs | null | null | null | null | open | How to recover a deleted branch in TFS?
===
I deleted a branch in TFS and just found out that I need the changes that were on it.
How do I recover the branch or the changes done on it? | 0 |
49,458 | 09/08/2008 10:58:06 | 5,175 | 09/08/2008 10:47:07 | 1 | 0 | What's the state of play with "Visual Inheritance" | We have an application that has to be flexible in how it displays it's main form to the user - depending on the user, the form should be slightly different, maybe an extra button here or there, or some other nuance. In order to stop writing code to explicitly remove or add controls etc, I turned to visual inheritance to solve the problem - in what I thought was a neat, clean and logical OO style - turns out that half the time inherited forms have a hard time rendering themeselves in VS for no good reason etc - and I get the feeling that developers and to some extent Microsoft have shunned the practice of Visual Inheritance - can you confirm this, am I missing something here?
Regards. | visual-studio | forms | visualinheritance | windowsforms | null | null | open | What's the state of play with "Visual Inheritance"
===
We have an application that has to be flexible in how it displays it's main form to the user - depending on the user, the form should be slightly different, maybe an extra button here or there, or some other nuance. In order to stop writing code to explicitly remove or add controls etc, I turned to visual inheritance to solve the problem - in what I thought was a neat, clean and logical OO style - turns out that half the time inherited forms have a hard time rendering themeselves in VS for no good reason etc - and I get the feeling that developers and to some extent Microsoft have shunned the practice of Visual Inheritance - can you confirm this, am I missing something here?
Regards. | 0 |
49,461 | 09/08/2008 10:59:34 | 1,583 | 08/16/2008 20:54:12 | 311 | 11 | VB.Net FormatNumber equivalent in C#? | Is there a C# equivelent for the VB.Net FormatNumber function?
i.e.:
JSArrayString += "^" + (String)FormatNumber(inv.RRP * oCountry.ExchangeRate, 2);
| c# | .net | vb.net | null | null | null | open | VB.Net FormatNumber equivalent in C#?
===
Is there a C# equivelent for the VB.Net FormatNumber function?
i.e.:
JSArrayString += "^" + (String)FormatNumber(inv.RRP * oCountry.ExchangeRate, 2);
| 0 |
49,465 | 09/08/2008 11:00:05 | 5,177 | 09/08/2008 10:57:38 | 1 | 0 | Track down where packets are being blocked/droped | When I was in China my company's website was blocked for about 24 hours.
I assume it was the "Great Chinese Firewall" but I was wondering if there is anyway that I can find out exactly where a packet or TCP/IP connection gets blocked.
I was able to verify that it wasn't being blocked at our end(I used the local host file to point to the backup server inside of China) or at our servers end (Other people could still connect to both ISPs).
In the future are their any tools that can track down where packets are being blocked? | networking | tcp | null | null | null | null | open | Track down where packets are being blocked/droped
===
When I was in China my company's website was blocked for about 24 hours.
I assume it was the "Great Chinese Firewall" but I was wondering if there is anyway that I can find out exactly where a packet or TCP/IP connection gets blocked.
I was able to verify that it wasn't being blocked at our end(I used the local host file to point to the backup server inside of China) or at our servers end (Other people could still connect to both ISPs).
In the future are their any tools that can track down where packets are being blocked? | 0 |
49,469 | 09/08/2008 11:01:49 | 4,021 | 09/01/2008 12:23:44 | 116 | 9 | Targeting with VS 2008 after installing SP1 of .NET 3.5 | How do I target .NET 3.5 alone after installing SP1 in VS2008? This is because VS 2008 lists only .NET 3.5, .NET 3.0 & .NET 2.0 and does not specifically show .NET 3.5 SP1. | vs2008 | .net-3.5 | null | null | null | null | open | Targeting with VS 2008 after installing SP1 of .NET 3.5
===
How do I target .NET 3.5 alone after installing SP1 in VS2008? This is because VS 2008 lists only .NET 3.5, .NET 3.0 & .NET 2.0 and does not specifically show .NET 3.5 SP1. | 0 |
49,473 | 09/08/2008 11:04:13 | 959 | 08/11/2008 05:23:02 | 100 | 11 | Is Bouncy Castle API Thread Safe ? | Is Bouncy Castle API (http://bouncycastle.org/java.html) Thread Safe ? Especially,
org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher
org.bouncycastle.crypto.paddings.PKCS7Padding
org.bouncycastle.crypto.engines.AESFastEngine
org.bouncycastle.crypto.modes.CBCBlockCipher
I am planning to write a singleton Spring bean for basic level cryptography support in my app. Since it is a web application, there are greater chances of multiple threads accessing this component at a time. So tread safety is essential here.
Please let me know if you have come across such situations using Bouncy Castle.
Thanks in advance. | java | cryptography | bouncycastle | null | null | null | open | Is Bouncy Castle API Thread Safe ?
===
Is Bouncy Castle API (http://bouncycastle.org/java.html) Thread Safe ? Especially,
org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher
org.bouncycastle.crypto.paddings.PKCS7Padding
org.bouncycastle.crypto.engines.AESFastEngine
org.bouncycastle.crypto.modes.CBCBlockCipher
I am planning to write a singleton Spring bean for basic level cryptography support in my app. Since it is a web application, there are greater chances of multiple threads accessing this component at a time. So tread safety is essential here.
Please let me know if you have come across such situations using Bouncy Castle.
Thanks in advance. | 0 |
49,478 | 09/08/2008 11:07:49 | 5,156 | 09/08/2008 09:50:54 | 1 | 1 | Git ignore file for Xcode projects | Which files should I include in .gitignore when using Git in conjunction with Xcode? | git | xcode | null | null | null | null | open | Git ignore file for Xcode projects
===
Which files should I include in .gitignore when using Git in conjunction with Xcode? | 0 |
49,500 | 09/08/2008 11:24:42 | 428 | 08/05/2008 16:12:27 | 128 | 6 | Apache rewrite based on subdomain | Im trying to redirect requests for a wildcard domain to a sub-directory.
ie. `something.blah.domain.com` --> `blah.domain.com/something`
I dont know how to get the subdomain name to use in the rewrite rule. | apache | mod-rewrite | null | null | null | 03/12/2012 17:15:13 | off topic | Apache rewrite based on subdomain
===
Im trying to redirect requests for a wildcard domain to a sub-directory.
ie. `something.blah.domain.com` --> `blah.domain.com/something`
I dont know how to get the subdomain name to use in the rewrite rule. | 2 |
49,503 | 09/08/2008 11:29:59 | 3,839 | 08/31/2008 10:11:12 | 448 | 31 | Reverse engineer (oracle) schema to ERD | Can anyone recommend good tools for reverse engineering database schemas to ERD/UML, preferably to some generic format. | oracle | null | null | null | null | null | open | Reverse engineer (oracle) schema to ERD
===
Can anyone recommend good tools for reverse engineering database schemas to ERD/UML, preferably to some generic format. | 0 |
49,507 | 09/08/2008 11:31:22 | 1,898 | 08/19/2008 08:26:46 | 297 | 25 | Controlling which Network Card TCP/IP message are sent on | The system I'm currently working on consists of a controller PC running XP with .Net 2 connected to a set of embedded systems. All these components communicate with each other over an ethernet network. I'm currently using TcpClient.Connect on the XP computer to open a connection to the embedded systems to send TCP/IP messages.
I now have to connect the XP computer to an external network to send processing data to, so there are now two network cards on the XP computer. However, the messages sent to the external network mustn't appear on the network connecting the embedded systems together (don't want to consume the bandwidth) and the messages to the embedded systems mustn't appear on the external network.
So, the assertion I'm making is that messages sent to a defined IP address are sent out on both network cards when using the TcpClient.Connect method.
How do I specify which physical network card messages are sent via, ideally using the .Net networking API. If no such method exists in .Net, then I can always P/Invoke the Win32 API.
Skizz | c# | .net | networking | null | null | null | open | Controlling which Network Card TCP/IP message are sent on
===
The system I'm currently working on consists of a controller PC running XP with .Net 2 connected to a set of embedded systems. All these components communicate with each other over an ethernet network. I'm currently using TcpClient.Connect on the XP computer to open a connection to the embedded systems to send TCP/IP messages.
I now have to connect the XP computer to an external network to send processing data to, so there are now two network cards on the XP computer. However, the messages sent to the external network mustn't appear on the network connecting the embedded systems together (don't want to consume the bandwidth) and the messages to the embedded systems mustn't appear on the external network.
So, the assertion I'm making is that messages sent to a defined IP address are sent out on both network cards when using the TcpClient.Connect method.
How do I specify which physical network card messages are sent via, ideally using the .Net networking API. If no such method exists in .Net, then I can always P/Invoke the Win32 API.
Skizz | 0 |
49,510 | 09/08/2008 11:32:29 | 5,168 | 09/08/2008 10:15:00 | 1 | 0 | How do you set your Cocoa application as the default web browser? | How do you set your Cocoa application as the default web browser?
I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.). | objectivec | cocoa | null | null | null | null | open | How do you set your Cocoa application as the default web browser?
===
How do you set your Cocoa application as the default web browser?
I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.). | 0 |
49,511 | 09/08/2008 11:32:49 | 2,939 | 08/26/2008 08:27:03 | 1 | 1 | Using a wiki as a central development project repository | I have played with the idea of using a wiki (MediaWiki) to centralize all project information for a development project. This was done using extensions that pull information from SVN (using [SVNKit][1]) and by linking to Bugzilla to extract work assigned to a developer or work remaining for a release.
Examples:
<bugzilla type="summary" user="[email protected]" />
would return a summary
![Bugzilla Summary][2]
<bugzilla type="status" status="ASSIGNED" product="SCM BEPPI" />
would return
![Bugzilla Status][3]
Do you think that this would be useful? If so then what other integrations would you think would be valuable?
[1]: http://svnkit.com/
[2]: http://picasaweb.google.com/richard.tasker/Hidden?authkey=qG5pnfNunaM#5243611618037524994
[3]: http://picasaweb.google.com/richard.tasker/Hidden?authkey=qG5pnfNunaM#5243611621715936546 | svn | wiki | integration | bugzilla | project | null | open | Using a wiki as a central development project repository
===
I have played with the idea of using a wiki (MediaWiki) to centralize all project information for a development project. This was done using extensions that pull information from SVN (using [SVNKit][1]) and by linking to Bugzilla to extract work assigned to a developer or work remaining for a release.
Examples:
<bugzilla type="summary" user="[email protected]" />
would return a summary
![Bugzilla Summary][2]
<bugzilla type="status" status="ASSIGNED" product="SCM BEPPI" />
would return
![Bugzilla Status][3]
Do you think that this would be useful? If so then what other integrations would you think would be valuable?
[1]: http://svnkit.com/
[2]: http://picasaweb.google.com/richard.tasker/Hidden?authkey=qG5pnfNunaM#5243611618037524994
[3]: http://picasaweb.google.com/richard.tasker/Hidden?authkey=qG5pnfNunaM#5243611621715936546 | 0 |
49,536 | 09/08/2008 11:57:08 | 3,377 | 08/28/2008 10:04:24 | 53 | 5 | How do I *really* justify a horizontal menu in HTML+CSS? | You find plenty of tutorials on menu bars in HTML, but for this specific (though IMHO generic) case, I haven't found any decent solution:
# THE MENU ITEMS SHOULD BE JUSTIFIED JUST AS PLAIN TEXT WOULD BE #
# ^ ^ #
# There's an varying number of text-only menu items and the page layout is fluid. #
# The first menu item should be left-aligned, the last menu item should be right- #
# aligned. The remaining items should be spread optimal on the menu bar. #
# #
# The number is varying,so there's no chance to pre-calculate the optimal widths. #
# #
# Note that a TABLE won't work here as well: #
# - If you center all TDs, the first and the last item aren't aligned correctly. #
# - If you left-align and right-align the first resp. the last items, the spacing #
# will be sub-optimal. #
Isn't it strange that there is no obvious way to implement this in a clean way by using HTML+CSS? | html | css | null | null | null | null | open | How do I *really* justify a horizontal menu in HTML+CSS?
===
You find plenty of tutorials on menu bars in HTML, but for this specific (though IMHO generic) case, I haven't found any decent solution:
# THE MENU ITEMS SHOULD BE JUSTIFIED JUST AS PLAIN TEXT WOULD BE #
# ^ ^ #
# There's an varying number of text-only menu items and the page layout is fluid. #
# The first menu item should be left-aligned, the last menu item should be right- #
# aligned. The remaining items should be spread optimal on the menu bar. #
# #
# The number is varying,so there's no chance to pre-calculate the optimal widths. #
# #
# Note that a TABLE won't work here as well: #
# - If you center all TDs, the first and the last item aren't aligned correctly. #
# - If you left-align and right-align the first resp. the last items, the spacing #
# will be sub-optimal. #
Isn't it strange that there is no obvious way to implement this in a clean way by using HTML+CSS? | 0 |
49,547 | 09/08/2008 12:08:49 | 5,182 | 09/08/2008 11:20:40 | 1 | 0 | Making sure a webpage is not cached, across all browsers. | Our investigations have shown us that no all browsers respect the http cache directives in a uniform manner.
For security reasons we do not want certain pages in our application to cached, **ever,** by the web browser. This must work for at least the following browsers:
- Internet Explorer versions 6-8
- FireFox versions 1.5 - 3.0
- Safari version 3
- Opera 9
Our requirement came from a security test. After logging out from our website you could press the back button and view cached pages. | security | http | caching | null | null | null | open | Making sure a webpage is not cached, across all browsers.
===
Our investigations have shown us that no all browsers respect the http cache directives in a uniform manner.
For security reasons we do not want certain pages in our application to cached, **ever,** by the web browser. This must work for at least the following browsers:
- Internet Explorer versions 6-8
- FireFox versions 1.5 - 3.0
- Safari version 3
- Opera 9
Our requirement came from a security test. After logging out from our website you could press the back button and view cached pages. | 0 |
49,551 | 09/08/2008 12:15:05 | 5,188 | 09/08/2008 11:43:50 | 1 | 0 | LINQ and Database Permissions | I'm still trying to get my head around LINQ and accessing a SQL Database.
I was always taught that you should only have execute permissions of stored procedures to your data.
You should never have select / insert / update / delete.
(This is because of performance and security)
To get the data out of LINQ you obviously need select permissions. I know you can use stored procs with LINQ, but since I can't do joins what's the point?
Have I missed something??? | linq-to-sql | permissions | null | null | null | null | open | LINQ and Database Permissions
===
I'm still trying to get my head around LINQ and accessing a SQL Database.
I was always taught that you should only have execute permissions of stored procedures to your data.
You should never have select / insert / update / delete.
(This is because of performance and security)
To get the data out of LINQ you obviously need select permissions. I know you can use stored procs with LINQ, but since I can't do joins what's the point?
Have I missed something??? | 0 |
49,552 | 09/08/2008 12:16:07 | 5,185 | 09/08/2008 11:29:10 | 1 | 0 | What are the ingredients of a great off-line tech group | For a long while i've been toying with the idea of creating a regional tech group. The aim is to create a gathering which will help teach developers about moving from good to great. I intend to have people talk about vendor independent technologies, practice and processes, with a Q&A session etc.
Earlier in the year I ran two events, which were reasonably well attended but didn't quite live up to my vision. In word they weren't the geek feast i envisaged.
So I was wondering what ingredients you think would make up a good off-line tech group?
p.s. we had beer :) | community | events | null | null | null | null | open | What are the ingredients of a great off-line tech group
===
For a long while i've been toying with the idea of creating a regional tech group. The aim is to create a gathering which will help teach developers about moving from good to great. I intend to have people talk about vendor independent technologies, practice and processes, with a Q&A session etc.
Earlier in the year I ran two events, which were reasonably well attended but didn't quite live up to my vision. In word they weren't the geek feast i envisaged.
So I was wondering what ingredients you think would make up a good off-line tech group?
p.s. we had beer :) | 0 |
49,555 | 09/08/2008 12:16:47 | 2,387 | 08/22/2008 00:37:24 | 11 | 3 | Becoming Agile | Does anyone have any good techniques or examples on how to promote the benefits of Agile development practices in a waterfall driven corporate environment?
We recently switched to feature based development, using trunk & branch code management, we have a one project running well with scrum, but its hard to get this approach adopted by the wider masses.
I just wondered if anyone else is battling the corporate machine? | agile | corporate | null | null | null | null | open | Becoming Agile
===
Does anyone have any good techniques or examples on how to promote the benefits of Agile development practices in a waterfall driven corporate environment?
We recently switched to feature based development, using trunk & branch code management, we have a one project running well with scrum, but its hard to get this approach adopted by the wider masses.
I just wondered if anyone else is battling the corporate machine? | 0 |
49,559 | 09/08/2008 12:20:32 | 4,495 | 09/04/2008 07:45:31 | 13 | 6 | HTML layout for winforms | Instead of arranging controls on a winform form by specifying pixel locations, I'd like to lay it out similar to the way you'd layout a form in html. This would make it scale better (for larger fonts etc).
Does anyone know of a layout library that allows you to define the form in xml and lay it out similar to html? | winforms | null | null | null | null | null | open | HTML layout for winforms
===
Instead of arranging controls on a winform form by specifying pixel locations, I'd like to lay it out similar to the way you'd layout a form in html. This would make it scale better (for larger fonts etc).
Does anyone know of a layout library that allows you to define the form in xml and lay it out similar to html? | 0 |
49,562 | 09/08/2008 12:22:31 | 93 | 08/01/2008 18:23:58 | 341 | 11 | Where do I start designing a Custom Control that contains child objects? | I think this is a fun engineering-level question.
I need to design a control which displays a line chart. What I want to be able to do is use a designer to add multiple `Pens` which actually describe the data and presentation so that it ends up with Xaml something along these lines:
<Chart>
<Pen Name="SalesData" Color="Green" Data="..."/>
<Pen Name="CostData" Color="Red" Data="..." />
...
</chart>
My first thought is to extend `ItemsControl` for the `Chart` class. Will that get me where I want to go or should I be looking at it from a different direction such as extending `Panel`?
The major requirement is to be able to use it in a designer without adding any C# code. In order for that to even be feasible, it needs to retain its structure in the tree-view model. In other words, if I were working with this in Expression Blend or Mobiform Aurora, I would be able to select the chart from the logical tree or select any of the individual pens to edit their properties.
| wpf | design | xaml | null | null | null | open | Where do I start designing a Custom Control that contains child objects?
===
I think this is a fun engineering-level question.
I need to design a control which displays a line chart. What I want to be able to do is use a designer to add multiple `Pens` which actually describe the data and presentation so that it ends up with Xaml something along these lines:
<Chart>
<Pen Name="SalesData" Color="Green" Data="..."/>
<Pen Name="CostData" Color="Red" Data="..." />
...
</chart>
My first thought is to extend `ItemsControl` for the `Chart` class. Will that get me where I want to go or should I be looking at it from a different direction such as extending `Panel`?
The major requirement is to be able to use it in a designer without adding any C# code. In order for that to even be feasible, it needs to retain its structure in the tree-view model. In other words, if I were working with this in Expression Blend or Mobiform Aurora, I would be able to select the chart from the logical tree or select any of the individual pens to edit their properties.
| 0 |
49,564 | 09/08/2008 12:24:25 | 2,361 | 08/21/2008 20:41:09 | 450 | 22 | How to implement file upload progress bar on web? | I would like display something more meaningful that animated gif while users upload file to my web application. What possibilities do I have? | javascript | ajax | null | null | null | null | open | How to implement file upload progress bar on web?
===
I would like display something more meaningful that animated gif while users upload file to my web application. What possibilities do I have? | 0 |
49,582 | 09/08/2008 12:34:47 | 1,942 | 08/19/2008 14:45:43 | 304 | 26 | Re-Running Database Development Scripts | In our current database development evironment we have automated build procceses check all the sql code out of svn create database scripts and apply them to the various development/qa databases. This is all well and good, and is a tremdous improvement over what we did in the past, but we have a problem with rerunning scripts. Obviously this isn't a problem with some scripts like altering procedures, because you can run them over and over without adversly affecting the system. Right now to add metadata and run statements like create/alter table statements we add code to check and see if the objects exists, and if they do, don't run them. Our problem is that we really only get one shot to run the script, because once the script has been run, the objects are in the environment and system won't run the script again. If something needs to change once it's been deployed, we have a difficult process of running update scripts agaist the update scripts and hoping that everything falls in the correct order and all of the PKs line up between the environments (the databases are, shall we say, "special"). Short of dropping the database and starting the process from scratch (the last most current release), does anyone have a more elegant solution to this? | sql-server | database | version-control | sdlc | null | null | open | Re-Running Database Development Scripts
===
In our current database development evironment we have automated build procceses check all the sql code out of svn create database scripts and apply them to the various development/qa databases. This is all well and good, and is a tremdous improvement over what we did in the past, but we have a problem with rerunning scripts. Obviously this isn't a problem with some scripts like altering procedures, because you can run them over and over without adversly affecting the system. Right now to add metadata and run statements like create/alter table statements we add code to check and see if the objects exists, and if they do, don't run them. Our problem is that we really only get one shot to run the script, because once the script has been run, the objects are in the environment and system won't run the script again. If something needs to change once it's been deployed, we have a difficult process of running update scripts agaist the update scripts and hoping that everything falls in the correct order and all of the PKs line up between the environments (the databases are, shall we say, "special"). Short of dropping the database and starting the process from scratch (the last most current release), does anyone have a more elegant solution to this? | 0 |
49,594 | 09/08/2008 12:44:07 | 1,679 | 08/17/2008 23:32:44 | 50 | 6 | Developing on your own | In my company each developer is given a project to work on his own, so there is hardly any teamwork. I've been building software like this, without the discipline of a good methodology of development, for a year. The results were ok but I would like to change and start using a more serious development approach for my next projects.
**What would you consider the best practices to develop software on your own? What methodologies could I use in order to avoid common pitfalls in software development? What models of software development (waterfall -I'm joking-, extreme, agile, etc) are best suited for me?**
I'd be very happy if you point me to some resources or tutorials where I could learn how to be a better developer :)
Thanks. | methodology | null | null | null | null | 11/09/2011 13:35:20 | not constructive | Developing on your own
===
In my company each developer is given a project to work on his own, so there is hardly any teamwork. I've been building software like this, without the discipline of a good methodology of development, for a year. The results were ok but I would like to change and start using a more serious development approach for my next projects.
**What would you consider the best practices to develop software on your own? What methodologies could I use in order to avoid common pitfalls in software development? What models of software development (waterfall -I'm joking-, extreme, agile, etc) are best suited for me?**
I'd be very happy if you point me to some resources or tutorials where I could learn how to be a better developer :)
Thanks. | 4 |
49,596 | 09/08/2008 12:45:16 | 123 | 08/02/2008 08:01:26 | 1,130 | 55 | String initialization.. | What is the difference between
Str[32] = "\0";
and
Str[32] = "";
| c | interview-questions | null | null | null | null | open | String initialization..
===
What is the difference between
Str[32] = "\0";
and
Str[32] = "";
| 0 |
49,599 | 09/08/2008 12:46:08 | 305 | 08/04/2008 14:04:19 | 1,968 | 119 | Binding custom functions to DOM events in prototype? | Jquery has a great language construct that looks like this:
$(document).ready(function() {
$("a").click(function() {
alert("Hello world!");
});
});
As you might guess this, once the document has loaded, binds a custom function to the onClick event of all ***a*** tags.
The question is, how can I achieve this same kind of behavior in Prototype? | javascript | dom | prototype | null | null | null | open | Binding custom functions to DOM events in prototype?
===
Jquery has a great language construct that looks like this:
$(document).ready(function() {
$("a").click(function() {
alert("Hello world!");
});
});
As you might guess this, once the document has loaded, binds a custom function to the onClick event of all ***a*** tags.
The question is, how can I achieve this same kind of behavior in Prototype? | 0 |
49,601 | 09/08/2008 12:46:57 | 5,198 | 09/08/2008 12:46:57 | 1 | 0 | Is there a barebones Windows version control system that's suitable for only one guy? | I'm trying to find a source control for my own personal use that's as simple as possible. The main feature I need is being able to read/pull a past version of my code. I am the only developer. I've looked at a lot of different version control systems, but they all seem way more complicated than I need. I need one that's simple, runs under Windows, and doesn't expose itself to the network.
Specifically, the version control system should *not* require exposing an HTTP interface, it should interact with the local filesystem only. It just needs to be a version control system geared for one guy and one guy only. Graphical UI is a plus.
Does anyone know of software would satisfy what I'm looking for?
Thanks!
-Mike | windows | version-control | null | null | null | null | open | Is there a barebones Windows version control system that's suitable for only one guy?
===
I'm trying to find a source control for my own personal use that's as simple as possible. The main feature I need is being able to read/pull a past version of my code. I am the only developer. I've looked at a lot of different version control systems, but they all seem way more complicated than I need. I need one that's simple, runs under Windows, and doesn't expose itself to the network.
Specifically, the version control system should *not* require exposing an HTTP interface, it should interact with the local filesystem only. It just needs to be a version control system geared for one guy and one guy only. Graphical UI is a plus.
Does anyone know of software would satisfy what I'm looking for?
Thanks!
-Mike | 0 |
49,602 | 09/08/2008 12:47:26 | 5,193 | 09/08/2008 12:23:54 | 1 | 0 | How to limit result set size for arbitrary query in Ingres? | In Oracle you can limit the number of rows returned in an arbitrary query by filtering on the "virtual" rownum column.
e.g.
<pre>select * from all_tables where rownum <= 10</pre>
will return at most 10 rows.
Is there a simple generic way to do something similar in Ingres?
| sql | oracle | ingres | null | null | null | open | How to limit result set size for arbitrary query in Ingres?
===
In Oracle you can limit the number of rows returned in an arbitrary query by filtering on the "virtual" rownum column.
e.g.
<pre>select * from all_tables where rownum <= 10</pre>
will return at most 10 rows.
Is there a simple generic way to do something similar in Ingres?
| 0 |
49,610 | 09/08/2008 12:50:25 | 2,387 | 08/22/2008 00:37:24 | 46 | 5 | 64 bit tools like BoundsChecker & Purify | For many years I have used two great tools [BoundsChecker][1] & [Purify][2], but the developers of these applications have let me down, they no longer put effort into maintaining them or developing them. We have corporate accounts with both companies, and they both tell me that they have no intention of producing versions to support 64 bit applications.
Can anyone recommend either open source or commercial alternatives that support 64 bit native C++/MFC applications?
[1]: http://www.compuware.com/products/devpartner/visualc.htm
[2]: http://www-01.ibm.com/software/awdtools/purify/win/ | c++ | mfc | purify | boundschecker | null | null | open | 64 bit tools like BoundsChecker & Purify
===
For many years I have used two great tools [BoundsChecker][1] & [Purify][2], but the developers of these applications have let me down, they no longer put effort into maintaining them or developing them. We have corporate accounts with both companies, and they both tell me that they have no intention of producing versions to support 64 bit applications.
Can anyone recommend either open source or commercial alternatives that support 64 bit native C++/MFC applications?
[1]: http://www.compuware.com/products/devpartner/visualc.htm
[2]: http://www-01.ibm.com/software/awdtools/purify/win/ | 0 |
49,616 | 09/08/2008 12:52:26 | 5,199 | 09/08/2008 12:47:08 | 1 | 0 | Team System notification of unassociated checkins. | How can I be notified when someone checks a file into Team System and doesn't associate it with a work item? | visual-studio-team-system | null | null | null | null | null | open | Team System notification of unassociated checkins.
===
How can I be notified when someone checks a file into Team System and doesn't associate it with a work item? | 0 |
49,623 | 09/08/2008 12:54:31 | 3,294 | 08/27/2008 17:51:23 | 103 | 7 | Nant <copy> and maintain directory structure | How do you use the nant <copy> command and maintain the directory structure? This is what I am doing, but it is copying all the files to a single directory.
<copy todir="..\out">
<fileset>
<includes name="..\src\PrecompiledWeb\**\*" />
</fileset>
</copy>
| nant | build-automation | null | null | null | null | open | Nant <copy> and maintain directory structure
===
How do you use the nant <copy> command and maintain the directory structure? This is what I am doing, but it is copying all the files to a single directory.
<copy todir="..\out">
<fileset>
<includes name="..\src\PrecompiledWeb\**\*" />
</fileset>
</copy>
| 0 |
49,630 | 09/08/2008 12:55:33 | 550 | 08/06/2008 16:22:46 | 156 | 11 | problems with mouseout event | I'm using javascript to hide an image and show some text thats hidden under it. But, when the text is shown if you scroll over it, it fires the mouseout event on the container, that then hides the text and shows the image again, and it just goes into a weird loop.
The html looks like this
<div onmouseover="jsHoverIn('1')" onmouseout="jsHoverOut('1')">
<div style="" id="image1" />
<div id="text1" style="display: none;">
<p>some content</p>
<p>some more content</p>
</div>
</div>
And the javascript ( It uses scriptaculous )
function jsHoverIn (id)
{
if ( !visible[id] )
{
new Effect.Fade ("image"+id, {queue: { position: 'end', scope: id } });
new Effect.Appear ("text"+id, {queue: { position: 'end', scope: id } });
visible[id] = true;
}
}
function jsHoverOut (id)
{
var scope = Effect.Queues.get( id );
scope.each( function( effect ){ effect.cancel() } );
new Effect.Fade ("text"+id, {queue: { position: 'end', scope: id } });
new Effect.Appear ("image"+id, {queue: { position: 'end', scope: id } });
visible[id] = false;
}
This seems really simple, but i just cant wrap my head around it. | javascript | html | events | scriptaculous | null | null | open | problems with mouseout event
===
I'm using javascript to hide an image and show some text thats hidden under it. But, when the text is shown if you scroll over it, it fires the mouseout event on the container, that then hides the text and shows the image again, and it just goes into a weird loop.
The html looks like this
<div onmouseover="jsHoverIn('1')" onmouseout="jsHoverOut('1')">
<div style="" id="image1" />
<div id="text1" style="display: none;">
<p>some content</p>
<p>some more content</p>
</div>
</div>
And the javascript ( It uses scriptaculous )
function jsHoverIn (id)
{
if ( !visible[id] )
{
new Effect.Fade ("image"+id, {queue: { position: 'end', scope: id } });
new Effect.Appear ("text"+id, {queue: { position: 'end', scope: id } });
visible[id] = true;
}
}
function jsHoverOut (id)
{
var scope = Effect.Queues.get( id );
scope.each( function( effect ){ effect.cancel() } );
new Effect.Fade ("text"+id, {queue: { position: 'end', scope: id } });
new Effect.Appear ("image"+id, {queue: { position: 'end', scope: id } });
visible[id] = false;
}
This seems really simple, but i just cant wrap my head around it. | 0 |
49,652 | 09/08/2008 13:01:08 | 4,406 | 09/03/2008 14:38:45 | 69 | 14 | Any good perl automated test suite? | can someone suggest some good automated test suite framework for perl? | testing | perl | framework | null | null | null | open | Any good perl automated test suite?
===
can someone suggest some good automated test suite framework for perl? | 0 |
49,660 | 09/08/2008 13:06:03 | 5,196 | 09/08/2008 12:39:19 | 1 | 0 | Is Java relevant in the game industry? | I'm a web developer/apps programmer who wants to break in the game industry.
I used to code in C/C++/C# for desktop apps (mainly database-oriented enterprise apps)
but nowadays I mainly to PHP/Ajax for websites.
Recently, I try learning java and found it to be a very nice language to work with. I wrote a few simple games of my own.
I would like to know that should I continue to make a portfolio in Java (web) games or should I do something else to better demonstrate my skills to the employer?
Is there a market for Java game programmer?
(My first question, sorry if it sounds confusing) | java | web-applications | industry | null | null | 04/29/2012 09:33:11 | off topic | Is Java relevant in the game industry?
===
I'm a web developer/apps programmer who wants to break in the game industry.
I used to code in C/C++/C# for desktop apps (mainly database-oriented enterprise apps)
but nowadays I mainly to PHP/Ajax for websites.
Recently, I try learning java and found it to be a very nice language to work with. I wrote a few simple games of my own.
I would like to know that should I continue to make a portfolio in Java (web) games or should I do something else to better demonstrate my skills to the employer?
Is there a market for Java game programmer?
(My first question, sorry if it sounds confusing) | 2 |
49,662 | 09/08/2008 13:06:22 | 5,106 | 09/07/2008 22:14:19 | 1 | 0 | Software evaluation licensing | My company is looking to start distributing some software we developed and would like to be able to let people try the software out before buying. We'd also like to make sure it can't be copied and distributed to our customers' customers.
One model we've seen is tying a license to a MAC address so the software will only work on one machine.
What I'm wondering is, what's a good way to generate a license key with different information embedded in it such as license expiration date, MAC address, and different software restrictions? | sofwarelicensing | null | null | null | null | null | open | Software evaluation licensing
===
My company is looking to start distributing some software we developed and would like to be able to let people try the software out before buying. We'd also like to make sure it can't be copied and distributed to our customers' customers.
One model we've seen is tying a license to a MAC address so the software will only work on one machine.
What I'm wondering is, what's a good way to generate a license key with different information embedded in it such as license expiration date, MAC address, and different software restrictions? | 0 |
49,663 | 09/08/2008 13:06:32 | 4,841 | 09/05/2008 22:14:12 | 11 | 1 | Where can I find thorough DCOM documentation? | I work on an application that uses DCOM to communicate between what are essentially several peers; in the course of normal use, instances on separate machines serve a variety of objects to one another. Historically, for this to work we have used some magic incantations, chief among which is that on every machine the user must log into an account of the same name (note that these are local accounts; there is no domain available). Obviously, this is an aspect of our user experience that could be improved.
I would like to better understand how DCOM authentication works, but I am having difficulty assembling the whole story from the MSDN documentation for [CoInitializeSecurity()][1], [CoSetProxyBlanket()][2], and the like. Are there any thorough explanations available of how, exactly, DCOM operations are accepted or denied? Books, journals, web, any format is fine.
[1]: http://msdn.microsoft.com/en-us/library/ms693736.aspx
[2]: http://msdn.microsoft.com/en-us/library/ms692692.aspx | windows | security | dcom | rpc | null | null | open | Where can I find thorough DCOM documentation?
===
I work on an application that uses DCOM to communicate between what are essentially several peers; in the course of normal use, instances on separate machines serve a variety of objects to one another. Historically, for this to work we have used some magic incantations, chief among which is that on every machine the user must log into an account of the same name (note that these are local accounts; there is no domain available). Obviously, this is an aspect of our user experience that could be improved.
I would like to better understand how DCOM authentication works, but I am having difficulty assembling the whole story from the MSDN documentation for [CoInitializeSecurity()][1], [CoSetProxyBlanket()][2], and the like. Are there any thorough explanations available of how, exactly, DCOM operations are accepted or denied? Books, journals, web, any format is fine.
[1]: http://msdn.microsoft.com/en-us/library/ms693736.aspx
[2]: http://msdn.microsoft.com/en-us/library/ms692692.aspx | 0 |
49,664 | 09/08/2008 13:07:58 | 1,944 | 08/19/2008 14:49:14 | 507 | 20 | Sources of inspiration for navigation breadcrumbs | I'm looking for sources of inspiration and/or design patterns for navigation 'breadcrumbs'. So far I have found the [breadcrumb collection on Pattern Tap][1]. Does anyone know of any other sources?
[1]: http://patterntap.com/tap/collection/breadcrumbs | html | css | design-patterns | webdesign | navigation | null | open | Sources of inspiration for navigation breadcrumbs
===
I'm looking for sources of inspiration and/or design patterns for navigation 'breadcrumbs'. So far I have found the [breadcrumb collection on Pattern Tap][1]. Does anyone know of any other sources?
[1]: http://patterntap.com/tap/collection/breadcrumbs | 0 |
49,668 | 09/08/2008 13:09:26 | 1,068 | 08/12/2008 08:44:09 | 38 | 6 | GetLocalTime() API time resolution | I need to find out time taken by a function in my application. Application is a MS VIsual Studio 2005 solution, all C code.
I used thw windows API GetLocalTime(SYSTEMTIME *) to get the current system time before and after the function call which i want to measure time of.
But this has shortcoming that it lowest resolution is only 1msec. Nothing below that. So i cannot get any time granularity in micro seconds.
I know that time() which gives the time elapsed sicne the epoch time, also has resolution of 1msec (No microseconds)
1.) Is there any other Windows API which gives time in microseconds which I can use to measure the time consumed by my function?
-AD
| profile | null | null | null | null | null | open | GetLocalTime() API time resolution
===
I need to find out time taken by a function in my application. Application is a MS VIsual Studio 2005 solution, all C code.
I used thw windows API GetLocalTime(SYSTEMTIME *) to get the current system time before and after the function call which i want to measure time of.
But this has shortcoming that it lowest resolution is only 1msec. Nothing below that. So i cannot get any time granularity in micro seconds.
I know that time() which gives the time elapsed sicne the epoch time, also has resolution of 1msec (No microseconds)
1.) Is there any other Windows API which gives time in microseconds which I can use to measure the time consumed by my function?
-AD
| 0 |
49,677 | 09/08/2008 13:14:44 | 2,745 | 08/24/2008 20:58:00 | 205 | 11 | What is an OPPL License and what are its implications? | Just saw this at the top of a piece of code:
\* @license OPPL
What on earth is an OPPL license? Google has been uncharacteristically inconclusive. Has anyone come across this beast before, and what are it's main implications? | licensing | null | null | null | null | null | open | What is an OPPL License and what are its implications?
===
Just saw this at the top of a piece of code:
\* @license OPPL
What on earth is an OPPL license? Google has been uncharacteristically inconclusive. Has anyone come across this beast before, and what are it's main implications? | 0 |
49,699 | 09/08/2008 13:23:50 | 3,078 | 08/26/2008 14:47:16 | 1 | 0 | Anyone know of Objective-J syntax highlighting in vi? | I have been looking at the new [Objective-J / Cappuccino][1] javascript framework from [280North][2]. They provide plug-ins for SubEthaEdit and TextMate to handle syntax highlighting, but I primarily use vi. Does anyone know of a way to get Objective-J syntax highlighting in vi, or a good way to convert whatever format the other two editors use?
[1]: http://cappuccino.org/
[2]: http://280north.com/ | javascript | vi | cappuccino | objectivej | null | null | open | Anyone know of Objective-J syntax highlighting in vi?
===
I have been looking at the new [Objective-J / Cappuccino][1] javascript framework from [280North][2]. They provide plug-ins for SubEthaEdit and TextMate to handle syntax highlighting, but I primarily use vi. Does anyone know of a way to get Objective-J syntax highlighting in vi, or a good way to convert whatever format the other two editors use?
[1]: http://cappuccino.org/
[2]: http://280north.com/ | 0 |
49,716 | 09/08/2008 13:31:32 | 2,915 | 08/25/2008 23:15:12 | 2,097 | 87 | What is static analysis? | There are [many][1] [options][2] for static analysis, and it's a hot topic, so:
What is static analysis?
When should you use it, and when shouldn't it be used?
What are potential gotchas regarding proper and improper usage/application of static analysis?
Any languages that don't have a good static analysis tool, and what do you do when you don't have an option for automated analysis?
-Adam
[1]: http://stackoverflow.com/questions/20788/what-tools-do-you-use-for-static-code-analysis
[2]: http:// | static-analysis | code-review | null | null | null | null | open | What is static analysis?
===
There are [many][1] [options][2] for static analysis, and it's a hot topic, so:
What is static analysis?
When should you use it, and when shouldn't it be used?
What are potential gotchas regarding proper and improper usage/application of static analysis?
Any languages that don't have a good static analysis tool, and what do you do when you don't have an option for automated analysis?
-Adam
[1]: http://stackoverflow.com/questions/20788/what-tools-do-you-use-for-static-code-analysis
[2]: http:// | 0 |
49,718 | 09/08/2008 13:33:55 | 2,820 | 08/25/2008 11:37:16 | 179 | 15 | Templates In VB | I've got some VB code (actually VBA) which is basically the same except for the type on which it operates. Since I think the DRY principle is a good guiding principle for software development, I want to write one routine for all of the different types which need to be operated on. For example if I had two snippets of code like these:
Dim i as Obj1
Set i = RoutineThatReturnsObj1()
i.property = newvalue
Dim i as Obj2
Set i = RoutineThatReturnsObj2()
i.property = newvalue
I'd like to have something like this to handle both instances:
Sub MyRoutine(o as ObjectType, r as RoutineToInitializeObject, newvalue as value)
Dim i as o
Set i = r
i.property = newvalue
End Sub
If I were using C++ I'd generate a template and say no more about it. But I'm using VBA. I'm fairly sure there's no capability like C++ templates in the VBA language definition but is there any other means by which I might achieve the same effect? I'm guessing the answer is no but I ask here because maybe there is some feature of VBA that I've missed.
| vba | templates | null | null | null | null | open | Templates In VB
===
I've got some VB code (actually VBA) which is basically the same except for the type on which it operates. Since I think the DRY principle is a good guiding principle for software development, I want to write one routine for all of the different types which need to be operated on. For example if I had two snippets of code like these:
Dim i as Obj1
Set i = RoutineThatReturnsObj1()
i.property = newvalue
Dim i as Obj2
Set i = RoutineThatReturnsObj2()
i.property = newvalue
I'd like to have something like this to handle both instances:
Sub MyRoutine(o as ObjectType, r as RoutineToInitializeObject, newvalue as value)
Dim i as o
Set i = r
i.property = newvalue
End Sub
If I were using C++ I'd generate a template and say no more about it. But I'm using VBA. I'm fairly sure there's no capability like C++ templates in the VBA language definition but is there any other means by which I might achieve the same effect? I'm guessing the answer is no but I ask here because maybe there is some feature of VBA that I've missed.
| 0 |
49,724 | 09/08/2008 13:39:24 | 2,194 | 08/20/2008 20:54:29 | 528 | 42 | Programmatically extract macro (VBA) code from Word 2007 docs | Is it possible to extract all of the VBA code from a Word 2007 "docm" document using the API?
I have found how to insert VBA code at runtime, and how to delete all VBA code, but not pull the actual code out into a stream or string that I can store (and insert into other documents in the future).
Any tips or resources would be appreciated. | .net | automation | microsoftoffice | null | null | null | open | Programmatically extract macro (VBA) code from Word 2007 docs
===
Is it possible to extract all of the VBA code from a Word 2007 "docm" document using the API?
I have found how to insert VBA code at runtime, and how to delete all VBA code, but not pull the actual code out into a stream or string that I can store (and insert into other documents in the future).
Any tips or resources would be appreciated. | 0 |
49,732 | 09/08/2008 13:42:48 | 4,903 | 09/06/2008 14:16:54 | 150 | 7 | Is automatic upgrades a realistic feature to expect from enterprise Web applications? | Most of the work I do is with what could be considered enterprise Web applications. These projects have large budgets, longer timelines (from 3-12 months), and heavy customizations. Because as developers we have been touting the idea of the Web as the next desktop OS, customers are coming to expect the software running on this "new OS" to react the same as on the desktop. That includes easy to manage automatic upgrades. In other words, "An update is available. Do you want to upgrade?" Is this even a realistic expectation? Can anyone speak from experience on trying to implement this feature? | application | enterprise | automatic | upgrades | null | null | open | Is automatic upgrades a realistic feature to expect from enterprise Web applications?
===
Most of the work I do is with what could be considered enterprise Web applications. These projects have large budgets, longer timelines (from 3-12 months), and heavy customizations. Because as developers we have been touting the idea of the Web as the next desktop OS, customers are coming to expect the software running on this "new OS" to react the same as on the desktop. That includes easy to manage automatic upgrades. In other words, "An update is available. Do you want to upgrade?" Is this even a realistic expectation? Can anyone speak from experience on trying to implement this feature? | 0 |
49,737 | 09/08/2008 13:46:43 | 1,694 | 08/18/2008 02:45:22 | 1,165 | 38 | Use-cases for reflection | Recently I was talking to a co-worker about C++ and lamented that there was no way to take a string with the name of a class field and extract the field with that name; in other words, it lacks reflection. He gave me a baffled look and asked when anyone would ever need to do such a thing.
Off the top of my head I didn't have a good answer for him, other than "hey, I need to do it right now". So I sat down and came up with a list of some of the things I've actually done with reflection in various languages. Unfortunately, most of my examples come from my web programming in Python, and I was hoping that the people here would have more examples. Here's the list I came up with:
1. Given a config file with lines like
x = "Hello World!"
y = 5.0
dynamically set the fields of some <code>config</code> object equal to the values in that file. (This was what I wished I could do in C++, but actually couldn't do.)
2. When sorting a list of objects, sort based on an arbitrary attribute given that attribute's name from a config file or web request.
3. When writing software that uses a network protocol, reflection lets you call methods based on string values from that protocol. For example, I wrote an IRC bot that would translate
<code>!some_command arg1 arg2</code>
into a method call <code>actions.some_command(arg1, arg2)</code> and print whatever that function returned back to the IRC channel.
4. When using Python's \_\_getattr\_\_ function (which is sort of like method_missing in Ruby/Smalltalk) I was working with a class with a whole lot of statistics, such as late_total. For every statistic, I wanted to be able to add _percent to get that statistic as a percentage of the total things I was counting (for example, stats.late_total_percent). Reflection made this very easy.
So can anyone here give any examples from their own programming experiences of times when reflection has been helpful? The next time a co-worker asks me why I'd "ever want to do something like that" I'd like to be more prepared. | reflection | null | null | null | null | null | open | Use-cases for reflection
===
Recently I was talking to a co-worker about C++ and lamented that there was no way to take a string with the name of a class field and extract the field with that name; in other words, it lacks reflection. He gave me a baffled look and asked when anyone would ever need to do such a thing.
Off the top of my head I didn't have a good answer for him, other than "hey, I need to do it right now". So I sat down and came up with a list of some of the things I've actually done with reflection in various languages. Unfortunately, most of my examples come from my web programming in Python, and I was hoping that the people here would have more examples. Here's the list I came up with:
1. Given a config file with lines like
x = "Hello World!"
y = 5.0
dynamically set the fields of some <code>config</code> object equal to the values in that file. (This was what I wished I could do in C++, but actually couldn't do.)
2. When sorting a list of objects, sort based on an arbitrary attribute given that attribute's name from a config file or web request.
3. When writing software that uses a network protocol, reflection lets you call methods based on string values from that protocol. For example, I wrote an IRC bot that would translate
<code>!some_command arg1 arg2</code>
into a method call <code>actions.some_command(arg1, arg2)</code> and print whatever that function returned back to the IRC channel.
4. When using Python's \_\_getattr\_\_ function (which is sort of like method_missing in Ruby/Smalltalk) I was working with a class with a whole lot of statistics, such as late_total. For every statistic, I wanted to be able to add _percent to get that statistic as a percentage of the total things I was counting (for example, stats.late_total_percent). Reflection made this very easy.
So can anyone here give any examples from their own programming experiences of times when reflection has been helpful? The next time a co-worker asks me why I'd "ever want to do something like that" I'd like to be more prepared. | 0 |
49,747 | 09/08/2008 13:51:44 | 4,002 | 09/01/2008 09:28:22 | 21 | 3 | Autoupdating .net applications | I've written 2 reasonably large scale apps in .net so far, and both of them have needed an updating facility to automatically update the application when I roll out new code.
I've found the 'Enterprise application block updater' a bit too complex for my needs, and I've found 'click once' frustrating when it comes to publishing.
The most adequate updating code I've found is the [.net Application Updater Component][1], which I've used for both projects. I've had to modify it recently because it uses web dav, which isn't always installed on our web servers (it still needs directory browsing, however).
I'm surprised that there isn't more on the web about automatically updating applications, and was wondering whether people have had success with any other methods than the ones mentioned above?
[1]: http://windowsclient.net/articles/appupdater.aspx | .net | winforms | updating | null | null | null | open | Autoupdating .net applications
===
I've written 2 reasonably large scale apps in .net so far, and both of them have needed an updating facility to automatically update the application when I roll out new code.
I've found the 'Enterprise application block updater' a bit too complex for my needs, and I've found 'click once' frustrating when it comes to publishing.
The most adequate updating code I've found is the [.net Application Updater Component][1], which I've used for both projects. I've had to modify it recently because it uses web dav, which isn't always installed on our web servers (it still needs directory browsing, however).
I'm surprised that there isn't more on the web about automatically updating applications, and was wondering whether people have had success with any other methods than the ones mentioned above?
[1]: http://windowsclient.net/articles/appupdater.aspx | 0 |
49,755 | 09/08/2008 13:58:06 | 976 | 08/11/2008 10:53:45 | 18 | 2 | Design Pattern for Undo Engine | I'm writing a structural modeling tool for a civil enginering application. I have one huge model class representing the entire building, which include collections of nodes, line elements, loads, etc. which are also custom classes.
I have already coded an undo engine which saves a deep-copy of the model class after each modification to the model. Now I started thinking if I could have coded differently. Instead of saving the deep-copies, I could perhaps save a list of each modifier action with a corresponding reverse modifier. So that I could apply the reverse modifiers to the current model to undo, or the modifiers to redo.
I can imagine how you would carry out simple commands that change object properties, etc. But how about complex commands? Like inserting new node objects to the model and adding some line objects which keep references to the new nodes.
How would one go about implementing that?
| design-patterns | null | null | null | null | null | open | Design Pattern for Undo Engine
===
I'm writing a structural modeling tool for a civil enginering application. I have one huge model class representing the entire building, which include collections of nodes, line elements, loads, etc. which are also custom classes.
I have already coded an undo engine which saves a deep-copy of the model class after each modification to the model. Now I started thinking if I could have coded differently. Instead of saving the deep-copies, I could perhaps save a list of each modifier action with a corresponding reverse modifier. So that I could apply the reverse modifiers to the current model to undo, or the modifiers to redo.
I can imagine how you would carry out simple commands that change object properties, etc. But how about complex commands? Like inserting new node objects to the model and adding some line objects which keep references to the new nodes.
How would one go about implementing that?
| 0 |
49,757 | 09/08/2008 13:59:05 | 61 | 08/01/2008 14:21:00 | 1,202 | 87 | What is a good design when trying to build objects from a list of key value pairs? | So if I have a method of parsing a text file and returning a **list** _of a_ **list** _of_ **key value pairs**, and want to create objects from the kvps returned (each list of kvps represents a different object), what would be the best method?
The first method that pops into mind is pretty simple, just keep a list of keywords:
private const string NAME = "name";
private const string PREFIX = "prefix";
and check against the keys I get for the constants I want, defined above. This is a fairly core piece of the project I'm working on though, so I want to do it well; does anyone have any more robust suggestions? | c# | design | null | null | null | null | open | What is a good design when trying to build objects from a list of key value pairs?
===
So if I have a method of parsing a text file and returning a **list** _of a_ **list** _of_ **key value pairs**, and want to create objects from the kvps returned (each list of kvps represents a different object), what would be the best method?
The first method that pops into mind is pretty simple, just keep a list of keywords:
private const string NAME = "name";
private const string PREFIX = "prefix";
and check against the keys I get for the constants I want, defined above. This is a fairly core piece of the project I'm working on though, so I want to do it well; does anyone have any more robust suggestions? | 0 |
49,790 | 09/08/2008 14:18:29 | 5,058 | 09/07/2008 16:00:39 | 86 | 5 | In HTML, what should happen to a selected, disabled option element? | In my specific example, I'm dealing with a drop-down, e.g.:
<select name="foo" id="bar">
<option disabled="disabled" selected="selected">Select an item:</option>
<option>an item</option>
<option>another item</option>
</select>
Of course, that's pretty nonsensical, but I'm wondering whether any strict behaviour is defined. Opera effectively rejects the 'selected' attribute and selects the next item in the list. All other browsers appear to allow it, and it remains selected. | html | forms | crossbrowser | specifications | null | null | open | In HTML, what should happen to a selected, disabled option element?
===
In my specific example, I'm dealing with a drop-down, e.g.:
<select name="foo" id="bar">
<option disabled="disabled" selected="selected">Select an item:</option>
<option>an item</option>
<option>another item</option>
</select>
Of course, that's pretty nonsensical, but I'm wondering whether any strict behaviour is defined. Opera effectively rejects the 'selected' attribute and selects the next item in the list. All other browsers appear to allow it, and it remains selected. | 0 |
49,799 | 09/08/2008 14:25:29 | 4,694 | 09/05/2008 09:30:26 | 38 | 6 | How often do you use System.Component.Background worker in your UIs ? (if ever) | I am sure a responsive UI is something that everyone strives for and the reccomended way to do stuff is to use the BackgroundWorker for this.
Do you find it easy to work with ? Do you use it often ? Or do you have your own frameworks for lengthy tasks and reporting process.
I have found that I am using it quite a lot and even using its delegates wherever I need some sort of progress reporting. | .net | gui | null | null | null | null | open | How often do you use System.Component.Background worker in your UIs ? (if ever)
===
I am sure a responsive UI is something that everyone strives for and the reccomended way to do stuff is to use the BackgroundWorker for this.
Do you find it easy to work with ? Do you use it often ? Or do you have your own frameworks for lengthy tasks and reporting process.
I have found that I am using it quite a lot and even using its delegates wherever I need some sort of progress reporting. | 0 |
49,806 | 09/08/2008 14:28:36 | 986 | 08/11/2008 12:13:30 | 934 | 49 | How to create a non-interactive window in MFC | In my application I have a window which I popup with small messages on it (think similar to tooltip). This window uses the layered attributes to draw alpha backgrounds etc.
If I have several of these windows open at once, and I click one with my mouse, when they disappear they cause my application to lose focus (it switches focus to the app behind the current one).
How do I stop any interaction in my window? | mfc | focus | activation | null | null | null | open | How to create a non-interactive window in MFC
===
In my application I have a window which I popup with small messages on it (think similar to tooltip). This window uses the layered attributes to draw alpha backgrounds etc.
If I have several of these windows open at once, and I click one with my mouse, when they disappear they cause my application to lose focus (it switches focus to the app behind the current one).
How do I stop any interaction in my window? | 0 |
49,809 | 09/08/2008 14:30:59 | 1,384,652 | 08/01/2008 12:01:23 | 1,861 | 83 | Learning .NET | Assuming all goes well and I get employed by the company I am about to interview with I will probably need to learn .NET and C#
I already know PHP, Python, Java and some C (Pointers and Memory Management are not so good) so I'm going to be able to do it if I can find a good tutorial to cover the key parts of it, does anybody have a link to a good tutorial for it or better yet, for someone switching from one of those languages to .NET? | c# | .net | null | null | null | null | open | Learning .NET
===
Assuming all goes well and I get employed by the company I am about to interview with I will probably need to learn .NET and C#
I already know PHP, Python, Java and some C (Pointers and Memory Management are not so good) so I'm going to be able to do it if I can find a good tutorial to cover the key parts of it, does anybody have a link to a good tutorial for it or better yet, for someone switching from one of those languages to .NET? | 0 |
49,824 | 09/08/2008 14:36:24 | 4,223 | 09/02/2008 12:31:58 | 629 | 27 | Java -> Python? | Besides the dynamic nature of Python (and the syntax), what are some of the major features of the Python language that Java doesn't have, and vice versa?
| java | python | null | null | null | null | open | Java -> Python?
===
Besides the dynamic nature of Python (and the syntax), what are some of the major features of the Python language that Java doesn't have, and vice versa?
| 0 |
49,832 | 09/08/2008 14:41:17 | 362 | 08/05/2008 04:38:30 | 59 | 0 | Is A+ Certification relevant? | After reading an [overview][1] of the A+ certification from CompTIA, it states that they "recognize the evolution by continually reviewing the content of their credentials..."
Then they state that their most recent change was in 2003. Really? Are they really keeping up? Is this certification really worth anything, *knowledge-wise*, as a first certification for a "newbie" into the IT field to look into?
[1]: http://certification.comptia.org/a/new_docs/CompTIA%20A+%202006%20Overview.pdf | certification | a+ | null | null | null | null | open | Is A+ Certification relevant?
===
After reading an [overview][1] of the A+ certification from CompTIA, it states that they "recognize the evolution by continually reviewing the content of their credentials..."
Then they state that their most recent change was in 2003. Really? Are they really keeping up? Is this certification really worth anything, *knowledge-wise*, as a first certification for a "newbie" into the IT field to look into?
[1]: http://certification.comptia.org/a/new_docs/CompTIA%20A+%202006%20Overview.pdf | 0 |
49,847 | 09/08/2008 14:46:03 | 5,189 | 09/08/2008 11:44:07 | 11 | 3 | Open source or low cost "log shipping" program | I have written a log shipping program a number of times. It is a simple program that is used to maintain a warm fail over box for SQL Server.
It has two pieces. On the live dB server it:
- Does full and transaction backups and removes old files
On the backup server it:
- Copies the backups from the live box
- Restores the backups or trans into databases that are set to recovery
- zips the backups
- deletes them based on retention
If there is a failure, the program can go through each database on the backup server and set them to active.
I am looking for an open source or low cost program that does this.
| sql-server | backup | null | null | null | null | open | Open source or low cost "log shipping" program
===
I have written a log shipping program a number of times. It is a simple program that is used to maintain a warm fail over box for SQL Server.
It has two pieces. On the live dB server it:
- Does full and transaction backups and removes old files
On the backup server it:
- Copies the backups from the live box
- Restores the backups or trans into databases that are set to recovery
- zips the backups
- deletes them based on retention
If there is a failure, the program can go through each database on the backup server and set them to active.
I am looking for an open source or low cost program that does this.
| 0 |
49,870 | 09/08/2008 14:58:06 | 5,056 | 09/07/2008 15:43:17 | 100 | 14 | I understand threading in theory but not in practice in .net | I have a basic cs-major understanding of multi-threading but have never had to do anything beyond simple timers in an application. Does anyone know of a good resource that will give me a tour how to work with multi-threaded applications, explaining the basics and maybe posing some of the more difficult stuff? | .net | multithreading | reference | null | null | null | open | I understand threading in theory but not in practice in .net
===
I have a basic cs-major understanding of multi-threading but have never had to do anything beyond simple timers in an application. Does anyone know of a good resource that will give me a tour how to work with multi-threaded applications, explaining the basics and maybe posing some of the more difficult stuff? | 0 |
49,876 | 09/08/2008 15:00:25 | 845 | 08/09/2008 12:58:59 | 29 | 2 | Simpler interface for SQL Server analysis services cubes for end users | Is there a simpler interface for end users to run "queries" on pre-existing SqlServer Analysis Service cubes? I'm looking for a way to deploy the cubes and allow the users to work with the data through a simpler interface than BIDS. Is this even possible? | sql-server | olap | cubes | null | null | null | open | Simpler interface for SQL Server analysis services cubes for end users
===
Is there a simpler interface for end users to run "queries" on pre-existing SqlServer Analysis Service cubes? I'm looking for a way to deploy the cubes and allow the users to work with the data through a simpler interface than BIDS. Is this even possible? | 0 |
49,879 | 09/08/2008 15:01:26 | 3,825 | 08/31/2008 03:45:58 | 1 | 0 | colored build output in Visual Studio | I am using a VS project with custom build script/batch file (ala make/ant etc)
When the build is run from the command line we have placed colored highlighting on various output lines.
However when built via Visual Studio (2005 in my case) the output window does not show the color anymore.
Is this possible? I am quite happy to put specific code into the build script if required.
| visual-studio | colors | null | null | null | null | open | colored build output in Visual Studio
===
I am using a VS project with custom build script/batch file (ala make/ant etc)
When the build is run from the command line we have placed colored highlighting on various output lines.
However when built via Visual Studio (2005 in my case) the output window does not show the color anymore.
Is this possible? I am quite happy to put specific code into the build script if required.
| 0 |
49,882 | 09/08/2008 15:03:47 | 1,196 | 08/13/2008 12:33:04 | 2,642 | 181 | What real-world usages of ADO.NET Entity Framework do you know? | Does anyone have real-world experience with ADO.NET EF? Do you know any project based on this framework? | ado.net | entity-framework | null | null | null | null | open | What real-world usages of ADO.NET Entity Framework do you know?
===
Does anyone have real-world experience with ADO.NET EF? Do you know any project based on this framework? | 0 |
49,883 | 09/08/2008 15:03:52 | 1,532 | 08/16/2008 12:19:36 | 100 | 10 | xslt: apply-templates in reverse order | say i have this given xml file
<root>
<node>x</node>
<node>y</node>
<node>a</node>
</root>
and i want the following to be displayed
ayx
using something similar to
<xsl:template match="/">
<xsl:apply-templates select="root/node"/>
</xsl:template>
<xsl:template match="node">
<xsl:value-of select="."/>
</xsl:template> | xslt | sorting | null | null | null | null | open | xslt: apply-templates in reverse order
===
say i have this given xml file
<root>
<node>x</node>
<node>y</node>
<node>a</node>
</root>
and i want the following to be displayed
ayx
using something similar to
<xsl:template match="/">
<xsl:apply-templates select="root/node"/>
</xsl:template>
<xsl:template match="node">
<xsl:value-of select="."/>
</xsl:template> | 0 |
49,890 | 09/08/2008 15:06:23 | 673 | 08/07/2008 16:33:05 | 377 | 37 | Mediawiki custom tag Stops page parsing. | I created a few mediawiki custom tags, using the guide found here
http://www.mediawiki.org/wiki/Manual:Tag_extensions
I will post my code below, but the problem is after it hits the first custom tag in the page, it calls it, and prints the response, but does not get anything that comes after it in the wikitext. It seems it just stops parsing the page.
Any Ideas?
<pre><code>if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
$wgHooks['ParserFirstCallInit'][] = 'tagregister';
} else { // Otherwise do things the old fashioned way
$wgExtensionFunctions[] = 'tagregister';
}
function tagregister(){
global $wgParser;
$wgParser->setHook('tag1','tag1func');
$wgParser->setHook('tag2','tag2func');
return true;
}
function tag1func($input,$params)
{
return "It called me";
}
function tag2func($input,$params)
{
return "It called me -- 2";
}</code></pre>
| php | extension | mediawiki | null | null | null | open | Mediawiki custom tag Stops page parsing.
===
I created a few mediawiki custom tags, using the guide found here
http://www.mediawiki.org/wiki/Manual:Tag_extensions
I will post my code below, but the problem is after it hits the first custom tag in the page, it calls it, and prints the response, but does not get anything that comes after it in the wikitext. It seems it just stops parsing the page.
Any Ideas?
<pre><code>if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
$wgHooks['ParserFirstCallInit'][] = 'tagregister';
} else { // Otherwise do things the old fashioned way
$wgExtensionFunctions[] = 'tagregister';
}
function tagregister(){
global $wgParser;
$wgParser->setHook('tag1','tag1func');
$wgParser->setHook('tag2','tag2func');
return true;
}
function tag1func($input,$params)
{
return "It called me";
}
function tag2func($input,$params)
{
return "It called me -- 2";
}</code></pre>
| 0 |
49,896 | 09/08/2008 15:07:30 | 5,222 | 09/08/2008 15:07:29 | 1 | 0 | Which is the best way to bring a file from a remote host to local host over an SSH session? | When connecting to remote hosts via ssh, I frequently want to bring a file on that system to the local system for viewing or processing. Is there a way to copy the file over without (a) opening a new terminal/pausing the ssh session (b) authenticating again to either the local or remote hosts which works (c) even when one or both of the hosts is behind a NAT router? | ssh | null | null | null | null | null | open | Which is the best way to bring a file from a remote host to local host over an SSH session?
===
When connecting to remote hosts via ssh, I frequently want to bring a file on that system to the local system for viewing or processing. Is there a way to copy the file over without (a) opening a new terminal/pausing the ssh session (b) authenticating again to either the local or remote hosts which works (c) even when one or both of the hosts is behind a NAT router? | 0 |
49,900 | 09/08/2008 15:08:57 | 1,471 | 08/15/2008 18:26:14 | 458 | 34 | Is there a way to generalize an Apache ANT target? | We have an Apache ANT script to build our application, then check in the resulting JAR file into version control (VSS in this case). However, now we have a change that requires us to build 2 JAR files for this project, then check both into VSS.
The current target that checks the original JAR file into VSS discovers the name of the JAR file through some property. Is there an easy way to "generalize" this target so that I can reuse it to check in a JAR file with any name? In a normal language this would obviously call for a function parameter but, to my knowledge, there really isn't an equivalent concept in ANT. | java | build-process | build-automation | ant | null | null | open | Is there a way to generalize an Apache ANT target?
===
We have an Apache ANT script to build our application, then check in the resulting JAR file into version control (VSS in this case). However, now we have a change that requires us to build 2 JAR files for this project, then check both into VSS.
The current target that checks the original JAR file into VSS discovers the name of the JAR file through some property. Is there an easy way to "generalize" this target so that I can reuse it to check in a JAR file with any name? In a normal language this would obviously call for a function parameter but, to my knowledge, there really isn't an equivalent concept in ANT. | 0 |
49,906 | 09/08/2008 15:11:56 | 3,631 | 08/29/2008 16:06:08 | 1,228 | 54 | Best tools for code reviews | It has been well established that code reviews are good, so this question is purely about the mechanics. For a dev environment centered around Visual Studio and Subversion what are the best tools for handling code reviews?
We currently use TortoiseSVN as the Subversion client. so accessing diffs, logs, etc. is fairly straight forward, but I think the process could be streamlined more by a tool that was designed for code reviews. Are there any out there? | svn | tortoisesvn | codereview | null | null | 03/19/2012 17:56:01 | not constructive | Best tools for code reviews
===
It has been well established that code reviews are good, so this question is purely about the mechanics. For a dev environment centered around Visual Studio and Subversion what are the best tools for handling code reviews?
We currently use TortoiseSVN as the Subversion client. so accessing diffs, logs, etc. is fairly straight forward, but I think the process could be streamlined more by a tool that was designed for code reviews. Are there any out there? | 4 |
49,908 | 09/08/2008 15:12:45 | 3,381 | 08/28/2008 11:39:48 | 470 | 55 | How to create custom pages in dasBlog? | I know I've seen this in the past, but I can't seem to find it now.
Basically I want to create a page that I can host on a dasBlog instance that contains the layout from my theme, but the content of the page I control.
Ideally the content is a user control or ASPX that I write. Anybody know how I can accomplish this? | dasblog | null | null | null | null | null | open | How to create custom pages in dasBlog?
===
I know I've seen this in the past, but I can't seem to find it now.
Basically I want to create a page that I can host on a dasBlog instance that contains the layout from my theme, but the content of the page I control.
Ideally the content is a user control or ASPX that I write. Anybody know how I can accomplish this? | 0 |
49,912 | 09/08/2008 15:14:00 | 4,653 | 09/05/2008 00:53:33 | 1 | 0 | Best dotnet memory and performance profiler . . | We are using Jetbrains dottrace. Anyone recommend any other profiling tools that you think are better for profiling C# winforms apps. | c# | dotnet | code-profiling | null | null | 09/21/2011 06:57:00 | not constructive | Best dotnet memory and performance profiler . .
===
We are using Jetbrains dottrace. Anyone recommend any other profiling tools that you think are better for profiling C# winforms apps. | 4 |
49,919 | 09/08/2008 15:17:22 | 3,208 | 08/27/2008 13:12:45 | 18 | 2 | Regex to Match first 28 days of the month | I am looking for a Regular expression to match only if a date is in the first 28 days of the month. This is for my validator control in ASP.NET | asp.net | regex | null | null | null | null | open | Regex to Match first 28 days of the month
===
I am looking for a Regular expression to match only if a date is in the first 28 days of the month. This is for my validator control in ASP.NET | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.