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
59,525
09/12/2008 17:04:44
4,786
09/05/2008 15:29:10
112
7
What's a good program to record video or screencast being played on screen?
What's a good program to record videos or screencasts being played on screen?
record
video
screencasts
null
null
12/19/2011 09:08:23
off topic
What's a good program to record video or screencast being played on screen? === What's a good program to record videos or screencasts being played on screen?
2
59,537
09/12/2008 17:10:36
2,328
08/21/2008 16:45:54
657
31
Service Oriented Architecture: How would you define it
Service Oriented Architecture seems to be more and more of a hot quote these days, but after asking around the office I have found that I seem to get many different definitions for it. How would you guys define SOA? What would you consider the official definition?
soa
null
null
null
null
null
open
Service Oriented Architecture: How would you define it === Service Oriented Architecture seems to be more and more of a hot quote these days, but after asking around the office I have found that I seem to get many different definitions for it. How would you guys define SOA? What would you consider the official definition?
0
59,547
09/12/2008 17:16:27
3,366
08/28/2008 08:58:39
149
3
What tools exist to convert a Delphi 7 application to C# and the .Net framework?
I maintain an old PC-only application written in Delphi 7. Although Delphi has served me very well in the past I now only use it for this one application and find my skills with the language diminishing. It's syntax is too different from my 'day job' languages of Java/Ruby so it takes me longer to get into the groove of writing new code, plus it is so old I have not used many **interface**s so the code is not managed which seems ancient to me now! Many of my users are moving to Vista which may run the app in compatibility mode or may have GPF problems depending on how their PC is configured by their IT department, so I have to do some maintenance on the application. I'm wondering if I should jump to a more familiar stack. Is there an automated tool that will do the legwork of converting the code base to C#, leaving me to concentrate on the conversion on any non-standard components? I'm using an embedded database component called [AbsoluteDatabase][1] which is BDE compatible and using standard SQL throughout, and a native Delphi HTML browser component which can be swapped out with something from the Microsoft world. How good are these conversion tools? [1]: http://www.componentace.com/bde_replacement_database_delphi_absolute_database.htm
delphi
c#
null
null
null
null
open
What tools exist to convert a Delphi 7 application to C# and the .Net framework? === I maintain an old PC-only application written in Delphi 7. Although Delphi has served me very well in the past I now only use it for this one application and find my skills with the language diminishing. It's syntax is too different from my 'day job' languages of Java/Ruby so it takes me longer to get into the groove of writing new code, plus it is so old I have not used many **interface**s so the code is not managed which seems ancient to me now! Many of my users are moving to Vista which may run the app in compatibility mode or may have GPF problems depending on how their PC is configured by their IT department, so I have to do some maintenance on the application. I'm wondering if I should jump to a more familiar stack. Is there an automated tool that will do the legwork of converting the code base to C#, leaving me to concentrate on the conversion on any non-standard components? I'm using an embedded database component called [AbsoluteDatabase][1] which is BDE compatible and using standard SQL throughout, and a native Delphi HTML browser component which can be swapped out with something from the Microsoft world. How good are these conversion tools? [1]: http://www.componentace.com/bde_replacement_database_delphi_absolute_database.htm
0
59,549
09/12/2008 17:19:01
4,979
09/07/2008 07:33:24
565
18
Native Tongue as Default Language For an Application
When downloading both Firefox and Chrome, I've noticed that the default version I got was in my native tongue of Hebrew. I personally don't like my applications in Hebrew, since I'm used to the English UI conventions embedded in me since long ago by: 1. **The lack of choice:** Most programs don't offer interfaces in multiple languages and when they do, those languages are usually English and the developer's native tongue. 2. **Programming languages** which are almost completely bound to the English language. My question then is this: 1. If you translate your applications, would you limit the UI to the user's native tongue or give them the choice by enabling more than one language pack by default? 2. Which language would your application default to (which is interesting mostly if you only install one language pack with your application)? And also generally I'd like to know how much value do you put into translating your applications on a whole.
user-interface
language
user-experience
null
null
null
open
Native Tongue as Default Language For an Application === When downloading both Firefox and Chrome, I've noticed that the default version I got was in my native tongue of Hebrew. I personally don't like my applications in Hebrew, since I'm used to the English UI conventions embedded in me since long ago by: 1. **The lack of choice:** Most programs don't offer interfaces in multiple languages and when they do, those languages are usually English and the developer's native tongue. 2. **Programming languages** which are almost completely bound to the English language. My question then is this: 1. If you translate your applications, would you limit the UI to the user's native tongue or give them the choice by enabling more than one language pack by default? 2. Which language would your application default to (which is interesting mostly if you only install one language pack with your application)? And also generally I'd like to know how much value do you put into translating your applications on a whole.
0
59,557
09/12/2008 17:23:32
2,138
08/20/2008 14:23:45
115
10
HTML to Markdown with Java
is there an easy way to transform HTML into markdown with JAVA? I am currently using the Java **MarkdownJ** library to transform markdown to html. import com.petebevin.markdown.MarkdownProcessor; ... public static String getHTML(String markdown) { MarkdownProcessor markdown_processor = new MarkdownProcessor(); return markdown_processor.markdown(markdown); } public static String getMarkdown(String html) { /* TODO Ask stackoverflow */ }
java
markdown
null
null
null
null
open
HTML to Markdown with Java === is there an easy way to transform HTML into markdown with JAVA? I am currently using the Java **MarkdownJ** library to transform markdown to html. import com.petebevin.markdown.MarkdownProcessor; ... public static String getHTML(String markdown) { MarkdownProcessor markdown_processor = new MarkdownProcessor(); return markdown_processor.markdown(markdown); } public static String getMarkdown(String html) { /* TODO Ask stackoverflow */ }
0
59,560
09/12/2008 17:24:55
5,287
09/08/2008 21:29:47
58
8
Most effective form of CAPTCHA?
Of all the forms of CAPTCHA available, which one is the "least crackable" while remaining fairly human readable?
captcha
null
null
null
null
null
open
Most effective form of CAPTCHA? === Of all the forms of CAPTCHA available, which one is the "least crackable" while remaining fairly human readable?
0
59,561
09/12/2008 17:25:14
5,405
09/09/2008 13:17:05
103
7
What tools/techniques can benefit a solo developer?
I am a solo developer, working in a very small web development firm. There is occasional support for development from contractors, but for the most part, if code is written in the office, I am writing it. Many of the articles and such on here talk extensively about the tools and techniques used for collaboration of developers in teams, but that is a non-issue with me, as there is no one to (technically) collaborate with. Yet, I feel that in many ways, there are things that could be adjusted for efficiency. Our small office doesn't participate in many of the meetings/team constructions that most of the techniques rely heavily upon....we mostly just walk around and talk to one another when something is needed. This works great for all of the Just-In-Time, 15 minute fix stuff that probably populates 50% of my day, but I am also constantly working on major projects that require my total concentration, and between a flurry of tiny fixes, and being the primary admin on the 4-6 servers that we own, I find it almost impossible to get real, heavy lifting done. What suggestions can you some of you offer to help me/us become more productive/efficient, without adopting all of the corporate/teamwork practices that we are trying desperately to avoid? At what cost for efficiency is our total relaxation?
productivity
performance
solo-developer
null
null
null
open
What tools/techniques can benefit a solo developer? === I am a solo developer, working in a very small web development firm. There is occasional support for development from contractors, but for the most part, if code is written in the office, I am writing it. Many of the articles and such on here talk extensively about the tools and techniques used for collaboration of developers in teams, but that is a non-issue with me, as there is no one to (technically) collaborate with. Yet, I feel that in many ways, there are things that could be adjusted for efficiency. Our small office doesn't participate in many of the meetings/team constructions that most of the techniques rely heavily upon....we mostly just walk around and talk to one another when something is needed. This works great for all of the Just-In-Time, 15 minute fix stuff that probably populates 50% of my day, but I am also constantly working on major projects that require my total concentration, and between a flurry of tiny fixes, and being the primary admin on the 4-6 servers that we own, I find it almost impossible to get real, heavy lifting done. What suggestions can you some of you offer to help me/us become more productive/efficient, without adopting all of the corporate/teamwork practices that we are trying desperately to avoid? At what cost for efficiency is our total relaxation?
0
59,590
09/12/2008 17:38:49
2,469
08/22/2008 12:41:47
662
45
lock keyword in C#
I understand the main function of the lock key word from MSDN > lock Statement (C# Reference) > > The lock keyword marks a statement > block as a critical section by > obtaining the mutual-exclusion lock > for a given object, executing a > statement, and then releasing the > lock. When should the lock be used? For instance it makes sense with multi-threaded applications because it protects the data. But is it necessary when the application does not spin off any other threads? Is there performance issues with using lock? I have just inherited an application that is using lock everywhere, and it is single threaded and I want to know should I leave them in, are they even necessary? Please note this is more of a general knowledge question, the application speed is fine, I want to know if that is a good design pattern to follow in the future or should this be avoided unless absolutely needed.
c#
locking
designpatterns
null
null
null
open
lock keyword in C# === I understand the main function of the lock key word from MSDN > lock Statement (C# Reference) > > The lock keyword marks a statement > block as a critical section by > obtaining the mutual-exclusion lock > for a given object, executing a > statement, and then releasing the > lock. When should the lock be used? For instance it makes sense with multi-threaded applications because it protects the data. But is it necessary when the application does not spin off any other threads? Is there performance issues with using lock? I have just inherited an application that is using lock everywhere, and it is single threaded and I want to know should I leave them in, are they even necessary? Please note this is more of a general knowledge question, the application speed is fine, I want to know if that is a good design pattern to follow in the future or should this be avoided unless absolutely needed.
0
59,622
09/12/2008 17:53:07
6,161
09/12/2008 17:53:07
1
0
Detecting appilcation hangs with ActiveX controls in .Net
I am working on upgrades to a screen scraping application. We are using an ActiveX control to scrape screens out of an IBM mainframe. The mainframe program often hangs and crashes the ActiveX control causing our application to crash. We don't have access to the mainframe or the ActiveX source code. We are not going to write our own active x control. What is the bast way to encapsulate an ActiveX control to detect application hangs with the control so we can kill the process and restart with code? Should I create 2 separate applications? One as a controller that checks on the other and kills/restarts the process when it hangs? Would they have to be on separate app domains? Is it possible have two programs communicate with each other even if they are on separate app domains?
.net
activex
application
hangs
null
null
open
Detecting appilcation hangs with ActiveX controls in .Net === I am working on upgrades to a screen scraping application. We are using an ActiveX control to scrape screens out of an IBM mainframe. The mainframe program often hangs and crashes the ActiveX control causing our application to crash. We don't have access to the mainframe or the ActiveX source code. We are not going to write our own active x control. What is the bast way to encapsulate an ActiveX control to detect application hangs with the control so we can kill the process and restart with code? Should I create 2 separate applications? One as a controller that checks on the other and kills/restarts the process when it hangs? Would they have to be on separate app domains? Is it possible have two programs communicate with each other even if they are on separate app domains?
0
59,627
09/12/2008 17:57:10
5,056
09/07/2008 15:43:17
707
59
How do I find if my particular computer is going to have problems when I install linux?
The IT lady just gave me a laptop to keep! I've always wanted to have Linux install to play with so the first thing I did is search stackoverflow for Linux Distro suggestions and found it [here][1]. However they also mention that you should search around to see if anyone's had any problems with your drivers and that distro. Now all I know is that this is a Toshiba Tecra A5 - I havent' even booted it up yet but when I do how should I go about researching whether the drivers are compatible with Ubuntu or whatever I choose to use? Should I just be googling Ubunto+DriverName or are there better resources? [1]: http://stackoverflow.com/questions/659/what-is-your-preferred-linux-distribution#6730
linux
installation
drivers
null
null
null
open
How do I find if my particular computer is going to have problems when I install linux? === The IT lady just gave me a laptop to keep! I've always wanted to have Linux install to play with so the first thing I did is search stackoverflow for Linux Distro suggestions and found it [here][1]. However they also mention that you should search around to see if anyone's had any problems with your drivers and that distro. Now all I know is that this is a Toshiba Tecra A5 - I havent' even booted it up yet but when I do how should I go about researching whether the drivers are compatible with Ubuntu or whatever I choose to use? Should I just be googling Ubunto+DriverName or are there better resources? [1]: http://stackoverflow.com/questions/659/what-is-your-preferred-linux-distribution#6730
0
59,628
09/12/2008 17:57:51
781
08/08/2008 21:28:19
494
16
AJAX Partial Page Load?
I have a page results page (you get there after submitting your search query elsewhere) whit a whole bunch of gridviews for different type of data objects. Obviously, some of the queries take longer than the others. How can I make each gridview render as soon as it has the data it needs? This has been tricky for me because it must work on a postback as well as a pageload. Also, the object data sources just fire automatically on page load/postback; I'm not calling any methods programatically to get the data. Will I have to change this?
asp.net
ajax
null
null
null
null
open
AJAX Partial Page Load? === I have a page results page (you get there after submitting your search query elsewhere) whit a whole bunch of gridviews for different type of data objects. Obviously, some of the queries take longer than the others. How can I make each gridview render as soon as it has the data it needs? This has been tricky for me because it must work on a postback as well as a pageload. Also, the object data sources just fire automatically on page load/postback; I'm not calling any methods programatically to get the data. Will I have to change this?
0
59,635
09/12/2008 17:59:53
1,441
08/15/2008 15:57:40
321
31
App does not run with VS 2008 SP1 DLLs, previous version works with RTM versions
Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using the MFC90.dll and msvc[pr]90.dlls along with the manifest files in a private side-by-side configuration so as to not worry about versions or installing them to the system. Pre-SP1, this was working fine (and still works fine on our developer machines). Now that we've done some testing post-SP1 I've been pulling my hair out since yesterday morning. First off, our NSIS installer script pulls the dlls and manifest files from the redist folder. These were no longer correct, as the app still links to the RTM version. So I added the define for <code>\_BIND\_TO\_CURRENT\_VCLIBS\_VERSION=1</code> to all of our projects so that they will use the SP1 DLLs in the redist folder (or subsequent ones as new service packs come out). It took me hours to find this. I've double checked the generated manifest files in the intermediate files folder from the compilation, and they correctly list the 9.0.30729.1 SP1 versions. I've double and triple checked depends on a clean machine: it all links to the local dlls with no errors. Running the app still gets the following error: >>The application failed to initialize properly (0xc0150002). Click on OK to terminate the application. None of the searches I've done on google or microsoft have come up with anything that relates to my specific issues (but there are hits back to 2005 with this error message). Any one had any similar problem with SP1? Options:<ul> <li>Find the problem and fix it so it works as it should (preferred) <li>Install the redist <li>dig out the old RTM dlls and manifest files and remove the #define to use the current ones. (I've got them in an earlier installer build, since Microsoft blasts them out of your redist folder!)</ul>
c++
vs2008
mfc
null
null
null
open
App does not run with VS 2008 SP1 DLLs, previous version works with RTM versions === Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using the MFC90.dll and msvc[pr]90.dlls along with the manifest files in a private side-by-side configuration so as to not worry about versions or installing them to the system. Pre-SP1, this was working fine (and still works fine on our developer machines). Now that we've done some testing post-SP1 I've been pulling my hair out since yesterday morning. First off, our NSIS installer script pulls the dlls and manifest files from the redist folder. These were no longer correct, as the app still links to the RTM version. So I added the define for <code>\_BIND\_TO\_CURRENT\_VCLIBS\_VERSION=1</code> to all of our projects so that they will use the SP1 DLLs in the redist folder (or subsequent ones as new service packs come out). It took me hours to find this. I've double checked the generated manifest files in the intermediate files folder from the compilation, and they correctly list the 9.0.30729.1 SP1 versions. I've double and triple checked depends on a clean machine: it all links to the local dlls with no errors. Running the app still gets the following error: >>The application failed to initialize properly (0xc0150002). Click on OK to terminate the application. None of the searches I've done on google or microsoft have come up with anything that relates to my specific issues (but there are hits back to 2005 with this error message). Any one had any similar problem with SP1? Options:<ul> <li>Find the problem and fix it so it works as it should (preferred) <li>Install the redist <li>dig out the old RTM dlls and manifest files and remove the #define to use the current ones. (I've got them in an earlier installer build, since Microsoft blasts them out of your redist folder!)</ul>
0
59,642
09/12/2008 18:03:47
2,723
08/24/2008 17:49:45
32
2
Determine Installed Compact Frameworks (and SP) Version
What's the best way to determine which version of the .NET Compact Frameworks (including Service Packs) is installed on a device through a .NET application.
compactframework
null
null
null
null
null
open
Determine Installed Compact Frameworks (and SP) Version === What's the best way to determine which version of the .NET Compact Frameworks (including Service Packs) is installed on a device through a .NET application.
0
59,648
09/12/2008 18:09:02
6,163
09/12/2008 18:09:02
1
0
Storing multiple arrays in Python
I am writing a program to simulate the actual polling data companies like Gallup or Rasmussen publish daily: www.gallup.com and www.rassmussenreports.com I'm using a brute force method, where the computer generates some random daily polling data and then calculates three day averages to see if the average of the random data matches pollsters numbers. (Most companies poll numbers are three day averages) Currently, it works well for one iteration, but my goal is to have it produce the most common simulation that matches the average polling data. I could then change the code of anywhere from 1 to 1000 iterations. And this is my problem. At the end of the test I have an array in a single variable that looks something like this: [40.1, 39.4, 56.7, 60.0, 20.0 ..... 19.0] The program currently produces one array for each correct simulation. *I can store each array in a single variable, but I then have to have a program that could generate 1 to 1000 variables depending on how many iterations I requested!?* How do I avoid this? I know there is an intelligent way of doing this that doesn't require the program to generate variables to store arrays depending on how many simulations I want. Thanks, Andy
python
null
null
null
null
null
open
Storing multiple arrays in Python === I am writing a program to simulate the actual polling data companies like Gallup or Rasmussen publish daily: www.gallup.com and www.rassmussenreports.com I'm using a brute force method, where the computer generates some random daily polling data and then calculates three day averages to see if the average of the random data matches pollsters numbers. (Most companies poll numbers are three day averages) Currently, it works well for one iteration, but my goal is to have it produce the most common simulation that matches the average polling data. I could then change the code of anywhere from 1 to 1000 iterations. And this is my problem. At the end of the test I have an array in a single variable that looks something like this: [40.1, 39.4, 56.7, 60.0, 20.0 ..... 19.0] The program currently produces one array for each correct simulation. *I can store each array in a single variable, but I then have to have a program that could generate 1 to 1000 variables depending on how many iterations I requested!?* How do I avoid this? I know there is an intelligent way of doing this that doesn't require the program to generate variables to store arrays depending on how many simulations I want. Thanks, Andy
0
59,651
09/12/2008 18:10:16
730
08/08/2008 12:40:04
233
33
Default Integer type in ASP.Net from a Stored Procedure
I have a web page that has I'm hooking up a stored procedure on. In this SQL Data Source, I have a parameter that I'm passing back to the SP of type int. ASP seems to want to default to int32 but the number won't get higher than 6. Is it ok to override the ASP default and put in 16 or will there be a conflict somewhere down the road? Spec: the DB field has a length of 4 and precision of 10,if that makes a difference in the answer. Thanks.
asp.net
sql-server
stored-procedures
parameters
null
null
open
Default Integer type in ASP.Net from a Stored Procedure === I have a web page that has I'm hooking up a stored procedure on. In this SQL Data Source, I have a parameter that I'm passing back to the SP of type int. ASP seems to want to default to int32 but the number won't get higher than 6. Is it ok to override the ASP default and put in 16 or will there be a conflict somewhere down the road? Spec: the DB field has a length of 4 and precision of 10,if that makes a difference in the answer. Thanks.
0
59,653
09/12/2008 18:11:28
580
08/06/2008 22:30:28
1,397
90
Getting at the Listbox's ItemContainer
Is there a way to get at the ItemContaner of a selected item in a listbox? In Beta 1 i could, but the container is hidden in 2.0.
silverlight
null
null
null
null
null
open
Getting at the Listbox's ItemContainer === Is there a way to get at the ItemContaner of a selected item in a listbox? In Beta 1 i could, but the container is hidden in 2.0.
0
59,655
09/12/2008 18:11:42
4,748
09/05/2008 12:44:55
43
3
How to setup a RAILS integration test for XML mehtods
Given a controller method like: def show @model = Model.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => model } end end What's the best way to write an integration test that asserts that the return has the expected XML?
ruby
xml
integration-testing
null
null
null
open
How to setup a RAILS integration test for XML mehtods === Given a controller method like: def show @model = Model.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => model } end end What's the best way to write an integration test that asserts that the return has the expected XML?
0
59,656
09/12/2008 18:11:51
6,164
09/12/2008 18:11:51
1
0
Why overwrite a file more than once to securely delete traces a file
Erasing programs such as Eraser recommend overwriting data maybe 36 times As I understand it all data is stored on a hard drive as 1s or 0s. If an overwrite of random 1s and 0s is carried out once over the whole file then why isn't that enough to remove all traces of the original file?
kjack
null
null
null
null
null
open
Why overwrite a file more than once to securely delete traces a file === Erasing programs such as Eraser recommend overwriting data maybe 36 times As I understand it all data is stored on a hard drive as 1s or 0s. If an overwrite of random 1s and 0s is carried out once over the whole file then why isn't that enough to remove all traces of the original file?
0
59,667
09/12/2008 18:15:28
5,592
09/10/2008 14:28:56
263
8
Why would I ever pick CHAR over VARCHAR in SQL?
I realize that CHAR is recommended if all my values are fixed-width. But, so what? Why not just pick VARCHAR for all text fields just to be safe.
sql-server
sql
transact-sql
null
null
null
open
Why would I ever pick CHAR over VARCHAR in SQL? === I realize that CHAR is recommended if all my values are fixed-width. But, so what? Why not just pick VARCHAR for all text fields just to be safe.
0
59,670
09/12/2008 18:15:55
3,830
08/31/2008 05:08:21
51
3
How to get rid of `deprecated conversion from string constant to ‘char*’` warnings in GCC?
So I'm working on an exceedingly large codebase, and recently upgraded to gcc 4.3, which now triggers this warning: warning: deprecated conversion from string constant to ‘char*’ Obviously, the correct way to fix this is to find every declaration like char *s = "constant string"; or function call like void foo(char *s); foo("constant string"); and make them const char pointers. However, that would mean touching 564 files, minimum, which is not a task I wish to perform at this point in time. The problem right now is that I'm running with -werror, so I need some way to stifle these warnings. How can I do that?
string
gcc
warnings
const-char
null
null
open
How to get rid of `deprecated conversion from string constant to ‘char*’` warnings in GCC? === So I'm working on an exceedingly large codebase, and recently upgraded to gcc 4.3, which now triggers this warning: warning: deprecated conversion from string constant to ‘char*’ Obviously, the correct way to fix this is to find every declaration like char *s = "constant string"; or function call like void foo(char *s); foo("constant string"); and make them const char pointers. However, that would mean touching 564 files, minimum, which is not a task I wish to perform at this point in time. The problem right now is that I'm running with -werror, so I need some way to stifle these warnings. How can I do that?
0
59,677
09/12/2008 18:18:36
5,563
09/10/2008 14:06:36
1
0
WSDualHttpBinding for duplex callbacks
Would using WSDualHttpBinding for duplex callbacks work in real-world scenarios? Say, I have a .NET application that uses a random port, would the service be able to resolve the client's base addresses and port for callbacks?
wcf
callback
duplex
null
null
null
open
WSDualHttpBinding for duplex callbacks === Would using WSDualHttpBinding for duplex callbacks work in real-world scenarios? Say, I have a .NET application that uses a random port, would the service be able to resolve the client's base addresses and port for callbacks?
0
59,680
09/12/2008 18:20:36
5,440
09/09/2008 15:34:12
36
5
In a LotusScript Agent how do you get the name of the current server?
In a LotusScript Agent that is being run via WebQueryOpen, how do you get the name of the current server?
domio
lotus
lotusscript
null
null
null
open
In a LotusScript Agent how do you get the name of the current server? === In a LotusScript Agent that is being run via WebQueryOpen, how do you get the name of the current server?
0
59,684
09/12/2008 18:21:26
5,369
09/09/2008 11:14:39
329
25
.NET visual components
I really like [DevX][1] components, but they are pretty expensive, maybe anyone knows free equivalents ? or web site where I can look for some kind of free visual component for .NET [1]: http://www.devexpress.com/
.net
visual-studio
components
null
null
null
open
.NET visual components === I really like [DevX][1] components, but they are pretty expensive, maybe anyone knows free equivalents ? or web site where I can look for some kind of free visual component for .NET [1]: http://www.devexpress.com/
0
59,711
09/12/2008 18:31:39
4,592
09/04/2008 19:01:53
241
9
Haskell list difference operator in F#
Is there an equivalent operator to Haskell's list difference operator `\\` in F#?
functional-programming
f#
haskell
null
null
null
open
Haskell list difference operator in F# === Is there an equivalent operator to Haskell's list difference operator `\\` in F#?
0
59,719
09/12/2008 18:35:25
3,661
08/29/2008 18:16:14
13
1
check for postback in JavaScript
i need to run a js function onLoad(), but only do it if the page loaded the first time (not postback) basically, i need to check for IsPostBack in JavaScript thank you.
asp.net
javascript
null
null
null
null
open
check for postback in JavaScript === i need to run a js function onLoad(), but only do it if the page loaded the first time (not postback) basically, i need to check for IsPostBack in JavaScript thank you.
0
59,726
09/12/2008 18:40:05
5,287
09/08/2008 21:29:47
80
10
Finding network alias in .net
Is there a way in .net 2.0 to discover the network alias for the machine that my code is running on? Specifically, if my workgroup sees my machine as //jekkedev01, how do I retrieve that name programmatically?
networking
.net-2.0
alias
null
null
null
open
Finding network alias in .net === Is there a way in .net 2.0 to discover the network alias for the machine that my code is running on? Specifically, if my workgroup sees my machine as //jekkedev01, how do I retrieve that name programmatically?
0
9,730,678
03/16/2012 01:35:20
981,364
10/05/2011 23:27:44
80
0
C-like arrays in perl
I want to create and manipulate large arrays of (4 byte) integers in-memory. By large, I mean on the order of hundreds of million. Each cell in the array will act as a counter for a position on a chromosome. All I need is for it to fit in memory, and have fast (O(1)) access to elements. The thing I'm counting is not a sparse feature, so I can't use a sparse array. I can't do this with a regular perl list, because perl (at least on my machine) uses 64 bytes per element, so the genomes of most of the organisms I work with are just too big. I've tried storing the data on-disk via SQLite and hash tying, and though they work, are very slow, especially on ordinary drives. (It works reasonably ok when I run on 4-drive raid 0's). I thought I could use PDL arrays, b/c PDL stores its arrays just as C does, using only 4 bytes per element. However, I found that update speed to be excruciatingly slow compared to perl lists: use PDL; use Benchmark qw/cmpthese/; my $N = 1_000_000; my @perl = (0 .. $N - 1); my $pdl = zeroes $N; cmpthese(-1,{ perl => sub{ $perl[int(rand($N))]++; }, pdl => sub{ # note that I'm not even incrementing here just setting to 1 $pdl->set(int(rand($N)), 1); } }); Returns: Rate pdl perl pdl 481208/s -- -87% perl 3640889/s 657% -- Does anyone know how to increase pdl set() performance, or know of a different module that can accomplish this?
arrays
perl
pdl
null
null
null
open
C-like arrays in perl === I want to create and manipulate large arrays of (4 byte) integers in-memory. By large, I mean on the order of hundreds of million. Each cell in the array will act as a counter for a position on a chromosome. All I need is for it to fit in memory, and have fast (O(1)) access to elements. The thing I'm counting is not a sparse feature, so I can't use a sparse array. I can't do this with a regular perl list, because perl (at least on my machine) uses 64 bytes per element, so the genomes of most of the organisms I work with are just too big. I've tried storing the data on-disk via SQLite and hash tying, and though they work, are very slow, especially on ordinary drives. (It works reasonably ok when I run on 4-drive raid 0's). I thought I could use PDL arrays, b/c PDL stores its arrays just as C does, using only 4 bytes per element. However, I found that update speed to be excruciatingly slow compared to perl lists: use PDL; use Benchmark qw/cmpthese/; my $N = 1_000_000; my @perl = (0 .. $N - 1); my $pdl = zeroes $N; cmpthese(-1,{ perl => sub{ $perl[int(rand($N))]++; }, pdl => sub{ # note that I'm not even incrementing here just setting to 1 $pdl->set(int(rand($N)), 1); } }); Returns: Rate pdl perl pdl 481208/s -- -87% perl 3640889/s 657% -- Does anyone know how to increase pdl set() performance, or know of a different module that can accomplish this?
0
9,730,755
03/16/2012 01:46:49
135,870
07/09/2009 19:27:52
3,539
49
Is there a Bazaar equivalent to `git commit --amend`?
I'm playing around with Launchpad projects using Bazaar and getting along fairly well. However, coming from a Git background I'm really missing the ability to roll changes into the last commit---this happens frequently when I discover a small, stupid typo that _really_ doesn't deserve its own commit or entry in a `debian/changelog` file. Does Bazaar provide a command that serves the same purpose as `git commit --amend`?
bazaar
null
null
null
null
null
open
Is there a Bazaar equivalent to `git commit --amend`? === I'm playing around with Launchpad projects using Bazaar and getting along fairly well. However, coming from a Git background I'm really missing the ability to roll changes into the last commit---this happens frequently when I discover a small, stupid typo that _really_ doesn't deserve its own commit or entry in a `debian/changelog` file. Does Bazaar provide a command that serves the same purpose as `git commit --amend`?
0
9,730,752
03/16/2012 01:46:28
238,948
11/15/2008 04:36:47
3,423
62
What's the best way to layer divs on top of one another in z-index?
I want to have some divs stacked on top of one another, but act otherwise like a normal div. I.e. I don't want to have to worry about manually positioning them. Is this possible in HTML5/CSS3? For example: <div id='outerDiv'> <div id='inner1' style='z-index: 1'>This should be the full size of outerDiv</div> <div id='inner2' style='z-index: 2'>This should appear overtop of inner1</div> </div> I hope there's a simple way to do this.
html5
div
css3
z-index
null
null
open
What's the best way to layer divs on top of one another in z-index? === I want to have some divs stacked on top of one another, but act otherwise like a normal div. I.e. I don't want to have to worry about manually positioning them. Is this possible in HTML5/CSS3? For example: <div id='outerDiv'> <div id='inner1' style='z-index: 1'>This should be the full size of outerDiv</div> <div id='inner2' style='z-index: 2'>This should appear overtop of inner1</div> </div> I hope there's a simple way to do this.
0
9,730,763
03/16/2012 01:48:47
1,273,008
03/16/2012 01:42:00
1
0
Write Text to a QTextEdit Box From a C Function
I don't have a specific example to show... but what I am looking to do is from a C based file, write text from a TCP Socket to a QTextEdit box (which is read only). I'm writing a little TCP client that reads incoming data from a TCP Server I wrote in C for Linux. Now I'm trying to write a QT GUI based client so a user can send/receive text from the server. Essentially it's a chat server. I am not sure how to write specifically to a QTextEdit control directly from a c file. My socket code is strictly C based and I can get QT to trigger the function that opens the socket etc. For now, I am trying to figure out how to read anything the server responds with. While there is incoming data, how do I go about passing that buffer back through the QT framework and into the QTextEdit control? I'm using the C function recv().
qt
sockets
tcp
client
qtextedit
null
open
Write Text to a QTextEdit Box From a C Function === I don't have a specific example to show... but what I am looking to do is from a C based file, write text from a TCP Socket to a QTextEdit box (which is read only). I'm writing a little TCP client that reads incoming data from a TCP Server I wrote in C for Linux. Now I'm trying to write a QT GUI based client so a user can send/receive text from the server. Essentially it's a chat server. I am not sure how to write specifically to a QTextEdit control directly from a c file. My socket code is strictly C based and I can get QT to trigger the function that opens the socket etc. For now, I am trying to figure out how to read anything the server responds with. While there is incoming data, how do I go about passing that buffer back through the QT framework and into the QTextEdit control? I'm using the C function recv().
0
9,730,764
03/16/2012 01:48:57
1,128,805
01/03/2012 22:34:43
37
0
Destructor call AFTER Overloaded Assignment Operator called - C++
I have a Graph pointer called *graph1 and memory has already been allocated for it (note: not part of the question but Graph is a template class). I have also created another instance of Graph called graph2. I called an overloaded assignment operator on them like so (note: just to be clear, I'm dereferencing the pointer graph1 by saying *graph1): Graph<std::string,std::string> graph2; graph2 = *graph1; The assignment operator works properly, BUT for some reason Graph's destructor also gets called right after the assignment operator gets called. Is this normal or am I not implementing the assignment operator properly? This is how I implemented assignment operator: template <typename VertexType, typename EdgeType> Graph<VertexType, EdgeType> Graph<VertexType, EdgeType>::operator=(const Graph<VertexType, EdgeType> &source) { std::cout << "\tAssignment Operator called\n\n"; if(this == &source) return *this; this->vecOfVertices = source.vecOfVertices; this->orderPtr = source.orderPtr; this->count = source.count; return *this; }
c++
destructor
assignment-operator
null
null
null
open
Destructor call AFTER Overloaded Assignment Operator called - C++ === I have a Graph pointer called *graph1 and memory has already been allocated for it (note: not part of the question but Graph is a template class). I have also created another instance of Graph called graph2. I called an overloaded assignment operator on them like so (note: just to be clear, I'm dereferencing the pointer graph1 by saying *graph1): Graph<std::string,std::string> graph2; graph2 = *graph1; The assignment operator works properly, BUT for some reason Graph's destructor also gets called right after the assignment operator gets called. Is this normal or am I not implementing the assignment operator properly? This is how I implemented assignment operator: template <typename VertexType, typename EdgeType> Graph<VertexType, EdgeType> Graph<VertexType, EdgeType>::operator=(const Graph<VertexType, EdgeType> &source) { std::cout << "\tAssignment Operator called\n\n"; if(this == &source) return *this; this->vecOfVertices = source.vecOfVertices; this->orderPtr = source.orderPtr; this->count = source.count; return *this; }
0
9,730,765
03/16/2012 01:49:02
870,313
07/30/2011 04:12:05
129
3
Activate proximity Monitoring while occluded to shut down iphone screen
**Needs** I want to turn the screen off when the user places his iphone upside down on q desk. At the same time I do not want to have the proximity monitor enabled all the time as this is very uncomfortable for the user and miss fires a lot of times depending on how you grab the device. **What for** This is to leave at night and save battery and screen life while still running the app. **The workaround** I am thinking of is to use the accelerometer to determin if the face is down, if so activate the proximity censor. Simple stuff... **The problem** In practice the workaround does not work, It seams that if the censor is "occluded" when you activate it, it will not register its current state. Refresh UIDevice some how? **What I'm Using** -(id)init { if ((self = [super init])) { NSLog(@"Init ShakerAnalizer"); accelerometer = [UIAccelerometer sharedAccelerometer]; accelerometer.delegate = self; accelerometer.updateInterval = 5.0f; } return self; } -(void)accelerometer:(UIAccelerometer *)accel didAccelerate:(UIAcceleration *)acceleration { if (accelerometer) { NSLog(@"Accelerometer Z::: %f", acceleration.z); if (acceleration.z > kFlippedThreshold) device.proximityMonitoringEnabled = YES; else device.proximityMonitoringEnabled = NO; } }
iphone
ios
proximity
null
null
null
open
Activate proximity Monitoring while occluded to shut down iphone screen === **Needs** I want to turn the screen off when the user places his iphone upside down on q desk. At the same time I do not want to have the proximity monitor enabled all the time as this is very uncomfortable for the user and miss fires a lot of times depending on how you grab the device. **What for** This is to leave at night and save battery and screen life while still running the app. **The workaround** I am thinking of is to use the accelerometer to determin if the face is down, if so activate the proximity censor. Simple stuff... **The problem** In practice the workaround does not work, It seams that if the censor is "occluded" when you activate it, it will not register its current state. Refresh UIDevice some how? **What I'm Using** -(id)init { if ((self = [super init])) { NSLog(@"Init ShakerAnalizer"); accelerometer = [UIAccelerometer sharedAccelerometer]; accelerometer.delegate = self; accelerometer.updateInterval = 5.0f; } return self; } -(void)accelerometer:(UIAccelerometer *)accel didAccelerate:(UIAcceleration *)acceleration { if (accelerometer) { NSLog(@"Accelerometer Z::: %f", acceleration.z); if (acceleration.z > kFlippedThreshold) device.proximityMonitoringEnabled = YES; else device.proximityMonitoringEnabled = NO; } }
0
9,730,767
03/16/2012 01:49:13
1,009,087
10/23/2011 00:26:47
3
0
Inherit drawable selector
I have a custom button style as follows: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_checked="true" > <shape> <gradient android:startColor="@color/Shadow" android:endColor="@color/Highlight" android:angle="270" /> <stroke android:width="1dp" android:color="#000" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item android:state_pressed="true" > <shape> <gradient android:startColor="@color/Shadow" android:endColor="@color/Highlight" android:angle="270" /> <stroke android:width="1dp" android:color="#000" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item> <shape> <gradient android:startColor="@color/Shadow" android:endColor="@color/Highlight" android:angle="90" /> <stroke android:width="1dp" android:color="#000" /> <corners android:radius="50dp" /> <padding android:top="10dp" android:bottom="10dp" /> </shape> </item> </selector> I now want to create a button that look like this except the left corners aren't rounded. I know how to set corner radius individually but is there a way to inherit all the other properties of my custom button? I tried: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/custom_button"> <shape> <corners android:topRightRadius="0dp" android:bottomRightRadius="0dp"/> </shape> </item> </selector> but my corners tag seems to be completely ignored, the buttons just look like the custom_button. Any thoughts?
android
inheritance
selector
null
null
null
open
Inherit drawable selector === I have a custom button style as follows: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_checked="true" > <shape> <gradient android:startColor="@color/Shadow" android:endColor="@color/Highlight" android:angle="270" /> <stroke android:width="1dp" android:color="#000" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item android:state_pressed="true" > <shape> <gradient android:startColor="@color/Shadow" android:endColor="@color/Highlight" android:angle="270" /> <stroke android:width="1dp" android:color="#000" /> <corners android:radius="3dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item> <shape> <gradient android:startColor="@color/Shadow" android:endColor="@color/Highlight" android:angle="90" /> <stroke android:width="1dp" android:color="#000" /> <corners android:radius="50dp" /> <padding android:top="10dp" android:bottom="10dp" /> </shape> </item> </selector> I now want to create a button that look like this except the left corners aren't rounded. I know how to set corner radius individually but is there a way to inherit all the other properties of my custom button? I tried: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/custom_button"> <shape> <corners android:topRightRadius="0dp" android:bottomRightRadius="0dp"/> </shape> </item> </selector> but my corners tag seems to be completely ignored, the buttons just look like the custom_button. Any thoughts?
0
9,730,768
03/16/2012 01:49:19
891,394
08/12/2011 08:16:54
18
2
Adding folders and files using Xcode 4.3.1 and SVN (Subversion)
I just can't get Xcode and SVN to play ball when it comes to committing new files in new folders. Has anyone worked out the process to do this within the Xcode IDE or do I need to use a third party client? I don't want to become a Terminal expert and before anyone says use GIT, I want to use SVN because our project management(code review/browsing etc) is integrated with SVN. SVN also works extremely well with Microsoft and Android development. **Background:** I like to separate my files into various folders (Data, Model, View etc). Currently I create the new folder in Finder, then add the folder in Xcode and start creating files and cutting code. When it comes to committing, all hell breaks loose. I'll go into Organizer and import the folder. At this point things look good but it goes pear-shaped after that. I've tried many things, sometimes getting an "A" symbol but at the end of the day, the integration just isn't there. Thanks
xcode
svn
version-control
null
null
null
open
Adding folders and files using Xcode 4.3.1 and SVN (Subversion) === I just can't get Xcode and SVN to play ball when it comes to committing new files in new folders. Has anyone worked out the process to do this within the Xcode IDE or do I need to use a third party client? I don't want to become a Terminal expert and before anyone says use GIT, I want to use SVN because our project management(code review/browsing etc) is integrated with SVN. SVN also works extremely well with Microsoft and Android development. **Background:** I like to separate my files into various folders (Data, Model, View etc). Currently I create the new folder in Finder, then add the folder in Xcode and start creating files and cutting code. When it comes to committing, all hell breaks loose. I'll go into Organizer and import the folder. At this point things look good but it goes pear-shaped after that. I've tried many things, sometimes getting an "A" symbol but at the end of the day, the integration just isn't there. Thanks
0
59,734
09/12/2008 18:44:44
644
08/07/2008 12:54:56
1
0
Coding Dojo with IE and SSL
My application is using Dojo 1.1.1 on an SSL-only website. It is currently taking advantage of dijit.ProgressBar and a dijit.form.DateTextBox. Everything works fabulous in Firefox 2&3, but as soon as I try the same scripts in IE7 the results are an annoying Security Information dialog: > This page contains both secure and nonsecure items. > Do you want to display the nonsecure items? I have scrutinized the page for any non-https reference to no avail. It appears to be something specific to dojo.js. There use to be an IFRAME glitch where the SRC was set to nothing, but this appears to be fixed now (on review of the source). Anyone else having this problem? What are the best-practices for getting Dojo to play well with IE on an SSL-only webserver?
javascript
ssl
internet-explorer
dojo
null
null
open
Coding Dojo with IE and SSL === My application is using Dojo 1.1.1 on an SSL-only website. It is currently taking advantage of dijit.ProgressBar and a dijit.form.DateTextBox. Everything works fabulous in Firefox 2&3, but as soon as I try the same scripts in IE7 the results are an annoying Security Information dialog: > This page contains both secure and nonsecure items. > Do you want to display the nonsecure items? I have scrutinized the page for any non-https reference to no avail. It appears to be something specific to dojo.js. There use to be an IFRAME glitch where the SRC was set to nothing, but this appears to be fixed now (on review of the source). Anyone else having this problem? What are the best-practices for getting Dojo to play well with IE on an SSL-only webserver?
0
59,735
09/12/2008 18:44:47
5,845
09/11/2008 14:04:04
11
3
Recover corrupt zip or gzip files?
The most common method for corrupting compressed files is to inadvertently do an ASCII-mode FTP transfer, which causes a many-to-one trashing of CR and/or LF characters. Obviously, there is information loss, and the best way to fix this problem is to transfer again, in FTP binary mode. However, if the original is lost, and it's important, how recoverable is the data? [Actually, I already know what I think is the best answer (it's very difficult but sometimes possible - I'll post more later), and the common non-answers (lots of off-the-shelf programs for repairing CRCs without repairing data), but I thought it would be interesting to try out this question during the stackoverflow beta period, and see if anyone else has gone down the successful-recovery path or discovered tools I don't know about.]
zip
recovery
gzip
corrupt
null
null
open
Recover corrupt zip or gzip files? === The most common method for corrupting compressed files is to inadvertently do an ASCII-mode FTP transfer, which causes a many-to-one trashing of CR and/or LF characters. Obviously, there is information loss, and the best way to fix this problem is to transfer again, in FTP binary mode. However, if the original is lost, and it's important, how recoverable is the data? [Actually, I already know what I think is the best answer (it's very difficult but sometimes possible - I'll post more later), and the common non-answers (lots of off-the-shelf programs for repairing CRCs without repairing data), but I thought it would be interesting to try out this question during the stackoverflow beta period, and see if anyone else has gone down the successful-recovery path or discovered tools I don't know about.]
0
59,736
09/12/2008 18:45:57
5,287
09/08/2008 21:29:47
80
10
So, if CAPTCHA's on the way out, what comes next?
With text-recognition improving and CAPTCHA-breakers using Mechanical Turks to break otherwise unbreakable keys, what's the next technology to keep scripts from spam-botting a site that relies on user input?
technologies
captcha
null
null
null
null
open
So, if CAPTCHA's on the way out, what comes next? === With text-recognition improving and CAPTCHA-breakers using Mechanical Turks to break otherwise unbreakable keys, what's the next technology to keep scripts from spam-botting a site that relies on user input?
0
59,743
09/12/2008 18:50:34
1,815
08/18/2008 17:31:15
96
5
Number of possible combinations
How many possible combinations of the variables a,b,c,d,e are possible if I know that: a+b+c+d+e = 500 and that they are all >= 0
combinations
null
null
null
null
null
open
Number of possible combinations === How many possible combinations of the variables a,b,c,d,e are possible if I know that: a+b+c+d+e = 500 and that they are all >= 0
0
59,761
09/12/2008 19:00:32
78
08/01/2008 16:03:23
18
1
Disable Specific Keys in IE 6
I need to disable specific keys (Ctrl and Backspace) in Internet Explorer 6. Is there a registry hack to do this. It has to be IE6. Thanks.
internet
explorer
6
null
null
null
open
Disable Specific Keys in IE 6 === I need to disable specific keys (Ctrl and Backspace) in Internet Explorer 6. Is there a registry hack to do this. It has to be IE6. Thanks.
0
59,766
09/12/2008 19:03:27
1,284
08/14/2008 11:34:29
60
16
How do you get JQuery Intellisense Working in VS 2008?
I thought JQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jquery 1.2.6, but intellisense will not work in a separate jscript file. I have the jquery library referenced first on my web page in the <head> tag. Am I doing anything wrong?
asp.net
visual-studio
jquery
null
null
null
open
How do you get JQuery Intellisense Working in VS 2008? === I thought JQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jquery 1.2.6, but intellisense will not work in a separate jscript file. I have the jquery library referenced first on my web page in the <head> tag. Am I doing anything wrong?
0
59,768
09/12/2008 19:05:27
6,161
09/12/2008 17:53:07
13
1
Debugging with FF3 in VS2008
I am using Firefox 3 to debug my ASP.NET applications in Visual Studio 2008. How can I configure either FF3 or VS2008 so that when I 'x' out of Firefox I don't have to hit the stop debugging button in Visual Studio? (The behavior you get with IE)
ide
vs2008
firefox
null
null
null
open
Debugging with FF3 in VS2008 === I am using Firefox 3 to debug my ASP.NET applications in Visual Studio 2008. How can I configure either FF3 or VS2008 so that when I 'x' out of Firefox I don't have to hit the stop debugging button in Visual Studio? (The behavior you get with IE)
0
59,786
09/12/2008 19:16:53
177
08/03/2008 02:15:39
92
3
How do I get a custom application name and starting window name in Visual C# 2008 using WPF?
I'm using Microsft Visual C# 2008 and am creating WPF applications. If you create a new solution and pick the WPF application template it lets you provide a single string to name the solution. It then automatically turns that string into a base project name and a namespace using underscores instead of spaces. It also generates a class that inherits from the application class named App and a starting window with a Grid control in it named Window1. I want to customize pretty much everything. What's the simplest method of renaming App, Window1, and the starting namespace which won't corrupt the Solution?
c#
visual-studio-2008
null
null
null
null
open
How do I get a custom application name and starting window name in Visual C# 2008 using WPF? === I'm using Microsft Visual C# 2008 and am creating WPF applications. If you create a new solution and pick the WPF application template it lets you provide a single string to name the solution. It then automatically turns that string into a base project name and a namespace using underscores instead of spaces. It also generates a class that inherits from the application class named App and a starting window with a Grid control in it named Window1. I want to customize pretty much everything. What's the simplest method of renaming App, Window1, and the starting namespace which won't corrupt the Solution?
0
59,787
09/12/2008 19:16:58
4,061
09/01/2008 15:48:37
81
2
How do you generate and analyze a thread dump from a running JBoss instance?
How do you generate and analyze a thread dump from a running JBoss instance?
java
multithreading
dump
null
null
null
open
How do you generate and analyze a thread dump from a running JBoss instance? === How do you generate and analyze a thread dump from a running JBoss instance?
0
59,791
09/12/2008 19:19:43
230
08/03/2008 19:32:46
637
38
Free Online SVN repositories
Can people recommend an good free online svn repository? I found this https://opensvn.csie.org/ but the message in red is abit scary.
svn
null
null
null
null
03/01/2012 18:28:58
not constructive
Free Online SVN repositories === Can people recommend an good free online svn repository? I found this https://opensvn.csie.org/ but the message in red is abit scary.
4
59,793
09/12/2008 19:20:12
4,337
09/02/2008 22:43:39
1,228
112
Good tips for a Technical presentation
I am planning to give a Technical presentation for a product we are building. Intended audience is Technical developers. So, most of the time, I will be debugging trough the code in Visual Studio, performance analysis, some architecture review etc. I have read couple of [blogs][1] on font sizes to use, templates to use on Visual Studio [among other][2] very [useful tips][3]. What I am looking specifically for is how to keep the session interesting without making it a dry code walkthrough? How to avoid making people fall asleep? Would be great to hear some stories.. I know ultimately it is upto me but I am certainly willing to give it a try.. [1]: http://www.hanselman.com/blog/content/radiostories/2003/01/22/scottHanselmansTipsForASuccessfulMsftPresentation.html [2]: http://focs.wordpress.com/2007/09/12/9-tips-how-to-give-a-technical-presentation/ [3]: http://blogs.msdn.com/kaevans/archive/2005/03/12/394527.aspx
presentations
visual-studio
null
null
null
null
open
Good tips for a Technical presentation === I am planning to give a Technical presentation for a product we are building. Intended audience is Technical developers. So, most of the time, I will be debugging trough the code in Visual Studio, performance analysis, some architecture review etc. I have read couple of [blogs][1] on font sizes to use, templates to use on Visual Studio [among other][2] very [useful tips][3]. What I am looking specifically for is how to keep the session interesting without making it a dry code walkthrough? How to avoid making people fall asleep? Would be great to hear some stories.. I know ultimately it is upto me but I am certainly willing to give it a try.. [1]: http://www.hanselman.com/blog/content/radiostories/2003/01/22/scottHanselmansTipsForASuccessfulMsftPresentation.html [2]: http://focs.wordpress.com/2007/09/12/9-tips-how-to-give-a-technical-presentation/ [3]: http://blogs.msdn.com/kaevans/archive/2005/03/12/394527.aspx
0
59,809
09/12/2008 19:36:43
2,831
08/25/2008 12:57:22
55
2
MS Access ADP Autonumber
I am getting the following error in an MS Access ADP when trying to add a record on a form linked to a MS SQL Server 2000 table: > Run-time error '31004': > > The value of an (AutoNumber) field > cannot be retrived prior to being > saved. > > Please save the record that contains > the (AutoNumber) field prior to > performing this action. note: *retrieved* is actually spelled wrong in the error. Does anyone know what this means? I've done a web search and was only able to find the answer at a certain site that only experts have access to.
access
msaccess
sqlserver2000
null
null
null
open
MS Access ADP Autonumber === I am getting the following error in an MS Access ADP when trying to add a record on a form linked to a MS SQL Server 2000 table: > Run-time error '31004': > > The value of an (AutoNumber) field > cannot be retrived prior to being > saved. > > Please save the record that contains > the (AutoNumber) field prior to > performing this action. note: *retrieved* is actually spelled wrong in the error. Does anyone know what this means? I've done a web search and was only able to find the answer at a certain site that only experts have access to.
0
59,816
09/12/2008 19:42:26
1,314
08/14/2008 13:44:02
281
14
MapPoint 2009 Load Performance
I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#. I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is created. The tests on my development machine have shown the average load time to be between 3 and 5 seconds, during which the application is totally locked. While this isn't totally unacceptable, it's an awfully long time to lose control of the application. Also, because the GUI thread is locked, I cannot show a loading dialog or something to mask the load time. The line that hangs is this: (where axMappointControl1 is the MapPoint control) axMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapNorthAmerica); I've tried executing the NewMap method on another thread but the GUI thread still ends up being blocked. My questions are: - What can I do to speed up MapPoint when it loads? - Is there any way to load MapPoint so that it won't block the GUI thread? Any help is greatly appreciated.
c#
winforms
com
mappoint
peformance
null
open
MapPoint 2009 Load Performance === I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#. I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is created. The tests on my development machine have shown the average load time to be between 3 and 5 seconds, during which the application is totally locked. While this isn't totally unacceptable, it's an awfully long time to lose control of the application. Also, because the GUI thread is locked, I cannot show a loading dialog or something to mask the load time. The line that hangs is this: (where axMappointControl1 is the MapPoint control) axMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapNorthAmerica); I've tried executing the NewMap method on another thread but the GUI thread still ends up being blocked. My questions are: - What can I do to speed up MapPoint when it loads? - Is there any way to load MapPoint so that it won't block the GUI thread? Any help is greatly appreciated.
0
59,819
09/12/2008 19:43:52
4,916
09/06/2008 15:33:03
16
2
How do I create a custom type in PowerShell for my scripts to use?
I would like to be able to define and use a custom type in some of my PowerShell scripts. For example, let's pretend I had a need for an object that had the following structure: Contact { string First string Last string Phone } How would I go about creating this so that I could use it in function like the following: function PrintContact { param( [Contact]$contact ) "Customer Name is " + $contact.First + " " + $contact.Last "Customer Phone is " + $contact.Phone } Is something like this possible, or even recommended in PowerShell?
scripting
powershell
null
null
null
null
open
How do I create a custom type in PowerShell for my scripts to use? === I would like to be able to define and use a custom type in some of my PowerShell scripts. For example, let's pretend I had a need for an object that had the following structure: Contact { string First string Last string Phone } How would I go about creating this so that I could use it in function like the following: function PrintContact { param( [Contact]$contact ) "Customer Name is " + $contact.First + " " + $contact.Last "Customer Phone is " + $contact.Phone } Is something like this possible, or even recommended in PowerShell?
0
59,825
09/12/2008 19:58:33
2,260
08/21/2008 11:39:22
934
73
How to retrieve an element from a set without removing it?
Suppose the following: >>>s = set([1, 2, 3]) How do I get a value (any value) out of s without doing s.pop()? I want to leave the item in the set until I am sure I can remove it - something I can only be sure of after an asynchronous call to another host. Quick and dirty: >>>elem = s.pop() >>>s.add(elem) But do you know of a better way?
python
set
null
null
null
null
open
How to retrieve an element from a set without removing it? === Suppose the following: >>>s = set([1, 2, 3]) How do I get a value (any value) out of s without doing s.pop()? I want to leave the item in the set until I am sure I can remove it - something I can only be sure of after an asynchronous call to another host. Quick and dirty: >>>elem = s.pop() >>>s.add(elem) But do you know of a better way?
0
59,832
09/12/2008 20:03:43
2,328
08/21/2008 16:45:54
687
31
getting java exception: java.net.MalformedURLException: no protocol
I am currently calling the following line of code: java.net.URL connection_url = new java.net.URL("http://<ip address>:<port>/path"); and when it executes I get the above exception. Any ideas as to why this is happening?
java
url
null
null
null
null
open
getting java exception: java.net.MalformedURLException: no protocol === I am currently calling the following line of code: java.net.URL connection_url = new java.net.URL("http://<ip address>:<port>/path"); and when it executes I get the above exception. Any ideas as to why this is happening?
0
59,834
09/12/2008 20:04:31
1,338
08/14/2008 15:10:01
301
18
Free/Cheap ASP.NET Component Libraries
earlier today someone asked about free/cheap component libraries for winforms. I'm interested in the same thing, but for asp.net. There are some great commercial libraries like Telerik and DevExpress, but are there any great free/cheap alternatives?
asp.net
components
null
null
null
null
open
Free/Cheap ASP.NET Component Libraries === earlier today someone asked about free/cheap component libraries for winforms. I'm interested in the same thing, but for asp.net. There are some great commercial libraries like Telerik and DevExpress, but are there any great free/cheap alternatives?
0
59,838
09/12/2008 20:06:25
4,120
09/01/2008 20:58:46
11
1
How to check if a directory exists in a bash shell script
What code can be used to check if a directory does or does not exist, within a bash shell script?
linux
bash
shell
null
null
null
open
How to check if a directory exists in a bash shell script === What code can be used to check if a directory does or does not exist, within a bash shell script?
0
59,840
09/12/2008 20:07:19
1,215
08/13/2008 13:32:36
90
15
bug in linq Contains statement - is there a fix or workaround?
I found a bug in the Contains statement in Linq (not sure if it is really in Linq or Linq to SQL) and want to know if anyone else has seen this and if there is a fix or workaround. If the querysource you do the contains with has more than 10 items in it, it does not pass the items correctly to the SQL query. It is hard to explain what it does, an example will show it best. If you look at the raw query, the parameters look like this: @P0 = 'aaa' @P1 = 'bbb' @P2 = 'ccc' ... [@P3 through @P9] @P10 = '111' @P11 = '222' ... [@p12 through @P19] @P20 = 'sss' ... [@P21 through @P99] @P100 = 'qqq' when the values are passed into the final query (all parameters resolved) it has resolved the parameters as if these were the values passed: @P0 = 'aaa' @P1 = 'bbb' @P2 = 'ccc' ... @P10 = 'bbb'0 @P11 = 'bbb'1 ... @P20 = 'ccc'0 ... @P100 = 'bbb'00 So it looks like the parameter resolving looks at the first digit only after the @P and resolves that, then adds on anything left at the end of the parameter name. At least that is what the Sql Server Query Visualizer plugin to Visual Studio shows the query doing. Really strange. So if any one has advice please share. Thanks!
linq
null
null
null
null
null
open
bug in linq Contains statement - is there a fix or workaround? === I found a bug in the Contains statement in Linq (not sure if it is really in Linq or Linq to SQL) and want to know if anyone else has seen this and if there is a fix or workaround. If the querysource you do the contains with has more than 10 items in it, it does not pass the items correctly to the SQL query. It is hard to explain what it does, an example will show it best. If you look at the raw query, the parameters look like this: @P0 = 'aaa' @P1 = 'bbb' @P2 = 'ccc' ... [@P3 through @P9] @P10 = '111' @P11 = '222' ... [@p12 through @P19] @P20 = 'sss' ... [@P21 through @P99] @P100 = 'qqq' when the values are passed into the final query (all parameters resolved) it has resolved the parameters as if these were the values passed: @P0 = 'aaa' @P1 = 'bbb' @P2 = 'ccc' ... @P10 = 'bbb'0 @P11 = 'bbb'1 ... @P20 = 'ccc'0 ... @P100 = 'bbb'00 So it looks like the parameter resolving looks at the first digit only after the @P and resolves that, then adds on anything left at the end of the parameter name. At least that is what the Sql Server Query Visualizer plugin to Visual Studio shows the query doing. Really strange. So if any one has advice please share. Thanks!
0
59,850
09/12/2008 20:12:52
6,180
09/12/2008 19:35:26
1
0
How do I create a spring bean for a Java double primitive?
I'd like to create a spring bean that holds the value of a double. Something like: <bean id="doubleValue" value="3.7"/>
java
spring
null
null
null
null
open
How do I create a spring bean for a Java double primitive? === I'd like to create a spring bean that holds the value of a double. Something like: <bean id="doubleValue" value="3.7"/>
0
59,857
09/12/2008 20:18:13
1,100
08/12/2008 11:58:29
113
5
Should I use a dedicated network chanel between the database and the application server?
Should I use a dedicated network chanel between the database and the application server? ...or... Connecting both in the switch along with all other computer nodes makes no diference at all?
networking
latency
database
null
null
null
open
Should I use a dedicated network chanel between the database and the application server? === Should I use a dedicated network chanel between the database and the application server? ...or... Connecting both in the switch along with all other computer nodes makes no diference at all?
0
59,859
09/12/2008 20:19:19
5,619
09/10/2008 14:56:48
1
2
When Testing your MVC-based UI, how much of the test setup do you make common?
I'm trying to test a simple WebForms (asp.net) based UI, and follow the MVP pattern to allow my UI to be more testable. As I follow the TDD methodology for backend algorithms, I find that there are some unit test refactorings that happen in the spirit of the DRY principle (Don't Repeat Yourself). As I try to apply this to the UI using Rhino Mocks to verify my interactions, I see many commonalities in the Controller tests when setting up the view or model expectations. My question is: how far do you typically take this refactoring, if at all? I'm curious to see how other TDDer's test their MVC/MVP based UIs.
unit-testing
gui
mvc
tdd
mvp
null
open
When Testing your MVC-based UI, how much of the test setup do you make common? === I'm trying to test a simple WebForms (asp.net) based UI, and follow the MVP pattern to allow my UI to be more testable. As I follow the TDD methodology for backend algorithms, I find that there are some unit test refactorings that happen in the spirit of the DRY principle (Don't Repeat Yourself). As I try to apply this to the UI using Rhino Mocks to verify my interactions, I see many commonalities in the Controller tests when setting up the view or model expectations. My question is: how far do you typically take this refactoring, if at all? I'm curious to see how other TDDer's test their MVC/MVP based UIs.
0
59,880
09/12/2008 20:32:25
5,619
09/10/2008 14:56:48
1
2
Are Stored Procedures more efficient, in general, than inline statements on modern RDBMS's?
Conventional wisdom states that stored procedures are always faster. So, since they're always faster, use them **ALL THE TIME**. I am pretty sure this is grounded in some historical context where this was once the case. Now, I'm not advocating that Stored Procs are not needed, but I want to know in what cases stored procs are necessary in modern databases such as MySql, SqlServer, Oracle, or <Insert your DB here>. Is it overkill to have ALL access through stored procs?
sql
stored-procedures
db
null
null
null
open
Are Stored Procedures more efficient, in general, than inline statements on modern RDBMS's? === Conventional wisdom states that stored procedures are always faster. So, since they're always faster, use them **ALL THE TIME**. I am pretty sure this is grounded in some historical context where this was once the case. Now, I'm not advocating that Stored Procs are not needed, but I want to know in what cases stored procs are necessary in modern databases such as MySql, SqlServer, Oracle, or <Insert your DB here>. Is it overkill to have ALL access through stored procs?
0
59,893
09/12/2008 20:38:36
454,247
09/11/2008 14:39:45
93
1
Best method to obfuscate or secure .Net assemblies
I'm looking for a technique or tool which we can use to obfuscate or somehow secure our compiled c# code. The goal is not for user/data security but to hinder reverse engineering of some of the technology in our software. This is not for use on the web, but for a desktop application. So, do you know of any tools available to do this type of thing? (They need not be free) What kind of performance implications do they have if any? Does this have any negative side effects when using a debugger during development? We log stack traces of problems in the field. How would obfuscation affect this?
c#
.net
.net-2.0
null
null
null
open
Best method to obfuscate or secure .Net assemblies === I'm looking for a technique or tool which we can use to obfuscate or somehow secure our compiled c# code. The goal is not for user/data security but to hinder reverse engineering of some of the technology in our software. This is not for use on the web, but for a desktop application. So, do you know of any tools available to do this type of thing? (They need not be free) What kind of performance implications do they have if any? Does this have any negative side effects when using a debugger during development? We log stack traces of problems in the field. How would obfuscation affect this?
0
59,895
09/12/2008 20:39:56
2,908
08/25/2008 21:46:25
215
21
Can a Bash script tell what directory it's in?
How do I get the path of the directory in which a bash script is located FROM that bash script. For instance, lets say I want to use a bash script as a launcher for another application. I want to change working directory to the one where the bash script is located so I can operate on the files in that directory like so: <code>$ ./application</code>
bash
null
null
null
null
null
open
Can a Bash script tell what directory it's in? === How do I get the path of the directory in which a bash script is located FROM that bash script. For instance, lets say I want to use a bash script as a launcher for another application. I want to change working directory to the one where the bash script is located so I can operate on the files in that directory like so: <code>$ ./application</code>
0
59,896
09/12/2008 20:40:00
6,093
09/12/2008 11:07:34
71
2
How do I stop an effect in jQuery
I have a page that uses $(id).show("highlight", {}, 2000); to highlight an element when I start a ajax request, that might fail so that I want to use something like $(id).show("highlight", {color: "#FF0000"}, 2000); in the error handler. The problem is that if the first highlight haven't finished, the second is placed in a queue and wont run until the first is ready. Hence the question: Can I somehow stop the first effect?
javascript
jquery
null
null
null
null
open
How do I stop an effect in jQuery === I have a page that uses $(id).show("highlight", {}, 2000); to highlight an element when I start a ajax request, that might fail so that I want to use something like $(id).show("highlight", {color: "#FF0000"}, 2000); in the error handler. The problem is that if the first highlight haven't finished, the second is placed in a queue and wont run until the first is ready. Hence the question: Can I somehow stop the first effect?
0
59,914
09/12/2008 20:49:01
26
08/01/2008 12:18:14
1,074
104
How do I create a gravatar web server control in asp.net?
Option Strict On Imports System Imports System.ComponentModel Imports System.Security Imports System.Security.Permissions Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.Security.FormsAuthentication Namespace modesty.Framework.Web < _ AspNetHostingPermission(SecurityAction.Demand, _ Level:=AspNetHostingPermissionLevel.Minimal), _ AspNetHostingPermission(SecurityAction.InheritanceDemand, _ Level:=AspNetHostingPermissionLevel.Minimal), _ DefaultProperty("Email"), _ ParseChildren(False), _ ToolboxData("<{0}:Gravatar runat=""server""> </{0}:Gravatar>") _ > _ Public Class Gravatar Inherits WebControl < _ Bindable(True), _ Category("Appearance"), _ DefaultValue(""), _ Description("The e-mail address of the gravatar we are fetching.") _ > _ Public Overridable Property EmailAddress() As String Get Dim s As String = CStr(ViewState("EmailAddress")) If s Is Nothing Then s = String.Empty Return s End Get Set(ByVal value As String) ViewState("EmailAddress") = value End Set End Property < _ Bindable(True), _ Category("Appearance"), _ DefaultValue(-1), _ Description("The size of the gravatar.") _ > _ Public Overridable Property Size() As Integer Get Dim i As Integer If ViewState("Size") IsNot Nothing AndAlso Int32.TryParse(ViewState("Size").ToString, i) Then Return i Else Return -1 End If End Get Set(ByVal value As Integer) ViewState("Size") = value End Set End Property Protected Overrides Sub RenderContents(ByVal writer As HtmlTextWriter) Dim imgsrc As String = "http://www.gravatar.com/avatar/" & _ HashPasswordForStoringInConfigFile(EmailAddress.Trim(), "MD5").Trim.ToLower & _ "?d=identicon" If Size > 0 And Size < 513 Then imgsrc &= "&s=" + Size.ToString End If writer.Write("<img src=""") writer.WriteEncodedText(imgsrc) writer.Write(""" />") End Sub End Class End Namespace
gravatar
asp.net
null
null
null
null
open
How do I create a gravatar web server control in asp.net? === Option Strict On Imports System Imports System.ComponentModel Imports System.Security Imports System.Security.Permissions Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.Security.FormsAuthentication Namespace modesty.Framework.Web < _ AspNetHostingPermission(SecurityAction.Demand, _ Level:=AspNetHostingPermissionLevel.Minimal), _ AspNetHostingPermission(SecurityAction.InheritanceDemand, _ Level:=AspNetHostingPermissionLevel.Minimal), _ DefaultProperty("Email"), _ ParseChildren(False), _ ToolboxData("<{0}:Gravatar runat=""server""> </{0}:Gravatar>") _ > _ Public Class Gravatar Inherits WebControl < _ Bindable(True), _ Category("Appearance"), _ DefaultValue(""), _ Description("The e-mail address of the gravatar we are fetching.") _ > _ Public Overridable Property EmailAddress() As String Get Dim s As String = CStr(ViewState("EmailAddress")) If s Is Nothing Then s = String.Empty Return s End Get Set(ByVal value As String) ViewState("EmailAddress") = value End Set End Property < _ Bindable(True), _ Category("Appearance"), _ DefaultValue(-1), _ Description("The size of the gravatar.") _ > _ Public Overridable Property Size() As Integer Get Dim i As Integer If ViewState("Size") IsNot Nothing AndAlso Int32.TryParse(ViewState("Size").ToString, i) Then Return i Else Return -1 End If End Get Set(ByVal value As Integer) ViewState("Size") = value End Set End Property Protected Overrides Sub RenderContents(ByVal writer As HtmlTextWriter) Dim imgsrc As String = "http://www.gravatar.com/avatar/" & _ HashPasswordForStoringInConfigFile(EmailAddress.Trim(), "MD5").Trim.ToLower & _ "?d=identicon" If Size > 0 And Size < 513 Then imgsrc &= "&s=" + Size.ToString End If writer.Write("<img src=""") writer.WriteEncodedText(imgsrc) writer.Write(""" />") End Sub End Class End Namespace
0
59,926
09/12/2008 20:51:38
4,764
09/05/2008 14:05:10
123
6
MSSQL Server 2005 Encryption, asp.net and stored procedures
I need to write a web application using MSSQL Server 2005, asp.net, and ado.net. Much of the user data stored in this application must be encrypted (read HIPAA). In the past for projects that required encryption, I encrypted/decrypted in the application code. However, this was generally for encrypting passwords or credit card information, so only a handful of columns in a couple tables. For this application, far more columns in several tables need to be encrypted, so I suspect pushing the encryption responsibilities into the data layer will be better performing, especially given MSSQL 2005's native support for several encryption types. (I could be convinced otherwise if anyone has real, empirical evidence.) I've consulted BOL, and I'm fairly adept at using google. So I don't want links to online articles or MSDN documentation (its likely I've already read it). One approach I've wrapped my head around so far is to use a symmetric key which is opened using a certificate. So the one time setup steps are (performed by a DBA in theory): 1. Create a Master Key 2. Backup the Master Key to a file, burn to CD and store off site. 3. Open the Master Key and create a certificate. 4. Backup the certificate to a file, burn to CD and store off site. 5. Create the Symmetric key with encryption algorithm of choice using the certificate. Then anytime a stored procedure (or a human user via Management Studio) needs to access encrypted data you have to first open the symmetric key, execute any tsql statements or batches, and then close the symmetric key. Then as far as the asp.net application is concerned, and in my case the application code's data access layer, the data encryption is entirely transparent. So my questions are: 1. Do I want to open, execute tsql statements/batches, and then close the symmetric key all within the sproc? The danger I see is, what if something goes wrong with the tsql execution, and code sproc execution never reaches the statement that closes the key. I assume this means the key will remain open until sql kills the SPID that sproc executed on. 2. Should I instead consider making three database calls for any given procedure I need to execute (only when encryption is necessary)? One database call to open the key, a second call to execute the sproc, and a third call to close the key. (Each call wrapped in its own try catch loop in order to maximize the odds that an open key ultimately is closed.) 3. Any considerations should I need to use client side transactions (meaning my code is the client, and initiates a transaction, executes several sprocs, and then commits the transaction assuming success)?
asp.net
encryption
sql2005
null
null
null
open
MSSQL Server 2005 Encryption, asp.net and stored procedures === I need to write a web application using MSSQL Server 2005, asp.net, and ado.net. Much of the user data stored in this application must be encrypted (read HIPAA). In the past for projects that required encryption, I encrypted/decrypted in the application code. However, this was generally for encrypting passwords or credit card information, so only a handful of columns in a couple tables. For this application, far more columns in several tables need to be encrypted, so I suspect pushing the encryption responsibilities into the data layer will be better performing, especially given MSSQL 2005's native support for several encryption types. (I could be convinced otherwise if anyone has real, empirical evidence.) I've consulted BOL, and I'm fairly adept at using google. So I don't want links to online articles or MSDN documentation (its likely I've already read it). One approach I've wrapped my head around so far is to use a symmetric key which is opened using a certificate. So the one time setup steps are (performed by a DBA in theory): 1. Create a Master Key 2. Backup the Master Key to a file, burn to CD and store off site. 3. Open the Master Key and create a certificate. 4. Backup the certificate to a file, burn to CD and store off site. 5. Create the Symmetric key with encryption algorithm of choice using the certificate. Then anytime a stored procedure (or a human user via Management Studio) needs to access encrypted data you have to first open the symmetric key, execute any tsql statements or batches, and then close the symmetric key. Then as far as the asp.net application is concerned, and in my case the application code's data access layer, the data encryption is entirely transparent. So my questions are: 1. Do I want to open, execute tsql statements/batches, and then close the symmetric key all within the sproc? The danger I see is, what if something goes wrong with the tsql execution, and code sproc execution never reaches the statement that closes the key. I assume this means the key will remain open until sql kills the SPID that sproc executed on. 2. Should I instead consider making three database calls for any given procedure I need to execute (only when encryption is necessary)? One database call to open the key, a second call to execute the sproc, and a third call to close the key. (Each call wrapped in its own try catch loop in order to maximize the odds that an open key ultimately is closed.) 3. Any considerations should I need to use client side transactions (meaning my code is the client, and initiates a transaction, executes several sprocs, and then commits the transaction assuming success)?
0
59,934
09/12/2008 20:55:32
1,463
08/15/2008 17:26:44
484
32
National holiday web service
Is there a public/government web service that I can call to find out what the national holidays are for a given year? (For the US and/or any country in the world.) Edit: Does anybody have a set of formulas to calculate US holidays? (C# would be my language of choice if there is a choice.)
webservice
null
null
null
null
null
open
National holiday web service === Is there a public/government web service that I can call to find out what the national holidays are for a given year? (For the US and/or any country in the world.) Edit: Does anybody have a set of formulas to calculate US holidays? (C# would be my language of choice if there is a choice.)
0
59,936
09/12/2008 20:56:53
6,193
09/12/2008 20:56:53
1
0
Slowing down the playback of an audio file without changing it's pitch?
I am working on an application for college music majors. A feature i am considering is slowing down music playback without changing its pitch. I have seen this done in commercial software, but cannot find any libraries or open source apps that do anything like this. 1. Are there libraries out there? 2. How could this be done from scratch from various file formats? Note: I am working in java but am not oppossed to changing languages.
java
audio
media
null
null
null
open
Slowing down the playback of an audio file without changing it's pitch? === I am working on an application for college music majors. A feature i am considering is slowing down music playback without changing its pitch. I have seen this done in commercial software, but cannot find any libraries or open source apps that do anything like this. 1. Are there libraries out there? 2. How could this be done from scratch from various file formats? Note: I am working in java but am not oppossed to changing languages.
0
59,942
09/12/2008 20:59:42
299
08/04/2008 13:31:09
350
29
What is the purpose of a Data Access Layer?
I started a project a long time ago and created a **Data Access Layer** project in my solution but have never developed anything in it. What is the purpose of a data access layer? Are there any good sources that I could learn more about the Data Access Layer?
dal
data-access-layer
null
null
null
null
open
What is the purpose of a Data Access Layer? === I started a project a long time ago and created a **Data Access Layer** project in my solution but have never developed anything in it. What is the purpose of a data access layer? Are there any good sources that I could learn more about the Data Access Layer?
0
59,945
09/12/2008 21:01:37
5,592
09/10/2008 14:28:56
319
8
Accessing .NET Web Service securely from Flex 3
We can successfully consume a .NET 2.0 web service from a Flex/AS3 application. Aside from SSL, how else can we make the security more robust (i.e., authentication)?
web-services
flex
actionscript-3
actionscript
as3
null
open
Accessing .NET Web Service securely from Flex 3 === We can successfully consume a .NET 2.0 web service from a Flex/AS3 application. Aside from SSL, how else can we make the security more robust (i.e., authentication)?
0
59,951
09/12/2008 21:03:39
3,043
08/26/2008 13:24:14
2,250
212
ASP Server variable not working on local IIS
I'm working on a simple ASP.Net page (handler, actually) where I check the value of the LOGON_USER server variable. This works using Visual Studio's built-in web server and it works in other sites deployed to the live intranet site. But it doesn't work on the IIS instance on my local XP machine. How can I fix it, or what's going on if I can't?
asp.net
iis
server-variables
null
null
null
open
ASP Server variable not working on local IIS === I'm working on a simple ASP.Net page (handler, actually) where I check the value of the LOGON_USER server variable. This works using Visual Studio's built-in web server and it works in other sites deployed to the live intranet site. But it doesn't work on the IIS instance on my local XP machine. How can I fix it, or what's going on if I can't?
0
59,954
09/12/2008 21:04:39
2,744
08/24/2008 20:43:50
26
1
What is the best book for learning WPF?
What is the best book for building WPF Business Applications?
.net
wpf
null
null
null
11/01/2011 16:01:40
not constructive
What is the best book for learning WPF? === What is the best book for building WPF Business Applications?
4
59,958
09/12/2008 21:05:46
4,572
09/04/2008 18:12:04
252
8
WPF - Programmatic Binding on a BitmapEffect
I would like to be able to **programmatically** bind some data to the dependency properties on a **BitmapEffect**. With a FrameworkElement like TextBlock there is a SetBinding method where you can programmatically do these bindings like: myTextBlock.SetBinding(TextBlock.TextProperty, new Binding("SomeProperty")); And I know you can do it in straight XAML (as seen below) <TextBlock Width="Auto" Text="Some Content" x:Name="MyTextBlock" TextWrapping="Wrap" > <TextBlock.BitmapEffect> <BitmapEffectGroup> <OuterGlowBitmapEffect x:Name="MyGlow" GlowColor="White" GlowSize="{Binding Path=MyValue}" /> </BitmapEffectGroup> </TextBlock.BitmapEffect> </TextBlock> But I can't figure out how to accomplish this with C# because BitmapEffect doesn't have a SetBinding method. I've tried: myTextBlock.SetBinding(OuterGlowBitmapEffect.GlowSize, new Binding("SomeProperty") { Source = someObject }); But it doesn't work. Thanks in advance.
wpf
data-binding
bitmapeffect
null
null
null
open
WPF - Programmatic Binding on a BitmapEffect === I would like to be able to **programmatically** bind some data to the dependency properties on a **BitmapEffect**. With a FrameworkElement like TextBlock there is a SetBinding method where you can programmatically do these bindings like: myTextBlock.SetBinding(TextBlock.TextProperty, new Binding("SomeProperty")); And I know you can do it in straight XAML (as seen below) <TextBlock Width="Auto" Text="Some Content" x:Name="MyTextBlock" TextWrapping="Wrap" > <TextBlock.BitmapEffect> <BitmapEffectGroup> <OuterGlowBitmapEffect x:Name="MyGlow" GlowColor="White" GlowSize="{Binding Path=MyValue}" /> </BitmapEffectGroup> </TextBlock.BitmapEffect> </TextBlock> But I can't figure out how to accomplish this with C# because BitmapEffect doesn't have a SetBinding method. I've tried: myTextBlock.SetBinding(OuterGlowBitmapEffect.GlowSize, new Binding("SomeProperty") { Source = someObject }); But it doesn't work. Thanks in advance.
0
59,968
09/12/2008 21:08:38
123
08/02/2008 08:01:26
1,760
103
Best Editor for Ruby?
I've heard so much about [Textmate-the missing editor][1] and that it is the best one for Ruby. What is your choicce? And what is the best ruby editor on Windows? [E][2]? [1]: http://macromates.com/ [2]: http://www.e-texteditor.com/
ruby
editor
windows
e
null
07/28/2011 17:14:43
not constructive
Best Editor for Ruby? === I've heard so much about [Textmate-the missing editor][1] and that it is the best one for Ruby. What is your choicce? And what is the best ruby editor on Windows? [E][2]? [1]: http://macromates.com/ [2]: http://www.e-texteditor.com/
4
59,972
09/12/2008 21:10:42
2,536
08/22/2008 17:37:07
926
41
Old-school SQL DB access versus ORM (NHibernate, EF, et al). Who wins?
I've been successful with writing my own SQL access code with a combination of stored procedures and parameterized queries and a little wrapper library I've written to minimize the ADO.NET grunge. This has all worked very well for me in the past and I've been pretty productive with it. I'm heading into a new project--should I put my old school stuff behind me and dig into an ORM-based solution? (I know there are vast high-concepts differences between NHibernate and EF--I don't want to get into that here. For the sake of argument, let's even lump LINQ with the old-school alternatives.) I'm looking for advice on the real-world application of ORM type stuff against what I know (and know pretty well). Old-school ADO.NET code or ORM? I'm sure there is a curve--does the curve have an ROI that makes things worthwhile? I'm anxious and willing to learn, but do have a deadline. Thank you rp
orm
ado.net
null
null
null
null
open
Old-school SQL DB access versus ORM (NHibernate, EF, et al). Who wins? === I've been successful with writing my own SQL access code with a combination of stored procedures and parameterized queries and a little wrapper library I've written to minimize the ADO.NET grunge. This has all worked very well for me in the past and I've been pretty productive with it. I'm heading into a new project--should I put my old school stuff behind me and dig into an ORM-based solution? (I know there are vast high-concepts differences between NHibernate and EF--I don't want to get into that here. For the sake of argument, let's even lump LINQ with the old-school alternatives.) I'm looking for advice on the real-world application of ORM type stuff against what I know (and know pretty well). Old-school ADO.NET code or ORM? I'm sure there is a curve--does the curve have an ROI that makes things worthwhile? I'm anxious and willing to learn, but do have a deadline. Thank you rp
0
59,974
09/12/2008 21:11:14
3,756
08/30/2008 15:05:40
3
1
Implementing large system changes
If you're familiar with the phrase "build one to throw away", well, we seem to have done that; we’re reaching the limits of version 1 of our online app. It's time to clean things up by: * Re-organizing code and UI * Unifying UI processes * Adding more functionality * Building for the future * Modifying our database structure to handle all of the above What's the best way to make this transition happen? We want to avoid throwing all of our users over to a new system (once it's finished) ... they'd freak out and we couldn't handle the call load. Should we start a new "installation" of our system and move users over to it gradually after we ensure this new design sufficiently solves enough of the problems with version 1? Should we (somehow) change each module of our system incrementally, and phase? This may be difficult because the database layout will change, resulting in having to tweak the code of all modules that touch the changed areas. Is it common to have a set of trusted, patient, "beta tester" clients using a cutting edge version of an app? (The goal here would be to get feedback and test for bugs on a new system) Any other advice? First-hand experience?
testing
deployment
architecture
database-design
software-engineering
null
open
Implementing large system changes === If you're familiar with the phrase "build one to throw away", well, we seem to have done that; we’re reaching the limits of version 1 of our online app. It's time to clean things up by: * Re-organizing code and UI * Unifying UI processes * Adding more functionality * Building for the future * Modifying our database structure to handle all of the above What's the best way to make this transition happen? We want to avoid throwing all of our users over to a new system (once it's finished) ... they'd freak out and we couldn't handle the call load. Should we start a new "installation" of our system and move users over to it gradually after we ensure this new design sufficiently solves enough of the problems with version 1? Should we (somehow) change each module of our system incrementally, and phase? This may be difficult because the database layout will change, resulting in having to tweak the code of all modules that touch the changed areas. Is it common to have a set of trusted, patient, "beta tester" clients using a cutting edge version of an app? (The goal here would be to get feedback and test for bugs on a new system) Any other advice? First-hand experience?
0
59,986
09/12/2008 21:16:26
1,647
08/17/2008 18:32:33
83
11
XMLSerialization in C#
I have a simple type that explicitly implemets an Interface. <pre> public interface IMessageHeader { string FromAddress { get; set; } string ToAddress { get; set; } } [Serializable] public class MessageHeader:IMessageHeader { private string from; private string to; [XmlAttribute("From")] string IMessageHeade.FromAddress { get { return this.from;} set { this.from = value;} } [XmlAttribute("To")] string IMessageHeade.ToAddress { get { return this.to;} set { this.to = value;} } } </pre> Is there a way to Serialize and Deserialize objects of type IMessageHeader?? I got the following error when tried "Cannot serialize interface IMessageHeader" Thanks.
c#
null
null
null
null
null
open
XMLSerialization in C# === I have a simple type that explicitly implemets an Interface. <pre> public interface IMessageHeader { string FromAddress { get; set; } string ToAddress { get; set; } } [Serializable] public class MessageHeader:IMessageHeader { private string from; private string to; [XmlAttribute("From")] string IMessageHeade.FromAddress { get { return this.from;} set { this.from = value;} } [XmlAttribute("To")] string IMessageHeade.ToAddress { get { return this.to;} set { this.to = value;} } } </pre> Is there a way to Serialize and Deserialize objects of type IMessageHeader?? I got the following error when tried "Cannot serialize interface IMessageHeader" Thanks.
0
60,000
09/12/2008 21:24:53
1,077
08/12/2008 10:34:56
132
10
C++ inheritance and member function pointers
In C++, can member function pointers be used to point to derived (or even base) class members?
c++
inheritance
oop
member-function-pointers
null
null
open
C++ inheritance and member function pointers === In C++, can member function pointers be used to point to derived (or even base) class members?
0
60,009
09/12/2008 21:29:42
3,043
08/26/2008 13:24:14
2,254
213
How to build large/busy RSS feed
I've been playing with RSS feeds this week, and for my next trick I want to build one for our internal application log. We have a centralized database table that our myriad batch and intranet apps use for posting log messages. I want to create an RSS feed off of this table, but I'm not sure how to handle the volume- there could be hundreds of entries per day even on a normal day. An exceptional make-you-want-to-quit kind of day might see a few thousand. Any thoughts?
rss
null
null
null
null
null
open
How to build large/busy RSS feed === I've been playing with RSS feeds this week, and for my next trick I want to build one for our internal application log. We have a centralized database table that our myriad batch and intranet apps use for posting log messages. I want to create an RSS feed off of this table, but I'm not sure how to handle the volume- there could be hundreds of entries per day even on a normal day. An exceptional make-you-want-to-quit kind of day might see a few thousand. Any thoughts?
0
60,019
09/12/2008 21:38:03
3,764
08/30/2008 16:14:55
57
3
How to create multiple records at once with ActiveScaffold in ROR
I am wanting to use ActiveScaffold to create *assignment* records for several *students* in a single step. The records will all contain identical data, with the exception of the student_id. I was able to override the default form and replace the dropdown box for selecting the student name with a multi-select box - which is what I want. That change however, was only cosmetic, as the underlying code only grabs the first selected name from that box, and creates a single record. Can somebody suggest a good way to accomplish this in a way that doesn't require my deciphering and rewriting too much of the underlying ActiveScaffold code?
ruby
ruby-on-rails
activerecord
activescaffold
null
null
open
How to create multiple records at once with ActiveScaffold in ROR === I am wanting to use ActiveScaffold to create *assignment* records for several *students* in a single step. The records will all contain identical data, with the exception of the student_id. I was able to override the default form and replace the dropdown box for selecting the student name with a multi-select box - which is what I want. That change however, was only cosmetic, as the underlying code only grabs the first selected name from that box, and creates a single record. Can somebody suggest a good way to accomplish this in a way that doesn't require my deciphering and rewriting too much of the underlying ActiveScaffold code?
0
60,032
09/12/2008 21:47:17
2,025
08/19/2008 20:59:50
1,654
135
Getting the array key in a foreach loop
Bear in mind I'm very new to C#. I'm trying to get the key of the current element in a foreach loop. I know how to do this in PHP but I'm clueless with C#. For example: foreach($array as $key => $value) { echo("$value is assigned to key: $key"); } What I'm trying to do in C#: int[] values = { 5, 14, 29, 49, 99, 150, 999 }; foreach(int val in values) { if(search <= val && !stop) { // set key to a variable } } Can anyone help me out? Thanks
c#
array
null
null
null
null
open
Getting the array key in a foreach loop === Bear in mind I'm very new to C#. I'm trying to get the key of the current element in a foreach loop. I know how to do this in PHP but I'm clueless with C#. For example: foreach($array as $key => $value) { echo("$value is assigned to key: $key"); } What I'm trying to do in C#: int[] values = { 5, 14, 29, 49, 99, 150, 999 }; foreach(int val in values) { if(search <= val && !stop) { // set key to a variable } } Can anyone help me out? Thanks
0
60,033
09/12/2008 21:48:04
3,764
08/30/2008 16:14:55
57
3
What is the easiest way to duplicate an activerecord record?
I want to make a copy of an activerecord record, changing a single field in the process (in addition to the **id**). What is the simplest way to accomplish this? I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there must be an easier way to do this... such as: @newrecord=Record.copy(:id) *perhaps?*
activerecord
ruby
ruby-on-rails
duplicate
null
null
open
What is the easiest way to duplicate an activerecord record? === I want to make a copy of an activerecord record, changing a single field in the process (in addition to the **id**). What is the simplest way to accomplish this? I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there must be an easier way to do this... such as: @newrecord=Record.copy(:id) *perhaps?*
0
60,034
09/12/2008 21:48:26
4,872
09/06/2008 09:14:55
255
7
How can you find and replace text in a file using MS DOS commands?
I am writing a batch file script using DOS and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?
command-line
scripting
batch
text-files
ms-dos
null
open
How can you find and replace text in a file using MS DOS commands? === I am writing a batch file script using DOS and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?
0
60,039
09/12/2008 21:49:59
4,589
09/04/2008 18:50:07
46
4
Using NetCDF in C#
I am currently working on (or at least planning) a couple of projects that work with large amounts of repetitive data. The kind of data that works well in a spreadsheet or database, but is nasty in XML. :) NetCDF seems like a great option for a file format. However, my work is in C# and there is no "official" NetCDF implementation available. There is an "official" Python version that I could potentially use with IronPython. Another option is the "NetCDF Library for .Net" on CodePlex but it seems pretty quiet (http://www.codeplex.com/netcdf). Has anyone worked with either of these libraries? Can you provide any recommendations?
.net
data
file
null
null
null
open
Using NetCDF in C# === I am currently working on (or at least planning) a couple of projects that work with large amounts of repetitive data. The kind of data that works well in a spreadsheet or database, but is nasty in XML. :) NetCDF seems like a great option for a file format. However, my work is in C# and there is no "official" NetCDF implementation available. There is an "official" Python version that I could potentially use with IronPython. Another option is the "NetCDF Library for .Net" on CodePlex but it seems pretty quiet (http://www.codeplex.com/netcdf). Has anyone worked with either of these libraries? Can you provide any recommendations?
0
60,046
09/12/2008 21:52:50
4,760
09/05/2008 13:39:35
36
4
Google Maps in Flex Component
I'm embedding the Google Maps Flash API in Flex and it runs fine locally with the watermark on it, etc. When I upload it to the server (flex.mydomain.com) I get a sandbox security error listed below: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main.swf?Fri, 12 Sep 2008 21:46:03 UTC cannot access http://maps.googleapis.com/maps/lib/map_1_6.swf. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at com.google.maps::ClientBootstrap/createFactory() at com.google.maps::ClientBootstrap/executeNextFrameCalls() Does anyone have any experience with embedding the Google Maps Flash API into Flex components and specifically settings security settings to make this work? I did get a new API key that is registered to my domain and am using that when it's published. I've tried doing the following in the main application as well as the component: Security.allowDomain('*') Security.allowDomain('maps.googleapis.com') Security.allowDomain('mydomain.com')
flex
actionscript-3
google-maps
null
null
null
open
Google Maps in Flex Component === I'm embedding the Google Maps Flash API in Flex and it runs fine locally with the watermark on it, etc. When I upload it to the server (flex.mydomain.com) I get a sandbox security error listed below: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main.swf?Fri, 12 Sep 2008 21:46:03 UTC cannot access http://maps.googleapis.com/maps/lib/map_1_6.swf. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at com.google.maps::ClientBootstrap/createFactory() at com.google.maps::ClientBootstrap/executeNextFrameCalls() Does anyone have any experience with embedding the Google Maps Flash API into Flex components and specifically settings security settings to make this work? I did get a new API key that is registered to my domain and am using that when it's published. I've tried doing the following in the main application as well as the component: Security.allowDomain('*') Security.allowDomain('maps.googleapis.com') Security.allowDomain('mydomain.com')
0
60,049
09/12/2008 21:54:42
3,875
08/31/2008 15:05:00
13
2
Java sound recording and mixer settings question
I'm using the javax.sound.sampled package in a radio data mode decoding program. To use the program the user feeds audio from their radio receiver into their PC's line input. The user is also required to use their mixer program to select the line in as the recording input. The trouble is some users don't know how to do this and also sometimes other programs alter the recording input setting. So my question is how can my program detect if the line in is set as the recording input ? Also is it possible for my program to change the recording input setting if it detects it is incorrect ? Thanks for your time. Ian
java
null
null
null
null
null
open
Java sound recording and mixer settings question === I'm using the javax.sound.sampled package in a radio data mode decoding program. To use the program the user feeds audio from their radio receiver into their PC's line input. The user is also required to use their mixer program to select the line in as the recording input. The trouble is some users don't know how to do this and also sometimes other programs alter the recording input setting. So my question is how can my program detect if the line in is set as the recording input ? Also is it possible for my program to change the recording input setting if it detects it is incorrect ? Thanks for your time. Ian
0
60,051
09/12/2008 21:55:24
1,945
08/19/2008 14:49:22
28
6
Referencing back to the parent from a child object
My question is pertaining to the best practice for accessing a child object's parent. So let's say a class instantiates another class, that class instance is now referenced with an object. From that child object, what is the best way to reference back to the parent object? Currently I know of a couple ways that I use often, but I'm not sure if A) there is a better way to do it or B) which of them is the better practice The first method is to use getDefinitionByName, which would not instantiate that class, but allow access to anything inside of it that was publicly declared. _class:Class = getDefinitionByName("com.site.Class") as Class; And then reference that variable based on its parent to child hierarchy. Example, if the child is attempting to reference a class that's two levels up from itself: _class(parent.parent).function(); This seems to work fine, but you are required to know the level at which the child is at compared to the level of the parent you are attempting to access. I can also get the following statement to trace out [object ClassName] into Flash's output. trace(Class); I'm not 100% on the implementation of that line, I haven't persued it as a way to reference an object outside of the current object I'm in. Another method I've seen used is to simply pass a reference to this into the class object you are creating and just catch it with a constructor argument var class:Class = new Class(this); and then in the Class file public function Class(objectRef:Object) { _parentRef = objectRef; } That reference also requires you to step back up using the child to parent hierarchy though. I could also import that class, and then use the direct filepath to reference a method inside of that class, regardless of its the parent or not. import com.site.Class; com.site.Class.method(); Of course there the parent to child relationship is irrelevant because I'm accessing the method or property directly through the imported class. I just feel like I'm missing something really obvious here. I'm basically looking for confirmation if these are the correct ways to reference the parent, and if so which is the most ideal, or am I over-looking something else? Thanks in advance for taking the time to help a newbie out!
flash
actionscript-3
null
null
null
null
open
Referencing back to the parent from a child object === My question is pertaining to the best practice for accessing a child object's parent. So let's say a class instantiates another class, that class instance is now referenced with an object. From that child object, what is the best way to reference back to the parent object? Currently I know of a couple ways that I use often, but I'm not sure if A) there is a better way to do it or B) which of them is the better practice The first method is to use getDefinitionByName, which would not instantiate that class, but allow access to anything inside of it that was publicly declared. _class:Class = getDefinitionByName("com.site.Class") as Class; And then reference that variable based on its parent to child hierarchy. Example, if the child is attempting to reference a class that's two levels up from itself: _class(parent.parent).function(); This seems to work fine, but you are required to know the level at which the child is at compared to the level of the parent you are attempting to access. I can also get the following statement to trace out [object ClassName] into Flash's output. trace(Class); I'm not 100% on the implementation of that line, I haven't persued it as a way to reference an object outside of the current object I'm in. Another method I've seen used is to simply pass a reference to this into the class object you are creating and just catch it with a constructor argument var class:Class = new Class(this); and then in the Class file public function Class(objectRef:Object) { _parentRef = objectRef; } That reference also requires you to step back up using the child to parent hierarchy though. I could also import that class, and then use the direct filepath to reference a method inside of that class, regardless of its the parent or not. import com.site.Class; com.site.Class.method(); Of course there the parent to child relationship is irrelevant because I'm accessing the method or property directly through the imported class. I just feel like I'm missing something really obvious here. I'm basically looking for confirmation if these are the correct ways to reference the parent, and if so which is the most ideal, or am I over-looking something else? Thanks in advance for taking the time to help a newbie out!
0
60,070
09/12/2008 22:08:42
73
08/01/2008 15:12:05
1
0
Is there a child's PID?
I am currently in an operating systems class and my teacher spent half of the class period talking about PIDs. She mentioned, as many know, that processes know their parent's ID. My question is this: Does a process's PCB know its child's ID? If so, what is the way to go about it obtaining it?
operating-system
null
null
null
null
null
open
Is there a child's PID? === I am currently in an operating systems class and my teacher spent half of the class period talking about PIDs. She mentioned, as many know, that processes know their parent's ID. My question is this: Does a process's PCB know its child's ID? If so, what is the way to go about it obtaining it?
0
60,076
09/12/2008 22:12:43
1,385,358
08/25/2008 03:05:06
1,260
58
SQL Error OLE.INTEROP
I'm getting an error whenever I load Management Studio or open a folder in the server explorer, etc. Additionally, If I try to create a new database it constantly is updating and does not finish. I have attached a screenshot of the error. Please let me know what I can do to fix this because it's really aggravating. ![Error Screen][1] [1]: http://frickinsweet.com/databaseError.gif
sql-server
annoying
null
null
null
null
open
SQL Error OLE.INTEROP === I'm getting an error whenever I load Management Studio or open a folder in the server explorer, etc. Additionally, If I try to create a new database it constantly is updating and does not finish. I have attached a screenshot of the error. Please let me know what I can do to fix this because it's really aggravating. ![Error Screen][1] [1]: http://frickinsweet.com/databaseError.gif
0
60,093
09/12/2008 22:37:48
1,463
08/15/2008 17:26:44
490
32
Why would breakpoints in VS2008 stop working?
I have a c# asp.net web app. Breakpoints in the database layer are no longer stopping execution but the breakpoints in the UI layer are still working okay. Can anyone hazard a guess why this might be happening? I've checked all the usual suspects (Debug build is on for all projects) and recompiled all projects in solution...
vs2008
null
null
null
null
null
open
Why would breakpoints in VS2008 stop working? === I have a c# asp.net web app. Breakpoints in the database layer are no longer stopping execution but the breakpoints in the UI layer are still working okay. Can anyone hazard a guess why this might be happening? I've checked all the usual suspects (Debug build is on for all projects) and recompiled all projects in solution...
0
60,098
09/12/2008 22:38:38
4,525
09/04/2008 15:36:18
670
29
"Could not load type" in web service converted to VB.NET
I wrote a simple web service in C# using SharpDevelop (which I just got and I love). The client wanted it in VB, and fortunately there's a Convert To VB.NET feature. It's great. Translated all the code, and it builds. (I've been a "Notepad" guy for a long time, so I may seem a little old-fashioned.) But I get this error when I try to load the service now. <pre> Parser Error Message: Could not load type 'flightinfo.Soap' from assembly 'flightinfo'. Source Error: Line 1: &lt;%@ WebService Class="flightinfo.Soap,flightinfo" %&gt; </pre> I have deleted the bins and rebuilt, and I have searched google (and stackoverflow). I have scoured the project files for any remnants of C#. Any ideas?
c#
vb.net
web-services
translation
sharpdevelop
null
open
"Could not load type" in web service converted to VB.NET === I wrote a simple web service in C# using SharpDevelop (which I just got and I love). The client wanted it in VB, and fortunately there's a Convert To VB.NET feature. It's great. Translated all the code, and it builds. (I've been a "Notepad" guy for a long time, so I may seem a little old-fashioned.) But I get this error when I try to load the service now. <pre> Parser Error Message: Could not load type 'flightinfo.Soap' from assembly 'flightinfo'. Source Error: Line 1: &lt;%@ WebService Class="flightinfo.Soap,flightinfo" %&gt; </pre> I have deleted the bins and rebuilt, and I have searched google (and stackoverflow). I have scoured the project files for any remnants of C#. Any ideas?
0
60,099
09/12/2008 22:38:56
327
08/04/2008 17:08:49
753
48
How do I get a particular labeled version of a folder in Borland StarTeam?
I'm about to perform a bunch of [folder moving operations][1] in StarTeam (including some new nesting levels) and I would like to set a label so that I can roll back in case of issues. I figured out how to set a label on a folder and all its children, but I couldn't figure out how to get the version of that folder corresponding to that particular label. It seems like labels are tied to the files themselves and not the folders/folder structure. [1]: http://beta.stackoverflow.com/questions/28578/how-can-i-merge-my-files-when-the-folder-structure-has-changed-using-borland-st
version-control
borland
starteam
null
null
null
open
How do I get a particular labeled version of a folder in Borland StarTeam? === I'm about to perform a bunch of [folder moving operations][1] in StarTeam (including some new nesting levels) and I would like to set a label so that I can roll back in case of issues. I figured out how to set a label on a folder and all its children, but I couldn't figure out how to get the version of that folder corresponding to that particular label. It seems like labels are tied to the files themselves and not the folders/folder structure. [1]: http://beta.stackoverflow.com/questions/28578/how-can-i-merge-my-files-when-the-folder-structure-has-changed-using-borland-st
0
60,100
09/12/2008 22:39:33
1,122
08/12/2008 14:00:43
737
68
In C# (or any langauge) what is/are your favourite way of removing repetition?
I've just coded a 700 line class. Awful. I hang my head in shame. It's as opposite to [DRY][1] as a British summer. It's full of cut and paste with minor tweaks here and there. This makes it's a prime candidate for refactoring. Before I embark on this, I'd thought I'd ask when you have lots of repetition, what are the first refactoring oppotunities you look for? For the record, mine are probably using: 1. Generic classes and methods 2. Method overloading/chaining. What are yours? [1]: http://en.wikipedia.org/wiki/Don't_repeat_yourself
c#
refactoring
coding-style
tips-and-tricks
null
null
open
In C# (or any langauge) what is/are your favourite way of removing repetition? === I've just coded a 700 line class. Awful. I hang my head in shame. It's as opposite to [DRY][1] as a British summer. It's full of cut and paste with minor tweaks here and there. This makes it's a prime candidate for refactoring. Before I embark on this, I'd thought I'd ask when you have lots of repetition, what are the first refactoring oppotunities you look for? For the record, mine are probably using: 1. Generic classes and methods 2. Method overloading/chaining. What are yours? [1]: http://en.wikipedia.org/wiki/Don't_repeat_yourself
0
60,109
09/12/2008 22:45:09
4,120
09/01/2008 20:58:46
101
3
Good challenges/tasks/exercises for learning or improving object oriented programming (OOP) skills.
What is a good challenge to improve your skills in object oriented programming? The idea behind this poll is to provide an idea of which exercises are useful for learning OOP. The challenge should be as language agnostic as possible, requiring either little or no use of specific libraries, or only the most common of libraries. Try to include only one challenge per answer, so that a vote will correspond to the merits of that challenge alone. Would also be nice if a level of skill required was indicated, and also the rationale behind why it is a useful exercise. Solutions to the challenges could then be posted as answers to a "How to..." question and linked to from here. For example: * Challenge - implement a last-in-first-out stack * Skill level - beginner * Rationale - gives experience of how to reference objects
oop
self-improvement
null
null
null
03/02/2012 20:24:02
not constructive
Good challenges/tasks/exercises for learning or improving object oriented programming (OOP) skills. === What is a good challenge to improve your skills in object oriented programming? The idea behind this poll is to provide an idea of which exercises are useful for learning OOP. The challenge should be as language agnostic as possible, requiring either little or no use of specific libraries, or only the most common of libraries. Try to include only one challenge per answer, so that a vote will correspond to the merits of that challenge alone. Would also be nice if a level of skill required was indicated, and also the rationale behind why it is a useful exercise. Solutions to the challenges could then be posted as answers to a "How to..." question and linked to from here. For example: * Challenge - implement a last-in-first-out stack * Skill level - beginner * Rationale - gives experience of how to reference objects
4
60,113
09/12/2008 22:48:33
247
08/04/2008 00:50:51
143
12
HTTPS with Visual Studio's built-in ASP.NET Develpment Server
Is there a way to access Visual Studio's built-in ASP.NET Development Server over HTTPS?
asp.net
visual-studio
visual-studio-2008
null
null
null
open
HTTPS with Visual Studio's built-in ASP.NET Develpment Server === Is there a way to access Visual Studio's built-in ASP.NET Development Server over HTTPS?
0
60,121
09/12/2008 22:58:20
5,642
09/10/2008 15:42:57
265
14
Silverlight Install Base - How big is it?
Silverlight v2.0 is getting closer and closer to RTM but I have yet to hear any stats as to how many browsers are running Silverlight. If I ask Adobe (by googling "Flash install base") they're [only too happy to tell me][1] that 97.7% of browsers are running Flash player 9 or better. Not that I believe everything I read, but **where are these statistics from Microsoft or some other vendor about Silverlight?** I'm going to be making a technology choice soon and a little bit of empirical evidence would be an asset at this point... All you Silverlight developers out there, show me your stats! [1]: http://www.adobe.com/products/player_census/flashplayer/version_penetration.html
flex
silverlight
installation
null
null
null
open
Silverlight Install Base - How big is it? === Silverlight v2.0 is getting closer and closer to RTM but I have yet to hear any stats as to how many browsers are running Silverlight. If I ask Adobe (by googling "Flash install base") they're [only too happy to tell me][1] that 97.7% of browsers are running Flash player 9 or better. Not that I believe everything I read, but **where are these statistics from Microsoft or some other vendor about Silverlight?** I'm going to be making a technology choice soon and a little bit of empirical evidence would be an asset at this point... All you Silverlight developers out there, show me your stats! [1]: http://www.adobe.com/products/player_census/flashplayer/version_penetration.html
0
60,122
09/12/2008 22:58:20
1,889
08/19/2008 04:55:30
11
4
Select rows in dataset table based on other dataset table
I have a dataset that has two tables in it. I want to do the following (or something like it) is it possible and is how I have it correct? dsTabData.Tables("FilingTabs").Select("fs_ID not in (select fsp_fsid from ParentTabs)") how do you reference data from other table in the same dataset?
dataset
select
.net
vb.net
null
null
open
Select rows in dataset table based on other dataset table === I have a dataset that has two tables in it. I want to do the following (or something like it) is it possible and is how I have it correct? dsTabData.Tables("FilingTabs").Select("fs_ID not in (select fsp_fsid from ParentTabs)") how do you reference data from other table in the same dataset?
0
60,137
09/12/2008 23:13:52
726
08/08/2008 12:04:53
543
27
Technical issues when switching to an unmanaged Virtual Private Server (VPS) hosting provider?
I'm considering moving a number of small client sites to an unmanaged VPS hosting provider. I haven't decided which one yet, but my understanding is that they'll give me a base OS install (I'd prefer Debian or Ubuntu), an IP address, a root account, SSH, and that's about it. Ideally, I would like to create a complete VM image of my configured setup and just ship those bits to the provider. Has anyone had any experience with this? I've seen [Jeff talk about something like this in Coding Horror][1]. But I'm not sure if his experience is typical. I suppose it also depends on the type of VM server used by the host. Also, do such hosts provide reverse-DNS? That's kinda useful for sites that send out e-mails. I know GMail tends to bounce anything originating from a server without it. Finally, I'd probably need multiple IP addresses as at least a couple of the sites have SSL protection which doesn't work with name-based virtual hosts. Has anyone run into trouble with multiple IPs through VPS? I wouldn't think so, but I've heard whisperings to the contrary. [1]: http://www.codinghorror.com/blog/archives/000984.html
ssl
virtualization
hosting
reverse-dns
null
null
open
Technical issues when switching to an unmanaged Virtual Private Server (VPS) hosting provider? === I'm considering moving a number of small client sites to an unmanaged VPS hosting provider. I haven't decided which one yet, but my understanding is that they'll give me a base OS install (I'd prefer Debian or Ubuntu), an IP address, a root account, SSH, and that's about it. Ideally, I would like to create a complete VM image of my configured setup and just ship those bits to the provider. Has anyone had any experience with this? I've seen [Jeff talk about something like this in Coding Horror][1]. But I'm not sure if his experience is typical. I suppose it also depends on the type of VM server used by the host. Also, do such hosts provide reverse-DNS? That's kinda useful for sites that send out e-mails. I know GMail tends to bounce anything originating from a server without it. Finally, I'd probably need multiple IP addresses as at least a couple of the sites have SSL protection which doesn't work with name-based virtual hosts. Has anyone run into trouble with multiple IPs through VPS? I wouldn't think so, but I've heard whisperings to the contrary. [1]: http://www.codinghorror.com/blog/archives/000984.html
0
60,142
09/12/2008 23:17:43
3,442
08/28/2008 15:32:45
98
5
Best way to determine the number of servers needed
How much traffic can one web server handle? What's the best way to see if we're beyond that? I have an ASP.Net application that has a couple hundred users. Aspects of it are fairly processor intensive, but thus far we have done fine with only one server to run both SqlServer and the site. It's running Windows Server 2003, 3.4 GHz with 3.5 GB of RAM. But lately I've started to notice slows at various times, and I was wondering what's the best way to determine if the server is overloaded by the usage of the application or if I need to do something to fix the application (I don't really want to spend a lot of time hunting down little optimizations if I'm just expecting too much from the box).
asp.net
webserver
null
null
null
null
open
Best way to determine the number of servers needed === How much traffic can one web server handle? What's the best way to see if we're beyond that? I have an ASP.Net application that has a couple hundred users. Aspects of it are fairly processor intensive, but thus far we have done fine with only one server to run both SqlServer and the site. It's running Windows Server 2003, 3.4 GHz with 3.5 GB of RAM. But lately I've started to notice slows at various times, and I was wondering what's the best way to determine if the server is overloaded by the usage of the application or if I need to do something to fix the application (I don't really want to spend a lot of time hunting down little optimizations if I'm just expecting too much from the box).
0
60,143
09/12/2008 23:21:04
5,619
09/10/2008 14:56:48
28
2
Is it possible to embed and use a portable executable in a .net DLL?
The easiest way to think of my question is to think of a single, simple unix command (albeit, this is for windows) and I need progmatic access to run it. I have a single command-line based executable that performs some unit of work. I want to call that executable with the .net process library, as I can do with any other executable. However, it dawned on me that there is potential for the dll to become useless or break with unintended updates to the executable or a non-existant executable. Is it possible to run the executable from the Process object in the .net framework, as I would an external executable file?
.net
command-line
dll
resources
null
null
open
Is it possible to embed and use a portable executable in a .net DLL? === The easiest way to think of my question is to think of a single, simple unix command (albeit, this is for windows) and I need progmatic access to run it. I have a single command-line based executable that performs some unit of work. I want to call that executable with the .net process library, as I can do with any other executable. However, it dawned on me that there is potential for the dll to become useless or break with unintended updates to the executable or a non-existant executable. Is it possible to run the executable from the Process object in the .net framework, as I would an external executable file?
0
60,151
09/12/2008 23:27:39
6,208
09/12/2008 22:53:30
1
0
Whats the best way to do throbber in C#?
Specifically what I am looking to do is make the icons for the Nodes in my System.Windows.Forms.TreeView control to throb while a long loading operation is taking place.
c#
treeview
null
null
null
null
open
Whats the best way to do throbber in C#? === Specifically what I am looking to do is make the icons for the Nodes in my System.Windows.Forms.TreeView control to throb while a long loading operation is taking place.
0
60,152
09/12/2008 23:28:16
2,555
08/22/2008 20:27:46
186
7
Automate firefox with python?
Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions?
python
linux
firefox
automation
ubuntu
null
open
Automate firefox with python? === Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions?
0
60,160
09/12/2008 23:36:36
2,338
08/21/2008 17:23:25
106
3
How to escape text for regular expression in Java
Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input.
java
regex
escaping
null
null
null
open
How to escape text for regular expression in Java === Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input.
0
60,168
09/12/2008 23:46:52
6,198
09/12/2008 21:40:41
11
1
In what order are ON DELETE CASCADE constraints processed?
Here is an example of what I've got going on: CREATE TABLE Parent (id BIGINT NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB; CREATE TABLE Child (id BIGINT NOT NULL, parentid BIGINT NOT NULL, PRIMARY KEY (id), KEY (parentid), CONSTRAINT fk_parent FOREIGN KEY (parentid) REFERENCES Parent (id) ON DELETE CASCADE) ENGINE=InnoDB; CREATE TABLE Uncle (id BIGINT NOT NULL, parentid BIGINT NOT NULL, childid BIGINT NOT NULL, PRIMARY KEY (id), KEY (parentid), KEY (childid), CONSTRAINT fk_parent_u FOREIGN KEY (parentid) REFERENCES Parent (id) ON DELETE CASCADE, CONSTRAINT fk_child FOREIGN KEY (childid) REFERENCES Child (id)) ENGINE=InnoDB; Notice there is no ON DELETE CASCADE for the Uncle-Child relationship; i.e. deleting a Child does not delete its Uncle(s) and vice-versa. When I have a Parent and an Uncle with the same Child, and I delete the Parent, it *seems* like InnoDB should be able to just "figure it out" and let the cascade ripple through the whole family (i.e. deleting the Parent deletes the Uncle and the Child as well). However, instead, I get the following: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`cascade_test/uncle`, CONSTRAINT `fk_child` FOREIGN KEY (`childid`) REFERENCES `child` (`id`)) InnoDB is trying to cascade-delete the Child before the Uncle(s) that refer to it. Am I missing something? Is this *supposed* to fail for some reason I don't understand? Or is there some trick to making it work (or is it a bug in MySQL)?
mysql
database-design
innodb
null
null
null
open
In what order are ON DELETE CASCADE constraints processed? === Here is an example of what I've got going on: CREATE TABLE Parent (id BIGINT NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB; CREATE TABLE Child (id BIGINT NOT NULL, parentid BIGINT NOT NULL, PRIMARY KEY (id), KEY (parentid), CONSTRAINT fk_parent FOREIGN KEY (parentid) REFERENCES Parent (id) ON DELETE CASCADE) ENGINE=InnoDB; CREATE TABLE Uncle (id BIGINT NOT NULL, parentid BIGINT NOT NULL, childid BIGINT NOT NULL, PRIMARY KEY (id), KEY (parentid), KEY (childid), CONSTRAINT fk_parent_u FOREIGN KEY (parentid) REFERENCES Parent (id) ON DELETE CASCADE, CONSTRAINT fk_child FOREIGN KEY (childid) REFERENCES Child (id)) ENGINE=InnoDB; Notice there is no ON DELETE CASCADE for the Uncle-Child relationship; i.e. deleting a Child does not delete its Uncle(s) and vice-versa. When I have a Parent and an Uncle with the same Child, and I delete the Parent, it *seems* like InnoDB should be able to just "figure it out" and let the cascade ripple through the whole family (i.e. deleting the Parent deletes the Uncle and the Child as well). However, instead, I get the following: ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`cascade_test/uncle`, CONSTRAINT `fk_child` FOREIGN KEY (`childid`) REFERENCES `child` (`id`)) InnoDB is trying to cascade-delete the Child before the Uncle(s) that refer to it. Am I missing something? Is this *supposed* to fail for some reason I don't understand? Or is there some trick to making it work (or is it a bug in MySQL)?
0