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
57,919
09/11/2008 23:38:00
5,473
09/09/2008 21:20:03
8
0
Best way to send an email from a .NET application?
I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arrise. I'd like the exception handler to be able to prompt the user to click a "Send Error Report" button, which would then cause the app to send an email to my FogBugz email address. What's the best way to do this, and are there any "gotchas" to watch out for?
.net
vb.net
email
null
null
null
open
Best way to send an email from a .NET application? === I'm working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arrise. I'd like the exception handler to be able to prompt the user to click a "Send Error Report" button, which would then cause the app to send an email to my FogBugz email address. What's the best way to do this, and are there any "gotchas" to watch out for?
0
57,921
09/11/2008 23:38:25
479
08/06/2008 08:37:10
305
23
good c# asp.net open source project for code study.
Can anyone recommend a good asp.net c# open-source project for the purpose of studying the code to become a better programmer?
c#
.net
open-source
null
null
null
open
good c# asp.net open source project for code study. === Can anyone recommend a good asp.net c# open-source project for the purpose of studying the code to become a better programmer?
0
57,923
09/11/2008 23:38:58
1,821
08/18/2008 18:11:48
306
30
What exactly is "managed" code?
I've been writing C / C++ code for almost twenty years, and I know perl, python, php, and some java as well, and I'm teaching myself javascript. But I've never done any .NET, VB, or C# stuff. What exactly does "managed" code mean? [Wikipedia][1] describes it simply as "code that executes under the management of a virtual machine", and it specifically says that Java is (usually) managed code, so why does the term only seem to apply to C# / .NET? Can you compile C# into a .exe that contains the VM as well, or do you have to package it up and give it to another .exe (a la java)? In a similar vein, is .NET a *language* or a *framework*, and what exactly does "framework" mean here? OK, so that's more than one question, but for someone who's been in the industry as long as I have, I'm feeling rather N00B-ish right now... [1]: http://en.wikipedia.org/wiki/Managed_code
c#
.net
vb
null
null
null
open
What exactly is "managed" code? === I've been writing C / C++ code for almost twenty years, and I know perl, python, php, and some java as well, and I'm teaching myself javascript. But I've never done any .NET, VB, or C# stuff. What exactly does "managed" code mean? [Wikipedia][1] describes it simply as "code that executes under the management of a virtual machine", and it specifically says that Java is (usually) managed code, so why does the term only seem to apply to C# / .NET? Can you compile C# into a .exe that contains the VM as well, or do you have to package it up and give it to another .exe (a la java)? In a similar vein, is .NET a *language* or a *framework*, and what exactly does "framework" mean here? OK, so that's more than one question, but for someone who's been in the industry as long as I have, I'm feeling rather N00B-ish right now... [1]: http://en.wikipedia.org/wiki/Managed_code
0
57,927
09/11/2008 23:41:16
3,720
08/30/2008 10:00:40
302
17
Top ten ordering in Excel based on complex team rules
I have an excel spreadsheet in a format similar to the following... | NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady | 99 | | Simon | a | Junior | 130 | | John | b | Junior | 130 | : : | Henry | z | Gent | 200 | I need to convert this table into a list of the "Top Ten" teams. The rules are - Each team score is taken from the sum of four members of that club. - These totals should be of the best four scores except... - Each team must consist of at least one Junior or Lady For example in the table above the team score for club A would be 625 **not** 640 as you would take the scores for Harry(190), Bert(150), Jim(150), and Simon(130). You could not take Fred's(145) score as that would give you only Gents. My question is, can this be done easily as a series of Excel formula, or will I need to resort to using something more procedural? Ideally the solution needs to be automatic in the team selections, I don't want to have to create separate hand crafted formula for each team. I also will not necessarily have a neatly ordered list of each clubs members. Although I could probably generate the list via an extra calculation sheet. Thanks Peter
excel
calculation
spreadsheet
null
null
null
open
Top ten ordering in Excel based on complex team rules === I have an excel spreadsheet in a format similar to the following... | NAME | CLUB | STATUS | SCORE | | Fred | a | Gent | 145 | | Bert | a | Gent | 150 | | Harry | a | Gent | 195 | | Jim | a | Gent | 150 | | Clare | a | Lady | 99 | | Simon | a | Junior | 130 | | John | b | Junior | 130 | : : | Henry | z | Gent | 200 | I need to convert this table into a list of the "Top Ten" teams. The rules are - Each team score is taken from the sum of four members of that club. - These totals should be of the best four scores except... - Each team must consist of at least one Junior or Lady For example in the table above the team score for club A would be 625 **not** 640 as you would take the scores for Harry(190), Bert(150), Jim(150), and Simon(130). You could not take Fred's(145) score as that would give you only Gents. My question is, can this be done easily as a series of Excel formula, or will I need to resort to using something more procedural? Ideally the solution needs to be automatic in the team selections, I don't want to have to create separate hand crafted formula for each team. I also will not necessarily have a neatly ordered list of each clubs members. Although I could probably generate the list via an extra calculation sheet. Thanks Peter
0
57,947
09/11/2008 23:47:50
6,004
09/11/2008 22:28:45
1
1
Help Understanding .Net Configuration Options
I'm really confused by the various configuration options for .Net configuration of dll's, ASP.net websites etc in .Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain. So, for example, some of the applications I work with use settings which we access with: string blah = AppLib.Properties.Settings.Default.TemplatePath; Now, this option seems cool because the members are stongly typed, and I won't be able to type in a property name that doesn't exist in the Visual Studio 2005 IDE. We end up with lines like this in the App.Config of a command-line executable project: <connectionStrings> <add name="AppConnectionString" connectionString="XXXX" /> <add name="AppLib.Properties.Settings.AppConnectionString" connectionString="XXXX" /> </connectionStrings> (If we don't have the second setting, someone releasing a debug dll to the live box could have built with the debug connection string embedded in it - eek) We also have settings accessed like this: string blah = System.Configuration.ConfigurationManager.AppSettings["TemplatePath_PDF"]; Now, these seem cool because we can access the setting from the dll code, or the exe / aspx code, and all we need in the Web or App.config is: <appSettings> <add key="TemplatePath_PDF" value="xxx"/> </appSettings> However, the value of course may not be set in the config files, or the string name may be mistyped, and so we have a different set of problems. So... if my understanding is correct, the former methods give strong typing but bad sharing of values between the dll and other projects. The latter provides better sharing, but weaker typing. I feel like I must be missing something. For the moment, I'm not even concerned with the application being able to write-back values to the configuration files, encryption or anything like that. Also, I had decided that the best way to store any non-connection strings was in the DB... and then the very next thing that I have to do is store phone numbers to text people in case of DB connection issues, so they must be stored outside the DB!
c#
.net
configuration
null
null
null
open
Help Understanding .Net Configuration Options === I'm really confused by the various configuration options for .Net configuration of dll's, ASP.net websites etc in .Net v2 - especially when considering the impact of a config file at the UI / end-user end of the chain. So, for example, some of the applications I work with use settings which we access with: string blah = AppLib.Properties.Settings.Default.TemplatePath; Now, this option seems cool because the members are stongly typed, and I won't be able to type in a property name that doesn't exist in the Visual Studio 2005 IDE. We end up with lines like this in the App.Config of a command-line executable project: <connectionStrings> <add name="AppConnectionString" connectionString="XXXX" /> <add name="AppLib.Properties.Settings.AppConnectionString" connectionString="XXXX" /> </connectionStrings> (If we don't have the second setting, someone releasing a debug dll to the live box could have built with the debug connection string embedded in it - eek) We also have settings accessed like this: string blah = System.Configuration.ConfigurationManager.AppSettings["TemplatePath_PDF"]; Now, these seem cool because we can access the setting from the dll code, or the exe / aspx code, and all we need in the Web or App.config is: <appSettings> <add key="TemplatePath_PDF" value="xxx"/> </appSettings> However, the value of course may not be set in the config files, or the string name may be mistyped, and so we have a different set of problems. So... if my understanding is correct, the former methods give strong typing but bad sharing of values between the dll and other projects. The latter provides better sharing, but weaker typing. I feel like I must be missing something. For the moment, I'm not even concerned with the application being able to write-back values to the configuration files, encryption or anything like that. Also, I had decided that the best way to store any non-connection strings was in the DB... and then the very next thing that I have to do is store phone numbers to text people in case of DB connection issues, so they must be stored outside the DB!
0
57,958
09/11/2008 23:53:28
4,435
09/03/2008 18:46:12
651
24
When to use HtmlControls vs WebControls
I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. Also, it looks weird to have code that mixes and matches: <asp:Button id='btnOK' runat='server' Text='OK' /> <input id='btnCancel' runat='server' type='button' value='Cancel' /> (The above case in the event you wanted to bind a server-side event listener to OK but Cancel just runs a javascript that hides the current div) Is there some definitive style guide out there? Should HtmlControls just be avoided?
asp.net
null
null
null
null
null
open
When to use HtmlControls vs WebControls === I like HtmlControls because there is no HTML magic going on... the asp source looks similar to what the client sees. I can't argue with the utility of GridView, Repeater, CheckBoxLists, etc, so I use them when I need that functionality. Also, it looks weird to have code that mixes and matches: <asp:Button id='btnOK' runat='server' Text='OK' /> <input id='btnCancel' runat='server' type='button' value='Cancel' /> (The above case in the event you wanted to bind a server-side event listener to OK but Cancel just runs a javascript that hides the current div) Is there some definitive style guide out there? Should HtmlControls just be avoided?
0
57,962
09/11/2008 23:55:18
1,438
08/15/2008 15:44:20
599
33
What's your experience with Flash drives?
EMC is marketing [Solid State Flash Drives](http://www.emc.com/about/news/press/us/2008/011408-1.htm) and my project is thinking about moving that direction in the future. Does anyone have any experience with replacing traditional disk storage with flash drives? Besides price, have you experienced any downsides to the technology?
flash-drives
emc
hardware
harddrive
disks
null
open
What's your experience with Flash drives? === EMC is marketing [Solid State Flash Drives](http://www.emc.com/about/news/press/us/2008/011408-1.htm) and my project is thinking about moving that direction in the future. Does anyone have any experience with replacing traditional disk storage with flash drives? Besides price, have you experienced any downsides to the technology?
0
57,987
09/12/2008 00:10:25
39,040
11/19/2008 17:53:34
47
4
Writing into excel file with OLEDB
Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbException thrown with message: > "Cannot modify the design of table > 'test$'. It is in a read-only > database." My connection seems fine and I can select data fine but I can't seem to insert data into the excel file, does anyone know how I get read/write access to the excel file via OLEDB?
c#
excel
oledb
null
null
null
open
Writing into excel file with OLEDB === Does anyone know how to write to an excel file (.xls) via OLEDB in C#? I'm doing the following: OleDbCommand dbCmd = new OleDbCommand("CREATE TABLE [test$] (...)", connection); dbCmd.CommandTimeout = mTimeout; results = dbCmd.ExecuteNonQuery(); But I get an OleDbException thrown with message: > "Cannot modify the design of table > 'test$'. It is in a read-only > database." My connection seems fine and I can select data fine but I can't seem to insert data into the excel file, does anyone know how I get read/write access to the excel file via OLEDB?
0
57,990
09/12/2008 00:17:01
4,541
09/04/2008 17:37:04
162
3
What is the overhead cost associated with IoC containers like StructureMap?
After attending a recent Alt.NET group on IoC I got to thinking about the tools available and how they might work. StructureMap in particular uses both attributes and bootstrapper concepts to map requests for IThing to ConcreteThing. Attributes automatically throw up flags for me that either reflection or IL injection is going on. Does anyone know exactly how this works (for StructureMap or other IoC tools) and what the associated overhead might be either at run-time or compile-time?
c#
inversion-of-control
structuremap
null
null
null
open
What is the overhead cost associated with IoC containers like StructureMap? === After attending a recent Alt.NET group on IoC I got to thinking about the tools available and how they might work. StructureMap in particular uses both attributes and bootstrapper concepts to map requests for IThing to ConcreteThing. Attributes automatically throw up flags for me that either reflection or IL injection is going on. Does anyone know exactly how this works (for StructureMap or other IoC tools) and what the associated overhead might be either at run-time or compile-time?
0
57,999
09/12/2008 00:23:23
3,146
08/27/2008 00:25:15
860
45
What is the difference between dllexport and dllimport?
I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here.
dll
vc++
import
export
null
null
open
What is the difference between dllexport and dllimport? === I'm just looking for a simple, concise explanation of the difference between these two. MSDN doesn't go into a hell of a lot of detail here.
0
58,006
09/12/2008 00:29:03
4,883
09/06/2008 10:24:59
763
5
Should we fix that bug?
When triaging bugs for a release, what criteria are typically used to determine whether the bug will be fixed for the release?
project-management
null
null
null
null
null
open
Should we fix that bug? === When triaging bugs for a release, what criteria are typically used to determine whether the bug will be fixed for the release?
0
58,024
09/12/2008 00:40:55
148
08/02/2008 15:01:32
21
2
Open a URL from Windows Forms
I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser. What is the best way to open a URL in the user's default browser from a Windows Forms application?
.net
winforms
null
null
null
null
open
Open a URL from Windows Forms === I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser. What is the best way to open a URL in the user's default browser from a Windows Forms application?
0
58,027
09/12/2008 00:42:13
3,146
08/27/2008 00:25:15
860
46
How to embed command shell in Visual Studio
I would like to be able to embed a command line interpreter inside a dockable window in Visual Studio. Is there any nice way to do this?
vs2005
command
window
null
null
null
open
How to embed command shell in Visual Studio === I would like to be able to embed a command line interpreter inside a dockable window in Visual Studio. Is there any nice way to do this?
0
58,035
09/12/2008 00:45:51
4,337
09/02/2008 22:43:39
1,017
100
Loading different versions of the same assembly
Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know if this is possible or should I use 2 separate processes.
c#
.net
reflection
assembly
dll
null
open
Loading different versions of the same assembly === Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me know if this is possible or should I use 2 separate processes.
0
58,036
09/12/2008 00:46:22
6,023
09/12/2008 00:46:22
1
0
How did my process exit?
From C# on a Windows box, is there a way to find out how a process was stopped? I've had a look at the [Process][1] class, managed to get a nice friendly callback from the Exited event once I set EnableRaisingEvents = true; but I have not managed to find out whether the process was killed or whether it exited naturally? [1]: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
c#
.net
system.diagnostics
null
null
null
open
How did my process exit? === From C# on a Windows box, is there a way to find out how a process was stopped? I've had a look at the [Process][1] class, managed to get a nice friendly callback from the Exited event once I set EnableRaisingEvents = true; but I have not managed to find out whether the process was killed or whether it exited naturally? [1]: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
0
58,054
09/12/2008 00:57:11
6,027
09/12/2008 00:57:11
1
0
How can I replace newline characters using JSP and JSTL?
I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, but it's not very elegant. I'll post below as a possibility.
string
jsp
jstl
replace
newline
null
open
How can I replace newline characters using JSP and JSTL? === I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, but it's not very elegant. I'll post below as a possibility.
0
58,058
09/12/2008 00:58:25
5,387
09/09/2008 12:03:03
21
2
Using C++ classes in .so libraries
I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before I started really programming) that C++ classes only worked with MFC .dlls and not plain ones, but that's just the windows side. Thanks.
c++
linux
class-library
null
null
null
open
Using C++ classes in .so libraries === I'm trying to write a small class library for a C++ course. I was wondering if it was possible to define a set of classes in my shared object and then using them directly in my main program that demos the library. Are there any tricks involved? I remember reading this long ago (before I started really programming) that C++ classes only worked with MFC .dlls and not plain ones, but that's just the windows side. Thanks.
0
58,069
09/12/2008 01:07:06
5,832
09/11/2008 13:36:07
12
0
How to use getaddrinfo_a to do async resolve with glibc
An often overlooked function that requires no external library, but basically has no documentation whatsoever.
c
dns
glibc
getaddrinfo-a
null
null
open
How to use getaddrinfo_a to do async resolve with glibc === An often overlooked function that requires no external library, but basically has no documentation whatsoever.
0
58,070
09/12/2008 01:07:11
1,368
08/14/2008 18:57:47
225
10
OOP class design, Is this design inherintantly 'anti' OOP?
I remember back when MS released a forum sample application, the design of the application was like this: /Classes/User.cs /Classes/Post.cs ... /Users.cs /Posts.cs So the classes folder had just the class i.e. properties and getters/setters. The Users.cs, Post.cs, etc. have the actual methods that access the Data Access Layer, so Posts.cs might look like: public class Posts { public static Post GetPostByID(int postID) { SqlDataProvider dp = new SqlDataProvider(); return dp.GetPostByID(postID); } } Another more traditional route would be to put all of the methods in Posts.cs into the class definition also (Post.cs). Splitting things into 2 files makes it much more procedural doesn't it? Isn't this breaking OOP rules since it is taking the behavior out of the class and putting it into another class definition?
oop
null
null
null
null
null
open
OOP class design, Is this design inherintantly 'anti' OOP? === I remember back when MS released a forum sample application, the design of the application was like this: /Classes/User.cs /Classes/Post.cs ... /Users.cs /Posts.cs So the classes folder had just the class i.e. properties and getters/setters. The Users.cs, Post.cs, etc. have the actual methods that access the Data Access Layer, so Posts.cs might look like: public class Posts { public static Post GetPostByID(int postID) { SqlDataProvider dp = new SqlDataProvider(); return dp.GetPostByID(postID); } } Another more traditional route would be to put all of the methods in Posts.cs into the class definition also (Post.cs). Splitting things into 2 files makes it much more procedural doesn't it? Isn't this breaking OOP rules since it is taking the behavior out of the class and putting it into another class definition?
0
58,119
09/12/2008 01:35:33
1,892
08/19/2008 06:17:29
390
22
Does re.compile() or any given Python library call throw an exception?
I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger question is, where do I go to find if a given Python library call may throw exception(s) and what those are?
python
regex
exception
null
null
null
open
Does re.compile() or any given Python library call throw an exception? === I can't tell from the Python documentation whether the re.compile(x) function may throw an exception (assuming you pass in a string). I imagine there is something that could be considered an invalid regular expression. The larger question is, where do I go to find if a given Python library call may throw exception(s) and what those are?
0
58,123
09/12/2008 01:37:23
1,685
08/18/2008 00:34:30
31
4
Finding System.Web.UI.Page from HttpContext
This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object? And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interface: private IWebBase FindWebBase() { if (HttpContext.Current as IWebBase != null) { return (IWebBase)HttpContext.Current.; } throw new NotImplementedException("Crawling for IWebBase not implemented yet"); } The general context is that some controls need to know whether they are executing as a SharePoint webpart, or as part of an Asp.Net framework. I have solved the problem by requiring the control to pass a reference to itself, and checking the Page property of the control, but I'm still curious why the above does not work. The compiler error is: Cannot convert System.Web.HttpContext to ...IWebBase via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion or null type conversion.
c#
asp.net
null
null
null
null
open
Finding System.Web.UI.Page from HttpContext === This is actually a two part question. First,does the HttpContext.Current correspond to the current System.UI.Page object? And the second question, which is probably related to the first, is why can't I use the following to see if the current page implements an interface: private IWebBase FindWebBase() { if (HttpContext.Current as IWebBase != null) { return (IWebBase)HttpContext.Current.; } throw new NotImplementedException("Crawling for IWebBase not implemented yet"); } The general context is that some controls need to know whether they are executing as a SharePoint webpart, or as part of an Asp.Net framework. I have solved the problem by requiring the control to pass a reference to itself, and checking the Page property of the control, but I'm still curious why the above does not work. The compiler error is: Cannot convert System.Web.HttpContext to ...IWebBase via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion or null type conversion.
0
58,138
09/12/2008 01:50:34
5,263
09/08/2008 19:04:54
1
1
What is the best way to get back into programming after years of neglect?
What are the first steps to getting back into programming after many years of tech support?
self-improvement
null
null
null
null
03/03/2012 01:49:38
not constructive
What is the best way to get back into programming after years of neglect? === What are the first steps to getting back into programming after many years of tech support?
4
58,141
09/12/2008 01:52:15
5,469
09/09/2008 21:03:22
307
20
Why is it considered bad practice to use cursors in SQL Server?
I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why?
sql-server
null
null
null
null
null
open
Why is it considered bad practice to use cursors in SQL Server? === I knew of some performance reasons back in the SQL 7 days, but do the same issues still exist in SQL Server 2005? If I have a resultset in a stored procedure that I want to act upon individually, are cursors still a bad choice? If so, why?
0
58,146
09/12/2008 01:54:55
5,360
09/09/2008 10:50:44
1
0
Hierarchical Data In ASP.NET MVC
I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this?
asp.net
asp.net-mvc
null
null
null
null
open
Hierarchical Data In ASP.NET MVC === I am trying to come up with the best way to render some hierarchical data in to a nested unordered list using ASP.NET MVC. Does anyone have any tips on how to do this?
0
58,163
09/12/2008 02:05:01
2,443
08/22/2008 10:53:30
735
39
When can/should you go whole hog with the ORM approach?
It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a cleaner architecture. Is this because I'm applying the tool in an invalid Context, or is it deeper than that? When can/should you go whole hog with the ORM approach? Any insight would be greatly appreciated. ---------- A little of background: In my environment I have about 50 client computers and 1 reasonably powerful SQL Server. I have a desktop application in which all 50 clients are accessing the data at all times. The project's Data Model has gone through a number of reorganizations for various reasons including clarity, efficiency, etc. My Data Model's history 0. JDBC calls directly 1. DAO + POJO without relations between Pojos (basically wrapping the JDBC). 2. Added Relations between POJOs implementing Lazy Loading, but just hiding the inter-DAO calls 3. Jumped onto the Hibernate bandwagon after seeing how "simple" it made data access (it made inter POJO relations trivial) and because it could decrease the number of round trips to the database when working with many related entities. 4. Since it was a desktop application keeping Sessions open long term was a nightmare so it ended up causing a whole lot of issues 5. Stepped back to a partial DAO/Hibernate approach that allows me to make direct JDBC calls behind the DAO curtain while at the same time using Hibernate.
java
architecture
orm
hibernate
null
null
open
When can/should you go whole hog with the ORM approach? === It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a cleaner architecture. Is this because I'm applying the tool in an invalid Context, or is it deeper than that? When can/should you go whole hog with the ORM approach? Any insight would be greatly appreciated. ---------- A little of background: In my environment I have about 50 client computers and 1 reasonably powerful SQL Server. I have a desktop application in which all 50 clients are accessing the data at all times. The project's Data Model has gone through a number of reorganizations for various reasons including clarity, efficiency, etc. My Data Model's history 0. JDBC calls directly 1. DAO + POJO without relations between Pojos (basically wrapping the JDBC). 2. Added Relations between POJOs implementing Lazy Loading, but just hiding the inter-DAO calls 3. Jumped onto the Hibernate bandwagon after seeing how "simple" it made data access (it made inter POJO relations trivial) and because it could decrease the number of round trips to the database when working with many related entities. 4. Since it was a desktop application keeping Sessions open long term was a nightmare so it ended up causing a whole lot of issues 5. Stepped back to a partial DAO/Hibernate approach that allows me to make direct JDBC calls behind the DAO curtain while at the same time using Hibernate.
0
58,174
09/12/2008 02:16:12
4,903
09/06/2008 14:16:54
278
17
Does anyone know where to find free database design templates?
I'm obviously not talking about a full solution, but just a good starting point for common applications for software architects. It could be for a CMS, e-commerce storefront, address book, etc. A UML diagram is not essential, but a table schema with data types in the least. Thanks!
database
design
templates
null
null
02/26/2012 14:56:15
not constructive
Does anyone know where to find free database design templates? === I'm obviously not talking about a full solution, but just a good starting point for common applications for software architects. It could be for a CMS, e-commerce storefront, address book, etc. A UML diagram is not essential, but a table schema with data types in the least. Thanks!
4
58,184
09/12/2008 02:23:37
6,024
09/12/2008 00:47:35
1
0
Something special about Safari for Windows and AJAX?
Some common pitfalls I should keep in mind?
ajax
null
null
null
null
null
open
Something special about Safari for Windows and AJAX? === Some common pitfalls I should keep in mind?
0
58,190
09/12/2008 02:27:12
5,023
09/07/2008 12:27:27
274
23
Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+ ?
My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recently I have needed to debug some very poorly written TSQL stored procs (yet again). As usual I found many of the problems due to the original developer developer having no real TSQL experience, they were ASP.NET / C# focused. So, using CLR procedures would firstly provide a much more familiar toolset to this type of developer, and secondly, the debugging and testing facilities are more powerful (ie Visual Studio instead of SQL Management Studio). I'd be very interested in hearing your experience as it's obviously not a simple choice.
.net
sql-server
tsql
null
null
null
open
Are CLR stored procedures preferred over TSQL stored procedures in SQL 2005+ ? === My current view is no, prefer Transact SQL stored procedures because they are a lighter weight and (possibly) higher performing option, while CLR procedures allow developers to get up to all sorts of mischief. However recently I have needed to debug some very poorly written TSQL stored procs (yet again). As usual I found many of the problems due to the original developer developer having no real TSQL experience, they were ASP.NET / C# focused. So, using CLR procedures would firstly provide a much more familiar toolset to this type of developer, and secondly, the debugging and testing facilities are more powerful (ie Visual Studio instead of SQL Management Studio). I'd be very interested in hearing your experience as it's obviously not a simple choice.
0
58,192
09/12/2008 02:29:36
5,702
09/11/2008 02:52:05
21
6
How to capture and present screencasts and but still have code legible?
I would like to find out from other's experience what is the best way to capture screencasts that include code and cuts to the program in action, and then present those screencasts online so that the code is **still legible**, and ideally making the most efficient use of display real estate. What capture tools work well for this? I've tried [Camtasia][1] (PC), [SnapzPro][2] (Mac), and [Screenflow][3] (Mac) all with varying results. What screen resolution / code editor text display settings work well? Keeping in mind I'd like to be able to cut over in real time to show how the code works -- a website built for 1024x768 resultion might not fare well at 800x600. What is the best encoding for this type of screencast prior to uploading/converting to a hosting streaming service? Lastly, what is the best way to present these online? I love the social / timeline tagging of [Viddler][4], but the image quality of [Vimeo][5] seems to render text more legibly. I've also been tempted just to use Camtasia's FLV export and host them on my Amazon S3 Account. What has worked for you? [1]: http://www.techsmith.com/camtasia.asp [2]: http://www.ambrosiasw.com/utilities/snapzprox/ [3]: http://www.flip4mac.com/screenflow.htm [4]: http://www.viddler.com [5]: http://www.vimeo.com
screencasts
training
education
demonstration
documentation
null
open
How to capture and present screencasts and but still have code legible? === I would like to find out from other's experience what is the best way to capture screencasts that include code and cuts to the program in action, and then present those screencasts online so that the code is **still legible**, and ideally making the most efficient use of display real estate. What capture tools work well for this? I've tried [Camtasia][1] (PC), [SnapzPro][2] (Mac), and [Screenflow][3] (Mac) all with varying results. What screen resolution / code editor text display settings work well? Keeping in mind I'd like to be able to cut over in real time to show how the code works -- a website built for 1024x768 resultion might not fare well at 800x600. What is the best encoding for this type of screencast prior to uploading/converting to a hosting streaming service? Lastly, what is the best way to present these online? I love the social / timeline tagging of [Viddler][4], but the image quality of [Vimeo][5] seems to render text more legibly. I've also been tempted just to use Camtasia's FLV export and host them on my Amazon S3 Account. What has worked for you? [1]: http://www.techsmith.com/camtasia.asp [2]: http://www.ambrosiasw.com/utilities/snapzprox/ [3]: http://www.flip4mac.com/screenflow.htm [4]: http://www.viddler.com [5]: http://www.vimeo.com
0
58,203
09/12/2008 02:36:20
1,154
08/12/2008 23:39:07
421
41
MacBook vs MacBook Pro for .NET development and other stuff
I am about to buy a notebook and I am between the MB or the MBPro any recomendation?
osx
developer-machine
null
null
null
null
open
MacBook vs MacBook Pro for .NET development and other stuff === I am about to buy a notebook and I am between the MB or the MBPro any recomendation?
0
58,207
09/12/2008 02:38:10
840
08/09/2008 08:37:29
129
7
Using the result of a command as an argument in bash?
To create a playlist for all of the music in a folder, I am using the following command in bash: ls > list.txt I would like to use the result of the **pwd** (print working directory) command for the name of the playlist. Something like: ls > ${pwd}.txt That doesn't work though - can anyone tell me what syntax I need to use to do something like this?
bash
command-line
null
null
null
null
open
Using the result of a command as an argument in bash? === To create a playlist for all of the music in a folder, I am using the following command in bash: ls > list.txt I would like to use the result of the **pwd** (print working directory) command for the name of the playlist. Something like: ls > ${pwd}.txt That doesn't work though - can anyone tell me what syntax I need to use to do something like this?
0
58,210
09/12/2008 02:39:35
6,040
09/12/2008 02:36:09
1
0
C++ SMTP Example
Does any one have a simple C++ example for sending e-mail using smtp api?
c++
smtp
null
null
null
null
open
C++ SMTP Example === Does any one have a simple C++ example for sending e-mail using smtp api?
0
58,213
09/12/2008 02:42:26
6,035
09/12/2008 01:54:15
1
2
Can you recommend a low cost automated testing tools for a .NET Winforms application?
Looking for an automated testing tool to support functional/regression testing for a .NET Winforms client server commercial application. The top tier products: HP QuickTest Pro, Borland SilkTest, IBM Rational Functional Tester and Compuware TestPartner are in the 5-10K price range. Would you recommend a lower cost tool set for functional/regression testing? Need tool that allows BA/QA analyst can be productively engaged test case development. So I am ruling out unit testing tools like xUnit which are entirely for programmer use. Yet I also want a tool that provides flexible scripting support to allow testing of a wider range of issues (possibly with developer support). Please limit your answer to a single recommened tool. If your recommendation is already answered please upvote to create a ranking for tools available. Thanks
.net
winforms
testing
null
null
null
open
Can you recommend a low cost automated testing tools for a .NET Winforms application? === Looking for an automated testing tool to support functional/regression testing for a .NET Winforms client server commercial application. The top tier products: HP QuickTest Pro, Borland SilkTest, IBM Rational Functional Tester and Compuware TestPartner are in the 5-10K price range. Would you recommend a lower cost tool set for functional/regression testing? Need tool that allows BA/QA analyst can be productively engaged test case development. So I am ruling out unit testing tools like xUnit which are entirely for programmer use. Yet I also want a tool that provides flexible scripting support to allow testing of a wider range of issues (possibly with developer support). Please limit your answer to a single recommened tool. If your recommendation is already answered please upvote to create a ranking for tools available. Thanks
0
58,245
09/12/2008 03:05:23
2,773
08/25/2008 00:43:07
500
22
Showing a tooltip for a MenuItem
I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt" I'd like to pop a tooltip with the full path when the user hovers over the item, but this doesn't seem possible with the [Tooltip][1] class in .NET 2.0. Am I missing something obvious? [1]: http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.aspx
.net
winforms
null
null
null
null
open
Showing a tooltip for a MenuItem === I've got a menu that contains, among other things, some most-recently-used file paths. The paths to these files can be long, so the text sometimes gets clipped like "C:\Progra...\foo.txt" I'd like to pop a tooltip with the full path when the user hovers over the item, but this doesn't seem possible with the [Tooltip][1] class in .NET 2.0. Am I missing something obvious? [1]: http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.aspx
0
58,247
09/12/2008 03:06:13
3,111
08/26/2008 17:47:14
149
12
Compiling code on an external drive
To make things easier when switching between machines (my workstation at the office and my personal laptop) I have thought about trying an external hard drive to store my working directory on. Specifically I am looking at Firewire 800 drives (most are 5400 rpm 8mb cache). What I am wondering is if anyone has experience with doing this with Visual Studio projects and what sort of performance hit they see.
visual-studio
hardware
null
null
null
null
open
Compiling code on an external drive === To make things easier when switching between machines (my workstation at the office and my personal laptop) I have thought about trying an external hard drive to store my working directory on. Specifically I am looking at Firewire 800 drives (most are 5400 rpm 8mb cache). What I am wondering is if anyone has experience with doing this with Visual Studio projects and what sort of performance hit they see.
0
58,278
09/12/2008 04:02:28
1,368
08/14/2008 18:57:47
233
10
Design by coding, its wrong but easier to visualize
I'm sure others agree, when code hits the pavement it is much easier to think of all the elements that will go into your application. Meaning, once you get going, you think of the <b>what's next</b> because you have reached a point where you have to design another table or class. The drawbacks of this approach are obvious and we don't need to go into it. The question is, for those of us who can't conceptualize the design without "seeing it", how do we go from design at the seat of our pants to a more structured methodology? The only solution I can think of is detailed specifications, which forces one to think of exactly how things are going to work. Is this just a case of how people think differently, or is there something else I am ignoring?
design
null
null
null
null
null
open
Design by coding, its wrong but easier to visualize === I'm sure others agree, when code hits the pavement it is much easier to think of all the elements that will go into your application. Meaning, once you get going, you think of the <b>what's next</b> because you have reached a point where you have to design another table or class. The drawbacks of this approach are obvious and we don't need to go into it. The question is, for those of us who can't conceptualize the design without "seeing it", how do we go from design at the seat of our pants to a more structured methodology? The only solution I can think of is detailed specifications, which forces one to think of exactly how things are going to work. Is this just a case of how people think differently, or is there something else I am ignoring?
0
58,280
09/12/2008 04:06:20
6,042
09/12/2008 03:35:00
1
0
UnhandledException handler in a .Net Windows Service
Is it possible to use an UnhandledException Handler in a Windows Service? Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledException but as far as I can tell this doesn’t achieve anything win a Windows Service so I end up with this pattern in my 2 (or 4) Service entry points: <pre> <code> Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This method should set things ' in motion so your service can do its work. Try MyServiceComponent.Start() Catch ex As Exception 'call into our exception handler MyExceptionHandlingComponent.ManuallyHandleException (ex) 'zero is the default ExitCode for a successfull exit, so if we set it to non-zero ExitCode = -1 'So, we use Environment.Exit, it seems to be the most appropriate thing to use 'we pass an exit code here as well, just in case. System.Environment.Exit(-1) End Try End Sub </code> </pre> Is there a way my Custom Exception Handling component can deal with this better so I don't have to fill my OnStart with messy exception handling plumbing?
.net
exception-handling
windows-services
null
null
null
open
UnhandledException handler in a .Net Windows Service === Is it possible to use an UnhandledException Handler in a Windows Service? Normally I would use a custom built Exception Handling Component that does logging, phone home, etc. This component adds a handler to System.AppDomain.CurrentDomain.UnhandledException but as far as I can tell this doesn’t achieve anything win a Windows Service so I end up with this pattern in my 2 (or 4) Service entry points: <pre> <code> Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This method should set things ' in motion so your service can do its work. Try MyServiceComponent.Start() Catch ex As Exception 'call into our exception handler MyExceptionHandlingComponent.ManuallyHandleException (ex) 'zero is the default ExitCode for a successfull exit, so if we set it to non-zero ExitCode = -1 'So, we use Environment.Exit, it seems to be the most appropriate thing to use 'we pass an exit code here as well, just in case. System.Environment.Exit(-1) End Try End Sub </code> </pre> Is there a way my Custom Exception Handling component can deal with this better so I don't have to fill my OnStart with messy exception handling plumbing?
0
58,289
09/12/2008 04:18:39
5,302
09/08/2008 22:49:47
76
10
Excel like server side control for ASP.NET
We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid :/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the box, but I thought I'd do a bit of searching nonetheless. I've found a couple of products on Google, but was wondering if anyone else has any feedback around any such controls (obviously the cheaper or *ahem* freer the better)
asp.net
excel
servercontrols
null
null
null
open
Excel like server side control for ASP.NET === We have a requirement to increase the functionality of a grid we are using to edit on our webapp, and our manager keeps citing Excel as the perfect example for a data grid :/ He still doesn't really get that a Spreadsheet like control doesn't exist out of the box, but I thought I'd do a bit of searching nonetheless. I've found a couple of products on Google, but was wondering if anyone else has any feedback around any such controls (obviously the cheaper or *ahem* freer the better)
0
58,294
09/12/2008 04:21:51
5,342
09/09/2008 09:55:09
64
4
How do I get the external IP of a socket in Python?
When I call `socket.getsockname()` on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this?
python
sockets
null
null
null
null
open
How do I get the external IP of a socket in Python? === When I call `socket.getsockname()` on a socket object, it returns a tuple of my machine's internal IP and the port. However, I would like to retrieve my external IP. What's the cheapest, most efficient manner of doing this?
0
58,300
09/12/2008 04:32:15
1,890
08/19/2008 05:01:52
3
1
Tools for manipulating PowerPoint files
Do you know managed tools for manipulating PowerPoint files? The tool should be 100% managed code and offer the option to handle .ppt and .pptx files.
c#
.net
powerpoint
null
null
null
open
Tools for manipulating PowerPoint files === Do you know managed tools for manipulating PowerPoint files? The tool should be 100% managed code and offer the option to handle .ppt and .pptx files.
0
58,305
09/12/2008 04:36:44
2,598
08/23/2008 13:13:34
457
30
Java: Is there a way to take a screenshot using java and save it to some sort of image?
Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?
java
image
screenshot
null
null
null
open
Java: Is there a way to take a screenshot using java and save it to some sort of image? === Simple as the title states: Can you use only Java commands to take a screenshot and save it? Or, do I need to use an OS specific program to take the screenshot and then grab it off the clipboard?
0
58,306
09/12/2008 04:36:51
3,534
08/29/2008 01:59:08
26
2
Graph Algorithm To Find All Connections Between Two Arbitrary Vertices
I am trying to find out what is the best (time efficient) algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect to one another (basically a graph, the records being the vertices and the connection data the edges). All of the records in the set have connection information (i.e. no orphan records are present; each record in the set connects to one or more other records in the set). I want to choose any two (arbitrary) records from the set and be able to show all ways possible the chosen records connect (either directly or through other connections). For example: <pre> If I have the following records: A, B, C, D, E and the following represents the connections: (A,B),(A,C),(B,A),(B,D),(B,E),(B,F),(C,A),(C,E), (C,F),(D,B),(E,C),(E,F),(F,B),(F,C),(F,E) [where (A,B) means record A connects to record B] </pre> If I chose B as my starting record and E as my ending record, I would want to find all paths through the record connections that would connect record B to record E. <pre> All paths connecting B to E: B->E B->F->E B->F->C->E B->A->C->E B->A->C->F->E </pre> This is an example, in practice I may have sets containing hundreds of thousands of records.
algorithms
graph
language-agnostic
connection
null
null
open
Graph Algorithm To Find All Connections Between Two Arbitrary Vertices === I am trying to find out what is the best (time efficient) algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of records from this set connect to one another (basically a graph, the records being the vertices and the connection data the edges). All of the records in the set have connection information (i.e. no orphan records are present; each record in the set connects to one or more other records in the set). I want to choose any two (arbitrary) records from the set and be able to show all ways possible the chosen records connect (either directly or through other connections). For example: <pre> If I have the following records: A, B, C, D, E and the following represents the connections: (A,B),(A,C),(B,A),(B,D),(B,E),(B,F),(C,A),(C,E), (C,F),(D,B),(E,C),(E,F),(F,B),(F,C),(F,E) [where (A,B) means record A connects to record B] </pre> If I chose B as my starting record and E as my ending record, I would want to find all paths through the record connections that would connect record B to record E. <pre> All paths connecting B to E: B->E B->F->E B->F->C->E B->A->C->E B->A->C->F->E </pre> This is an example, in practice I may have sets containing hundreds of thousands of records.
0
58,317
09/12/2008 04:47:42
6,050
09/12/2008 04:47:42
1
0
CSS / JavaScript Navigation Menu on top of Flash in Firefox
My site has a drop-down menu built in CSS and JavaScript that drops down over a Flash animation. In IE (6&7) the drop-down menus drop over the Flash animation, however, in Firefox (2&3) the menus appear underneath the Flash animation. Is there any way to get this dynamic menu to flow OVER the Flash in Firefox? In IE 7 menu appears over the Flash: ![alt text][1] In Firefox the menu appears under the Flash: (How can I fix this?!) ![alt text][2] [1]: http://lh3.ggpht.com/guterl/SMnyzAeha6I/AAAAAAAAABI/BGWJes9d9FA/s288/ie_sample.gif [2]: http://lh3.ggpht.com/guterl/SMnyzHYVLrI/AAAAAAAAABQ/924qQaD3K0o/s288/firefox_sample.gif
flash
dynamic-css
null
null
null
null
open
CSS / JavaScript Navigation Menu on top of Flash in Firefox === My site has a drop-down menu built in CSS and JavaScript that drops down over a Flash animation. In IE (6&7) the drop-down menus drop over the Flash animation, however, in Firefox (2&3) the menus appear underneath the Flash animation. Is there any way to get this dynamic menu to flow OVER the Flash in Firefox? In IE 7 menu appears over the Flash: ![alt text][1] In Firefox the menu appears under the Flash: (How can I fix this?!) ![alt text][2] [1]: http://lh3.ggpht.com/guterl/SMnyzAeha6I/AAAAAAAAABI/BGWJes9d9FA/s288/ie_sample.gif [2]: http://lh3.ggpht.com/guterl/SMnyzHYVLrI/AAAAAAAAABQ/924qQaD3K0o/s288/firefox_sample.gif
0
58,340
09/12/2008 05:08:09
3,826
08/31/2008 03:49:02
11
1
How to test a WPF user interface?
Using win forms with an [MVC][1]/[MVP][2] architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controller/presenter. The wrapper class would make most everything in the UI an observable property for the test runner through properties and events. Would this be a viable approach to testing a WPF app? Is there a better way? Are there any gotchas to watch out for? [1]: http://en.wikipedia.org/wiki/Model-view-controller [2]: http://msdn.microsoft.com/en-us/magazine/cc188690.aspx
.net
wpf
testing
null
null
null
open
How to test a WPF user interface? === Using win forms with an [MVC][1]/[MVP][2] architecture, I would normally use a class to wrap a view to test the UI while using mocks for the model and controller/presenter. The wrapper class would make most everything in the UI an observable property for the test runner through properties and events. Would this be a viable approach to testing a WPF app? Is there a better way? Are there any gotchas to watch out for? [1]: http://en.wikipedia.org/wiki/Model-view-controller [2]: http://msdn.microsoft.com/en-us/magazine/cc188690.aspx
0
58,353
09/12/2008 05:17:21
5,302
09/08/2008 22:49:47
81
10
Recent Projects panel on VS2008 not working for fresh installs
The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty. I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from 2005 but installed from scratch. I generally treat this as a bit of a curiosity, but now I have a new laptop and fresh install of VS2008, it's also happening to me, and I've upgraded the phenomena from a curio to an annoyance. Anyone know if this is a bug or if there is a setting I'm missing somewhere. Thanks
visual-studio-2008
null
null
null
null
null
open
Recent Projects panel on VS2008 not working for fresh installs === The Recent Projects panel on the Start Page of VS2008 Professional doesn't appear to work, and constantly remains empty. I've noticed this on 3 of our developers VS2008 installations, in fact all the installations that weren't updated from 2005 but installed from scratch. I generally treat this as a bit of a curiosity, but now I have a new laptop and fresh install of VS2008, it's also happening to me, and I've upgraded the phenomena from a curio to an annoyance. Anyone know if this is a bug or if there is a setting I'm missing somewhere. Thanks
0
58,354
09/12/2008 05:17:35
3,957
09/01/2008 02:50:44
1
2
Algorithm/Data Structure Design Interview Questions
What are some simple algorithm or data structure related "white boarding" problems that you find effective during the candidate screening process? I have some simple ones that I use to validate problem solving skills and that can be simply expressed but have some opportunity for the application of some heuristics. One of the basics that I use for junior developers is: > Write a C# method that takes a string which contains a set of words (a sentence) and rotates those words X number of places to the right. When a word in the last position of the sentence is rotated it should show up at the front of the resulting string. When a candidate answers this question I look to see that they available .NET data structures and methods (string.Join, string.Split, List<string>, etc...) to solve the problem. I also look for them to identify special cases for optimization. Like the number of times that the words need to be rotated isn't really X it's X % number of words. What are some of the white board problems that you use to interview a candidate and what are some of the things you look for in an answer (do not need to post the actual answer).
alrgorithm
data-structures
interview-questions
null
null
12/03/2011 09:02:48
not constructive
Algorithm/Data Structure Design Interview Questions === What are some simple algorithm or data structure related "white boarding" problems that you find effective during the candidate screening process? I have some simple ones that I use to validate problem solving skills and that can be simply expressed but have some opportunity for the application of some heuristics. One of the basics that I use for junior developers is: > Write a C# method that takes a string which contains a set of words (a sentence) and rotates those words X number of places to the right. When a word in the last position of the sentence is rotated it should show up at the front of the resulting string. When a candidate answers this question I look to see that they available .NET data structures and methods (string.Join, string.Split, List<string>, etc...) to solve the problem. I also look for them to identify special cases for optimization. Like the number of times that the words need to be rotated isn't really X it's X % number of words. What are some of the white board problems that you use to interview a candidate and what are some of the things you look for in an answer (do not need to post the actual answer).
4
58,384
09/12/2008 05:52:05
2,078
08/20/2008 08:00:36
102
14
Saving an open generic type in an array?
I am facing a problem with .NET generics. The thing I want to do is saving an array of generics types (GarphicsItem): public class GraphicsItem<T> { private T _item; public void Load(T item) { _item = item; } } How can I save such open generic type in an array? Thx
.net
generics
null
null
null
null
open
Saving an open generic type in an array? === I am facing a problem with .NET generics. The thing I want to do is saving an array of generics types (GarphicsItem): public class GraphicsItem<T> { private T _item; public void Load(T item) { _item = item; } } How can I save such open generic type in an array? Thx
0
58,399
09/12/2008 06:16:33
6,059
09/12/2008 06:14:24
1
0
Mac font rendering on Windows
I love the way Mac OS *beautifully* renders fonts (not just browsers). I was wondering if we could somehow get the same rendering in browsers running on Windows? Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts? -- Swap
osx
font
rendering
null
null
null
open
Mac font rendering on Windows === I love the way Mac OS *beautifully* renders fonts (not just browsers). I was wondering if we could somehow get the same rendering in browsers running on Windows? Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts? -- Swap
0
58,424
09/12/2008 07:04:31
6,061
09/12/2008 07:04:30
1
0
A lightweight application framework for PHP?
I have long been a fan of [_why's Camping](http://code.whytheluckystiff.net/camping) microframework -- lightweight, great for microscopic applications (low concurrency, easy to use and edit and maintain), which is what I do. I'd love to know if there's something similar for PHP; full-blown app frameworks like CakePHP or Symphony are very large for what I do, but I can't seem to find nothing "less". What PHP framework would you prefer, in this situation?
php
framework
small
null
null
null
open
A lightweight application framework for PHP? === I have long been a fan of [_why's Camping](http://code.whytheluckystiff.net/camping) microframework -- lightweight, great for microscopic applications (low concurrency, easy to use and edit and maintain), which is what I do. I'd love to know if there's something similar for PHP; full-blown app frameworks like CakePHP or Symphony are very large for what I do, but I can't seem to find nothing "less". What PHP framework would you prefer, in this situation?
0
58,425
09/12/2008 07:06:37
148
08/02/2008 15:01:32
98
3
WPF Application fails on startup with TypeInitializationException
I have a simple WPF application which I am trying to start. I am following the Microsoft Patterns and Practices "Composite Application Guidance for WPF". I've followed their instructions however my WPF application fails immediately with a "TypeInitializationException". The InnerException property reveals that "The type initializer for 'System.Windows.Navigation.BaseUriHelper' threw an exception." Here is my app.xaml: <Application x:Class="MyNamespace.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> </Application.Resources> </Application> And here is my app.xaml.cs (exception thrown at "public App()"): public partial class App : Application { public App() { Bootstrapper bootStrapper = new Bootstrapper(); bootStrapper.Run(); } } I have set the "App" class as the startup object in the project. What is going astray?
.net
wpf
prism
null
null
null
open
WPF Application fails on startup with TypeInitializationException === I have a simple WPF application which I am trying to start. I am following the Microsoft Patterns and Practices "Composite Application Guidance for WPF". I've followed their instructions however my WPF application fails immediately with a "TypeInitializationException". The InnerException property reveals that "The type initializer for 'System.Windows.Navigation.BaseUriHelper' threw an exception." Here is my app.xaml: <Application x:Class="MyNamespace.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> </Application.Resources> </Application> And here is my app.xaml.cs (exception thrown at "public App()"): public partial class App : Application { public App() { Bootstrapper bootStrapper = new Bootstrapper(); bootStrapper.Run(); } } I have set the "App" class as the startup object in the project. What is going astray?
0
58,429
09/12/2008 07:09:22
4,489
09/04/2008 06:00:46
185
15
SQL set-based range
How can I have SQL repeat some set-based operation an arbitrary number of times without looping? How can I have SQL perform an operation against a range of numbers? I'm basically looking for a way to do a set-based for loop.<p> I know I can just create a small table with integers in it, say from 1 to 1000 and then use it for range operations that are within that range. <p>For example, if I had that table I could make a select to find the sum of numbers 100-200 like this: select sum(n) from numbers where n between 100 and 200 Any ideas? I'm kinda looking for something that works for T-SQL but any platform would be okay.
sql-server
sql
null
null
null
null
open
SQL set-based range === How can I have SQL repeat some set-based operation an arbitrary number of times without looping? How can I have SQL perform an operation against a range of numbers? I'm basically looking for a way to do a set-based for loop.<p> I know I can just create a small table with integers in it, say from 1 to 1000 and then use it for range operations that are within that range. <p>For example, if I had that table I could make a select to find the sum of numbers 100-200 like this: select sum(n) from numbers where n between 100 and 200 Any ideas? I'm kinda looking for something that works for T-SQL but any platform would be okay.
0
58,431
09/12/2008 07:10:21
4,991
09/07/2008 08:43:55
56
4
Algorithm for joining e.g. an array of strings
I have wondered for some time, what a nice, clean solution for joining an array of strings might look like. Example: I have ["Alpha, "Beta", "Gamma"] and want to join the strings into one, separated by commas – "Alpha, Beta, Gamma". Now I know that most programming languages offer some kind of join method for this. I just wonder how these might be implemented. When I took introductory courses, I often tried to go it alone, but never found a satisfactory algorithm. Everything seemed rather messy, the problem being that you can not just loop through the array, concatenating the strings, as you would add one too many commas (either before or after the last string). I don’t want to check conditions in the loop. I don’t really want to add the first or the last string before/after the loop (I guess this is maybe the best way?). Can someone show me an elegant solution? Or tell me exactly why there can’t be anything more elegant?
language-agnostic
algorithm
string
arrays
null
null
open
Algorithm for joining e.g. an array of strings === I have wondered for some time, what a nice, clean solution for joining an array of strings might look like. Example: I have ["Alpha, "Beta", "Gamma"] and want to join the strings into one, separated by commas – "Alpha, Beta, Gamma". Now I know that most programming languages offer some kind of join method for this. I just wonder how these might be implemented. When I took introductory courses, I often tried to go it alone, but never found a satisfactory algorithm. Everything seemed rather messy, the problem being that you can not just loop through the array, concatenating the strings, as you would add one too many commas (either before or after the last string). I don’t want to check conditions in the loop. I don’t really want to add the first or the last string before/after the loop (I guess this is maybe the best way?). Can someone show me an elegant solution? Or tell me exactly why there can’t be anything more elegant?
0
58,457
09/12/2008 07:44:16
2,929
08/26/2008 06:32:53
176
13
Random Weighted Choice in T-SQL
How do you randomly select a table row in T-SQL based on an applied weight for all candidate rows? For example, I have a set of rows in a table weighted at 50, 25, and 25 (which adds up to 100 but does not need to), and I want to select one of them randomly with a statistical outcome equivalent to the respective weight.
sql-server
mssql
tsql
random
null
null
open
Random Weighted Choice in T-SQL === How do you randomly select a table row in T-SQL based on an applied weight for all candidate rows? For example, I have a set of rows in a table weighted at 50, 25, and 25 (which adds up to 100 but does not need to), and I want to select one of them randomly with a statistical outcome equivalent to the respective weight.
0
58,463
09/12/2008 07:50:56
5,729
09/11/2008 05:23:57
71
2
Preferred Operating System for web programmers - client or server
Which OS do you prefer to program on? Client or Server There is a school of though that if you are doing (mostly) web programming (or other server based code), you should use a server OS for your dev machine, since that's closer to the environment where your app will be running. Update: I should add, this is really directed to the Windows crowd
operatingsystem
null
null
null
null
null
open
Preferred Operating System for web programmers - client or server === Which OS do you prefer to program on? Client or Server There is a school of though that if you are doing (mostly) web programming (or other server based code), you should use a server OS for your dev machine, since that's closer to the environment where your app will be running. Update: I should add, this is really directed to the Windows crowd
0
58,478
09/12/2008 08:02:55
381
08/05/2008 10:39:26
2,240
33
How do I send mail from a Ruby program ?
I want to send email from a Ruby application. Is there a call in the core language to do this or is there a library I should use ? What's the best way to do this ?
ruby
email
null
null
null
null
open
How do I send mail from a Ruby program ? === I want to send email from a Ruby application. Is there a call in the core language to do this or is there a library I should use ? What's the best way to do this ?
0
58,482
09/12/2008 08:08:40
422
08/05/2008 15:11:55
1,100
47
Ruby - Get a Variable's Name
I'm not entirely sure if this is possible in Ruby, but hopefully there's an easy way to do this. I want to declare a variable and later find out the name of the variable. That is, for this simple snippet: foo = ["goo", "baz"] How can I get the name of the array (here, "foo") back? If it is indeed possible, does this work on any variable (e.g., scalars, hashes, etc.)?
ruby
variables
null
null
null
null
open
Ruby - Get a Variable's Name === I'm not entirely sure if this is possible in Ruby, but hopefully there's an easy way to do this. I want to declare a variable and later find out the name of the variable. That is, for this simple snippet: foo = ["goo", "baz"] How can I get the name of the array (here, "foo") back? If it is indeed possible, does this work on any variable (e.g., scalars, hashes, etc.)?
0
58,484
09/12/2008 08:10:47
5,642
09/10/2008 15:42:57
152
7
Getting Good Google PageRank
In SEO people talk a lot about Google [PageRank][1]. It's kind of a catch 22 because until your site is actually big and you don't really need search engines as much, it's unlikely that big sites will link to you and increase your PageRank! I've been told that it's easiest to simply get a couple high quality links to point to a site to raise it's PageRank. I've also been told that there are certain Open Directories like dmoz.org that Google pays special attention to (since they're human managed links). Can anyone speak to the validity of this or suggest another site/technique to increase a site's PageRank? [1]: http://en.wikipedia.org/wiki/PageRank
seo
pagerank
null
null
null
08/14/2011 14:42:20
off topic
Getting Good Google PageRank === In SEO people talk a lot about Google [PageRank][1]. It's kind of a catch 22 because until your site is actually big and you don't really need search engines as much, it's unlikely that big sites will link to you and increase your PageRank! I've been told that it's easiest to simply get a couple high quality links to point to a site to raise it's PageRank. I've also been told that there are certain Open Directories like dmoz.org that Google pays special attention to (since they're human managed links). Can anyone speak to the validity of this or suggest another site/technique to increase a site's PageRank? [1]: http://en.wikipedia.org/wiki/PageRank
2
58,489
09/12/2008 08:14:11
2,954
08/26/2008 08:53:06
759
38
Are BPM solutions worth the investment in money, time and effort?
This is more an architecture related question than a programming one, but I think it might be useful to developers given that I have been wondering this myself for some time. I have no experience with Business Process Management tools use or implementation. (The closest thing I have used is BizTalk server, but I know that it is not really a full BPM product, but a document based integration platform with some process orchestration features). Recently, several of our clients have been asking for BPM-based development projects, and most of the time I discover that some BPM vendor has been giving them some of those 'look how amazing is my product' demos, where they show 'how easily' you can modify your business process flow just by 'dragging and dropping' shapes around and those kind of things. Obviously, vendors don't say anything about **how you first need to have running your well designed processes on the BPM so you can actually make that kind of magic happen**. My clients suddenly see a new light thinking that BPM technology will finally fix the typical problems common to almost any IT department: applications that are hard to maintain, missing deadlines when implementing changes to support new business needs, etc. None of them have finished implementing BPM, so I have no a real world reference to know what is such think like. I honestly believe that many of those problems only should need solutions based on development process improvement, better analysis of future needs and better project management skills. Heck, even better programmers and designers. So, my question is: Is BPM really something that can deliver such great value to the typical enterprise line-of-business application and help having less maintenance problems and more flexibility? Or you are just acquiring yet another component that will suffer the same fate and problems as every other piece of software in your platform? In other words, what are BPM products good for? What should an organization have in place before trying to implement a BPM platform in order to succeed?
architecture
bpm
business
null
null
05/06/2012 23:06:12
not constructive
Are BPM solutions worth the investment in money, time and effort? === This is more an architecture related question than a programming one, but I think it might be useful to developers given that I have been wondering this myself for some time. I have no experience with Business Process Management tools use or implementation. (The closest thing I have used is BizTalk server, but I know that it is not really a full BPM product, but a document based integration platform with some process orchestration features). Recently, several of our clients have been asking for BPM-based development projects, and most of the time I discover that some BPM vendor has been giving them some of those 'look how amazing is my product' demos, where they show 'how easily' you can modify your business process flow just by 'dragging and dropping' shapes around and those kind of things. Obviously, vendors don't say anything about **how you first need to have running your well designed processes on the BPM so you can actually make that kind of magic happen**. My clients suddenly see a new light thinking that BPM technology will finally fix the typical problems common to almost any IT department: applications that are hard to maintain, missing deadlines when implementing changes to support new business needs, etc. None of them have finished implementing BPM, so I have no a real world reference to know what is such think like. I honestly believe that many of those problems only should need solutions based on development process improvement, better analysis of future needs and better project management skills. Heck, even better programmers and designers. So, my question is: Is BPM really something that can deliver such great value to the typical enterprise line-of-business application and help having less maintenance problems and more flexibility? Or you are just acquiring yet another component that will suffer the same fate and problems as every other piece of software in your platform? In other words, what are BPM products good for? What should an organization have in place before trying to implement a BPM platform in order to succeed?
4
58,493
09/12/2008 08:18:38
6,042
09/12/2008 03:35:00
6
2
Algorithm to find a common multiplier to convert decimal numbers to whole numbers
I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so they can all be multiplied out to the same scale and be processed by a sealed system that will only deal with whole numbers, then I can retrieve the results and divide them by my the common multiplier to get my relative results. Currently we do a few checks on the numbers and multiply by 100 or 1,000,000, but the processing done by the sealed system can get quite expensive when dealing with large numbers so multiplying everything by a million just for the sake of it isn’t really a great option. What’s the most efficient algorithm to accomplish what I need and is there a mathematical name and/or formula for what I’m need? (I didn’t really know what to put in the subject because I’m unsure if there is a name for what I’m looking for)
algorithm
math
null
null
null
null
open
Algorithm to find a common multiplier to convert decimal numbers to whole numbers === I have an array of numbers that potentially have up to 8 decimal places and I need to find the smallest common number I can multiply them by so that they are all whole numbers. I need this so they can all be multiplied out to the same scale and be processed by a sealed system that will only deal with whole numbers, then I can retrieve the results and divide them by my the common multiplier to get my relative results. Currently we do a few checks on the numbers and multiply by 100 or 1,000,000, but the processing done by the sealed system can get quite expensive when dealing with large numbers so multiplying everything by a million just for the sake of it isn’t really a great option. What’s the most efficient algorithm to accomplish what I need and is there a mathematical name and/or formula for what I’m need? (I didn’t really know what to put in the subject because I’m unsure if there is a name for what I’m looking for)
0
58,510
09/12/2008 08:35:39
2,674
08/24/2008 12:31:39
48
2
In C# how can you find the mime type of a file based on the file signature not the extension.
I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to [this][1] question only in .Net. [1]: http://stackoverflow.com/questions/51438/getting-a-files-mime-type-in-java
c#
mime-types
mime
null
null
null
open
In C# how can you find the mime type of a file based on the file signature not the extension. === I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to [this][1] question only in .Net. [1]: http://stackoverflow.com/questions/51438/getting-a-files-mime-type-in-java
0
58,513
09/12/2008 08:38:29
230
08/03/2008 19:32:46
632
38
Unit testing MVC.net Redirection
How do I Unit Test a MVC redirection? > public ActionResult Create(Product product) > { > > _productTask.Save(product); > > return RedirectToAction("Success"); > > } > > public ActionResult Success() > { > > return View(); > } Is [Ayende's][1] approach still the best way to go, with preview 5: public static void RenderView(this Controller self, string action) { typeof(Controller).GetMethod("RenderView").Invoke(self,new object[] { action} ); } Seems odd to have to do this, especially as the MVC team have said they are writing the framework to be testable. [1]: http://www.ayende.com/Blog/archive/2007/12/13/Dont-like-visibility-levels-change-that.aspx
asp.net
unit-testing
null
null
null
null
open
Unit testing MVC.net Redirection === How do I Unit Test a MVC redirection? > public ActionResult Create(Product product) > { > > _productTask.Save(product); > > return RedirectToAction("Success"); > > } > > public ActionResult Success() > { > > return View(); > } Is [Ayende's][1] approach still the best way to go, with preview 5: public static void RenderView(this Controller self, string action) { typeof(Controller).GetMethod("RenderView").Invoke(self,new object[] { action} ); } Seems odd to have to do this, especially as the MVC team have said they are writing the framework to be testable. [1]: http://www.ayende.com/Blog/archive/2007/12/13/Dont-like-visibility-levels-change-that.aspx
0
58,517
09/12/2008 08:42:07
5,055
09/07/2008 15:43:03
1
2
Combining Enums
Is there a way to combine Enums in VB.net?
vb.net
.net
enum
null
null
null
open
Combining Enums === Is there a way to combine Enums in VB.net?
0
58,520
09/12/2008 08:43:54
5,733
09/11/2008 06:29:13
72
9
Version control of deliverables
We need to regularly synchronize many dozens of binary files (project executables and DLLs) between many developers at several different locations, so that every developer has an up to date environment to build and test at. Due to nature of the project, updates must be done often and on-demand (overnight updates are not sufficient). This is not pretty, but we are stuck with it for a time. We settled on using a regular version (source) control system: put everything into it as binary files, get-latest before testing and check-in updated DLL after testing. It works fine, but a version control client has a lot of features which don't make sense for us and people occasionally get confused. Are there any tools better suited for the task? Or may be a completely different approach?
version-control
deployment
null
null
null
null
open
Version control of deliverables === We need to regularly synchronize many dozens of binary files (project executables and DLLs) between many developers at several different locations, so that every developer has an up to date environment to build and test at. Due to nature of the project, updates must be done often and on-demand (overnight updates are not sufficient). This is not pretty, but we are stuck with it for a time. We settled on using a regular version (source) control system: put everything into it as binary files, get-latest before testing and check-in updated DLL after testing. It works fine, but a version control client has a lot of features which don't make sense for us and people occasionally get confused. Are there any tools better suited for the task? Or may be a completely different approach?
0
58,538
09/12/2008 09:09:47
5,182
09/08/2008 11:20:40
250
10
How do you create an event log source using WiX
I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation. Does anyone know the best way to do this using the WiX framework.
wix
event-log
eventlog-source
null
null
null
open
How do you create an event log source using WiX === I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation. Does anyone know the best way to do this using the WiX framework.
0
58,540
09/12/2008 09:12:56
1,281
08/14/2008 11:19:51
163
7
SSIS Oracle Parameter Mapping
When trying to enter a SQL query with parameters using the Oracle OLE DB provider I get the following error: > Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable. ADDITIONAL INFORMATION: Provider cannot derive parameter information and SetParameterInfo has not been called. (Microsoft OLE DB Provider for Oracle) I have tried following the suggestion here but don't quite understand what is required:[Parameterized queries against Oracle][1] Any ideas? [1]: http://microsoftdw.blogspot.com/2005/11/parameterized-queries-against-oracle.html
oracle
ssis
null
null
null
null
open
SSIS Oracle Parameter Mapping === When trying to enter a SQL query with parameters using the Oracle OLE DB provider I get the following error: > Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable. ADDITIONAL INFORMATION: Provider cannot derive parameter information and SetParameterInfo has not been called. (Microsoft OLE DB Provider for Oracle) I have tried following the suggestion here but don't quite understand what is required:[Parameterized queries against Oracle][1] Any ideas? [1]: http://microsoftdw.blogspot.com/2005/11/parameterized-queries-against-oracle.html
0
58,543
09/12/2008 09:18:11
2,260
08/21/2008 11:39:22
887
72
<iframe> - How to show the whole height of referenced page?
I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an `<iframe>`. Easy: just set `height` and `width` to `100%`! Except, it doesn't work. I did find out about setting `frameborder` to `0`, so it at least *looks* like part of the site, but I'd prefer not to have an ugly scrollbar *inside* a page that allready has one. Do you know of any tricks to do this?
html
iframe
null
null
null
null
open
<iframe> - How to show the whole height of referenced page? === I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an `<iframe>`. Easy: just set `height` and `width` to `100%`! Except, it doesn't work. I did find out about setting `frameborder` to `0`, so it at least *looks* like part of the site, but I'd prefer not to have an ugly scrollbar *inside* a page that allready has one. Do you know of any tricks to do this?
0
58,547
09/12/2008 09:24:49
1,007
08/11/2008 12:50:43
429
18
Painless resource management in java
In C++ we acquiring a resource in a constructor and release it in a destructor. So when an exception rises in a middle of a function there will be no resource leak or locked mutexes or whatever. AFAIK java classes don't have destructors. So how does one do the resource management in Java. For example: public int foo() { Resource f = new Resource(); DoSomething(f); f.Release(); } How can one release resource if DoSomething throws an exception? We can't put try\catch blocks all over the code, can we?
java
resources
null
null
null
null
open
Painless resource management in java === In C++ we acquiring a resource in a constructor and release it in a destructor. So when an exception rises in a middle of a function there will be no resource leak or locked mutexes or whatever. AFAIK java classes don't have destructors. So how does one do the resource management in Java. For example: public int foo() { Resource f = new Resource(); DoSomething(f); f.Release(); } How can one release resource if DoSomething throws an exception? We can't put try\catch blocks all over the code, can we?
0
58,551
09/12/2008 09:27:47
5,736
09/11/2008 07:22:05
1
0
How do I configure Firebug to use Eclipse/Netbeans as editor
I want to use a real IDE for editing javascript files in combination with Firebug. In the 'Add editor' dialog for Firebug I'm allowed to specify executable and arguments. So the question is really how do I open a file in Eclipse/Netbeans from the command line. Extra points for allowing me to choose between opening a new Eclipse/netbeans instance and reusing an already running one.
eclipse
netbeans
firebug
null
null
null
open
How do I configure Firebug to use Eclipse/Netbeans as editor === I want to use a real IDE for editing javascript files in combination with Firebug. In the 'Add editor' dialog for Firebug I'm allowed to specify executable and arguments. So the question is really how do I open a file in Eclipse/Netbeans from the command line. Extra points for allowing me to choose between opening a new Eclipse/netbeans instance and reusing an already running one.
0
58,554
09/12/2008 09:28:55
2,095
08/20/2008 11:01:19
357
18
How to tweak Eclipse CDT's Indexer?
I'm using Eclipse as my IDE for a C++ project, and I would love for it to tell me where a given symbol is defined and what the parameters are for a function. However, there's a catch: I also use [Lazy C++][1], a tool that takes a single source file and generates the .h and the .cpp files. Those .lzz files look like headers, but this tool supports some very mild syntactic benefits, like combining nested namespaces into a qualified name. Additionally, it has some special tags to tell the tool specifically where to put what (in header or in source file). So my typical SourceFile.lzz looks like this: $hdr #include <iosfwd> #include "ProjectA/BaseClass.h" $end $src #include <iostream> #include "ProjectB/OtherClass.h" $end // Forward declarations namespace BigScope::ProjectB { class OtherClass; } namespace BigScope::ProjectA { class MyClass : public ProjectA::BaseClass { void SomeMethod(const ProjectB::OtherClass& Foo) { } } } As you see, it's still recognizable C++, but with a few extras. For some reason, CDT's indexer does not seem to want to index anything, and I don't know what's wrong. In the Indexer View, it shows me an empty tree, but tells me that it has some 15000 symbols and more stuff, none of which I can seem to access. So here's my **question**: how can I make the Indexer output some more information about what it's doing and why it fails when it does so, and can I tweak it more than with just the GUI-accessible options? Thanks, Carl [1]: http://www.lazycplusplus.com/
c++
eclipse
cdt
lazy-c++
indexer
null
open
How to tweak Eclipse CDT's Indexer? === I'm using Eclipse as my IDE for a C++ project, and I would love for it to tell me where a given symbol is defined and what the parameters are for a function. However, there's a catch: I also use [Lazy C++][1], a tool that takes a single source file and generates the .h and the .cpp files. Those .lzz files look like headers, but this tool supports some very mild syntactic benefits, like combining nested namespaces into a qualified name. Additionally, it has some special tags to tell the tool specifically where to put what (in header or in source file). So my typical SourceFile.lzz looks like this: $hdr #include <iosfwd> #include "ProjectA/BaseClass.h" $end $src #include <iostream> #include "ProjectB/OtherClass.h" $end // Forward declarations namespace BigScope::ProjectB { class OtherClass; } namespace BigScope::ProjectA { class MyClass : public ProjectA::BaseClass { void SomeMethod(const ProjectB::OtherClass& Foo) { } } } As you see, it's still recognizable C++, but with a few extras. For some reason, CDT's indexer does not seem to want to index anything, and I don't know what's wrong. In the Indexer View, it shows me an empty tree, but tells me that it has some 15000 symbols and more stuff, none of which I can seem to access. So here's my **question**: how can I make the Indexer output some more information about what it's doing and why it fails when it does so, and can I tweak it more than with just the GUI-accessible options? Thanks, Carl [1]: http://www.lazycplusplus.com/
0
58,556
09/12/2008 09:29:31
4,497
09/04/2008 08:49:10
8
3
Hardware recommendations for Ubuntu XEN server
We're planning to set up a XEN virtualization server using Ubuntu. I'm looking for any recommendations with regard to what to watch out for when buying hardware for the system. The server is going to host 4 or 5 instances of a Linux/Apache/MySQL/J2EE stack. Our Budget ist about 10,000 $ Any advice is greatly appreciated.
xen
linux
hardware
ubuntu
null
null
open
Hardware recommendations for Ubuntu XEN server === We're planning to set up a XEN virtualization server using Ubuntu. I'm looking for any recommendations with regard to what to watch out for when buying hardware for the system. The server is going to host 4 or 5 instances of a Linux/Apache/MySQL/J2EE stack. Our Budget ist about 10,000 $ Any advice is greatly appreciated.
0
58,558
09/12/2008 09:31:40
4,702
09/05/2008 10:14:44
238
8
How do I remotely get a checksum for a file on a Windows machine?
I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content. Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs. For UNIXy servers (and Windows servers with Cygwin), I can just log in over SSH and run `md5sum foo.jar`. Is there a good way to do this on vanilla Windows servers?
windows
java-ee
wmi
checksum
null
null
open
How do I remotely get a checksum for a file on a Windows machine? === I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content. Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs. For UNIXy servers (and Windows servers with Cygwin), I can just log in over SSH and run `md5sum foo.jar`. Is there a good way to do this on vanilla Windows servers?
0
58,564
09/12/2008 09:38:38
6,082
09/12/2008 09:38:38
1
0
core dump files on Linux: how to get info on opened files?
I have a core dump file from a process that has probably a file descriptor leak (it opens files and sockets but apparently sometimes forgets to close some of them). Is there a way to find out which files and sockets the process had opened before crashing? I can't easily reproduce the crash, so analyzing the core file seems to be the only way to get a hint on the bug.
linux
crash
null
null
null
null
open
core dump files on Linux: how to get info on opened files? === I have a core dump file from a process that has probably a file descriptor leak (it opens files and sockets but apparently sometimes forgets to close some of them). Is there a way to find out which files and sockets the process had opened before crashing? I can't easily reproduce the crash, so analyzing the core file seems to be the only way to get a hint on the bug.
0
58,584
09/12/2008 09:56:51
4,639
09/04/2008 23:07:22
135
1
In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text?
Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and delete multiscreen blocks of text or write e.g. three large methods out to another file and then delete them for testing purposes in Vim when using it via putty/ssh where you cannot use the mouse? I can easily yank-to-the-end-of-line or yank-to-the-end-of-code-block but if the text extends over many screens, or has lots of blank lines in it, I feel like my hands are tied in Vim. Any solutions? And a related question: is there a way to somehow select 40 lines, and then comment them all out (with "#" or "//"), as is common in most IDEs?
perl
vim
vi
null
null
null
open
In Vim, what is the best way to select, delete, or comment out large portions of multi-screen text? === Selecting a large amount of text that extends over many screens in an IDE like Eclipse is fairly easy since you can use the mouse, but what is the best way to e.g. select and delete multiscreen blocks of text or write e.g. three large methods out to another file and then delete them for testing purposes in Vim when using it via putty/ssh where you cannot use the mouse? I can easily yank-to-the-end-of-line or yank-to-the-end-of-code-block but if the text extends over many screens, or has lots of blank lines in it, I feel like my hands are tied in Vim. Any solutions? And a related question: is there a way to somehow select 40 lines, and then comment them all out (with "#" or "//"), as is common in most IDEs?
0
58,614
09/12/2008 10:19:53
6,089
09/12/2008 10:19:53
1
0
Measuring stack usage for Linux multi-threaded app
I'm developing a multi-threaded app for a Linux embedded platform. At the moment I'm setting the stack size for each thread (via pthread_set_attr) to a fairly large default value. I would like to fine tune that value for each thread to something smaller to reduce my application's memory usage. I could go through the trial and error route of setting each thread's stack size to progressively smaller values until the program crashed, but the application uses ~15 threads each with completely different functionality/attributes so that approach would be extremely time consuming. I would much rather prefer being able to directly measure each thread's stack usage. Is there some utility people can recommend to do this? (For example, I come from a vxWorks background and using the 'ti' command from the vxWorks shell directly gives stats on the stack usage as well as other useful info on the task status.) Thanks
linux
multithreading
stack
null
null
null
open
Measuring stack usage for Linux multi-threaded app === I'm developing a multi-threaded app for a Linux embedded platform. At the moment I'm setting the stack size for each thread (via pthread_set_attr) to a fairly large default value. I would like to fine tune that value for each thread to something smaller to reduce my application's memory usage. I could go through the trial and error route of setting each thread's stack size to progressively smaller values until the program crashed, but the application uses ~15 threads each with completely different functionality/attributes so that approach would be extremely time consuming. I would much rather prefer being able to directly measure each thread's stack usage. Is there some utility people can recommend to do this? (For example, I come from a vxWorks background and using the 'ti' command from the vxWorks shell directly gives stats on the stack usage as well as other useful info on the task status.) Thanks
0
58,618
09/12/2008 10:23:30
1,008
08/11/2008 12:53:05
192
12
Delphi Network programming
I have a classic client/server (fat client and database) program written in Delphi 2006. When certain conditions are met in the client, I need to notify all the other clients very quickly. Up until now this has been done using UDP broadcasts, but this is no longer viable as clients now connect from outside the LAN and the UDP broadcast is limited to the local network. I'm aware of the Indy libraries but am not really sure of which components to use and how to structure it. I'm guessing I'll need to have a server that the clients connect to which will receive and distribute the messages...? Any samples out there to get me started? Are there any other component sets or technologies I should look at instead/as well?
delphi
network-programming
null
null
null
null
open
Delphi Network programming === I have a classic client/server (fat client and database) program written in Delphi 2006. When certain conditions are met in the client, I need to notify all the other clients very quickly. Up until now this has been done using UDP broadcasts, but this is no longer viable as clients now connect from outside the LAN and the UDP broadcast is limited to the local network. I'm aware of the Indy libraries but am not really sure of which components to use and how to structure it. I'm guessing I'll need to have a server that the clients connect to which will receive and distribute the messages...? Any samples out there to get me started? Are there any other component sets or technologies I should look at instead/as well?
0
58,620
09/12/2008 10:25:32
5,049
09/07/2008 15:03:23
61
7
Default button size?
How do I create a button control (with `CreateWindow` of a `BUTTON` window class) that has a standard system-wide size (especially height) that's consistent with the rest of Windows applications? I should of course take DPI into account and probably other settings. >**Remark:** Using `USE_CW_DEFAULT` for width and height results in a 0, 0 size button, so that's not a solution.
winapi
null
null
null
null
null
open
Default button size? === How do I create a button control (with `CreateWindow` of a `BUTTON` window class) that has a standard system-wide size (especially height) that's consistent with the rest of Windows applications? I should of course take DPI into account and probably other settings. >**Remark:** Using `USE_CW_DEFAULT` for width and height results in a 0, 0 size button, so that's not a solution.
0
58,621
09/12/2008 10:26:31
3,366
08/28/2008 08:58:39
106
1
How do I hash a string with Delphi?
What hash algorithms does Delphi support?
delphi
hash
md5
null
null
null
open
How do I hash a string with Delphi? === What hash algorithms does Delphi support?
0
58,622
09/12/2008 10:26:40
2,077
08/20/2008 07:26:21
372
8
Can I document Python code with doxygen (and does it make sense)?
I like doxygen to create documentation of C or PHP code. I have an upcoming Python project and I think I remember that Python doesn't have /* .. */ comments and also has its own self-documentation facility which seems to be the pythonian way to document. Can I just use doxygen? Anything particular to be aware of? I have done some coding in Python but so far only on small projects where I was to lazy to document at all (yeah, I know ... but let's just pretend that's OK for now).
python
doxygen
null
null
null
null
open
Can I document Python code with doxygen (and does it make sense)? === I like doxygen to create documentation of C or PHP code. I have an upcoming Python project and I think I remember that Python doesn't have /* .. */ comments and also has its own self-documentation facility which seems to be the pythonian way to document. Can I just use doxygen? Anything particular to be aware of? I have done some coding in Python but so far only on small projects where I was to lazy to document at all (yeah, I know ... but let's just pretend that's OK for now).
0
58,630
09/12/2008 10:31:35
475
08/06/2008 07:16:20
509
28
"Quoted-printable line longer than 76 chars" warning when sending HTML E-Mail
I have written some code in my VB.NET application to send an HTML e-mail (in this case, a lost password reminder). When I test the e-mail, it gets eaten by my spam filter. One of the things that it's scoring badly on is because of the following problem: <pre>MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars</pre> I've been through the source of the e-mail, and I've broken each line longer than 76 characters into two lines with a CR+LF in between, but that hasn't fixed the problem. Can anyone point me in the right direction? Thanks!
.net
html
email
null
null
null
open
"Quoted-printable line longer than 76 chars" warning when sending HTML E-Mail === I have written some code in my VB.NET application to send an HTML e-mail (in this case, a lost password reminder). When I test the e-mail, it gets eaten by my spam filter. One of the things that it's scoring badly on is because of the following problem: <pre>MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars</pre> I've been through the source of the e-mail, and I've broken each line longer than 76 characters into two lines with a CR+LF in between, but that hasn't fixed the problem. Can anyone point me in the right direction? Thanks!
0
58,633
09/12/2008 10:34:14
3,634
08/29/2008 16:10:49
41
1
How do I keep RecipientTime when executing MailItem.Move in an Outlook macro?
In an Outlook 2003 macro; Is there a way to move a message between folders without changing the ReceivedTime-header? I currently use the method `MailItem.Move`. But that automatically sets the `ReceivedTime` property to the current time, which isn't really what I want.
vba
outlook
macros
null
null
null
open
How do I keep RecipientTime when executing MailItem.Move in an Outlook macro? === In an Outlook 2003 macro; Is there a way to move a message between folders without changing the ReceivedTime-header? I currently use the method `MailItem.Move`. But that automatically sets the `ReceivedTime` property to the current time, which isn't really what I want.
0
58,638
09/12/2008 10:36:38
5,932
09/11/2008 17:43:38
11
1
How do I convert a set of polygons into a bitmap
How do I take a set of polygons which contain arbitrary values and create a corresponding bitmap where each pixel contains the value of the polygon at that location? To put the question into context, my polygons contain information about the average number of people per square kilometre within the polygon. I need to create a raster/bitmap that contains pixels representing the population in 200 metre bins. I've done something similar in the past where I've used a polygon to create a mask by drawing into a bitmap and filling values, then converting the bitmap into an array that I can manipulate. I'm sure there's a better method for doing this! Thanks Nick
algorithm
gis
null
null
null
null
open
How do I convert a set of polygons into a bitmap === How do I take a set of polygons which contain arbitrary values and create a corresponding bitmap where each pixel contains the value of the polygon at that location? To put the question into context, my polygons contain information about the average number of people per square kilometre within the polygon. I need to create a raster/bitmap that contains pixels representing the population in 200 metre bins. I've done something similar in the past where I've used a polygon to create a mask by drawing into a bitmap and filling values, then converting the bitmap into an array that I can manipulate. I'm sure there's a better method for doing this! Thanks Nick
0
58,649
09/12/2008 10:43:49
6,091
09/12/2008 10:43:48
1
0
How to get the EXIF data from a file using C#
I would like to write a small program in C# which goes through my jpeg photos and, for example, sorts them into dated folders (using MY dating conventions, dammit...). Does anyone know a relatively easy way to get at the EXIF data such as Date And Time or Exposure programatically? Thanks!
c#
exif
photography
null
null
null
open
How to get the EXIF data from a file using C# === I would like to write a small program in C# which goes through my jpeg photos and, for example, sorts them into dated folders (using MY dating conventions, dammit...). Does anyone know a relatively easy way to get at the EXIF data such as Date And Time or Exposure programatically? Thanks!
0
58,670
09/12/2008 10:53:52
3,225
08/27/2008 13:43:05
69
13
Windows CDROM Eject
Does anyone know a method to problematically close the CD tray on Windows 2000 or higher? Open CD tray exists, but I can't seem to make it close especially under W2k. I am especially looking for a method to do this from a batch file, if possible, but API calls would be OK.
winapi
windows
null
null
null
null
open
Windows CDROM Eject === Does anyone know a method to problematically close the CD tray on Windows 2000 or higher? Open CD tray exists, but I can't seem to make it close especially under W2k. I am especially looking for a method to do this from a batch file, if possible, but API calls would be OK.
0
58,671
09/12/2008 10:54:45
1,196
08/13/2008 12:33:04
3,453
243
Example of modern text editor architecutre
I'm looking for design\architectual guidance for modern text editors. *Modern* text editor means that: - It has support for syntax highlighting - It has auto-completion (something like IntelliSense) - It has advanced navigation capabilities (incremental search, etc.) Following properties will be a plus: - Implemented in managed language (Java, any .NET language) - Modular architecutre - Add-in support I'm very interested in *text editor related* design\architecure documents\articles, links to open source projects. I'm **not** interested in general recommendations, OOP/design patterns books advertisement. Currently I'm analyzing [iTextSharp][1] source code. Links to similar projects will be appreciated. [1]: http://itextsharp.sourceforge.ne
design
architecture
text-editor
null
null
null
open
Example of modern text editor architecutre === I'm looking for design\architectual guidance for modern text editors. *Modern* text editor means that: - It has support for syntax highlighting - It has auto-completion (something like IntelliSense) - It has advanced navigation capabilities (incremental search, etc.) Following properties will be a plus: - Implemented in managed language (Java, any .NET language) - Modular architecutre - Add-in support I'm very interested in *text editor related* design\architecure documents\articles, links to open source projects. I'm **not** interested in general recommendations, OOP/design patterns books advertisement. Currently I'm analyzing [iTextSharp][1] source code. Links to similar projects will be appreciated. [1]: http://itextsharp.sourceforge.ne
0
58,679
09/12/2008 10:58:23
994
08/11/2008 12:26:04
21
2
Visual Studio 2008 complains about trusted locations. What to do?
I was messing around with [RhinoMocks](http://www.ayende.com/projects/rhino-mocks.aspx) this morning and couldn't run my tests because RhinoMocks.dll was not in a "trusted location". The assembly is in my c:\documents and settings\<username>\My Documents\Visual Studio 2008\Projects (and so on) folder. What's the deal?
security
assembly
visual-studio
null
null
null
open
Visual Studio 2008 complains about trusted locations. What to do? === I was messing around with [RhinoMocks](http://www.ayende.com/projects/rhino-mocks.aspx) this morning and couldn't run my tests because RhinoMocks.dll was not in a "trusted location". The assembly is in my c:\documents and settings\<username>\My Documents\Visual Studio 2008\Projects (and so on) folder. What's the deal?
0
58,694
09/12/2008 11:05:57
184
08/03/2008 05:34:19
2,389
43
How do I HTML Encode all the output in a web application?
I want to prevent XSS attacks in my web application. I found that HTML Encoding the output can really prevent XSS attacks. Now the problem is that how do I HTML encode every single output in my application? I there a way to automate this? I appreciate answers for JSP, ASP.net and PHP.
asp.net
php
jsp
null
null
null
open
How do I HTML Encode all the output in a web application? === I want to prevent XSS attacks in my web application. I found that HTML Encoding the output can really prevent XSS attacks. Now the problem is that how do I HTML encode every single output in my application? I there a way to automate this? I appreciate answers for JSP, ASP.net and PHP.
0
58,697
09/12/2008 11:07:18
2,757
08/24/2008 21:53:16
834
40
Alternatives to XCopy for copying lots of files?
The situation: I have a pieceofcrapuous laptop. One of the things that make it pieceofcrapuous is that the battery is dead, and the power cable pulls out of the back with little effort. I recently received a non-pieceofcrapuous laptop, and I am in the process of copying everything from old to new. I'm trying to xcopy c:\*.* from the old machine to an external hard drive, but because the cord pulls out so frequently, the xcopy is interrupted fairly often. What I need is a switch in XCopy that will copy eveything except for files that already exist in the destination folder -- the exact opposite of the behavior of the /U switch. Does anyone know of a way to do this?
xcopy
null
null
null
null
07/19/2012 00:12:30
off topic
Alternatives to XCopy for copying lots of files? === The situation: I have a pieceofcrapuous laptop. One of the things that make it pieceofcrapuous is that the battery is dead, and the power cable pulls out of the back with little effort. I recently received a non-pieceofcrapuous laptop, and I am in the process of copying everything from old to new. I'm trying to xcopy c:\*.* from the old machine to an external hard drive, but because the cord pulls out so frequently, the xcopy is interrupted fairly often. What I need is a switch in XCopy that will copy eveything except for files that already exist in the destination folder -- the exact opposite of the behavior of the /U switch. Does anyone know of a way to do this?
2
58,709
09/12/2008 11:17:23
4,164
09/02/2008 08:32:37
1
0
How to log in T-SQL
I'm using ADO.NET to access SQL Server 2005 and would like to be able to log from inside the T-SQL stored procedures that I'm calling. Is that somehow possible?
sql-server
tsql
ado.net
null
null
null
open
How to log in T-SQL === I'm using ADO.NET to access SQL Server 2005 and would like to be able to log from inside the T-SQL stored procedures that I'm calling. Is that somehow possible?
0
58,711
09/12/2008 11:18:04
745
08/08/2008 13:47:26
650
53
How would you design a very "Pythonic" UI framework?
I have been playing with the Ruby library "shoes". Basically you can write a GUI application in the following way: Shoes.app do t = para "Not clicked!" button "The Label" do alert "You clicked the button!" # when clicked, make an alert t.replace "Clicked!" # ..and replace the label's text end end This made me think - how would I design a similarly nice-to-use GUI framework in Python? One that doesn't have the usual tyings of basically being wrappers to a C* library (In the case of GTK, Tk, wx, QT etc etc) Shoes takes things from web devlopment (like `#f0c2f0` style colour notation, CSS layout techniques, like `:margin => 10`), and from ruby (extensively using blocks in sensible ways) Python's lack of "rubyish blocks" makes a (metaphorically)-direct port impossible: def Shoeless(Shoes.app): self.t = para("Not clicked!") def on_click_func(self): alert("You clicked the button!") self.t.replace("clicked!") b = button("The label", click=self.on_click_func) No where near as clean, and wouldn't be *nearly* as flexible, and I'm not even sure if it would be implementable. Any ideas?
python
frameworks
user-interface
null
null
null
open
How would you design a very "Pythonic" UI framework? === I have been playing with the Ruby library "shoes". Basically you can write a GUI application in the following way: Shoes.app do t = para "Not clicked!" button "The Label" do alert "You clicked the button!" # when clicked, make an alert t.replace "Clicked!" # ..and replace the label's text end end This made me think - how would I design a similarly nice-to-use GUI framework in Python? One that doesn't have the usual tyings of basically being wrappers to a C* library (In the case of GTK, Tk, wx, QT etc etc) Shoes takes things from web devlopment (like `#f0c2f0` style colour notation, CSS layout techniques, like `:margin => 10`), and from ruby (extensively using blocks in sensible ways) Python's lack of "rubyish blocks" makes a (metaphorically)-direct port impossible: def Shoeless(Shoes.app): self.t = para("Not clicked!") def on_click_func(self): alert("You clicked the button!") self.t.replace("clicked!") b = button("The label", click=self.on_click_func) No where near as clean, and wouldn't be *nearly* as flexible, and I'm not even sure if it would be implementable. Any ideas?
0
58,730
09/12/2008 11:31:20
3,853
08/31/2008 11:35:10
319
15
Open source PDF library for C/C++ application?
I want to be able to generate PDF ouput from my (native) C++ Windows application. Are there any free/open source libraries available to do this? I looked at the answers to [this question](http://stackoverflow.com/questions/177/how-do-i-programmatically-create-a-pdf-in-my-net-application), but they mostly relate to .Net.
c
c++
pdf
null
null
null
open
Open source PDF library for C/C++ application? === I want to be able to generate PDF ouput from my (native) C++ Windows application. Are there any free/open source libraries available to do this? I looked at the answers to [this question](http://stackoverflow.com/questions/177/how-do-i-programmatically-create-a-pdf-in-my-net-application), but they mostly relate to .Net.
0
58,736
09/12/2008 11:35:22
123
08/02/2008 08:01:26
1,689
92
Good source on internet to read books..
Ofcourse, there are [Google Books][1], [Wikibooks][2], [Project Gutenburg][3] & [iBiblio][4]. What other libraries would you recommend on the internet? [1]: http://books.google.com/ [2]: http://en.wikibooks.org/wiki/Main_Page [3]: http://www.gutenberg.org/wiki/Main_Page [4]: http://www.ibiblio.org/
books
technical
null
null
null
09/24/2011 14:58:17
not constructive
Good source on internet to read books.. === Ofcourse, there are [Google Books][1], [Wikibooks][2], [Project Gutenburg][3] & [iBiblio][4]. What other libraries would you recommend on the internet? [1]: http://books.google.com/ [2]: http://en.wikibooks.org/wiki/Main_Page [3]: http://www.gutenberg.org/wiki/Main_Page [4]: http://www.ibiblio.org/
4
58,739
09/12/2008 11:36:58
5,147
09/08/2008 07:23:50
31
9
Interview questions: WPF Developer
What should every WPF developer know? **Entry Level** - Strong .NET 2.0 Background & willing to learn! - Explain dependency properties? - What's a style? - What's a template? - Differences between base classes: Visual, UIElement, FrameworkElement, Control - Visual vs Logical tree? **Mid-level** - Routed Events & Commands - Binding...? - Explain WPF's 2-pass layout engine? - How to implement a panel? **Senior** - Example of attached behaviour? - What is PRISM,CAL & CAG? - How can worker threads update the UI? Any other "trick" questions to ask?
wpf
interview-questions
null
null
null
11/28/2011 18:39:35
off topic
Interview questions: WPF Developer === What should every WPF developer know? **Entry Level** - Strong .NET 2.0 Background & willing to learn! - Explain dependency properties? - What's a style? - What's a template? - Differences between base classes: Visual, UIElement, FrameworkElement, Control - Visual vs Logical tree? **Mid-level** - Routed Events & Commands - Binding...? - Explain WPF's 2-pass layout engine? - How to implement a panel? **Senior** - Example of attached behaviour? - What is PRISM,CAL & CAG? - How can worker threads update the UI? Any other "trick" questions to ask?
2
58,743
09/12/2008 11:38:18
1,733
08/18/2008 11:22:07
53
11
Databinding an enum property to a ComboBox in WPF
As an example take the following code: public enum ExampleEnum { FooBar, BarFoo } public class ExampleClass : INotifyPropertyChanged { private ExampleEnum example; public ExampleEnum ExampleProperty { get { return example; } { /* set and notify */; } } } I want a to databind the property ExampleProperty to a ComboBox, so that it shows the options "FooBar" and "BarFoo" and works in mode TwoWay. Optimally I want my ComboBox definition to look something like this: <ComboBox ItemsSource="What goes here?" SelectedItem="{Binding Path=ExampleProperty}" /> Currently I have handlers for the ComboBox.SelectionChanged and ExampleClass.PropertyChanged events installed in my Window where do the binding manually. Is there a better or some kind of canonical way? Would you usually use Converters and how would you populate the ComboBox with the right values? I don't even want to get started with i18n right now.
wpf
.net
null
null
null
null
open
Databinding an enum property to a ComboBox in WPF === As an example take the following code: public enum ExampleEnum { FooBar, BarFoo } public class ExampleClass : INotifyPropertyChanged { private ExampleEnum example; public ExampleEnum ExampleProperty { get { return example; } { /* set and notify */; } } } I want a to databind the property ExampleProperty to a ComboBox, so that it shows the options "FooBar" and "BarFoo" and works in mode TwoWay. Optimally I want my ComboBox definition to look something like this: <ComboBox ItemsSource="What goes here?" SelectedItem="{Binding Path=ExampleProperty}" /> Currently I have handlers for the ComboBox.SelectionChanged and ExampleClass.PropertyChanged events installed in my Window where do the binding manually. Is there a better or some kind of canonical way? Would you usually use Converters and how would you populate the ComboBox with the right values? I don't even want to get started with i18n right now.
0
58,744
09/12/2008 11:38:52
905
08/10/2008 09:37:14
4,343
247
Best way to copy the entire contents of a directory in C#
I want to copy the entire contents of a directory from one location to another in C#. There doesn't appear to be a way to do this using `System.IO` classes without lots of recursion. There is a method in VB that we can use if we add a reference to `Microsoft.VisualBasic`: new Microsoft.VisualBasic.Devices.Computer(). FileSystem.CopyDirectory( sourceFolder, outputFolder ); This seems like a rather ugly hack. Is there a better way?
c#
.net
copy
null
null
null
open
Best way to copy the entire contents of a directory in C# === I want to copy the entire contents of a directory from one location to another in C#. There doesn't appear to be a way to do this using `System.IO` classes without lots of recursion. There is a method in VB that we can use if we add a reference to `Microsoft.VisualBasic`: new Microsoft.VisualBasic.Devices.Computer(). FileSystem.CopyDirectory( sourceFolder, outputFolder ); This seems like a rather ugly hack. Is there a better way?
0
58,750
09/12/2008 11:42:11
370,899
08/22/2008 12:32:04
88
8
How do I get raw logs from Google Analytics?
Is it possible to obtain raw logs from Google Analytic? Is there any tool that can generate the raw logs from GA?
google-analytics
null
null
null
null
null
open
How do I get raw logs from Google Analytics? === Is it possible to obtain raw logs from Google Analytic? Is there any tool that can generate the raw logs from GA?
0
58,755
09/12/2008 11:44:14
624
08/07/2008 11:42:08
21
3
What is the best way to do per-user database connections in Rails
What is the best way to do per-user database connections in Rails? I realize this is a poor Rails design practice, but we're gradually replacing an existing web application that uses one database per user. A complete redesign/rewrite is not feasible.
ruby-on-rails
null
null
null
null
null
open
What is the best way to do per-user database connections in Rails === What is the best way to do per-user database connections in Rails? I realize this is a poor Rails design practice, but we're gradually replacing an existing web application that uses one database per user. A complete redesign/rewrite is not feasible.
0
58,757
09/12/2008 11:45:38
6,065
09/12/2008 07:45:05
1
0
Push or Pull for a near real time automation server?
We are currently developing a server whereby a client requests interest in changes to specific data elements and when that data changes the server pushes the data back to the client. There has vigorous debate at work about whether or not it would be better for the client to poll for this data. What is considered to be the ideal method, in terms of performance, scalability and network load, of data transfer in a near real time environment?
performance
automation
networking
null
null
null
open
Push or Pull for a near real time automation server? === We are currently developing a server whereby a client requests interest in changes to specific data elements and when that data changes the server pushes the data back to the client. There has vigorous debate at work about whether or not it would be better for the client to poll for this data. What is considered to be the ideal method, in terms of performance, scalability and network load, of data transfer in a near real time environment?
0
58,768
09/12/2008 11:56:26
4,500
09/04/2008 09:26:22
128
11
SDK for writing DVD's
I need to add DVD writing functionality to an application I'm working on. However it needs to be able to write out files that are being grabbed "live" from a camera, over a long period of time. I can't wait until all the files are captured before I start writing them to the DVD, I need to write them out in chunks as I go along. I've looked at [IMAPI v2][1], but the main problems seems to be that you need to point it to all the files you plan to write out to disk before you start the burning process. I know it has to concept of "sessions", which means you can write to the DVD in several parts, before you finally "close" it. But I was wondering if there were any other DVD writing SDK's that allow you to be constantly writing files to a DVD and in particular files that are only in memory. It would be more efficient if I didn't have to write the captured images out to hard before they are burned to DVD. The solution needs to work under .NET on Windows XP and vista [1]: http://msdn.microsoft.com/en-us/library/aa364806(VS.85).aspx
.net
sdk
image-capture
dvd-burning
null
null
open
SDK for writing DVD's === I need to add DVD writing functionality to an application I'm working on. However it needs to be able to write out files that are being grabbed "live" from a camera, over a long period of time. I can't wait until all the files are captured before I start writing them to the DVD, I need to write them out in chunks as I go along. I've looked at [IMAPI v2][1], but the main problems seems to be that you need to point it to all the files you plan to write out to disk before you start the burning process. I know it has to concept of "sessions", which means you can write to the DVD in several parts, before you finally "close" it. But I was wondering if there were any other DVD writing SDK's that allow you to be constantly writing files to a DVD and in particular files that are only in memory. It would be more efficient if I didn't have to write the captured images out to hard before they are burned to DVD. The solution needs to work under .NET on Windows XP and vista [1]: http://msdn.microsoft.com/en-us/library/aa364806(VS.85).aspx
0
58,774
09/12/2008 11:59:15
6,096
09/12/2008 11:53:03
1
0
How do you pasted multiple tabed lines into Vi
I want paste into a file open in Vi something I have cut from my desktop. But if I paste the tabs embed on top of each other across the page. I think it is some sort of visual mode change but can find the command. thanks
vi
paste
null
null
null
04/05/2012 19:55:00
off topic
How do you pasted multiple tabed lines into Vi === I want paste into a file open in Vi something I have cut from my desktop. But if I paste the tabs embed on top of each other across the page. I think it is some sort of visual mode change but can find the command. thanks
2
58,783
09/12/2008 12:05:01
4,694
09/05/2008 09:30:26
107
9
What tool do you use for counting lines of source code in Visual Studio Projects ?
I know there are quite a few line count tools around. Is there something simple that's not a part some other big package that you use ?
visual-studio
code-analysis
null
null
null
null
open
What tool do you use for counting lines of source code in Visual Studio Projects ? === I know there are quite a few line count tools around. Is there something simple that's not a part some other big package that you use ?
0