question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
142,068
142,330
Which database has the best support for replication
I have a fairly good feel for what MySQL replication can do. I'm wondering what other databases support replication, and how they compare to MySQL and others? Some questions I would have are: Is replication built in, or an add-on/plugin? How does the replication work (high-level)? MySQL provides statement-based replica...
MySQL's replication is weak inasmuch as one needs to sacrifice other functionality to get full master/master support (due to the restriction on supported backends). PostgreSQL's replication is weak inasmuch as only master/standby is supported built-in (using log shipping); more powerful solutions (such as Slony or Lond...
Which database has the best support for replication I have a fairly good feel for what MySQL replication can do. I'm wondering what other databases support replication, and how they compare to MySQL and others? Some questions I would have are: Is replication built in, or an add-on/plugin? How does the replication work ...
TITLE: Which database has the best support for replication QUESTION: I have a fairly good feel for what MySQL replication can do. I'm wondering what other databases support replication, and how they compare to MySQL and others? Some questions I would have are: Is replication built in, or an add-on/plugin? How does the...
[ "mysql", "sql-server", "database", "postgresql", "replication" ]
13
8
5,685
10
0
2008-09-26T21:22:26.060000
2008-09-26T22:20:40.023000
142,071
142,399
Symbian S60 Code Editor
I am looking for an app that will let me type in code ON my cellphone. I don't need to compile or anything, and its not to program for the cellphone. Just something nice to have when an idea pops in my head. Am I completely overlooking a simple code editor for Symbian S60v3 phones? I am looking for something similar to...
I've used pyEdit on my S60v2 phone, it looks like it's supported under v3 as well. It depends on the python runtime, so you'll need to install that first.
Symbian S60 Code Editor I am looking for an app that will let me type in code ON my cellphone. I don't need to compile or anything, and its not to program for the cellphone. Just something nice to have when an idea pops in my head. Am I completely overlooking a simple code editor for Symbian S60v3 phones? I am looking ...
TITLE: Symbian S60 Code Editor QUESTION: I am looking for an app that will let me type in code ON my cellphone. I don't need to compile or anything, and its not to program for the cellphone. Just something nice to have when an idea pops in my head. Am I completely overlooking a simple code editor for Symbian S60v3 pho...
[ "editor", "s60", "codehighlighter" ]
1
2
4,525
5
0
2008-09-26T21:23:03.080000
2008-09-26T22:45:15.753000
142,076
142,244
Is there use for the Scroll Lock button anymore?
The scroll lock button seems to be a reminder of the good old green terminal days. Does anyone still use it? Should the 101 button keyboard become the 100 button keyboard?
I use it all the time on Unix terminals. It is quite handy when something catches my eye when I'm tailing a log file.
Is there use for the Scroll Lock button anymore? The scroll lock button seems to be a reminder of the good old green terminal days. Does anyone still use it? Should the 101 button keyboard become the 100 button keyboard?
TITLE: Is there use for the Scroll Lock button anymore? QUESTION: The scroll lock button seems to be a reminder of the good old green terminal days. Does anyone still use it? Should the 101 button keyboard become the 100 button keyboard? ANSWER: I use it all the time on Unix terminals. It is quite handy when somethin...
[ "button", "keyboard", "scroll-lock" ]
13
11
10,041
13
0
2008-09-26T21:24:39.643000
2008-09-26T21:59:07.733000
142,101
142,130
Can I use OpenId with the ASP MembershipProvider?
I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and the standard login control. I would like to replace the login control with the one from DotNetOpenId. I override the ValidateUser which checks the username and password, but I shouldn't need to implement this when using OpenId. Is it p...
There is no inbuilt provider available. But you can always implement your own provider. Or you can check out this one available in codePlex.
Can I use OpenId with the ASP MembershipProvider? I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and the standard login control. I would like to replace the login control with the one from DotNetOpenId. I override the ValidateUser which checks the username and password, but I shouldn't...
TITLE: Can I use OpenId with the ASP MembershipProvider? QUESTION: I have a ASP.Net 2.0 website that is currently using a custom MembershipProvider and the standard login control. I would like to replace the login control with the one from DotNetOpenId. I override the ValidateUser which checks the username and passwor...
[ "asp.net", "asp.net-membership", "openid", "membership-provider", "dotnetopenauth" ]
11
6
2,093
3
0
2008-09-26T21:30:24.777000
2008-09-26T21:35:42.503000
142,110
142,187
VBScript Excel Formatting .xlsx files
Basically I want to know how to set center alignment for a cell using VBScript... I've been googling it and can't seem to find anything that helps.
Set excel = CreateObject("Excel.Application") excel.Workbooks.Add() ' create blank workbook Set workbook = excel.Workbooks(1) ' set A1 to be centered. workbook.Sheets(1).Cells(1,1).HorizontalAlignment = -4108 ' xlCenter constant. workbook.SaveAs("C:\NewFile.xls") excel.Quit() set excel = nothing 'If the script e...
VBScript Excel Formatting .xlsx files Basically I want to know how to set center alignment for a cell using VBScript... I've been googling it and can't seem to find anything that helps.
TITLE: VBScript Excel Formatting .xlsx files QUESTION: Basically I want to know how to set center alignment for a cell using VBScript... I've been googling it and can't seem to find anything that helps. ANSWER: Set excel = CreateObject("Excel.Application") excel.Workbooks.Add() ' create blank workbook Set workbook ...
[ "vbscript" ]
3
5
21,568
2
0
2008-09-26T21:31:52.247000
2008-09-26T21:48:24.860000
142,114
142,192
Best (free) way to store data? How about updates to the file system?
I have an idea for how to solve this problem, but I wanted to know if there's something easier and more extensible to my problem. The program I'm working on has two basic forms of data: images, and the information associated with those images. The information associated with the images has been previously stored in a J...
My brain is fried at the moment, so I'm not sure I can advise for or against a database, but if you're looking for version-agnostic serialization, you'd be a fool to not at least check into Protocol Buffers. Here's a quick list of implementations I know about for C#/.NET: protobuf-net Proto# jskeet's dotnet-protobufs
Best (free) way to store data? How about updates to the file system? I have an idea for how to solve this problem, but I wanted to know if there's something easier and more extensible to my problem. The program I'm working on has two basic forms of data: images, and the information associated with those images. The inf...
TITLE: Best (free) way to store data? How about updates to the file system? QUESTION: I have an idea for how to solve this problem, but I wanted to know if there's something easier and more extensible to my problem. The program I'm working on has two basic forms of data: images, and the information associated with tho...
[ "c#", "extensibility", "data-storage" ]
4
1
1,319
6
0
2008-09-26T21:32:37.703000
2008-09-26T21:49:45.573000
142,121
142,312
Unit Tests for comparing text files in NUnit
I have a class that processes a 2 xml files and produces a text file. I would like to write a bunch of unit / integration tests that can individually pass or fail for this class that do the following: For input A and B, generate the output. Compare the contents of the generated file to the contents expected output When...
As for the multiple tests with different data, use the NUnit RowTest extension: using NUnit.Framework.Extensions; [RowTest] [Row("x1.xml", "x2.xml", "x-expected.xml")] [Row("y1.xml", "y2.xml", "y-expected.xml")] public void TestGenerate(string pathToInputA, string pathToInputB, string pathToExpectedResult) { ReportGen...
Unit Tests for comparing text files in NUnit I have a class that processes a 2 xml files and produces a text file. I would like to write a bunch of unit / integration tests that can individually pass or fail for this class that do the following: For input A and B, generate the output. Compare the contents of the genera...
TITLE: Unit Tests for comparing text files in NUnit QUESTION: I have a class that processes a 2 xml files and produces a text file. I would like to write a bunch of unit / integration tests that can individually pass or fail for this class that do the following: For input A and B, generate the output. Compare the cont...
[ "unit-testing", "nunit", "diff", "text-files" ]
5
5
5,238
5
0
2008-09-26T21:34:05.533000
2008-09-26T22:16:05.963000
142,132
142,163
What are the key differences between ASP.NET webforms and MVC
I know what MVC is and I work in webforms but I don't know how MVC will be that much different. I guess the code behind model will be different. So will it be like webforms minus the code behind and instead having it in a controller? I see there are other related posts but I don't they address this.
For starters, MVC does not use the controls, in preference for good old standard 's and the like. Thus, you don't attach "events" to a control that get executed in a code-behind like you would in ASP. It relies on the standard http POST to do that. It does not use the viewstate object. It allows for more intelligent ur...
What are the key differences between ASP.NET webforms and MVC I know what MVC is and I work in webforms but I don't know how MVC will be that much different. I guess the code behind model will be different. So will it be like webforms minus the code behind and instead having it in a controller? I see there are other re...
TITLE: What are the key differences between ASP.NET webforms and MVC QUESTION: I know what MVC is and I work in webforms but I don't know how MVC will be that much different. I guess the code behind model will be different. So will it be like webforms minus the code behind and instead having it in a controller? I see ...
[ "asp.net", "asp.net-mvc" ]
10
13
12,342
5
0
2008-09-26T21:36:02.220000
2008-09-26T21:41:55.450000
142,151
142,198
How do I locate resources on the classpath in java? Specifically stuff that ends in .hbm.xml
How do I locate resources on the classpath in java? Specifically stuff that ends in.hbm.xml. My goal is to get a List of all resources on the classpath that end with ".hbm.xml".
You have to get a classloader, and test whether it's a URLClassLoader. If so, downcast and get its URLs. From there, open each as a JarFile and look at its entries. Apply a regex to each entry and see if it's one that interests you. Clearly, this isn't fast. It's best to be given a name to be looked up in the classpath...
How do I locate resources on the classpath in java? Specifically stuff that ends in .hbm.xml How do I locate resources on the classpath in java? Specifically stuff that ends in.hbm.xml. My goal is to get a List of all resources on the classpath that end with ".hbm.xml".
TITLE: How do I locate resources on the classpath in java? Specifically stuff that ends in .hbm.xml QUESTION: How do I locate resources on the classpath in java? Specifically stuff that ends in.hbm.xml. My goal is to get a List of all resources on the classpath that end with ".hbm.xml". ANSWER: You have to get a clas...
[ "java" ]
4
3
5,205
3
0
2008-09-26T21:39:47.080000
2008-09-26T21:51:00.327000
142,184
142,383
Is there an embeddable Webkit component for Windows / C# development?
I've seen a few COM controls which wrap the Gecko rendering engine ( GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll ). Is there a wrapper for Webkit that can be included in a.NET Winform application?
There's a WebKit-Sharp component on Mono's GitHub Repository. I can't find any web-viewable documentation on it, and I'm not even sure if it's WinForms or GTK# (can't grab the source from here to check at the moment), but it's probably your best bet, either way.
Is there an embeddable Webkit component for Windows / C# development? I've seen a few COM controls which wrap the Gecko rendering engine ( GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll ). Is there a wrapper for Webkit that can be included in a.NET Winform application?
TITLE: Is there an embeddable Webkit component for Windows / C# development? QUESTION: I've seen a few COM controls which wrap the Gecko rendering engine ( GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll ). Is there a wrapper for Webkit that can be included in a.NET Winform application? ANSWER: There...
[ ".net", "com", "webkit", "gecko" ]
76
19
154,018
9
0
2008-09-26T21:47:57.667000
2008-09-26T22:38:30.557000
142,197
142,212
Can I Install Visual Studio 2008 Express with VS 2005?
I wonder if They can work perfectly together...
Yes VS'08 and VS'05 will work nicely when installed on the same machine. Now, if only they made the.NET 2.0 support in VS'08 use the same solution/project file version number as VS'05 so you could easily move back and forth VS versions with the same project without modification.
Can I Install Visual Studio 2008 Express with VS 2005? I wonder if They can work perfectly together...
TITLE: Can I Install Visual Studio 2008 Express with VS 2005? QUESTION: I wonder if They can work perfectly together... ANSWER: Yes VS'08 and VS'05 will work nicely when installed on the same machine. Now, if only they made the.NET 2.0 support in VS'08 use the same solution/project file version number as VS'05 so you...
[ "visual-studio" ]
2
2
887
4
0
2008-09-26T21:50:50.657000
2008-09-26T21:53:23.537000
142,204
142,307
Where do you store your misc project settings?
Some projects have properties have miscellaneous settings such as: "AllowPayments", "ShowSideBar", "SectionTitle". Really things that don't necessarily fit in to other objects. How do you guys store these kinds of values? ApplicationSettings? Flat File? Database table? How do you access them? Static object with propert...
For me it depends on the context the setting is. If it relates to the data and the domain, i store in the database, if it relates the the application i store in the web.config.
Where do you store your misc project settings? Some projects have properties have miscellaneous settings such as: "AllowPayments", "ShowSideBar", "SectionTitle". Really things that don't necessarily fit in to other objects. How do you guys store these kinds of values? ApplicationSettings? Flat File? Database table? How...
TITLE: Where do you store your misc project settings? QUESTION: Some projects have properties have miscellaneous settings such as: "AllowPayments", "ShowSideBar", "SectionTitle". Really things that don't necessarily fit in to other objects. How do you guys store these kinds of values? ApplicationSettings? Flat File? D...
[ "configuration", "asp.net-2.0", "load-balancing" ]
0
1
136
3
0
2008-09-26T21:52:04.413000
2008-09-26T22:14:23.953000
142,211
142,265
.NET unable to connect to Oracle DB using Oracle proxy user
I am setting up a test version of my website against a new schema. I am trying to connect using the proxy connection and am getting the following error: ORA-28150: proxy not authorized to connect as client my connect string has the following form: Data Source= Instance; User Id= user; Proxy User Id= prxy_usr;Proxy Pass...
According to the docs: Grant the proxy user permission to perform actions on behalf of the client by using the ALTER USER... GRANT CONNECT command.
.NET unable to connect to Oracle DB using Oracle proxy user I am setting up a test version of my website against a new schema. I am trying to connect using the proxy connection and am getting the following error: ORA-28150: proxy not authorized to connect as client my connect string has the following form: Data Source=...
TITLE: .NET unable to connect to Oracle DB using Oracle proxy user QUESTION: I am setting up a test version of my website against a new schema. I am trying to connect using the proxy connection and am getting the following error: ORA-28150: proxy not authorized to connect as client my connect string has the following ...
[ "c#", "oracle", "odp.net" ]
0
3
2,753
3
0
2008-09-26T21:53:05.190000
2008-09-26T22:03:20.330000
142,223
142,236
Under what circumstances are dynamic languages not appropriate?
What factors indicate that a project's solution should not be coded in a dynamic language?
Speed is typically the primary answer. Though this is becoming less of an issue these days.
Under what circumstances are dynamic languages not appropriate? What factors indicate that a project's solution should not be coded in a dynamic language?
TITLE: Under what circumstances are dynamic languages not appropriate? QUESTION: What factors indicate that a project's solution should not be coded in a dynamic language? ANSWER: Speed is typically the primary answer. Though this is becoming less of an issue these days.
[ "dynamic-languages" ]
6
0
610
10
0
2008-09-26T21:54:56.870000
2008-09-26T21:57:15.367000
142,237
142,286
Integrating External Sources in a Build
Where I work I have several projects in separate repositories. Each project shares a lot of common code that I want to pull out into a distinct project. I'm thinking of calling the project with the following scheme: Company.Department.Common or Company.Department.Utility. I've constructed a project for this and it has ...
Greg is right in that you will probably want to use the svn:external feature. I created a step by step guide on how to do this on Windows with TortoiseSVN. I found it quite confusing the first couple times I used it. I created the guide, so that I can look it up, because I don't do it all the time. Using svn:externals ...
Integrating External Sources in a Build Where I work I have several projects in separate repositories. Each project shares a lot of common code that I want to pull out into a distinct project. I'm thinking of calling the project with the following scheme: Company.Department.Common or Company.Department.Utility. I've co...
TITLE: Integrating External Sources in a Build QUESTION: Where I work I have several projects in separate repositories. Each project shares a lot of common code that I want to pull out into a distinct project. I'm thinking of calling the project with the following scheme: Company.Department.Common or Company.Departmen...
[ "svn", "build", "nant" ]
3
6
319
2
0
2008-09-26T21:57:52.090000
2008-09-26T22:07:52.427000
142,239
142,276
How would you store and query hours of operation?
We're building an app that stores "hours of operation" for various businesses. What is the easiest way to represent this data so you can easily check if an item is open? Some options: Segment out blocks (every 15 minutes) that you can mark "open/closed". Checking involves seeing if the "open" bit is set for the desired...
store each contiguous block of time as a start time and a duration; this makes it easier to check when the hours cross date boundaries if you're certain that hours of operation will never cross date boundaries (i.e. there will never be an open-all-night sale or 72-hour marathon event et al) then start/end times will su...
How would you store and query hours of operation? We're building an app that stores "hours of operation" for various businesses. What is the easiest way to represent this data so you can easily check if an item is open? Some options: Segment out blocks (every 15 minutes) that you can mark "open/closed". Checking involv...
TITLE: How would you store and query hours of operation? QUESTION: We're building an app that stores "hours of operation" for various businesses. What is the easiest way to represent this data so you can easily check if an item is open? Some options: Segment out blocks (every 15 minutes) that you can mark "open/closed...
[ "language-agnostic", "datetime", "time", "time-management" ]
5
5
1,371
10
0
2008-09-26T21:58:15.350000
2008-09-26T22:05:57.313000
142,240
142,402
Explicit code parallelism in c++
Out of order execution in CPUs means that a CPU can reorder instructions to gain better performance and it means the CPU is having to do some very nifty bookkeeping and such. There are other processor approaches too, such as hyper-threading. Some fancy compilers understand the (un)interrelatedness of instructions to a ...
It sounds like you ran into the same problem chip designers face: Executing a single instruction takes a lot of effort, but it involves a bunch of different steps that can be strung together in an execution pipeline. (It is easier to execute things in parallel when you can build them out of separate blocks of hardware....
Explicit code parallelism in c++ Out of order execution in CPUs means that a CPU can reorder instructions to gain better performance and it means the CPU is having to do some very nifty bookkeeping and such. There are other processor approaches too, such as hyper-threading. Some fancy compilers understand the (un)inter...
TITLE: Explicit code parallelism in c++ QUESTION: Out of order execution in CPUs means that a CPU can reorder instructions to gain better performance and it means the CPU is having to do some very nifty bookkeeping and such. There are other processor approaches too, such as hyper-threading. Some fancy compilers unders...
[ "c++", "performance", "design-patterns" ]
3
1
1,609
8
0
2008-09-26T21:58:35.677000
2008-09-26T22:47:13.923000
142,252
142,263
Test if a floating point number is an integer
This code works (C# 3) double d; if(d == (double)(int)d)...; Is there a better way to do this? For extraneous reasons I want to avoid the double cast so; what nice ways exist other than this? (even if they aren't as good) Note: Several people pointed out the (important) point that == is often problematic regrading floa...
d == Math.Floor(d) does the same thing in other words. NB: Hopefully you're aware that you have to be very careful when doing this kind of thing; floats/doubles will very easily accumulate miniscule errors that make exact comparisons (like this one) fail for no obvious reason.
Test if a floating point number is an integer This code works (C# 3) double d; if(d == (double)(int)d)...; Is there a better way to do this? For extraneous reasons I want to avoid the double cast so; what nice ways exist other than this? (even if they aren't as good) Note: Several people pointed out the (important) poi...
TITLE: Test if a floating point number is an integer QUESTION: This code works (C# 3) double d; if(d == (double)(int)d)...; Is there a better way to do this? For extraneous reasons I want to avoid the double cast so; what nice ways exist other than this? (even if they aren't as good) Note: Several people pointed out t...
[ "c#", "floating-point", "numerical" ]
20
36
21,590
12
0
2008-09-26T22:00:38.650000
2008-09-26T22:03:10.533000
142,261
142,338
Mangling __FILE__ and __LINE__ in code for quoting?
Is there a way to get the C/C++ preprocessor or a template or such to mangle/hash the __FILE__ and __LINE__ and perhaps some other external input like a build-number into a single short number that can be quoted in logs or error messages? (The intention would be to be able to reverse it (to a list of candidates if its ...
You will have to use a function to perform the hashing and create a code from __LINE__ and __FILE__ as the C preprocessor is not able to do such complex tasks. Anyway, you can take inspiration by this article to see if a different solution can be better suited to your situation.
Mangling __FILE__ and __LINE__ in code for quoting? Is there a way to get the C/C++ preprocessor or a template or such to mangle/hash the __FILE__ and __LINE__ and perhaps some other external input like a build-number into a single short number that can be quoted in logs or error messages? (The intention would be to be...
TITLE: Mangling __FILE__ and __LINE__ in code for quoting? QUESTION: Is there a way to get the C/C++ preprocessor or a template or such to mangle/hash the __FILE__ and __LINE__ and perhaps some other external input like a build-number into a single short number that can be quoted in logs or error messages? (The intent...
[ "c", "templates", "c-preprocessor" ]
2
2
2,707
6
0
2008-09-26T22:03:06.243000
2008-09-26T22:22:26.773000
142,273
142,283
Standard way to detect mobile browsers in a web application based on the http request
We are beginning to go down the path of mobile browser support for an enterprise e-commerce webapp (Java/Servlet based). Of course there are many decisions to be made, but it seems to me the cornerstone is to be able to reliably detect mobile browsers, and make decisions on the content to be returned accordingly. Is th...
Wouldn't the standard way be to check the user agent? Here's a database of user agents you can use to detect mobile browsers.
Standard way to detect mobile browsers in a web application based on the http request We are beginning to go down the path of mobile browser support for an enterprise e-commerce webapp (Java/Servlet based). Of course there are many decisions to be made, but it seems to me the cornerstone is to be able to reliably detec...
TITLE: Standard way to detect mobile browsers in a web application based on the http request QUESTION: We are beginning to go down the path of mobile browser support for an enterprise e-commerce webapp (Java/Servlet based). Of course there are many decisions to be made, but it seems to me the cornerstone is to be able...
[ "browser", "mobile", "enterprise", "web-applications" ]
59
42
43,503
19
0
2008-09-26T22:04:23.167000
2008-09-26T22:07:07.670000
142,282
145,040
How do I tell if a UIView is visible and on screen?
If I have a UIView (or UIView subclass) that is visible, how can I tell if it's currently being shown on the screen (as opposed to, for example, being in a section of a scroll view that is currently off-screen)? To maybe give you a better idea of what I mean, UITableView has a couple of methods for determining the set ...
Not tried any of this yet. But CGRectIntersectsRect(), -[UIView convertRect:to(from)View] and -[UIScrollView contentOffset] seem to be your basic building blocks here.
How do I tell if a UIView is visible and on screen? If I have a UIView (or UIView subclass) that is visible, how can I tell if it's currently being shown on the screen (as opposed to, for example, being in a section of a scroll view that is currently off-screen)? To maybe give you a better idea of what I mean, UITableV...
TITLE: How do I tell if a UIView is visible and on screen? QUESTION: If I have a UIView (or UIView subclass) that is visible, how can I tell if it's currently being shown on the screen (as opposed to, for example, being in a section of a scroll view that is currently off-screen)? To maybe give you a better idea of wha...
[ "iphone", "objective-c", "cocoa-touch" ]
12
11
15,846
4
0
2008-09-26T22:07:00.400000
2008-09-28T02:35:55.457000
142,317
142,367
Sending the same but modifed object over ObjectOutputStream
I have the following code that shows either a bug or a misunderstanding on my part. I sent the same list, but modified over an ObjectOutputStream. Once as [0] and other as [1]. But when I read it, I get [0] twice. I think this is caused by the fact that I am sending over the same object and ObjectOutputStream must be c...
The stream has a reference graph, so an object which is sent twice will not give two objects on the other end, you will only get one. And sending the same object twice separately will give you the same instance twice (each with the same data - which is what you're seeing). See the reset() method if you want to reset th...
Sending the same but modifed object over ObjectOutputStream I have the following code that shows either a bug or a misunderstanding on my part. I sent the same list, but modified over an ObjectOutputStream. Once as [0] and other as [1]. But when I read it, I get [0] twice. I think this is caused by the fact that I am s...
TITLE: Sending the same but modifed object over ObjectOutputStream QUESTION: I have the following code that shows either a bug or a misunderstanding on my part. I sent the same list, but modified over an ObjectOutputStream. Once as [0] and other as [1]. But when I read it, I get [0] twice. I think this is caused by th...
[ "java", "io", "objectoutputstream" ]
24
32
5,498
2
0
2008-09-26T22:17:03.497000
2008-09-26T22:32:27.157000
142,319
142,333
Can gmail's random-signatures-from-an-RSS-feed be used for truly dynamic signatures?
This is a new gmail labs feature that lets you specify an RSS feed to grab random quotes from to append to your email signature. I'd like to use that to generate signatures programmatically based on parameters I pass in, the current time, etc. (For example, I have a script in pine that appends the current probabilities...
You might be able to do something on the clientside, take a look at this greasemonkey script which randomly adds a signature. Since it's under your control, and not google's, you can control if it caches or not.
Can gmail's random-signatures-from-an-RSS-feed be used for truly dynamic signatures? This is a new gmail labs feature that lets you specify an RSS feed to grab random quotes from to append to your email signature. I'd like to use that to generate signatures programmatically based on parameters I pass in, the current ti...
TITLE: Can gmail's random-signatures-from-an-RSS-feed be used for truly dynamic signatures? QUESTION: This is a new gmail labs feature that lets you specify an RSS feed to grab random quotes from to append to your email signature. I'd like to use that to generate signatures programmatically based on parameters I pass ...
[ "email", "rss", "gmail" ]
1
1
1,720
2
0
2008-09-26T22:17:12.387000
2008-09-26T22:21:24.420000
142,320
142,477
Setting up our new Dev server What is the easiest way to assign multiple IP addresses
I'm setting up our new Dev server, what is the easiest way to assign multiple IP addresses to Windows 2008 Server Network Adapter? I'm setting up our development machine, running IIS 7 and want to have the range between 192.168.1.200 -.254 available when I'm setting up a new website in IIS 7.
The complete CMD.EXE loop: FOR /L %b IN (200,1,254) DO netsh interface ip add address "your_adapter" 192.168.1.%b 255.255.255.0 In the code above, replace "your_adapter" with the actual interface name (usually "Local Area Connection"). In addition, the netmask at the end is an assumption of /24 or Class C subnet; subst...
Setting up our new Dev server What is the easiest way to assign multiple IP addresses I'm setting up our new Dev server, what is the easiest way to assign multiple IP addresses to Windows 2008 Server Network Adapter? I'm setting up our development machine, running IIS 7 and want to have the range between 192.168.1.200 ...
TITLE: Setting up our new Dev server What is the easiest way to assign multiple IP addresses QUESTION: I'm setting up our new Dev server, what is the easiest way to assign multiple IP addresses to Windows 2008 Server Network Adapter? I'm setting up our development machine, running IIS 7 and want to have the range betw...
[ "windows", "installation" ]
2
2
194
3
0
2008-09-26T22:17:13.463000
2008-09-26T23:27:13.560000
142,326
142,377
What URL do I post to for Live Search SOAP service?
Its possible I am just really really thick. However, looking over the SDK for the live search (MSN search) that uses SOAP, doesn't tell me what URL the service is at?? I can download SDKs for C# or VB which probably encapsulate, but that doesn't help me (I am using ruby). http://search.live.com/developer/
The URL you need is: http://soap.search.live.com/webservices.asmx Additional info on various tools you could use to discover endpoints from WSDL: If you have VS, you can discover the endpoint by adding a Web Service Reference to a C# console project and then opening the app.config file and looking for the element. To a...
What URL do I post to for Live Search SOAP service? Its possible I am just really really thick. However, looking over the SDK for the live search (MSN search) that uses SOAP, doesn't tell me what URL the service is at?? I can download SDKs for C# or VB which probably encapsulate, but that doesn't help me (I am using ru...
TITLE: What URL do I post to for Live Search SOAP service? QUESTION: Its possible I am just really really thick. However, looking over the SDK for the live search (MSN search) that uses SOAP, doesn't tell me what URL the service is at?? I can download SDKs for C# or VB which probably encapsulate, but that doesn't help...
[ "web-services", "soap", "search-engine", "windows-live" ]
0
1
682
1
0
2008-09-26T22:19:13.303000
2008-09-26T22:35:51.110000
142,331
142,475
Resources for high performance computing in C++
I'm looking for books or online resources that go in detail over programming techniques for high performance computing using C++.
practically all HPC code I've heard of is either for solving sytems of linear equations or FFT's. Heres some links to start you off at least in the libraries used: BLAS - standard set of routines for linear algebra - stuff like matrix multiplication LAPACK - standard set of higher level linear algebra routines - stuff ...
Resources for high performance computing in C++ I'm looking for books or online resources that go in detail over programming techniques for high performance computing using C++.
TITLE: Resources for high performance computing in C++ QUESTION: I'm looking for books or online resources that go in detail over programming techniques for high performance computing using C++. ANSWER: practically all HPC code I've heard of is either for solving sytems of linear equations or FFT's. Heres some links ...
[ "c++", "performance" ]
17
12
5,685
9
0
2008-09-26T22:20:51.053000
2008-09-26T23:26:34.873000
142,339
142,503
How do I remotely debug a stored procedure within the same domain?
What are the steps needed to successfully be able to remotely debug a stored procedure (SQL Server 2005) from within VS 2005? Both client and server machines are on the same domain. I have never done this so step by step instructions would greatly be appreciated.
Great Question! If I'm not mistaken I don't think debugging is possible inside of SQL Management Studio anymore (as it was back in the SQL Server 2000, Enterprise Studio days). Instructions to Remote Debug MS SQL Stored Procedures within Visual Studio 2005 Launch Visual Studio (If you're running from Vista, Run As Admi...
How do I remotely debug a stored procedure within the same domain? What are the steps needed to successfully be able to remotely debug a stored procedure (SQL Server 2005) from within VS 2005? Both client and server machines are on the same domain. I have never done this so step by step instructions would greatly be ap...
TITLE: How do I remotely debug a stored procedure within the same domain? QUESTION: What are the steps needed to successfully be able to remotely debug a stored procedure (SQL Server 2005) from within VS 2005? Both client and server machines are on the same domain. I have never done this so step by step instructions w...
[ "sql-server", "stored-procedures", "visual-studio-2005", "remote-debugging" ]
1
2
4,849
2
0
2008-09-26T22:22:46.103000
2008-09-26T23:42:24.977000
142,340
142,353
How do you version your projects?
I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is changed when the "developers" want to show that there is a big change in the software and backward compatibility cannot be assumed. Maybe a major rewrite of the code is done. Minor number represents a sig...
We generally do major.minor[.maintenance[.build]] where I work, but it seems to vary a little per project. Major/minor the same as you mentioned. maintenance would be incremented for small (bug) fixes and build for each time the build server runs.
How do you version your projects? I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is changed when the "developers" want to show that there is a big change in the software and backward compatibility cannot be assumed. Maybe a major rewrite of the code is d...
TITLE: How do you version your projects? QUESTION: I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is changed when the "developers" want to show that there is a big change in the software and backward compatibility cannot be assumed. Maybe a major rewrit...
[ ".net", "versioning" ]
14
7
1,287
12
0
2008-09-26T22:23:39.500000
2008-09-26T22:27:01.693000
142,357
3,275,659
What are the best JVM settings for Eclipse?
What are the best JVM settings you have found for running Eclipse?
It is that time of year again: "eclipse.ini take 3" the settings strike back! Eclipse Helios 3.6 and 3.6.x settings alt text http://www.eclipse.org/home/promotions/friends-helios/helios.png After settings for Eclipse Ganymede 3.4.x and Eclipse Galileo 3.5.x, here is an in-depth look at an "optimized" eclipse.ini settin...
What are the best JVM settings for Eclipse? What are the best JVM settings you have found for running Eclipse?
TITLE: What are the best JVM settings for Eclipse? QUESTION: What are the best JVM settings you have found for running Eclipse? ANSWER: It is that time of year again: "eclipse.ini take 3" the settings strike back! Eclipse Helios 3.6 and 3.6.x settings alt text http://www.eclipse.org/home/promotions/friends-helios/hel...
[ "eclipse", "jvm" ]
315
314
542,562
16
0
2008-09-26T22:28:19.567000
2010-07-18T13:23:15.617000
142,391
142,401
Getting a boost::shared_ptr for this
I am making extensive use of boost:shared_ptr in my code. In fact, most of the objects that are allocated on the heap are held by a shared_ptr. Unfortunately this means that I can't pass this into any function that takes a shared_ptr. Consider this code: void bar(boost::shared_ptr pFoo) {... } void Foo::someFunction()...
You can derive from enable_shared_from_this and then you can use "shared_from_this()" instead of "this" to spawn a shared pointer to your own self object. Example in the link: #include class Y: public boost::enable_shared_from_this { public: shared_ptr f() { return shared_from_this(); } } int main() { shared_ptr p(ne...
Getting a boost::shared_ptr for this I am making extensive use of boost:shared_ptr in my code. In fact, most of the objects that are allocated on the heap are held by a shared_ptr. Unfortunately this means that I can't pass this into any function that takes a shared_ptr. Consider this code: void bar(boost::shared_ptr p...
TITLE: Getting a boost::shared_ptr for this QUESTION: I am making extensive use of boost:shared_ptr in my code. In fact, most of the objects that are allocated on the heap are held by a shared_ptr. Unfortunately this means that I can't pass this into any function that takes a shared_ptr. Consider this code: void bar(b...
[ "c++", "boost" ]
77
102
37,578
6
0
2008-09-26T22:42:43.183000
2008-09-26T22:46:57.667000
142,400
144,536
What's the best way to format 24 hour time in XSLT 1.0?
I've had a hard time finding good ways of taking a time format and easily determining if it's valid then producing a resulting element that has some formatting using XSLT 1.0. Given the following xml: 2300 It would be great to produce the resulting xml: 23:00 However, if the source xml contains an invalid 24 hour time ...
There aren't any regular expressions in XSLT 1.0, so I'm afraid that pattern matching isn't going to be possible. I'm not clear if 23:00 is supposed to be legal or not? If it is, try: If it isn't, and four digits is the only thing that's legal then:
What's the best way to format 24 hour time in XSLT 1.0? I've had a hard time finding good ways of taking a time format and easily determining if it's valid then producing a resulting element that has some formatting using XSLT 1.0. Given the following xml: 2300 It would be great to produce the resulting xml: 23:00 Howe...
TITLE: What's the best way to format 24 hour time in XSLT 1.0? QUESTION: I've had a hard time finding good ways of taking a time format and easily determining if it's valid then producing a resulting element that has some formatting using XSLT 1.0. Given the following xml: 2300 It would be great to produce the resulti...
[ "xml", "xslt", "xslt-1.0" ]
2
5
3,099
6
0
2008-09-26T22:45:47.733000
2008-09-27T21:39:46.150000
142,404
357,250
How to stop Eclipse 3.4 losing reference to the JRE in projects
Sometimes when using eclipse it loses references to the JRE. i.e. It cannot find classes like Object or Arraylist. Some projects report a problem while others don't and they both use the same JRE. I have found that if you switch the installed JRE to another and then back again to the one you want to use, it will then w...
I may have a resolution for this. Eclipse was losing the JRE references on many of my Java projects almost daily, and restarting or starting with -clean wasn't helping. I realised that it is clearly a classloader issue of some kind, so what I did was to open the ".classpath" file of each project in the editor and manua...
How to stop Eclipse 3.4 losing reference to the JRE in projects Sometimes when using eclipse it loses references to the JRE. i.e. It cannot find classes like Object or Arraylist. Some projects report a problem while others don't and they both use the same JRE. I have found that if you switch the installed JRE to anothe...
TITLE: How to stop Eclipse 3.4 losing reference to the JRE in projects QUESTION: Sometimes when using eclipse it loses references to the JRE. i.e. It cannot find classes like Object or Arraylist. Some projects report a problem while others don't and they both use the same JRE. I have found that if you switch the insta...
[ "java", "eclipse", "eclipse-3.4", "ganymede" ]
2
2
2,399
6
0
2008-09-26T22:47:42.097000
2008-12-10T19:21:27.223000
142,417
142,424
Is there a way to determine the signature of a Lua function?
Recently, Lee Baldwin showed how to write a generic, variable argument memoize function. I thought it would be better to return a simpler function where only one parameter is required. Here is my total bogus attempt: local function memoize(f) local cache = {} if select('#',...) == 1 then return function (x) if cache[x...
I guess you could go into the debug info and determine this from the source-code, but basically it's a "no", sorry.
Is there a way to determine the signature of a Lua function? Recently, Lee Baldwin showed how to write a generic, variable argument memoize function. I thought it would be better to return a simpler function where only one parameter is required. Here is my total bogus attempt: local function memoize(f) local cache = {}...
TITLE: Is there a way to determine the signature of a Lua function? QUESTION: Recently, Lee Baldwin showed how to write a generic, variable argument memoize function. I thought it would be better to return a simpler function where only one parameter is required. Here is my total bogus attempt: local function memoize(f...
[ "generics", "functional-programming", "lua" ]
6
4
2,676
3
0
2008-09-26T22:53:29.773000
2008-09-26T22:56:55.707000
142,420
142,428
Java: Enum parameter in method
I have a method lets say: private static String drawCellValue( int maxCellLength, String cellValue, String align) { } and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the value is a 'left' or 'right'.. setting the parameter as String, obviously I ...
This should do it: private enum Alignment { LEFT, RIGHT }; String drawCellValue (int maxCellLength, String cellValue, Alignment align){ if (align == Alignment.LEFT) { //Process it... } }
Java: Enum parameter in method I have a method lets say: private static String drawCellValue( int maxCellLength, String cellValue, String align) { } and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the value is a 'left' or 'right'.. setting the pa...
TITLE: Java: Enum parameter in method QUESTION: I have a method lets say: private static String drawCellValue( int maxCellLength, String cellValue, String align) { } and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the value is a 'left' or 'right...
[ "java", "parameters", "methods", "enums" ]
31
60
111,417
7
0
2008-09-26T22:55:02.093000
2008-09-26T22:59:03.113000
142,431
288,149
App to Change Ldap Password for a JIRA/SVN server
I'm setting up a server to offer JIRA and SVN. I figure, I'll use LDAP to keep the identity management simple. So, before I write one.... is there a good app out there to let users change their ldap password? I want something that lets a user authenticate with ldap and update their password. A form with username, old p...
Thanks. I broke down and wrote my own. I used the google web toolkit. It was pretty trivial.
App to Change Ldap Password for a JIRA/SVN server I'm setting up a server to offer JIRA and SVN. I figure, I'll use LDAP to keep the identity management simple. So, before I write one.... is there a good app out there to let users change their ldap password? I want something that lets a user authenticate with ldap and ...
TITLE: App to Change Ldap Password for a JIRA/SVN server QUESTION: I'm setting up a server to offer JIRA and SVN. I figure, I'll use LDAP to keep the identity management simple. So, before I write one.... is there a good app out there to let users change their ldap password? I want something that lets a user authentic...
[ "svn", "ldap", "passwords", "web-applications" ]
3
0
1,208
2
0
2008-09-26T22:59:44.140000
2008-11-13T20:20:25.353000
142,445
221,507
How do you establish context and call an WebSphere EJB from the Sun JRE (not IBM)
Is there a way to call an EJB that is served through WebSphere (iiop://host:port/ejbName) from a vanilla JRE (like Sun). A lot of people have been telling me that this type of architecture relies in a homogenous environment. Thoughts?
Although it’s possible, I wouldn’t recommend it because you’re asking for troubles using RMI-IIOP in a heterogeneous environment. My approach would be to expose the EJB as a web service and consume at the client.
How do you establish context and call an WebSphere EJB from the Sun JRE (not IBM) Is there a way to call an EJB that is served through WebSphere (iiop://host:port/ejbName) from a vanilla JRE (like Sun). A lot of people have been telling me that this type of architecture relies in a homogenous environment. Thoughts?
TITLE: How do you establish context and call an WebSphere EJB from the Sun JRE (not IBM) QUESTION: Is there a way to call an EJB that is served through WebSphere (iiop://host:port/ejbName) from a vanilla JRE (like Sun). A lot of people have been telling me that this type of architecture relies in a homogenous environm...
[ "websphere", "ejb", "java" ]
1
1
769
2
0
2008-09-26T23:09:27.503000
2008-10-21T11:22:36.040000
142,453
142,613
WMI calls from WebService
So I have made a webservice that interfaces with a set of data contained in a WMI namespace. It works fine when I run it with the ASP.net in built development web server, and returns the data as requested. However when I publish it to an IIS 6 server (win 2003), the webservice no longer allows me to execute the WMI met...
Running with IIS as a 'proper' user account should work. The 'everyone' group doesn't mean 'absolutely everyone' -- it means 'every authenticated user'. If you can't authenticate you are still not part of everyone. If you are going after a WMI resource which requires network rights then it will still fail. Other than t...
WMI calls from WebService So I have made a webservice that interfaces with a set of data contained in a WMI namespace. It works fine when I run it with the ASP.net in built development web server, and returns the data as requested. However when I publish it to an IIS 6 server (win 2003), the webservice no longer allows...
TITLE: WMI calls from WebService QUESTION: So I have made a webservice that interfaces with a set of data contained in a WMI namespace. It works fine when I run it with the ASP.net in built development web server, and returns the data as requested. However when I publish it to an IIS 6 server (win 2003), the webservic...
[ "web-services", "iis-6", "wmi", "asmx" ]
2
3
1,682
2
0
2008-09-26T23:11:42.163000
2008-09-27T00:29:18.607000
142,470
142,667
What are the main differences between the popular web frameworks?
There are lots of web application frameworks available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses, and unique features? Assuming the luxury of choice, what factors would lead you to consider one over another other? I'm most interested in people's direc...
I am going to briefly address each area for three popular Python frameworks. This is only based on my personal experiences and observations. Development speed and convenience For TurboGears, Pylons, and Django, development speed is roughly equal. Being modern frameworks, it's easy to get started on a new site and start...
What are the main differences between the popular web frameworks? There are lots of web application frameworks available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses, and unique features? Assuming the luxury of choice, what factors would lead you to cons...
TITLE: What are the main differences between the popular web frameworks? QUESTION: There are lots of web application frameworks available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses, and unique features? Assuming the luxury of choice, what factors woul...
[ "web-applications", "frameworks", "comparison" ]
12
9
3,542
3
0
2008-09-26T23:21:18.303000
2008-09-27T01:02:48.480000
142,481
142,483
Auto-generation of .NET unit tests
Is there such a thing as unit test generation? If so......does it work well?...What are the auto generation solutions that are available for.NET?...are there examples of using a technology like this?...is this only good for certain types of applications, or could it be used to replace all manually written unit testing?
Take a look at Pex. Its a Microsoft Research project. From the website: Pex generates Unit Tests from hand-written Parameterized Unit Tests through Automated Exploratory Testing based on Dynamic Symbolic Execution. UPDATE for 2019: As mentioned in the comments, Pex is now called IntelliTest and is a feature of Visual S...
Auto-generation of .NET unit tests Is there such a thing as unit test generation? If so......does it work well?...What are the auto generation solutions that are available for.NET?...are there examples of using a technology like this?...is this only good for certain types of applications, or could it be used to replace...
TITLE: Auto-generation of .NET unit tests QUESTION: Is there such a thing as unit test generation? If so......does it work well?...What are the auto generation solutions that are available for.NET?...are there examples of using a technology like this?...is this only good for certain types of applications, or could it ...
[ "c#", ".net", "unit-testing", "automation", "automated-tests" ]
51
43
56,526
11
0
2008-09-26T23:28:20.953000
2008-09-26T23:31:12.240000
142,504
142,520
Eclipse: Dependency Management
What are some methods of utilising Eclipse for Dependency Management?
I really like the The Maven Integration for Eclipse (m2eclipse, Eclipse m2e). I use it purely for the dependency management feature. It's great not having to go out and download a bunch of new jars new each time I set up a project.
Eclipse: Dependency Management What are some methods of utilising Eclipse for Dependency Management?
TITLE: Eclipse: Dependency Management QUESTION: What are some methods of utilising Eclipse for Dependency Management? ANSWER: I really like the The Maven Integration for Eclipse (m2eclipse, Eclipse m2e). I use it purely for the dependency management feature. It's great not having to go out and download a bunch of new...
[ "java", "eclipse", "maven-2", "eclipse-plugin", "dependencies" ]
7
14
13,074
3
0
2008-09-26T23:42:30.077000
2008-09-26T23:50:58.887000
142,507
142,518
How much access do you give BA/PM's?
Where I work we have a little bit of a dilemma... I work on a small team developing an application for internal use. We recently just received a new PM to the project. She would like to have access to our database and our sourcecode (stored in svn). Our previous PM did not see a need, nor want, to have access to any of...
Give her access. Make her check it out of source control and track her like anyone else. If she changes anything you'll have a history. If she makes suggestions about the implementation, it might help. If she's a bully and start ranting about the source code well... she probably would have found a way to do that anyway...
How much access do you give BA/PM's? Where I work we have a little bit of a dilemma... I work on a small team developing an application for internal use. We recently just received a new PM to the project. She would like to have access to our database and our sourcecode (stored in svn). Our previous PM did not see a nee...
TITLE: How much access do you give BA/PM's? QUESTION: Where I work we have a little bit of a dilemma... I work on a small team developing an application for internal use. We recently just received a new PM to the project. She would like to have access to our database and our sourcecode (stored in svn). Our previous PM...
[ "database" ]
4
4
243
7
0
2008-09-26T23:43:52.973000
2008-09-26T23:50:12.600000
142,545
142,566
How to make a cross-module variable?
The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it? The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if I change foo in one module, it is updated in others. I'd be f...
I don't endorse this solution in any way, shape or form. But if you add a variable to the __builtin__ module, it will be accessible as if a global from any other module that includes __builtin__ -- which is all of them, by default. a.py contains print foo b.py contains import __builtin__ __builtin__.foo = 1 import a Th...
How to make a cross-module variable? The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it? The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if I change foo in one modu...
TITLE: How to make a cross-module variable? QUESTION: The __debug__ variable is handy in part because it affects every module. If I want to create another variable that works the same way, how would I do it? The variable (let's be original and call it 'foo') doesn't have to be truly global, in the sense that if I chan...
[ "python", "module", "global" ]
130
120
191,722
12
0
2008-09-26T23:59:47.337000
2008-09-27T00:09:29.200000
142,548
142,570
Deployment of war file on Tomcat
Is there a way to deploy a given war file on Tomcat server? I want to do this without using the web interface.
Just copy the war file into the $TOMCAT_HOME/webapps/ directory. Tomcat will deploy the war file by automatically exploding it. FYI - If you want you can make updates directly to the exploded directory, which is useful for development.
Deployment of war file on Tomcat Is there a way to deploy a given war file on Tomcat server? I want to do this without using the web interface.
TITLE: Deployment of war file on Tomcat QUESTION: Is there a way to deploy a given war file on Tomcat server? I want to do this without using the web interface. ANSWER: Just copy the war file into the $TOMCAT_HOME/webapps/ directory. Tomcat will deploy the war file by automatically exploding it. FYI - If you want you...
[ "java", "linux", "tomcat", "deployment", "release-management" ]
18
10
28,240
6
0
2008-09-27T00:02:14.770000
2008-09-27T00:10:56.793000
142,559
142,778
Do you have to restart apache to make re-write rules in the .htaccess take effect?
I have pushed my.htaccess files to the production severs, but they don't work. Would a restart be the next step, or should I check something else.
A restart is not required for changes to.htaccess. Something else is wrong. Make sure your.htaccess includes the statement RewriteEngine on which is required even if it's also present in httpd.conf. Also check that.htaccess is readable by the httpd process. Check the error_log - it will tell you of any errors in.htacce...
Do you have to restart apache to make re-write rules in the .htaccess take effect? I have pushed my.htaccess files to the production severs, but they don't work. Would a restart be the next step, or should I check something else.
TITLE: Do you have to restart apache to make re-write rules in the .htaccess take effect? QUESTION: I have pushed my.htaccess files to the production severs, but they don't work. Would a restart be the next step, or should I check something else. ANSWER: A restart is not required for changes to.htaccess. Something el...
[ "apache", ".htaccess", "mod-rewrite", "restart" ]
105
102
91,561
7
0
2008-09-27T00:08:04.633000
2008-09-27T02:25:22.587000
142,573
142,592
Looking for doc on why IE "yellow bar" shows when opening a HTML file that contains JavaScript
I have a site, from which you can download an HTML file. This HTML file contains a form with hidden fields, which is right away posted back to the site using JavaScript. This is a way of allowing users to download to their own machine data that they edit on the site. On some machines, you get an IE "yellow bar" when tr...
The yellow bar is because your page is executing in the Local Machine security zone in IE. On different machines, the Local Machine security zone might be configured in different ways, so you can see the yellow bar on some machines and not see it on other machines. To learn more about the IE's URL Security Zones, you c...
Looking for doc on why IE "yellow bar" shows when opening a HTML file that contains JavaScript I have a site, from which you can download an HTML file. This HTML file contains a form with hidden fields, which is right away posted back to the site using JavaScript. This is a way of allowing users to download to their ow...
TITLE: Looking for doc on why IE "yellow bar" shows when opening a HTML file that contains JavaScript QUESTION: I have a site, from which you can download an HTML file. This HTML file contains a form with hidden fields, which is right away posted back to the site using JavaScript. This is a way of allowing users to do...
[ "javascript", "security", "internet-explorer" ]
1
5
1,807
6
0
2008-09-27T00:11:33.953000
2008-09-27T00:20:35.960000
142,602
142,683
How to revive C++ skills
I was a C++ developer (mostly ATL/COM stuff) until, as many of us, I switched to C# in 2001. I didn't do much C++ programming since then. Do you have any tips on how to revive my C++ skills? What has changed in C++ in the last years? Are there good books, articles or blogs covering the language. The problem is that mos...
I personally find that syntax is where i mostly need to catch up when i wander back to a language i havent used in a long time. But the concepts and what the language is about stays the same in memory. Assuming its the same with you, i would say its a good idea to relook at the texts you remember to have been useful to...
How to revive C++ skills I was a C++ developer (mostly ATL/COM stuff) until, as many of us, I switched to C# in 2001. I didn't do much C++ programming since then. Do you have any tips on how to revive my C++ skills? What has changed in C++ in the last years? Are there good books, articles or blogs covering the language...
TITLE: How to revive C++ skills QUESTION: I was a C++ developer (mostly ATL/COM stuff) until, as many of us, I switched to C# in 2001. I didn't do much C++ programming since then. Do you have any tips on how to revive my C++ skills? What has changed in C++ in the last years? Are there good books, articles or blogs cov...
[ "c++" ]
9
8
3,549
10
0
2008-09-27T00:25:31.673000
2008-09-27T01:15:40.400000
142,614
142,811
TraceRoute and Ping in C#
Does anyone have C# code handy for doing a ping and traceroute to a target computer? I am looking for a pure code solution, not what I'm doing now, which is invoking the ping.exe and tracert.exe program and parsing the output. I would like something more robust.
Although the Base Class Library includes Ping, the BCL does not include any tracert functionality. However, a quick search reveals two open-source attempts, the first in C# the second in C++: http://www.codeproject.com/KB/IP/tracert.aspx http://www.codeguru.com/Cpp/I-N/network/basicnetworkoperations/article.php/c5457/
TraceRoute and Ping in C# Does anyone have C# code handy for doing a ping and traceroute to a target computer? I am looking for a pure code solution, not what I'm doing now, which is invoking the ping.exe and tracert.exe program and parsing the output. I would like something more robust.
TITLE: TraceRoute and Ping in C# QUESTION: Does anyone have C# code handy for doing a ping and traceroute to a target computer? I am looking for a pure code solution, not what I'm doing now, which is invoking the ping.exe and tracert.exe program and parsing the output. I would like something more robust. ANSWER: Alth...
[ "c#", ".net", "networking", "ping", "traceroute" ]
33
15
67,100
7
0
2008-09-27T00:29:23.800000
2008-09-27T02:46:38.963000
142,633
1,166,869
ModalPopupExtender OK Button click event not firing?
I have a Button inside an UpdatePanel. The button is being used as the OK button for a ModalPopupExtender. For some reason, the button click event is not firing. Any ideas? Am I missing something?...
Aspx //Codebehind protected void OkButton_Clicked(object sender, EventArgs e) { modalPop.Hide(); //Do something in codebehind } And don't set the OK button as OkControlID.
ModalPopupExtender OK Button click event not firing? I have a Button inside an UpdatePanel. The button is being used as the OK button for a ModalPopupExtender. For some reason, the button click event is not firing. Any ideas? Am I missing something?...
TITLE: ModalPopupExtender OK Button click event not firing? QUESTION: I have a Button inside an UpdatePanel. The button is being used as the OK button for a ModalPopupExtender. For some reason, the button click event is not firing. Any ideas? Am I missing something?... ANSWER: Aspx //Codebehind protected void OkButto...
[ "asp.net", "asp.net-ajax", "updatepanel", "modalpopupextender" ]
44
53
113,075
8
0
2008-09-27T00:38:17.853000
2009-07-22T17:23:37.700000
142,653
142,657
DocumentRoot in .htaccess is causing an error
I have DocumentRoot /var/www/test in my.htaccess file. This is causing the apache server to give me a 500 internal server error. The error log file shows: alert] [client 127.0.0.1] /var/www/.htaccess: DocumentRoot not allowed here AllowOveride All is set in my conf file. Any idea why this is happening?
The DocumentRoot directive cannot appear in a.htaccess file. Put it in httpd.conf instead.
DocumentRoot in .htaccess is causing an error I have DocumentRoot /var/www/test in my.htaccess file. This is causing the apache server to give me a 500 internal server error. The error log file shows: alert] [client 127.0.0.1] /var/www/.htaccess: DocumentRoot not allowed here AllowOveride All is set in my conf file. An...
TITLE: DocumentRoot in .htaccess is causing an error QUESTION: I have DocumentRoot /var/www/test in my.htaccess file. This is causing the apache server to give me a 500 internal server error. The error log file shows: alert] [client 127.0.0.1] /var/www/.htaccess: DocumentRoot not allowed here AllowOveride All is set i...
[ "apache", "configuration" ]
4
12
13,795
3
0
2008-09-27T00:57:30.910000
2008-09-27T01:00:11.467000
142,692
598,387
Unit testing in flex
Are there any unit testing solutions for Flex? or actionscript 3? If so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share?
I just found fluint, and it was a great unit testing library, better than both Flexunit and ASUnit imho. It handles asynchronous testing really nice.
Unit testing in flex Are there any unit testing solutions for Flex? or actionscript 3? If so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share?
TITLE: Unit testing in flex QUESTION: Are there any unit testing solutions for Flex? or actionscript 3? If so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share? ANSWER: I just found fluint, and it was a great unit testing library, bet...
[ "actionscript-3", "unit-testing", "testing", "actionscript", "automated-tests" ]
12
4
4,042
7
0
2008-09-27T01:21:22.617000
2009-02-28T17:56:10.760000
142,693
142,713
How can I write software that does bank account transfers?
You know those websites that let you type in your checking account number and the routing number, and then they can transfer money to and from your account? How does that work? Any good services or APIs for doing that? Any gotchas?
The banks do have APIs for doing this, but only approved people/companies are allowed to interface with these systems. Because it actually involves transferring money around, the security requirements are pretty high in terms of how you handle the account numbers on your system. Many sites that offer this feature for b...
How can I write software that does bank account transfers? You know those websites that let you type in your checking account number and the routing number, and then they can transfer money to and from your account? How does that work? Any good services or APIs for doing that? Any gotchas?
TITLE: How can I write software that does bank account transfers? QUESTION: You know those websites that let you type in your checking account number and the routing number, and then they can transfer money to and from your account? How does that work? Any good services or APIs for doing that? Any gotchas? ANSWER: Th...
[ "banking" ]
17
18
21,882
6
0
2008-09-27T01:22:26.217000
2008-09-27T01:30:24.153000
142,697
6,230,347
Why does a VB.Net function that returns string only actually return a single character?
I'm calling a function that returns a string, but it's only actually returning the first character of the string it's supposed to be returning. Here's a sample piece of code to recreate the issue I'm experiencing: Public Function GetSomeStringValue(Value as Integer) As String... Code Goes here Return Some_Multicharacte...
Note: this answer was originally written by the OP, Kibbee, as a self-answer. However, it was written in the body of the question, not as an actual separate answer. Since the OP has refused repeated requests by other users, including a moderator, to repost in accordance with site rules, I'm reposting it myself. After t...
Why does a VB.Net function that returns string only actually return a single character? I'm calling a function that returns a string, but it's only actually returning the first character of the string it's supposed to be returning. Here's a sample piece of code to recreate the issue I'm experiencing: Public Function Ge...
TITLE: Why does a VB.Net function that returns string only actually return a single character? QUESTION: I'm calling a function that returns a string, but it's only actually returning the first character of the string it's supposed to be returning. Here's a sample piece of code to recreate the issue I'm experiencing: ...
[ "vb.net", "syntax" ]
33
13
22,569
1
0
2008-09-27T01:24:24.357000
2011-06-03T17:09:55.770000
142,708
145,260
What do 'Delimiter' and 'InheritsFromParent' attributes mean in .vsprops files?
I can't seem to find any useful documentation from Microsoft about how one would use the Delimiter and InheritsFromParent attributes in the UserMacro element when defining user Macros in.vsprops property sheet files for Visual Studio. Here's sample usage: From the above example, I'm guessing that "inherit" really means...
[Answering my own question] InheritsFromParent means prepend. To verify this, I did an experiment that reveals how User Macros work in Visual Studio 2008. Here's the setup: Project p.vcproj includes the property sheet file d.vsprops ('d' for derived ) using the InheritedPropertySheets tag. d.vsprops includes the proper...
What do 'Delimiter' and 'InheritsFromParent' attributes mean in .vsprops files? I can't seem to find any useful documentation from Microsoft about how one would use the Delimiter and InheritsFromParent attributes in the UserMacro element when defining user Macros in.vsprops property sheet files for Visual Studio. Here'...
TITLE: What do 'Delimiter' and 'InheritsFromParent' attributes mean in .vsprops files? QUESTION: I can't seem to find any useful documentation from Microsoft about how one would use the Delimiter and InheritsFromParent attributes in the UserMacro element when defining user Macros in.vsprops property sheet files for Vi...
[ "visual-studio", "visual-studio-2008", "visual-studio-2005" ]
8
9
3,609
3
0
2008-09-27T01:27:41.790000
2008-09-28T05:26:05.780000
142,710
142,716
Can I implement a cooperative multi-tasking system in VxWorks?
A legacy embedded system is implemented using a cooperative multi-tasking scheduler. The system essentially works along the following lines: Task A does work When Task A is done, it yields the processor. Task B gets the processor and does work. Task B yields... Task n yields Task A gets scheduled and does work One big ...
While VxWorks is a priority based OS, it is possible to implement this type of cooperative multi-tasking. Simply put all the tasks at the same priority. In your code, where you do your yield, simply insert a 'taskDelay(0);' Note that you have to make sure the kernel time slicing is disabled (kernelTimeSlice(0)). All ta...
Can I implement a cooperative multi-tasking system in VxWorks? A legacy embedded system is implemented using a cooperative multi-tasking scheduler. The system essentially works along the following lines: Task A does work When Task A is done, it yields the processor. Task B gets the processor and does work. Task B yield...
TITLE: Can I implement a cooperative multi-tasking system in VxWorks? QUESTION: A legacy embedded system is implemented using a cooperative multi-tasking scheduler. The system essentially works along the following lines: Task A does work When Task A is done, it yields the processor. Task B gets the processor and does ...
[ "vxworks" ]
2
2
1,140
5
0
2008-09-27T01:29:29.600000
2008-09-27T01:35:20.837000
142,722
143,028
Coding for high reliability/availability/security - what standards do I read?
I've heard that the automotive industry has something called MISRA C. What are the relevant standards for other high reliability/availability/security industries, such as Space Aircraft Banking/financial Automotive Medical Defense/Military??? -Adam
Check out the Goddard Space Flight Center and its coding standards. One of the C standards, which I've adopted in my own code, is that headers must be self-contained, and they provide a simple way to enforce that -- a module's header must be the first file included in the module, so if the file is not self-contained, i...
Coding for high reliability/availability/security - what standards do I read? I've heard that the automotive industry has something called MISRA C. What are the relevant standards for other high reliability/availability/security industries, such as Space Aircraft Banking/financial Automotive Medical Defense/Military???...
TITLE: Coding for high reliability/availability/security - what standards do I read? QUESTION: I've heard that the automotive industry has something called MISRA C. What are the relevant standards for other high reliability/availability/security industries, such as Space Aircraft Banking/financial Automotive Medical D...
[ "security", "coding-style", "reliability" ]
12
6
1,332
6
0
2008-09-27T01:40:45.300000
2008-09-27T05:01:34.443000
142,740
142,796
How do you acess a property of a bean for reading in a spring xml config file?
I want to do something like the following in spring:...... I would think that this would access the getFoo() method of bean1 and call the setPropName() method of bean2, but this doesn't seem to work.
What I understood: You have a bean (bean1) with a property called "foo" You have another bean (bean2) with a property named "propName", wich also has to have the same "foo" that in bean1. why not doing this:....... Doing this, your bean2 is not coupled to bean1 like in your example. You can change bean1 and bean2 witho...
How do you acess a property of a bean for reading in a spring xml config file? I want to do something like the following in spring:...... I would think that this would access the getFoo() method of bean1 and call the setPropName() method of bean2, but this doesn't seem to work.
TITLE: How do you acess a property of a bean for reading in a spring xml config file? QUESTION: I want to do something like the following in spring:...... I would think that this would access the getFoo() method of bean1 and call the setPropName() method of bean2, but this doesn't seem to work. ANSWER: What I underst...
[ "spring" ]
7
7
3,845
3
0
2008-09-27T01:55:23.003000
2008-09-27T02:39:28.870000
142,743
142,891
What software would you recommend for image enhancement prior to OCR (Optical Character Recognition)?
We are currently researching ways of enhancing image quality prior to submission to OCR. The OCR engine we are currently utilizing is the Scansoft API from Nuance (v15). We were researching the Lead Tools but have since decided to look elsewhere. The licensing costs associated with Lead Tools is just too great. To star...
Kofax is good for pre-processing, but for the types of cleanup you are talking about may be overkill unless the images are really bad. Unless your specialty is in image processing, I'd recommend working with a provider that does the image cleanup and the OCR so you can focus on the value you actually add. We license th...
What software would you recommend for image enhancement prior to OCR (Optical Character Recognition)? We are currently researching ways of enhancing image quality prior to submission to OCR. The OCR engine we are currently utilizing is the Scansoft API from Nuance (v15). We were researching the Lead Tools but have sinc...
TITLE: What software would you recommend for image enhancement prior to OCR (Optical Character Recognition)? QUESTION: We are currently researching ways of enhancing image quality prior to submission to OCR. The OCR engine we are currently utilizing is the Scansoft API from Nuance (v15). We were researching the Lead T...
[ "java", ".net", "image-processing", "ocr", "image-enhancement" ]
4
4
3,899
7
0
2008-09-27T01:56:07.977000
2008-09-27T03:31:09.433000
142,756
145,438
Automatically set list item permission, after new item is created
We have a SharePoint Team Site (WSS 3.0 not MOSS), that includes Tasks list to records every tasks related to a project. Here's the scenario. Users: List item Supervisor1 TeamMember1 TeamMember2 TeamMember3 How do we set the permission settings so that Every users (Supervisor and team members) can see any tasks. Superv...
you do not need any workflow or event handlers ( still you can use them for your purpos but they will slow down the performance if you will be having a lot of items) go to setting --> list settings click on Advanced Settings in Item-level Permissions in read access select all items and in the same place in Edit access ...
Automatically set list item permission, after new item is created We have a SharePoint Team Site (WSS 3.0 not MOSS), that includes Tasks list to records every tasks related to a project. Here's the scenario. Users: List item Supervisor1 TeamMember1 TeamMember2 TeamMember3 How do we set the permission settings so that E...
TITLE: Automatically set list item permission, after new item is created QUESTION: We have a SharePoint Team Site (WSS 3.0 not MOSS), that includes Tasks list to records every tasks related to a project. Here's the scenario. Users: List item Supervisor1 TeamMember1 TeamMember2 TeamMember3 How do we set the permission ...
[ "sharepoint", "wss" ]
0
2
9,304
6
0
2008-09-27T02:08:03.267000
2008-09-28T07:53:08.640000
142,762
142,875
Is there a DataContext in LINQ-to-Entities (NOT Linq-to-SQL)?
I recently asked a question about tracing Linq-to-Entities I think that one of the answers was not right, as they refer to using the DataContext. Is there a DataContext for LINQ-to-Entities? If so, how do I get it?
LINQ to Entities uses ObjectContext, not DataContext. Here is a short description of EF: LINQ to Entities, the ObjectContext Class, and the Entity Data Model LINQ to Entities queries use the Object Services infrastructure. The ObjectContext class is the primary class for interacting with an EDM as CLR objects. The deve...
Is there a DataContext in LINQ-to-Entities (NOT Linq-to-SQL)? I recently asked a question about tracing Linq-to-Entities I think that one of the answers was not right, as they refer to using the DataContext. Is there a DataContext for LINQ-to-Entities? If so, how do I get it?
TITLE: Is there a DataContext in LINQ-to-Entities (NOT Linq-to-SQL)? QUESTION: I recently asked a question about tracing Linq-to-Entities I think that one of the answers was not right, as they refer to using the DataContext. Is there a DataContext for LINQ-to-Entities? If so, how do I get it? ANSWER: LINQ to Entities...
[ "linq-to-entities" ]
7
10
8,256
4
0
2008-09-27T02:11:48.080000
2008-09-27T03:21:55.180000
142,764
142,770
How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04?
I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries installed on 2.5.2 to python 2.6rc2. Please let me know how I can achieve this. Thanks D...
With the warning that I think it's a tremendously bad idea to replace the default Python with an unreleased beta version: First, install 2.6rc2. You can download the source from the Python website. Standard./configure && make && sudo make install installation style. Next, remove the /usr/bin/python symlink. Do not remo...
How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04? I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries installed on 2.5.2 ...
TITLE: How do I upgrade python 2.5.2 to python 2.6rc2 on ubuntu linux 8.04? QUESTION: I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04 to python 2.6rc2. I'd like to make 2.6 the default python version on the system and migrate all the other useful installed python libraries i...
[ "python", "linux", "ubuntu", "installation" ]
8
14
31,607
4
0
2008-09-27T02:15:03.703000
2008-09-27T02:19:38.233000
142,772
142,803
What is the difference between the Project and SVN workingDirectory config Blocks in CruiseControl.NET
What is the difference between the Project and SVN workingDirectory Config Blocks in CruiseControl.NET? I setup Subversion and now I'm working on CruiseControl.NET and noticed there are two workingDirectory blocks in the config files. I've looked through their google groups and documentation and maybe I missed somethin...
I think the project working directory is used as the root folder for all commands in the CruiseControl block. So if I have a Nant task/script with relative folders, it will be appended to this root folder for actual execution. The Working Directory for the project (this is used by other blocks). Relative paths are rela...
What is the difference between the Project and SVN workingDirectory config Blocks in CruiseControl.NET What is the difference between the Project and SVN workingDirectory Config Blocks in CruiseControl.NET? I setup Subversion and now I'm working on CruiseControl.NET and noticed there are two workingDirectory blocks in ...
TITLE: What is the difference between the Project and SVN workingDirectory config Blocks in CruiseControl.NET QUESTION: What is the difference between the Project and SVN workingDirectory Config Blocks in CruiseControl.NET? I setup Subversion and now I'm working on CruiseControl.NET and noticed there are two workingDi...
[ "svn", "installation", "cruisecontrol.net" ]
3
2
677
2
0
2008-09-27T02:20:55.530000
2008-09-27T02:43:11.483000
142,789
142,809
What is a "callback" in C and how are they implemented?
From the reading that I have done, Core Audio relies heavily on callbacks (and C++, but that's another story). I understand the concept (sort of) of setting up a function that is called by another function repeatedly to accomplish a task. I just don't understand how they get set up and how they actually work. Any examp...
There is no "callback" in C - not more than any other generic programming concept. They're implemented using function pointers. Here's an example: void populate_array(int *array, size_t arraySize, int (*getNextValue)(void)) { for (size_t i=0; i Here, the populate_array function takes a function pointer as its third par...
What is a "callback" in C and how are they implemented? From the reading that I have done, Core Audio relies heavily on callbacks (and C++, but that's another story). I understand the concept (sort of) of setting up a function that is called by another function repeatedly to accomplish a task. I just don't understand h...
TITLE: What is a "callback" in C and how are they implemented? QUESTION: From the reading that I have done, Core Audio relies heavily on callbacks (and C++, but that's another story). I understand the concept (sort of) of setting up a function that is called by another function repeatedly to accomplish a task. I just ...
[ "c", "callback" ]
187
249
370,373
10
0
2008-09-27T02:32:40.993000
2008-09-27T02:46:11.477000
142,804
143,131
Network Multithreading
I'm programming an online game for two reasons, one to familiarize myself with server/client requests in a realtime environment (as opposed to something like a typical web browser, which is not realtime) and to actually get my hands wet in that area, so I can proceed to actually properly design one. Anywho, I'm doing t...
The easiest thing for you to do, would be to simply invoke the windows API QueueUserWorkItem. All you have to specify is the function that the thread will execute and the input passed to it. A thread pool will be automatically created for you and the jobs executed in it. New threads will be created as and when is requi...
Network Multithreading I'm programming an online game for two reasons, one to familiarize myself with server/client requests in a realtime environment (as opposed to something like a typical web browser, which is not realtime) and to actually get my hands wet in that area, so I can proceed to actually properly design o...
TITLE: Network Multithreading QUESTION: I'm programming an online game for two reasons, one to familiarize myself with server/client requests in a realtime environment (as opposed to something like a typical web browser, which is not realtime) and to actually get my hands wet in that area, so I can proceed to actually...
[ "c++", "multithreading", "networking" ]
4
7
4,624
6
0
2008-09-27T02:43:26.257000
2008-09-27T06:34:58.913000
142,812
143,221
Does Python have a bitfield type?
I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
Bitarray was the best answer I found, when I recently had a similar need. It's a C extension (so much faster than BitVector, which is pure python) and stores its data in an actual bitfield (so it's eight times more memory efficient than a numpy boolean array, which appears to use a byte per element.)
Does Python have a bitfield type? I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution?
TITLE: Does Python have a bitfield type? QUESTION: I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution? ANSWER: Bitarray was the best answer I found, when I recently had a similar need. It's a C extension (so much faster than B...
[ "python", "bit-fields", "bitarray" ]
57
32
78,943
12
0
2008-09-27T02:47:40.397000
2008-09-27T08:20:43.577000
142,816
142,838
How to get started with game programming on the Zune
My zune just updated to 3.0 (didn't even realize they were releasing something new!) and the update came with two games, but the Zune marketplace does not have games. Where do I go to get started, and what are the capabilities of the Zune in terms of games/apps?
Well, first, you must download the Microsoft XNA 3.0 CTP. Read the documentation, which will explain the capabilities. But, from memory: No hardware accelerated 3d (obviously, you can create a software 3d engine and then render the result to a 2d sprite, but... Don't expect much in terms of performance;)) No XACT, you ...
How to get started with game programming on the Zune My zune just updated to 3.0 (didn't even realize they were releasing something new!) and the update came with two games, but the Zune marketplace does not have games. Where do I go to get started, and what are the capabilities of the Zune in terms of games/apps?
TITLE: How to get started with game programming on the Zune QUESTION: My zune just updated to 3.0 (didn't even realize they were releasing something new!) and the update came with two games, but the Zune marketplace does not have games. Where do I go to get started, and what are the capabilities of the Zune in terms o...
[ "xna", "zune", "xna-3.0" ]
6
4
1,003
4
0
2008-09-27T02:51:22.073000
2008-09-27T03:01:31.860000
142,820
142,823
Design Time viewing for User Control events
I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on the control that I would like the consumer of my control to be able to see. I'm unable to actually get my events to show up in the Events tab of the Properties window during design time. This means the on...
Make sure your events are exposed as public. For example... [Browsable(true)] public event EventHandler MyCustomEvent;
Design Time viewing for User Control events I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on the control that I would like the consumer of my control to be able to see. I'm unable to actually get my events to show up in the Events tab of the Properties ...
TITLE: Design Time viewing for User Control events QUESTION: I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on the control that I would like the consumer of my control to be able to see. I'm unable to actually get my events to show up in the Events tab ...
[ "c#", "winforms", "user-controls" ]
15
30
10,634
3
0
2008-09-27T02:52:10.057000
2008-09-27T02:53:05.640000
142,826
143,153
Is there a way to indefinitely pause a thread?
I've been working on a web crawling.NET app in my free time, and one of the features of this app that I wanted to included was a pause button to pause a specific thread. I'm relatively new to multi-threading and I haven't been able to figure out a way to pause a thread indefinitely that is currently supported. I can't ...
Never, ever use Thread.Suspend. The major problem with it is that 99% of the time you can't know what that thread is doing when you suspend it. If that thread holds a lock, you make it easier to get into a deadlock situation, etc. Keep in mind that code you are calling may be acquiring/releasing locks behind the scenes...
Is there a way to indefinitely pause a thread? I've been working on a web crawling.NET app in my free time, and one of the features of this app that I wanted to included was a pause button to pause a specific thread. I'm relatively new to multi-threading and I haven't been able to figure out a way to pause a thread ind...
TITLE: Is there a way to indefinitely pause a thread? QUESTION: I've been working on a web crawling.NET app in my free time, and one of the features of this app that I wanted to included was a pause button to pause a specific thread. I'm relatively new to multi-threading and I haven't been able to figure out a way to ...
[ "c#", ".net", "multithreading" ]
34
98
39,246
7
0
2008-09-27T02:54:38.600000
2008-09-27T06:54:33.907000
142,844
142,854
Drag and drop onto Python script in Windows Explorer
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a drop target. Is there some kind of configuration that needs to be done ...
Sure. From a mindless technology article called "Make Python Scripts Droppable in Windows", you can add a drop handler by adding a registry key: Here’s a registry import file that you can use to do this. Copy the following into a.reg file and run it (Make sure that your.py extensions are mapped to Python.File). Windows...
Drag and drop onto Python script in Windows Explorer I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a drop target. Is th...
TITLE: Drag and drop onto Python script in Windows Explorer QUESTION: I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a ...
[ "python", "windows", "drag-and-drop", "windows-explorer" ]
61
63
75,632
8
0
2008-09-27T03:02:30.033000
2008-09-27T03:06:25.640000
142,845
144,184
Splitting log4j Output with Quartz Worker Threads
I'm working on an application that consists of an overall Quartz-based scheduler and "CycledJob" run using CronTriggers. The purpose of the application is to process inputs from different email inboxes based on the source country. Based on the country that it comes in from (i.e. US, UK, FR, etc.) the application trigge...
At the top of each country's processing thread, put the country code into Log4j's mapped diagnostic context (MDC). This uses a ThreadLocal variable so that you don't have to pass the country up and down the call stack explicitly. Then create a custom filter that looks at the MDC, and filters out any events that don't c...
Splitting log4j Output with Quartz Worker Threads I'm working on an application that consists of an overall Quartz-based scheduler and "CycledJob" run using CronTriggers. The purpose of the application is to process inputs from different email inboxes based on the source country. Based on the country that it comes in f...
TITLE: Splitting log4j Output with Quartz Worker Threads QUESTION: I'm working on an application that consists of an overall Quartz-based scheduler and "CycledJob" run using CronTriggers. The purpose of the application is to process inputs from different email inboxes based on the source country. Based on the country ...
[ "java", "multithreading", "log4j", "quartz-scheduler", "scheduler" ]
4
5
5,434
4
0
2008-09-27T03:02:57.303000
2008-09-27T18:21:14.677000
142,863
142,881
How do I import a pre-existing Java project into Eclipse and get up and running?
Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate? I also believe the question, detail, and response is much better than the referenced question. I've been a C++ programmer for quite a while but I'm new to Java and new to Eclipse. ...
Create a new Java project in Eclipse. This will create a src folder (to contain your source files). Also create a lib folder (the name isn't that important, but it follows standard conventions). Copy the./com/* folders into the /src folder (you can just do this using the OS, no need to do any fancy importing or anythin...
How do I import a pre-existing Java project into Eclipse and get up and running? Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate? I also believe the question, detail, and response is much better than the referenced question. I've...
TITLE: How do I import a pre-existing Java project into Eclipse and get up and running? QUESTION: Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate? I also believe the question, detail, and response is much better than the referen...
[ "java", "eclipse" ]
22
18
147,547
4
0
2008-09-27T03:16:56.050000
2008-09-27T03:26:41.940000
142,877
142,921
Can the C preprocessor be used to tell if a file exists?
I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different C++ compilers. Needless to say, maintaining the build process can be quite a chore. There are several places in the codebase where it would clean up the code...
Generally this is done by using a script that tries running the preprocessor on an attempt at including the file. Depending on if the preprocessor returns an error, the script updates a generated.h file with an appropriate #define (or #undef). In bash, the script might look vaguely like this: cat >.test.h <<'EOM' #incl...
Can the C preprocessor be used to tell if a file exists? I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different C++ compilers. Needless to say, maintaining the build process can be quite a chore. There are severa...
TITLE: Can the C preprocessor be used to tell if a file exists? QUESTION: I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different C++ compilers. Needless to say, maintaining the build process can be quite a chore...
[ "c++", "include", "c-preprocessor" ]
92
34
61,636
9
0
2008-09-27T03:22:29.330000
2008-09-27T03:47:02.220000
142,878
256,615
Which language is better for general purpose programming, F# or Haskell?
I'm currently learning Haskell, Which language (F# or Haskell) do you prefer for programming general purpose applications? Which do you think is the stronger language?
I'd go for Haskell. HackageDB is a great collection of libraries that are written specifically for the language. In the case of F# you'd have to use mostly libraries that are not written with a functional language in mind so they will not be as 'elegant' to use. But, of course it depends largely on how much functional ...
Which language is better for general purpose programming, F# or Haskell? I'm currently learning Haskell, Which language (F# or Haskell) do you prefer for programming general purpose applications? Which do you think is the stronger language?
TITLE: Which language is better for general purpose programming, F# or Haskell? QUESTION: I'm currently learning Haskell, Which language (F# or Haskell) do you prefer for programming general purpose applications? Which do you think is the stronger language? ANSWER: I'd go for Haskell. HackageDB is a great collection ...
[ ".net", "haskell", "f#" ]
5
19
2,232
7
0
2008-09-27T03:24:37.670000
2008-11-02T06:44:16.493000
142,890
143,706
Is the PageAction.Details route necessary in the default Dynamic Data template?
In the default Visual Studio template for a dynamic data web application, Global.asax includes the following two sample routes. // route #1 routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") { Action = PageAction.List, ViewName = "ListDetails", Model = model }); // route #2 routes.Add(new DynamicDataRoute("{t...
You're right, route #2 isn't going to be used in this instance. The only time route #2 would come into play is if you were requesting a details page URL from the route engine. Because the ListDetails.aspx page template handles both the list and details views, it never requests a details template URL.
Is the PageAction.Details route necessary in the default Dynamic Data template? In the default Visual Studio template for a dynamic data web application, Global.asax includes the following two sample routes. // route #1 routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") { Action = PageAction.List, ViewName = "...
TITLE: Is the PageAction.Details route necessary in the default Dynamic Data template? QUESTION: In the default Visual Studio template for a dynamic data web application, Global.asax includes the following two sample routes. // route #1 routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") { Action = PageAction....
[ "asp.net", "routes", "dynamic-data" ]
1
2
416
1
0
2008-09-27T03:29:24.523000
2008-09-27T14:29:55.637000
142,928
142,942
Image Recognition
I'd like to do some work with the nitty-gritties of computer imaging. I'm looking for a way to read single pixels of data, analyze them programatically, and change them. What is the best language to use for this (Python, c++, Java...)? What is the best fileformat? I don't want any super fancy software/APIs... I'm looki...
If you need speed (you'll probably always want speed with image processing) you definitely have to work with raw pixel data. Java has some real disadvantages as you cannot access memory directly which makes pixel access quite slow compared to accessing the memory directly. C++ is definitely the language of choice for p...
Image Recognition I'd like to do some work with the nitty-gritties of computer imaging. I'm looking for a way to read single pixels of data, analyze them programatically, and change them. What is the best language to use for this (Python, c++, Java...)? What is the best fileformat? I don't want any super fancy software...
TITLE: Image Recognition QUESTION: I'd like to do some work with the nitty-gritties of computer imaging. I'm looking for a way to read single pixels of data, analyze them programatically, and change them. What is the best language to use for this (Python, c++, Java...)? What is the best fileformat? I don't want any su...
[ "image", "image-processing", "pixel" ]
5
7
7,380
10
0
2008-09-27T03:50:07.377000
2008-09-27T03:58:51.863000
142,944
142,962
How do you implement a Highpass filter for the IPhone accelerometer?
I remember seeing the code for a Highpass filter a few days back somewhere in the samples, however I can't find it anywhere now! Could someone remember me where the Highpass filter implementation code was? Or better yet post the algorithm? Thanks!
From the idevkit.com forums: #define kFilteringFactor 0.1 static UIAccelerationValue rollingX=0, rollingY=0, rollingZ=0; - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration { // Calculate low pass values rollingX = (acceleration.x * kFilteringFactor) + (rollingX * (1.0...
How do you implement a Highpass filter for the IPhone accelerometer? I remember seeing the code for a Highpass filter a few days back somewhere in the samples, however I can't find it anywhere now! Could someone remember me where the Highpass filter implementation code was? Or better yet post the algorithm? Thanks!
TITLE: How do you implement a Highpass filter for the IPhone accelerometer? QUESTION: I remember seeing the code for a Highpass filter a few days back somewhere in the samples, however I can't find it anywhere now! Could someone remember me where the Highpass filter implementation code was? Or better yet post the algo...
[ "iphone" ]
15
36
17,073
3
0
2008-09-27T03:59:42.080000
2008-09-27T04:12:22.720000
142,948
143,009
How can I use functional programming in the real world?
Functional languages are good because they avoid bugs by eliminating state, but also because they can be easily parallelized automatically for you, without you having to worry about the thread count. As a Win32 developer though, can I use Haskell for some DLL files of my application? And if I do, is there a real advant...
It seems like the book Real World Haskell is just what you're looking for. You can read it free online.
How can I use functional programming in the real world? Functional languages are good because they avoid bugs by eliminating state, but also because they can be easily parallelized automatically for you, without you having to worry about the thread count. As a Win32 developer though, can I use Haskell for some DLL file...
TITLE: How can I use functional programming in the real world? QUESTION: Functional languages are good because they avoid bugs by eliminating state, but also because they can be easily parallelized automatically for you, without you having to worry about the thread count. As a Win32 developer though, can I use Haskell...
[ "haskell", "f#", "functional-programming" ]
103
41
19,774
6
0
2008-09-27T04:02:25.163000
2008-09-27T04:41:14.787000
142,965
143,136
Handling context-path refs when migrating "/" site to Java EE packaging
An existing Java site is designed to run under "/" on tomcat and there are many specific references to fixed absolute paths like "/dir/dir/page". Want to migrate this to Java EE packaging, where the site will need to run under a context-root e.g. "/dir/dir/page" becomes "/my-context-root/dir/dir/page" Now, the context-...
Check out a related question Also consider URLRewriteFilter Another thing (I keep editing this darn post). If you're using JSP (versus static HTML or something else) you could also create a Tag File to replace the common html tags with links (notably a, img, form). So link can become link. Then the tag can do the trans...
Handling context-path refs when migrating "/" site to Java EE packaging An existing Java site is designed to run under "/" on tomcat and there are many specific references to fixed absolute paths like "/dir/dir/page". Want to migrate this to Java EE packaging, where the site will need to run under a context-root e.g. "...
TITLE: Handling context-path refs when migrating "/" site to Java EE packaging QUESTION: An existing Java site is designed to run under "/" on tomcat and there are many specific references to fixed absolute paths like "/dir/dir/page". Want to migrate this to Java EE packaging, where the site will need to run under a c...
[ "java", "servlets", "servlet-filters" ]
1
1
2,267
2
0
2008-09-27T04:13:50.703000
2008-09-27T06:41:44.327000
142,972
143,024
C#: Convert COMP-3 Packed Decimal to Human-Readable Value
I have a series of ASCII flat files coming in from a mainframe to be processed by a C# application. A new feed has been introduced with a Packed Decimal (COMP-3) field, which needs to be converted to a numerical value. The files are being transferred via FTP, using ASCII transfer mode. I am concerned that the binary fi...
First of all you must eliminate the end of line (EOL) translation problems that will be caused by ASCII transfer mode. You are absolutely right to be concerned about data corruption when the BCD values happen to correspond to EOL characters. The worst aspect of this problem is that it will occur rarely and unexpectedly...
C#: Convert COMP-3 Packed Decimal to Human-Readable Value I have a series of ASCII flat files coming in from a mainframe to be processed by a C# application. A new feed has been introduced with a Packed Decimal (COMP-3) field, which needs to be converted to a numerical value. The files are being transferred via FTP, us...
TITLE: C#: Convert COMP-3 Packed Decimal to Human-Readable Value QUESTION: I have a series of ASCII flat files coming in from a mainframe to be processed by a C# application. A new feed has been introduced with a Packed Decimal (COMP-3) field, which needs to be converted to a numerical value. The files are being trans...
[ "c#", ".net", "ibm-midrange", "flat-file", "comp-3" ]
6
6
21,773
8
0
2008-09-27T04:18:48.790000
2008-09-27T04:56:52.893000
143,006
143,007
Why does my MFC app hang when I throw an exception?
If you throw an exception from inside an MFC dialog, the app hangs, even if you have a catch block in your code. It refuses to respond to the mouse or keyboard, and the only way to shut it down is to use Task Manager. Why I'm posting this question To my shame, there is a popular shrink-wrapped application that hangs ev...
The code for CDialog::DoModal makes the dialog modal by disabling the parent window. When the dialog code returns, the window is reenabled. There is an explicit catch for CException* errors, but not for any other kind of thrown exception; thus the parent window never gets reenabled. Change your code to throw a pointer ...
Why does my MFC app hang when I throw an exception? If you throw an exception from inside an MFC dialog, the app hangs, even if you have a catch block in your code. It refuses to respond to the mouse or keyboard, and the only way to shut it down is to use Task Manager. Why I'm posting this question To my shame, there i...
TITLE: Why does my MFC app hang when I throw an exception? QUESTION: If you throw an exception from inside an MFC dialog, the app hangs, even if you have a catch block in your code. It refuses to respond to the mouse or keyboard, and the only way to shut it down is to use Task Manager. Why I'm posting this question To...
[ "c++", "windows", "mfc" ]
5
9
1,992
3
0
2008-09-27T04:38:49.850000
2008-09-27T04:39:24.450000
143,019
145,654
Defaulting to different URLs when Generating Web Service Proxy with WSDL.exe
I have numerous Web Services in my project that share types. For simplicity I will demonstrate with two Web Services. WebService1 at http://MyServer/WebService.asmx webService2 at http://MyServer/WebService.asmx When I generate the proxy for these two services I use: wsdl /sharetypes http://MyServer/WebService1.asmx ht...
The proxy classes generated are partial classes, so my solution would be to add your own constructor in a different (non-generated) code file, which explicitly reads a different setting for each proxy.
Defaulting to different URLs when Generating Web Service Proxy with WSDL.exe I have numerous Web Services in my project that share types. For simplicity I will demonstrate with two Web Services. WebService1 at http://MyServer/WebService.asmx webService2 at http://MyServer/WebService.asmx When I generate the proxy for t...
TITLE: Defaulting to different URLs when Generating Web Service Proxy with WSDL.exe QUESTION: I have numerous Web Services in my project that share types. For simplicity I will demonstrate with two Web Services. WebService1 at http://MyServer/WebService.asmx webService2 at http://MyServer/WebService.asmx When I genera...
[ "c#", "asp.net", "web-services", "wsdl" ]
0
4
2,838
3
0
2008-09-27T04:51:41.877000
2008-09-28T10:59:57.537000
143,020
146,415
mathematical optimization library for Java --- free or open source recommendations?
Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have to write my own implementations, or buy one of those commercial produc...
A good answer is dependent on what you mean by "convex" and "more general" If you are trying to solve large or challenging linear or convex-quadratic optimization problems (especially with a discrete component to them), then it's hard to beat the main commercial solvers, gurobi, cplex and Dash unless money is a big iss...
mathematical optimization library for Java --- free or open source recommendations? Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger proble...
TITLE: mathematical optimization library for Java --- free or open source recommendations? QUESTION: Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to ha...
[ "mathematical-optimization", "linear-programming", "cplex", "gurobi", "convex-optimization" ]
16
11
19,723
7
0
2008-09-27T04:52:44.323000
2008-09-28T18:22:11.280000
143,032
143,055
Does VB6 have a #pragma pack equivalent?
I am developing a TCP/IP client that has to deal with a proprietary binary protocol. I was considering using user-defined types to represent the protocol headers, and using CopyMemory to shuffle data to and from the UDT and a byte array. However, it appears that VB6 adds padding bytes to align user-defined types. Is th...
No. Your best bet is to write the low level code in C or C++ (where you do have #pragma pack ), then expose the interface via COM.
Does VB6 have a #pragma pack equivalent? I am developing a TCP/IP client that has to deal with a proprietary binary protocol. I was considering using user-defined types to represent the protocol headers, and using CopyMemory to shuffle data to and from the UDT and a byte array. However, it appears that VB6 adds padding...
TITLE: Does VB6 have a #pragma pack equivalent? QUESTION: I am developing a TCP/IP client that has to deal with a proprietary binary protocol. I was considering using user-defined types to represent the protocol headers, and using CopyMemory to shuffle data to and from the UDT and a byte array. However, it appears tha...
[ "vb6" ]
4
5
2,181
2
0
2008-09-27T05:02:52.770000
2008-09-27T05:20:22.807000
143,063
143,161
EventWaitHandle behavior for pthread_cond_t
I've recently seen the light of EventWaitHandle's powerful behavior in C# and decided to move some functionality in a sister application to do the same. The only problem is that the sister app is written in C. No big deal, I'm using pthreads, which have a pthread_cond_t datatype that allows for signalling. My only ques...
If you're using condition variables correctly, this won't matter. The basic flow of your code should be (in pseudocode): lock(lockobj); while (!signalled) { wait(condvar); } signalled = false; unlock(lockobj); on the waiting side, and: lock(lockobj); signalled = true; notify(condvar); unlock(lockobj); on the signalling...
EventWaitHandle behavior for pthread_cond_t I've recently seen the light of EventWaitHandle's powerful behavior in C# and decided to move some functionality in a sister application to do the same. The only problem is that the sister app is written in C. No big deal, I'm using pthreads, which have a pthread_cond_t datat...
TITLE: EventWaitHandle behavior for pthread_cond_t QUESTION: I've recently seen the light of EventWaitHandle's powerful behavior in C# and decided to move some functionality in a sister application to do the same. The only problem is that the sister app is written in C. No big deal, I'm using pthreads, which have a pt...
[ "c#", "c", "multithreading", "data-structures", "pthreads" ]
1
4
1,283
3
0
2008-09-27T05:30:46.977000
2008-09-27T07:01:35.153000
143,072
143,080
In Emacs, what is the opposite function of other-window (C-x o)?
Possible Duplicate: Emacs, switch to previous window other-window advances me to the next window in the current frame, but I also want a way to move back to the previous window. Emacs has next-buffer and previous-buffer, but no analogous interactive functions for window navigation. Just other-window.
Provide a negative argument with C-u - ("Control+U" then "minus"), or even more simply C-- ("Control minus"). Move to previous window: C-- C-x o Move to previous frame: C-- C-x 5 o From code, (other-window -1) or (other-frame -1) will do the same thing. Check out the help for the key you want to reverse (e.g. C-h k C-x...
In Emacs, what is the opposite function of other-window (C-x o)? Possible Duplicate: Emacs, switch to previous window other-window advances me to the next window in the current frame, but I also want a way to move back to the previous window. Emacs has next-buffer and previous-buffer, but no analogous interactive funct...
TITLE: In Emacs, what is the opposite function of other-window (C-x o)? QUESTION: Possible Duplicate: Emacs, switch to previous window other-window advances me to the next window in the current frame, but I also want a way to move back to the previous window. Emacs has next-buffer and previous-buffer, but no analogous...
[ "emacs" ]
32
35
9,008
6
0
2008-09-27T05:40:16.847000
2008-09-27T05:53:04.897000
143,073
206,081
Debugging C++ STL containers in Windbg
Windbg fans claim that it is quite powerful and I tend to agree. But when it comes to debugging STL containers, I am always stuck. If the variable is on the stack, the!stl extension sometimes figures it out, but when a container with a complex type (e.g. std::vector > ) is on the heap or part of some other structure, I...
You might also want to give this debugger extension a try. It is a library called SDbgExt, developed by Skywing.
Debugging C++ STL containers in Windbg Windbg fans claim that it is quite powerful and I tend to agree. But when it comes to debugging STL containers, I am always stuck. If the variable is on the stack, the!stl extension sometimes figures it out, but when a container with a complex type (e.g. std::vector > ) is on the ...
TITLE: Debugging C++ STL containers in Windbg QUESTION: Windbg fans claim that it is quite powerful and I tend to agree. But when it comes to debugging STL containers, I am always stuck. If the variable is on the stack, the!stl extension sometimes figures it out, but when a container with a complex type (e.g. std::vec...
[ "c++", "stl", "windbg" ]
10
2
7,229
6
0
2008-09-27T05:40:27.330000
2008-10-15T19:29:19.383000
143,075
143,114
NSDateFormatter, am I doing something wrong or is this a bug?
I'm trying to print out the date in a certain format: NSDate *today = [[NSDate alloc] init]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyyMMddHHmmss"]; NSString *dateStr = [dateFormatter stringFromDate:today]; If the iPhone is set to 24 hour time, this works fine, ...
Using the code you posted on both the simulator and a phone with the 2.1 firmware and 24-hour time set to off, I never had an AM/PM appended to dateStr when I do: NSLog(@"%@", dateStr); Are you doing anything else with dateStr that you didn't post here? How are you checking the value? Follow up Try turning the am/pm se...
NSDateFormatter, am I doing something wrong or is this a bug? I'm trying to print out the date in a certain format: NSDate *today = [[NSDate alloc] init]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyyMMddHHmmss"]; NSString *dateStr = [dateFormatter stringFromDate:t...
TITLE: NSDateFormatter, am I doing something wrong or is this a bug? QUESTION: I'm trying to print out the date in a certain format: NSDate *today = [[NSDate alloc] init]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyyMMddHHmmss"]; NSString *dateStr = [dateFormatte...
[ "iphone", "ios", "objective-c", "nsdate", "nsdateformatter" ]
39
12
16,777
8
0
2008-09-27T05:41:52.350000
2008-09-27T06:17:37.660000
143,084
143,091
Is it OK to have an 'empty' class that extends another class?
Let's say I have one class Foo that has a bunch of logic in it and another class Bar which is essentially the same. However, as Foo and Bar are different (but related) entities I need the difference to be apparent from my code (i.e. I can tell whether an instance is a Foo or a Bar ) As I was whacking this together with...
In my opinion, it's best if Foo and Bar subclass off a common ancestor class (maybe AbstractFoo ), which has all the functionality. What difference in behaviour should exist between Foo and Bar? Code that difference as an abstract method in AbstractFoo, not by using a if statement in your code. Example: Rather than thi...
Is it OK to have an 'empty' class that extends another class? Let's say I have one class Foo that has a bunch of logic in it and another class Bar which is essentially the same. However, as Foo and Bar are different (but related) entities I need the difference to be apparent from my code (i.e. I can tell whether an ins...
TITLE: Is it OK to have an 'empty' class that extends another class? QUESTION: Let's say I have one class Foo that has a bunch of logic in it and another class Bar which is essentially the same. However, as Foo and Bar are different (but related) entities I need the difference to be apparent from my code (i.e. I can t...
[ "java" ]
10
14
9,548
10
0
2008-09-27T05:56:35.263000
2008-09-27T05:59:19
143,087
143,217
JavaScript object browser?
I was recently tasked to document a large JavaScript application I have been maintaining for some time. So I do have a good knowledge of the system. But due the sheer size of the application, it will probably take a lot of time even with prior knowledge around the code and the source code itself in uncompressed form. S...
Firebug 's DOM tab lets you browse the contents of the global window object, and you can inspect a particular object by entering inspect(whatever) in the command line. You won't be able to use it to detect relationships unless an instance of one object holds an instance of a related object, but it's a start. You can al...
JavaScript object browser? I was recently tasked to document a large JavaScript application I have been maintaining for some time. So I do have a good knowledge of the system. But due the sheer size of the application, it will probably take a lot of time even with prior knowledge around the code and the source code its...
TITLE: JavaScript object browser? QUESTION: I was recently tasked to document a large JavaScript application I have been maintaining for some time. So I do have a good knowledge of the system. But due the sheer size of the application, it will probably take a lot of time even with prior knowledge around the code and t...
[ "javascript" ]
7
7
4,524
7
0
2008-09-27T05:57:14.683000
2008-09-27T08:15:16.023000
143,108
143,119
Is Windows' rand_s thread-safe?
Just as in title. Is suspect it is, but I couldn't find it anywhere explicitly stated. And for this property I wouldn't like to rely on speculations.
If you use the multithreaded version of the CRT, all functions are thread safe, because any thread-specific information is stored in TLS. rand_s actually doesn't use state information in the first place, since it just calls an OS API, so question of thread-safety doesn't arise for rand_s. rand(), however depends on a s...
Is Windows' rand_s thread-safe? Just as in title. Is suspect it is, but I couldn't find it anywhere explicitly stated. And for this property I wouldn't like to rely on speculations.
TITLE: Is Windows' rand_s thread-safe? QUESTION: Just as in title. Is suspect it is, but I couldn't find it anywhere explicitly stated. And for this property I wouldn't like to rely on speculations. ANSWER: If you use the multithreaded version of the CRT, all functions are thread safe, because any thread-specific inf...
[ "c", "windows", "multithreading", "random" ]
13
11
6,735
5
0
2008-09-27T06:13:39.857000
2008-09-27T06:28:11.880000
143,122
143,192
Using SimpleXML to create an XML object from scratch
Is it possible to use PHP's SimpleXML functions to create an XML object from scratch? Looking through the function list, there's ways to import an existing XML string into an object that you can then manipulate, but if I just want to generate an XML object programmatically from scratch, what's the best way to do that? ...
Sure you can. Eg. "); $newsXML->addAttribute('newsPagePrefix', 'value goes here'); $newsIntro = $newsXML->addChild('content'); $newsIntro->addAttribute('type', 'latest'); Header('Content-type: text/xml'); echo $newsXML->asXML();?> Output Have fun.
Using SimpleXML to create an XML object from scratch Is it possible to use PHP's SimpleXML functions to create an XML object from scratch? Looking through the function list, there's ways to import an existing XML string into an object that you can then manipulate, but if I just want to generate an XML object programmat...
TITLE: Using SimpleXML to create an XML object from scratch QUESTION: Is it possible to use PHP's SimpleXML functions to create an XML object from scratch? Looking through the function list, there's ways to import an existing XML string into an object that you can then manipulate, but if I just want to generate an XML...
[ "php", "xml", "simplexml" ]
83
150
134,615
3
0
2008-09-27T06:30:05.650000
2008-09-27T07:42:05.757000
143,123
143,127
How to create a buffer for reading socket data in C
Using C / C++ socket programming, and the "read(socket, buffer, BUFSIZE)" method. What exactly is the "buffer" I know that char and byte are the same thing, but does it matter how many elements the byte array has in it? Does the buffer need to be able to hold the entire message until the null character?
BUFSIZE should be equal to the size of your buffer in bytes. read() will stop reading when the buffer is full. Here is an example: #define MY_BUFFER_SIZE 1024 char mybuffer[MY_BUFFER_SIZE]; int nBytes = read(sck, mybuffer, MY_BUFFER_SIZE);
How to create a buffer for reading socket data in C Using C / C++ socket programming, and the "read(socket, buffer, BUFSIZE)" method. What exactly is the "buffer" I know that char and byte are the same thing, but does it matter how many elements the byte array has in it? Does the buffer need to be able to hold the enti...
TITLE: How to create a buffer for reading socket data in C QUESTION: Using C / C++ socket programming, and the "read(socket, buffer, BUFSIZE)" method. What exactly is the "buffer" I know that char and byte are the same thing, but does it matter how many elements the byte array has in it? Does the buffer need to be abl...
[ "c", "sockets" ]
10
15
45,993
3
0
2008-09-27T06:30:47.800000
2008-09-27T06:33:07.157000
143,130
144,884
How to synchronize two Subversion repositories?
My company has a subsidiary with a slow Internet connection. Our developers there suffer to interact with our central Subversion server. Is it possible to configure a slave/mirror for them? They would interact locally with the server and all the commits would be automatically synchronized to the master server. This sho...
Subversion 1.5 introduced proxy support when you're using http to host your repository. Developers can checkout their working copies from the slave. Then all read-only operations (diff, log, update etc) will use the slave. When committing, the slave transparently passes all write operation to the master.
How to synchronize two Subversion repositories? My company has a subsidiary with a slow Internet connection. Our developers there suffer to interact with our central Subversion server. Is it possible to configure a slave/mirror for them? They would interact locally with the server and all the commits would be automatic...
TITLE: How to synchronize two Subversion repositories? QUESTION: My company has a subsidiary with a slow Internet connection. Our developers there suffer to interact with our central Subversion server. Is it possible to configure a slave/mirror for them? They would interact locally with the server and all the commits ...
[ "svn", "version-control", "synchronization" ]
58
29
69,642
7
0
2008-09-27T06:34:56.917000
2008-09-28T00:41:09.240000
143,140
143,277
Bron-Kerbosch algorithm for clique finding
Can anyone tell me, where on the web I can find an explanation for Bron-Kerbosch algorithm for clique finding or explain here how it works? I know it was published in "Algorithm 457: finding all cliques of an undirected graph" book, but I can't find free source that will describe the algorithm. I don't need a source co...
Try finding someone with an ACM student account who can give you a copy of the paper, which is here: http://portal.acm.org/citation.cfm?doid=362342.362367 I just downloaded it, and it's only two pages long, with an implementation in Algol 60!
Bron-Kerbosch algorithm for clique finding Can anyone tell me, where on the web I can find an explanation for Bron-Kerbosch algorithm for clique finding or explain here how it works? I know it was published in "Algorithm 457: finding all cliques of an undirected graph" book, but I can't find free source that will descr...
TITLE: Bron-Kerbosch algorithm for clique finding QUESTION: Can anyone tell me, where on the web I can find an explanation for Bron-Kerbosch algorithm for clique finding or explain here how it works? I know it was published in "Algorithm 457: finding all cliques of an undirected graph" book, but I can't find free sour...
[ "algorithm", "graph-theory", "clique" ]
11
4
16,640
7
0
2008-09-27T06:44:31.433000
2008-09-27T09:03:07.700000
143,162
146,791
Have you moved MOSS SharePoint 2007 out of the C:\Inetpub\wwwroot\wss\ folder?
Is it best practice to not use C:\Inetpub\wwwroot\wss\ for SharePoint? My concern is that the configuration wizard seems to look for this C: path and it may be too complicated to not use the default path(s),
You should not be changing anything in the sharepoint IIS sites through IIS Manager, except through the sharepoint Central Admin site. There are dependencies in the sharepoint configuration that are not just stored in IIS, especially around the users that are applied for app pools etc. This website does most of the thi...
Have you moved MOSS SharePoint 2007 out of the C:\Inetpub\wwwroot\wss\ folder? Is it best practice to not use C:\Inetpub\wwwroot\wss\ for SharePoint? My concern is that the configuration wizard seems to look for this C: path and it may be too complicated to not use the default path(s),
TITLE: Have you moved MOSS SharePoint 2007 out of the C:\Inetpub\wwwroot\wss\ folder? QUESTION: Is it best practice to not use C:\Inetpub\wwwroot\wss\ for SharePoint? My concern is that the configuration wizard seems to look for this C: path and it may be too complicated to not use the default path(s), ANSWER: You sh...
[ "sharepoint", "iis" ]
1
1
979
5
0
2008-09-27T07:03:26.787000
2008-09-28T21:34:37.340000
143,171
143,222
How can I use xargs to copy files that have spaces and quotes in their names?
I'm trying to copy a bunch of files below a directory and a number of the files have spaces and single-quotes in their names. When I try to string together find and grep with xargs, I get the following error: find.|grep "FooBar"|xargs -I{} cp "{}" ~/foo/bar xargs: unterminated quote Any suggestions for a more robust us...
You can combine all of that into a single find command: find. -iname "*foobar*" -exec cp -- "{}" ~/foo/bar \; This will handle filenames and directories with spaces in them. You can use -name to get case-sensitive results. Note: The -- flag passed to cp prevents it from processing files starting with - as options.
How can I use xargs to copy files that have spaces and quotes in their names? I'm trying to copy a bunch of files below a directory and a number of the files have spaces and single-quotes in their names. When I try to string together find and grep with xargs, I get the following error: find.|grep "FooBar"|xargs -I{} cp...
TITLE: How can I use xargs to copy files that have spaces and quotes in their names? QUESTION: I'm trying to copy a bunch of files below a directory and a number of the files have spaces and single-quotes in their names. When I try to string together find and grep with xargs, I get the following error: find.|grep "Foo...
[ "linux", "macos", "unix", "command-line", "xargs" ]
253
215
275,560
22
0
2008-09-27T07:10:48.330000
2008-09-27T08:22:19.750000
143,174
198,099
How do I get the directory that a program is running from?
Is there a platform-agnostic and filesystem-agnostic method to obtain the full path of the directory from where a program is running using C/C++? Not to be confused with the current working directory. (Please don't suggest libraries unless they're standard ones like clib or STL.) (If there's no platform/filesystem-agno...
Here's code to get the full path to the executing app: Variable declarations: char pBuf[256]; size_t len = sizeof(pBuf); Windows: int bytes = GetModuleFileName(NULL, pBuf, len); return bytes? bytes: -1; Linux: int bytes = MIN(readlink("/proc/self/exe", pBuf, len), len - 1); if(bytes >= 0) pBuf[bytes] = '\0'; return byt...
How do I get the directory that a program is running from? Is there a platform-agnostic and filesystem-agnostic method to obtain the full path of the directory from where a program is running using C/C++? Not to be confused with the current working directory. (Please don't suggest libraries unless they're standard ones...
TITLE: How do I get the directory that a program is running from? QUESTION: Is there a platform-agnostic and filesystem-agnostic method to obtain the full path of the directory from where a program is running using C/C++? Not to be confused with the current working directory. (Please don't suggest libraries unless the...
[ "c++", "c", "executable-path" ]
291
201
573,330
24
0
2008-09-27T07:18:29.403000
2008-10-13T16:01:28.090000
143,181
143,452
library- vs. application-version
If you have a project, that releases a library and an application, how you handle version-numbers between the two. Example: Your project delivers a library, that convert different file-formats into each other. The library is released for inclusion into other applications. But you also release a command-line-application...
I'd say use separate version numbers, and of course document what minimum library version is required for each release of the app. If they always have the same version number, and you only ever test the app against the equal-numbered library version, then they aren't really separate components, so don't say they are. R...
library- vs. application-version If you have a project, that releases a library and an application, how you handle version-numbers between the two. Example: Your project delivers a library, that convert different file-formats into each other. The library is released for inclusion into other applications. But you also r...
TITLE: library- vs. application-version QUESTION: If you have a project, that releases a library and an application, how you handle version-numbers between the two. Example: Your project delivers a library, that convert different file-formats into each other. The library is released for inclusion into other applicatio...
[ "release", "versions" ]
1
1
583
3
0
2008-09-27T07:25:32.630000
2008-09-27T11:30:12.153000
143,183
143,211
Unit/Automated Testing in a workflow system
Do you do automated testing on a complex workflow system like K2? We are building a system with extensive integration between Sharepoint 2007 and K2. I can't even imagine where to start with automated testing as the workflow involves multiple users interacting with Sharepoint, K2 workflows and custom web pages. Has any...
I'm having a similar problem testing workflow-heavy MOSS-based application. Workflows in our case are based on WWF. My idea is to mock pretty much everything that you can't control from unit tests - documents storage, authentication, user rights and actions, sharepoint-specific parts of workflows for sharepoint (these ...
Unit/Automated Testing in a workflow system Do you do automated testing on a complex workflow system like K2? We are building a system with extensive integration between Sharepoint 2007 and K2. I can't even imagine where to start with automated testing as the workflow involves multiple users interacting with Sharepoint...
TITLE: Unit/Automated Testing in a workflow system QUESTION: Do you do automated testing on a complex workflow system like K2? We are building a system with extensive integration between Sharepoint 2007 and K2. I can't even imagine where to start with automated testing as the workflow involves multiple users interacti...
[ "sharepoint", "unit-testing", "k2" ]
13
3
3,686
5
0
2008-09-27T07:27:16.933000
2008-09-27T08:06:03.203000
143,194
143,196
Getting a Linq-toSQL query to show up on a GridView
I have a pretty complicated Linq query that I can't seem to get into a LinqDataSsource for use in a GridView: IEnumerable tikPart = ( from p in db.comments where p.submitter == me.id && p.ticket.closed == DateTime.Parse("1/1/2001") && p.ticket.originating_group!= me.sub_unit select p.ticket ).Distinct(); How can I get ...
You can setup your Gridview with no Datasource. Setup the gridview columns, and in codebehind bind that result to the grid view.
Getting a Linq-toSQL query to show up on a GridView I have a pretty complicated Linq query that I can't seem to get into a LinqDataSsource for use in a GridView: IEnumerable tikPart = ( from p in db.comments where p.submitter == me.id && p.ticket.closed == DateTime.Parse("1/1/2001") && p.ticket.originating_group!= me.s...
TITLE: Getting a Linq-toSQL query to show up on a GridView QUESTION: I have a pretty complicated Linq query that I can't seem to get into a LinqDataSsource for use in a GridView: IEnumerable tikPart = ( from p in db.comments where p.submitter == me.id && p.ticket.closed == DateTime.Parse("1/1/2001") && p.ticket.origin...
[ "c#", "linq", "linq-to-sql", "gridview" ]
0
0
4,160
4
0
2008-09-27T07:46:02.723000
2008-09-27T07:48:36.397000
143,212
143,501
Full screen mode in silverlight
Would it be possible to show an image in full screen mode using silverlight. I'm looking out for some thing like the full screen option of the flash video players.
You can set Application.Current.Host.Content.IsFullScreen = true; this has to be done from a mouse button event or a click, you can't force the user into full screen without some interaction on their part. Then you'll need to scale the image. If it's in an element that scales automatically, like a Grid cell and the Gri...
Full screen mode in silverlight Would it be possible to show an image in full screen mode using silverlight. I'm looking out for some thing like the full screen option of the flash video players.
TITLE: Full screen mode in silverlight QUESTION: Would it be possible to show an image in full screen mode using silverlight. I'm looking out for some thing like the full screen option of the flash video players. ANSWER: You can set Application.Current.Host.Content.IsFullScreen = true; this has to be done from a mous...
[ "asp.net", "silverlight" ]
2
5
3,299
2
0
2008-09-27T08:07:21.640000
2008-09-27T12:05:57.857000