question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
33,341
33,365
ASP.Net RadioButton visibility inside a RadioButtonList
Is there a way to hide radio buttons inside a RadioButtonList control programmatically?
Under the hood, you can access the attributes of the item and assign it a CSS style. So you should be able to then programmatically assign it by specifying: RadioButtonList.Items(1).CssClass.Add("visibility", "hidden") and get the job done.
ASP.Net RadioButton visibility inside a RadioButtonList Is there a way to hide radio buttons inside a RadioButtonList control programmatically?
TITLE: ASP.Net RadioButton visibility inside a RadioButtonList QUESTION: Is there a way to hide radio buttons inside a RadioButtonList control programmatically? ANSWER: Under the hood, you can access the attributes of the item and assign it a CSS style. So you should be able to then programmatically assign it by spec...
[ "asp.net", "radio-button", "radiobuttonlist" ]
8
6
16,948
8
0
2008-08-28T20:37:19.067000
2008-08-28T20:52:07.907000
33,347
33,502
About scripting SVG
I'm considering developing a website similar to stackoverflow, but the answers may also consist of drawings (schematics, in this case). I want to have an area in the answer form where they can make this schematic without requiring special plugins, etc. Are we to the point where SVG has or should have critical mass soon...
Unfortunately, I don't have an answer, but I do have three pointers to projects that you could look at. The first is the Lively Kernel by Dan Ingalls (yes, the Dan Ingalls) at Sun Labs. It is an implementation of a Smalltalk Virtual World in JavaScript on top of SVG. More precisely, it is an implementation of the Morph...
About scripting SVG I'm considering developing a website similar to stackoverflow, but the answers may also consist of drawings (schematics, in this case). I want to have an area in the answer form where they can make this schematic without requiring special plugins, etc. Are we to the point where SVG has or should hav...
TITLE: About scripting SVG QUESTION: I'm considering developing a website similar to stackoverflow, but the answers may also consist of drawings (schematics, in this case). I want to have an area in the answer form where they can make this schematic without requiring special plugins, etc. Are we to the point where SVG...
[ "javascript", "ajax", "svg" ]
18
7
8,474
5
0
2008-08-28T20:39:52.290000
2008-08-28T22:00:41.160000
33,390
33,405
Best use pattern for a DataContext
What's the best lifetime model for a DataContext? Should I just create a new one whenever I need it (aka, function level), should I keep one available in each class that would use it (class level), or should I create a static class with a static DataContext (app-domain level)? Are there any considered best practices on...
You pretty much need to keep the same data context available throughout the lifetime of the operations you want to perform if you're ever going to be storing changes which are to be.SubmitChanges() 'd later, as otherwise you will lose those changes. If you're just querying stuff then it's fine to create them as needed,...
Best use pattern for a DataContext What's the best lifetime model for a DataContext? Should I just create a new one whenever I need it (aka, function level), should I keep one available in each class that would use it (class level), or should I create a static class with a static DataContext (app-domain level)? Are the...
TITLE: Best use pattern for a DataContext QUESTION: What's the best lifetime model for a DataContext? Should I just create a new one whenever I need it (aka, function level), should I keep one available in each class that would use it (class level), or should I create a static class with a static DataContext (app-doma...
[ "linq-to-sql", ".net-3.5" ]
3
5
848
2
0
2008-08-28T21:02:15.903000
2008-08-28T21:08:12.470000
33,412
1,088,009
How do you configure HttpOnly cookies in tomcat / java webapps?
After reading Jeff's blog post on Protecting Your Cookies: HttpOnly. I'd like to implement HttpOnly cookies in my web application. How do you tell tomcat to use http only cookies for sessions?
httpOnly is supported as of Tomcat 6.0.19 and Tomcat 5.5.28. See the changelog entry for bug 44382. The last comment for bug 44382 states, "this has been applied to 5.5.x and will be included in 5.5.28 onwards." However, it does not appear that 5.5.28 has been released. The httpOnly functionality can be enabled for all...
How do you configure HttpOnly cookies in tomcat / java webapps? After reading Jeff's blog post on Protecting Your Cookies: HttpOnly. I'd like to implement HttpOnly cookies in my web application. How do you tell tomcat to use http only cookies for sessions?
TITLE: How do you configure HttpOnly cookies in tomcat / java webapps? QUESTION: After reading Jeff's blog post on Protecting Your Cookies: HttpOnly. I'd like to implement HttpOnly cookies in my web application. How do you tell tomcat to use http only cookies for sessions? ANSWER: httpOnly is supported as of Tomcat 6...
[ "java", "security", "cookies", "xss", "httponly" ]
77
66
193,206
10
0
2008-08-28T21:09:30.707000
2009-07-06T16:46:12.847000
33,438
33,516
Using Hibernate to work with Text Files
I am using Hibernate in a Java application to access my Database and it works pretty well with MS-SQL and MySQL. But some of the data I have to show on some forms has to come from Text files, and by Text files I mean Human-Readable files, they can be CSV, Tab-Delimited, or even a key, value pair, per line since my data...
Hibernate is written against the JDBC API. So, you need a JDBC driver that works with the file format you are interested in. Obviously, even for read-only access, this isn't going to perform well, but it might still be useful if that's not a high priority. On a Windows system, you can set up ODBC datasources for delimi...
Using Hibernate to work with Text Files I am using Hibernate in a Java application to access my Database and it works pretty well with MS-SQL and MySQL. But some of the data I have to show on some forms has to come from Text files, and by Text files I mean Human-Readable files, they can be CSV, Tab-Delimited, or even a...
TITLE: Using Hibernate to work with Text Files QUESTION: I am using Hibernate in a Java application to access my Database and it works pretty well with MS-SQL and MySQL. But some of the data I have to show on some forms has to come from Text files, and by Text files I mean Human-Readable files, they can be CSV, Tab-De...
[ "java", "database", "hibernate", "text-files" ]
8
8
8,086
3
0
2008-08-28T21:24:19.780000
2008-08-28T22:07:04.733000
33,457
33,742
SMO and Sql Server 7.0
Does anyone have a definitive answer to whether Sql Server Management Objects is compatible with Sql Server 7.0? The docs state: Because SMO is compatible with SQL Server version 7.0, SQL Server 2000, SQL Server 2005, and SQL Server 2008, you easily manage a multi-version environment. But trying to connect to a Sql 7 i...
you can use SMO to connect to SQL Server versions 7, 2000, and 2005, but SMO does not support databases set to compatibility levels 60, 65, and 70. for SQL Server 7.0 the compatibility level is 70 Obviously this is conflicting information...I assume if your compatibility level of your DB is 70 you can not connect. To c...
SMO and Sql Server 7.0 Does anyone have a definitive answer to whether Sql Server Management Objects is compatible with Sql Server 7.0? The docs state: Because SMO is compatible with SQL Server version 7.0, SQL Server 2000, SQL Server 2005, and SQL Server 2008, you easily manage a multi-version environment. But trying ...
TITLE: SMO and Sql Server 7.0 QUESTION: Does anyone have a definitive answer to whether Sql Server Management Objects is compatible with Sql Server 7.0? The docs state: Because SMO is compatible with SQL Server version 7.0, SQL Server 2000, SQL Server 2005, and SQL Server 2008, you easily manage a multi-version enviro...
[ "sql-server", "smo" ]
0
2
6,879
4
0
2008-08-28T21:36:43.637000
2008-08-29T01:13:36
33,459
33,519
How do you use a flash object as a link?
Is it possible to use a flash document embedded in HTML as a link? I tried just wrapping the object element with an a like this: In Internet Explorer, that made it show the location in the status bar like a link, but it doesn't do anything. I just have the.swf file, so I can't add a click handler in ActionScript.
Though the object really should respond to being wrapped in an a href tag, you could open the swf in vim and just throw in an _root.onPress=function(){getURL("http://yes.no/");}; or if it's AS3, something like _root.addEventHandler(MouseEvent.PRESS, function (e:event) {getURL("http://yes.no/");}); But if editing the sw...
How do you use a flash object as a link? Is it possible to use a flash document embedded in HTML as a link? I tried just wrapping the object element with an a like this: In Internet Explorer, that made it show the location in the status bar like a link, but it doesn't do anything. I just have the.swf file, so I can't a...
TITLE: How do you use a flash object as a link? QUESTION: Is it possible to use a flash document embedded in HTML as a link? I tried just wrapping the object element with an a like this: In Internet Explorer, that made it show the location in the status bar like a link, but it doesn't do anything. I just have the.swf ...
[ "html", "flash" ]
8
1
34,157
4
0
2008-08-28T21:37:13.697000
2008-08-28T22:09:06.130000
33,469
33,795
Caching Patterns in ASP.NET
So I just fixed a bug in a framework I'm developing. The pseudo-pseudocode looks like this: myoldObject = new MyObject { someValue = "old value" }; cache.Insert("myObjectKey", myoldObject); myNewObject = cache.Get("myObjectKey"); myNewObject.someValue = "new value"; if(myObject.someValue!= cache.Get("myObjectKey").some...
Dirty tracking is the normal way to handle this, I think. Something like: class MyObject { public string SomeValue { get { return _someValue; } set { if (value!= SomeValue) { IsDirty = true; _someValue = value; } } public bool IsDirty { get; private set; } void SaveToDatabase() { base.SaveToDatabase(); IsDirty = fals...
Caching Patterns in ASP.NET So I just fixed a bug in a framework I'm developing. The pseudo-pseudocode looks like this: myoldObject = new MyObject { someValue = "old value" }; cache.Insert("myObjectKey", myoldObject); myNewObject = cache.Get("myObjectKey"); myNewObject.someValue = "new value"; if(myObject.someValue!= c...
TITLE: Caching Patterns in ASP.NET QUESTION: So I just fixed a bug in a framework I'm developing. The pseudo-pseudocode looks like this: myoldObject = new MyObject { someValue = "old value" }; cache.Insert("myObjectKey", myoldObject); myNewObject = cache.Get("myObjectKey"); myNewObject.someValue = "new value"; if(myOb...
[ "asp.net", "caching" ]
17
27
4,681
3
0
2008-08-28T21:43:16.163000
2008-08-29T01:51:02.760000
33,471
164,940
Subversion: Fail update when there are conflicts?
Is there a way to tell subversion "update/merge unless it would cause a conflict"? I know you can use --dry-run / status -u to check before running the update, but I often have others running updates and getting broken webpages because they don't notice the "C index.php" line. I've also noticed that svn doesn't seem to...
You can use the --accept parameter to indicate what should happen when a conflict occurs: --accept ARG: specify automatic conflict resolution action ('postpone', 'base', 'mine-full', 'theirs-full', 'edit', 'launch') See also the interactive conflict resolution page in the svnbook
Subversion: Fail update when there are conflicts? Is there a way to tell subversion "update/merge unless it would cause a conflict"? I know you can use --dry-run / status -u to check before running the update, but I often have others running updates and getting broken webpages because they don't notice the "C index.php...
TITLE: Subversion: Fail update when there are conflicts? QUESTION: Is there a way to tell subversion "update/merge unless it would cause a conflict"? I know you can use --dry-run / status -u to check before running the update, but I often have others running updates and getting broken webpages because they don't notic...
[ "svn", "command-line", "merge", "conflict" ]
4
3
1,616
6
0
2008-08-28T21:44:08.593000
2008-10-02T22:46:26.557000
33,475
33,486
ssh hangs when command invoked directly, but exits cleanly when run interactive
I need to launch a server on the remote machine and retrieve the port number that the server process is lsitening on. When invoked, the server will listen on a random port and output the port number on stderr. I want to automate the process of logging on to the remote machine, launching the process, and retrieving the ...
s = p.stderr.readline() I suspect it's the above line. When you invoke a command directly through ssh, you don't get your full pty (assuming Linux), and thus no stderr to read from. When you log in interactively, stdin, stdout, and stderr are set up for you, and so your script works.
ssh hangs when command invoked directly, but exits cleanly when run interactive I need to launch a server on the remote machine and retrieve the port number that the server process is lsitening on. When invoked, the server will listen on a random port and output the port number on stderr. I want to automate the process...
TITLE: ssh hangs when command invoked directly, but exits cleanly when run interactive QUESTION: I need to launch a server on the remote machine and retrieve the port number that the server process is lsitening on. When invoked, the server will listen on a random port and output the port number on stderr. I want to au...
[ "python", "ssh" ]
2
3
3,839
2
0
2008-08-28T21:48:09.363000
2008-08-28T21:53:10.850000
33,476
34,454
JSF Lifecycle and Custom components
There are a couple of things that I am having a difficult time understanding with regards to developing custom components in JSF. For the purposes of these questions, you can assume that all of the custom controls are using valuebindings/expressions (not literal bindings), but I'm interested in explanations on them as ...
There is a pretty good diagram in the JSF specification that shows the request lifecycle - essential for understanding this stuff. The steps are: Restore View. The UIComponent tree is rebuilt. Apply Request Values. Editable components should implement EditableValueHolder. This phase walks the component tree and calls t...
JSF Lifecycle and Custom components There are a couple of things that I am having a difficult time understanding with regards to developing custom components in JSF. For the purposes of these questions, you can assume that all of the custom controls are using valuebindings/expressions (not literal bindings), but I'm in...
TITLE: JSF Lifecycle and Custom components QUESTION: There are a couple of things that I am having a difficult time understanding with regards to developing custom components in JSF. For the purposes of these questions, you can assume that all of the custom controls are using valuebindings/expressions (not literal bin...
[ "java", "jsf", "jakarta-ee", "custom-component" ]
19
20
11,043
4
0
2008-08-28T21:48:57.053000
2008-08-29T15:09:23.110000
33,478
35,561
Can you recommend an ASP.NET control library?
Do you have a good experience with a control library? Something that is kind of robust, well documented, consistent (across different controls) and quite well integrated into the Visual Studio.
I'll second the vote for Telerik. Their controls for the most part "just work" and their support has been excellent. I primarily use their forums and I still receive a response within a day (unlike some other vendors who barely seem to notice that they've even got a forum). It also feels like they've actually spent tim...
Can you recommend an ASP.NET control library? Do you have a good experience with a control library? Something that is kind of robust, well documented, consistent (across different controls) and quite well integrated into the Visual Studio.
TITLE: Can you recommend an ASP.NET control library? QUESTION: Do you have a good experience with a control library? Something that is kind of robust, well documented, consistent (across different controls) and quite well integrated into the Visual Studio. ANSWER: I'll second the vote for Telerik. Their controls for ...
[ "asp.net", "controls" ]
0
3
2,521
7
0
2008-08-28T21:49:51.327000
2008-08-30T01:46:53.403000
33,484
33,981
Can I export translations of place names from freebase.com
So I've looked at this use of the freebase API and I was really impressed with the translations of the name that it found. IE Rome, Roma, Rom, Rzym, Rooma,로마, 罗马市. This is because I have a database of some 5000+ location names and I would very much like all French, German or Korean translations for these English names....
The query [{ limit: 100, type: '/location/location', name: [{ value: null, lang: { name: { value: null, lang: '/lang/en', }, } }], }]; returns for every location and every language, the name of that location in that language. The results are organized by language. For example, here is a very small segment of the return...
Can I export translations of place names from freebase.com So I've looked at this use of the freebase API and I was really impressed with the translations of the name that it found. IE Rome, Roma, Rom, Rzym, Rooma,로마, 罗马市. This is because I have a database of some 5000+ location names and I would very much like all Fre...
TITLE: Can I export translations of place names from freebase.com QUESTION: So I've looked at this use of the freebase API and I was really impressed with the translations of the name that it found. IE Rome, Roma, Rom, Rzym, Rooma,로마, 罗马市. This is because I have a database of some 5000+ location names and I would very...
[ "translation", "freebase" ]
3
4
691
2
0
2008-08-28T21:51:40.480000
2008-08-29T05:01:21.570000
33,485
34,080
ASP.NET vs. Silverlight
I'm starting a new web project and I am considering two presentation frameworks. I am thinking either about ASP.NET MVC or Silverlight. I would tend toward Silverlight since I'm quite experienced.NET developer while I have just a basic knowledge of ASP.NET controls.
It is mainly going to be an iternal product so browsers are not an issue. You still have not written a proper description about the nature of your application. It is difficult to assess which technology is a good fit without first knowing well enough the domain the application is being applied to, and the problems it i...
ASP.NET vs. Silverlight I'm starting a new web project and I am considering two presentation frameworks. I am thinking either about ASP.NET MVC or Silverlight. I would tend toward Silverlight since I'm quite experienced.NET developer while I have just a basic knowledge of ASP.NET controls.
TITLE: ASP.NET vs. Silverlight QUESTION: I'm starting a new web project and I am considering two presentation frameworks. I am thinking either about ASP.NET MVC or Silverlight. I would tend toward Silverlight since I'm quite experienced.NET developer while I have just a basic knowledge of ASP.NET controls. ANSWER: It...
[ "asp.net", "silverlight" ]
22
33
29,927
11
0
2008-08-28T21:51:58.870000
2008-08-29T06:56:58.233000
33,495
33,855
Could you make a case for using Berkeley DB XML
I'm trying to read through the documentation on Berkeley DB XML, and I think I could really use a developer's blog post or synopsis of when they had a problem that found the XML layer atop Berkeley DB was the exact prescription for. Maybe I'm not getting it, but it seems like they're both in-process DBs, and ultimately...
Ultimately I want my data stored in some reasonable format. If that data started as XML and I want to retrieve it/them using XQuery, without the XML layer, I have to write a lot of code to do the XQuery by myself, and perhaps even worse to know my XML well enough to be able to have a reasonable storage system for it. C...
Could you make a case for using Berkeley DB XML I'm trying to read through the documentation on Berkeley DB XML, and I think I could really use a developer's blog post or synopsis of when they had a problem that found the XML layer atop Berkeley DB was the exact prescription for. Maybe I'm not getting it, but it seems ...
TITLE: Could you make a case for using Berkeley DB XML QUESTION: I'm trying to read through the documentation on Berkeley DB XML, and I think I could really use a developer's blog post or synopsis of when they had a problem that found the XML layer atop Berkeley DB was the exact prescription for. Maybe I'm not getting...
[ "berkeley-db", "berkeley-db-xml" ]
3
6
412
1
0
2008-08-28T21:57:24.193000
2008-08-29T02:30:51.150000
33,497
33,564
How do I recover from an unchecked exception?
Unchecked exceptions are alright if you want to handle every failure the same way, for example by logging it and skipping to the next request, displaying a message to the user and handling the next event, etc. If this is my use case, all I have to do is catch some general exception type at a high level in my system, an...
IMO, wrapping exceptions (checked or otherwise) has several benefits that are worth the cost: 1) It encourages you to think about the failure modes for the code you write. Basically, you have to consider the exceptions that the code you call may throw, and in turn you'll consider the exceptions you'll throw for the cod...
How do I recover from an unchecked exception? Unchecked exceptions are alright if you want to handle every failure the same way, for example by logging it and skipping to the next request, displaying a message to the user and handling the next event, etc. If this is my use case, all I have to do is catch some general e...
TITLE: How do I recover from an unchecked exception? QUESTION: Unchecked exceptions are alright if you want to handle every failure the same way, for example by logging it and skipping to the next request, displaying a message to the user and handling the next event, etc. If this is my use case, all I have to do is ca...
[ "c#", "java", "api", "exception" ]
4
15
3,296
9
0
2008-08-28T21:57:40.480000
2008-08-28T22:32:53.390000
33,510
33,580
What is the best approach to both modularity and platform independence?
I hope this question does not come off as broad as it may seem at first. I am designing a software application that I would like to be both cross-platform and modular. I am still in the planning phase and can pick practically any language and toolset. This makes things harder, not easier, because there are seemingly so...
Just to cite an example: for.NET apps there are the CAB (Composite Application Block) and the Composite Application Guidance for WPF. Both are mainly implementations of a set of several design patterns focused on modularity and loose coupling between components similar to a plug-in architecture: you have an IOC framewo...
What is the best approach to both modularity and platform independence? I hope this question does not come off as broad as it may seem at first. I am designing a software application that I would like to be both cross-platform and modular. I am still in the planning phase and can pick practically any language and tools...
TITLE: What is the best approach to both modularity and platform independence? QUESTION: I hope this question does not come off as broad as it may seem at first. I am designing a software application that I would like to be both cross-platform and modular. I am still in the planning phase and can pick practically any ...
[ "compiled", "interpreted-language" ]
1
2
560
6
0
2008-08-28T22:03:58.093000
2008-08-28T22:45:33.983000
33,513
33,528
Should I use a software hosting solution for my personal projects?
Right now, I keep all of my projects on my laptop. I'm thinking that I shouldn't do this, but instead use a version control system and check them in/out from an external hosting repository (Google Code, SourceForge, etc). I see several benefits here - first, I don't have to worry about losing my code if my computer cra...
After losing some freelance work to a hard drive crash, I've become keen on the philosophy that "It doesn't exist until its in source control". As I don't want to necessarily share the source for my projects with the rest of the world, I pay for webhosting (using Dreamhost who have great deals on basic shared hosting a...
Should I use a software hosting solution for my personal projects? Right now, I keep all of my projects on my laptop. I'm thinking that I shouldn't do this, but instead use a version control system and check them in/out from an external hosting repository (Google Code, SourceForge, etc). I see several benefits here - f...
TITLE: Should I use a software hosting solution for my personal projects? QUESTION: Right now, I keep all of my projects on my laptop. I'm thinking that I shouldn't do this, but instead use a version control system and check them in/out from an external hosting repository (Google Code, SourceForge, etc). I see several...
[ "version-control", "projects", "project-hosting" ]
4
4
1,671
10
0
2008-08-28T22:05:04.083000
2008-08-28T22:14:11.643000
33,529
33,541
How exactly do you configure httpOnlyCookies in ASP.NET?
Inspired by this CodingHorror article, " Protecting Your Cookies: HttpOnly " How do you set this property? Somewhere in the web config?
If you're using ASP.NET 2.0 or greater, you can turn it on in the Web.config file. In the section, add the following line:
How exactly do you configure httpOnlyCookies in ASP.NET? Inspired by this CodingHorror article, " Protecting Your Cookies: HttpOnly " How do you set this property? Somewhere in the web config?
TITLE: How exactly do you configure httpOnlyCookies in ASP.NET? QUESTION: Inspired by this CodingHorror article, " Protecting Your Cookies: HttpOnly " How do you set this property? Somewhere in the web config? ANSWER: If you're using ASP.NET 2.0 or greater, you can turn it on in the Web.config file. In the section, a...
[ "asp.net", "cookies", "xss", "httponly" ]
54
76
141,949
4
0
2008-08-28T22:14:16.650000
2008-08-28T22:19:38.587000
33,534
33,563
Extending base classes in Python
I'm trying to extend some "base" classes in Python: class xlist (list): def len(self): return len(self) def add(self, *args): self.extend(args) return None class xint (int): def add(self, value): self += value return self x = xlist([1,2,3]) print x.len() ## >>> 3 ok print x ## >>> [1,2,3] ok x.add (4, 5, 6) print x ...
int is a value type, so each time you do an assignment, (e.g. both instances of += above), it doesn't modify the object you have on the heap, but replaces the reference with one of the result of the right hand side of the assignment (i.e. an int ) list isn't a value type, so it isn't bound by the same rules. this page ...
Extending base classes in Python I'm trying to extend some "base" classes in Python: class xlist (list): def len(self): return len(self) def add(self, *args): self.extend(args) return None class xint (int): def add(self, value): self += value return self x = xlist([1,2,3]) print x.len() ## >>> 3 ok print x ## >>> [1...
TITLE: Extending base classes in Python QUESTION: I'm trying to extend some "base" classes in Python: class xlist (list): def len(self): return len(self) def add(self, *args): self.extend(args) return None class xint (int): def add(self, value): self += value return self x = xlist([1,2,3]) print x.len() ## >>> 3 ok...
[ "python" ]
16
6
24,861
5
0
2008-08-28T22:18:02.740000
2008-08-28T22:32:40.147000
33,545
33,598
Converter for VB.NET Code to Linux Platform Exist?
I am interested in moving a number of my projects from Visual Studio and Access/Office Basic with a SQL back-end to the Linux world. Are there any utilities available to move code over to a similar platform on Linux?
Here's a link to the Mono Migration Analyzer to get started. It will help you pinpoint Microsoft specific calls, but you'll probably have to do the db conversion and data access layer manually. You may be surprised - mono does have a System.Data.SqlClient namespace so you may not have much work to do.
Converter for VB.NET Code to Linux Platform Exist? I am interested in moving a number of my projects from Visual Studio and Access/Office Basic with a SQL back-end to the Linux world. Are there any utilities available to move code over to a similar platform on Linux?
TITLE: Converter for VB.NET Code to Linux Platform Exist? QUESTION: I am interested in moving a number of my projects from Visual Studio and Access/Office Basic with a SQL back-end to the Linux world. Are there any utilities available to move code over to a similar platform on Linux? ANSWER: Here's a link to the Mono...
[ "vb.net", "linux", "ms-access" ]
2
4
1,807
3
0
2008-08-28T22:22:55.973000
2008-08-28T23:01:58.843000
33,559
34,816
How to get started with PowerShell?
I played with one of the early beta versions of PowerShell V1, but haven't used it since it went "gold". What is the best way to get started using PowerShell? Which version of PowerShell should I be using (V1.0 vs 2.0 CTP's)? What are you using PowerShell for? Are there any tools that make using PowerShell easier (that...
For learning PowerShell, there are a number of great resources Technet Virtual Labs ( Introduction to Windows PowerShell ) PowerShellCommunity.org - Forums, blogs, script repository powershell on irc.freenode.net PowerShell podcasts - PowerScripting.net and Get-Scripting.blogspot.com For IDE style environments, you hav...
How to get started with PowerShell? I played with one of the early beta versions of PowerShell V1, but haven't used it since it went "gold". What is the best way to get started using PowerShell? Which version of PowerShell should I be using (V1.0 vs 2.0 CTP's)? What are you using PowerShell for? Are there any tools tha...
TITLE: How to get started with PowerShell? QUESTION: I played with one of the early beta versions of PowerShell V1, but haven't used it since it went "gold". What is the best way to get started using PowerShell? Which version of PowerShell should I be using (V1.0 vs 2.0 CTP's)? What are you using PowerShell for? Are t...
[ "powershell", "scripting" ]
71
50
23,413
15
0
2008-08-28T22:30:54.923000
2008-08-29T17:34:28.750000
33,577
119,595
How do I perform a recursive checkout using ClearCase?
I want to check out all files in all subdirectories of a specified folder. (And it is painful to do this using the GUI, because there is no recursive checkout option).
Beware: ClearCase is File-centric, not repository centric (like SVN or CVS). That means it is rarely a good solution to checkout all files (and it can be fairly long with ClearCase;) ) That being said, the question is perfectly legitimate and I would like to point out another way: open a cleartool session in the 'speci...
How do I perform a recursive checkout using ClearCase? I want to check out all files in all subdirectories of a specified folder. (And it is painful to do this using the GUI, because there is no recursive checkout option).
TITLE: How do I perform a recursive checkout using ClearCase? QUESTION: I want to check out all files in all subdirectories of a specified folder. (And it is painful to do this using the GUI, because there is no recursive checkout option). ANSWER: Beware: ClearCase is File-centric, not repository centric (like SVN or...
[ "version-control", "clearcase" ]
12
24
24,980
2
0
2008-08-28T22:44:22.880000
2008-09-23T07:32:12.160000
33,590
35,019
Drawing a custom label on a pie chart in Yahoo's Flash Library ASTRA
Has anyone looked at Yahoo's ASTRA? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to override the myPieChart.dataTipFunction. For data that looks like: myPieChart.dataProvider = ...
Okay... so no-one's tried Astra, or people just avoid Flash questions. After a lot of guess work it turns out I needed to cast the series to a PieSeries and then work with those member functions, as the ISeries was useless on it's own. myPieChart.dataTipFunction = function (item:Object, index:int, series:ISeries):Strin...
Drawing a custom label on a pie chart in Yahoo's Flash Library ASTRA Has anyone looked at Yahoo's ASTRA? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to override the myPieChart....
TITLE: Drawing a custom label on a pie chart in Yahoo's Flash Library ASTRA QUESTION: Has anyone looked at Yahoo's ASTRA? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to overri...
[ "flash", "actionscript-3", "datatipfunction" ]
1
2
1,788
2
0
2008-08-28T22:54:37.690000
2008-08-29T18:53:02.870000
33,619
33,628
Concurrent logins in a web farm
I'm really asking this by proxy, another team at work has had a change request from our customer. The problem is that our customer doesn't want their employees to login with one user more than one at the same time. That they are getting locked out and sharing logins. Since this is on a web farm, what would be the best ...
You could look at using a distributed cache system like memcached It would solve this problem pretty well (it's MUCH faster than a database), and is also excellent for caching pretty much anything else too
Concurrent logins in a web farm I'm really asking this by proxy, another team at work has had a change request from our customer. The problem is that our customer doesn't want their employees to login with one user more than one at the same time. That they are getting locked out and sharing logins. Since this is on a w...
TITLE: Concurrent logins in a web farm QUESTION: I'm really asking this by proxy, another team at work has had a change request from our customer. The problem is that our customer doesn't want their employees to login with one user more than one at the same time. That they are getting locked out and sharing logins. Si...
[ "asp.net", "authentication" ]
1
7
706
4
0
2008-08-28T23:17:43.017000
2008-08-28T23:22:58.670000
33,630
33,659
What's the maximum amount of RAM I can use in a Windows box?
Obviously, that's 64-bit windows. Also, what's the maximum amount of memory a single 64-bit process can use? I was kind of counting on using it all... (Yes, I know what I'm doing, please don't tell me that if I need that much RAM i must be doing something wrong) Also, is this the same for a.Net 2.0 process? Or is there...
From http://technet.microsoft.com/en-us/library/cc758523.aspx - Windows Server 2003, 64 bit Datacenter Edition supports physical memory up to 512GB A single process should be able to use most of it, some will be used by the OS. The answer from Re0sless is better then mine. The limit is now 2TB, in Datacenter SP2, and 2...
What's the maximum amount of RAM I can use in a Windows box? Obviously, that's 64-bit windows. Also, what's the maximum amount of memory a single 64-bit process can use? I was kind of counting on using it all... (Yes, I know what I'm doing, please don't tell me that if I need that much RAM i must be doing something wro...
TITLE: What's the maximum amount of RAM I can use in a Windows box? QUESTION: Obviously, that's 64-bit windows. Also, what's the maximum amount of memory a single 64-bit process can use? I was kind of counting on using it all... (Yes, I know what I'm doing, please don't tell me that if I need that much RAM i must be d...
[ "windows", "memory", ".net-2.0", "64-bit", "hardware" ]
2
1
4,635
8
0
2008-08-28T23:25:02.783000
2008-08-28T23:40:25.040000
33,637
33,707
How does GPS in a mobile phone work exactly?
I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge?
GPS, the Global Positioning System run by the United States Military, is free for civilian use, though the reality is that we're paying for it with tax dollars. However, GPS on cell phones is a bit more murky. In general, it won't cost you anything to turn on the GPS in your cell phone, but when you get a location it u...
How does GPS in a mobile phone work exactly? I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge?
TITLE: How does GPS in a mobile phone work exactly? QUESTION: I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge? ANSWER: GPS, the Global Positioning System run by the United States Military, is free for civilian use, though the reality is ...
[ "gps", "mobile-phones" ]
33
56
294,920
2
0
2008-08-28T23:29:57.607000
2008-08-29T00:36:44.687000
33,638
33,656
Testing and Managing database versions against code versions
As you develop an application database changes inevitably pop up. The trick I find is keeping your database build in step with your code. In the past I have added a build step that executed SQL scripts against the target database but that is dangerous in so much as you could inadvertanly add bogus data or worse. My que...
Version numbers embedded in the database are helpful. You have two choices, embedding values into a table (allows versioning multiple items) that can be queried, or having an explictly named object (such as a table or somesuch) you can test for. When you release to production, do you have a rollback plan in the event o...
Testing and Managing database versions against code versions As you develop an application database changes inevitably pop up. The trick I find is keeping your database build in step with your code. In the past I have added a build step that executed SQL scripts against the target database but that is dangerous in so m...
TITLE: Testing and Managing database versions against code versions QUESTION: As you develop an application database changes inevitably pop up. The trick I find is keeping your database build in step with your code. In the past I have added a build step that executed SQL scripts against the target database but that is...
[ "database", "version-control", "testing", "build-process" ]
8
3
761
7
0
2008-08-28T23:30:16.780000
2008-08-28T23:38:10.893000
33,664
36,749
Best Practices for Managing Linq to SQL Dbml Files?
I've just started using Linq to SQL, and I'm wondering if anyone has any best practices they can share for managing dbml files. How do you keep them up to date with the database? Do you have a single dbml file for the entire database, or is it split into multiple logical units? How does managing this file work in a tea...
Have you looked at SqlMetal? It's officially supported, although not promoted too much. You can use it to build dbmls from the commandline - we've used it as part of a db's continous integration updates (make sure you have really good code separation if you do this though - partial classes are a saviour - as the dbml w...
Best Practices for Managing Linq to SQL Dbml Files? I've just started using Linq to SQL, and I'm wondering if anyone has any best practices they can share for managing dbml files. How do you keep them up to date with the database? Do you have a single dbml file for the entire database, or is it split into multiple logi...
TITLE: Best Practices for Managing Linq to SQL Dbml Files? QUESTION: I've just started using Linq to SQL, and I'm wondering if anyone has any best practices they can share for managing dbml files. How do you keep them up to date with the database? Do you have a single dbml file for the entire database, or is it split ...
[ "linq-to-sql" ]
33
19
9,042
5
0
2008-08-28T23:42:14.037000
2008-08-31T10:21:21.397000
33,685
39,161
SQL 2000 'TRY CATCH like' Error Handling
This is a sql 2000 database that I am working with. I have what I call a staging table that is a raw data dump of data, so everything is ntext or nvarchar(255). I need to cast/convert all of this data into the appropriate data types (ie int, decimal, nvarchar, etc.) The way I was going to do this was to iterate through...
Generally I don't like "loop through the record" solutions as they tend to be slow and you end up writing a lot of custom code. So... Depending on how many records are in your staging table, you could post process the data with a series of SQL statements that test the columns for correctness and mark any records that f...
SQL 2000 'TRY CATCH like' Error Handling This is a sql 2000 database that I am working with. I have what I call a staging table that is a raw data dump of data, so everything is ntext or nvarchar(255). I need to cast/convert all of this data into the appropriate data types (ie int, decimal, nvarchar, etc.) The way I wa...
TITLE: SQL 2000 'TRY CATCH like' Error Handling QUESTION: This is a sql 2000 database that I am working with. I have what I call a staging table that is a raw data dump of data, so everything is ntext or nvarchar(255). I need to cast/convert all of this data into the appropriate data types (ie int, decimal, nvarchar, ...
[ "sql-server" ]
5
2
8,682
5
0
2008-08-28T23:59:43.790000
2008-09-02T10:12:35.037000
33,696
33,736
Cocoa tips for PHP developers?
I'm a PHP developer, and I use the MVC pattern and object-oriented code. I really want to write applications for the iPhone, but to do that I need to know Cocoa, but to do that I need to know Objective-C 2.0, but to do that I need to know C, and to do that I need to know about compiled languages (versus interpreted). W...
Yes, you're really best off learning C and then Objective-C. There are some resources that will get you over the C and Objective-C language learning curve: Uli Kusterer's online book Masters of the Void Stephen Kochan's book Programming in Objective-C And there are some resources that will get you over the framework le...
Cocoa tips for PHP developers? I'm a PHP developer, and I use the MVC pattern and object-oriented code. I really want to write applications for the iPhone, but to do that I need to know Cocoa, but to do that I need to know Objective-C 2.0, but to do that I need to know C, and to do that I need to know about compiled la...
TITLE: Cocoa tips for PHP developers? QUESTION: I'm a PHP developer, and I use the MVC pattern and object-oriented code. I really want to write applications for the iPhone, but to do that I need to know Cocoa, but to do that I need to know Objective-C 2.0, but to do that I need to know C, and to do that I need to know...
[ "php", "c", "objective-c", "cocoa" ]
4
7
953
6
0
2008-08-29T00:19:55.567000
2008-08-29T01:08:04.703000
33,703
33,780
How can you make a .net windows forms project look fresh?
I'm working on a visual studio 2005 vb.net windows forms project that's been around for several years. It's full of default textboxes, labels, dropdowns, datagrids, datetime pickers -- all the standard stuff. The end result is a very gray, old-looking project. What would be the best approach to making this project look...
I was actually just sprucing up a dialog today. A lot of it depends on what kind of application you have, and what OS it is running on. A couple of these tips will certainly go a long way to jazzing things up. Ensure adequate spacing between controls — don't cram them all together. Space is appealing. You might also tr...
How can you make a .net windows forms project look fresh? I'm working on a visual studio 2005 vb.net windows forms project that's been around for several years. It's full of default textboxes, labels, dropdowns, datagrids, datetime pickers -- all the standard stuff. The end result is a very gray, old-looking project. W...
TITLE: How can you make a .net windows forms project look fresh? QUESTION: I'm working on a visual studio 2005 vb.net windows forms project that's been around for several years. It's full of default textboxes, labels, dropdowns, datagrids, datetime pickers -- all the standard stuff. The end result is a very gray, old-...
[ ".net", "visual-studio", "winforms", "user-interface" ]
34
38
35,923
7
0
2008-08-29T00:30:56.757000
2008-08-29T01:42:16.337000
33,708
33,715
My (Java/Swing) MouseListener isn't listening, help me figure out why
So I've got a JPanel implementing MouseListener and MouseMotionListener: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DisplayArea extends JPanel implements MouseListener, MouseMotionListener { public DisplayArea(Rectangle bounds, Display display) { setLayout(null); setBounds(bounds); ...
The implements mouselistener, mousemotionlistener just allows the displayArea class to listen to some, to be defined, Swing component's mouse events. You have to explicitly define what it should be listening at. So I suppose you could add something like this to the constructor: this.addMouseListener(this); this.addMous...
My (Java/Swing) MouseListener isn't listening, help me figure out why So I've got a JPanel implementing MouseListener and MouseMotionListener: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DisplayArea extends JPanel implements MouseListener, MouseMotionListener { public DisplayArea(Rec...
TITLE: My (Java/Swing) MouseListener isn't listening, help me figure out why QUESTION: So I've got a JPanel implementing MouseListener and MouseMotionListener: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DisplayArea extends JPanel implements MouseListener, MouseMotionListener { publ...
[ "java", "swing", "actionlistener", "mouselistener" ]
6
13
2,488
3
0
2008-08-29T00:37:55.650000
2008-08-29T00:42:33.953000
33,720
33,743
Change templates in Xcode
How would I change the initial templates created by Xcode when creating a new Cocoa Class. I am referring to the comments and class name created when using Xcode's new class wizard.
You wouldn't change the existing templates. In other words, don't modify anything under the /Developer hierarchy (or wherever you installed your developer tools). Instead, clone the templates you want to have customized variants of. Then change their names and the information in them. Finally, put them in the appropria...
Change templates in Xcode How would I change the initial templates created by Xcode when creating a new Cocoa Class. I am referring to the comments and class name created when using Xcode's new class wizard.
TITLE: Change templates in Xcode QUESTION: How would I change the initial templates created by Xcode when creating a new Cocoa Class. I am referring to the comments and class name created when using Xcode's new class wizard. ANSWER: You wouldn't change the existing templates. In other words, don't modify anything und...
[ "xcode", "macos", "templates", "xcode4", "xcode4.5" ]
114
112
53,559
10
0
2008-08-29T00:44:14.307000
2008-08-29T01:14:27.997000
33,727
33,775
CLR Profiler - Attaching to existing process
I would like to use something like CLR Profiles on.Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process). However, the CLR Profiler only lets me START an app, not attach to an existing one. I assume this is because it tracks allocations and GC too, but i'm not ve...
.Net Memory Profiler is exactly what you need. It's not free but there's a trial version. Actually I used the trial to find leaks on our last project. One notable feature is: Easily identify memory leaks by collecting and comparing snapshots of.NET memory I think this is what your looking for.
CLR Profiler - Attaching to existing process I would like to use something like CLR Profiles on.Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process). However, the CLR Profiler only lets me START an app, not attach to an existing one. I assume this is because it ...
TITLE: CLR Profiler - Attaching to existing process QUESTION: I would like to use something like CLR Profiles on.Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process). However, the CLR Profiler only lets me START an app, not attach to an existing one. I assume t...
[ "memory", ".net-2.0", "clr", "profiler" ]
5
3
4,845
2
0
2008-08-29T00:54:44.220000
2008-08-29T01:37:05.943000
33,728
34,056
How should I build a good (web) API
I'm going to build an API for a web app and I'm interested in what people can suggest as good practices. I'm already planning to make it versioned (version 1 can only control certain aspects of the system, version 2 could control more, but this may need a change in the way authentication is performed that would be inco...
Read the RESTful Web Services book, which give you a good overview of how to use REST in practice, and get to up to speed quickly enough to get started now, with some confidence. This is more useful than just looking at an existing API, because it also discusses design choices and trade-offs.
How should I build a good (web) API I'm going to build an API for a web app and I'm interested in what people can suggest as good practices. I'm already planning to make it versioned (version 1 can only control certain aspects of the system, version 2 could control more, but this may need a change in the way authentica...
TITLE: How should I build a good (web) API QUESTION: I'm going to build an API for a web app and I'm interested in what people can suggest as good practices. I'm already planning to make it versioned (version 1 can only control certain aspects of the system, version 2 could control more, but this may need a change in ...
[ "api-design" ]
22
12
2,393
5
0
2008-08-29T00:56:33.903000
2008-08-29T06:30:49.733000
33,745
33,815
WordPress MediaWiki integration
On the other end of the spectrum, I would be happy if I could install a wiki and share the login credentials between WordPress and the wiki. I hacked MediaWiki a while ago to share logins with another site (in ASP Classic ) via session cookies, and it was a pain to do and even worse to maintain. Ideally, I would like t...
The tutorial WordPress, bbPress & MediaWiki should get you on the right track to integrating MediaWiki into your WordPress install. It's certainly going to be a lot easier than hacking WordPress to have wiki features, especially with the sort of granular permissions you're describing.
WordPress MediaWiki integration On the other end of the spectrum, I would be happy if I could install a wiki and share the login credentials between WordPress and the wiki. I hacked MediaWiki a while ago to share logins with another site (in ASP Classic ) via session cookies, and it was a pain to do and even worse to m...
TITLE: WordPress MediaWiki integration QUESTION: On the other end of the spectrum, I would be happy if I could install a wiki and share the login credentials between WordPress and the wiki. I hacked MediaWiki a while ago to share logins with another site (in ASP Classic ) via session cookies, and it was a pain to do a...
[ "php", "mysql", "wordpress", "lamp", "mediawiki" ]
10
9
18,834
6
0
2008-08-29T01:15:24.593000
2008-08-29T02:05:23.613000
33,746
33,757
XML attribute vs XML element
At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file. The sample I came up...
I use this rule of thumb: An Attribute is something that is self-contained, i.e., a color, an ID, a name. An Element is something that does or could have attributes of its own or contain other elements. So yours is close. I would have done something like: EDIT: Updated the original example based on feedback below. some...
XML attribute vs XML element At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the X...
TITLE: XML attribute vs XML element QUESTION: At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the ...
[ "xml", "xsd" ]
272
153
84,307
21
0
2008-08-29T01:15:52.220000
2008-08-29T01:28:13.203000
33,751
33,767
How do I add a MIME type to .htaccess?
I would like to add the following MIME type to a site run by Apache: jnlp application/x-java-jnlp-file That is the Tomcat format. I'm on a shared host, so I can only create an.htaccess file. Would someone please specify the complete contents of such a file?
AddType application/x-java-jnlp-file.jnlp Note that you might not actually be allowed to do that. See also the documentation of the AddType directive and the.htaccess howto.
How do I add a MIME type to .htaccess? I would like to add the following MIME type to a site run by Apache: jnlp application/x-java-jnlp-file That is the Tomcat format. I'm on a shared host, so I can only create an.htaccess file. Would someone please specify the complete contents of such a file?
TITLE: How do I add a MIME type to .htaccess? QUESTION: I would like to add the following MIME type to a site run by Apache: jnlp application/x-java-jnlp-file That is the Tomcat format. I'm on a shared host, so I can only create an.htaccess file. Would someone please specify the complete contents of such a file? ANSW...
[ "java", "apache", ".htaccess", "mime", "jnlp" ]
12
12
8,826
2
0
2008-08-29T01:25:43.897000
2008-08-29T01:33:07.403000
33,761
33,773
How can I retrieve a list of parameters from a stored procedure in SQL Server
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters that belong to a stored procedure on a SQL Server before I actually execute it? I have an a "multi-environment" scenario where there are multiple versions of the same database schema. Examples of environments might be "Development", "St...
You can use SqlCommandBuilder.DeriveParameters() (see SqlCommandBuilder.DeriveParameters - Get Parameter Information for a Stored Procedure - ADO.NET Tutorials ) or there's this way which isn't as elegant.
How can I retrieve a list of parameters from a stored procedure in SQL Server Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters that belong to a stored procedure on a SQL Server before I actually execute it? I have an a "multi-environment" scenario where there are multiple versions of ...
TITLE: How can I retrieve a list of parameters from a stored procedure in SQL Server QUESTION: Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters that belong to a stored procedure on a SQL Server before I actually execute it? I have an a "multi-environment" scenario where there are mul...
[ "c#", "sql-server", "ado.net" ]
16
9
27,961
8
0
2008-08-29T01:31:27.550000
2008-08-29T01:36:27.520000
33,768
67,704
Any advice for speeding up the compile time in Flex Builder 3?
I run Flex Builder 3 on a mac and as my project grows - the compile time gets longer and longer and longer. I am using some SWC's and there is a fair amount of code but it shouldn't take minutes to build and crash daily should it?
In addition to the suggestions already mentioned, close any projects that you have open that you are not using. Rich click on the Project in the Navigator view and select "Close Unrelated Projects". Depending on how many projects you have open, this can lead to a significant improvements in compile time, as well as all...
Any advice for speeding up the compile time in Flex Builder 3? I run Flex Builder 3 on a mac and as my project grows - the compile time gets longer and longer and longer. I am using some SWC's and there is a fair amount of code but it shouldn't take minutes to build and crash daily should it?
TITLE: Any advice for speeding up the compile time in Flex Builder 3? QUESTION: I run Flex Builder 3 on a mac and as my project grows - the compile time gets longer and longer and longer. I am using some SWC's and there is a fair amount of code but it shouldn't take minutes to build and crash daily should it? ANSWER:...
[ "apache-flex", "macos", "flexbuilder", "compilation" ]
12
5
12,669
14
0
2008-08-29T01:34:14
2008-09-15T22:43:19.817000
33,790
33,791
How can I use `scp` to deploy a website's `.htaccess` file?
I am currently using the following command to upload my site content: scp -r web/* user@site.com:site.com/ This works great except that the.htaccess file is not sent. Presumably, this is because it's hidden. I have tried adding a second line to send the file explicitely: scp -r web/.htaccess user@site.com:site.com/.hta...
Just combine the two commands: scp -r web/* web/.htaccess user@site.com:site.com/ If you want 0 entries of your password you can set up public key authentication for ssh/scp.
How can I use `scp` to deploy a website's `.htaccess` file? I am currently using the following command to upload my site content: scp -r web/* user@site.com:site.com/ This works great except that the.htaccess file is not sent. Presumably, this is because it's hidden. I have tried adding a second line to send the file e...
TITLE: How can I use `scp` to deploy a website's `.htaccess` file? QUESTION: I am currently using the following command to upload my site content: scp -r web/* user@site.com:site.com/ This works great except that the.htaccess file is not sent. Presumably, this is because it's hidden. I have tried adding a second line ...
[ ".htaccess", "deployment", "scp", "shared-hosting" ]
4
9
2,756
3
0
2008-08-29T01:44:54.427000
2008-08-29T01:47:21.317000
33,813
36,316
What are some useful TextMate features?
I noticed that many people here use TextMate for coding on OS X. I've recently started using it, and although I like its minimalistic interface, it makes it harder to stumble upon cool features if you don't know what you're looking for. So, what feature have you found most helpful for coding (mainly in Python)? Are the...
Don't neglect the 'mate' command line tool. You can use it to pipe output into TextMate, so if you do the following... diff file1.py file2.py | mate...it will not only open in TextMate, but it is smart enough to know that you're looking at a diff and highlight lines on screen. TextMate's SVN integration is great; it al...
What are some useful TextMate features? I noticed that many people here use TextMate for coding on OS X. I've recently started using it, and although I like its minimalistic interface, it makes it harder to stumble upon cool features if you don't know what you're looking for. So, what feature have you found most helpfu...
TITLE: What are some useful TextMate features? QUESTION: I noticed that many people here use TextMate for coding on OS X. I've recently started using it, and although I like its minimalistic interface, it makes it harder to stumble upon cool features if you don't know what you're looking for. So, what feature have you...
[ "python", "macos", "text-editor", "textmate" ]
21
29
7,429
17
0
2008-08-29T02:03:34.070000
2008-08-30T20:14:02.197000
33,814
34,614
How to determine if an html tag splits across multiple lines
I'm writing a PHP script that involves scraping web pages. Currently, the script analyzes the page line by line, but it breaks if there is a tag that spans multiple lines, like If worse comes to worst, I could possibly preprocess the page by removing all line breaks, then re-inserting them at the closest >, but this se...
Perhaps for future projects I'll use a parsing library, but that's kind of aside from the question at hand. This is my current solution. rstrpos is strpos, but from the reverse direction. Example use: for($i=0; $i And here's that implementation: function rstrpos($string, $charToFind, $relativePos) { $searchPos = $relat...
How to determine if an html tag splits across multiple lines I'm writing a PHP script that involves scraping web pages. Currently, the script analyzes the page line by line, but it breaks if there is a tag that spans multiple lines, like If worse comes to worst, I could possibly preprocess the page by removing all line...
TITLE: How to determine if an html tag splits across multiple lines QUESTION: I'm writing a PHP script that involves scraping web pages. Currently, the script analyzes the page line by line, but it breaks if there is a tag that spans multiple lines, like If worse comes to worst, I could possibly preprocess the page by...
[ "php", "html", "scripting" ]
3
1
1,917
6
0
2008-08-29T02:03:39.017000
2008-08-29T16:20:57.163000
33,822
33,831
Any way to write a Windows .bat file to kill processes?
Every time I turn on my company-owned development machine, I have to kill 10+ processes using the Task Manager or any other process management app just to get decent performance out of my IDE. Yes, these are processes from programs that my company installs on my machine for security and compliance. What I'd like to do ...
You can do this with ' taskkill '. With the /IM parameter, you can specify image names. Example: taskkill /im somecorporateprocess.exe You can also do this to ' force ' kill: Example: taskkill /f /im somecorporateprocess.exe Just add one line per process you want to kill, save it as a.bat file, and add in your startup ...
Any way to write a Windows .bat file to kill processes? Every time I turn on my company-owned development machine, I have to kill 10+ processes using the Task Manager or any other process management app just to get decent performance out of my IDE. Yes, these are processes from programs that my company installs on my m...
TITLE: Any way to write a Windows .bat file to kill processes? QUESTION: Every time I turn on my company-owned development machine, I have to kill 10+ processes using the Task Manager or any other process management app just to get decent performance out of my IDE. Yes, these are processes from programs that my compan...
[ "performance", "batch-file", "process" ]
147
228
435,071
9
0
2008-08-29T02:09:55.960000
2008-08-29T02:14:00.100000
33,829
33,838
How do I detect if a function is available during JNLP execution?
I have an application which really should be installed, but does work fine when deployed using JNLP. However, it would seem that some Java functions such as Runtime.exec don't work using the default security options. I would like to therefore disable UI functionality that relies upon such functions. So my question is, ...
You want to ask to the SecurityManager if you have Exec right with the checkExec method.
How do I detect if a function is available during JNLP execution? I have an application which really should be installed, but does work fine when deployed using JNLP. However, it would seem that some Java functions such as Runtime.exec don't work using the default security options. I would like to therefore disable UI ...
TITLE: How do I detect if a function is available during JNLP execution? QUESTION: I have an application which really should be installed, but does work fine when deployed using JNLP. However, it would seem that some Java functions such as Runtime.exec don't work using the default security options. I would like to the...
[ "java", "security", "deployment", "permissions", "jnlp" ]
0
1
276
3
0
2008-08-29T02:13:17.933000
2008-08-29T02:18:20.883000
33,836
33,862
How can I find the revision history of the file that was deleted and then resubmitted to SVN?
This is a follow on question to " How do I delete 1 file from a revision in SVN? " but because it probably has a very different answer and I believe that others would benefit from knowing the answer. (I don't know the answer yet.) The previous question was answered and I discovered that it is not possible to remove a r...
With a simple svn log -v [folder] you can browse quickly the adding and deletion. ------------------------------------------------------------------------ r14 | kame | 2008-08-29 04:23:43 +0200 (ven., 29 aoû2008) | 1 line Chemins modifié: A /a.txt Readded a -------------------------------------------------------------...
How can I find the revision history of the file that was deleted and then resubmitted to SVN? This is a follow on question to " How do I delete 1 file from a revision in SVN? " but because it probably has a very different answer and I believe that others would benefit from knowing the answer. (I don't know the answer y...
TITLE: How can I find the revision history of the file that was deleted and then resubmitted to SVN? QUESTION: This is a follow on question to " How do I delete 1 file from a revision in SVN? " but because it probably has a very different answer and I believe that others would benefit from knowing the answer. (I don't...
[ "svn" ]
1
2
401
4
0
2008-08-29T02:17:06.800000
2008-08-29T02:33:39.677000
33,837
33,854
IE CSS Bug - How do I maintain a position:absolute when dynamic javascript content on the page changes
I have a page where there is a column and a content div, somewhat like this: blahblahblah With some styling I have an image that is split between the column and the content but needs to maintain the same vertical positioning so that it lines up. Styling is similar to this: #column { width:150px; height:450px; left:-150...
Its a bug in the rendering engine. I run into it all the time. One potential way to solve it is to hide and show the div whenever you change the content (that in turn changes the height): var divCol = document.getElementById('column'); divCol.style.display = 'none'; divCol.style.display = 'block'; Hopefully this happen...
IE CSS Bug - How do I maintain a position:absolute when dynamic javascript content on the page changes I have a page where there is a column and a content div, somewhat like this: blahblahblah With some styling I have an image that is split between the column and the content but needs to maintain the same vertical posi...
TITLE: IE CSS Bug - How do I maintain a position:absolute when dynamic javascript content on the page changes QUESTION: I have a page where there is a column and a content div, somewhat like this: blahblahblah With some styling I have an image that is split between the column and the content but needs to maintain the ...
[ "css", "internet-explorer-6", "internet-explorer-7" ]
2
3
1,440
3
0
2008-08-29T02:17:57.843000
2008-08-29T02:30:41.463000
33,843
33,847
How to avoid pauses when editing code on a network drive?
I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for long periods of time (Eclipse, TextMate). Some editors cope with this a lot b...
Use a source control system — Subversion, Perforce, Git, Mercurial, Bazaar, etc. — so you're never editing code on a shared server. Instead you should be editing a local work area and committing changes to a repository located on the network. Also, convince your company to adapt their policy such that company code is a...
How to avoid pauses when editing code on a network drive? I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for long periods of tim...
TITLE: How to avoid pauses when editing code on a network drive? QUESTION: I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for l...
[ "networking", "text-editor", "textmate", "samba" ]
4
9
807
4
0
2008-08-29T02:22:16.960000
2008-08-29T02:25:17.280000
33,852
34,108
Using Unsigned Primitive Types
Most of time we represent concepts which can never be less than 0. For example to declare length, we write: int length; The name expresses its purpose well but you can assign negative values to it. It seems that for some situations, you can represent your intent more clearly by writing it this way instead: uint length;...
“When in Rome, do as the Romans do.” While there is theoretically an advantage in using unsigned values where applicable because it makes the code more expressive, this is simply not done in C#. I'm not sure why the developers initially didn't design the interfaces to handle uints and make the type CLS compliant but no...
Using Unsigned Primitive Types Most of time we represent concepts which can never be less than 0. For example to declare length, we write: int length; The name expresses its purpose well but you can assign negative values to it. It seems that for some situations, you can represent your intent more clearly by writing it...
TITLE: Using Unsigned Primitive Types QUESTION: Most of time we represent concepts which can never be less than 0. For example to declare length, we write: int length; The name expresses its purpose well but you can assign negative values to it. It seems that for some situations, you can represent your intent more cle...
[ "c#", "primitive-types" ]
7
5
1,010
6
0
2008-08-29T02:28:57.223000
2008-08-29T07:22:37.987000
33,881
316,867
Font rendering for web pages
I always run into the same problem when creating web pages. When I add a font that is larger then about 16-18px it looks terrible. Its jagged, and pixelated. I have tried using different fonts and weights, however I haven't had much luck there. Note: Its only in windows that it is like this. Mainly in Opera and FF also...
There is nothing you can do to force the user to change the way that their operating system renders fonts. If it is that big a deal to you then you can replace the large headings with images, this allows you to control exactly how the font is rendered (and ensures that the heading looks exactly as you wish, even if the...
Font rendering for web pages I always run into the same problem when creating web pages. When I add a font that is larger then about 16-18px it looks terrible. Its jagged, and pixelated. I have tried using different fonts and weights, however I haven't had much luck there. Note: Its only in windows that it is like this...
TITLE: Font rendering for web pages QUESTION: I always run into the same problem when creating web pages. When I add a font that is larger then about 16-18px it looks terrible. Its jagged, and pixelated. I have tried using different fonts and weights, however I haven't had much luck there. Note: Its only in windows th...
[ "fonts", "typography" ]
1
1
788
4
0
2008-08-29T02:44:44.643000
2008-11-25T09:58:42.233000
33,893
33,919
Determining width of a printed string by a webapp
In my (PHP) web app, I have a part of my site that keeps a history of recent searches. The most recent queries get shown in a side box. If the query text is too long, I truncate it and show ellipses. Eg: "My very long query is..." Currently, I truncate after a certain number of characters. Since the font is not monotyp...
Here's another take on it and you don't have to live without the ellipsis! … Some long text which will arbitrarily be cut off at whatever word fits best but will have an ellipsis at the end. … Some more long text which will arbitrarily be cut off at whatever word fits best but will have an ellipsis at the end. … Short ...
Determining width of a printed string by a webapp In my (PHP) web app, I have a part of my site that keeps a history of recent searches. The most recent queries get shown in a side box. If the query text is too long, I truncate it and show ellipses. Eg: "My very long query is..." Currently, I truncate after a certain n...
TITLE: Determining width of a printed string by a webapp QUESTION: In my (PHP) web app, I have a part of my site that keeps a history of recent searches. The most recent queries get shown in a side box. If the query text is too long, I truncate it and show ellipses. Eg: "My very long query is..." Currently, I truncate...
[ "php", "javascript", "css" ]
10
9
861
5
0
2008-08-29T02:53:44.717000
2008-08-29T03:43:14.737000
33,901
33,916
Best iCalendar library for Java?
I'm looking for a library to handle iCalendar data in Java. Open source, well-documented implementations with a good object model are preferred. iCal parsing capabilities are less important to me, but still nice to have. Does anyone have any recommendations?
I had limited success with iCal4j ( intro ) on a project last year. It seems to be a fairly popular choice for ical work in the java community. If I remember correctly the API can be slightly confusing at first glance. However It's pretty solid in the long run. Good luck, Brian
Best iCalendar library for Java? I'm looking for a library to handle iCalendar data in Java. Open source, well-documented implementations with a good object model are preferred. iCal parsing capabilities are less important to me, but still nice to have. Does anyone have any recommendations?
TITLE: Best iCalendar library for Java? QUESTION: I'm looking for a library to handle iCalendar data in Java. Open source, well-documented implementations with a good object model are preferred. iCal parsing capabilities are less important to me, but still nice to have. Does anyone have any recommendations? ANSWER: I...
[ "java", "icalendar" ]
66
52
47,877
2
0
2008-08-29T03:06:08.447000
2008-08-29T03:33:26.103000
33,909
33,913
Ribbon Toolbar and Visual Studio 2008 Service Pack 1
Today I was listening to the Hanselminutes show about.NET 3.5 SP1...What's inside, and they twice mentioned the Office 2007-like Ribbon control that is included in Visual Studio 2008 Service Pack 1. I am very interested about this, as I was previously looking at purchasing this from a 3rd party vendor (likely DevCompon...
Yeah I did a double-take when I heard them say that too. The ribbon control, along with a DatePicker and DataGrid, are being developed out of band over here on CodePlex. I'm not sure why Carl and Scott were suggesting that it was part of the SP1 release. Vincent Sibal posts about DataGrid (which is available already in...
Ribbon Toolbar and Visual Studio 2008 Service Pack 1 Today I was listening to the Hanselminutes show about.NET 3.5 SP1...What's inside, and they twice mentioned the Office 2007-like Ribbon control that is included in Visual Studio 2008 Service Pack 1. I am very interested about this, as I was previously looking at purc...
TITLE: Ribbon Toolbar and Visual Studio 2008 Service Pack 1 QUESTION: Today I was listening to the Hanselminutes show about.NET 3.5 SP1...What's inside, and they twice mentioned the Office 2007-like Ribbon control that is included in Visual Studio 2008 Service Pack 1. I am very interested about this, as I was previous...
[ "wpf", "visual-studio-2008", "user-interface", ".net-3.5", "ribbon" ]
6
4
11,022
4
0
2008-08-29T03:16:22.553000
2008-08-29T03:19:42.343000
33,923
37,010
What is tail recursion?
Whilst starting to learn lisp, I've come across the term tail-recursive. What does it mean exactly?
Consider a simple function that adds the first N natural numbers. (e.g. sum(5) = 0 + 1 + 2 + 3 + 4 + 5 = 15 ). Here is a simple JavaScript implementation that uses recursion: function recsum(x) { if (x === 0) { return 0; } else { return x + recsum(x - 1); } } If you called recsum(5), this is what the JavaScript interpr...
What is tail recursion? Whilst starting to learn lisp, I've come across the term tail-recursive. What does it mean exactly?
TITLE: What is tail recursion? QUESTION: Whilst starting to learn lisp, I've come across the term tail-recursive. What does it mean exactly? ANSWER: Consider a simple function that adds the first N natural numbers. (e.g. sum(5) = 0 + 1 + 2 + 3 + 4 + 5 = 15 ). Here is a simple JavaScript implementation that uses recur...
[ "algorithm", "language-agnostic", "functional-programming", "recursion", "tail-recursion" ]
2,052
2,077
612,458
29
0
2008-08-29T03:48:03.790000
2008-08-31T18:21:13.897000
33,937
33,944
How to handle variable width FieldObjects in Crystal Reports
I have a Crystal Report which is viewed via a CrystalReportViewer control on an.aspx page (using VS2008). The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same line beside each other. Problem is when the text in the first FieldObject is too ...
you can add a text object to the report. And while editing the text of the text object, drag the field you want to show from the object explorer into the text box. Then hit space, then drag the second field in to the same text box. Your two fields will always be one space a part. You could, of course, add more spaces o...
How to handle variable width FieldObjects in Crystal Reports I have a Crystal Report which is viewed via a CrystalReportViewer control on an.aspx page (using VS2008). The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same line beside each oth...
TITLE: How to handle variable width FieldObjects in Crystal Reports QUESTION: I have a Crystal Report which is viewed via a CrystalReportViewer control on an.aspx page (using VS2008). The report has two data-driven FieldObjects (which can contain a variable number of chars) which I would like to display on the same li...
[ "crystal-reports" ]
3
5
3,076
2
0
2008-08-29T04:00:20.920000
2008-08-29T04:07:39.623000
33,949
33,963
Convert Web.config from .NET 2.0 to 3.5
What is the minimum I need to add to a.NET 2.0 WebSite's web.config to make it.NET 3.5? Visual Studio adds all the config sections and script handlers, but if you aren't using those are they are really necessary? Is there a command line tool to "upgrade" a.NET 2.0 web.config to 3.5?
There is a good description of the 3.5 web.config available here: https://web.archive.org/web/20211020153237/https://www.4guysfromrolla.com/articles/121207-1.aspx The assemblies and config sections are important because they tell the runtime to use the new 3.5 dlls instead of the 2.0 dlls The codedom section tells the ...
Convert Web.config from .NET 2.0 to 3.5 What is the minimum I need to add to a.NET 2.0 WebSite's web.config to make it.NET 3.5? Visual Studio adds all the config sections and script handlers, but if you aren't using those are they are really necessary? Is there a command line tool to "upgrade" a.NET 2.0 web.config to 3...
TITLE: Convert Web.config from .NET 2.0 to 3.5 QUESTION: What is the minimum I need to add to a.NET 2.0 WebSite's web.config to make it.NET 3.5? Visual Studio adds all the config sections and script handlers, but if you aren't using those are they are really necessary? Is there a command line tool to "upgrade" a.NET 2...
[ ".net", "asp.net", "configuration", "migration" ]
6
9
17,651
4
0
2008-08-29T04:15:24.190000
2008-08-29T04:36:43.890000
33,955
33,982
NHibernate SetTimeout on ICriteria
Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface uses? Is it milliseconds, seconds, minutes or other?
A little bit of poking around suggests that it could be seconds: Assuming that ICriteria is the same as the Criteria interface in Hibernate core, then the JavaDoc for org.hibernate.Criteria provides a hint - the "see also" link to java.sql.Statement.setQueryTimeout(). The latter refers to its timeout parameter as secon...
NHibernate SetTimeout on ICriteria Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface uses? Is it milliseconds, seconds, minutes or other?
TITLE: NHibernate SetTimeout on ICriteria QUESTION: Could someone tell me what the units the SetTimeout(int) method in the ICriteria interface uses? Is it milliseconds, seconds, minutes or other? ANSWER: A little bit of poking around suggests that it could be seconds: Assuming that ICriteria is the same as the Criter...
[ "nhibernate" ]
25
28
10,008
2
0
2008-08-29T04:25:18.893000
2008-08-29T05:01:57.170000
33,960
33,967
How do you get the ethernet address using Java?
I would like to retrieve the ethernet address of the network interface that is used to access a particular website. How can this be done in Java? Solution Note that the accepted solution of getHardwareAddress is only available in Java 6. There does not seem to be a solution for Java 5 aside from executing i(f|p)confing...
java.net.NetworkInterface.getHardwareAddress (method added in Java 6) It has to be called on the machine you are interested in - the MAC is not transferred across network boundaries (i.e. LAN and WAN). If you want to make use of it on a website server to interrogate the clients, you'd have to run an applet that would r...
How do you get the ethernet address using Java? I would like to retrieve the ethernet address of the network interface that is used to access a particular website. How can this be done in Java? Solution Note that the accepted solution of getHardwareAddress is only available in Java 6. There does not seem to be a soluti...
TITLE: How do you get the ethernet address using Java? QUESTION: I would like to retrieve the ethernet address of the network interface that is used to access a particular website. How can this be done in Java? Solution Note that the accepted solution of getHardwareAddress is only available in Java 6. There does not s...
[ "java", "networking", "ethernet" ]
21
18
5,231
3
0
2008-08-29T04:31:24.667000
2008-08-29T04:48:46.717000
33,969
1,318,059
Best way to implement request throttling in ASP.NET MVC?
We're experimenting with various ways to throttle user actions in a given time period: Limit question/answer posts Limit edits Limit feed retrievals For the time being, we're using the Cache to simply insert a record of user activity - if that record exists if/when the user does the same activity, we throttle. Using th...
Here's a generic version of what we've been using on Stack Overflow for the past year: /// /// Decorates any MVC route that needs to have client requests limited by time. /// /// /// Uses the current System.Web.Caching.Cache to store each client request to the decorated route. /// [AttributeUsage(AttributeTargets.Metho...
Best way to implement request throttling in ASP.NET MVC? We're experimenting with various ways to throttle user actions in a given time period: Limit question/answer posts Limit edits Limit feed retrievals For the time being, we're using the Cache to simply insert a record of user activity - if that record exists if/wh...
TITLE: Best way to implement request throttling in ASP.NET MVC? QUESTION: We're experimenting with various ways to throttle user actions in a given time period: Limit question/answer posts Limit edits Limit feed retrievals For the time being, we're using the Cache to simply insert a record of user activity - if that r...
[ "asp.net-mvc", "throttling" ]
229
259
66,255
6
0
2008-08-29T04:50:50.410000
2009-08-23T08:21:56.053000
33,971
33,983
Standardised text editing behaviour across Mac applications
I've switched over to a Mac recently and, although things have been going quite well, the very different text-editing behaviours across applications is driving me insane. Home, End, Page Up, Page Down, Apple-arrow, Ctrl-arrow, alt-arrow etc. quite often do different things depending on the application. Is there a way t...
There are standards, but they are not based around what you're used to from windows. It drove me mad until I got over myself and decided to learn what the actual standards were. Since then I've been sold. The ones I use: Command - Left / Right - Jump to start/end of line Can also do this with ctrl - a / e which is grea...
Standardised text editing behaviour across Mac applications I've switched over to a Mac recently and, although things have been going quite well, the very different text-editing behaviours across applications is driving me insane. Home, End, Page Up, Page Down, Apple-arrow, Ctrl-arrow, alt-arrow etc. quite often do dif...
TITLE: Standardised text editing behaviour across Mac applications QUESTION: I've switched over to a Mac recently and, although things have been going quite well, the very different text-editing behaviours across applications is driving me insane. Home, End, Page Up, Page Down, Apple-arrow, Ctrl-arrow, alt-arrow etc. ...
[ "macos", "keyboard-shortcuts" ]
3
6
206
2
0
2008-08-29T04:52:38.267000
2008-08-29T05:06:09.687000
33,973
33,984
How do I efficiently keep track of the smallest element in a collection?
In the vein of programming questions: suppose there's a collection of objects that can be compared to each other and sorted. What's the most efficient way to keep track of the smallest element in the collection as objects are added and the current smallest occasionally removed?
Using a min-heap is the best way. http://en.wikipedia.org/wiki/Heap_(data_structure) It is tailor made for this application.
How do I efficiently keep track of the smallest element in a collection? In the vein of programming questions: suppose there's a collection of objects that can be compared to each other and sorted. What's the most efficient way to keep track of the smallest element in the collection as objects are added and the current...
TITLE: How do I efficiently keep track of the smallest element in a collection? QUESTION: In the vein of programming questions: suppose there's a collection of objects that can be compared to each other and sorted. What's the most efficient way to keep track of the smallest element in the collection as objects are add...
[ "data-structures", "collections" ]
4
6
1,693
7
0
2008-08-29T04:54:09.247000
2008-08-29T05:07:49.027000
33,976
34,169
Microsoft Office 2007 automated installation - editing the config.xml file
I'm creating an automated installation of Office 2007. To customise your Office 2007 installation the Office Customization Tool (OCT) does most of the work for you. One the OCT's features is the ability to run additional programs during the Office installation. However it is pretty poor at it. Fortunately by editing th...
In standard XML you embed quotes in attribute values using ", &34; or . See the page on Wikipedia for a list of XML entity references. I don't know if this will solve your problem, but seeing as it is an XML parser error it should.
Microsoft Office 2007 automated installation - editing the config.xml file I'm creating an automated installation of Office 2007. To customise your Office 2007 installation the Office Customization Tool (OCT) does most of the work for you. One the OCT's features is the ability to run additional programs during the Offi...
TITLE: Microsoft Office 2007 automated installation - editing the config.xml file QUESTION: I'm creating an automated installation of Office 2007. To customise your Office 2007 installation the Office Customization Tool (OCT) does most of the work for you. One the OCT's features is the ability to run additional progra...
[ "xml", "installation", "packaging", "office-2007" ]
3
2
6,060
1
0
2008-08-29T04:57:32.547000
2008-08-29T08:14:32.870000
33,978
35,645
Find out how much memory is being used by an object in Python
How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want.
There's no easy way to find out the memory size of a python object. One of the problems you may find is that Python objects - like lists and dicts - may have references to other python objects (in this case, what would your size be? The size containing the size of each object or not?). There are some pointers overhead ...
Find out how much memory is being used by an object in Python How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want.
TITLE: Find out how much memory is being used by an object in Python QUESTION: How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want. ANSWER...
[ "python", "performance", "memory-profiling" ]
317
163
290,204
5
0
2008-08-29T04:59:31.200000
2008-08-30T03:25:43.557000
33,990
34,074
Can't create a subversion repository with Eclipse 3.4.0, svn 1.5.1
I'm working on mac OS x 10.4. I have a subversion repository stored on an external drive connected via USB. I created a new python project in Eclipse (using the PyDev plugin). When I use right click Team->Share Project to set up a new project with subversion, I get the following error: Error while creating module: org....
Try adding the repository first using the "SVN Repository Exploring" perspective (Window > Open Perspective > Other... > SVN Repository Exploring). Make sure that the URL you are using points to the correct directory, which typically contains these default repository files: conf/ dav/ db/ format hooks/ locks/ README.tx...
Can't create a subversion repository with Eclipse 3.4.0, svn 1.5.1 I'm working on mac OS x 10.4. I have a subversion repository stored on an external drive connected via USB. I created a new python project in Eclipse (using the PyDev plugin). When I use right click Team->Share Project to set up a new project with subve...
TITLE: Can't create a subversion repository with Eclipse 3.4.0, svn 1.5.1 QUESTION: I'm working on mac OS x 10.4. I have a subversion repository stored on an external drive connected via USB. I created a new python project in Eclipse (using the PyDev plugin). When I use right click Team->Share Project to set up a new ...
[ "eclipse", "svn", "macos" ]
4
2
5,726
1
0
2008-08-29T05:12:07.613000
2008-08-29T06:51:48.077000
34,009
34,035
Tool for querying databases
I want to query a number of different databases mainly Oracle and Informix. Can anyone suggest me some tool using which I can do this easily?
Try WinSQL lite at http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp. It is absolutely free and does not expire. It is only one file and does not come with any bulky DLLs. If you don't like it, simply delete the file from your hard drive. An introduction about how to use it against an informix database can be foun...
Tool for querying databases I want to query a number of different databases mainly Oracle and Informix. Can anyone suggest me some tool using which I can do this easily?
TITLE: Tool for querying databases QUESTION: I want to query a number of different databases mainly Oracle and Informix. Can anyone suggest me some tool using which I can do this easily? ANSWER: Try WinSQL lite at http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp. It is absolutely free and does not expire. It is...
[ "database" ]
0
5
1,129
12
0
2008-08-29T05:31:38.767000
2008-08-29T06:05:58.980000
34,015
34,054
php scripts writing to non-world-writable files
How can you allow a PHP script to write to a file with high-security restrictions, such as only allowing a single user to write to it? The difficulty seems to be that a PHP script is running as a low-permissions user (maybe apache, or www, or nobody?), and even if I chown apache the_writable_file, the directory it's in...
Unfortunately, in shared hosts that use mod_php, there is no way to restrict access to secure files to your web app and login user. The solution is to run your web app as your login user. When you do that, UNIX file permissions can correctly lock everyone else out. There are several ways to implement that, including Su...
php scripts writing to non-world-writable files How can you allow a PHP script to write to a file with high-security restrictions, such as only allowing a single user to write to it? The difficulty seems to be that a PHP script is running as a low-permissions user (maybe apache, or www, or nobody?), and even if I chown...
TITLE: php scripts writing to non-world-writable files QUESTION: How can you allow a PHP script to write to a file with high-security restrictions, such as only allowing a single user to write to it? The difficulty seems to be that a PHP script is running as a low-permissions user (maybe apache, or www, or nobody?), a...
[ "php", "permissions" ]
2
2
925
3
0
2008-08-29T05:36:19.333000
2008-08-29T06:29:43.977000
34,019
34,091
Install the Radrails plugin for Aptana Studio offline
I downloaded and installed the Aptana Studio free version. But apparently, to install the Radrails plugin for ruby on rails development you have to connect to the internet. I don't have internet on my machine right now. So is there a way I could download the installer from another machine and copy it over my existing A...
I wrote down my duel with Aptana Rails - See if this helps you. There is a link on manual installation that may be what you're looking for.
Install the Radrails plugin for Aptana Studio offline I downloaded and installed the Aptana Studio free version. But apparently, to install the Radrails plugin for ruby on rails development you have to connect to the internet. I don't have internet on my machine right now. So is there a way I could download the install...
TITLE: Install the Radrails plugin for Aptana Studio offline QUESTION: I downloaded and installed the Aptana Studio free version. But apparently, to install the Radrails plugin for ruby on rails development you have to connect to the internet. I don't have internet on my machine right now. So is there a way I could do...
[ "ruby-on-rails", "aptana", "radrails" ]
4
3
5,484
2
0
2008-08-29T05:43:06.273000
2008-08-29T07:09:27.317000
34,020
34,060
Are Python threads buggy?
A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor?
Python threads are good for concurrent I/O programming. Threads are swapped out of the CPU as soon as they block waiting for input from file, network, etc. This allows other Python threads to use the CPU while others wait. This would allow you to write a multi-threaded web server or web crawler, for example. However, P...
Are Python threads buggy? A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor?
TITLE: Are Python threads buggy? QUESTION: A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor? ANSWER: Python threads are good for concurrent I/O programming. Threads are swapped out of the CPU as s...
[ "python", "multithreading" ]
28
58
12,612
6
0
2008-08-29T05:43:16.960000
2008-08-29T06:33:54.780000
34,023
34,052
How to embed control change commands inside of a MIDI file
I am making a simple game in order to learn a new language. I am in the process of collecting some music for the game and would like to use the MIDI format so that I can control the flow of the track (i.e., I would like to have an introduction that only plays once and does not play again when the song loops.) I am havi...
DirectMusicProducer is probably your best free option if you are playing using DirectMusic. I don't believe the MIDI record feature will include control changes, but your engine may support playing segment files which are much more flexible. The only MIDI sequencer I use cost around $300 (USD) about 10 years ago (and n...
How to embed control change commands inside of a MIDI file I am making a simple game in order to learn a new language. I am in the process of collecting some music for the game and would like to use the MIDI format so that I can control the flow of the track (i.e., I would like to have an introduction that only plays o...
TITLE: How to embed control change commands inside of a MIDI file QUESTION: I am making a simple game in order to learn a new language. I am in the process of collecting some music for the game and would like to use the MIDI format so that I can control the flow of the track (i.e., I would like to have an introduction...
[ "midi" ]
1
2
989
3
0
2008-08-29T05:49:05.840000
2008-08-29T06:25:28.043000
34,059
34,152
What is the difference between Build Solution and Batch Build in Visual Studio 2008?
What is the difference between Build Solution and Batch Build in Visual Studio 2008?
The key point which seems to be missed in both the existing answers is that batch build allows you to build multiple configurations of each project (e.g. you can build debug and release configurations with a single operation). With a normal build, you have to use the configuration manager to select just one configurati...
What is the difference between Build Solution and Batch Build in Visual Studio 2008? What is the difference between Build Solution and Batch Build in Visual Studio 2008?
TITLE: What is the difference between Build Solution and Batch Build in Visual Studio 2008? QUESTION: What is the difference between Build Solution and Batch Build in Visual Studio 2008? ANSWER: The key point which seems to be missed in both the existing answers is that batch build allows you to build multiple config...
[ "visual-studio", "build" ]
15
23
19,830
5
0
2008-08-29T06:33:28.930000
2008-08-29T08:02:08.937000
34,065
35,717
How to read a value from the Windows registry
Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I: Safely determine that such a key exists. Programmatically (i.e. with code) get its value. I have absolutely no intention of writing anything back to the registry (for the duration of my career if I can help it). So we can skip...
Here is some pseudo-code to retrieve the following: If a registry key exists What the default value is for that registry key What a string value is What a DWORD value is Example code: Include the library dependency: Advapi32.lib HKEY hKey; LONG lRes = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Perl", 0, KEY_READ, &h...
How to read a value from the Windows registry Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I: Safely determine that such a key exists. Programmatically (i.e. with code) get its value. I have absolutely no intention of writing anything back to the registry (for the duration ...
TITLE: How to read a value from the Windows registry QUESTION: Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I: Safely determine that such a key exists. Programmatically (i.e. with code) get its value. I have absolutely no intention of writing anything back to the registry ...
[ "c++", "windows", "winapi", "registry" ]
104
84
186,467
8
0
2008-08-29T06:40:21.333000
2008-08-30T05:51:31.757000
34,076
34,096
Checking if userinput is a valid URI in XUL
Is there a built-in function/method that can check if a given string is a valid URI or not in the Mozilla XUL toolkit? I have looked for one but found none, but since this is my first time using XUL and its documentation it could be that I just overlooked it. So I'm just making sure before I start writing my own IsVali...
The nsIIOService.newURI(...) method is what you're looking for. It throws NS_ERROR_MALFORMED_URI if the URI string is invalid. Example: try { var ioServ = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var uriObj = ioServ.newURI(uriString, uriCharset, baseURI); }...
Checking if userinput is a valid URI in XUL Is there a built-in function/method that can check if a given string is a valid URI or not in the Mozilla XUL toolkit? I have looked for one but found none, but since this is my first time using XUL and its documentation it could be that I just overlooked it. So I'm just maki...
TITLE: Checking if userinput is a valid URI in XUL QUESTION: Is there a built-in function/method that can check if a given string is a valid URI or not in the Mozilla XUL toolkit? I have looked for one but found none, but since this is my first time using XUL and its documentation it could be that I just overlooked it...
[ "javascript", "validation", "firefox", "xul" ]
6
4
362
1
0
2008-08-29T06:54:07.913000
2008-08-29T07:10:49.590000
34,087
34,114
Dividing a list of nodes in half
foo bar My list has 12 nodes, but the second list is always 8 and the first is always 4. What's wrong with my selects?
When you do count(*), the current node is the node element being processed. You want either count(current()/node) or last() (preferable), or just calculate the midpoint to a variable for better performance and clearer code: foo bar
Dividing a list of nodes in half foo bar My list has 12 nodes, but the second list is always 8 and the first is always 4. What's wrong with my selects?
TITLE: Dividing a list of nodes in half QUESTION: foo bar My list has 12 nodes, but the second list is always 8 and the first is always 4. What's wrong with my selects? ANSWER: When you do count(*), the current node is the node element being processed. You want either count(current()/node) or last() (preferable), or ...
[ "xml", "xslt" ]
4
7
2,805
4
0
2008-08-29T07:03:42.820000
2008-08-29T07:28:45.817000
34,093
34,095
How to apply an XSLT Stylesheet in C#
I want to apply an XSLT Stylesheet to an XML Document using C# and write the output to a File.
I found a possible answer here: http://web.archive.org/web/20130329123237/http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=63 From the article: XPathDocument myXPathDoc = new XPathDocument(myXmlFile); XslTransform myXslTrans = new XslTransform(); myXslTrans.Load(myStyleSheet); XmlTextWriter myWriter = ne...
How to apply an XSLT Stylesheet in C# I want to apply an XSLT Stylesheet to an XML Document using C# and write the output to a File.
TITLE: How to apply an XSLT Stylesheet in C# QUESTION: I want to apply an XSLT Stylesheet to an XML Document using C# and write the output to a File. ANSWER: I found a possible answer here: http://web.archive.org/web/20130329123237/http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=63 From the article: X...
[ "c#", "xml", "xslt" ]
204
187
150,989
5
0
2008-08-29T07:10:31.260000
2008-08-29T07:10:36.953000
34,109
502,997
MS WF state machine workflows and MS CRM Dynamics 4.0
MS CRM Dynamics 4.0 incorporates the MS WF engine. The built in designer allows the creation of sequential workflows whos activities have native access to CRM entities. Is it possible to: Create a state machine workflow outside of CRM (i.e. in visual studio) and import it into CRM? Have this workflow access the CRM ent...
It is NOT possible to create a state machine workflow for use in MSCRM. It is also not supported to create any workflow outside of MSCRM and import it. As a work around you could write either all the logic you need into a custom workflow activity and import that into MSCRM and have it called from a normal workflow. The...
MS WF state machine workflows and MS CRM Dynamics 4.0 MS CRM Dynamics 4.0 incorporates the MS WF engine. The built in designer allows the creation of sequential workflows whos activities have native access to CRM entities. Is it possible to: Create a state machine workflow outside of CRM (i.e. in visual studio) and imp...
TITLE: MS WF state machine workflows and MS CRM Dynamics 4.0 QUESTION: MS CRM Dynamics 4.0 incorporates the MS WF engine. The built in designer allows the creation of sequential workflows whos activities have native access to CRM entities. Is it possible to: Create a state machine workflow outside of CRM (i.e. in visu...
[ "workflow", "workflow-foundation", "dynamics-crm", "crm" ]
6
6
1,381
3
0
2008-08-29T07:22:46.970000
2009-02-02T12:12:01.147000
34,112
34,146
VS2008: Copy Web Site from command line
How do I execute the "Copy Web Site" command for an ASP.NET project in VS2008 from the command line? If I need to script this, let me have some pointers on where I can learn that.
Would this help you get started? Walkthrough: Deploying an ASP.NET Web Application Using XCOPY
VS2008: Copy Web Site from command line How do I execute the "Copy Web Site" command for an ASP.NET project in VS2008 from the command line? If I need to script this, let me have some pointers on where I can learn that.
TITLE: VS2008: Copy Web Site from command line QUESTION: How do I execute the "Copy Web Site" command for an ASP.NET project in VS2008 from the command line? If I need to script this, let me have some pointers on where I can learn that. ANSWER: Would this help you get started? Walkthrough: Deploying an ASP.NET Web Ap...
[ "asp.net", "visual-studio-2008", "command-line" ]
2
4
604
1
0
2008-08-29T07:28:08.097000
2008-08-29T07:57:43.457000
34,120
34,145
HTML Scraping in Php
I've been doing some HTML scraping in PHP using regular expressions. This works, but the result is finicky and fragile. Has anyone used any packages that provide a more robust solution? A config driven solution would be ideal, but I'm not picky.
I would recomend PHP Simple HTML DOM Parser after you have scraped the HTML from the page. It supports invalid HTML, and provides a very easy way to handle HTML elements.
HTML Scraping in Php I've been doing some HTML scraping in PHP using regular expressions. This works, but the result is finicky and fragile. Has anyone used any packages that provide a more robust solution? A config driven solution would be ideal, but I'm not picky.
TITLE: HTML Scraping in Php QUESTION: I've been doing some HTML scraping in PHP using regular expressions. This works, but the result is finicky and fragile. Has anyone used any packages that provide a more robust solution? A config driven solution would be ideal, but I'm not picky. ANSWER: I would recomend PHP Simpl...
[ "php", "html", "screen-scraping" ]
39
28
45,817
7
0
2008-08-29T07:32:15.217000
2008-08-29T07:55:42.710000
34,125
34,129
Which, if any, C++ compilers do tail-recursion optimization?
It seems to me that it would work perfectly well to do tail-recursion optimization in both C and C++, yet while debugging I never seem to see a frame stack that indicates this optimization. That is kind of good, because the stack tells me how deep the recursion is. However, the optimization would be kind of nice as wel...
All current mainstream compilers perform tail call optimisation fairly well (and have done for more than a decade), even for mutually recursive calls such as: int bar(int, int); int foo(int n, int acc) { return (n == 0)? acc: bar(n - 1, acc + 2); } int bar(int n, int acc) { return (n == 0)? acc: foo(n - 1, acc + 1); ...
Which, if any, C++ compilers do tail-recursion optimization? It seems to me that it would work perfectly well to do tail-recursion optimization in both C and C++, yet while debugging I never seem to see a frame stack that indicates this optimization. That is kind of good, because the stack tells me how deep the recursi...
TITLE: Which, if any, C++ compilers do tail-recursion optimization? QUESTION: It seems to me that it would work perfectly well to do tail-recursion optimization in both C and C++, yet while debugging I never seem to see a frame stack that indicates this optimization. That is kind of good, because the stack tells me ho...
[ "c++", "optimization", "tail-recursion" ]
172
152
54,488
5
0
2008-08-29T07:35:47.517000
2008-08-29T07:40:32.280000
34,126
34,163
What is the best way to add an event in JavaScript?
I see 2 main ways to set events in JavaScript: Add an event directly inside the tag like this: do foo Set them by JavaScript like this: do bar and add an event in a
In my experience, there are two major points to this: 1) The most important thing is to be consistent. I don't think either of the two methods is necessarily easier to read, as long as you stick to it. I only get confused when both methods are used in a project (or even worse on the same page) because then I have to st...
What is the best way to add an event in JavaScript? I see 2 main ways to set events in JavaScript: Add an event directly inside the tag like this: do foo Set them by JavaScript like this: do bar and add an event in a
TITLE: What is the best way to add an event in JavaScript? QUESTION: I see 2 main ways to set events in JavaScript: Add an event directly inside the tag like this: do foo Set them by JavaScript like this: do bar and add an event in a ANSWER: In my experience, there are two major points to this: 1) The most important ...
[ "javascript", "html", "events", "event-binding" ]
9
4
10,615
6
0
2008-08-29T07:35:56.783000
2008-08-29T08:10:41.037000
34,128
34,150
How to you pass a variable amount of parmeters to web-service
We are trying to create a web-service that we plan to pass a variable amount of variables to it. Can this be done? Basically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-service. Here is an example of the XML we are looking to send, we would sent an unk...
I would pass in an xml document instead of doing concreate functions for this. The webservice in your example is leaky - the consumer needs to know too much about this interface and the implementation of the webservice internally. XML Document and then tie that with an XSD. That way you can prevalidte the input to the ...
How to you pass a variable amount of parmeters to web-service We are trying to create a web-service that we plan to pass a variable amount of variables to it. Can this be done? Basically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-service. Here is an e...
TITLE: How to you pass a variable amount of parmeters to web-service QUESTION: We are trying to create a web-service that we plan to pass a variable amount of variables to it. Can this be done? Basically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-ser...
[ "c#", "web-services", "soap" ]
4
5
1,912
4
0
2008-08-29T07:38:40.507000
2008-08-29T08:02:00.543000
34,144
34,167
In Maven 2, how do I know from which dependency comes a transitive dependency?
I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory. To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I would like to know which dependency in my pom.xml brings that.
To add to @David Crow, here's a dependency:tree example from the Maven site: mvn dependency:tree -Dincludes=velocity:velocity might output [INFO] [dependency:tree] [INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT [INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha...
In Maven 2, how do I know from which dependency comes a transitive dependency? I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory. To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I would like to know w...
TITLE: In Maven 2, how do I know from which dependency comes a transitive dependency? QUESTION: I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory. To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I wo...
[ "java", "maven-2", "build-process" ]
123
163
62,296
6
0
2008-08-29T07:55:12.883000
2008-08-29T08:14:10.107000
34,155
34,387
Looking for examples of "real" uses of continuations
I'm trying to grasp the concept of continuations and I found several small teaching examples like this one from the Wikipedia article: (define the-continuation #f) (define (test) (let ((i 0)); call/cc calls its first function argument, passing; a continuation variable representing this point in; the program as the arg...
In Algo & Data II we used these all the times to "exit" or "return" from a (long) function for example the BFS algorthm to traverse trees with was implemented like this: (define (BFS graph root-discovered node-discovered edge-discovered edge-bumped. nodes) (define visited (make-vector (graph.order graph) #f)) (define q...
Looking for examples of "real" uses of continuations I'm trying to grasp the concept of continuations and I found several small teaching examples like this one from the Wikipedia article: (define the-continuation #f) (define (test) (let ((i 0)); call/cc calls its first function argument, passing; a continuation variab...
TITLE: Looking for examples of "real" uses of continuations QUESTION: I'm trying to grasp the concept of continuations and I found several small teaching examples like this one from the Wikipedia article: (define the-continuation #f) (define (test) (let ((i 0)); call/cc calls its first function argument, passing; a c...
[ "ruby", "language-agnostic", "scheme", "smalltalk", "continuations" ]
21
16
3,088
12
0
2008-08-29T08:07:58.687000
2008-08-29T11:36:06.473000
34,161
34,172
Delete Records from Access database, error while deleting
I have the following situation: I built an Access form with a subform (which records are linked to the records of main form via certain key). When I try to delete any record in the subform, I get the following message: “Access has suspended the action because you and another user tried to change the data” (approximate ...
If you are currently 'editing' the current form then it will not allow the action. Editing a record can sometimes be triggered by simply clicking inside a field, or other simple actions you wouldn't normally consider 'editing'. This is usually avoided in Access by using the RunCommand method to undo any edits before de...
Delete Records from Access database, error while deleting I have the following situation: I built an Access form with a subform (which records are linked to the records of main form via certain key). When I try to delete any record in the subform, I get the following message: “Access has suspended the action because yo...
TITLE: Delete Records from Access database, error while deleting QUESTION: I have the following situation: I built an Access form with a subform (which records are linked to the records of main form via certain key). When I try to delete any record in the subform, I get the following message: “Access has suspended the...
[ "database", "ms-access" ]
1
1
1,931
3
0
2008-08-29T08:10:21.287000
2008-08-29T08:19:42.093000
34,182
56,934
Alternatives for enhanced reading and parsing text files using .NET
I need to read from a variety of different text files (I've some delimited files and some fixed width files). I've considered parsing the files line by line (slow using the File.ReadLine type methods) and reading the file using the ODBC text driver (faster) but does anyone have any other (better) suggestions? I'm using...
Answering my own question: I ended up using the Microsoft.VisualBasic.FileIO.TextFieldParser object, see: http://msdn.microsoft.com/en-us/library/f68t4563.aspx (example of implementation here) This allows me to handle csv files without worrying about how to cope with whether fields are enclosed in quotes, contain comma...
Alternatives for enhanced reading and parsing text files using .NET I need to read from a variety of different text files (I've some delimited files and some fixed width files). I've considered parsing the files line by line (slow using the File.ReadLine type methods) and reading the file using the ODBC text driver (fa...
TITLE: Alternatives for enhanced reading and parsing text files using .NET QUESTION: I need to read from a variety of different text files (I've some delimited files and some fixed width files). I've considered parsing the files line by line (slow using the File.ReadLine type methods) and reading the file using the OD...
[ ".net", "file-io", "text-files" ]
3
4
3,915
9
0
2008-08-29T08:36:35.047000
2008-09-11T15:41:16.383000
34,183
38,331
C#.Net: Why is my Process.Start() hanging?
I'm trying to run a batch file, as another user, from my web app. For some reason, the batch file hangs! I can see "cmd.exe" running in the task manager, but it just sits there forever, unable to be killed, and the batch file is not running. Here's my code: SecureString password = new SecureString(); foreach (char c in...
I believe I've found the answer. It seems that Microsoft, in all their infinite wisdom, has blocked batch files from being executed by IIS in Windows Server 2003. Brenden Tompkins has a work-around here: http://codebetter.com/blogs/brendan.tompkins/archive/2004/05/13/13484.aspx That won't work for me, because my batch ...
C#.Net: Why is my Process.Start() hanging? I'm trying to run a batch file, as another user, from my web app. For some reason, the batch file hangs! I can see "cmd.exe" running in the task manager, but it just sits there forever, unable to be killed, and the batch file is not running. Here's my code: SecureString passwo...
TITLE: C#.Net: Why is my Process.Start() hanging? QUESTION: I'm trying to run a batch file, as another user, from my web app. For some reason, the batch file hangs! I can see "cmd.exe" running in the task manager, but it just sits there forever, unable to be killed, and the batch file is not running. Here's my code: S...
[ "c#", ".net" ]
14
5
16,376
9
0
2008-08-29T08:36:36.903000
2008-09-01T19:41:24.163000
34,194
316,015
ASP.NET MVC on IIS6
Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6? I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S. So I was wondering on how you best build applications in ASP.NET MVC and make it easily available to deploy on b...
It took me a bit, but I figured out how to make the extensions work with IIS 6. First, you need to rework the base routing to include.aspx so that they will be routed through the ASP.NET ISAPI filter. routes.MapRoute( "Default", // Route name "{controller}.aspx/{action}/{id}", // URL with parameters new { controller = ...
ASP.NET MVC on IIS6 Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6? I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S. So I was wondering on how you best build applications in ASP.NET MVC and make it easily avai...
TITLE: ASP.NET MVC on IIS6 QUESTION: Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6? I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S. So I was wondering on how you best build applications in ASP.NET MVC and m...
[ ".net", "asp.net-mvc", "deployment", "iis-6" ]
25
14
10,330
8
0
2008-08-29T08:45:19.673000
2008-11-25T00:43:54.613000
34,204
185,256
How do I get latest from a Visual Studio solution from the command line?
How do I get the latest version of my solution recursively like its done in the solution explorer context menu of Visual Studio? I want to do this from the command line or via a macro. I'm trying to automate a part of my daily routine by using a set of batch files. I am sure a lot of developers would love to have somet...
TFS has a.Net SDK that allows you to create your own custom programs that interact with a TFS Server. You could write a small program that performs the task you need: TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("MyServer"); VersionControlServer vcs = (VersionControlServer)tfs.GetService(typeof(Vers...
How do I get latest from a Visual Studio solution from the command line? How do I get the latest version of my solution recursively like its done in the solution explorer context menu of Visual Studio? I want to do this from the command line or via a macro. I'm trying to automate a part of my daily routine by using a s...
TITLE: How do I get latest from a Visual Studio solution from the command line? QUESTION: How do I get the latest version of my solution recursively like its done in the solution explorer context menu of Visual Studio? I want to do this from the command line or via a macro. I'm trying to automate a part of my daily ro...
[ "visual-studio-2008", "command-line", "tfs", "macros" ]
9
4
8,810
7
0
2008-08-29T08:53:58.127000
2008-10-08T22:56:49.107000
34,209
35,633
Django ImageField core=False in newforms admin
In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields. I get the following error: TypeError: __init__() got an unexpected keyword argument 'core' [Edit] However, by just removing the core argument I get a "This field is required." error in the admin interface on a...
To get rid of "This field is required," you need to make it not required, by using blank=True (and possibly null=True as well, if it's not a CharField).
Django ImageField core=False in newforms admin In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields. I get the following error: TypeError: __init__() got an unexpected keyword argument 'core' [Edit] However, by just removing the core argument I get a "This field ...
TITLE: Django ImageField core=False in newforms admin QUESTION: In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields. I get the following error: TypeError: __init__() got an unexpected keyword argument 'core' [Edit] However, by just removing the core argument I ...
[ "python", "django", "django-models" ]
6
5
1,161
3
0
2008-08-29T09:03:27.883000
2008-08-30T03:04:44.560000
34,237
34,261
How to hide the cancel button on an ASP.NET ChangePassword control
I'm considering using the ChangePassword control on an ASP.NET 2.0 Webform. I don't want the 'cancel' button to show. Is there a good way to hide it without resorting to silly "width = 0" sort of games? Or perhaps there's a generic way to walk through the parts of a composite control like this and hide individual parts...
Set CancelButtonStyle.CssClass to something like "hiddenItem" and set the CSS to "display:none". Otherwise you can convert the control to a template and simply delete away the cancel-button manually. When you click the control in Design-mode in Visual Studio, you get a little arrow with options and one of them is "Conv...
How to hide the cancel button on an ASP.NET ChangePassword control I'm considering using the ChangePassword control on an ASP.NET 2.0 Webform. I don't want the 'cancel' button to show. Is there a good way to hide it without resorting to silly "width = 0" sort of games? Or perhaps there's a generic way to walk through t...
TITLE: How to hide the cancel button on an ASP.NET ChangePassword control QUESTION: I'm considering using the ChangePassword control on an ASP.NET 2.0 Webform. I don't want the 'cancel' button to show. Is there a good way to hide it without resorting to silly "width = 0" sort of games? Or perhaps there's a generic way...
[ "asp.net", "webforms" ]
3
7
4,872
3
0
2008-08-29T09:21:42.053000
2008-08-29T09:36:08.960000
34,243
34,266
Python descriptor protocol analog in other languages?
Is there something like the Python descriptor protocol implemented in other languages? It seems like a nice way to increase modularity/encapsulation without bloating your containing class' implementation, but I've never heard of a similar thing in any other languages. Is it likely absent from other languages because of...
I've not heard of a direct equivalent either. You could probably achieve the same effect with macros, especially in a language like Lisp which has extremely powerful macros. I wouldn't be at all surprised if other languages start to incorporate something similar because it is so powerful.
Python descriptor protocol analog in other languages? Is there something like the Python descriptor protocol implemented in other languages? It seems like a nice way to increase modularity/encapsulation without bloating your containing class' implementation, but I've never heard of a similar thing in any other language...
TITLE: Python descriptor protocol analog in other languages? QUESTION: Is there something like the Python descriptor protocol implemented in other languages? It seems like a nice way to increase modularity/encapsulation without bloating your containing class' implementation, but I've never heard of a similar thing in ...
[ "python", "language-features", "encapsulation" ]
10
4
998
2
0
2008-08-29T09:24:08.583000
2008-08-29T09:39:47.423000
34,249
34,255
Best algorithm to test if a linked list has a cycle
What's the best (halting) algorithm for determining if a linked list has a cycle in it? [Edit] Analysis of asymptotic complexity for both time and space would be sweet so answers can be compared better. [Edit] Original question was not addressing nodes with outdegree > 1, but there's some talk about it. That question i...
Have two pointers iterating through the list; make one iterate through at twice the speed of the other, and compare their positions at each step. Off the top of my head, something like: node* tortoise(begin), * hare(begin); while(hare = hare->next) { if(hare == tortoise) { throw std::logic_error("There's a cycle"); } h...
Best algorithm to test if a linked list has a cycle What's the best (halting) algorithm for determining if a linked list has a cycle in it? [Edit] Analysis of asymptotic complexity for both time and space would be sweet so answers can be compared better. [Edit] Original question was not addressing nodes with outdegree ...
TITLE: Best algorithm to test if a linked list has a cycle QUESTION: What's the best (halting) algorithm for determining if a linked list has a cycle in it? [Edit] Analysis of asymptotic complexity for both time and space would be sweet so answers can be compared better. [Edit] Original question was not addressing nod...
[ "algorithm", "data-structures", "linked-list" ]
32
51
21,229
12
0
2008-08-29T09:30:05.510000
2008-08-29T09:34:18.277000
34,262
34,377
Query TFS for updated files
I want to get an overview of files that are updated in TFS (that someone else checked in) that I don't have the latest version for.
In Visual Studio Source Control Explorer, right click on the directory you want to compare, and select "Compare". It will pop up a dialog with a couple of filtering options, and then show you what's out of date.
Query TFS for updated files I want to get an overview of files that are updated in TFS (that someone else checked in) that I don't have the latest version for.
TITLE: Query TFS for updated files QUESTION: I want to get an overview of files that are updated in TFS (that someone else checked in) that I don't have the latest version for. ANSWER: In Visual Studio Source Control Explorer, right click on the directory you want to compare, and select "Compare". It will pop up a di...
[ "tfs" ]
2
2
644
2
0
2008-08-29T09:36:27.383000
2008-08-29T11:23:05.257000
34,270
34,290
COMException "Library not registered." while using System.DirectoryServices
I have only just started received the following error in my windows forms application under.NET 2 framework on windows 2000 when using System.DirectoryServices. {System.Runtime.InteropServices.COMException} System.Runtime.InteropServices.COMException: {"Library not registered."} _className: Nothing _COMPlusExceptionCod...
Having used Reflector to have a quick peak at the Directory Services code, it looks like your Active Directory Service Interfaces installation might be kaput. You can download version 2.5 from Technet although I'm not sure if it's the latest version or if it works with Windows 2000.
COMException "Library not registered." while using System.DirectoryServices I have only just started received the following error in my windows forms application under.NET 2 framework on windows 2000 when using System.DirectoryServices. {System.Runtime.InteropServices.COMException} System.Runtime.InteropServices.COMExc...
TITLE: COMException "Library not registered." while using System.DirectoryServices QUESTION: I have only just started received the following error in my windows forms application under.NET 2 framework on windows 2000 when using System.DirectoryServices. {System.Runtime.InteropServices.COMException} System.Runtime.Inte...
[ "com", ".net-2.0", "active-directory" ]
1
1
2,034
1
0
2008-08-29T09:41:56.777000
2008-08-29T09:55:21.847000
34,286
34,298
Visually Tag/Mark a Window
I'm looking for a way to visually mark or tag a window (any OS) so that it stands out. A while back, I accidentally replaced a live production database containing thousands of records with an empty dev version, simply because the two instances of Enterprise Manager looked identical to one another. I'd like to avoid tha...
None that I'm aware of, but perhaps a virtual desktop system for your OS of choice would help keep the separation a little better for you.
Visually Tag/Mark a Window I'm looking for a way to visually mark or tag a window (any OS) so that it stands out. A while back, I accidentally replaced a live production database containing thousands of records with an empty dev version, simply because the two instances of Enterprise Manager looked identical to one ano...
TITLE: Visually Tag/Mark a Window QUESTION: I'm looking for a way to visually mark or tag a window (any OS) so that it stands out. A while back, I accidentally replaced a live production database containing thousands of records with an empty dev version, simply because the two instances of Enterprise Manager looked id...
[ "user-interface" ]
0
1
83
3
0
2008-08-29T09:52:47.983000
2008-08-29T09:59:52.023000
34,300
34,342
Has .NET made raw COM and DCOM programming redundant?
Has the introduction of the.net framework made raw programming in COM and DCOM redundant? (Except for using some COM+ services, e.g. for transaction management through the System.EnterpriseServices namespace)
Not yet, because the OS is still unmanaged. If MS finally do what their labs have been talking about for years and produce a fully managed OS then it will. That OS won't be backwards compatible though. They would have to produce managed versions of Office, IE, etc first. They will have to produce a virtual machine to r...
Has .NET made raw COM and DCOM programming redundant? Has the introduction of the.net framework made raw programming in COM and DCOM redundant? (Except for using some COM+ services, e.g. for transaction management through the System.EnterpriseServices namespace)
TITLE: Has .NET made raw COM and DCOM programming redundant? QUESTION: Has the introduction of the.net framework made raw programming in COM and DCOM redundant? (Except for using some COM+ services, e.g. for transaction management through the System.EnterpriseServices namespace) ANSWER: Not yet, because the OS is sti...
[ ".net", "com", "com+", "dcom" ]
4
10
1,052
5
0
2008-08-29T10:00:33.567000
2008-08-29T10:38:33.037000
34,301
34,315
Multiple web-sites running in IIS simulatenously
At work, we have multiple branches that we may be working on at any time. Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be. I just want to go to the URL, mapped in my hosts file, for that branch a...
Yes, it is a restriction and this one website can have only 10 simultanious connections. Buy a Windows 2003 or 2008 Small Business Edition, it is quite cost-effective in this scenario.
Multiple web-sites running in IIS simulatenously At work, we have multiple branches that we may be working on at any time. Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be. I just want to go to th...
TITLE: Multiple web-sites running in IIS simulatenously QUESTION: At work, we have multiple branches that we may be working on at any time. Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be. I jus...
[ "iis" ]
4
3
2,064
7
0
2008-08-29T10:00:43.393000
2008-08-29T10:08:49.660000
34,314
34,318
How do I implement Search Functionality in a website?
I want to implement search functionality for a website (assume it is similar to SO). I don't want to use Google search of stuff like that. My question is: How do I implement this? There are two methods I am aware of: Search all the databases in the application when the user gives his query. Index all the data I have an...
Use lucene, http://lucene.apache.org/java/docs/ Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. It is available in java and.net. It is also in availab...
How do I implement Search Functionality in a website? I want to implement search functionality for a website (assume it is similar to SO). I don't want to use Google search of stuff like that. My question is: How do I implement this? There are two methods I am aware of: Search all the databases in the application when ...
TITLE: How do I implement Search Functionality in a website? QUESTION: I want to implement search functionality for a website (assume it is similar to SO). I don't want to use Google search of stuff like that. My question is: How do I implement this? There are two methods I am aware of: Search all the databases in the...
[ "search" ]
70
40
83,440
7
0
2008-08-29T10:08:12.190000
2008-08-29T10:09:40.830000
34,322
34,466
Do webtests need VS tester edition on the build server?
Using the TFS build server without VS 2008 Team System Tester Edition installed - is it possible to run a series of webtests as part of a build? I know that Webtests can only be recorded using the Tester Edition of VS. Here's a post about this from Jeff, back when he was at Vertigo. I'm just trying to run the tests, th...
You don't have to have the tester's edition; the Developer Edition works, as long as you can code and run those tests locally. I believe with the standard MSDN license, if you have Developer Edition, you can run a single build server with a copy of it. There might be some extra limitations, such as who can run builds o...
Do webtests need VS tester edition on the build server? Using the TFS build server without VS 2008 Team System Tester Edition installed - is it possible to run a series of webtests as part of a build? I know that Webtests can only be recorded using the Tester Edition of VS. Here's a post about this from Jeff, back when...
TITLE: Do webtests need VS tester edition on the build server? QUESTION: Using the TFS build server without VS 2008 Team System Tester Edition installed - is it possible to run a series of webtests as part of a build? I know that Webtests can only be recorded using the Tester Edition of VS. Here's a post about this fr...
[ "tfs", "build-process" ]
0
1
102
1
0
2008-08-29T10:14:21.537000
2008-08-29T15:36:11.267000
34,325
34,329
Should I use a cross-platform GUI-toolkit or rely on the native ones?
On my side job as programmer, I am to write a program in C++ to convert audio files from/to various formats. Probably, this will involve building a simple GUI. Will it be a great effort to build seperate GUIs for Mac and Windows using Cocoa and WinForms instead of a cross-platform toolkit like Qt or GTK? (I will have t...
If you have the expertise, use native frontends, it'll effectively double the job you have to do for UI but from my experience non-native UI is a little bit clunkier than their native counterparts.
Should I use a cross-platform GUI-toolkit or rely on the native ones? On my side job as programmer, I am to write a program in C++ to convert audio files from/to various formats. Probably, this will involve building a simple GUI. Will it be a great effort to build seperate GUIs for Mac and Windows using Cocoa and WinFo...
TITLE: Should I use a cross-platform GUI-toolkit or rely on the native ones? QUESTION: On my side job as programmer, I am to write a program in C++ to convert audio files from/to various formats. Probably, this will involve building a simple GUI. Will it be a great effort to build seperate GUIs for Mac and Windows usi...
[ "c++", "user-interface", "cross-platform" ]
5
8
2,117
7
0
2008-08-29T10:17:08.877000
2008-08-29T10:19:41.757000