PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
32,550
08/28/2008 15:17:00
383
08/05/2008 10:46:37
2,239
198
Does ReadUncommitted imply NoLock
When writing a SQL statement in SQL Server 2005, does the READUNCOMMITTED query hint imply NOLOCK or do I have to specify it manually too? So is: With (NoLock, ReadUnCommitted) the same as: With (ReadUnCommitted)
sql-2005
nolock
null
null
null
null
open
Does ReadUncommitted imply NoLock === When writing a SQL statement in SQL Server 2005, does the READUNCOMMITTED query hint imply NOLOCK or do I have to specify it manually too? So is: With (NoLock, ReadUnCommitted) the same as: With (ReadUnCommitted)
0
32,570
08/28/2008 15:23:53
184
08/03/2008 05:34:19
1,061
16
How to make 'pretty urls' work in php hosted in IIS?
Is there some way I can use urls like: > http://www.blog.com/team-spirit/ instead of > http://www.blog.com/?p=122 in a windows hosted php server?
php
iis
null
null
null
null
open
How to make 'pretty urls' work in php hosted in IIS? === Is there some way I can use urls like: > http://www.blog.com/team-spirit/ instead of > http://www.blog.com/?p=122 in a windows hosted php server?
0
32,586
08/28/2008 15:26:46
1,471
08/15/2008 18:26:14
363
25
How to discover a File's creation time with Java?
Is there an easy way to discover a File's creation time with Java? The File class only has a method to get the "last modified" time. According to some resources I found on Google, the File class doesn't provide a getCreationTime() method because not all file systems support the idea of a creation time. The only working solution I found involes shelling out the the command line and executing the "dir" command, which looks like it outputs the file's creation time. I guess this works, I only need to support Windows, but it seems very error prone to me. Are there any third party libraries that provide the info I need?
java
file-io
windows
null
null
null
open
How to discover a File's creation time with Java? === Is there an easy way to discover a File's creation time with Java? The File class only has a method to get the "last modified" time. According to some resources I found on Google, the File class doesn't provide a getCreationTime() method because not all file systems support the idea of a creation time. The only working solution I found involes shelling out the the command line and executing the "dir" command, which looks like it outputs the file's creation time. I guess this works, I only need to support Windows, but it seems very error prone to me. Are there any third party libraries that provide the info I need?
0
32,596
08/28/2008 15:30:27
1,638
08/17/2008 17:58:57
350
41
Odd behaviour for rowSpan in Flex
I am experiencing some oddities when working with a Grid component in flex, I have the following form that uses a grid to align the fields, as you can see, each GridRow has a border, my problem is that the border is still visible through GridItems that span multiple rows (observe the TextArea the spans 4 rows, the GridRow borders go right threw it!) ![alt text][1] [1]: http://www.freeimagehosting.net/uploads/d46d102bf3.png Any ideas of how to fix this?
flex
null
null
null
null
null
open
Odd behaviour for rowSpan in Flex === I am experiencing some oddities when working with a Grid component in flex, I have the following form that uses a grid to align the fields, as you can see, each GridRow has a border, my problem is that the border is still visible through GridItems that span multiple rows (observe the TextArea the spans 4 rows, the GridRow borders go right threw it!) ![alt text][1] [1]: http://www.freeimagehosting.net/uploads/d46d102bf3.png Any ideas of how to fix this?
0
32,597
08/28/2008 15:30:34
224
08/03/2008 17:17:37
451
25
Installing Team Foundation Server
What are the best practices in setting up a new instance of TFS 2008 Workgroup edition? Specifically, the constraints are as follows: - Must install on an existing Windows Server 2008 64 bit - TFS application layer is 32 bit only Should I install SQL Server 2008, Sharepoint and the app layer in a virtual instance of Windows Server 2008 or 2003(I am already running Hyper-V) or split the layers with a database on the host OS and the app layer in a virtual machine?
tfs
version-control
hyper-v
vs2008
visual-studio
null
open
Installing Team Foundation Server === What are the best practices in setting up a new instance of TFS 2008 Workgroup edition? Specifically, the constraints are as follows: - Must install on an existing Windows Server 2008 64 bit - TFS application layer is 32 bit only Should I install SQL Server 2008, Sharepoint and the app layer in a virtual instance of Windows Server 2008 or 2003(I am already running Hyper-V) or split the layers with a database on the host OS and the app layer in a virtual machine?
0
32,598
08/28/2008 15:30:37
1,670
08/17/2008 21:56:17
18
0
Any disadvantages of accessing Subversion repositories through file:/// for a solo developer?
If you have Subversion installed on your development machine and you don't work in a team, is there any reason why you should use the _svn_ protocol instead of <em>file</em>?
svn
null
null
null
null
null
open
Any disadvantages of accessing Subversion repositories through file:/// for a solo developer? === If you have Subversion installed on your development machine and you don't work in a team, is there any reason why you should use the _svn_ protocol instead of <em>file</em>?
0
32,607
08/28/2008 15:33:04
1,338
08/14/2008 15:10:01
211
13
how to Rollback using TFS
I committed a chageset to TFS last night before leaving. This morning I decided my change was badly written, so I wanted to do a rollback on it. In subversion, this was pretty straightforward. However, it seems to be an incredible headache in TFS. Am I being dense? Is there a simple way to do this I'm missing? These are the options I found - 1. manually get prior version of each file b. check out for edit c. FAIL - the checkout (in VS2008) forces me to get the latest version 2. download Team Foundation Power Tools b. issue rollback command from cmd line c. FAIL - won't work if there are any other pending changes 3. manually undo my changes, then commit a new changeset I'm flabergasted at how tedious this is. I think even VSS supported an easier mechanism to rollback a change.
vs2008
tfs
version-control
null
null
null
open
how to Rollback using TFS === I committed a chageset to TFS last night before leaving. This morning I decided my change was badly written, so I wanted to do a rollback on it. In subversion, this was pretty straightforward. However, it seems to be an incredible headache in TFS. Am I being dense? Is there a simple way to do this I'm missing? These are the options I found - 1. manually get prior version of each file b. check out for edit c. FAIL - the checkout (in VS2008) forces me to get the latest version 2. download Team Foundation Power Tools b. issue rollback command from cmd line c. FAIL - won't work if there are any other pending changes 3. manually undo my changes, then commit a new changeset I'm flabergasted at how tedious this is. I think even VSS supported an easier mechanism to rollback a change.
0
32,612
08/28/2008 15:34:09
1,284
08/14/2008 11:34:29
5
5
Best way to manage session in NHibernate?
I'm new to NHibernate (my 1st big project with it). I had been using a simple method of data access by creating the ISession object within a using block to do my grab my Object or list of Objects, and in that way the session was destroyed after exiting the code block. This doesn't work in a situation where lazy-loading is required, however. For example, if I have a Customer object that has a property which is a collection of Orders, then when the lazy-load is attempted, I get a Hibernate exception. Anyone using a different method?
c#
.net
nhibernate
null
null
null
open
Best way to manage session in NHibernate? === I'm new to NHibernate (my 1st big project with it). I had been using a simple method of data access by creating the ISession object within a using block to do my grab my Object or list of Objects, and in that way the session was destroyed after exiting the code block. This doesn't work in a situation where lazy-loading is required, however. For example, if I have a Customer object that has a property which is a collection of Orders, then when the lazy-load is attempted, I get a Hibernate exception. Anyone using a different method?
0
32,617
08/28/2008 15:37:32
863
08/09/2008 19:07:26
424
22
Is there a way to do "intraWord" text navigation in VS?
On Windows, **Ctrl+Right Arrow** will move the text cursor from one "word" to the next. While working with Xcode on the Mac, they extended that so that **Option+Right Arrow** will move the cursor to the beginning of the next _subword_. For example, if the cursor was at the beginning of the word `myCamelCaseVar` then hitting **Option+Right Arrow** will put the cursor at the first `C`. This was an amazingly useful feature that I haven't found in a Windows editor. So to my question: Do you know of any way to do this in Visual Studio (perhaps with an Add-In)? I'm currently using pretty old iterations of Visual Studio (VB6 and VC++), although I'm interested to know if the more modern releases can do this, too.
visual-studio
keyboard
null
null
null
null
open
Is there a way to do "intraWord" text navigation in VS? === On Windows, **Ctrl+Right Arrow** will move the text cursor from one "word" to the next. While working with Xcode on the Mac, they extended that so that **Option+Right Arrow** will move the cursor to the beginning of the next _subword_. For example, if the cursor was at the beginning of the word `myCamelCaseVar` then hitting **Option+Right Arrow** will put the cursor at the first `C`. This was an amazingly useful feature that I haven't found in a Windows editor. So to my question: Do you know of any way to do this in Visual Studio (perhaps with an Add-In)? I'm currently using pretty old iterations of Visual Studio (VB6 and VC++), although I'm interested to know if the more modern releases can do this, too.
0
32,621
08/28/2008 15:38:42
3,420
08/28/2008 14:19:36
1
0
How do I find the the exact lat/lng coordinates of a birdseye scene in Virtual Earth?
I'm trying to find the latitude and longitude of the corners of my map while in birdseye view. I want to be able to plot pins on the map, but I have hundreds of thousands of addresses that I want to be able to limit to the ones that need to show on the map. In normal view, VEMap.GetMapView().TopLeftLatLong and .BottomRightLatLong return the coordinates I need; but in Birdseye view they return blank (or encrypted values). The SDK recommends using VEBirdseyeScene.GetBoundingRectangle(), but this returns bounds of up to two miles from the center of my scene which in major cities still returns way too many addresses. In previous versions of the VE Control, there was an undocumented VEDecoder object I could use to decrypt the LatLong values for the birdseye scenes, but this object seems to have disappeared (probably been renamed). How can I decode these values in version 6.1?
javascript
virtual-earth
null
null
null
null
open
How do I find the the exact lat/lng coordinates of a birdseye scene in Virtual Earth? === I'm trying to find the latitude and longitude of the corners of my map while in birdseye view. I want to be able to plot pins on the map, but I have hundreds of thousands of addresses that I want to be able to limit to the ones that need to show on the map. In normal view, VEMap.GetMapView().TopLeftLatLong and .BottomRightLatLong return the coordinates I need; but in Birdseye view they return blank (or encrypted values). The SDK recommends using VEBirdseyeScene.GetBoundingRectangle(), but this returns bounds of up to two miles from the center of my scene which in major cities still returns way too many addresses. In previous versions of the VE Control, there was an undocumented VEDecoder object I could use to decrypt the LatLong values for the birdseye scenes, but this object seems to have disappeared (probably been renamed). How can I decode these values in version 6.1?
0
32,628
08/28/2008 15:44:54
2,953
08/26/2008 08:52:08
26
1
Deployment tool for LAMP
Are there any good deployment tools that can be used with LAMP and Subversion? Ideally it would handle both code updates and database migrations.
php
svn
deployment
lamp
null
03/06/2012 16:54:21
not constructive
Deployment tool for LAMP === Are there any good deployment tools that can be used with LAMP and Subversion? Ideally it would handle both code updates and database migrations.
4
32,633
08/28/2008 15:48:03
2,133
08/20/2008 13:53:25
83
3
How can I set breakpoints in an external JS script in Firebug
I can easily set breakpoints in embedded JS functions, but I don't see any way of accessing extarnal JS scripts via Firebug unless I happen to enter them during a debug session. Is there a way to do this w/o having to 'explore' my way into the script?
javascript
firebug
null
null
null
null
open
How can I set breakpoints in an external JS script in Firebug === I can easily set breakpoints in embedded JS functions, but I don't see any way of accessing extarnal JS scripts via Firebug unless I happen to enter them during a debug session. Is there a way to do this w/o having to 'explore' my way into the script?
0
32,637
08/28/2008 15:49:32
1,218
08/13/2008 13:43:14
-1
0
Easiest way to convert a URL to a hyperlink in a C# string?
I am consuming the Twitter API and want to convert all URLs to hyperlinks. What is the most effective way you've come up with to do this? from string myString = "This is my tweet check it out http://tinyurl.com/blah"; to This is my tweet check it out &lt;a href="http://tinyurl.com/blah"&gt;http://tinyurl.com/blah&lt;/a&gt;
c#
string
null
null
null
null
open
Easiest way to convert a URL to a hyperlink in a C# string? === I am consuming the Twitter API and want to convert all URLs to hyperlinks. What is the most effective way you've come up with to do this? from string myString = "This is my tweet check it out http://tinyurl.com/blah"; to This is my tweet check it out &lt;a href="http://tinyurl.com/blah"&gt;http://tinyurl.com/blah&lt;/a&gt;
0
32,638
08/28/2008 15:49:56
2,915
08/25/2008 23:15:12
341
18
Which CMS or other framework to develop a stackoverflow-like site?
I want to develop a Q/A site with features substantially similar to stackoverflow, but targeted to a different niche (electrical/hardware engineering as opposed to software engineering). The code that runs stackoverflow is not opensource, and from the last mention of it on the podcast I believe I can assume it never will be. I don't want to start from scratch as Jeff and Jared did, but I do want a Q/A site rather than a discussion site. What framework or CMS would you start with to create this site if you were tasked with it? -Adam Davis
stackoverflow
content-management-system
frameworks
website
design
null
open
Which CMS or other framework to develop a stackoverflow-like site? === I want to develop a Q/A site with features substantially similar to stackoverflow, but targeted to a different niche (electrical/hardware engineering as opposed to software engineering). The code that runs stackoverflow is not opensource, and from the last mention of it on the podcast I believe I can assume it never will be. I don't want to start from scratch as Jeff and Jared did, but I do want a Q/A site rather than a discussion site. What framework or CMS would you start with to create this site if you were tasked with it? -Adam Davis
0
32,640
08/28/2008 15:50:35
1,946
08/19/2008 14:53:06
95
5
Mocking Asp.net-mvc Controller Context
So the controller context depends on some asp.net internals. Whats some ways to cleanly mock these up for unit tests? Seems like its very easy to clog up tests with tons of setup when I only need, for example, Request.HttpMethod to return "GET". I've seen some examples/helpers out on the nets, but some are dated. Figured this would be a good place to keep the latest and greatest. I'm using latest version of rhino mocks
unit-testing
asp.net-mvc
rhino-mocks
mocking
null
null
open
Mocking Asp.net-mvc Controller Context === So the controller context depends on some asp.net internals. Whats some ways to cleanly mock these up for unit tests? Seems like its very easy to clog up tests with tons of setup when I only need, for example, Request.HttpMethod to return "GET". I've seen some examples/helpers out on the nets, but some are dated. Figured this would be a good place to keep the latest and greatest. I'm using latest version of rhino mocks
0
32,642
08/28/2008 15:50:49
3,334
08/28/2008 00:32:18
6
0
Beginning ASP.NET MVC with VB.net 2008
Where can I find a good tutorial on learning ASP.NET MVC using VB.net 2008 as the language? All tutorials that I found in searching the web were written in C#.
asp.net
mvc
vb.net
null
null
null
open
Beginning ASP.NET MVC with VB.net 2008 === Where can I find a good tutorial on learning ASP.NET MVC using VB.net 2008 as the language? All tutorials that I found in searching the web were written in C#.
0
32,643
08/28/2008 15:50:57
3,269
08/27/2008 15:52:44
1
0
Automatic image rotation based on a logo
We're looking for a package to help identify and automatically rotate faxed TIFF images based on a watermark or logo. We use libtiff for rotation currently, but don't know of any other libraries or packages I can use for detecting this logo and determining how to rotate the images. I have done some basic work with OpenCV but I'm not sure that it is the right tool for this job. I would prefer to use C/C++ but Java, Perl, or PHP would be acceptable too.
c
image-manipulation
tiff
watermark
opencv
null
open
Automatic image rotation based on a logo === We're looking for a package to help identify and automatically rotate faxed TIFF images based on a watermark or logo. We use libtiff for rotation currently, but don't know of any other libraries or packages I can use for detecting this logo and determining how to rotate the images. I have done some basic work with OpenCV but I'm not sure that it is the right tool for this job. I would prefer to use C/C++ but Java, Perl, or PHP would be acceptable too.
0
32,664
08/28/2008 16:04:49
1,736
08/18/2008 11:29:16
11
1
C# Generic constraint for only integers
Can anyone tell me if there is a way with c# generics to limit a type T to only Int16, Int32, Int64, UInt16, UInt32, UInt64 Im aware of the where keyword, but cant find an interface for **only** these types, Something like: static bool IntegerFunction<T>(T value) where T : INumeric Thanks
c#
generics
null
null
null
null
open
C# Generic constraint for only integers === Can anyone tell me if there is a way with c# generics to limit a type T to only Int16, Int32, Int64, UInt16, UInt32, UInt64 Im aware of the where keyword, but cant find an interface for **only** these types, Something like: static bool IntegerFunction<T>(T value) where T : INumeric Thanks
0
32,668
08/28/2008 16:06:04
3,189
08/27/2008 11:59:18
21
5
How to remember in CSS that margin is outside the border, and padding inside
I don't edit CSS very often, and almost every time I need to go and google the [CSS box model](http://www.w3.org/TR/REC-CSS2/box.html) to check whether padding is inside the border and margin outside, or vice versa. (Just checked again and padding is inside). Does anyone have a good way of remembering this? A little mnemonic, a good explanation as to why the names are that way round ...
css
null
null
null
null
null
open
How to remember in CSS that margin is outside the border, and padding inside === I don't edit CSS very often, and almost every time I need to go and google the [CSS box model](http://www.w3.org/TR/REC-CSS2/box.html) to check whether padding is inside the border and margin outside, or vice versa. (Just checked again and padding is inside). Does anyone have a good way of remembering this? A little mnemonic, a good explanation as to why the names are that way round ...
0
32,679
08/28/2008 16:10:07
2,535
08/22/2008 17:36:15
28
2
Looking for News and Podcast CMS
I feel I have outgrown Wordpress for where I want to take my website. I would prefer to start with a CMS core so I don't have to program that all from scratch, but am not having any luck. PHP or .NET are both options for me. Other languages are a possibility, but really depend on how much programing I would have to do. The front-end logic is simple: * Display news articles * Display podcast show notes * Have a page for each band with a link-back to each show they were played in The back-end is a bit more difficult: * Create articles and schedule appearance and disappearance (easy) * Create automatic links to the band page * Automatically email the band contact when the band has been played on the show * Allow bands to update their information * Create unique feeds for registered users These are the more difficult parts that I have been having trouble finding a CMS framework for. Most that I have seen doesn't seem to allow me to link content together. Granted, this is just an overview, but it is the automation that I am looking for to make live easier in the long run. Any ideas on something that would work on a shared host?
content-management-system
php
.net
null
null
null
open
Looking for News and Podcast CMS === I feel I have outgrown Wordpress for where I want to take my website. I would prefer to start with a CMS core so I don't have to program that all from scratch, but am not having any luck. PHP or .NET are both options for me. Other languages are a possibility, but really depend on how much programing I would have to do. The front-end logic is simple: * Display news articles * Display podcast show notes * Have a page for each band with a link-back to each show they were played in The back-end is a bit more difficult: * Create articles and schedule appearance and disappearance (easy) * Create automatic links to the band page * Automatically email the band contact when the band has been played on the show * Allow bands to update their information * Create unique feeds for registered users These are the more difficult parts that I have been having trouble finding a CMS framework for. Most that I have seen doesn't seem to allow me to link content together. Granted, this is just an overview, but it is the automation that I am looking for to make live easier in the long run. Any ideas on something that would work on a shared host?
0
32,689
08/28/2008 16:12:06
978
08/11/2008 11:46:05
21
2
In MS SQL Server 2005, is there a way to export, the complete maintenance plan of a database as a SQL Script?
Currently, if I want to output a SQL script for a table in my database, in Management Studio, I can right click and output a create script. Is there an equivalent to output an SQL script for a database's maintenance plan?
sql
sql-server
mssql
sql-server-2005
null
null
open
In MS SQL Server 2005, is there a way to export, the complete maintenance plan of a database as a SQL Script? === Currently, if I want to output a SQL script for a table in my database, in Management Studio, I can right click and output a create script. Is there an equivalent to output an SQL script for a database's maintenance plan?
0
32,694
08/28/2008 16:13:19
742
08/08/2008 13:33:41
37
1
"ypcat" and "ypmatch username passwd" don't agree after change on server
I'm trying to use NIS for authentication on a st of machines. I had to change one of the user ID numbers for a user account on the NIS server (I changed the userid for `username` from 500 to 509 to avoid a conflict with a local user account with id 500 on the clients). The problem is that it has not updated properly on the client. In particular, if I do "ypcat passwd | grep username", I get the up-to-date info: username:*hidden*:509:509:User Name:/home/username:/bin/bash But if I do, "ypmatch username passwd", it says: username:*hidden*:500:500:User Name:/home/username:/bin/bash This means that when the user logs onto one of the clients, it has the wrong userid, which causes all sorts of problems. I've done `"cd /var/yp; make"` on the server, and `"service ypbind restart"` on the client, but that hasn't fixed the problem. Does anybody know what would be causing this and how I can somehow force a refresh on the client? (I'm running Fedora 8 on both client and server).
linux
nis
null
null
null
null
open
"ypcat" and "ypmatch username passwd" don't agree after change on server === I'm trying to use NIS for authentication on a st of machines. I had to change one of the user ID numbers for a user account on the NIS server (I changed the userid for `username` from 500 to 509 to avoid a conflict with a local user account with id 500 on the clients). The problem is that it has not updated properly on the client. In particular, if I do "ypcat passwd | grep username", I get the up-to-date info: username:*hidden*:509:509:User Name:/home/username:/bin/bash But if I do, "ypmatch username passwd", it says: username:*hidden*:500:500:User Name:/home/username:/bin/bash This means that when the user logs onto one of the clients, it has the wrong userid, which causes all sorts of problems. I've done `"cd /var/yp; make"` on the server, and `"service ypbind restart"` on the client, but that hasn't fixed the problem. Does anybody know what would be causing this and how I can somehow force a refresh on the client? (I'm running Fedora 8 on both client and server).
0
32,709
08/28/2008 16:17:52
2,993
08/26/2008 10:45:59
322
12
Isn't Func<T, bool> and Predicate<T> the same thing after compilation?
Haven't fired up reflector to look at the difference but would one expect to see the exact same compiled code when comparing Func T, bool vs. Predicate T I would imagine there is no difference as both take a generic parameter and return bool? sorry about the missing brackets around the type parameters, stackoverflow seems to interpet those
c#
delegates
null
null
null
null
open
Isn't Func<T, bool> and Predicate<T> the same thing after compilation? === Haven't fired up reflector to look at the difference but would one expect to see the exact same compiled code when comparing Func T, bool vs. Predicate T I would imagine there is no difference as both take a generic parameter and return bool? sorry about the missing brackets around the type parameters, stackoverflow seems to interpet those
0
32,710
08/28/2008 16:18:24
184
08/03/2008 05:34:19
1,156
18
Is there some way I can validate a user in client side?
Is there some way I can authenticate a user in the client-side (browser) in a web application?
security
null
null
null
null
null
open
Is there some way I can validate a user in client side? === Is there some way I can authenticate a user in the client-side (browser) in a web application?
0
32,715
08/28/2008 16:20:19
820
08/09/2008 04:48:45
11
1
Is there a way to get images to display with ASP.NET and app_offline.htm?
When using the app_offline.htm feature of ASP.NET, it only allows html, but no images. Is there a way to get images to display without having to point them to a different url on another site?
asp.net
iis6
null
null
null
null
open
Is there a way to get images to display with ASP.NET and app_offline.htm? === When using the app_offline.htm feature of ASP.NET, it only allows html, but no images. Is there a way to get images to display without having to point them to a different url on another site?
0
32,717
08/28/2008 16:21:03
3,114
08/26/2008 18:05:52
196
14
Out-of-place builds with C#
I just finished setting up an out-of-place build system for our existing C++ code using inherited property sheets, a feature that seems to be specific to the Visual C++ product. Building out-of-place requires that many of the project settings be changed, and the inherited property sheets allowed me to change all the necessary settings just by attaching a property sheet to the project. I am migrating our team from C++/MFC for UI to C# and WPF, but I need to provide the same out-of-place build functionality, hopefully with the same convenience. I cannot seem to find a way to do this with C# projects - I first looked to see if I could reference an MsBuild targets file, but could not find a way to do this. I know I could just use MsBuild for the whole thing, but that seems more complicated than necessary. Is there a way I can define a macro for a directory and use it in the output path, for example?
c#
build-process
msbuild
null
null
null
open
Out-of-place builds with C# === I just finished setting up an out-of-place build system for our existing C++ code using inherited property sheets, a feature that seems to be specific to the Visual C++ product. Building out-of-place requires that many of the project settings be changed, and the inherited property sheets allowed me to change all the necessary settings just by attaching a property sheet to the project. I am migrating our team from C++/MFC for UI to C# and WPF, but I need to provide the same out-of-place build functionality, hopefully with the same convenience. I cannot seem to find a way to do this with C# projects - I first looked to see if I could reference an MsBuild targets file, but could not find a way to do this. I know I could just use MsBuild for the whole thing, but that seems more complicated than necessary. Is there a way I can define a macro for a directory and use it in the output path, for example?
0
32,718
08/28/2008 16:21:21
3,457
08/28/2008 16:21:21
1
0
Setting time zone remotely in C#
How do you set the Windows time zone on the local machine programmatically in C#? Using an interactive tool is not an option because the remote units have no user interface or users. The remote machine is running .NET 2.0 and Windows XP Embedded and a local app that communicates with a central server (via web service) for automated direction of its tasks. We can deliver a command to synch to a certain time/zone combination, but what code can be put in the local app to accomplish the change? The equipment is not imaged for specific locations before installation, so in order to use any equipment at any location, we have to be able to synch this information.
c#
.net
windows
null
null
null
open
Setting time zone remotely in C# === How do you set the Windows time zone on the local machine programmatically in C#? Using an interactive tool is not an option because the remote units have no user interface or users. The remote machine is running .NET 2.0 and Windows XP Embedded and a local app that communicates with a central server (via web service) for automated direction of its tasks. We can deliver a command to synch to a certain time/zone combination, but what code can be put in the local app to accomplish the change? The equipment is not imaged for specific locations before installation, so in order to use any equipment at any location, we have to be able to synch this information.
0
32,733
08/28/2008 16:28:25
1,508
08/16/2008 02:29:14
216
18
.NET : Double-click event in TabControl
I would like to intercept the event in a .NET Windows Forms TabControl when the user has changed tab by double-clicking the tab (instead of just single-clicking it). Do you have any idea of how I can do that?
c#
.net
winforms
vb.net
tabcontrol
null
open
.NET : Double-click event in TabControl === I would like to intercept the event in a .NET Windows Forms TabControl when the user has changed tab by double-clicking the tab (instead of just single-clicking it). Do you have any idea of how I can do that?
0
32,744
08/28/2008 16:35:52
1,615
08/17/2008 15:19:59
43
1
I ALMOST understand how email works, but I'm missing something.
For the past few weeks, I've been trying to learn about just how email works. I understand the process of a client receiving mail from a server using POP pretty well. I also understand how a client computer can use SMTP to ask an SMTP server to send a message. However, I'm still missing something... The way I understand it, outgoing mail has to make three trips: 1. Client (gmail user using Thunderbird) to a server (Gmail) 2. First server (Gmail) to second server (Hotmail) 3. Second server (Hotmail) to second client (hotmail user using OS X Mail) As I understand it, step one uses SMTP for the client to communicate. The client authenticates itself somehow (say, with USER and PASS), and then sends a message to the gmail server. However, I don't understand how gmail server transfers the message to the hotmail server. For step three, I'm pretty sure, the hotmail server uses POP to send the message to the hotmail client (using authentication, again). So, the big question is: **when I click send Mail sends my message to my gmail server, how does my gmail server forward the message to, say, a hotmail server so my friend can recieve it?** Thank you so much! ~Jason
email
pop
smtp
null
null
null
open
I ALMOST understand how email works, but I'm missing something. === For the past few weeks, I've been trying to learn about just how email works. I understand the process of a client receiving mail from a server using POP pretty well. I also understand how a client computer can use SMTP to ask an SMTP server to send a message. However, I'm still missing something... The way I understand it, outgoing mail has to make three trips: 1. Client (gmail user using Thunderbird) to a server (Gmail) 2. First server (Gmail) to second server (Hotmail) 3. Second server (Hotmail) to second client (hotmail user using OS X Mail) As I understand it, step one uses SMTP for the client to communicate. The client authenticates itself somehow (say, with USER and PASS), and then sends a message to the gmail server. However, I don't understand how gmail server transfers the message to the hotmail server. For step three, I'm pretty sure, the hotmail server uses POP to send the message to the hotmail client (using authentication, again). So, the big question is: **when I click send Mail sends my message to my gmail server, how does my gmail server forward the message to, say, a hotmail server so my friend can recieve it?** Thank you so much! ~Jason
0
32,747
08/28/2008 16:37:10
730
08/08/2008 12:40:04
109
17
How do i get today's date in C# in 8/28/2008 format?
How do i get today's date in C# in 8/28/2008 format? I need to set a string variable to today's date (preferably without the year) but there's got to be a better way than building it month-/-day once piece at a time.
c#
null
null
null
null
null
open
How do i get today's date in C# in 8/28/2008 format? === How do i get today's date in C# in 8/28/2008 format? I need to set a string variable to today's date (preferably without the year) but there's got to be a better way than building it month-/-day once piece at a time.
0
32,750
08/28/2008 16:38:10
2,577
08/23/2008 03:18:09
15
0
How can I take a byte array of a TIFF image and turn it into a System.Drawing.Image object?
I have a `byte[]` array, the contents of which represent a TIFF file (as in, if I write out these bytes directly to a file using the `BinaryWriter` object, it forms a perfectly valid TIFF file) and I'm trying to turn it into a System.Drawing.Image object so that I can use it for later manipulation (feeding into a multipage TIFF object) The problem I'm having is that the commonly accepted code for this task: public Image byteArrayToImage(byte[] byteArrayIn) { MemoryStream ms = new MemoryStream(byteArrayIn); Image returnImage = Image.FromStream(ms, true); return returnImage; } doesn't work for me. The second line of the above method where it calls the `Image.FromStream` method dies at runtime, saying Parameter Not Valid I believe that the method is choking on the fact that this is a TIFF file but I cannot figure out how to make the `FromStream` method accept this fact. How do I turn a byte array of a TIFF image into an Image object? Also, like I said the end goal of this is to have a byte array representing a multipage TIFF file, which contains the TIFF files for which I have byte array objects of right now. If there's a much better way to go about doing this, I'm all for it.
c#
.net
image
tiff
null
null
open
How can I take a byte array of a TIFF image and turn it into a System.Drawing.Image object? === I have a `byte[]` array, the contents of which represent a TIFF file (as in, if I write out these bytes directly to a file using the `BinaryWriter` object, it forms a perfectly valid TIFF file) and I'm trying to turn it into a System.Drawing.Image object so that I can use it for later manipulation (feeding into a multipage TIFF object) The problem I'm having is that the commonly accepted code for this task: public Image byteArrayToImage(byte[] byteArrayIn) { MemoryStream ms = new MemoryStream(byteArrayIn); Image returnImage = Image.FromStream(ms, true); return returnImage; } doesn't work for me. The second line of the above method where it calls the `Image.FromStream` method dies at runtime, saying Parameter Not Valid I believe that the method is choking on the fact that this is a TIFF file but I cannot figure out how to make the `FromStream` method accept this fact. How do I turn a byte array of a TIFF image into an Image object? Also, like I said the end goal of this is to have a byte array representing a multipage TIFF file, which contains the TIFF files for which I have byte array objects of right now. If there's a much better way to go about doing this, I'm all for it.
0
32,757
08/28/2008 16:41:09
1,122
08/12/2008 14:00:43
328
40
Where can I get ASP MVC hosting?
I really need some ASP MVC CTP 4 hosing NOW. Is anyone doing this? I can't believe there is no-one willing to take my money just because it's in beta. This is a customer requirement, so why is each host I ask just saying 'we can't do that'?
asp.net-mvc
web-hosting
hosting
null
null
02/16/2012 14:13:47
not constructive
Where can I get ASP MVC hosting? === I really need some ASP MVC CTP 4 hosing NOW. Is anyone doing this? I can't believe there is no-one willing to take my money just because it's in beta. This is a customer requirement, so why is each host I ask just saying 'we can't do that'?
4
32,766
08/28/2008 16:42:42
3,460
08/28/2008 16:28:54
1
0
generation of designer file failed
Every few days VS2008 decides to get mad at me and fails to generate a designer file claiming it cannot find the file specified and that it's missing an assembly. Here's the scenario: The aspx page has a reference to a custom user control (inheriting UserControl) which references another assembly in the backend. There are many other references to this "missing" assembly in other places in code which don't throw errors. rebuilding, updating the source to the clean copy, shouting at the computer, punching the screen, etc all fail to work. Any suggestions? This is quite annoying.
visual-studio
visual-studio-2008
null
null
null
null
open
generation of designer file failed === Every few days VS2008 decides to get mad at me and fails to generate a designer file claiming it cannot find the file specified and that it's missing an assembly. Here's the scenario: The aspx page has a reference to a custom user control (inheriting UserControl) which references another assembly in the backend. There are many other references to this "missing" assembly in other places in code which don't throw errors. rebuilding, updating the source to the clean copy, shouting at the computer, punching the screen, etc all fail to work. Any suggestions? This is quite annoying.
0
32,777
08/28/2008 16:48:23
572
08/06/2008 20:56:54
1,896
167
What is the best and most complete implementation of Unix system commands?
I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's going to work, so I would love for alternatives and I'm sure there are people out there interested in this who aren't running Cygwin.
unix
command-line
null
null
null
null
open
What is the best and most complete implementation of Unix system commands? === I've found a few (unfortunately, they are bookmarked at home and I'm at work, so no links), but I was wondering if anyone had any opinions about any of them (love it, hate it, whatever) so I could make a good decision. I think I'm going to use Cygwin for my Unix commands on Windows, but I'm not sure how well that's going to work, so I would love for alternatives and I'm sure there are people out there interested in this who aren't running Cygwin.
0
32,780
08/28/2008 16:48:46
1,925
08/19/2008 14:23:13
59
6
SQL Server 2003 internet connection
Recently we got a new server at the office purely for testing purposes. It is set up so that we can access it from any computer. However today our ip got blocked from one of our other sites saying that our ip has been suspected of having a virus that sends spam emails. we learned this from the cbl http://cbl.abuseat.org/ So of course we turned the server off to stop this. The problem is the server must be on to continue developing our application and to access the database that is installed on it. Our normal admin is on vacation and is unreachable, and the rest of us are idiots(me included) in this area. We believe that the best solution is to remove it from connecting to the internet but still access it on the lan. If that is a valid solution how would this be done or is there a better way? say blocking specified ports or whatever.
sql-server
null
null
null
null
null
open
SQL Server 2003 internet connection === Recently we got a new server at the office purely for testing purposes. It is set up so that we can access it from any computer. However today our ip got blocked from one of our other sites saying that our ip has been suspected of having a virus that sends spam emails. we learned this from the cbl http://cbl.abuseat.org/ So of course we turned the server off to stop this. The problem is the server must be on to continue developing our application and to access the database that is installed on it. Our normal admin is on vacation and is unreachable, and the rest of us are idiots(me included) in this area. We believe that the best solution is to remove it from connecting to the internet but still access it on the lan. If that is a valid solution how would this be done or is there a better way? say blocking specified ports or whatever.
0
32,790
08/28/2008 16:52:44
2,443
08/22/2008 10:53:30
81
17
Alternatives to System.exit(1)
For various reasons calling System.exit is frowned upon when writing Java Applications, so how can I notify the calling process that not everything is going according to plan?
java
process
null
null
null
null
open
Alternatives to System.exit(1) === For various reasons calling System.exit is frowned upon when writing Java Applications, so how can I notify the calling process that not everything is going according to plan?
0
32,803
08/28/2008 16:56:51
2,535
08/22/2008 17:36:15
30
2
Email Delivery Question
This question comes on the heels of the question asked [here](http://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marke). The email that comes from our web server comes from an IP address that is different than that for the Exchange server. Is this okay if the SPF and Domain keys are setup properly?
email
spam
null
null
null
null
open
Email Delivery Question === This question comes on the heels of the question asked [here](http://stackoverflow.com/questions/371/how-do-you-make-sure-email-you-send-programmatically-is-not-automatically-marke). The email that comes from our web server comes from an IP address that is different than that for the Exchange server. Is this okay if the SPF and Domain keys are setup properly?
0
32,809
08/28/2008 17:02:23
1,806
08/18/2008 16:49:30
1
0
Javascript Unit-testing?
What's the best way to go about running unit tests for Javascript? I've been playing around with Selenium IDE, but it's Firefox-specific. Selenium RC looks... difficult - but is it the best way to run tests in, say, IE6? Also, is it worth doing? I haven't seen much about automated tests for Javascript applications, but it seems to me that as the language running most of the user experience it should be tested. Do you test your Javascript, just back end code, or neither?
javascript
unit-testing
jquery
null
null
05/14/2012 17:10:47
not constructive
Javascript Unit-testing? === What's the best way to go about running unit tests for Javascript? I've been playing around with Selenium IDE, but it's Firefox-specific. Selenium RC looks... difficult - but is it the best way to run tests in, say, IE6? Also, is it worth doing? I haven't seen much about automated tests for Javascript applications, but it seems to me that as the language running most of the user experience it should be tested. Do you test your Javascript, just back end code, or neither?
4
32,814
08/28/2008 17:03:59
1,965
08/19/2008 15:51:08
1,814
104
ASP.NET Validators inside an UpdatePanel
I'm using an older version of ASP.NET AJAX due to runtime limitations, Placing a ASP.NET Validator inside of an update panel does not work. Is there at trick to make these work, or do I need to use the ValidatorCallOut control that comes with the AJAX toolkit?
asp.net
ajax
updatepanel
null
null
null
open
ASP.NET Validators inside an UpdatePanel === I'm using an older version of ASP.NET AJAX due to runtime limitations, Placing a ASP.NET Validator inside of an update panel does not work. Is there at trick to make these work, or do I need to use the ValidatorCallOut control that comes with the AJAX toolkit?
0
32,824
08/28/2008 17:08:58
2,114
08/20/2008 12:26:57
530
14
Why does HttpCacheability.Private suppress ETags?
While writing a custom IHttpHandler I came across a behavior that I didn't expect concerning the HttpCachePolicy object. My handler calculates and sets an entity-tag (using the SetETag method on the HttpCachePolicy associated with the current response object). If I set the cache-control to public using: cache.SetCacheability(HttpCacheability.Public) everything works like a charm and the server sends along the e-tag header but when I set it to private the e-tag header will be suppressed. I have a workaround where I simply check if the cache-control is private and manually add the e-tag to the response headers but what I want to know is why this happens to begin with. Maybe I just haven't looked hard enough but I haven't seen anything in the HTTP/1.1 spec that would justify this behavior. Why wouldn't you want to send E-Tag to browsers while still prohibiting proxies from storing the data?
asp.net
caching
http
null
null
null
open
Why does HttpCacheability.Private suppress ETags? === While writing a custom IHttpHandler I came across a behavior that I didn't expect concerning the HttpCachePolicy object. My handler calculates and sets an entity-tag (using the SetETag method on the HttpCachePolicy associated with the current response object). If I set the cache-control to public using: cache.SetCacheability(HttpCacheability.Public) everything works like a charm and the server sends along the e-tag header but when I set it to private the e-tag header will be suppressed. I have a workaround where I simply check if the cache-control is private and manually add the e-tag to the response headers but what I want to know is why this happens to begin with. Maybe I just haven't looked hard enough but I haven't seen anything in the HTTP/1.1 spec that would justify this behavior. Why wouldn't you want to send E-Tag to browsers while still prohibiting proxies from storing the data?
0
32,835
08/28/2008 17:12:57
3,433
08/28/2008 15:04:27
24
6
XNA Unit Testing
So I'm interested in hearing different thoughts about what is the best way to go about unit testing XNA Game/Applications. Astute googlers can probably figure out why I'm asking, but I didn't want to bias the topic :-)
unit-testing
xna
null
null
null
null
open
XNA Unit Testing === So I'm interested in hearing different thoughts about what is the best way to go about unit testing XNA Game/Applications. Astute googlers can probably figure out why I'm asking, but I didn't want to bias the topic :-)
0
32,839
08/28/2008 17:14:27
290
08/04/2008 12:57:50
857
61
What are generally accepted code formatting guidelines?
According to [McCall's Quality Model][1], **Product Revision** is one of the three main perspectives for describing the quality attributes of a software product. Under the Product Revision perspective, **maintainability**, *the ability to find and fix a defect*, is identified as a key quality factor that impacts the ability to revise the software. Clearly, at some point in the revision process, there is a need for human involvement, specifically programmer involvement. The formatting of the code has an impact on the programmer's ability to revise the software effectively and efficiently. What generally accepted, language agnostic code formatting guidelines have you worked with that maximize programmer efficiency and effectiveness in the code revision process? [1]: http://www.sqa.net/softwarequalityattributes.html
language-agnostic
sqa
maintainability
formatting
null
null
open
What are generally accepted code formatting guidelines? === According to [McCall's Quality Model][1], **Product Revision** is one of the three main perspectives for describing the quality attributes of a software product. Under the Product Revision perspective, **maintainability**, *the ability to find and fix a defect*, is identified as a key quality factor that impacts the ability to revise the software. Clearly, at some point in the revision process, there is a need for human involvement, specifically programmer involvement. The formatting of the code has an impact on the programmer's ability to revise the software effectively and efficiently. What generally accepted, language agnostic code formatting guidelines have you worked with that maximize programmer efficiency and effectiveness in the code revision process? [1]: http://www.sqa.net/softwarequalityattributes.html
0
32,845
08/28/2008 17:16:54
1,490
08/15/2008 21:35:24
468
52
Creating System Restore Points - Thoughts?
Is it "taboo" to programatically create system restore points? I would be doing this before I perform a software update. If there is a better method to create a restore point with just my software's files and data, please let me know. private void CreateRestorePoint(string description) { ManagementScope oScope = new ManagementScope("\\\\localhost\\root\\default"); ManagementPath oPath = new ManagementPath("SystemRestore"); ObjectGetOptions oGetOp = new ObjectGetOptions(); ManagementClass oProcess = new ManagementClass(oScope, oPath, oGetOp); ManagementBaseObject oInParams = oProcess.GetMethodParameters("CreateRestorePoint"); oInParams["Description"] = description; oInParams["RestorePointType"] = 12; // MODIFY_SETTINGS oInParams["EventType"] = 100; ManagementBaseObject oOutParams = oProcess.InvokeMethod("CreateRestorePoint", oInParams, null); }
ux
system-restore
null
null
null
null
open
Creating System Restore Points - Thoughts? === Is it "taboo" to programatically create system restore points? I would be doing this before I perform a software update. If there is a better method to create a restore point with just my software's files and data, please let me know. private void CreateRestorePoint(string description) { ManagementScope oScope = new ManagementScope("\\\\localhost\\root\\default"); ManagementPath oPath = new ManagementPath("SystemRestore"); ObjectGetOptions oGetOp = new ObjectGetOptions(); ManagementClass oProcess = new ManagementClass(oScope, oPath, oGetOp); ManagementBaseObject oInParams = oProcess.GetMethodParameters("CreateRestorePoint"); oInParams["Description"] = description; oInParams["RestorePointType"] = 12; // MODIFY_SETTINGS oInParams["EventType"] = 100; ManagementBaseObject oOutParams = oProcess.InvokeMethod("CreateRestorePoint", oInParams, null); }
0
32,851
08/28/2008 17:21:21
96
08/01/2008 18:33:48
561
54
Multicasting, Messaging, ActiveMQ vs. MSMQ?
I'm working on a messaging/notification system for our products. Basic requirements are: * Fire and forget * Persistent set of messages, possibly updating, to stay there until the sender says to remove them The libraries will be written in C#. Spring.NET just released a milestone build with lots of nice messaging abstraction, which is great - I plan on using it extensively. My basic question comes down to the question of message brokers. My architecture will look something like app -> message broker queue -> server app that listens, dispatches all messages to where they need to go, and handles the life cycle of those long-lived messages -> message broker queue or topic -> listening apps. Finally, the question: Which message broker should I use? I am biased towards [ActiveMQ][1] - We used it on our last project and loved it. I can't really think of a single strike against it, except that it's Java, and will require java to be installed on a server somewhere, and that might be a hard sell to some of the people that will be using this service. The other option I've been looking at is MSMQ. I am biased against it for some unknown reason, and it also doesn't seem to have great multicast support. Has anyone used MSMQ for something like this? Any pros or cons, stuff that might sway the vote one way or the other? One last thing, we are using .NET 2.0. [1]: http://activemq.apache.org
messaging
msmq
activemq
null
null
null
open
Multicasting, Messaging, ActiveMQ vs. MSMQ? === I'm working on a messaging/notification system for our products. Basic requirements are: * Fire and forget * Persistent set of messages, possibly updating, to stay there until the sender says to remove them The libraries will be written in C#. Spring.NET just released a milestone build with lots of nice messaging abstraction, which is great - I plan on using it extensively. My basic question comes down to the question of message brokers. My architecture will look something like app -> message broker queue -> server app that listens, dispatches all messages to where they need to go, and handles the life cycle of those long-lived messages -> message broker queue or topic -> listening apps. Finally, the question: Which message broker should I use? I am biased towards [ActiveMQ][1] - We used it on our last project and loved it. I can't really think of a single strike against it, except that it's Java, and will require java to be installed on a server somewhere, and that might be a hard sell to some of the people that will be using this service. The other option I've been looking at is MSMQ. I am biased against it for some unknown reason, and it also doesn't seem to have great multicast support. Has anyone used MSMQ for something like this? Any pros or cons, stuff that might sway the vote one way or the other? One last thing, we are using .NET 2.0. [1]: http://activemq.apache.org
0
32,871
08/28/2008 17:31:13
3,435
08/28/2008 15:10:35
1
0
How can I resize a swf during runtime to have the browser create html scrollbars?
I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like [http://www.nike.com/nikeskateboarding/v3/][1]...) I did have a look at the stuff nike did but just wasn't able to pull it off. Any idea's? [1]: http://www.nike.com/nikeskateboarding/v3/
actionscript-3
flash
flex
null
null
null
open
How can I resize a swf during runtime to have the browser create html scrollbars? === I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like [http://www.nike.com/nikeskateboarding/v3/][1]...) I did have a look at the stuff nike did but just wasn't able to pull it off. Any idea's? [1]: http://www.nike.com/nikeskateboarding/v3/
0
32,875
08/28/2008 17:36:29
2,118
08/20/2008 12:54:09
304
14
Browser's Default CSS
Are there any lists of browser CSS defaults? (browser stylsheets in tabular form) I want to know the default font of textareas across all browsers and also for future reference.
css
javascript
default
fonts
null
null
open
Browser's Default CSS === Are there any lists of browser CSS defaults? (browser stylsheets in tabular form) I want to know the default font of textareas across all browsers and also for future reference.
0
32,877
08/28/2008 17:38:07
1,683
08/18/2008 00:30:32
115
9
How to remove "VsDebuggerCausalityData" data from SOAP message?
I've got a problem where incoming SOAP messages from one particular client are being marked as invalid and rejected by our XML firewall device. It appears extra payload data is being inserted by Visual Studio; we're thinking the extra data may be causing a problem b/c we're seeing "VsDebuggerCausalityData" in these messages but not in others sent from a different client who is not having a problem. It's a starting point, anyway. The question I have is how can the client remove this extra data and still run from VS? Why is VS putting it in there at all? Thanks.
visual-studio
web-services
soap
null
null
null
open
How to remove "VsDebuggerCausalityData" data from SOAP message? === I've got a problem where incoming SOAP messages from one particular client are being marked as invalid and rejected by our XML firewall device. It appears extra payload data is being inserted by Visual Studio; we're thinking the extra data may be causing a problem b/c we're seeing "VsDebuggerCausalityData" in these messages but not in others sent from a different client who is not having a problem. It's a starting point, anyway. The question I have is how can the client remove this extra data and still run from VS? Why is VS putting it in there at all? Thanks.
0
32,897
08/28/2008 17:47:56
316
08/04/2008 15:40:45
174
13
Do Java multi-line comments account for strings?
This question would probably apply equally as well to other languages with C-like multi-line comments. Here's the problem I'm encountering. I'm working with Java code in Eclipse, and I wanted to comment out a block of code. However, there is a string that contains the character sequence "*/", and Eclipse thinks that the comment should end there, even though it is inside a string. It gives me tons of errors and fails to build. /* ... some Java code ... ... "... */ ..." ... ... more Java code ... */ Does the Java specification match with Eclipse's interpretation of my multi-line comment? I would like to think that Java and/or Eclipse would account for this sort of thing.
java
eclipse
comments
null
null
null
open
Do Java multi-line comments account for strings? === This question would probably apply equally as well to other languages with C-like multi-line comments. Here's the problem I'm encountering. I'm working with Java code in Eclipse, and I wanted to comment out a block of code. However, there is a string that contains the character sequence "*/", and Eclipse thinks that the comment should end there, even though it is inside a string. It gives me tons of errors and fails to build. /* ... some Java code ... ... "... */ ..." ... ... more Java code ... */ Does the Java specification match with Eclipse's interpretation of my multi-line comment? I would like to think that Java and/or Eclipse would account for this sort of thing.
0
32,899
08/28/2008 17:49:02
720
08/08/2008 08:47:12
76
5
How to generate dynamic unit tests in python?
I have some kind of test data and want to create an unit test for each item. My first idea was to do it like this: import unittest l = [["foo", "a", "a",], ["bar", "a", "b"], ["lee", "b", "b"]] class TestSequence(unittest.TestCase): def testsample(self): for name, a,b in l: print "test", name self.assertEqual(a,b) if __name__ == '__main__': unittest.main() The downside of this is that it handles all data in one test. I would like to generate one test for each item on the fly. Any suggestions?
python
unit-testing
null
null
null
null
open
How to generate dynamic unit tests in python? === I have some kind of test data and want to create an unit test for each item. My first idea was to do it like this: import unittest l = [["foo", "a", "a",], ["bar", "a", "b"], ["lee", "b", "b"]] class TestSequence(unittest.TestCase): def testsample(self): for name, a,b in l: print "test", name self.assertEqual(a,b) if __name__ == '__main__': unittest.main() The downside of this is that it handles all data in one test. I would like to generate one test for each item on the fly. Any suggestions?
0
32,914
08/28/2008 17:54:10
3,435
08/28/2008 15:10:35
1
0
Is there a way to render svg data in a swf at runtime?
I'd like to render to svg data in a swf at runtime (not in Flex - not using degrafa) - how would I go about doing that?
flash
actionscript-3
svg
swf
null
null
open
Is there a way to render svg data in a swf at runtime? === I'd like to render to svg data in a swf at runtime (not in Flex - not using degrafa) - how would I go about doing that?
0
9,617,499
03/08/2012 12:14:10
569,724
01/10/2011 11:04:03
1
0
Hide Checkbox and Label based on Label text
The label text of a checkbox is dynamically generated in CodeCharge. The label text includes the amount of available articles. When this number is (0), the checkbox and the label text should be hidden, if not both checkbox and label value must be shown. In this case checkbox and label text hidden: <input id="i_search_2_newdatad9_1" name="d9[]" value="standplaatsreis" type="checkbox" /><label for="i_search_2_newdatad9_1">Standplaatsreis (0)</label> In this case checkbox and label visible: <input id="i_search_2_newdatad9_1" name="d9[]" value="standplaatsreis" type="checkbox" /><label for="i_search_2_newdatad9_1">Standplaatsreis (8)</label> I appreciate your suggestions for a php or jquery script.
php
jquery
codecharge
null
null
null
open
Hide Checkbox and Label based on Label text === The label text of a checkbox is dynamically generated in CodeCharge. The label text includes the amount of available articles. When this number is (0), the checkbox and the label text should be hidden, if not both checkbox and label value must be shown. In this case checkbox and label text hidden: <input id="i_search_2_newdatad9_1" name="d9[]" value="standplaatsreis" type="checkbox" /><label for="i_search_2_newdatad9_1">Standplaatsreis (0)</label> In this case checkbox and label visible: <input id="i_search_2_newdatad9_1" name="d9[]" value="standplaatsreis" type="checkbox" /><label for="i_search_2_newdatad9_1">Standplaatsreis (8)</label> I appreciate your suggestions for a php or jquery script.
0
9,617,500
03/08/2012 12:14:10
1,131,905
01/05/2012 10:38:01
45
1
Building a VS2010 project consumes extra resources
I have many projects I work in normally, but I have one that consumes a max of CPU resources at build time and system (windows server 2008) becomes very slow . and this issue has started last week, I don't remember that I have changed neither project nor VS2010 settings. What can be the problem ? Thanks
visual-studio
visual-studio-2010
build-process
null
null
null
open
Building a VS2010 project consumes extra resources === I have many projects I work in normally, but I have one that consumes a max of CPU resources at build time and system (windows server 2008) becomes very slow . and this issue has started last week, I don't remember that I have changed neither project nor VS2010 settings. What can be the problem ? Thanks
0
9,617,502
03/08/2012 12:14:32
106,906
05/14/2009 08:42:48
620
31
How do I see exactly what characters are in a string?
Check out the weird behavior I'm getting with two strings. I suspect of course, that the space isn't really a space. How do I investigate this? ![enter image description here][1] [1]: http://i.stack.imgur.com/Trs3o.jpg
ruby-on-rails
ruby
string
null
null
null
open
How do I see exactly what characters are in a string? === Check out the weird behavior I'm getting with two strings. I suspect of course, that the space isn't really a space. How do I investigate this? ![enter image description here][1] [1]: http://i.stack.imgur.com/Trs3o.jpg
0
9,617,503
03/08/2012 12:14:33
523,507
11/29/2010 05:52:04
1,028
25
ios MediaPlayer video small window not working
i have a video playing with MediaPlayer , ok on iPad, but if I touch the button to make the screen go small ![enter image description here][1] so what do i use here? to make it go small? `MPMovieScalingMode `? and how to use it? I touch the minimize icon and the image dissapear, thanks [1]: http://i.stack.imgur.com/929Zm.png
iphone
ios
ipad
mpmovieplayer
null
null
open
ios MediaPlayer video small window not working === i have a video playing with MediaPlayer , ok on iPad, but if I touch the button to make the screen go small ![enter image description here][1] so what do i use here? to make it go small? `MPMovieScalingMode `? and how to use it? I touch the minimize icon and the image dissapear, thanks [1]: http://i.stack.imgur.com/929Zm.png
0
9,617,510
03/08/2012 12:15:01
53,136
01/08/2009 23:01:40
707
42
Topological Sort on Neo4j
I have a graph on neo4j and I would like to run a topological sort, preferably without writing on the graph itself (to allow for multiple clients to run algorithms on the same graph simultaneously). How should I approach this? Shall I clone the graph and work on the temporary copy, or is there a sort of traversal/iterator ? thanks PS: I'm using neo4J through the neography gem (REST API) on Ruby
ruby
rest
graph-theory
neo4j
topological-sort
null
open
Topological Sort on Neo4j === I have a graph on neo4j and I would like to run a topological sort, preferably without writing on the graph itself (to allow for multiple clients to run algorithms on the same graph simultaneously). How should I approach this? Shall I clone the graph and work on the temporary copy, or is there a sort of traversal/iterator ? thanks PS: I'm using neo4J through the neography gem (REST API) on Ruby
0
9,617,511
03/08/2012 12:15:01
1,186,991
02/03/2012 07:46:23
18
0
Returning a bool and rethrowing an exception
Is it possible to return a bool and also rethrow an exception within the same method? Ive tried with the following code and it keeps saying that unreachable code is detected or that i cant exit the finally block. public bool AccessToFile(string filePath) { FileStream source = null; try { source = File.OpenRead(filePath); source.Close(); return true; } catch (UnauthorizedAccessException e) { string unAuthorizedStatus = "User does not have sufficient access privileges to open the file: \n\r" + filePath; unAuthorizedStatus += e.Message; MessageBox.Show(unAuthorizedStatus, "Error Message:"); throw; } catch (Exception e) { string generalStatus = null; if (filePath == null) { generalStatus = "General error: \n\r"; } else { generalStatus = filePath + " failed. \n\r"; generalStatus += e.Message; } MessageBox.Show(generalStatus, "Error Message:"); throw; } finally { if (source != null) { source.Dispose(); } } Thanks
c#
c#-4.0
exception-handling
null
null
null
open
Returning a bool and rethrowing an exception === Is it possible to return a bool and also rethrow an exception within the same method? Ive tried with the following code and it keeps saying that unreachable code is detected or that i cant exit the finally block. public bool AccessToFile(string filePath) { FileStream source = null; try { source = File.OpenRead(filePath); source.Close(); return true; } catch (UnauthorizedAccessException e) { string unAuthorizedStatus = "User does not have sufficient access privileges to open the file: \n\r" + filePath; unAuthorizedStatus += e.Message; MessageBox.Show(unAuthorizedStatus, "Error Message:"); throw; } catch (Exception e) { string generalStatus = null; if (filePath == null) { generalStatus = "General error: \n\r"; } else { generalStatus = filePath + " failed. \n\r"; generalStatus += e.Message; } MessageBox.Show(generalStatus, "Error Message:"); throw; } finally { if (source != null) { source.Dispose(); } } Thanks
0
9,617,515
03/08/2012 12:15:17
325,519
04/25/2010 19:13:48
791
10
Single EJB responsible for logic and many clients
I'm new to Java EE and I stuck with problem described below, I'll be very happy if you can help me. I need to implement some logic (based on finite-state machine) on server. As I understand I should implement it as EJB, right?. The problem is that one client should be able to create such "object" and other clients should be able to connect to it. When all clients disconnects form object it should be destroyed. Moreover such object performs some operations in loop and it have to be able to notify connected clients about particular changes. So far I learned that EJB are oriented for single user session or for message-based communication. Neither of them fit my requirements. Any hints how to design application for my problem? I should stick to Java EE 6.
java-ee
java-ee-6
null
null
null
null
open
Single EJB responsible for logic and many clients === I'm new to Java EE and I stuck with problem described below, I'll be very happy if you can help me. I need to implement some logic (based on finite-state machine) on server. As I understand I should implement it as EJB, right?. The problem is that one client should be able to create such "object" and other clients should be able to connect to it. When all clients disconnects form object it should be destroyed. Moreover such object performs some operations in loop and it have to be able to notify connected clients about particular changes. So far I learned that EJB are oriented for single user session or for message-based communication. Neither of them fit my requirements. Any hints how to design application for my problem? I should stick to Java EE 6.
0
9,617,522
03/08/2012 12:15:36
1,230,643
02/24/2012 11:23:58
8
0
How can I reopen STDIN <> in perl?
How can I open STDIN for the second time? Let say I have this data John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172 And I have this code while( my $line = <>) { print $line; } while( my $line = <>) { print $line; } I want it to print John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172 John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172
perl
stdin
iterate
null
null
null
open
How can I reopen STDIN <> in perl? === How can I open STDIN for the second time? Let say I have this data John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172 And I have this code while( my $line = <>) { print $line; } while( my $line = <>) { print $line; } I want it to print John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172 John Smith 25 O ATG 180 Peter Jackson 40 AB GGTA 173 Carl Anderson 32 A GGT 172
0
32,930
08/28/2008 17:59:11
327
08/04/2008 17:08:49
507
31
What is a good dvd burning component for Windows or .Net?
I'd like to add dvd burning functionality to my .Net app (running on Windows Server 2003), are there any good components available? I've used the NeroCOM sdk that used to come with Nero but they no longer support the sdk in the latest versions of Nero. I learned that Microsoft has created an IMAPI2 upgrade for Windows XP/2003 and there is an [example project][1] at CodeProject but not having used it myself I can't say how easy/reliable it is to use. [1]: http://www.codeproject.com/KB/miscctrl/imapi2.aspx
.net
components
windows
microsoft
dvd
null
open
What is a good dvd burning component for Windows or .Net? === I'd like to add dvd burning functionality to my .Net app (running on Windows Server 2003), are there any good components available? I've used the NeroCOM sdk that used to come with Nero but they no longer support the sdk in the latest versions of Nero. I learned that Microsoft has created an IMAPI2 upgrade for Windows XP/2003 and there is an [example project][1] at CodeProject but not having used it myself I can't say how easy/reliable it is to use. [1]: http://www.codeproject.com/KB/miscctrl/imapi2.aspx
0
32,937
08/28/2008 18:01:42
1,302
08/14/2008 13:04:10
18
3
Shorthand conditional in C# similar to SQL 'in' keyword
In C# is there a shorthand way to write this: public static bool IsAllowed(int userID) { return (userID == Personnel.JohnDoe || userID == Personnel.JaneDoe ...); } Like: public static bool IsAllowed(int userID) { return (userID in Personnel.JohnDoe, Personnel.JaneDoe ...); } I know I could also use switch, but there are probably 50 or so functions like this I have to write (porting a classic ASP site over to ASP.NET) so I'd like to keep them as short as possible.
c#
lambda
conditional
if-statement
null
null
open
Shorthand conditional in C# similar to SQL 'in' keyword === In C# is there a shorthand way to write this: public static bool IsAllowed(int userID) { return (userID == Personnel.JohnDoe || userID == Personnel.JaneDoe ...); } Like: public static bool IsAllowed(int userID) { return (userID in Personnel.JohnDoe, Personnel.JaneDoe ...); } I know I could also use switch, but there are probably 50 or so functions like this I have to write (porting a classic ASP site over to ASP.NET) so I'd like to keep them as short as possible.
0
32,941
08/28/2008 18:03:36
2,184
08/20/2008 20:01:42
1
0
SQL Server 2008 Reporting Services Control
Is the Sql Server 2008 control available for download? Does it yet support the 2008 RDL schema?
sql-server
reporting-services
null
null
null
null
open
SQL Server 2008 Reporting Services Control === Is the Sql Server 2008 control available for download? Does it yet support the 2008 RDL schema?
0
32,964
08/28/2008 18:11:55
1,438
08/15/2008 15:44:20
536
34
Should a wireless network be open?
Obviously there are security reasons to close a wireless network and it's not fun if someone is stealing your bandwidth. But how much of a problem is this? To address the first concern: Does a device on the same wireless network have any special privileges or access that an other device on the internet has? (Assume the wireless network is connected to the internet.) The second seems like a community issue. If your neighbor is stealing bandwidth, you'd act just as if he were "borrowing" water or electricity. First, talk to him about the problem and if that doesn't work, go to the authorities or lock stuff up. Am I missing something?
wireless
networking
security
null
null
11/08/2011 07:04:55
off topic
Should a wireless network be open? === Obviously there are security reasons to close a wireless network and it's not fun if someone is stealing your bandwidth. But how much of a problem is this? To address the first concern: Does a device on the same wireless network have any special privileges or access that an other device on the internet has? (Assume the wireless network is connected to the internet.) The second seems like a community issue. If your neighbor is stealing bandwidth, you'd act just as if he were "borrowing" water or electricity. First, talk to him about the problem and if that doesn't work, go to the authorities or lock stuff up. Am I missing something?
2
32,966
08/28/2008 18:12:38
757
08/08/2008 15:38:57
21
5
How to program user preferences
I'm using Ruby on Rails for an internal site. Different users of the site have access to a wide variety of data and highly disparate perspectives of the data. Within those different classes of users, there needs to be levels of access. Within the levels of access I need to be able to add features from other classes of users. In the released "Version 1.0" of the intranet site I have implemented the general classes of users. I am now needed to implement much finer-grained control of a users access. The question is how? What is the generally accepted practice for coding up user preferences (display the map (or not); access to this feature, but not this feature) without exploding the database schema and populating the view code with <% if feature_allowed %> tags everywhere.
ruby
ruby-on-rails
usercontrols
user-interface
null
null
open
How to program user preferences === I'm using Ruby on Rails for an internal site. Different users of the site have access to a wide variety of data and highly disparate perspectives of the data. Within those different classes of users, there needs to be levels of access. Within the levels of access I need to be able to add features from other classes of users. In the released "Version 1.0" of the intranet site I have implemented the general classes of users. I am now needed to implement much finer-grained control of a users access. The question is how? What is the generally accepted practice for coding up user preferences (display the map (or not); access to this feature, but not this feature) without exploding the database schema and populating the view code with <% if feature_allowed %> tags everywhere.
0
32,986
08/28/2008 18:16:54
3,484
08/28/2008 18:14:05
1
0
NSEnumerator performance vs for loop in Cocoa
I know that if you have a loop that modifies the count of the items in the loop, using the NSEnumerator on a set is the best way to make sure your code blows up, however I would like to understand the performance tradeoffs between the NSEnumerator class and just an old school for loop
cocoa
nsenumerator
apple
performance
c
null
open
NSEnumerator performance vs for loop in Cocoa === I know that if you have a loop that modifies the count of the items in the loop, using the NSEnumerator on a set is the best way to make sure your code blows up, however I would like to understand the performance tradeoffs between the NSEnumerator class and just an old school for loop
0
32,991
08/28/2008 18:18:29
1,965
08/19/2008 15:51:08
1,834
105
Leaving your harddrive shared
The leaving your wireless network open question reminded me of this. I typically share the root drive on my machines across my network, and tie login authorization to the machines NT ID, so there is at least some form of protection. My question, how easy is it to gain access to these drives for ill good? Is the authorization enough, or should I lock things down more?
security
windows
networking
null
null
null
open
Leaving your harddrive shared === The leaving your wireless network open question reminded me of this. I typically share the root drive on my machines across my network, and tie login authorization to the machines NT ID, so there is at least some form of protection. My question, how easy is it to gain access to these drives for ill good? Is the authorization enough, or should I lock things down more?
0
33,034
08/28/2008 18:37:07
3,508
08/28/2008 18:37:07
1
0
How do banks remember "your computer"?
As many of you probably know, online banks nowadays have a security system whereby you are asked some personal questions before you even enter your password. Once you have answered them, you can choose for the bank to "remember this computer" so that in the future you can login by only entering your password. How does the "remember this computer" part work? I know it cannot be cookies, because the feature still works despite the fact that I clear all of my cookies. I thought it might be by IP address, but my friend with a dynamic IP claims it works for him, too (but maybe he's wrong). He thought it was MAC address or something, but I strongly doubt that! So, is there a concept of https-only cookies that I don't clear? Finally, the programming part of the question: how can I do something similar myself in, say, PHP?
https
onlinebanking
sessiontracking
null
null
null
open
How do banks remember "your computer"? === As many of you probably know, online banks nowadays have a security system whereby you are asked some personal questions before you even enter your password. Once you have answered them, you can choose for the bank to "remember this computer" so that in the future you can login by only entering your password. How does the "remember this computer" part work? I know it cannot be cookies, because the feature still works despite the fact that I clear all of my cookies. I thought it might be by IP address, but my friend with a dynamic IP claims it works for him, too (but maybe he's wrong). He thought it was MAC address or something, but I strongly doubt that! So, is there a concept of https-only cookies that I don't clear? Finally, the programming part of the question: how can I do something similar myself in, say, PHP?
0
33,042
08/28/2008 18:40:00
1,304
08/14/2008 13:19:08
46
9
how can I measure code coverage of my unit tests automatically?
I have a very large code base that contains extensive unit tests (using CppUnit). <b>I need to work out what percentage of the code is exercised by these tests</b>, and (ideally) generate some sort of report that tells me on a per-library or per-file basis, how much of the code was exercised. Here's the kicker: this has to run completely unnatended (eventually inside a continuous integration build), and has to be cross platform (well, WIN32 and *nix at least). Can anyone suggest a tool, or set of tools that can help me do this? I can't change away from CppUnit (nor would I want to - it kicks ass), but otherwise I'm eager to hear any recommendations you might have. Cheers,
c++
cppunit
unit-testing
crossplatform
coverage
null
open
how can I measure code coverage of my unit tests automatically? === I have a very large code base that contains extensive unit tests (using CppUnit). <b>I need to work out what percentage of the code is exercised by these tests</b>, and (ideally) generate some sort of report that tells me on a per-library or per-file basis, how much of the code was exercised. Here's the kicker: this has to run completely unnatended (eventually inside a continuous integration build), and has to be cross platform (well, WIN32 and *nix at least). Can anyone suggest a tool, or set of tools that can help me do this? I can't change away from CppUnit (nor would I want to - it kicks ass), but otherwise I'm eager to hear any recommendations you might have. Cheers,
0
33,048
08/28/2008 18:41:21
2,569
08/22/2008 23:10:37
1
0
How would you test observers with rSpec
Suppose you have an ActiveRecord::Observer - how do you test this observer with rSpec?
rspec
ruby-on-rails
ruby
testing
activerecordobserver
null
open
How would you test observers with rSpec === Suppose you have an ActiveRecord::Observer - how do you test this observer with rSpec?
0
33,055
08/28/2008 18:43:59
3,396
08/28/2008 12:43:15
3
0
what is the best way to backup subversion repositories?
I'm new to svn and I'd like to know what are common methods of backing up repositories in a windows environment?
svn
null
null
null
null
null
open
what is the best way to backup subversion repositories? === I'm new to svn and I'd like to know what are common methods of backing up repositories in a windows environment?
0
33,061
08/28/2008 18:45:55
3,493
08/28/2008 18:45:54
1
0
Best way to export a QTMovie with a fade-in and fade-out in the audio
I want to take a QTMovie that I have and export it with the audio fading in and fading out for a predetermined amount of time. I want to do this within Cocoa as much as possible. The movie will likely only have audio in it. My research has turned up a couple of possibilities: 1. Use the newer Audio Context Insert APIs. <http://developer.apple.com/DOCUMENTATION/QuickTime/Conceptual/QT7-2_Update_Guide/NewFeaturesChangesEnhancements/chapter_2_section_11.html>. This appears to be the most modern was to accomplish this. 2. Use the Quicktime audio extraction APIs to pull out the audio track of the movie and process it and then put the processed audio back into the movie replacing the original audio. Am I missing some much easier method?
osx
cocoa
objective-c
null
null
null
open
Best way to export a QTMovie with a fade-in and fade-out in the audio === I want to take a QTMovie that I have and export it with the audio fading in and fading out for a predetermined amount of time. I want to do this within Cocoa as much as possible. The movie will likely only have audio in it. My research has turned up a couple of possibilities: 1. Use the newer Audio Context Insert APIs. <http://developer.apple.com/DOCUMENTATION/QuickTime/Conceptual/QT7-2_Update_Guide/NewFeaturesChangesEnhancements/chapter_2_section_11.html>. This appears to be the most modern was to accomplish this. 2. Use the Quicktime audio extraction APIs to pull out the audio track of the movie and process it and then put the processed audio back into the movie replacing the original audio. Am I missing some much easier method?
0
33,063
08/28/2008 18:46:24
2,187
08/20/2008 20:30:43
13
2
Looking for Regex to find quoted newlines in a big string (for C#)
I have a big string (let's call it a CSV file, though it isn't actually one, it'll just be easier for now) that I have to parse in C# code. The first step of the parsing process splits the file into individual lines by just using a StreamReader object and calling ReadLine until it's through the file. However, any given line might contain a quoted (in single quotes) literal with embedded newlines. I need to find those newlines and convert them temporarily into some other kind of token or escape sequence until I've split the file into an array of lines..then I can change them back. Example input data: 1,2,10,99,'Some text without a newline', true, false, 90 2,1,11,98,'This text has an embedded newline and continues here', true, true, 90 I could write all of the C# code needed to do this by using string.IndexOf to find the quoted sections and look within them for newlines, but I'm thinking a Regex might be a better choice (i.e. [now I have two problems](http://regex.info/blog/2006-09-15/247))
c#
regex
null
null
null
null
open
Looking for Regex to find quoted newlines in a big string (for C#) === I have a big string (let's call it a CSV file, though it isn't actually one, it'll just be easier for now) that I have to parse in C# code. The first step of the parsing process splits the file into individual lines by just using a StreamReader object and calling ReadLine until it's through the file. However, any given line might contain a quoted (in single quotes) literal with embedded newlines. I need to find those newlines and convert them temporarily into some other kind of token or escape sequence until I've split the file into an array of lines..then I can change them back. Example input data: 1,2,10,99,'Some text without a newline', true, false, 90 2,1,11,98,'This text has an embedded newline and continues here', true, true, 90 I could write all of the C# code needed to do this by using string.IndexOf to find the quoted sections and look within them for newlines, but I'm thinking a Regex might be a better choice (i.e. [now I have two problems](http://regex.info/blog/2006-09-15/247))
0
33,073
08/28/2008 18:50:31
1,412
08/15/2008 15:05:57
440
25
Ignore Emacs temporary files in a diff
How do I make `diff` ignore temporary files like `foo.c~`? Is there a configuration file that will make ignoring temporaries the default? More generally: what's the best way to generate a "clean" patch off a tarball? I do this rarely enough (submitting a bug fix to an OSS project by email) that I always struggle with it... EDIT: OK, the short answer is diff -ruN -x *~ ... Is there a better answer? E.g., can this go in a configuration file?
diff
emacs
patchgeneration
patch
null
null
open
Ignore Emacs temporary files in a diff === How do I make `diff` ignore temporary files like `foo.c~`? Is there a configuration file that will make ignoring temporaries the default? More generally: what's the best way to generate a "clean" patch off a tarball? I do this rarely enough (submitting a bug fix to an OSS project by email) that I always struggle with it... EDIT: OK, the short answer is diff -ruN -x *~ ... Is there a better answer? E.g., can this go in a configuration file?
0
33,076
08/28/2008 18:51:32
2,695
08/24/2008 15:29:59
513
39
Pattern recognition algorithms
In the past I had to develop a program which acted as a rule evaluator. You had an antecedent and some consecuents (actions) so if the antecedent evaled to true the actions where performed. At that time I used a modified version of the [RETE algorithm][1] (there are three versions of RETE only the first being public) for the antecedent pattern matching. We're talking about a big system here with million of operations per rule and some operators "repeated" in several rules. It's possible I'll have to implement it all over again in other language and, even though I'm experienced in RETE, does anyone know of other pattern matching algorithms? Any suggestions or should I keep using RETE? [1]: http://en.wikipedia.org/wiki/Rete_algorithm
pattern-recognition
algorithm
null
null
null
null
open
Pattern recognition algorithms === In the past I had to develop a program which acted as a rule evaluator. You had an antecedent and some consecuents (actions) so if the antecedent evaled to true the actions where performed. At that time I used a modified version of the [RETE algorithm][1] (there are three versions of RETE only the first being public) for the antecedent pattern matching. We're talking about a big system here with million of operations per rule and some operators "repeated" in several rules. It's possible I'll have to implement it all over again in other language and, even though I'm experienced in RETE, does anyone know of other pattern matching algorithms? Any suggestions or should I keep using RETE? [1]: http://en.wikipedia.org/wiki/Rete_algorithm
0
33,079
08/28/2008 18:52:49
2,148
08/20/2008 15:20:13
188
18
Fighting programmer colors.
<img alt="Kicking the Llama" title="Kicking the Llama" src="http://www.ok-cancel.com/strips/okcancel20031010.gif" width="640"/> I have a couple of pet projects where I'm the sole designer/programmer and I spend too much time changing the user interface to make it easier to use **by real users** and avoiding **bright yellow and green** that is so common on "programmer" designs. Do you have tips to choose a color scheme when you do not have a graphics designer around? How do you avoid creating the typical "programmer" interface?
user-interface
graphic-design
colors
null
null
null
open
Fighting programmer colors. === <img alt="Kicking the Llama" title="Kicking the Llama" src="http://www.ok-cancel.com/strips/okcancel20031010.gif" width="640"/> I have a couple of pet projects where I'm the sole designer/programmer and I spend too much time changing the user interface to make it easier to use **by real users** and avoiding **bright yellow and green** that is so common on "programmer" designs. Do you have tips to choose a color scheme when you do not have a graphics designer around? How do you avoid creating the typical "programmer" interface?
0
33,080
08/28/2008 18:52:53
1,226
08/13/2008 13:55:55
131
11
Setting the height of a DIV dynamically
In a web application I'm working on, I have a page that contains a DIV that has an auto-width depending on the width of the browser window. However, I need to be able to have an auto-height for the object. The DIV starts about 300px from the top screen, and it's height should make it stretch to the bottom of the browser screen. I have a max height for the container DIV, so there would have to be minimum-height for the div. But I believe I can just restrict that in CSS, and use Javascript to handle the resizing of the DIV. My javascript isn't nearly as good as it should be. Is there an easy script I could write that would do this for me?
html
css
javascript
div
height
null
open
Setting the height of a DIV dynamically === In a web application I'm working on, I have a page that contains a DIV that has an auto-width depending on the width of the browser window. However, I need to be able to have an auto-height for the object. The DIV starts about 300px from the top screen, and it's height should make it stretch to the bottom of the browser screen. I have a max height for the container DIV, so there would have to be minimum-height for the div. But I believe I can just restrict that in CSS, and use Javascript to handle the resizing of the DIV. My javascript isn't nearly as good as it should be. Is there an easy script I could write that would do this for me?
0
33,086
08/28/2008 18:55:06
1,942
08/19/2008 14:45:43
88
10
ensuring uploaded files are safe
My boss has come to me and asked how to enure a file uploaded through web page is safe. He wants people to be able to upload pdfs and tiff images (and the like) and his real concern is someone embedding a virus in a pdf that is then viewed/altered (and the virus executed). I just read something on a procedure that could be used to destroy stenographic information emebedded in images by altering least sifnificant bits. Could a similar process be used to enusre that a virus isn't implanted? Does anyone know of any programs that can scrub files?
security
antivirus
null
null
null
null
open
ensuring uploaded files are safe === My boss has come to me and asked how to enure a file uploaded through web page is safe. He wants people to be able to upload pdfs and tiff images (and the like) and his real concern is someone embedding a virus in a pdf that is then viewed/altered (and the virus executed). I just read something on a procedure that could be used to destroy stenographic information emebedded in images by altering least sifnificant bits. Could a similar process be used to enusre that a virus isn't implanted? Does anyone know of any programs that can scrub files?
0
33,089
08/28/2008 18:55:32
83
08/01/2008 16:31:56
921
75
How do I use ASP.NET Login Controls when my Login.aspx is not at the root of my application?
I'm using the [ASP.NET Login Controls][1] and [Forms Authentication][2] for membership/credentials for an ASP.NET web application. It keeps redirecting to a Login.aspx page at the root of my application that does not exist. My login page is within a folder. [1]: http://msdn.microsoft.com/en-us/library/ms178329.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480476.aspx
asp.net
null
null
null
null
null
open
How do I use ASP.NET Login Controls when my Login.aspx is not at the root of my application? === I'm using the [ASP.NET Login Controls][1] and [Forms Authentication][2] for membership/credentials for an ASP.NET web application. It keeps redirecting to a Login.aspx page at the root of my application that does not exist. My login page is within a folder. [1]: http://msdn.microsoft.com/en-us/library/ms178329.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480476.aspx
0
33,103
08/28/2008 18:58:36
1,450
08/15/2008 16:26:21
699
39
How Do Sites Supress Pasting Text?
I've noticed that some sites (usually banks) supress the ability to paste text into text fields. How is this done? I know that JavaScript can be used to swallow the keyboard shortcut for paste, but what about the right-click menu item?
javascript
onlinebanking
web-applications
null
null
null
open
How Do Sites Supress Pasting Text? === I've noticed that some sites (usually banks) supress the ability to paste text into text fields. How is this done? I know that JavaScript can be used to swallow the keyboard shortcut for paste, but what about the right-click menu item?
0
33,104
08/28/2008 18:58:39
1,456
08/15/2008 17:03:51
15
0
Communicating between websites (using Javascript or ?)
Here's my problem - I'd like to communicate between two websites and I'm looking for a clean solution. The current solution uses Javascript but there are nasty workarounds because of (understandable) cross-site scripting restrictions. At the moment, **website A** opens a modal window containing **website B** using a [jQuery](http://jquery.com/) plug-in called [jqModal](http://dev.iceburg.net/jquery/jqModal/). **Website B** does some work and returns some results to **website A**. To return that information we have to workaround cross-site scripting restrictions - **website B** creates an iframe that refers to a page on **website A** and includes fragment identifiers containing the information to be returned. The iframe is polled by **website A** to detect the returned information. It's a [common technique](http://tagneto.blogspot.com/2006/06/cross-domain-frame-communication-with.html) but it's hacky. There are variations such as [CrossSite](http://www.julienlecomte.net/blog/2007/11/31/) and I could perhaps use an HTTP POST from **website B** to **website A** but I'm trying to avoid page refreshes. Does anyone have any alternatives?
website
javascript
jquery
xss
hack
null
open
Communicating between websites (using Javascript or ?) === Here's my problem - I'd like to communicate between two websites and I'm looking for a clean solution. The current solution uses Javascript but there are nasty workarounds because of (understandable) cross-site scripting restrictions. At the moment, **website A** opens a modal window containing **website B** using a [jQuery](http://jquery.com/) plug-in called [jqModal](http://dev.iceburg.net/jquery/jqModal/). **Website B** does some work and returns some results to **website A**. To return that information we have to workaround cross-site scripting restrictions - **website B** creates an iframe that refers to a page on **website A** and includes fragment identifiers containing the information to be returned. The iframe is polled by **website A** to detect the returned information. It's a [common technique](http://tagneto.blogspot.com/2006/06/cross-domain-frame-communication-with.html) but it's hacky. There are variations such as [CrossSite](http://www.julienlecomte.net/blog/2007/11/31/) and I could perhaps use an HTTP POST from **website B** to **website A** but I'm trying to avoid page refreshes. Does anyone have any alternatives?
0
33,113
08/28/2008 19:00:40
327
08/04/2008 17:08:49
507
31
Is there any way to override the drag and drop behavior of an existing app in Windows?
I would like to extend some existing applications' drag and drop behavior, and I'm wondering if there is any way to hack on drag and drop support or changes to drag and drop behavior by monitoring the app's message loop and injecting my own messages.
windows
null
null
null
null
null
open
Is there any way to override the drag and drop behavior of an existing app in Windows? === I would like to extend some existing applications' drag and drop behavior, and I'm wondering if there is any way to hack on drag and drop support or changes to drag and drop behavior by monitoring the app's message loop and injecting my own messages.
0
33,115
08/28/2008 19:00:57
1,638
08/17/2008 17:58:57
350
41
Does C# have the notion of private and protected inheritance?
Does C# have the notion of private / protected inheritance, and if not, why? **C++** <pre> <code> class Foo : private Bar { public: ... }; </code> </pre> **C#** <pre> <code> public abstract NServlet class : private System.Web.UI.Page { // error "type expected" } </code> </pre> I am implementing a "servlet like" concept in an .aspx page and I don't want the concrete class to have the ability to see the internals of the System.Web.UI.Page base.
c#
inheritance
null
null
null
null
open
Does C# have the notion of private and protected inheritance? === Does C# have the notion of private / protected inheritance, and if not, why? **C++** <pre> <code> class Foo : private Bar { public: ... }; </code> </pre> **C#** <pre> <code> public abstract NServlet class : private System.Web.UI.Page { // error "type expected" } </code> </pre> I am implementing a "servlet like" concept in an .aspx page and I don't want the concrete class to have the ability to see the internals of the System.Web.UI.Page base.
0
33,117
08/28/2008 19:01:03
1,565
08/16/2008 17:35:45
41
7
Building a custom Linux Live CD
Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch? I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts the cards in a machine, boots off the CD, the CD writes the firmware, they power off and pull the cards. Because of this cycle, it's essential that the CD boot and shut down as quickly as possible. The problem is that with the next generation of cards, I have to update the CD to a 2.6 kernel. It's easy enough to acquire a pre-existing live CD - but those all are designed for showing off Linux on the desktop - which means they take forever to boot. Can anyone fix me up with a current How-To?
linux
null
null
null
null
null
open
Building a custom Linux Live CD === Can anyone point me to a good tutorial on creating a bootable Linux CD from scratch? I need help with a fairly specialized problem: my firm sells an expansion card that requires custom firmware. Currently we use an extremely old live CD image of RH7.2 that we update with current firmware. Manufacturing puts the cards in a machine, boots off the CD, the CD writes the firmware, they power off and pull the cards. Because of this cycle, it's essential that the CD boot and shut down as quickly as possible. The problem is that with the next generation of cards, I have to update the CD to a 2.6 kernel. It's easy enough to acquire a pre-existing live CD - but those all are designed for showing off Linux on the desktop - which means they take forever to boot. Can anyone fix me up with a current How-To?
0
33,144
08/28/2008 19:10:51
3,494
08/28/2008 18:54:48
1
1
Windows Mobile Development, alternatives to visual studio?
I am looking to start writing apps for my Windows Mobile 6.1 professional device (Sprint Mogul/HTC Titan). I use the copy of Visual Studio 2003 that I bought in college for all of my current contracting work, (all of my day job work is done on a company laptop). From what I can tell from MSDN in order to develop using windows Mobile 5 or 6 SDK I need to have at least Visual Studio 2005 Standard and I really don't feel like shelling out that much cash just to be able to develop for my phone. Are there any free tools available to develop for Windows mobile? Or is there an affordable way to get VS that I am overlooking?
windows-mobile
null
null
null
null
null
open
Windows Mobile Development, alternatives to visual studio? === I am looking to start writing apps for my Windows Mobile 6.1 professional device (Sprint Mogul/HTC Titan). I use the copy of Visual Studio 2003 that I bought in college for all of my current contracting work, (all of my day job work is done on a company laptop). From what I can tell from MSDN in order to develop using windows Mobile 5 or 6 SDK I need to have at least Visual Studio 2005 Standard and I really don't feel like shelling out that much cash just to be able to develop for my phone. Are there any free tools available to develop for Windows mobile? Or is there an affordable way to get VS that I am overlooking?
0
33,150
08/28/2008 19:11:34
2,017
08/19/2008 20:01:30
91
4
How to pass method name to custom server control in asp.net?
I am working on a Customer Server Control that extends another control. There is no problem with attaching to other controls on the form. in vb.net: Parent.FindControl(TargetControlName) I would like to pass a method to the control in the ASPX markup. for example: &lt;c:MyCustomerControl runat=server InitializeStuffCallback="InitializeStuff"&gt; So, I tried using reflection to access the given method name from the Parent. Something like (in VB) Dim pageType As Type = Page.GetType Dim CallbackMethodInfo As MethodInfo = pageType.GetMethod( "MethodName" ) 'Also tried sender.Parent.GetType.GetMethod("MethodName") sender.Parent.Parent.GetType.GetMethod("MethodName") The method isn't found, because it just isn't apart of the Page. Where should I be looking? I'm fairly sure this is possible because I've seen other controls do similar. ---------- I forgot to mention, my work-around is to give the control events and attaching to them in the Code-behind.
c#
asp.net
vb.net
custom-server-controls
webcontrols
null
open
How to pass method name to custom server control in asp.net? === I am working on a Customer Server Control that extends another control. There is no problem with attaching to other controls on the form. in vb.net: Parent.FindControl(TargetControlName) I would like to pass a method to the control in the ASPX markup. for example: &lt;c:MyCustomerControl runat=server InitializeStuffCallback="InitializeStuff"&gt; So, I tried using reflection to access the given method name from the Parent. Something like (in VB) Dim pageType As Type = Page.GetType Dim CallbackMethodInfo As MethodInfo = pageType.GetMethod( "MethodName" ) 'Also tried sender.Parent.GetType.GetMethod("MethodName") sender.Parent.Parent.GetType.GetMethod("MethodName") The method isn't found, because it just isn't apart of the Page. Where should I be looking? I'm fairly sure this is possible because I've seen other controls do similar. ---------- I forgot to mention, my work-around is to give the control events and attaching to them in the Code-behind.
0
33,166
08/28/2008 19:18:33
83
08/01/2008 16:31:56
926
76
How do I keep my Login.aspx page's ReturnUrl parameter from overriding my ASP.NET Login control's DestinationPageUrl property?
I'm using the [ASP.NET Login Controls][1] and [Forms Authentication][2] for membership/credentials for an ASP.NET web application. I've got pages such as *PasswordRecovery.aspx* that are accessable to only Anonymous users. When I click my login link from such a page, the login page has a *ReturnUrl* parameter in the address bar: > http://www.example.com/Login.aspx?ReturnUrl=PasswordRecovery.aspx And then after a successful login, users are returned to the *PasswordRecovery.aspx* page specified in the *ReturnUrl* parameter to which they no longer have access. [1]: http://msdn.microsoft.com/en-us/library/ms178329.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480476.aspx
asp.net
forms-authentication
null
null
null
null
open
How do I keep my Login.aspx page's ReturnUrl parameter from overriding my ASP.NET Login control's DestinationPageUrl property? === I'm using the [ASP.NET Login Controls][1] and [Forms Authentication][2] for membership/credentials for an ASP.NET web application. I've got pages such as *PasswordRecovery.aspx* that are accessable to only Anonymous users. When I click my login link from such a page, the login page has a *ReturnUrl* parameter in the address bar: > http://www.example.com/Login.aspx?ReturnUrl=PasswordRecovery.aspx And then after a successful login, users are returned to the *PasswordRecovery.aspx* page specified in the *ReturnUrl* parameter to which they no longer have access. [1]: http://msdn.microsoft.com/en-us/library/ms178329.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480476.aspx
0
33,174
08/28/2008 19:20:38
757
08/08/2008 15:38:57
21
6
Accessing Sharepoint from outside the WebUI
Is it possible to access the database backend of a sharepoint server? My company uses Sharepoint to store data and pictures of various assets. Ideally I would be able to access the data and display it in my application to allow users both methods of access. Before I go talk to the IT department I would like to find out if this is even possible?
sql-server
sharepoint
null
null
null
null
open
Accessing Sharepoint from outside the WebUI === Is it possible to access the database backend of a sharepoint server? My company uses Sharepoint to store data and pictures of various assets. Ideally I would be able to access the data and display it in my application to allow users both methods of access. Before I go talk to the IT department I would like to find out if this is even possible?
0
33,175
08/28/2008 19:22:17
1,302
08/14/2008 13:04:10
38
4
How to tell the data types after executing a stored procedure?
Is there a way when executing a stored procedure in Management Studio to get the data types of the result sets coming back? I'm looking for something like functionality of when you pass a table name to sp_help
sql-server
mssql
tsql
management-studio
null
null
open
How to tell the data types after executing a stored procedure? === Is there a way when executing a stored procedure in Management Studio to get the data types of the result sets coming back? I'm looking for something like functionality of when you pass a table name to sp_help
0
33,204
08/28/2008 19:40:55
238
08/03/2008 21:42:37
1,262
57
When to commit changes?
Using oracle 10g , acced via perl DBI , I have a table with a few tens of million rows being updated a few times per second while being read from much more frequently form another process. Soon the update frequency will increase by an order of magnitude (maybe two). Someone suggested that committing every N updates instead of after every update will help performance. I have a few questions: * Will that be faster or slower or it depends (planning to benchmark both way as soon as can get a decent simulation of the new load) * Why will it help / hinder performance. * If "it depends ..." , on what ? * If it helps what's the best value of N ? * Why can't my local DBA have an helpful straight answer when I need one? (Actually I know the answer to that one) :-)
oracle
sql
null
null
null
null
open
When to commit changes? === Using oracle 10g , acced via perl DBI , I have a table with a few tens of million rows being updated a few times per second while being read from much more frequently form another process. Soon the update frequency will increase by an order of magnitude (maybe two). Someone suggested that committing every N updates instead of after every update will help performance. I have a few questions: * Will that be faster or slower or it depends (planning to benchmark both way as soon as can get a decent simulation of the new load) * Why will it help / hinder performance. * If "it depends ..." , on what ? * If it helps what's the best value of N ? * Why can't my local DBA have an helpful straight answer when I need one? (Actually I know the answer to that one) :-)
0
33,207
08/28/2008 19:41:30
2,339
08/21/2008 17:27:28
1
0
What is the best way to unit test Objective-C code
What frameworks exists to unit test Objective-C code. I would like a framework that integrates nicely with Xcode.
objectivec
cocoa
null
null
null
null
open
What is the best way to unit test Objective-C code === What frameworks exists to unit test Objective-C code. I would like a framework that integrates nicely with Xcode.
0
33,217
08/28/2008 19:45:03
337
08/04/2008 18:11:42
111
5
How can you implement trackbacks on a custom-coded blog (written in C#)?
Title says it all.
blogs
c#
null
null
null
null
open
How can you implement trackbacks on a custom-coded blog (written in C#)? === Title says it all.
0
33,222
08/28/2008 19:47:24
1,143
08/12/2008 18:58:24
569
41
Compact Framework - Lightweight GUI Framework?
Winform is a bit heavy.... a bit slow and you can't control the paint event so during processor intensive operations the UI might leave the user staring at a half rendered screen. Nice! To alleviate this issue I would seek a lightweight control framework, is there one kicking about already or would one have to homebrew? By lightweight I mean a control library that enables one to fully control painting of controls and doesn't use many expensive windows handles.
compactframework
gdi+
windows-ce
null
null
null
open
Compact Framework - Lightweight GUI Framework? === Winform is a bit heavy.... a bit slow and you can't control the paint event so during processor intensive operations the UI might leave the user staring at a half rendered screen. Nice! To alleviate this issue I would seek a lightweight control framework, is there one kicking about already or would one have to homebrew? By lightweight I mean a control library that enables one to fully control painting of controls and doesn't use many expensive windows handles.
0
33,223
08/28/2008 19:47:58
2,640
08/23/2008 20:40:36
1
1
Is elegant, semantic CSS with ASP.Net still a pipe dream?
I know Microsoft has made efforts in the direction of semantic and cross-browser compliant XHTML and CSS, but it still seems like a PitA to pull off elegant markup. I've downloaded and tweaked the CSS Friendly Adapters and all that. But I still find myself frustrated with bloated and unattractive code. Is elegant, semantic CSS with ASP.Net still a pipe dream? Or is it finally possible, I just need more practice?
asp.net
css
friendly
adapters
xhtml
null
open
Is elegant, semantic CSS with ASP.Net still a pipe dream? === I know Microsoft has made efforts in the direction of semantic and cross-browser compliant XHTML and CSS, but it still seems like a PitA to pull off elegant markup. I've downloaded and tweaked the CSS Friendly Adapters and all that. But I still find myself frustrated with bloated and unattractive code. Is elegant, semantic CSS with ASP.Net still a pipe dream? Or is it finally possible, I just need more practice?
0
33,226
08/28/2008 19:48:49
3,475
08/28/2008 17:53:18
1
0
In SQL Server 2000, is there a sysobjects query that will retrieve user views and not system views?
Assuming such a query exists, I would greatly appreciate the help. I'm trying to develop a permissions script that will grant "select" and "references" permissions on the user tables and views in a database. My hope is that executing the "grant" commands on each element in such a set will make it easier to keep permissions current when new tables and views are added to the database.
sqlserver
sysobjects
null
null
null
null
open
In SQL Server 2000, is there a sysobjects query that will retrieve user views and not system views? === Assuming such a query exists, I would greatly appreciate the help. I'm trying to develop a permissions script that will grant "select" and "references" permissions on the user tables and views in a database. My hope is that executing the "grant" commands on each element in such a set will make it easier to keep permissions current when new tables and views are added to the database.
0
33,233
08/28/2008 19:51:37
1,143
08/12/2008 18:58:24
569
41
Integrating a custom gui framework with the VS designer
Imagine you homebrew a custom gui framework that _doesn't_ use windows handles (compact framework, so please don't argue with "whys"). One of the main disadvantages of developing such a framework is that you lose compatability with the winform designer. So my question is to all of you who know a lot about VS customisation, would there be a clever mechanism by which one could incorperate the gui framework into the designer and get it to spit out your custom code instead of the standard windows stuff in the InitialiseComponent() method?
visual-studio
gui-designer
null
null
null
null
open
Integrating a custom gui framework with the VS designer === Imagine you homebrew a custom gui framework that _doesn't_ use windows handles (compact framework, so please don't argue with "whys"). One of the main disadvantages of developing such a framework is that you lose compatability with the winform designer. So my question is to all of you who know a lot about VS customisation, would there be a clever mechanism by which one could incorperate the gui framework into the designer and get it to spit out your custom code instead of the standard windows stuff in the InitialiseComponent() method?
0
33,242
08/28/2008 19:54:02
5
07/31/2008 14:22:31
2,261
94
How can I find unused images and CSS styles in a website?
Is there a tool or methodology (other than trial and error) I can use to find unused image files? How about CSS declarations for ID's and Classes that don't even exist in the site? It seems like there might be a way to just spider the site, profile it, and see which images and styles are never loaded.
html
css
null
null
null
null
open
How can I find unused images and CSS styles in a website? === Is there a tool or methodology (other than trial and error) I can use to find unused image files? How about CSS declarations for ID's and Classes that don't even exist in the site? It seems like there might be a way to just spider the site, profile it, and see which images and styles are never loaded.
0
33,250
08/28/2008 19:58:10
91
08/01/2008 17:55:22
4,923
231
Caching Active Directory Data
In one of my applications, I am querying active directory to get a list of all users below a given user (using the "Direct Reports" thing). So basically, given the name of the person, it is looked up in AD, then the Direct Reports are read. But then for every direct report, the tool needs to check the direct reports of the direct reports. Or, more abstract: The Tool will use a person as the root of the tree and then walk down the complete tree to get the names of all the leaves (can be several hundred) Now, my concern is obviously performance, as this needs to be done quite a few times. My idea is to manually cache that (essentially just put all the names in a long string and store that somewhere and update it once a day). But I just wonder if there is a more elegant way to first get the information and then cache it, possibly using something in the System.DirectoryServices Namespace?
c#
asp.net
activedirectory
null
null
null
open
Caching Active Directory Data === In one of my applications, I am querying active directory to get a list of all users below a given user (using the "Direct Reports" thing). So basically, given the name of the person, it is looked up in AD, then the Direct Reports are read. But then for every direct report, the tool needs to check the direct reports of the direct reports. Or, more abstract: The Tool will use a person as the root of the tree and then walk down the complete tree to get the names of all the leaves (can be several hundred) Now, my concern is obviously performance, as this needs to be done quite a few times. My idea is to manually cache that (essentially just put all the names in a long string and store that somewhere and update it once a day). But I just wonder if there is a more elegant way to first get the information and then cache it, possibly using something in the System.DirectoryServices Namespace?
0
33,252
08/28/2008 19:58:58
1,143
08/12/2008 18:58:24
569
41
Getting files and their version numbers from sharepoint
As a temporary stopgap until all the designers are in place we are currently hand-cranking a whole bunch of xml configuration files at work. One of the issues with this is file-versioning because people forget to update version numbers when updating the files (which is to be expected as humans generally suck at perfection). Therefore I figure that as we store the files in Sharepoint I should be able to write a script to pull the files down from Sharepoint, get the version number and automatically enter/update the version number from Sharepoint into the file. This means when someone wants the "latest" files they can run the script and get the latest files with the version numbers correct (there is slightly more to it than this so the reason for using the script isn't just the benefit of auto-versioning). Does anyone know how to get the files + version numbers from Sharepoint?
sharepoint
versioning
null
null
null
null
open
Getting files and their version numbers from sharepoint === As a temporary stopgap until all the designers are in place we are currently hand-cranking a whole bunch of xml configuration files at work. One of the issues with this is file-versioning because people forget to update version numbers when updating the files (which is to be expected as humans generally suck at perfection). Therefore I figure that as we store the files in Sharepoint I should be able to write a script to pull the files down from Sharepoint, get the version number and automatically enter/update the version number from Sharepoint into the file. This means when someone wants the "latest" files they can run the script and get the latest files with the version numbers correct (there is slightly more to it than this so the reason for using the script isn't just the benefit of auto-versioning). Does anyone know how to get the files + version numbers from Sharepoint?
0
33,262
08/28/2008 20:03:19
338
08/04/2008 18:34:44
567
46
How do I load an org.w3c.dom.Document from XML in a string?
I have a complete XML document in a string and would like a `Document` object. Google turns up all sorts of garbage. What is the simplest solution? (In Java 1.5)
java
xml
w3c
document
null
null
open
How do I load an org.w3c.dom.Document from XML in a string? === I have a complete XML document in a string and would like a `Document` object. Google turns up all sorts of garbage. What is the simplest solution? (In Java 1.5)
0
33,263
08/28/2008 20:05:19
83
08/01/2008 16:31:56
941
77
How do I best handle role based permissions using Forms Authentication on my ASP.NET web application?
I'm using the [ASP.NET Login Controls][1] and [Forms Authentication][2] for membership/credentials for an ASP.NET web application. I've got two roles: - Users - Administrators I want pages to be viewable by four different groups: - Everyone *(Default, Help)* - Anonymous *(CreateUser, Login, PasswordRecovery)* - Users *(ChangePassword, DataEntry)* - Administrators *(Report)* Expanding on the example in the [ASP.NET HOW DO I Video Series: Membership and Roles][3], I've put those page files into such folders: ![Visual Studio Solution Explorer][4] And I used the ASP.NET Web Site Administration Tool to set up access rules for each folder. It works but seems kludgy to me and it creates issues [when Login.aspx is not at the root][5] and with the [ReturnUrl parameter][6] of Login.aspx. Is there a better way to do this? Is there perhaps a simple way I can set permissions at the page level rather than at the folder level? [1]: http://msdn.microsoft.com/en-us/library/ms178329.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480476.aspx [3]: http://www.asp.net/learn/videos/video-45.aspx [4]: http://img122.imageshack.us/img122/3994/solutionexplorertg5.gif [5]: http://stackoverflow.com/questions/33089/how-do-i-use-aspnet-login-controls-when-my-loginaspx-is-not-at-the-root-of-my-a [6]: http://stackoverflow.com/questions/33166/how-do-i-keep-my-loginaspx-pages-returnurl-parameter-from-overriding-my-aspnet
asp.net
forms-authentication
null
null
null
null
open
How do I best handle role based permissions using Forms Authentication on my ASP.NET web application? === I'm using the [ASP.NET Login Controls][1] and [Forms Authentication][2] for membership/credentials for an ASP.NET web application. I've got two roles: - Users - Administrators I want pages to be viewable by four different groups: - Everyone *(Default, Help)* - Anonymous *(CreateUser, Login, PasswordRecovery)* - Users *(ChangePassword, DataEntry)* - Administrators *(Report)* Expanding on the example in the [ASP.NET HOW DO I Video Series: Membership and Roles][3], I've put those page files into such folders: ![Visual Studio Solution Explorer][4] And I used the ASP.NET Web Site Administration Tool to set up access rules for each folder. It works but seems kludgy to me and it creates issues [when Login.aspx is not at the root][5] and with the [ReturnUrl parameter][6] of Login.aspx. Is there a better way to do this? Is there perhaps a simple way I can set permissions at the page level rather than at the folder level? [1]: http://msdn.microsoft.com/en-us/library/ms178329.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480476.aspx [3]: http://www.asp.net/learn/videos/video-45.aspx [4]: http://img122.imageshack.us/img122/3994/solutionexplorertg5.gif [5]: http://stackoverflow.com/questions/33089/how-do-i-use-aspnet-login-controls-when-my-loginaspx-is-not-at-the-root-of-my-a [6]: http://stackoverflow.com/questions/33166/how-do-i-keep-my-loginaspx-pages-returnurl-parameter-from-overriding-my-aspnet
0
33,264
08/28/2008 20:05:23
2,644
08/23/2008 21:56:47
319
32
Book recommendation for Haskell?
I would like to start Haskell, just out of curiosity. What books do you recommend?
books
haskell
null
null
null
09/17/2011 21:59:41
not constructive
Book recommendation for Haskell? === I would like to start Haskell, just out of curiosity. What books do you recommend?
4