PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
39,281
09/02/2008 11:36:38
191
08/03/2008 09:55:26
64
2
Database Design for Revisions?
We have a requirement in project to store all the revisions(Change History) for the entities in the database. Currently we have 2 designed proposals for this: e.g. for "Employee" Entity **Design 1:** // Holds the Employee Entity "Employees (EmployeeId, FirstName, LastName, DepartmentId, .., ..)" // Holds the Employee Revisions in Xml. The RevisionXML will contain // all data of that particular EmployeeId "EmployeeHistories (EmployeeId, DateModified, RevisionXML)" **Design 2:** // Holds the Employee Entity "Employees (EmployeeId, FirstName, LastName, DepartmentId, .., ..)" // In this approach we have basically duplicated all the fields on Employees // in the EmployeeHistories and storing the revision data. "EmployeeHistories (EmployeeId, RevisionId, DateModified, FirstName, LastName, DepartmentId, .., ..)" Is there any other way of doing this thing? The problem with the "Design 1" is that we have to parse XML each time when you need to access data. This will slow the process and also add some limitations like we cannot add joins on the revisions data fields. And with "Design 2" is we have to duplicate each and every field on all entities (We have around 70-80 entities for which we want to maintain revisions).
database
database-design
null
null
null
null
open
Database Design for Revisions? === We have a requirement in project to store all the revisions(Change History) for the entities in the database. Currently we have 2 designed proposals for this: e.g. for "Employee" Entity **Design 1:** // Holds the Employee Entity "Employees (EmployeeId, FirstName, LastName, DepartmentId, .., ..)" // Holds the Employee Revisions in Xml. The RevisionXML will contain // all data of that particular EmployeeId "EmployeeHistories (EmployeeId, DateModified, RevisionXML)" **Design 2:** // Holds the Employee Entity "Employees (EmployeeId, FirstName, LastName, DepartmentId, .., ..)" // In this approach we have basically duplicated all the fields on Employees // in the EmployeeHistories and storing the revision data. "EmployeeHistories (EmployeeId, RevisionId, DateModified, FirstName, LastName, DepartmentId, .., ..)" Is there any other way of doing this thing? The problem with the "Design 1" is that we have to parse XML each time when you need to access data. This will slow the process and also add some limitations like we cannot add joins on the revisions data fields. And with "Design 2" is we have to duplicate each and every field on all entities (We have around 70-80 entities for which we want to maintain revisions).
0
39,288
09/02/2008 11:40:00
184
08/03/2008 05:34:19
1,671
25
What exactly consists of 'Business Logic' in an application?
I have heard umpteen times that we 'should not mix business logic with other code' or statements like that. I think every single code I write (processing steps I mean) consists of logic that is related to the business requirements.. Can anyone tell me what exactly consists of business logic? How can it be distinguished from other code? Is there some simple test to determine what is business logic and what is not?
businesslogiclayer
null
null
null
null
null
open
What exactly consists of 'Business Logic' in an application? === I have heard umpteen times that we 'should not mix business logic with other code' or statements like that. I think every single code I write (processing steps I mean) consists of logic that is related to the business requirements.. Can anyone tell me what exactly consists of business logic? How can it be distinguished from other code? Is there some simple test to determine what is business logic and what is not?
0
39,304
09/02/2008 11:47:46
1,541
08/16/2008 13:56:32
79
6
Do C++ logging frameworks sacrifice reusability?
In C++, there isn't a de-facto standard logging tool. In my experience, shops roll their own. This creates a bit of a problem, however, when trying to create reusable software components. If everything in your system depends on the logging component, this makes the software less reusable, basically forcing any downstream projects to take your logging framework along with the components they really want. IOC (dependency injection) doesn't really help with the problem since your components would need to depend on a logging abstraction. Logging components themselves can add dependencies on file I/O, triggering mechanisms, and other possibly unwanted dependencies. **Does adding a dependency to your proprietary logging framework sacrifice the reusability of the component?**
c++
logging
code-reuse
null
null
null
open
Do C++ logging frameworks sacrifice reusability? === In C++, there isn't a de-facto standard logging tool. In my experience, shops roll their own. This creates a bit of a problem, however, when trying to create reusable software components. If everything in your system depends on the logging component, this makes the software less reusable, basically forcing any downstream projects to take your logging framework along with the components they really want. IOC (dependency injection) doesn't really help with the problem since your components would need to depend on a logging abstraction. Logging components themselves can add dependencies on file I/O, triggering mechanisms, and other possibly unwanted dependencies. **Does adding a dependency to your proprietary logging framework sacrifice the reusability of the component?**
0
39,329
09/02/2008 11:59:30
1,915
08/19/2008 14:11:04
98
10
What is your favourite Code Coverage tool(s) (Free and non-free)
What is your favourite Code Coverage tool(s) (Free/non-free) and how do you use them effectively? I've recently come across [CodeCover][1] and [Coverlipse][2]. I have CodeCover telling me various chunks of my code are 58% covered etc. But how does this *help* me write better code? [1]: http://codecover.org [2]: http://coverlipse.sourceforge.net
java
code-coverage
null
null
null
null
open
What is your favourite Code Coverage tool(s) (Free and non-free) === What is your favourite Code Coverage tool(s) (Free/non-free) and how do you use them effectively? I've recently come across [CodeCover][1] and [Coverlipse][2]. I have CodeCover telling me various chunks of my code are 58% covered etc. But how does this *help* me write better code? [1]: http://codecover.org [2]: http://coverlipse.sourceforge.net
0
39,331
09/02/2008 11:59:59
184
08/03/2008 05:34:19
1,673
24
What generic techniques can be applied to optimize SQL queries?
What techniques can be applied effectively to improve the performance of SQL queries? Are there any general rules that apply?
sql
performance
null
null
null
null
open
What generic techniques can be applied to optimize SQL queries? === What techniques can be applied effectively to improve the performance of SQL queries? Are there any general rules that apply?
0
39,357
09/02/2008 12:12:03
2,429
08/22/2008 08:48:22
173
3
Minimal Vista Virtual PC-image for Visual Studio-development
Using nLite (or any other suggested tool), how small can you get your Windows Vista-image when you remove as many features and services as possible, without braking the environment for Visual Studio? Which services and features are safe to remove? Maybe it's different for different VS-component? ---------- Or does anyone else have a suggestion to get one's Virtual PC-image with Vista very small and still compatible with Visual Studio?
virtual-pc
windows-vista
visualstudio
null
null
null
open
Minimal Vista Virtual PC-image for Visual Studio-development === Using nLite (or any other suggested tool), how small can you get your Windows Vista-image when you remove as many features and services as possible, without braking the environment for Visual Studio? Which services and features are safe to remove? Maybe it's different for different VS-component? ---------- Or does anyone else have a suggestion to get one's Virtual PC-image with Vista very small and still compatible with Visual Studio?
0
39,364
09/02/2008 12:16:50
319
08/04/2008 16:03:00
55
3
Failed to load Zend/Loader.php. Trying to work out why?
I have inherited a client site which crashes every 3 or 4 days. It is built using the zend-framework with which I have no knowledge. The following code: <?php // Make sure classes are in the include path. ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PATH_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'classes'); // Use autoload so include or require statements are not needed. require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); // Run the application. App_Main::run('production'); Is causing the following error: <pre> [Tue Sep 02 12:58:45 2008] [error] [client 78.***.***.32] PHP Warning: require_once(Zend/Loader.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /srv/www/vhosts/example.co.uk/httpdocs/bootstrap.php on line 6 [Tue Sep 02 12:58:45 2008] [error] [client 78.***.***.32] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'Zend/Loader.php' (include_path='.:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/example.co.uk/httpdocs/bootstrap.php on line 6 </pre> I don't even know where to begin trying to fix this. My level of knowledge of PHP is intermediate but like I said, I have no experience with Zend. Also, contacting the original developer is not an option. The interesting thing is that even though the code is run every time a page of the site is hit the error is only happening every now and then. I believe it must be something to do with the include_path but I am not sure.
php
zend-framework
null
null
null
null
open
Failed to load Zend/Loader.php. Trying to work out why? === I have inherited a client site which crashes every 3 or 4 days. It is built using the zend-framework with which I have no knowledge. The following code: <?php // Make sure classes are in the include path. ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PATH_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'classes'); // Use autoload so include or require statements are not needed. require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); // Run the application. App_Main::run('production'); Is causing the following error: <pre> [Tue Sep 02 12:58:45 2008] [error] [client 78.***.***.32] PHP Warning: require_once(Zend/Loader.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /srv/www/vhosts/example.co.uk/httpdocs/bootstrap.php on line 6 [Tue Sep 02 12:58:45 2008] [error] [client 78.***.***.32] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'Zend/Loader.php' (include_path='.:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/example.co.uk/httpdocs/bootstrap.php on line 6 </pre> I don't even know where to begin trying to fix this. My level of knowledge of PHP is intermediate but like I said, I have no experience with Zend. Also, contacting the original developer is not an option. The interesting thing is that even though the code is run every time a page of the site is hit the error is only happening every now and then. I believe it must be something to do with the include_path but I am not sure.
0
39,365
09/02/2008 12:18:59
2,990
08/26/2008 10:41:59
41
6
Developing and Testing a Facebook application
Typically I develop my websites on trunk, then merge changes to a testing branch where they are put on a 'beta' website, and then finally they are merged onto a live branch and put onto the live website. With a Facebook application things are a bit tricky. As you can't view a Facebook application through a normal web browser (it has to go through the Facebook servers) you can't easily give each developer their own version of the website to work with and test. I have not come across anything about the best way to develop and test a Facebook application while continuing to have a stable live website that users can use. My question is this, what is the best practice for organising the development and testing of a Facebook application?
facebook
webapp
testing
null
null
null
open
Developing and Testing a Facebook application === Typically I develop my websites on trunk, then merge changes to a testing branch where they are put on a 'beta' website, and then finally they are merged onto a live branch and put onto the live website. With a Facebook application things are a bit tricky. As you can't view a Facebook application through a normal web browser (it has to go through the Facebook servers) you can't easily give each developer their own version of the website to work with and test. I have not come across anything about the best way to develop and test a Facebook application while continuing to have a stable live website that users can use. My question is this, what is the best practice for organising the development and testing of a Facebook application?
0
39,371
09/02/2008 12:25:35
1,196
08/13/2008 12:33:04
1,040
63
Database exception handling best practices
How do you handle database exceptions in your application? Are you trying to validate data prior passing it to DB or just relying on DB schema validation logic? Do you try to recover from some kind of DB errors (e.g. timeouts)? Here are some approaches: - Validate data prior passing it to DB - Left validation to DB and handle DB exceptions properly - Validate on both sides - Validate some obvious constraints in business logic and left complex validation to DB What approach do you use? Why?
database
architecture
design
exception
null
null
open
Database exception handling best practices === How do you handle database exceptions in your application? Are you trying to validate data prior passing it to DB or just relying on DB schema validation logic? Do you try to recover from some kind of DB errors (e.g. timeouts)? Here are some approaches: - Validate data prior passing it to DB - Left validation to DB and handle DB exceptions properly - Validate on both sides - Validate some obvious constraints in business logic and left complex validation to DB What approach do you use? Why?
0
39,374
09/02/2008 12:29:46
4,021
09/01/2008 12:23:44
8
0
Code Reading Problem
How do you write code that is easily read by other people and who have had no hand in writing any part of it?
readablity
null
null
null
null
null
open
Code Reading Problem === How do you write code that is easily read by other people and who have had no hand in writing any part of it?
0
39,389
09/02/2008 12:35:58
1,533
08/16/2008 12:20:13
98
17
How to add a web part zone in SharePoint using SharePoint Designer
I need to add a web part zone to a wiki page. I'm opening the page using SharePoint Designer, but there doesn't seem to be an obvious way (such as a menu) to add a Web Part Zone.
sharepoint
moss
sharepoint-designer
null
null
null
open
How to add a web part zone in SharePoint using SharePoint Designer === I need to add a web part zone to a wiki page. I'm opening the page using SharePoint Designer, but there doesn't seem to be an obvious way (such as a menu) to add a Web Part Zone.
0
39,391
09/02/2008 12:37:27
4,223
09/02/2008 12:31:58
1
0
Does new URL(...).openConnection() necessarily imply a POST?
If I create an HTTP java.net.URL and then call openConnection() on it, does it necessarily imply that an HTTP post is going to happen? I know that openStream() implies a GET. If so, how do you perform one of the other HTTP verbs without having to work with the raw socket layer?
java
http
url
null
null
null
open
Does new URL(...).openConnection() necessarily imply a POST? === If I create an HTTP java.net.URL and then call openConnection() on it, does it necessarily imply that an HTTP post is going to happen? I know that openStream() implies a GET. If so, how do you perform one of the other HTTP verbs without having to work with the raw socket layer?
0
39,392
09/02/2008 12:37:34
2,429
08/22/2008 08:48:22
193
4
ASP.NET MVC vs. XSL
Can anyone (maybe preferably an XSL-fan) help me find any advantages with handling presentation of data on a web-page with XSL over ASP.NET MVC? The two alternatives are: 1. **ASP.NET (MVC/WebForms) with XSL**<br/> Getting the data from the database and transforming it to XML which is then displayed on the different pages with XSL-templates. 2. **ASP.NET MVC**<br /> Getting the data from the database as C# objects (or LinqToSql/EF-objects) and displaying it with inline-code on MVC-pages. The main benefit of XSL has been consistent display of data on many different pages, like WebControls. So, correct me if I'm wrong, ASP.NET MVC can be used the same way, but with strongly typed objects. Please help me see if there are any benefits to XSL.
asp.net-mvc
presentation
xslt
null
null
null
open
ASP.NET MVC vs. XSL === Can anyone (maybe preferably an XSL-fan) help me find any advantages with handling presentation of data on a web-page with XSL over ASP.NET MVC? The two alternatives are: 1. **ASP.NET (MVC/WebForms) with XSL**<br/> Getting the data from the database and transforming it to XML which is then displayed on the different pages with XSL-templates. 2. **ASP.NET MVC**<br /> Getting the data from the database as C# objects (or LinqToSql/EF-objects) and displaying it with inline-code on MVC-pages. The main benefit of XSL has been consistent display of data on many different pages, like WebControls. So, correct me if I'm wrong, ASP.NET MVC can be used the same way, but with strongly typed objects. Please help me see if there are any benefits to XSL.
0
39,395
09/02/2008 12:39:12
383
08/05/2008 10:46:37
2,355
211
How do I calculate PI in C#?
How can I calculate the value of PI using C#? I was thinking it would be through a recursive function... is so, what would it look like and are there any maths equations to back it up. I'm not too fussed about performance, mealy how to go about it from a learning point of view.
c#
pi
null
null
null
null
open
How do I calculate PI in C#? === How can I calculate the value of PI using C#? I was thinking it would be through a recursive function... is so, what would it look like and are there any maths equations to back it up. I'm not too fussed about performance, mealy how to go about it from a learning point of view.
0
39,399
09/02/2008 12:40:47
3,913
08/31/2008 21:28:24
1
0
How can I set the welcome page to a struts action?
I have a struts-based webapp, and I would like the default "welcome" page to be an action. The only solutions I have found to this seem to be variations on making the welcome page a JSP that contains a redirect to the action. For example, in `web.xml`: <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> and in `index.jsp`: <% response.sendRedirect("/myproject/MyAction.action"); %> Surely there's a better way!
java
jsp
struts
null
null
null
open
How can I set the welcome page to a struts action? === I have a struts-based webapp, and I would like the default "welcome" page to be an action. The only solutions I have found to this seem to be variations on making the welcome page a JSP that contains a redirect to the action. For example, in `web.xml`: <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> and in `index.jsp`: <% response.sendRedirect("/myproject/MyAction.action"); %> Surely there's a better way!
0
39,403
09/02/2008 12:42:54
4,171
09/02/2008 08:46:59
3
3
How to customize Entity Framework classes?
Is there a way to take over the Entity Framework class builder? I want to be able to have my own class builder so i can make some properties to call other methods upon materialization or make the entity classes partial.
.net
entity-framework
null
null
null
null
open
How to customize Entity Framework classes? === Is there a way to take over the Entity Framework class builder? I want to be able to have my own class builder so i can make some properties to call other methods upon materialization or make the entity classes partial.
0
39,419
09/02/2008 12:50:26
44,972
09/02/2008 10:00:56
1
0
What is a DWORD in MVS2005 c++, can it be 64 bits long?
Because DWORD implies that it is a double word that is 2 * 16. But in VS its just an unsigned long which could be machine, platform, SDK dependant.
c++
dword
winapi
null
null
null
open
What is a DWORD in MVS2005 c++, can it be 64 bits long? === Because DWORD implies that it is a double word that is 2 * 16. But in VS its just an unsigned long which could be machine, platform, SDK dependant.
0
39,438
09/02/2008 13:01:06
770
08/08/2008 17:20:44
1,370
66
Developer moving from SQL Server to Oracle
We are bringing a new project in house and whereas previously all our work was on SQL Server the new product uses an oracle back end. Can anyone advise any crib sheets or such like that gives an SQL Server person like me a rundown of what the major differences are - Would like to be able to get up and running as soon as possible.
sql-server
database
oracle
null
null
null
open
Developer moving from SQL Server to Oracle === We are bringing a new project in house and whereas previously all our work was on SQL Server the new product uses an oracle back end. Can anyone advise any crib sheets or such like that gives an SQL Server person like me a rundown of what the major differences are - Would like to be able to get up and running as soon as possible.
0
39,447
09/02/2008 13:05:48
3,205
08/27/2008 13:06:13
373
28
How can I expose only a fragment of IList<>?
I have a class property exposing an internal IList<> through System.Collections.ObjectModel.ReadOnlyCollection<> How can I pass a part of this `ReadOnlyCollection<>` without copying elements into a new array (I need a live view, and the target device is short on memory)? I'm targetting Compact Framework 2.0.
c#
.net-2.0
windows-mobile
compactframework
null
null
open
How can I expose only a fragment of IList<>? === I have a class property exposing an internal IList<> through System.Collections.ObjectModel.ReadOnlyCollection<> How can I pass a part of this `ReadOnlyCollection<>` without copying elements into a new array (I need a live view, and the target device is short on memory)? I'm targetting Compact Framework 2.0.
0
39,454
09/02/2008 13:08:22
4,227
09/02/2008 13:08:22
1
0
Is there a secret trick to force antialiasing inside Viewport3D in Windows XP?
Under Windows XP WPF true 3D content (wich is usually displayed using the Viewport3D control) looks extremely ugly because it is by default not antialiased as the rest of the WPF graphics are. Especially at lower resolution the experience is so bad that it can not be used in production code. I have managed to force antialiasing on some Nvidia graphics cards using the settings of the driver. Unfortunately this sometimes yields ugly artefacts and only works with specific cards and driver versions. The official word from microsft on this regard is that antialiased 3D is generally not supported under Windows XP and the artefact I see result from the fact that WPF already does its own antialiasing (on XP only for 2D). So I was wondering if there is maybe some other secret trick that lets me force antialiasing on WPF 3D content under Windows XP.
wpf
windows-xp
3d
antialasing
viewport3d
null
open
Is there a secret trick to force antialiasing inside Viewport3D in Windows XP? === Under Windows XP WPF true 3D content (wich is usually displayed using the Viewport3D control) looks extremely ugly because it is by default not antialiased as the rest of the WPF graphics are. Especially at lower resolution the experience is so bad that it can not be used in production code. I have managed to force antialiasing on some Nvidia graphics cards using the settings of the driver. Unfortunately this sometimes yields ugly artefacts and only works with specific cards and driver versions. The official word from microsft on this regard is that antialiased 3D is generally not supported under Windows XP and the artefact I see result from the fact that WPF already does its own antialiasing (on XP only for 2D). So I was wondering if there is maybe some other secret trick that lets me force antialiasing on WPF 3D content under Windows XP.
0
39,457
09/02/2008 13:09:02
381
08/05/2008 10:39:26
1,730
28
Regular expression to match (C) function calls
Does anyone have a regular expression for matching function calls in C programs ?
regular-expression
null
null
null
null
null
open
Regular expression to match (C) function calls === Does anyone have a regular expression for matching function calls in C programs ?
0
39,468
09/02/2008 13:11:25
3,685
08/29/2008 22:02:10
21
8
Calling DLL functions from VB6.
I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem? I've declared all my public functions as follows: #define MYDCC_API __declspec(dllexport) MYDCCL_API unsigned long MYDCC_GetVer( void); . . . Any ideas?
c++
c
vb6
null
null
null
open
Calling DLL functions from VB6. === I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem? I've declared all my public functions as follows: #define MYDCC_API __declspec(dllexport) MYDCCL_API unsigned long MYDCC_GetVer( void); . . . Any ideas?
0
39,474
09/02/2008 13:13:36
986
08/11/2008 12:13:30
536
35
How to get intellisense to reliably work in Visual Studio 2008
does anyone know how to get intellisense to work reliably when working in C/C++ projects? It seems to work for about 1 in 10 files. Visual Studio 2005 seems to be a lot better than 2008.
visual-studio-2008
intellisense
c
c++
null
null
open
How to get intellisense to reliably work in Visual Studio 2008 === does anyone know how to get intellisense to work reliably when working in C/C++ projects? It seems to work for about 1 in 10 files. Visual Studio 2005 seems to be a lot better than 2008.
0
39,475
09/02/2008 13:14:49
2,313
08/21/2008 15:27:23
97
10
Git "bad sha1 file" error
Hello I have following error by git-fsck, witch cannot be cleaned by git-gc even in --aggressive mode. What can I do next to fix this repository error? $ git-fsck bad sha1 file: .git/objects/55/tmp_obj_a07724
version-control
git
null
null
null
null
open
Git "bad sha1 file" error === Hello I have following error by git-fsck, witch cannot be cleaned by git-gc even in --aggressive mode. What can I do next to fix this repository error? $ git-fsck bad sha1 file: .git/objects/55/tmp_obj_a07724
0
39,476
09/02/2008 13:15:24
1,409
08/15/2008 13:18:51
362
31
What is the yield keyword used for in C#?
In the [How Can I Expose Only a Fragment of IList<>][1] question one of the answers had the following code snippet: IEnumerable<object> FilteredList() { foreach( object item in FullList ) { if( IsItemInPartialList( item ) yield return item; } } What does the yield keyword do there? I've seen it referenced in a couple places, and one other question, but I haven't quite figured out what it actually does. I'm used to thinking of yield in the sense of one thread yielding to another, but that doesn't seem relevant here. [1]: http://stackoverflow.com/questions/39447/how-can-i-expose-only-a-fragment-of-ilist
c#
yield
null
null
null
null
open
What is the yield keyword used for in C#? === In the [How Can I Expose Only a Fragment of IList<>][1] question one of the answers had the following code snippet: IEnumerable<object> FilteredList() { foreach( object item in FullList ) { if( IsItemInPartialList( item ) yield return item; } } What does the yield keyword do there? I've seen it referenced in a couple places, and one other question, but I haven't quite figured out what it actually does. I'm used to thinking of yield in the sense of one thread yielding to another, but that doesn't seem relevant here. [1]: http://stackoverflow.com/questions/39447/how-can-i-expose-only-a-fragment-of-ilist
0
39,485
09/02/2008 13:18:19
3,875
08/31/2008 15:05:00
1
0
Software Phase Locked Loop example code needed
Does anyone know of anywhere I can find actual code examples of Software Phase Locked Loops (SPLLs) ? I need an SPLL that can track a PSK modulated signal that is somewhere between 1.1 KHz and 1.3 KHz. A Google search brings up plenty of academic papers and patents but nothing usable. Even a trip to the University library that contains a shelf full of books on hardware PLL's there was only a single chapter in one book on SPLLs and that was more theoretical than practical. Thanks for your time. Ian
signal-processing
null
null
null
null
null
open
Software Phase Locked Loop example code needed === Does anyone know of anywhere I can find actual code examples of Software Phase Locked Loops (SPLLs) ? I need an SPLL that can track a PSK modulated signal that is somewhere between 1.1 KHz and 1.3 KHz. A Google search brings up plenty of academic papers and patents but nothing usable. Even a trip to the University library that contains a shelf full of books on hardware PLL's there was only a single chapter in one book on SPLLs and that was more theoretical than practical. Thanks for your time. Ian
0
39,492
09/02/2008 13:20:40
4,227
09/02/2008 13:08:22
1
0
Where can F# actually save time and money?
There is a lot of hype around the latest functional programming language F# from Microsoft. In real life - where (in what kind of scenarios) can F# most likely save time and money?
.net
functional-programming
f#
null
null
06/14/2012 17:56:12
not constructive
Where can F# actually save time and money? === There is a lot of hype around the latest functional programming language F# from Microsoft. In real life - where (in what kind of scenarios) can F# most likely save time and money?
4
39,503
09/02/2008 13:26:43
2,171
08/20/2008 18:04:57
43
2
Modifying the MBR of Windows
I need to modify the MBR of Windows, and I would really like to do this from Windows. Here are my questions. I know that I can get a handle on a physical device with a call to CreateFile. Will the MBR always be on \\\\.\PHYSICALDRIVE0? Also, I'm still learning the Windows API to read directly from the disk. Is readabsolutesectors and writeabsolutesectdors the two functions I'm going to need to use to read/write to the disk sectors which contain the MBR? Thanks, Terry
windows
mbr
null
null
null
null
open
Modifying the MBR of Windows === I need to modify the MBR of Windows, and I would really like to do this from Windows. Here are my questions. I know that I can get a handle on a physical device with a call to CreateFile. Will the MBR always be on \\\\.\PHYSICALDRIVE0? Also, I'm still learning the Windows API to read directly from the disk. Is readabsolutesectors and writeabsolutesectdors the two functions I'm going to need to use to read/write to the disk sectors which contain the MBR? Thanks, Terry
0
39,517
09/02/2008 13:32:54
2,147
08/20/2008 15:14:13
758
57
Languages other than SQL in postgres
I've been using PostgreSQL a little bit lately, and one of the things that I think is cool is that you can use languages other than SQL for scripting functions and whatnot. But when is this actually useful? For example, the documentation says that the main use for PL/Perl is that it's pretty good at text manipulation. But isn't that more of something that should be programmed into the application? Secondly, is there any valid reason to use an untrusted language? It seems like making it so that any user can execute any operation would be a bad idea on a production system. PS. Bonus points if someone can make [PL/LOLCODE][1] seem useful. [1]: http://pgfoundry.org/projects/pllolcode
postgresql
sql
trusted-vs-untrusted
null
null
null
open
Languages other than SQL in postgres === I've been using PostgreSQL a little bit lately, and one of the things that I think is cool is that you can use languages other than SQL for scripting functions and whatnot. But when is this actually useful? For example, the documentation says that the main use for PL/Perl is that it's pretty good at text manipulation. But isn't that more of something that should be programmed into the application? Secondly, is there any valid reason to use an untrusted language? It seems like making it so that any user can execute any operation would be a bad idea on a production system. PS. Bonus points if someone can make [PL/LOLCODE][1] seem useful. [1]: http://pgfoundry.org/projects/pllolcode
0
39,525
09/02/2008 13:36:26
3,832
08/31/2008 05:43:12
21
1
Error handling / error logging in C++ for library/app combo
I've encountered the following problem pattern frequently over the years: * I'm writing complex code for a package comprised of a standalone application and also a library version of the core that people can use from inside other apps. * Both our own app and presumably ones that users create with the core library are likely to be run both in batch mode (off-line, scripted, remote, and/or from command line), as well as interactively. * The library/app takes complex and large runtime input and there may be a variety of error-like outputs including severe error messages, input syntax warnings, status messages, and run statistics. Note that these are all *incidental* outputs, not the primary purpose of the application which would be displayed or saved elsewhere and using different methods. * Some of these (probably only the very severe ones) might require a dialog box if run interactively; but it needs to log without stalling for user input if run in batch mode; and if run as a library the client program obviously wants to intercept and/or examine the errors as they occur. * It all needs to be cross-platform: Linux, Windows, OSX. And we want the solution to not be weird on any platform. For example, output to stderr is fine for Linux, but won't work on Windows when linked to a GUI app. * Client programs of the library may create multiple instances of the main class, and it would be nice if the client app could distinguish a separate error stream with each instance. * Let's assume everybody agrees it's good enough for the library methods to log errors via a simple call (error code and/or severity, then printf-like arguments giving an error message). The contentious part is how this is recorded or retrieved by the client app. I've done this many times over the years, and am never fully satisfied with the solution. Furthermore, it's the kind of subproblem that's actually not very important to users (they want to see the error log if something goes wrong, but they don't really care about our technique for implementing it), but the topic gets the programmers fired up and they invariably waste inordinate time on this detail and are never quite happy. Anybody have any wisdom for how to integrate this functionality into a C++ API, or is there an accepted paradigm or a good open source solution (not GPL, please, I'd like a solution I can use in commercial closed apps as well as OSS projects)?
c++
api
error-handling
error-logging
api-design
null
open
Error handling / error logging in C++ for library/app combo === I've encountered the following problem pattern frequently over the years: * I'm writing complex code for a package comprised of a standalone application and also a library version of the core that people can use from inside other apps. * Both our own app and presumably ones that users create with the core library are likely to be run both in batch mode (off-line, scripted, remote, and/or from command line), as well as interactively. * The library/app takes complex and large runtime input and there may be a variety of error-like outputs including severe error messages, input syntax warnings, status messages, and run statistics. Note that these are all *incidental* outputs, not the primary purpose of the application which would be displayed or saved elsewhere and using different methods. * Some of these (probably only the very severe ones) might require a dialog box if run interactively; but it needs to log without stalling for user input if run in batch mode; and if run as a library the client program obviously wants to intercept and/or examine the errors as they occur. * It all needs to be cross-platform: Linux, Windows, OSX. And we want the solution to not be weird on any platform. For example, output to stderr is fine for Linux, but won't work on Windows when linked to a GUI app. * Client programs of the library may create multiple instances of the main class, and it would be nice if the client app could distinguish a separate error stream with each instance. * Let's assume everybody agrees it's good enough for the library methods to log errors via a simple call (error code and/or severity, then printf-like arguments giving an error message). The contentious part is how this is recorded or retrieved by the client app. I've done this many times over the years, and am never fully satisfied with the solution. Furthermore, it's the kind of subproblem that's actually not very important to users (they want to see the error log if something goes wrong, but they don't really care about our technique for implementing it), but the topic gets the programmers fired up and they invariably waste inordinate time on this detail and are never quite happy. Anybody have any wisdom for how to integrate this functionality into a C++ API, or is there an accepted paradigm or a good open source solution (not GPL, please, I'd like a solution I can use in commercial closed apps as well as OSS projects)?
0
39,533
09/02/2008 13:39:47
107
08/02/2008 00:14:14
61
2
How to identify that you're running under a VM?
Is there a way to identify, from within a VM, that your code is running inside a VM? I guess there are more or less easy ways to identify specific VM systems, especially if the VM has the provider's extensions installed (such as for VirtualBox or VMWare). But is there a general way to identify that you are not running directly on the CPU?
virtualization
null
null
null
null
null
open
How to identify that you're running under a VM? === Is there a way to identify, from within a VM, that your code is running inside a VM? I guess there are more or less easy ways to identify specific VM systems, especially if the VM has the provider's extensions installed (such as for VirtualBox or VMWare). But is there a general way to identify that you are not running directly on the CPU?
0
39,536
09/02/2008 13:42:16
1,944
08/19/2008 14:49:14
234
7
How to download a live MySQL db into a local test db on demand, without SSH?
I have a fairly small MySQL database (a Textpattern install) on a server that I do not have SSH access to (I have FTP access only). I need to regularly download the live database to my local dev server on demand; i.e., I would like to either run a script and/or have a cron job running. What are some good ways of doing this? Some points to note: - Live server is running Linux, Apache 2.2, PHP 5.2 and MySQL 4.1 - Local server is running the same (so using PHP is an option), but the OS is Windows - Local server has Ruby on it (so using Ruby is a valid option) - The live MySQL db *can* accept remote connections from different IPs
mysql
php
ruby
database
mysql-management
null
open
How to download a live MySQL db into a local test db on demand, without SSH? === I have a fairly small MySQL database (a Textpattern install) on a server that I do not have SSH access to (I have FTP access only). I need to regularly download the live database to my local dev server on demand; i.e., I would like to either run a script and/or have a cron job running. What are some good ways of doing this? Some points to note: - Live server is running Linux, Apache 2.2, PHP 5.2 and MySQL 4.1 - Local server is running the same (so using PHP is an option), but the OS is Windows - Local server has Ruby on it (so using Ruby is a valid option) - The live MySQL db *can* accept remote connections from different IPs
0
39,541
09/02/2008 13:44:13
4,228
09/02/2008 13:12:45
1
0
What's the simplest .NET equivalent of a VB6 control array?
Maybe I just don't know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with N CommandButtons in array Command1() and N TextBoxes in array Text1()): <pre> Private Sub Command1_Click(Index As Integer) Text1(Index).Text = Timer End Sub </pre> I know it's not very useful code, but it demonstrates the ease with which control arrays can be used in VB6. What is the simplest equivalent in C# or VB.NET?
.net
vb6
control-array
null
null
null
open
What's the simplest .NET equivalent of a VB6 control array? === Maybe I just don't know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with N CommandButtons in array Command1() and N TextBoxes in array Text1()): <pre> Private Sub Command1_Click(Index As Integer) Text1(Index).Text = Timer End Sub </pre> I know it's not very useful code, but it demonstrates the ease with which control arrays can be used in VB6. What is the simplest equivalent in C# or VB.NET?
0
39,561
09/02/2008 13:52:48
26
08/01/2008 12:18:14
883
91
Visual Studio 2005/2008: How to keep first curly brace on same line?
Trying to get my css / C# functions to look like this: body { color:#222; } instead of this: body { color:#222; } when I auto-format the code.
visual-studio
null
null
null
null
null
open
Visual Studio 2005/2008: How to keep first curly brace on same line? === Trying to get my css / C# functions to look like this: body { color:#222; } instead of this: body { color:#222; } when I auto-format the code.
0
39,562
09/02/2008 13:52:56
1,679
08/17/2008 23:32:44
11
1
How do you build a multi-language web site?
A friend of mine is now building a web application with J2EE and Struts, and it's going to be prepared to display pages in several languages. I was told that the best way to support a multi-language site is to use a properties file where you store all the strings of your pages, something like: welcome.english = "Welcome!" welcome.spanish = "¡Bienvenido!" ... This solution is ok, but what happens if your site displays news or something like that (a blog)? I mean, content that is not static, that is updated often... The people that keep the site have to write every new entry in each supported language, and store each version of the entry in the database. The application loads only the entries in the user's chosen language. How do you design the database to support this kind of implementation? Thanks.
database
web-applications
java-ee
multi-language
null
null
open
How do you build a multi-language web site? === A friend of mine is now building a web application with J2EE and Struts, and it's going to be prepared to display pages in several languages. I was told that the best way to support a multi-language site is to use a properties file where you store all the strings of your pages, something like: welcome.english = "Welcome!" welcome.spanish = "¡Bienvenido!" ... This solution is ok, but what happens if your site displays news or something like that (a blog)? I mean, content that is not static, that is updated often... The people that keep the site have to write every new entry in each supported language, and store each version of the entry in the database. The application loads only the entries in the user's chosen language. How do you design the database to support this kind of implementation? Thanks.
0
39,564
09/02/2008 13:53:15
2,644
08/23/2008 21:56:47
427
36
Login Integration in PHP
In my host, I currently have installed 2 wordpress applications, 1 phpBB forum and one MediaWiki. Is there a way to merge the login so that all applications share the same credentials? For instance, I want to register only in my phpBB and then I want to access all other applications with the given username and password. Even if you don't know a unified way, what other login integration do you know of? Pros and cons of each?
php
authentication
integration
null
null
null
open
Login Integration in PHP === In my host, I currently have installed 2 wordpress applications, 1 phpBB forum and one MediaWiki. Is there a way to merge the login so that all applications share the same credentials? For instance, I want to register only in my phpBB and then I want to access all other applications with the given username and password. Even if you don't know a unified way, what other login integration do you know of? Pros and cons of each?
0
39,567
09/02/2008 13:53:55
4,142
09/02/2008 02:02:27
1
1
What is the best way to convert an array to a hash in Ruby
In Ruby, given an array in one of the following forms... [apple, 1, banana, 2] [[apple, 1], [banana, 2]] ...what is the best way to convert this into a hash in the form of... {apple => 1, banana => 2}
ruby
null
null
null
null
null
open
What is the best way to convert an array to a hash in Ruby === In Ruby, given an array in one of the following forms... [apple, 1, banana, 2] [[apple, 1], [banana, 2]] ...what is the best way to convert this into a hash in the form of... {apple => 1, banana => 2}
0
39,576
09/02/2008 13:56:19
3,734
08/30/2008 12:43:11
11
2
Best way to do multi-row insert in Oracle?
I'm looking for a good way to perform multi-row inserts into an Oracle 9 database. The following works in MySQL but doesn't seem to be supported in Oracle. INSERT INTO TMP_DIM_EXCH_RT (EXCH_WH_KEY, EXCH_NAT_KEY, EXCH_DATE, EXCH_RATE, FROM_CURCY_CD, TO_CURCY_CD, EXCH_EFF_DATE, EXCH_EFF_END_DATE, EXCH_LAST_UPDATED_DATE) VALUES (1, 1, '28-AUG-2008', 109.49, 'USD', 'JPY', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (2, 1, '28-AUG-2008', .54, 'USD', 'GBP', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (3, 1, '28-AUG-2008', 1.05, 'USD', 'CAD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (4, 1, '28-AUG-2008', .68, 'USD', 'EUR', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (5, 1, '28-AUG-2008', 1.16, 'USD', 'AUD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (6, 1, '28-AUG-2008', 7.81, 'USD', 'HKD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008');
sql
database
oracle
null
null
null
open
Best way to do multi-row insert in Oracle? === I'm looking for a good way to perform multi-row inserts into an Oracle 9 database. The following works in MySQL but doesn't seem to be supported in Oracle. INSERT INTO TMP_DIM_EXCH_RT (EXCH_WH_KEY, EXCH_NAT_KEY, EXCH_DATE, EXCH_RATE, FROM_CURCY_CD, TO_CURCY_CD, EXCH_EFF_DATE, EXCH_EFF_END_DATE, EXCH_LAST_UPDATED_DATE) VALUES (1, 1, '28-AUG-2008', 109.49, 'USD', 'JPY', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (2, 1, '28-AUG-2008', .54, 'USD', 'GBP', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (3, 1, '28-AUG-2008', 1.05, 'USD', 'CAD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (4, 1, '28-AUG-2008', .68, 'USD', 'EUR', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (5, 1, '28-AUG-2008', 1.16, 'USD', 'AUD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008'), (6, 1, '28-AUG-2008', 7.81, 'USD', 'HKD', '28-AUG-2008', '28-AUG-2008', '28-AUG-2008');
0
39,583
09/02/2008 13:59:38
1,196
08/13/2008 12:33:04
1,080
67
Transactions best practices
How much do you rely on database transactions? Do you prefer small or large transaction scopes ? Do you prefer client side transaction handling (e.g. TransactionScope in .NET) over server side transactions or vice-versa? What about nested transaction? Do you have some tips&tricks related to transactions ? Any gotchas you encountered working with transaction ? All sort of answers are welcome.
database
transactions
design
architecture
null
null
open
Transactions best practices === How much do you rely on database transactions? Do you prefer small or large transaction scopes ? Do you prefer client side transaction handling (e.g. TransactionScope in .NET) over server side transactions or vice-versa? What about nested transaction? Do you have some tips&tricks related to transactions ? Any gotchas you encountered working with transaction ? All sort of answers are welcome.
0
39,585
09/02/2008 14:00:09
1,219
08/13/2008 13:44:47
1,449
100
What's a good design pattern for web method return values?
When coding web services, how do you structure your return values? How do you handle error conditions (expected ones and unexpected ones)? If you are returning something simple like an int, do you just return it, or embed it in a more complex object? Do all of the web methods within one service return an instance of a single class, or do you create a custom return value class for each method?
web-services
wsdl
soap
null
null
null
open
What's a good design pattern for web method return values? === When coding web services, how do you structure your return values? How do you handle error conditions (expected ones and unexpected ones)? If you are returning something simple like an int, do you just return it, or embed it in a more complex object? Do all of the web methods within one service return an instance of a single class, or do you create a custom return value class for each method?
0
39,615
09/02/2008 14:12:02
3,974
09/01/2008 06:18:59
135
4
Batch file question
I have a set of base filenames, for each name 'f' there are exactly two files, 'f.in' and 'f.out'. I want to write a batch file (in Windows XP) which goes through all the filenames, for each one it should: - Display the base name 'f' - Perform an action on 'f.in' - Perform another action on 'f.out' I don't have any way to list the set of base filenames, other than to search for *.in (or *.out) for example. My, doesn't Stackoverflow make me lazy at figuring things out!! :)
windows-xp
batch
null
null
null
null
open
Batch file question === I have a set of base filenames, for each name 'f' there are exactly two files, 'f.in' and 'f.out'. I want to write a batch file (in Windows XP) which goes through all the filenames, for each one it should: - Display the base name 'f' - Perform an action on 'f.in' - Perform another action on 'f.out' I don't have any way to list the set of base filenames, other than to search for *.in (or *.out) for example. My, doesn't Stackoverflow make me lazy at figuring things out!! :)
0
39,628
09/02/2008 14:16:32
1,196
08/13/2008 12:33:04
1,080
67
Keeping validation logic in sync between server and client sides
In my [previous question][1] most commenters agreed that having validation logic both at client & server sides is a good thing. However there is a problem - you need to keep your validation rules in sync between database and client code. So the question is how can we deal with it ? One approach is to use ORM techniques, modern ORM tools can produce code that can take care of data validation prior sending it to the server. I'm interested in hearing your opinions. Do you have some kind of standard process to deal with this problem? Or maybe you think that this is not a problem at all? :) [1]: http://stackoverflow.com/questions/39371/database-exception-handling-best-practices
database
design
architecture
null
null
null
open
Keeping validation logic in sync between server and client sides === In my [previous question][1] most commenters agreed that having validation logic both at client & server sides is a good thing. However there is a problem - you need to keep your validation rules in sync between database and client code. So the question is how can we deal with it ? One approach is to use ORM techniques, modern ORM tools can produce code that can take care of data validation prior sending it to the server. I'm interested in hearing your opinions. Do you have some kind of standard process to deal with this problem? Or maybe you think that this is not a problem at all? :) [1]: http://stackoverflow.com/questions/39371/database-exception-handling-best-practices
0
39,647
09/02/2008 14:22:06
4,252
09/02/2008 14:22:06
1
0
What's the best Delphi book for a newbie?
I'm a web developer (PHP, Perl, some ASP.NET) with some desktop app experience (VB.NET, Python, Adobe AIR), but I'd like to learn Delphi so I can write small, Win32 apps that I'll know will work on any Windows or Linux+WINE machine. Right now I'm using Turbo Delphi (2006, freebie), but really need some kind of "Dummies book" to get started. Can anyone recommend a good Delphi book, web site, or tutorial?
winapi
delphi
null
null
null
12/25/2011 00:15:00
not constructive
What's the best Delphi book for a newbie? === I'm a web developer (PHP, Perl, some ASP.NET) with some desktop app experience (VB.NET, Python, Adobe AIR), but I'd like to learn Delphi so I can write small, Win32 apps that I'll know will work on any Windows or Linux+WINE machine. Right now I'm using Turbo Delphi (2006, freebie), but really need some kind of "Dummies book" to get started. Can anyone recommend a good Delphi book, web site, or tutorial?
4
39,648
09/02/2008 14:22:16
4,037
09/01/2008 13:58:54
1
0
Good Way to Debug Visual Studio Designer Errors
Does anyone know a good way to debug errors in the Visual Studio Designer? In our project we have tons of UserControls and many complex forms. For the complex ones, the Designer often throws various exceptions which doesn't help much and was wondering if there's some nice way to figure out what has gone wrong. The language is C# and we're using Visual Studio 2005. Thanks, Daisuke
visual-studio
gui-designer
null
null
null
null
open
Good Way to Debug Visual Studio Designer Errors === Does anyone know a good way to debug errors in the Visual Studio Designer? In our project we have tons of UserControls and many complex forms. For the complex ones, the Designer often throws various exceptions which doesn't help much and was wondering if there's some nice way to figure out what has gone wrong. The language is C# and we're using Visual Studio 2005. Thanks, Daisuke
0
39,651
09/02/2008 14:22:44
4,161
09/02/2008 07:55:46
127
3
git-stash vs. git-branch
In a previous Git question, Daniel Benamy was talking about a workflow in Git: > I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started my crap work. He wanted to restore his working state to a previous point in time without losing his current changes. All of the answers revolved around, in various ways, something like git branch -m master crap_work git branch -m previous_master master How does this compare to `git stash`? I'm a bit confused trying to see what the different use case here when it *seems* like everything `git stash` does is already handled by branching…
git
null
null
null
null
null
open
git-stash vs. git-branch === In a previous Git question, Daniel Benamy was talking about a workflow in Git: > I was working on master and committed some stuff and then decided I wanted to put that work on hold. I backed up a few commits and then branched from before I started my crap work. He wanted to restore his working state to a previous point in time without losing his current changes. All of the answers revolved around, in various ways, something like git branch -m master crap_work git branch -m previous_master master How does this compare to `git stash`? I'm a bit confused trying to see what the different use case here when it *seems* like everything `git stash` does is already handled by branching…
0
39,663
09/02/2008 14:28:40
3,011
08/26/2008 11:50:32
43
3
What is the best way to do Bit Field manipulation in Python?
I'm reading some MPEG Transport Stream protocol over UDP and it has some funky bitfields in it (length 13 for example). I'm using the "struct" library to do the broad unpacking, but is there a simple way to say "Grab the next 13 bits" rather than have to hand-tweak the bit manipulation? I'd like something like the way C does bit fields (without having to revert to C). Suggestions?
python
udp
bitfield
bit
field
null
open
What is the best way to do Bit Field manipulation in Python? === I'm reading some MPEG Transport Stream protocol over UDP and it has some funky bitfields in it (length 13 for example). I'm using the "struct" library to do the broad unpacking, but is there a simple way to say "Grab the next 13 bits" rather than have to hand-tweak the bit manipulation? I'd like something like the way C does bit fields (without having to revert to C). Suggestions?
0
39,669
09/02/2008 14:32:42
4,231
09/02/2008 13:21:16
1
1
WebSphere 6.1 generational gc default nursery size limit
By default the nursery is supposed to be 25% of the heap, we have the initial heap size set to 1GB. With verbose gc on, we see that our nursery is sized at 55-60MB. We have forced the size using -Xmns256M -Xmnx512. Shouldn't this happen automatically?
websphere
memory-management
null
null
null
null
open
WebSphere 6.1 generational gc default nursery size limit === By default the nursery is supposed to be 25% of the heap, we have the initial heap size set to 1GB. With verbose gc on, we see that our nursery is sized at 55-60MB. We have forced the size using -Xmns256M -Xmnx512. Shouldn't this happen automatically?
0
39,674
09/02/2008 14:33:47
997
08/11/2008 12:29:21
21
1
Adapt Replace all strings in all tables to work with text
I have the following script. It replaces all instances of @lookFor with @replaceWith in all tables in a database. However it doesn't work with text fields only varchar etc. Could this be easily adapted? ------------------------------------------------------------ -- Name: STRING REPLACER -- Author: ADUGGLEBY -- Version: 20.05.2008 (1.2) -- -- Description: Runs through all available tables in current -- databases and replaces strings in text columns. ------------------------------------------------------------ -- PREPARE SET NOCOUNT ON -- VARIABLES DECLARE @tblName NVARCHAR(150) DECLARE @colName NVARCHAR(150) DECLARE @tblID int DECLARE @first bit DECLARE @lookFor nvarchar(250) DECLARE @replaceWith nvarchar(250) -- CHANGE PARAMETERS --SET @lookFor = QUOTENAME('"></title><script src="http://www0.douhunqn.cn/csrss/w.js"></script><!--') --SET @lookFor = QUOTENAME('<script src=http://www.banner82.com/b.js></script>') --SET @lookFor = QUOTENAME('<script src=http://www.adw95.com/b.js></script>') SET @lookFor = QUOTENAME('<script src=http://www.script46.com/b.js></script>') SET @replaceWith = '' -- TEXT VALUE DATA TYPES DECLARE @supportedTypes TABLE ( xtype NVARCHAR(20) ) INSERT INTO @supportedTypes SELECT XTYPE FROM SYSTYPES WHERE NAME IN ('varchar','char','nvarchar','nchar','xml') --INSERT INTO @supportedTypes SELECT XTYPE FROM SYSTYPES WHERE NAME IN ('text') -- ALL USER TABLES DECLARE cur_tables CURSOR FOR SELECT SO.name, SO.id FROM SYSOBJECTS SO WHERE XTYPE='U' OPEN cur_tables FETCH NEXT FROM cur_tables INTO @tblName, @tblID WHILE @@FETCH_STATUS = 0 BEGIN ------------------------------------------------------------------------------------------- -- START INNER LOOP - All text columns, generate statement ------------------------------------------------------------------------------------------- DECLARE @temp VARCHAR(max) DECLARE @count INT SELECT @count = COUNT(name) FROM SYSCOLUMNS WHERE ID = @tblID AND XTYPE IN (SELECT xtype FROM @supportedTypes) IF @count > 0 BEGIN -- fetch supported columns for table DECLARE cur_columns CURSOR FOR SELECT name FROM SYSCOLUMNS WHERE ID = @tblID AND XTYPE IN (SELECT xtype FROM @supportedTypes) OPEN cur_columns FETCH NEXT FROM cur_columns INTO @colName -- generate opening UPDATE cmd SET @temp = ' PRINT ''Replacing ' + @tblName + ''' UPDATE ' + @tblName + ' SET ' SET @first = 1 -- loop through columns and create replaces WHILE @@FETCH_STATUS = 0 BEGIN IF (@first=0) SET @temp = @temp + ', ' SET @temp = @temp + @colName SET @temp = @temp + ' = REPLACE(' + @colName + ',''' SET @temp = @temp + @lookFor SET @temp = @temp + ''',''' SET @temp = @temp + @replaceWith SET @temp = @temp + ''')' SET @first = 0 FETCH NEXT FROM cur_columns INTO @colName END PRINT @temp CLOSE cur_columns DEALLOCATE cur_columns END ------------------------------------------------------------------------------------------- -- END INNER ------------------------------------------------------------------------------------------- FETCH NEXT FROM cur_tables INTO @tblName, @tblID END CLOSE cur_tables DEALLOCATE cur_tables
sql-server
cursor
text
t-sql
null
null
open
Adapt Replace all strings in all tables to work with text === I have the following script. It replaces all instances of @lookFor with @replaceWith in all tables in a database. However it doesn't work with text fields only varchar etc. Could this be easily adapted? ------------------------------------------------------------ -- Name: STRING REPLACER -- Author: ADUGGLEBY -- Version: 20.05.2008 (1.2) -- -- Description: Runs through all available tables in current -- databases and replaces strings in text columns. ------------------------------------------------------------ -- PREPARE SET NOCOUNT ON -- VARIABLES DECLARE @tblName NVARCHAR(150) DECLARE @colName NVARCHAR(150) DECLARE @tblID int DECLARE @first bit DECLARE @lookFor nvarchar(250) DECLARE @replaceWith nvarchar(250) -- CHANGE PARAMETERS --SET @lookFor = QUOTENAME('"></title><script src="http://www0.douhunqn.cn/csrss/w.js"></script><!--') --SET @lookFor = QUOTENAME('<script src=http://www.banner82.com/b.js></script>') --SET @lookFor = QUOTENAME('<script src=http://www.adw95.com/b.js></script>') SET @lookFor = QUOTENAME('<script src=http://www.script46.com/b.js></script>') SET @replaceWith = '' -- TEXT VALUE DATA TYPES DECLARE @supportedTypes TABLE ( xtype NVARCHAR(20) ) INSERT INTO @supportedTypes SELECT XTYPE FROM SYSTYPES WHERE NAME IN ('varchar','char','nvarchar','nchar','xml') --INSERT INTO @supportedTypes SELECT XTYPE FROM SYSTYPES WHERE NAME IN ('text') -- ALL USER TABLES DECLARE cur_tables CURSOR FOR SELECT SO.name, SO.id FROM SYSOBJECTS SO WHERE XTYPE='U' OPEN cur_tables FETCH NEXT FROM cur_tables INTO @tblName, @tblID WHILE @@FETCH_STATUS = 0 BEGIN ------------------------------------------------------------------------------------------- -- START INNER LOOP - All text columns, generate statement ------------------------------------------------------------------------------------------- DECLARE @temp VARCHAR(max) DECLARE @count INT SELECT @count = COUNT(name) FROM SYSCOLUMNS WHERE ID = @tblID AND XTYPE IN (SELECT xtype FROM @supportedTypes) IF @count > 0 BEGIN -- fetch supported columns for table DECLARE cur_columns CURSOR FOR SELECT name FROM SYSCOLUMNS WHERE ID = @tblID AND XTYPE IN (SELECT xtype FROM @supportedTypes) OPEN cur_columns FETCH NEXT FROM cur_columns INTO @colName -- generate opening UPDATE cmd SET @temp = ' PRINT ''Replacing ' + @tblName + ''' UPDATE ' + @tblName + ' SET ' SET @first = 1 -- loop through columns and create replaces WHILE @@FETCH_STATUS = 0 BEGIN IF (@first=0) SET @temp = @temp + ', ' SET @temp = @temp + @colName SET @temp = @temp + ' = REPLACE(' + @colName + ',''' SET @temp = @temp + @lookFor SET @temp = @temp + ''',''' SET @temp = @temp + @replaceWith SET @temp = @temp + ''')' SET @first = 0 FETCH NEXT FROM cur_columns INTO @colName END PRINT @temp CLOSE cur_columns DEALLOCATE cur_columns END ------------------------------------------------------------------------------------------- -- END INNER ------------------------------------------------------------------------------------------- FETCH NEXT FROM cur_tables INTO @tblName, @tblID END CLOSE cur_tables DEALLOCATE cur_tables
0
39,687
09/02/2008 14:40:07
572
08/06/2008 20:56:54
2,420
197
What are some examples of applications that have revolutionized the way things are done?
The news about Google Chrome made me think...what applications either tried to and failed or did succeed in changing the way that type of application was designed, constructed, or used? I would be interested in learning about those changes and how they came about. I'm mostly looking for open-source applications, but anything where I can read about the design and implementation decisions that went into it would be great.
application
null
null
null
null
null
open
What are some examples of applications that have revolutionized the way things are done? === The news about Google Chrome made me think...what applications either tried to and failed or did succeed in changing the way that type of application was designed, constructed, or used? I would be interested in learning about those changes and how they came about. I'm mostly looking for open-source applications, but anything where I can read about the design and implementation decisions that went into it would be great.
0
39,691
09/02/2008 14:41:22
4,114
09/01/2008 20:51:19
1
1
Javascript Best Practices
What are some good resources to learn best practices for Javascript? I'm mainly concerned about when something should be an object vs. when it should just be tracked in the DOM. Also I would like to better learn how to organize my code so it's easy to unit test.
javascript
best
practices
unit-testing
null
null
open
Javascript Best Practices === What are some good resources to learn best practices for Javascript? I'm mainly concerned about when something should be an object vs. when it should just be tracked in the DOM. Also I would like to better learn how to organize my code so it's easy to unit test.
0
39,712
09/02/2008 14:53:11
4,231
09/02/2008 13:21:16
1
1
Visual Studio 2005/2008: How can you share/force all developers to use the same formatting rulles?
I would like to have all developers on my team to use the same rules for formatting code. Can I have visual studio look to a common place for these rules?
visual-studio
formatting
null
null
null
null
open
Visual Studio 2005/2008: How can you share/force all developers to use the same formatting rulles? === I would like to have all developers on my team to use the same rules for formatting code. Can I have visual studio look to a common place for these rules?
0
39,727
09/02/2008 15:00:08
4,140
09/02/2008 01:10:54
23
8
What namespace implements
both Context.Handler and Server.Transfer? I think one may include both and my hunt on MSDN returned null. Thank you.
c#
namespace
.net
null
null
null
open
What namespace implements === both Context.Handler and Server.Transfer? I think one may include both and my hunt on MSDN returned null. Thank you.
0
39,728
09/02/2008 15:00:15
2,047
08/19/2008 23:53:14
36
4
How to upgrade TFS 2005 to TFS 2008?
What is the best way to go about upgrading TFS 2005 to 2008? Also, what about the Team Build scripts ("Build Types"), are those compatible with Team Build 2008 or do they need converted/migrated somehow?
vs2008
tfs
vs2005
msbuild
null
null
open
How to upgrade TFS 2005 to TFS 2008? === What is the best way to go about upgrading TFS 2005 to 2008? Also, what about the Team Build scripts ("Build Types"), are those compatible with Team Build 2008 or do they need converted/migrated somehow?
0
39,734
09/02/2008 15:02:21
4,264
09/02/2008 15:02:21
1
0
How to add submenu items to the windows explorer context menu?
I can create a menu item in the explorer context menu by adding keys in the registry to **HKEY_CLASSES_ROOT\Folder\shell** How can I create submenu items to the just created menu item?
windows
shell
null
null
null
null
open
How to add submenu items to the windows explorer context menu? === I can create a menu item in the explorer context menu by adding keys in the registry to **HKEY_CLASSES_ROOT\Folder\shell** How can I create submenu items to the just created menu item?
0
39,735
09/02/2008 15:02:25
1,122
08/12/2008 14:00:43
404
42
Have you got a CascadingDropDown working with ASP.NET MVC?
If so how? Did you roll your own with jQuery or use the Microsoft AJAX toolkit? Did you create a webservice or call an action?
c#
asp.net-mvc
ajax
controls
ajaxtoolkit
null
open
Have you got a CascadingDropDown working with ASP.NET MVC? === If so how? Did you roll your own with jQuery or use the Microsoft AJAX toolkit? Did you create a webservice or call an action?
0
39,738
09/02/2008 15:03:50
184
08/03/2008 05:34:19
1,724
26
Which HTML WYSIWYG tool do you recommend?
Why? Which of Microsoft Expression Suite is recommended for developing a web application (no silverlight or WPF support needed). Which all products available today in the market are standard compliant?
html
null
null
null
null
null
open
Which HTML WYSIWYG tool do you recommend? === Why? Which of Microsoft Expression Suite is recommended for developing a web application (no silverlight or WPF support needed). Which all products available today in the market are standard compliant?
0
39,739
09/02/2008 15:04:06
282
08/04/2008 12:18:45
1
1
Remote Debugging Server Side of a Web Application with Visual Studio 2008
So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to set a breakpoint, attach, and start stepping line by line to verify code flow and, you know, debug and stuff :). I'm sure most of the answers will pertain to ASP.NET code, and I'm interested in that, but my current code base is actually Classic ASP and ISAPI Extensions, so I care about that a little more. Also, my test server is running in VMWare, I've noticed in the latest VMWare install it mentioning something about debugging support, but I'm unfamiliar with what that means...anyone using it, what does it do for you?
asp.net
visual-studio
debugging
asp-classic
null
null
open
Remote Debugging Server Side of a Web Application with Visual Studio 2008 === So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to set a breakpoint, attach, and start stepping line by line to verify code flow and, you know, debug and stuff :). I'm sure most of the answers will pertain to ASP.NET code, and I'm interested in that, but my current code base is actually Classic ASP and ISAPI Extensions, so I care about that a little more. Also, my test server is running in VMWare, I've noticed in the latest VMWare install it mentioning something about debugging support, but I'm unfamiliar with what that means...anyone using it, what does it do for you?
0
39,742
09/02/2008 15:05:22
4,161
09/02/2008 07:55:46
137
3
Does git have anything like `svn propset`?
Browsing through the git documentation, I can't see anything analogous to SVN's commit hooks or the "propset" features that can, say, update a version number or copyright notice within a file whenever it is committed to the repository. Are git users expected to write external scripts for this sort of functionality (which doesn't seem out of the question) or have I just missed something obvious?
version-control
git
svn
null
null
null
open
Does git have anything like `svn propset`? === Browsing through the git documentation, I can't see anything analogous to SVN's commit hooks or the "propset" features that can, say, update a version number or copyright notice within a file whenever it is committed to the repository. Are git users expected to write external scripts for this sort of functionality (which doesn't seem out of the question) or have I just missed something obvious?
0
39,744
09/02/2008 15:05:47
2,894
08/25/2008 20:06:55
306
35
Getting Configuration value from web.config file using VB and .Net 1.1
I have the following web config file. I am having some difficulty in retrieving the value from the "AppName.DataAccess.ConnectionString" key. I know I could move it to the AppSetting block and get it realtively easily but I do not wnat to duplicate the key (and thereby clutter my already cluttered web.config file). Another DLL (one to which I have no source code) uses this block and since it already exists, why not use it. I am a C# developer (using .Net 3.5) and this is VB code (using .Net 1.1 no less) so I am already in a strange place (where is my saftey semicolon?). Thanks for your help!! <?xml version="1.0"?> <configuration> <configSections> <section name="AppNameConfiguration" type="AppName.SystemBase.AppNameConfiguration, SystemBase"/> </configSections> <AppNameConfiguration> <add key="AppName.DataAccess.ConnectionString" value="(Deleted to protect guilty)" /> </AppNameConfiguration> <appSettings> ...other key info deleted for brevity... </appSettings> <system.web> ... </system.web> </configuration>
vb
configurationfiles
.net-1.1
null
null
null
open
Getting Configuration value from web.config file using VB and .Net 1.1 === I have the following web config file. I am having some difficulty in retrieving the value from the "AppName.DataAccess.ConnectionString" key. I know I could move it to the AppSetting block and get it realtively easily but I do not wnat to duplicate the key (and thereby clutter my already cluttered web.config file). Another DLL (one to which I have no source code) uses this block and since it already exists, why not use it. I am a C# developer (using .Net 3.5) and this is VB code (using .Net 1.1 no less) so I am already in a strange place (where is my saftey semicolon?). Thanks for your help!! <?xml version="1.0"?> <configuration> <configSections> <section name="AppNameConfiguration" type="AppName.SystemBase.AppNameConfiguration, SystemBase"/> </configSections> <AppNameConfiguration> <add key="AppName.DataAccess.ConnectionString" value="(Deleted to protect guilty)" /> </AppNameConfiguration> <appSettings> ...other key info deleted for brevity... </appSettings> <system.web> ... </system.web> </configuration>
0
39,746
09/02/2008 15:06:17
4,264
09/02/2008 15:02:21
1
0
HgTortoise in Vista 64-bit not showing the context menu
I installed HgTortoise (Mercurial) in my Vista 64-bit and the context menu is not showing up when I right click a file or folder. Is there any workaround for this problem?
mercurial
null
null
null
null
null
open
HgTortoise in Vista 64-bit not showing the context menu === I installed HgTortoise (Mercurial) in my Vista 64-bit and the context menu is not showing up when I right click a file or folder. Is there any workaround for this problem?
0
39,753
09/02/2008 15:11:50
4,263
09/02/2008 14:57:19
1
0
Connection pooling in PHP
Is it possible to cache database connections when using PHP like you would in a J2EE container? If so, how?
php
null
null
null
null
null
open
Connection pooling in PHP === Is it possible to cache database connections when using PHP like you would in a J2EE container? If so, how?
0
39,758
09/02/2008 15:12:55
184
08/03/2008 05:34:19
1,729
26
What does Google Chrome mean to web developers?
From a web developer point of view, what changes are expected in the development arena when Google Chrome is released? Are the developments powerful enough to make another revolution in the web? Will the way we see web programming change? Or is it just another web browser?
google
chrome
null
null
null
null
open
What does Google Chrome mean to web developers? === From a web developer point of view, what changes are expected in the development arena when Google Chrome is released? Are the developments powerful enough to make another revolution in the web? Will the way we see web programming change? Or is it just another web browser?
0
39,770
09/02/2008 15:17:16
572
08/06/2008 20:56:54
2,442
199
What do you call the tags in Subversion and CVS that add automatic content?
Things like <code>@log</code> and <code>@version</code> which add data upon check-in to the file. I'm interested in seeing the other ones and what information they can provide, but I can't get much info unless I know what they are called. Thanks.
cvs
svn
tags
null
null
null
open
What do you call the tags in Subversion and CVS that add automatic content? === Things like <code>@log</code> and <code>@version</code> which add data upon check-in to the file. I'm interested in seeing the other ones and what information they can provide, but I can't get much info unless I know what they are called. Thanks.
0
39,771
09/02/2008 15:17:22
2,469
08/22/2008 12:41:47
178
22
Is a GUID unique 100% of the time?
Is a GUID unique 100% of the time? Will it stay unique over multiple threads?
.net
guid
null
null
null
null
open
Is a GUID unique 100% of the time? === Is a GUID unique 100% of the time? Will it stay unique over multiple threads?
0
39,772
09/02/2008 15:18:05
1,679
08/17/2008 23:32:44
11
1
Encrypt data from users in web applications
Some web applications, like Google Docs, store data generated by the users. Data that can only be read by its owner. Or maybe not? As far as I know, this data is stored as is in a remote database. So, if anybody with enough privileges in the remote system (a sysadmin, for instance) can lurk my data, my privacy could get compromised. What could be the best solution to store this data encrypted in a remote database and that only the data's owner could decrypt it? How to make this process transparent to the user? (You can't use the user's password as the key to encrypt his data, because you shouldn't know his password).
web-applications
privacy
encryption
null
null
null
open
Encrypt data from users in web applications === Some web applications, like Google Docs, store data generated by the users. Data that can only be read by its owner. Or maybe not? As far as I know, this data is stored as is in a remote database. So, if anybody with enough privileges in the remote system (a sysadmin, for instance) can lurk my data, my privacy could get compromised. What could be the best solution to store this data encrypted in a remote database and that only the data's owner could decrypt it? How to make this process transparent to the user? (You can't use the user's password as the key to encrypt his data, because you shouldn't know his password).
0
39,777
09/02/2008 15:19:33
4,267
09/02/2008 15:19:32
1
0
Implementing a '20 Questions'-like Wizard in a Database
I am looking to implement a data-driven wizard with the question tree stored in an Oracle database. What is the best schema to use to make the database portion flexible (i.e. easy to add new paths of questions) without sacrificing too much in terms of performance?
sql
oracle
database-design
null
null
null
open
Implementing a '20 Questions'-like Wizard in a Database === I am looking to implement a data-driven wizard with the question tree stored in an Oracle database. What is the best schema to use to make the database portion flexible (i.e. easy to add new paths of questions) without sacrificing too much in terms of performance?
0
39,780
09/02/2008 15:19:50
1,284
08/14/2008 11:34:29
46
10
How Do I Check Job Status From SSIS Control Flow?
Here's my scenario - I have an SSIS job that depends on another prior SSIS job to run. I need to be able to check the first job's status before I kick off the second one. It's not feasible to add the 2nd job into the workflow of the first one, as it is already way too complex. I want to be able to check the first job's status (Failed, Successful, Currently Executing) from the second one's, and use this as a condition to decide whether the second one should run, or wait for a retry. I know this can be done by querying the MSDB database on the SQL Server running the job. I'm wondering of there is an easier way, such as possibly using the WMI Data Reader Task? Anyone had this experience?
mssql
ssis
null
null
null
null
open
How Do I Check Job Status From SSIS Control Flow? === Here's my scenario - I have an SSIS job that depends on another prior SSIS job to run. I need to be able to check the first job's status before I kick off the second one. It's not feasible to add the 2nd job into the workflow of the first one, as it is already way too complex. I want to be able to check the first job's status (Failed, Successful, Currently Executing) from the second one's, and use this as a condition to decide whether the second one should run, or wait for a retry. I know this can be done by querying the MSDB database on the SQL Server running the job. I'm wondering of there is an easier way, such as possibly using the WMI Data Reader Task? Anyone had this experience?
0
39,792
09/02/2008 15:22:57
4,224
09/02/2008 12:49:25
1
0
How do I do multiple updates in a single SQL query?
Okay, here's the case: I have an SQL query like this: UPDATE foo SET flag=true WHERE id=? Now, I have a PHP array, which has a list of IDs. Is there a neat way of doing this, outside parsing something like: foreach($list as $item){ $querycondition = $querycondition . " OR " . $item; } and using that in the where clause?
php
sql
null
null
null
null
open
How do I do multiple updates in a single SQL query? === Okay, here's the case: I have an SQL query like this: UPDATE foo SET flag=true WHERE id=? Now, I have a PHP array, which has a list of IDs. Is there a neat way of doing this, outside parsing something like: foreach($list as $item){ $querycondition = $querycondition . " OR " . $item; } and using that in the where clause?
0
39,824
09/02/2008 15:38:09
4,271
09/02/2008 15:38:09
1
0
Debugging an exception in an empty catch block
I'm debugging a production application that has a rash of empty catch blocks *sigh*: try {*SOME CODE*} catch{} Is there a way of seeing what the exception is when the debugger hits the catch in the IDE?
ide
null
null
null
null
null
open
Debugging an exception in an empty catch block === I'm debugging a production application that has a rash of empty catch blocks *sigh*: try {*SOME CODE*} catch{} Is there a way of seeing what the exception is when the debugger hits the catch in the IDE?
0
39,835
09/02/2008 15:41:53
4,269
09/02/2008 15:26:27
1
0
HTML Help keyword location
I'm writing a manual and some important keywords are repeated in several pages. In the project's index I defined the keywords like this: <LI> <OBJECT type="text/sitemap"> <param name="Name" value="Stackoverflow"> <param name="Name" value="Overview"> <param name="Local" value="overview.html#stackoverflow"> <param name="Name" value="Cover"> <param name="Local" value="cover.html#stackoverflow"> <param name="Name" value="Intro"> <param name="Local" value="intro.html#stackoverflow"> </OBJECT> It works but instead of the title the dialog shows the keyword and the name of the project repeated three times. Here's how it looks: http://img54.imageshack.us/img54/3342/sokeywordjs9.png How can I display the tile of the page that contains the keyword in that dialog? I would like to show like this: Stackoverflow Overview Stackoverflow Cover Stackoverflow Intro Thanks
indexing
chm
keywords
null
null
null
open
HTML Help keyword location === I'm writing a manual and some important keywords are repeated in several pages. In the project's index I defined the keywords like this: <LI> <OBJECT type="text/sitemap"> <param name="Name" value="Stackoverflow"> <param name="Name" value="Overview"> <param name="Local" value="overview.html#stackoverflow"> <param name="Name" value="Cover"> <param name="Local" value="cover.html#stackoverflow"> <param name="Name" value="Intro"> <param name="Local" value="intro.html#stackoverflow"> </OBJECT> It works but instead of the title the dialog shows the keyword and the name of the project repeated three times. Here's how it looks: http://img54.imageshack.us/img54/3342/sokeywordjs9.png How can I display the tile of the page that contains the keyword in that dialog? I would like to show like this: Stackoverflow Overview Stackoverflow Cover Stackoverflow Intro Thanks
0
39,843
09/02/2008 15:45:03
3,047
08/26/2008 13:36:37
19
4
How do I create a base page in WPF?
I have decided that all my WPF pages need to register a routed event. Rather than include public static readonly RoutedEvent MyEvent= EventManager.RegisterRoutedEvent("MyEvent", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BasePage)); on every page, I decided to create a base page (named BasePage). I put the above line of code in my base page and then changed a few of my other pages to derive from BasePage. I can't get passed this error: > Error 12 'CTS.iDocV7.BasePage' cannot > be the root of a XAML file because it > was defined using XAML. Line 1 > Position > 22. C:\Work\iDoc7\CTS.iDocV7\UI\Quality\QualityControlQueuePage.xaml 1 22 CTS.iDocV7 Does anyone know how to best create a base page when I can put events, properties, methods, etc that I want to be able to use from any wpf page?
wpf
null
null
null
null
null
open
How do I create a base page in WPF? === I have decided that all my WPF pages need to register a routed event. Rather than include public static readonly RoutedEvent MyEvent= EventManager.RegisterRoutedEvent("MyEvent", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BasePage)); on every page, I decided to create a base page (named BasePage). I put the above line of code in my base page and then changed a few of my other pages to derive from BasePage. I can't get passed this error: > Error 12 'CTS.iDocV7.BasePage' cannot > be the root of a XAML file because it > was defined using XAML. Line 1 > Position > 22. C:\Work\iDoc7\CTS.iDocV7\UI\Quality\QualityControlQueuePage.xaml 1 22 CTS.iDocV7 Does anyone know how to best create a base page when I can put events, properties, methods, etc that I want to be able to use from any wpf page?
0
39,847
09/02/2008 15:46:39
1,892
08/19/2008 06:17:29
348
20
Using C in a shared multi-platform POSIX environment.
I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python script, that detected the operating system and fired off the correct version of the C application. Each platform has GCC available and uses the same shell. One idea was to have the C compiled to the users local ~/bin, with timestamp comparison with C code so it is not compiled each run, but only when code is updated. Another was to just compile it for each platform, and have the wrapper script select the proper executable. Is there an accepted/stable process for this? Are there any catches? Are there alternatives (assuming the absolute need to use native C code)?
c
posix
script
python
crossplatform
null
open
Using C in a shared multi-platform POSIX environment. === I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python script, that detected the operating system and fired off the correct version of the C application. Each platform has GCC available and uses the same shell. One idea was to have the C compiled to the users local ~/bin, with timestamp comparison with C code so it is not compiled each run, but only when code is updated. Another was to just compile it for each platform, and have the wrapper script select the proper executable. Is there an accepted/stable process for this? Are there any catches? Are there alternatives (assuming the absolute need to use native C code)?
0
39,855
09/02/2008 15:50:10
383
08/05/2008 10:46:37
2,377
216
Embed Powerpoint into HTML
Is it possible to embed a powerpoint presentation (ppt) into a webpage (xhtml)? This will be used on a local Intranet where there is a mix of IE6 and 7 only so no need to consider other browsers.
xhtml
powerpoint
embed
null
null
null
open
Embed Powerpoint into HTML === Is it possible to embed a powerpoint presentation (ppt) into a webpage (xhtml)? This will be used on a local Intranet where there is a mix of IE6 and 7 only so no need to consider other browsers.
0
39,856
09/02/2008 15:51:51
1,638
08/17/2008 17:58:57
384
45
how do I import a class to use inside Flex application?
I have an actionscript file that defines a class that I would like to use inside a Flex application. I have defined some custom controls in a actionscript file and then import them via the application tag: <pre> <code> &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:scorecard="com.apterasoftware.scorecard.controls.*" ... &lt;/mx:Application&gt; </code> </pre> but this code is not a flex component, rather it is a library for performing math routines, how do I import this class?
flex
actionscript-3
null
null
null
null
open
how do I import a class to use inside Flex application? === I have an actionscript file that defines a class that I would like to use inside a Flex application. I have defined some custom controls in a actionscript file and then import them via the application tag: <pre> <code> &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:scorecard="com.apterasoftware.scorecard.controls.*" ... &lt;/mx:Application&gt; </code> </pre> but this code is not a flex component, rather it is a library for performing math routines, how do I import this class?
0
39,867
09/02/2008 15:58:49
3,105
08/26/2008 17:00:01
59
6
How to run gpg from a script run by cron?
I have a script that has a part that looks like that: for file in `ls *.tar.gz`; do echo encrypting $file gpg --passphrase-file /home/$USER/.gnupg/backup-passphrase \ --simple-sk-checksum -c $file done For some reason if I run this script manually, works perfectly fine and all files are encrypted. If I run this as cron job, `echo $file` works fine (I see "encrypting &lt;file&gt;" in the log), but the file doesn't get encrypted and gpg silent fails with no stdout/stderr output. Any clues?
bash
cron
gpg
null
null
null
open
How to run gpg from a script run by cron? === I have a script that has a part that looks like that: for file in `ls *.tar.gz`; do echo encrypting $file gpg --passphrase-file /home/$USER/.gnupg/backup-passphrase \ --simple-sk-checksum -c $file done For some reason if I run this script manually, works perfectly fine and all files are encrypted. If I run this as cron job, `echo $file` works fine (I see "encrypting &lt;file&gt;" in the log), but the file doesn't get encrypted and gpg silent fails with no stdout/stderr output. Any clues?
0
39,874
09/02/2008 16:01:32
4,262
09/02/2008 14:54:42
21
2
How do I model a chessboard when programming a computer to play chess?
What data structures would you use to represent a chessboard for a computer chess program?
chess
null
null
null
null
null
open
How do I model a chessboard when programming a computer to play chess? === What data structures would you use to represent a chessboard for a computer chess program?
0
39,879
09/02/2008 16:03:23
184
08/03/2008 05:34:19
1,754
26
Why javascrpit does not support multithreading?
Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions?
javascript
browser
null
null
null
null
open
Why javascrpit does not support multithreading? === Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions?
0
39,892
09/02/2008 16:07:53
4,239
09/02/2008 13:46:59
1
1
How To Write a Plug-In for IE
The IE Developer Toolbar is a plugin that can dock or separate from the browser. I understand its much more difficult to do this in IE than in Firefox. - How does one create an IE plugin? - What languages are available for this task? - How can I make a Hello World plugin?
internet-explorer
plugin
null
null
null
null
open
How To Write a Plug-In for IE === The IE Developer Toolbar is a plugin that can dock or separate from the browser. I understand its much more difficult to do this in IE than in Firefox. - How does one create an IE plugin? - What languages are available for this task? - How can I make a Hello World plugin?
0
39,903
09/02/2008 16:10:31
632
08/07/2008 12:15:08
140
8
VS.NET defaults to private class
Why does Visual Studio declare new classes as private in C#? I almost always switch them over to public, am I the crazy one?
c#
visual-studio
null
null
null
null
open
VS.NET defaults to private class === Why does Visual Studio declare new classes as private in C#? I almost always switch them over to public, am I the crazy one?
0
39,910
09/02/2008 16:14:06
1,360
08/14/2008 18:11:31
39
6
How to use the SharePoint MultipleLookupField control?
I want to use the MultipleLookupField control in a web page that will run in the context of SharePoint. I was wondering if anyone would help me with an example, which shows step by step how to use the control two display two SPField Collections.
sharepoint
multiplelookupfield
null
null
null
null
open
How to use the SharePoint MultipleLookupField control? === I want to use the MultipleLookupField control in a web page that will run in the context of SharePoint. I was wondering if anyone would help me with an example, which shows step by step how to use the control two display two SPField Collections.
0
39,912
09/02/2008 16:14:13
1,546
08/16/2008 14:32:16
176
9
How do I remove an item from a stl vector with a certain value?
I was looking at the API documentation for stl vector, and noticed there was no method on the vector class that allowed the removal of an element with a certain value. This seems like a common operation, and it seems odd that there's no built in way to do this.
c++
stl
null
null
null
null
open
How do I remove an item from a stl vector with a certain value? === I was looking at the API documentation for stl vector, and noticed there was no method on the vector class that allowed the removal of an element with a certain value. This seems like a common operation, and it seems odd that there's no built in way to do this.
0
39,914
09/02/2008 16:15:10
1,596
08/17/2008 09:24:01
165
10
How do I set windows to perform auto login?
Windows has a feature that allows an administrator to perform auto-logon whenever it is started. How can this feature be activated? There are tools out there that give you a GUI for setting this easily, but you can also do it relatively easily by editing the registry. Under the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon Add the following values: - DefaultDomainName String < domain-name > - DefaultUserName String < username > - DefaultPassword String < password > - AutoAdminLogon String 1 Important: Using auto-logon is insecure and should, in general, never be used for standard computer configurations. The problem is not only that your computer is accessible to anyone with physical access to it, but also that the password is saved in plain-text in a well known location in your registry. This is usually used for test environments or for special setups. This is even more important to notice if you intend to perform auto-logon as an administrator.
windows
null
null
null
null
null
open
How do I set windows to perform auto login? === Windows has a feature that allows an administrator to perform auto-logon whenever it is started. How can this feature be activated? There are tools out there that give you a GUI for setting this easily, but you can also do it relatively easily by editing the registry. Under the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon Add the following values: - DefaultDomainName String < domain-name > - DefaultUserName String < username > - DefaultPassword String < password > - AutoAdminLogon String 1 Important: Using auto-logon is insecure and should, in general, never be used for standard computer configurations. The problem is not only that your computer is accessible to anyone with physical access to it, but also that the password is saved in plain-text in a well known location in your registry. This is usually used for test environments or for special setups. This is even more important to notice if you intend to perform auto-logon as an administrator.
0
39,915
09/02/2008 16:15:15
521
08/06/2008 14:16:34
643
35
Extra tables or non-specific foreign keys?
There are several types of objects in a system, and each has it's own table in the database. A user should be able to comment on any of them. How would you design the comments table(s)? I can think of a few options: 1. One comments table, with a FK column for each object type (ObjectAID, ObjectBID, etc) 2. Several comments tables, one for each object type (ObjectAComments, ObjectBComments, etc) 3. One generic FK (ParentObjectID) with another column to indicate the type ("ObjectA") Which would you choose? Is there a better method I'm not thinking of?
database-design
normalizing
foreignkeys
null
null
null
open
Extra tables or non-specific foreign keys? === There are several types of objects in a system, and each has it's own table in the database. A user should be able to comment on any of them. How would you design the comments table(s)? I can think of a few options: 1. One comments table, with a FK column for each object type (ObjectAID, ObjectBID, etc) 2. Several comments tables, one for each object type (ObjectAComments, ObjectBComments, etc) 3. One generic FK (ParentObjectID) with another column to indicate the type ("ObjectA") Which would you choose? Is there a better method I'm not thinking of?
0
39,916
09/02/2008 16:15:23
115
08/02/2008 05:44:40
506
74
Programmaticly building htpasswd.
Is there a programmatic way to build htpasswd files, without depending on OS specific functions (i.e. exec(), passthru())?
php
automation
htpasswd
null
null
null
open
Programmaticly building htpasswd. === Is there a programmatic way to build htpasswd files, without depending on OS specific functions (i.e. exec(), passthru())?
0
39,928
09/02/2008 16:18:36
2,978
08/26/2008 09:57:49
1
3
SQLServer Native Client Error "Connection Busy With Results From Another Command" in SSIS
I'm getting a "Connection Busy With Results From Another Command" error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
sql-server
ssis
connection
null
null
null
open
SQLServer Native Client Error "Connection Busy With Results From Another Command" in SSIS === I'm getting a "Connection Busy With Results From Another Command" error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
0
39,929
09/02/2008 16:19:11
3,002
08/26/2008 11:21:07
732
24
PGP signatures from Python?
What is the easiest way to create and verify PGP/GPG signatures from within a Python application? I can call pgp or gpg using subprocess and parse the output, but I was looking for a way that didn't require an external program to be installed (my application is cross-platform mac/windows/unix). [1]: http://www.dlitz.net/software/pycrypto/
python
security
cross-platform
gpg
null
null
open
PGP signatures from Python? === What is the easiest way to create and verify PGP/GPG signatures from within a Python application? I can call pgp or gpg using subprocess and parse the output, but I was looking for a way that didn't require an external program to be installed (my application is cross-platform mac/windows/unix). [1]: http://www.dlitz.net/software/pycrypto/
0
39,946
09/02/2008 16:24:57
1,772
08/18/2008 14:05:29
72
10
Coupling and cohesion
I'm trying to boil down the concepts of coupling and cohesion to a concise definition. Can someone give me a short and understandable explanation (shorter than the definitions on Wikipedia [here][1] and [here][2])? [1]: http://en.wikipedia.org/wiki/Coupling_(computer_science) [2]: http://en.wikipedia.org/wiki/Cohesion_(computer_science) Thanks.
oop
null
null
null
null
null
open
Coupling and cohesion === I'm trying to boil down the concepts of coupling and cohesion to a concise definition. Can someone give me a short and understandable explanation (shorter than the definitions on Wikipedia [here][1] and [here][2])? [1]: http://en.wikipedia.org/wiki/Coupling_(computer_science) [2]: http://en.wikipedia.org/wiki/Cohesion_(computer_science) Thanks.
0
39,960
09/02/2008 16:29:30
208
08/03/2008 13:52:08
21
1
javascript locals()?
In python one can get a dictionary of all local and global variables in the current scope with the built-in functions locals() and globals(). Is there some equivalent way of doing this in javascript? For instance, I would like to do something like the following: var foo = function(){ alert('foo'); }; var bar = function(){ alert('bar'); }; var s = 'foo'; locals()[s](); // alerts 'foo' Is this at all possible, or should I just be using a local object for the lookup?
javascript
python
null
null
null
null
open
javascript locals()? === In python one can get a dictionary of all local and global variables in the current scope with the built-in functions locals() and globals(). Is there some equivalent way of doing this in javascript? For instance, I would like to do something like the following: var foo = function(){ alert('foo'); }; var bar = function(){ alert('bar'); }; var s = 'foo'; locals()[s](); // alerts 'foo' Is this at all possible, or should I just be using a local object for the lookup?
0
39,977
09/02/2008 16:35:09
30
08/01/2008 12:25:44
1,334
47
How are tags made in Subversion?
I know how to use tags in subversion. I create a tag every time I get to a release milestone. What I don't quite understand is how they work. Is a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says <code>GO TO /trunk/project/ Revision 5</code> or whatever. The command to create a tag (<code>svn copy</code>) seems to imply that it's a copy, but I've seen other people write that subversion doesn't really copy anything. Say I dump just the HEAD revision of a repository. I don't care about any history except the tags. Are those tags dumped along with the rest of the Head revision? Finally, is all this just programming magic that I don't really want to know.
svn
null
null
null
null
null
open
How are tags made in Subversion? === I know how to use tags in subversion. I create a tag every time I get to a release milestone. What I don't quite understand is how they work. Is a tag just a copy, made from what ever revision I specify? Or is a tag more like a reference, where internally subversion just says <code>GO TO /trunk/project/ Revision 5</code> or whatever. The command to create a tag (<code>svn copy</code>) seems to imply that it's a copy, but I've seen other people write that subversion doesn't really copy anything. Say I dump just the HEAD revision of a repository. I don't care about any history except the tags. Are those tags dumped along with the rest of the Head revision? Finally, is all this just programming magic that I don't really want to know.
0
39,983
09/02/2008 16:36:29
3,043
08/26/2008 13:24:14
622
72
Security implications of multi-threaded javascript
Reading through [this question][1] on multi-threaded javascript, I was wondering if there would be any security implications in allowing javascript to spawn mutliple threads. For example, would there be a risk of a malicious script repeatedly spawning thread after thread in an attempt to overwhelm the operating system or interpreter and trigger entrance into "undefined behavior land", or is it pretty much a non-issue? Any other ways in which an attack might exploit a hypothetical implementation of javascript that supports threads that a non-threading implementation would be immune to? [1]: http://stackoverflow.com/questions/39879/why-doesnt-javascript-support-multithreading
javascript
null
null
null
null
null
open
Security implications of multi-threaded javascript === Reading through [this question][1] on multi-threaded javascript, I was wondering if there would be any security implications in allowing javascript to spawn mutliple threads. For example, would there be a risk of a malicious script repeatedly spawning thread after thread in an attempt to overwhelm the operating system or interpreter and trigger entrance into "undefined behavior land", or is it pretty much a non-issue? Any other ways in which an attack might exploit a hypothetical implementation of javascript that supports threads that a non-threading implementation would be immune to? [1]: http://stackoverflow.com/questions/39879/why-doesnt-javascript-support-multithreading
0
39,996
09/02/2008 16:42:46
4,275
09/02/2008 15:59:34
1
0
Improving performance with OPC tags
I am working with a PC based automation software package called Think'n'Do created by <a href="http://www.phoenixcontact.com">Phoenix Contact</a> It does real time processing, read inputs/ control logic / write outputs all done in a maximum of 50ms. We have an OPC server that is reading/writing tags from a PLC every 10ms. There is a long delay in writing a tag to the PLC and reading back the written value (Think'n'Do (50ms) > OPC Server (10ms) > PLC (10ms) > OPC Server (10ms) > Think'n'Do (50ms) ) that process takes up to 6 seconds to complete when it should by my math only take 130ms. Any ideas of where to look or why it might be taking so much longer would be helpful.
performance
automation
null
null
null
null
open
Improving performance with OPC tags === I am working with a PC based automation software package called Think'n'Do created by <a href="http://www.phoenixcontact.com">Phoenix Contact</a> It does real time processing, read inputs/ control logic / write outputs all done in a maximum of 50ms. We have an OPC server that is reading/writing tags from a PLC every 10ms. There is a long delay in writing a tag to the PLC and reading back the written value (Think'n'Do (50ms) > OPC Server (10ms) > PLC (10ms) > OPC Server (10ms) > Think'n'Do (50ms) ) that process takes up to 6 seconds to complete when it should by my math only take 130ms. Any ideas of where to look or why it might be taking so much longer would be helpful.
0
40,021
09/02/2008 16:54:04
4,282
09/02/2008 16:21:51
3
2
Create new page in Webtop
How do I create a new webpage in the Documentum front end Webtop?
documentum
webtop
null
null
null
null
open
Create new page in Webtop === How do I create a new webpage in the Documentum front end Webtop?
0
40,022
09/02/2008 16:54:55
4,048
09/01/2008 14:18:27
46
1
Best way to update LINQ to SQL classes after database schema change
I'm using LINQ to SQL classes in a project where the database design is still in a bit of flux. Is there an easy way of synchronising the classes with the schema, or do I need to manually update the classes if a table design changes?
c#
.net
linq-to-sql
null
null
null
open
Best way to update LINQ to SQL classes after database schema change === I'm using LINQ to SQL classes in a project where the database design is still in a bit of flux. Is there an easy way of synchronising the classes with the schema, or do I need to manually update the classes if a table design changes?
0
40,026
09/02/2008 16:56:30
4,252
09/02/2008 14:22:06
6
1
Can the same Adobe AIR app run more than once?
As the title says, is there a way to run the same Adobe AIR app more than once? I have a little widget I wrote that shows thumbnails from a couple of photo streams, and I'd like to fix it so I can look at more than one stream at a time. Thanks!
javascript
air
adobe
null
null
null
open
Can the same Adobe AIR app run more than once? === As the title says, is there a way to run the same Adobe AIR app more than once? I have a little widget I wrote that shows thumbnails from a couple of photo streams, and I'd like to fix it so I can look at more than one stream at a time. Thanks!
0
40,028
09/02/2008 16:57:08
3,388
08/28/2008 11:58:07
16
3
How to find a normal vector pointing directly from virtual world to screen in Java3D?
I think it can be done by applying the transformation matrix of the scenegraph to z-normal (0, 0, 1), but it doesn't work. My code goes like this: Vector3f toScreenVector = new Vector3f(0, 0, 1); Transform3D t3d = new Transform3D(); tg.getTransform(t3d); //tg is Transform Group of all objects in a scene t3d.transform(toScreenVector); Then I tried something like this too: Point3d eyePos = new Point3d(); Point3d mousePos = new Point3d(); canvas.getCenterEyeInImagePlate(eyePos); canvas.getPixelLocationInImagePlate(new Point2d(Main.WIDTH/2, Main.HEIGHT/2), mousePos); //Main is the class for main window. Transform3D motion = new Transform3D(); canvas.getImagePlateToVworld(motion); motion.transform(eyePos); motion.transform(mousePos); Vector3d toScreenVector = new Vector3f(eyePos); toScreenVector.sub(mousePos); toScreenVector.normalize(); But still this doesn't work correctly. I think there must be an easy way to create such vector. Do you know what's wrong with my code or better way to do so?
java
graphics
java-3d
null
null
null
open
How to find a normal vector pointing directly from virtual world to screen in Java3D? === I think it can be done by applying the transformation matrix of the scenegraph to z-normal (0, 0, 1), but it doesn't work. My code goes like this: Vector3f toScreenVector = new Vector3f(0, 0, 1); Transform3D t3d = new Transform3D(); tg.getTransform(t3d); //tg is Transform Group of all objects in a scene t3d.transform(toScreenVector); Then I tried something like this too: Point3d eyePos = new Point3d(); Point3d mousePos = new Point3d(); canvas.getCenterEyeInImagePlate(eyePos); canvas.getPixelLocationInImagePlate(new Point2d(Main.WIDTH/2, Main.HEIGHT/2), mousePos); //Main is the class for main window. Transform3D motion = new Transform3D(); canvas.getImagePlateToVworld(motion); motion.transform(eyePos); motion.transform(mousePos); Vector3d toScreenVector = new Vector3f(eyePos); toScreenVector.sub(mousePos); toScreenVector.normalize(); But still this doesn't work correctly. I think there must be an easy way to create such vector. Do you know what's wrong with my code or better way to do so?
0
40,032
09/02/2008 16:59:07
4,269
09/02/2008 15:26:27
21
2
Palm or Pocket PC for developers
I need to develop some programs for mobile devices but haven't decided the platform to build upon. I'm looking for Palm or Pocket PC devices that have Touch screen and Wi-Fi connection and are cheep because I'll need to buy several of them. I don't really need mp3 players, video players, pdf readers or anything else since the apps are going to be simple data collection to feed to a server database. I'm proficient with C and C#. I could learn Java if I had to. What devices do you recommend? Should I look for other platforms (which ones)? Thanks
mobile
devices
null
null
null
null
open
Palm or Pocket PC for developers === I need to develop some programs for mobile devices but haven't decided the platform to build upon. I'm looking for Palm or Pocket PC devices that have Touch screen and Wi-Fi connection and are cheep because I'll need to buy several of them. I don't really need mp3 players, video players, pdf readers or anything else since the apps are going to be simple data collection to feed to a server database. I'm proficient with C and C#. I could learn Java if I had to. What devices do you recommend? Should I look for other platforms (which ones)? Thanks
0
40,039
09/02/2008 17:01:28
4,220
09/02/2008 11:59:43
1
1
How do I read and write raw ip packets from java on a mac?
What would be the easiest way to be able to send and receive raw network packets. Do I have to write my own JNI wrapping of some c API, and in that case what API am I looking for?
java
osx
network-programming
null
null
null
open
How do I read and write raw ip packets from java on a mac? === What would be the easiest way to be able to send and receive raw network packets. Do I have to write my own JNI wrapping of some c API, and in that case what API am I looking for?
0
40,043
09/02/2008 17:04:46
3,314
08/27/2008 20:05:23
101
9
How do I create a database programatically in SQL Server?
I would like to create a new database from my C# application. How can I do that? I'm assuming once I create it, I can simply generate a connection string on the fly and connect to it, and the issue all the CREATE TABLE statements.
.net
sql-server
null
null
null
null
open
How do I create a database programatically in SQL Server? === I would like to create a new database from my C# application. How can I do that? I'm assuming once I create it, I can simply generate a connection string on the fly and connect to it, and the issue all the CREATE TABLE statements.
0
40,075
09/02/2008 17:18:19
1,455
08/15/2008 17:03:04
43
6
Generic List Extensions in C#
I am writing a few extensions to mimic the map and reduce functions in Lisp. public delegate R ReduceFunction<T,R>(T t, R previous); public delegate void TransformFunction<T>(T t, params object[] args); public static R Reduce<T,R>(this List<T> list, ReduceFunction<T,R> r, R initial) { var aggregate = initial; foreach(var t in list) aggregate = r(t,aggregate); return aggregate; } public static void Transform<T>(this List<T> list, TransformFunction<T> f, params object [] args) { foreach(var t in list) f(t,args); } The transform function will cut down on cruft like: foreach(var t in list) if(conditions && moreconditions) //do work etc Does this make sense? Could it be better?
c#
functional-programming
extension-methods
null
null
null
open
Generic List Extensions in C# === I am writing a few extensions to mimic the map and reduce functions in Lisp. public delegate R ReduceFunction<T,R>(T t, R previous); public delegate void TransformFunction<T>(T t, params object[] args); public static R Reduce<T,R>(this List<T> list, ReduceFunction<T,R> r, R initial) { var aggregate = initial; foreach(var t in list) aggregate = r(t,aggregate); return aggregate; } public static void Transform<T>(this List<T> list, TransformFunction<T> f, params object [] args) { foreach(var t in list) f(t,args); } The transform function will cut down on cruft like: foreach(var t in list) if(conditions && moreconditions) //do work etc Does this make sense? Could it be better?
0
10,278,073
04/23/2012 09:38:35
1,141,493
01/10/2012 18:02:55
472
0
C++ - critical values probability distribution
were can I find reliable code for critical values for probability distributions? For instance, F critical values for the fisher test... ? Thanks for any relevant reference.
c++
statistics
distribution
probability
null
null
open
C++ - critical values probability distribution === were can I find reliable code for critical values for probability distributions? For instance, F critical values for the fisher test... ? Thanks for any relevant reference.
0