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
43,199
09/04/2008 05:00:49
4,287
09/02/2008 16:51:20
21
3
Internationalized page properties in Tapestry 4.1.2
The login page in my Tapestry application has a property in which the password the user types in is stored, which is then compared against the value from the database. If the user enters a password with multi-byte characters, such as: áéíóú ...the getPassword() abstract method for the corresponding property returns: áéíóú Clearly, that's not encoded properly. Yet Firebug reports that the page is served up in UTF-8, so presumably the form submission request would also be encoded in UTF-8. So why does Tapestry appear to botch the encoding when setting the property? Relevant code follows: ## Login.html <html jwcid="@Shell" doctype='html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"' ...> <body jwcid="@Body"> ... <form jwcid="@Form" listener="listener:attemptLogin" ...> ... <input jwcid="password"/> ... </form> ... </body> </html> ## Login.page <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE page-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> <page-specification class="mycode.Login"> ... <property name="password" /> ... <component id="password" type="TextField"> <binding name="value" value="password"/> <binding name="hidden" value="true"/> ... </component> ... </page-specification> ## Login.java ... public abstract class Login extends BasePage { ... public abstract String getPassword(); ... public void attemptLogin() { // At this point, inspecting getPassword() returns // the incorrectly encoded String. } ... }
java
tapestry
internationalization
null
null
null
open
Internationalized page properties in Tapestry 4.1.2 === The login page in my Tapestry application has a property in which the password the user types in is stored, which is then compared against the value from the database. If the user enters a password with multi-byte characters, such as: áéíóú ...the getPassword() abstract method for the corresponding property returns: áéíóú Clearly, that's not encoded properly. Yet Firebug reports that the page is served up in UTF-8, so presumably the form submission request would also be encoded in UTF-8. So why does Tapestry appear to botch the encoding when setting the property? Relevant code follows: ## Login.html <html jwcid="@Shell" doctype='html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"' ...> <body jwcid="@Body"> ... <form jwcid="@Form" listener="listener:attemptLogin" ...> ... <input jwcid="password"/> ... </form> ... </body> </html> ## Login.page <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE page-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> <page-specification class="mycode.Login"> ... <property name="password" /> ... <component id="password" type="TextField"> <binding name="value" value="password"/> <binding name="hidden" value="true"/> ... </component> ... </page-specification> ## Login.java ... public abstract class Login extends BasePage { ... public abstract String getPassword(); ... public void attemptLogin() { // At this point, inspecting getPassword() returns // the incorrectly encoded String. } ... }
0
43,201
09/04/2008 05:02:36
3,717
08/30/2008 09:44:24
452
22
How to develop catagories of controllers in MVC Routing?
I'm looking for some examples or samples of routing for the following sort of scenario: The general example of doing things is: {controller}/{action}/{id} So in the scenario of doing a product search for a store you'd have: public class ProductsController: Controller { public ActionResult Search(string id) // id being the search string { ... } } Say you had a few stores to do this and you wanted that consistently, is there any way to then have: {category}/{controller}/{action}/{id} So that you could have a particular search for a particular store, but use a different search method for a different store? (If you required the store name to be a higher priority than the function itself in the url) Or would it come down to: public class ProductsController: Controller { public ActionResult Search(int category, string id) // id being the search string { if(category == 1) return Category1Search(); if(category == 2) return Category2Search(); ... } } It may not be a great example, but basically the idea is to use the same controller name and therefore have a simple URL across a few different scenarios, or are you kind of stuck with requiring unique controller names, and no way to put them in slightly different namespaces/directories? Edit to add: The other reason I want this is because I might want a url that has the categories, and that certain controllers will only work under certain categories. IE: /this/search/items/search+term <-- works /that/search/items/search+term <-- won't work - because the search controller isn't allowed.
asp.net-mvc
routing
controller
null
null
null
open
How to develop catagories of controllers in MVC Routing? === I'm looking for some examples or samples of routing for the following sort of scenario: The general example of doing things is: {controller}/{action}/{id} So in the scenario of doing a product search for a store you'd have: public class ProductsController: Controller { public ActionResult Search(string id) // id being the search string { ... } } Say you had a few stores to do this and you wanted that consistently, is there any way to then have: {category}/{controller}/{action}/{id} So that you could have a particular search for a particular store, but use a different search method for a different store? (If you required the store name to be a higher priority than the function itself in the url) Or would it come down to: public class ProductsController: Controller { public ActionResult Search(int category, string id) // id being the search string { if(category == 1) return Category1Search(); if(category == 2) return Category2Search(); ... } } It may not be a great example, but basically the idea is to use the same controller name and therefore have a simple URL across a few different scenarios, or are you kind of stuck with requiring unique controller names, and no way to put them in slightly different namespaces/directories? Edit to add: The other reason I want this is because I might want a url that has the categories, and that certain controllers will only work under certain categories. IE: /this/search/items/search+term <-- works /that/search/items/search+term <-- won't work - because the search controller isn't allowed.
0
43,218
09/04/2008 05:33:14
1,463
08/15/2008 17:26:44
368
29
How do I reference a javascript file?
I'm working on a C#/ASP.NET project that has all the javascript files in a /Javascript folder. If I refer to the JS file using this syntax: src="/Javascript/jsfile.js" then the file is correctly picked up if the project is deployed to the root of the URL. However, if this "web site" is deployed to a sub-folder of the main url this won't work. So the solution could be to use relative urls - but there's a problem with that as well because the master pages reference many of the javascript files and these master pages can be used by pages in the root and in subfolders many levels deep. Does anybody have any ideas for resolving this?
c#
asp.net
javascript
null
null
null
open
How do I reference a javascript file? === I'm working on a C#/ASP.NET project that has all the javascript files in a /Javascript folder. If I refer to the JS file using this syntax: src="/Javascript/jsfile.js" then the file is correctly picked up if the project is deployed to the root of the URL. However, if this "web site" is deployed to a sub-folder of the main url this won't work. So the solution could be to use relative urls - but there's a problem with that as well because the master pages reference many of the javascript files and these master pages can be used by pages in the root and in subfolders many levels deep. Does anybody have any ideas for resolving this?
0
43,224
09/04/2008 05:41:07
2,646
08/23/2008 22:10:27
48
2
How do I calculate a trendline for a graph?
Google is not being my friend - it's been a long time since my stats class in college...I need to calculate the start and end points for a trendline on a graph - is there an easy way to do this? (working in C# but whatever language works for you)
math
graph
null
null
null
null
open
How do I calculate a trendline for a graph? === Google is not being my friend - it's been a long time since my stats class in college...I need to calculate the start and end points for a trendline on a graph - is there an easy way to do this? (working in C# but whatever language works for you)
0
43,243
09/04/2008 06:12:45
4,204
09/02/2008 10:14:59
21
5
How does Web Routing Work?
I need a good understanding of the inner workings of System.Web.Routing. Usually we define the RoutesTable. But how does it do the routing? The reason I'm asking it is that I want to pass the routing to subapps. What I want to see working is a way of passing the current request to mvc apps that work in other AppDomains. Just to make it clear this is what I'm imagining I have a MVC APP that only has the barebone Global.asax and that loads in other app domains some dlls that are mvc apps.. and the comunication is done through a transparent proxy created through _appDomain.CreateInstanceAndUnwrap(...). Hope this is clear enough.
c#
asp.net-mvc
null
null
null
null
open
How does Web Routing Work? === I need a good understanding of the inner workings of System.Web.Routing. Usually we define the RoutesTable. But how does it do the routing? The reason I'm asking it is that I want to pass the routing to subapps. What I want to see working is a way of passing the current request to mvc apps that work in other AppDomains. Just to make it clear this is what I'm imagining I have a MVC APP that only has the barebone Global.asax and that loads in other app domains some dlls that are mvc apps.. and the comunication is done through a transparent proxy created through _appDomain.CreateInstanceAndUnwrap(...). Hope this is clear enough.
0
43,249
09/04/2008 06:27:26
1,865
08/19/2008 00:17:22
88
20
T-SQL stored procedure that accepts multiple Id values
Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure. For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but feel really dirty doing it. SQL Server 2005 is my only applicable limitation I think. create procedure getDepartments @DepartmentIds varchar(max) as declare @Sql varchar(max) select @Sql = 'select [Name] from Department where DepartmentId in (' + @DepartmentIds + ')' exec(@Sql)
sql-server
stored-procedures
t-sql
null
null
null
open
T-SQL stored procedure that accepts multiple Id values === Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure. For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but feel really dirty doing it. SQL Server 2005 is my only applicable limitation I think. create procedure getDepartments @DepartmentIds varchar(max) as declare @Sql varchar(max) select @Sql = 'select [Name] from Department where DepartmentId in (' + @DepartmentIds + ')' exec(@Sql)
0
43,253
09/04/2008 06:38:32
2,948
08/26/2008 08:39:22
537
13
Measuring exception handling overhead in C++
What is the best way to measure exception handling overhead/performance in C++? Please give standalone code samples. I'm targeting Microsoft Visual C++ 2008 and gcc. I need to get results from the following cases: 1. Overhead when there are no try/catch blocks 2. Overhead when there are try/catch blocks but exceptions are not thrown 3. Overhead when exceptions are thrown
c++
performance
exception
gcc
visual-c++
null
open
Measuring exception handling overhead in C++ === What is the best way to measure exception handling overhead/performance in C++? Please give standalone code samples. I'm targeting Microsoft Visual C++ 2008 and gcc. I need to get results from the following cases: 1. Overhead when there are no try/catch blocks 2. Overhead when there are try/catch blocks but exceptions are not thrown 3. Overhead when exceptions are thrown
0
43,259
09/04/2008 06:55:16
4,021
09/01/2008 12:23:44
23
1
Can Database and transaction logs on the same drive cause problems?
Can we have the database and transaction logs on the same drive? What will be its consequences if it is not recommended?
sql-server
null
null
null
null
null
open
Can Database and transaction logs on the same drive cause problems? === Can we have the database and transaction logs on the same drive? What will be its consequences if it is not recommended?
0
43,267
09/04/2008 07:13:40
4,491
09/04/2008 06:44:23
8
0
Good resources for writing console style applicaitons for windows
For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond hello world. I'm interested in making console apps like vim. Not exactly like vim or emacs ... an app that takes over the entire command prompt while it is in use and then after you exit it leaves no trace behind. I know that on unix there is the curses library but for windows? ...
cmd
console
windows
null
null
null
open
Good resources for writing console style applicaitons for windows === For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond hello world. I'm interested in making console apps like vim. Not exactly like vim or emacs ... an app that takes over the entire command prompt while it is in use and then after you exit it leaves no trace behind. I know that on unix there is the curses library but for windows? ...
0
43,283
09/04/2008 07:29:08
1,384,652
08/01/2008 12:01:23
1,779
83
Remote working
I've got an interview on Tuesday for a job that's just a little too far to commute to, I would very much like to work remotely 4 out of 5 days a week so I'm asking what are the best ways to sell remote working to a prospective boss.
interview-questions
remote-working
null
null
null
09/02/2011 15:09:34
not constructive
Remote working === I've got an interview on Tuesday for a job that's just a little too far to commute to, I would very much like to work remotely 4 out of 5 days a week so I'm asking what are the best ways to sell remote working to a prospective boss.
4
43,289
09/04/2008 07:33:25
4,489
09/04/2008 06:00:46
1
2
Comparing two byte arrays in .NET
How can I do this fast? Sure I can do this: static bool ByteArrayCompare(byte[] a1, byte[] a2) { if(a1.Length!=a2.Length) return false; for(int i=0; i<a1.Length; i++) if(a1[i]!=a2[i]) return false; return true; } but I'm looking for either a BCL function or some highly optimized proven way to do this.
c#
null
null
null
null
null
open
Comparing two byte arrays in .NET === How can I do this fast? Sure I can do this: static bool ByteArrayCompare(byte[] a1, byte[] a2) { if(a1.Length!=a2.Length) return false; for(int i=0; i<a1.Length; i++) if(a1[i]!=a2[i]) return false; return true; } but I'm looking for either a BCL function or some highly optimized proven way to do this.
0
43,290
09/04/2008 07:36:39
3,355
08/28/2008 07:36:57
237
14
How to generate urls in django
In the django template language, you can use {% url [viewname] [args] %} to generate a url to a specific view with parameters. How can you programatically do the same in python code? What I need is to create a list of menu items, each item has name, url, and active (whether it's the current page or not). This because it will be a lot cleaner to do this in python than the template language.
python
django
url
null
null
null
open
How to generate urls in django === In the django template language, you can use {% url [viewname] [args] %} to generate a url to a specific view with parameters. How can you programatically do the same in python code? What I need is to create a list of menu items, each item has name, url, and active (whether it's the current page or not). This because it will be a lot cleaner to do this in python than the template language.
0
43,291
09/04/2008 07:36:48
115
08/02/2008 05:44:40
645
90
Variable Types
I know that I can do something like $int = (int)99; //(int) has a maximum or 99 To set the variable $int to an integer and give it a value of 99, Is there a way to set the type to something like LongBlob in MySQL for LARGE Integers in PHP?
php
variable-types
null
null
null
null
open
Variable Types === I know that I can do something like $int = (int)99; //(int) has a maximum or 99 To set the variable $int to an integer and give it a value of 99, Is there a way to set the type to something like LongBlob in MySQL for LARGE Integers in PHP?
0
43,315
09/04/2008 07:59:57
2,183
08/20/2008 19:42:13
325
11
Can I write native iPhone apps using Python
Using [PyObjC][1], you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how? [1]: http://pyobjc.sourceforge.net/
python
iphone
cocoa-touch
null
null
null
open
Can I write native iPhone apps using Python === Using [PyObjC][1], you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how? [1]: http://pyobjc.sourceforge.net/
0
43,320
09/04/2008 08:04:04
372
08/05/2008 09:16:41
3,031
213
NHibernate ISession Flush: Where and when to use it, and why?
One of the things that get me thoroughly confused is the use of session.Flush,in conjunction with session.Commit, and session.Close. Sometimes session.Close works, e.g., it commits all the changes that I need. I know I need to use commit when I have a transaction, or a unit of work with several creates/updates/deletes, so that I can choose to rollback if an error occurs. But sometimes I really get stymied by the logic behind session.Flush. I have seen examples where you have a session.SaveOrUpdate() followed by a flush, but when I remove Flush it works fine anyway. Sometimes I run into errors on the Flush statement saying that the session timed out, and removing it made sure that I didn't run into that error. Does anyone have a good guideline as to where or when to use a Flush? I've checked out the NHibernate documentation for this, but I still can't find a straightforward answer.
.net
nhibernate
null
null
null
null
open
NHibernate ISession Flush: Where and when to use it, and why? === One of the things that get me thoroughly confused is the use of session.Flush,in conjunction with session.Commit, and session.Close. Sometimes session.Close works, e.g., it commits all the changes that I need. I know I need to use commit when I have a transaction, or a unit of work with several creates/updates/deletes, so that I can choose to rollback if an error occurs. But sometimes I really get stymied by the logic behind session.Flush. I have seen examples where you have a session.SaveOrUpdate() followed by a flush, but when I remove Flush it works fine anyway. Sometimes I run into errors on the Flush statement saying that the session timed out, and removing it made sure that I didn't run into that error. Does anyone have a good guideline as to where or when to use a Flush? I've checked out the NHibernate documentation for this, but I still can't find a straightforward answer.
0
43,321
09/04/2008 08:04:37
4,161
09/02/2008 07:55:46
226
9
Worth switching to zsh for casual use?
The default shell in Mac OS X is `bash`, which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed *more stuff*, though, and I've heard good things about `zsh` in this regard. But I don't really have the inclination to spend hours fiddling with settings to improve my command line usage by a tiny amount, since my life on the command line isn't that bad. (As I understand it, `bash` can also be configured to auto-complete more cleverly. It's the configuring I'm not all that keen on.) Will switching to `zsh`, even in a small number cases, make my life easier? Or is it only a better shell if you put in the time to learn *why* it's better? (Examples would be nice, too `:)` )
bash
shell
zsh
null
null
11/18/2011 18:35:15
off topic
Worth switching to zsh for casual use? === The default shell in Mac OS X is `bash`, which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed *more stuff*, though, and I've heard good things about `zsh` in this regard. But I don't really have the inclination to spend hours fiddling with settings to improve my command line usage by a tiny amount, since my life on the command line isn't that bad. (As I understand it, `bash` can also be configured to auto-complete more cleverly. It's the configuring I'm not all that keen on.) Will switching to `zsh`, even in a small number cases, make my life easier? Or is it only a better shell if you put in the time to learn *why* it's better? (Examples would be nice, too `:)` )
2
43,322
09/04/2008 08:04:45
2,095
08/20/2008 11:01:19
131
10
What's safe for a C++ plug-in system?
Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create plug-ins for a host application using a simple interface. Let's be practical, and leave the C++ standard, which is not very helpful in this respect, aside for a minute. If I want to write an app for Windows and Mac (and optionally Linux) that supports C++ plug-ins, and if I want to give plug-in authors a reasonably large choice of compilers (say less than 2 year old versions of Visual C++, GCC or Intel's C++ compiler), what features of C++ could I count on? Of course, I assume that plug-ins would be written for a specific platform. Off the top of my head, here are some C++ features I can think of, with what I think is the answer: - vtable layout, to use objects through abstract classes? (yes) - built-in types, pointers? (yes) - structs, unions? (yes) - exceptions? (no) - extern "C" functions? (yes) - stdcall non-extern "C" functions with built-in parameter types? (yes) - non-stdcall non-extern "C" functions with user-defined parameter types? (no) I would appreciate any experience you have in that area that you could share. If you know of any moderately successful app that has a C++ plug-in system, that's cool too. Carl
c++
plugins
compiler
plugin-development
abi
null
open
What's safe for a C++ plug-in system? === Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create plug-ins for a host application using a simple interface. Let's be practical, and leave the C++ standard, which is not very helpful in this respect, aside for a minute. If I want to write an app for Windows and Mac (and optionally Linux) that supports C++ plug-ins, and if I want to give plug-in authors a reasonably large choice of compilers (say less than 2 year old versions of Visual C++, GCC or Intel's C++ compiler), what features of C++ could I count on? Of course, I assume that plug-ins would be written for a specific platform. Off the top of my head, here are some C++ features I can think of, with what I think is the answer: - vtable layout, to use objects through abstract classes? (yes) - built-in types, pointers? (yes) - structs, unions? (yes) - exceptions? (no) - extern "C" functions? (yes) - stdcall non-extern "C" functions with built-in parameter types? (yes) - non-stdcall non-extern "C" functions with user-defined parameter types? (no) I would appreciate any experience you have in that area that you could share. If you know of any moderately successful app that has a C++ plug-in system, that's cool too. Carl
0
43,324
09/04/2008 08:08:40
2,527
08/22/2008 16:35:28
148
15
Can I put an ASP.Net session ID in a hidden form field?
I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow multiple files to be selected, etc. It's great, but it has the following documented limitation: > Because of a known Flash bug, the Uploader running in Firefox in Windows does not send the correct cookies with the upload; instead of sending Firefox cookies, it sends Internet Explorer’s cookies for the respective domain. As a workaround, we suggest either using a cookieless upload method or appending document.cookie to the upload request. So if a user is using Firefox, I can't rely on cookies to persist their session when they upload a file. I need their session because I need to know who they are! As a workaround, I'm using the Application object thusly: Guid UploadID = Guid.NewGuid(); Application.Add(Guid.ToString(), User); So I'm creating a unique ID and using it as a key to store the Page.User object in the Application scope. I include that ID as a variable in the POST when the file is uploaded. Then, in the handler that accepts the file upload, I grab the User object thusly: IPrincipal User = (IPrincipal)Application[Request.Form["uploadid"]]; So this actually works, but it has two glaring drawbacks: * if IIS, the app pool, or even just the application is restarted between the time the user visits the upload page, and actually uploads a file, their "uploadid" is deleted from application scope and the upload fails because I can't authenticate them. * If I ever scale to a web farm (possibly even a web garden) scenario, this will completely break. I might not be worried, except I do plan on scaling this app in the future. Does anyone have a better way? Is there a way for me to pass the actual ASP.Net session ID in a POST variable, then use that ID at the other end to retrieve the session?
asp.net
session
yui
null
null
null
open
Can I put an ASP.Net session ID in a hidden form field? === I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow multiple files to be selected, etc. It's great, but it has the following documented limitation: > Because of a known Flash bug, the Uploader running in Firefox in Windows does not send the correct cookies with the upload; instead of sending Firefox cookies, it sends Internet Explorer’s cookies for the respective domain. As a workaround, we suggest either using a cookieless upload method or appending document.cookie to the upload request. So if a user is using Firefox, I can't rely on cookies to persist their session when they upload a file. I need their session because I need to know who they are! As a workaround, I'm using the Application object thusly: Guid UploadID = Guid.NewGuid(); Application.Add(Guid.ToString(), User); So I'm creating a unique ID and using it as a key to store the Page.User object in the Application scope. I include that ID as a variable in the POST when the file is uploaded. Then, in the handler that accepts the file upload, I grab the User object thusly: IPrincipal User = (IPrincipal)Application[Request.Form["uploadid"]]; So this actually works, but it has two glaring drawbacks: * if IIS, the app pool, or even just the application is restarted between the time the user visits the upload page, and actually uploads a file, their "uploadid" is deleted from application scope and the upload fails because I can't authenticate them. * If I ever scale to a web farm (possibly even a web garden) scenario, this will completely break. I might not be worried, except I do plan on scaling this app in the future. Does anyone have a better way? Is there a way for me to pass the actual ASP.Net session ID in a POST variable, then use that ID at the other end to retrieve the session?
0
43,335
09/04/2008 08:24:40
3,122
08/26/2008 18:58:15
72
3
What's main differences between "new" ASP.NET MVC framework and typical Java Struts projects ?
I'm more a Java developer than a .Net guy but It seems to me that new Microsoft MVC's framework seems like typical combination of Java existing projects like : - Struts (for handling the MVC), - Hibernate (for object to SQL mapping, like LINQ), - and URL rewriting to handle pretty URLs (that's less common). Also, It seems to me very similar to Ruby On Rails stack (wich ActiveRecords and routes.rb for handling pretty URLs). What do you think ?
java
mvc
.net
struts
null
null
open
What's main differences between "new" ASP.NET MVC framework and typical Java Struts projects ? === I'm more a Java developer than a .Net guy but It seems to me that new Microsoft MVC's framework seems like typical combination of Java existing projects like : - Struts (for handling the MVC), - Hibernate (for object to SQL mapping, like LINQ), - and URL rewriting to handle pretty URLs (that's less common). Also, It seems to me very similar to Ruby On Rails stack (wich ActiveRecords and routes.rb for handling pretty URLs). What do you think ?
0
43,344
09/04/2008 08:31:21
184
08/03/2008 05:34:19
1,917
27
Is there some tool to visualize java class heirarchies and relations?
Here is my problem: I will provide the source code of my application as input and what I want as output is a visual representation of the relationship between classes, method calls etc. Is there some tool to do this?
java
null
null
null
null
null
open
Is there some tool to visualize java class heirarchies and relations? === Here is my problem: I will provide the source code of my application as input and what I want as output is a visual representation of the relationship between classes, method calls etc. Is there some tool to do this?
0
43,349
09/04/2008 08:35:16
3,122
08/26/2008 18:58:15
77
3
What are options available to get cron's results and how to set them up ?
I know that default cron's behavior is to send normal and error output to cron's owner local email box. Is there other ways to get theses results (for example to send it by email to a bunch of people, to store them somewhere, and so on) ?
linux
unix
batch
cron
null
null
open
What are options available to get cron's results and how to set them up ? === I know that default cron's behavior is to send normal and error output to cron's owner local email box. Is there other ways to get theses results (for example to send it by email to a bunch of people, to store them somewhere, and so on) ?
0
43,354
09/04/2008 08:41:43
2,098
08/20/2008 11:21:16
315
22
How do you reference a bitmap on the stage in actionscript?
How do you reference a bitmap on the stage in flash using actionscript 3? I have a bitmap on the stage in flash and at the end of the movie I would like to swap it out for the next in the sequence before the movie loops. in my library i have 3 images, exported for actionscript, with the class name img1/img2/img3. here is how my layers in flash are set out. layer 5 : mask2:MovieClip layer 4 : img2:Bitmap layer 3 : mask1:MovieClip layer 2 : img1:Bitmap layer 1 : background:Bitmap at the end of the movie I would like to swap img1 with img2, so the movie loops seamlessly, then ideally swap img2 (on layer 4) with img3 and so on until I get to the end of my images. but I can not find out how to reference the images that have already been put on the stage (in design time), any one have any idea of how to do this? The end movie will hopefully load images dynamically from the web server (I have the code for this bit) and display them as well as img1/img2/img3. Any help would be appreciated.
flash
actionscript-3
null
null
null
null
open
How do you reference a bitmap on the stage in actionscript? === How do you reference a bitmap on the stage in flash using actionscript 3? I have a bitmap on the stage in flash and at the end of the movie I would like to swap it out for the next in the sequence before the movie loops. in my library i have 3 images, exported for actionscript, with the class name img1/img2/img3. here is how my layers in flash are set out. layer 5 : mask2:MovieClip layer 4 : img2:Bitmap layer 3 : mask1:MovieClip layer 2 : img1:Bitmap layer 1 : background:Bitmap at the end of the movie I would like to swap img1 with img2, so the movie loops seamlessly, then ideally swap img2 (on layer 4) with img3 and so on until I get to the end of my images. but I can not find out how to reference the images that have already been put on the stage (in design time), any one have any idea of how to do this? The end movie will hopefully load images dynamically from the web server (I have the code for this bit) and display them as well as img1/img2/img3. Any help would be appreciated.
0
43,368
09/04/2008 08:53:58
4,462
09/03/2008 22:39:36
21
3
A python web application framework for tight DB/GUI coupling?
I'm a firm believer of the heretic thought of tight coupling between the backend and frontend: I want existing, implied knowledge about a backend to be automatically made use of when generating user interfaces. E.g., if a VARCHAR column has a maximum with of 20 characters, there GUIs should automatically constrain the user from typing more than 20 characters in a related form field. And I have strong antipathy to ORMs which want to define my database tables, or are based on some hack where every table needs to have extra numeric ID columns because of the ORM. I've looked a bit into Python database frameworks and I think I can conclude the SQLAlchemy fits best to my mentality. Now, I need to find a web application framework which fits naturally with SQLAlchemy (or an equivalent) and perhaps even with my appetite for coupling. With "web application framework", I mean products/project such as Pyhons, Django, TurboGears, web2py, etc. E.g., it should ideally be able to: <ul> <li><strong>automatically select a suitable form widget</strong> for data entering a given column if told to do so; e.g., if the column has a foreign key to a column with 10 different values, widget should display the 10 possible values as a dropdown</li> <li><strong>auto-generate javascript form validation code</strong> which gives the end-user quick error feedback if a string is entered into a field which is about to end up in an INTEGER column, etc</li> <li>auto-generate a <strong>calendar widget</strong> for data which will end up in a DATE column</li> <li><strong>hint NOT NULL constraints</strong> as javascript which complains about empty or whitespace-only data in a related input field</li> <li>generate javascript validation code which matches relevant (simple) <strong>CHECK-constraints</strong></li> <li>make it easy to <strong>avoid SQL injection</strong>, by using prepared statements and/or validation of externally derived data</li> <li>make it easy to <strong>avoid cross site scripting</strong> by automatically escape outgoing strings when appropriate</li> <li><strong>make use of constraint names</strong> to generate somewhat user friendly error messages in case a constrataint is violated</li> </ul> All this should happen dynamically, so table adjustments are automatically reflected on the frontend - probably with a caching mechanism, so that all the model introspection wouldn't kill performance. In other words, I don't want to repeat my model definition in an XML file (or alike) when it has already been carefully been defined in my database. Does such a framework exist for Python (or for any language, for that matter)? If not: Which of the several Python web application frameworks will be least in the way if I were to add parts of the above features myself?
python
sql
metadata
coupling
data-driven
null
open
A python web application framework for tight DB/GUI coupling? === I'm a firm believer of the heretic thought of tight coupling between the backend and frontend: I want existing, implied knowledge about a backend to be automatically made use of when generating user interfaces. E.g., if a VARCHAR column has a maximum with of 20 characters, there GUIs should automatically constrain the user from typing more than 20 characters in a related form field. And I have strong antipathy to ORMs which want to define my database tables, or are based on some hack where every table needs to have extra numeric ID columns because of the ORM. I've looked a bit into Python database frameworks and I think I can conclude the SQLAlchemy fits best to my mentality. Now, I need to find a web application framework which fits naturally with SQLAlchemy (or an equivalent) and perhaps even with my appetite for coupling. With "web application framework", I mean products/project such as Pyhons, Django, TurboGears, web2py, etc. E.g., it should ideally be able to: <ul> <li><strong>automatically select a suitable form widget</strong> for data entering a given column if told to do so; e.g., if the column has a foreign key to a column with 10 different values, widget should display the 10 possible values as a dropdown</li> <li><strong>auto-generate javascript form validation code</strong> which gives the end-user quick error feedback if a string is entered into a field which is about to end up in an INTEGER column, etc</li> <li>auto-generate a <strong>calendar widget</strong> for data which will end up in a DATE column</li> <li><strong>hint NOT NULL constraints</strong> as javascript which complains about empty or whitespace-only data in a related input field</li> <li>generate javascript validation code which matches relevant (simple) <strong>CHECK-constraints</strong></li> <li>make it easy to <strong>avoid SQL injection</strong>, by using prepared statements and/or validation of externally derived data</li> <li>make it easy to <strong>avoid cross site scripting</strong> by automatically escape outgoing strings when appropriate</li> <li><strong>make use of constraint names</strong> to generate somewhat user friendly error messages in case a constrataint is violated</li> </ul> All this should happen dynamically, so table adjustments are automatically reflected on the frontend - probably with a caching mechanism, so that all the model introspection wouldn't kill performance. In other words, I don't want to repeat my model definition in an XML file (or alike) when it has already been carefully been defined in my database. Does such a framework exist for Python (or for any language, for that matter)? If not: Which of the several Python web application frameworks will be least in the way if I were to add parts of the above features myself?
0
43,374
09/04/2008 08:59:31
4,342
09/02/2008 23:11:51
31
1
Is there a better way of writing a git pre-commit hook to check any php file in a commit for parse errors ?
What I have so far is #!/bin/sh php_syntax_check() { retval=0 for i in $(git-diff-index --name-only --cached HEAD -- | grep -e '\.php$'); do if [ -f $i ]; then output=$(php -l $i) retval=$? if [ $retval -gt 0 ]; then echo "==============================================================================" echo "Unstaging $i for the commit due to the follow parse errors" echo "$output" git reset -q HEAD $i fi fi done if [ $retval -gt 0 ]; then exit $retval fi } php_syntax_check
php
git
null
null
null
null
open
Is there a better way of writing a git pre-commit hook to check any php file in a commit for parse errors ? === What I have so far is #!/bin/sh php_syntax_check() { retval=0 for i in $(git-diff-index --name-only --cached HEAD -- | grep -e '\.php$'); do if [ -f $i ]; then output=$(php -l $i) retval=$? if [ $retval -gt 0 ]; then echo "==============================================================================" echo "Unstaging $i for the commit due to the follow parse errors" echo "$output" git reset -q HEAD $i fi fi done if [ $retval -gt 0 ]; then exit $retval fi } php_syntax_check
0
43,393
09/04/2008 09:21:26
230
08/03/2008 19:32:46
508
34
Best practices for querying with NHibernate
Iv come back to using NHibernate after using other technologies ([CSLA][1] and [Subsonic][2]) for a couple of years, and I'm finding the querying abit frustrating, especially when compared to Subsonic. I was wondering what other approaches people are using? The Hibernate Query Language doesn't feel right to me, seems to much like righting SQL, which to my mine is one of the reason to use an ORM tools so I don't have too, furthermore its all in XML, which means its poor for refactoring, and errors will only be discovered at runtime? Criteria Queries, don't seem fluid enough. Iv [read][3] that Ayende's [NHibernate Query Generator][4], is a useful tool, is this what people are using? What else is out there? [1]: http://www.lhotka.net/ [2]: http://subsonicproject.com/ [3]: http://jhollingworth.wordpress.com/2008/03/28/subsonic-like-nhibernate-query-generator-button-in-visual-studio/ [4]: http://www.ayende.com/projects/downloads/nhibernate-query-generator.aspx
orm
nhibernate
null
null
null
null
open
Best practices for querying with NHibernate === Iv come back to using NHibernate after using other technologies ([CSLA][1] and [Subsonic][2]) for a couple of years, and I'm finding the querying abit frustrating, especially when compared to Subsonic. I was wondering what other approaches people are using? The Hibernate Query Language doesn't feel right to me, seems to much like righting SQL, which to my mine is one of the reason to use an ORM tools so I don't have too, furthermore its all in XML, which means its poor for refactoring, and errors will only be discovered at runtime? Criteria Queries, don't seem fluid enough. Iv [read][3] that Ayende's [NHibernate Query Generator][4], is a useful tool, is this what people are using? What else is out there? [1]: http://www.lhotka.net/ [2]: http://subsonicproject.com/ [3]: http://jhollingworth.wordpress.com/2008/03/28/subsonic-like-nhibernate-query-generator-button-in-visual-studio/ [4]: http://www.ayende.com/projects/downloads/nhibernate-query-generator.aspx
0
43,400
09/04/2008 09:25:09
3,355
08/28/2008 07:36:57
254
15
Is there a standard HTML layout with multiple CSS styles available?
When it comes to web-design, I am horrible at producing anything remotely good looking. Thankfully there are a lot of free [sources][1] for [design][2] [templates][3]. However, a problem with these designs is that they just cover a single page, and not many use cases. If you take a look at [CSS Zen Gardens][4], they have 1 single HTML file, and can radically style it differently by just changing the CSS file. Now I am wondering if there is a standard HTML layout (tags and ids), that covers alot of use cases, and can be generically themed with different CSS files like Zen Garden. What I am imagining is a set of rules off how you write your html, and what boxes, lists, menus and styles you are supposed to use. A set of standard test pages covering the various uses can be created, and a new CSS file while have to support all the different pages in a nice view. Is there any projects that covers anything similar to what I am describing? [1]: http://www.mantisatemplates.com/web-templates.php [2]: http://www.freecsstemplates.org/ [3]: http://www.oswd.org/ [4]: http://www.csszengarden.com/
html
css
design
null
null
null
open
Is there a standard HTML layout with multiple CSS styles available? === When it comes to web-design, I am horrible at producing anything remotely good looking. Thankfully there are a lot of free [sources][1] for [design][2] [templates][3]. However, a problem with these designs is that they just cover a single page, and not many use cases. If you take a look at [CSS Zen Gardens][4], they have 1 single HTML file, and can radically style it differently by just changing the CSS file. Now I am wondering if there is a standard HTML layout (tags and ids), that covers alot of use cases, and can be generically themed with different CSS files like Zen Garden. What I am imagining is a set of rules off how you write your html, and what boxes, lists, menus and styles you are supposed to use. A set of standard test pages covering the various uses can be created, and a new CSS file while have to support all the different pages in a nice view. Is there any projects that covers anything similar to what I am describing? [1]: http://www.mantisatemplates.com/web-templates.php [2]: http://www.freecsstemplates.org/ [3]: http://www.oswd.org/ [4]: http://www.csszengarden.com/
0
43,422
09/04/2008 09:48:16
2,168
08/20/2008 17:46:48
864
34
Is there any way to see the progress of an ALTER TABLE statement in MySQL?
For example, I issued an ALTER TABLE statement to create an index on a MEDIUMTEXT field in an InnoDB table that has 134k rows where the size of the index was 255 bytes and the average size of the data in the field is 30k. This command has been running for the last 15 minutes or so (and is the only thing running on the database). Is there any way for me to determine if it is going to finish in closer to 5 minutes, 5 hours, or 5 days?
mysql
null
null
null
null
null
open
Is there any way to see the progress of an ALTER TABLE statement in MySQL? === For example, I issued an ALTER TABLE statement to create an index on a MEDIUMTEXT field in an InnoDB table that has 134k rows where the size of the index was 255 bytes and the average size of the data in the field is 30k. This command has been running for the last 15 minutes or so (and is the only thing running on the database). Is there any way for me to determine if it is going to finish in closer to 5 minutes, 5 hours, or 5 days?
0
43,427
09/04/2008 09:51:50
2,892
08/25/2008 19:39:36
11
0
How to set up a robot.txt which only allows the default page of a site
Say I have a site on http://website.com. I would really like allowing bots to see the home page, but any other page need to blocked as it is pointless to spider. In other words http://website.com & http://website.com/ should be allowed, but http://website.com/anything should be blocked. Further it would be great if I can allow certain query strings to passthrough to the home page: http://website.com?okparam=true but not http://website.com?anythingbutokparam=true Thanks! Boaz
robots.txt
webcrawler
null
null
null
null
open
How to set up a robot.txt which only allows the default page of a site === Say I have a site on http://website.com. I would really like allowing bots to see the home page, but any other page need to blocked as it is pointless to spider. In other words http://website.com & http://website.com/ should be allowed, but http://website.com/anything should be blocked. Further it would be great if I can allow certain query strings to passthrough to the home page: http://website.com?okparam=true but not http://website.com?anythingbutokparam=true Thanks! Boaz
0
43,455
09/04/2008 10:28:33
4,505
09/04/2008 10:28:33
1
0
How do I serialize a DOM to XML text, using JavaScript, in a cross browser way?
I have an XML object (loaded using XMLHTTPRequest's responseXML). I have modified the object (using jQuery) and would like to store it as text in a string. There is apparently a simple way to do it in Firefox et al: var xmlString = new XMLSerializer().serializeToString( doc ); (from [rosettacode][1] ) But how does one do it in **IE6 and other browsers** (without, of course, breaking Firefox)? [1]: http://www.rosettacode.org/w/index.php?title=DOM_XML_Serialization#JavaScript
javascript
xml
serialization
dom
null
null
open
How do I serialize a DOM to XML text, using JavaScript, in a cross browser way? === I have an XML object (loaded using XMLHTTPRequest's responseXML). I have modified the object (using jQuery) and would like to store it as text in a string. There is apparently a simple way to do it in Firefox et al: var xmlString = new XMLSerializer().serializeToString( doc ); (from [rosettacode][1] ) But how does one do it in **IE6 and other browsers** (without, of course, breaking Firefox)? [1]: http://www.rosettacode.org/w/index.php?title=DOM_XML_Serialization#JavaScript
0
43,459
09/04/2008 10:32:16
3,720
08/30/2008 10:00:40
278
16
Kerberos user authentication in Apache
can anybody recommend some really good resources for how to get Apache authenticating users with Kerberos. Background reading on Kerberos would also be useful Thanks Peter
apache
authentication
kerberos
null
null
null
open
Kerberos user authentication in Apache === can anybody recommend some really good resources for how to get Apache authenticating users with Kerberos. Background reading on Kerberos would also be useful Thanks Peter
0
43,466
09/04/2008 10:41:16
380
08/05/2008 10:39:18
2,283
180
What't the best solution for creating subsets of a set of characters?
I know 'best' is subjective, so according to you, what is the best solution for the following problem: Given a string of length n (say "abc"), generate all proper subsets of the string. So, for our example, the output would be {}, {a}, {b}, {c}, {ab}, {bc}, {ac}. {abc}. What do you think?
algorithm
problem-solving
null
null
null
null
open
What't the best solution for creating subsets of a set of characters? === I know 'best' is subjective, so according to you, what is the best solution for the following problem: Given a string of length n (say "abc"), generate all proper subsets of the string. So, for our example, the output would be {}, {a}, {b}, {c}, {ab}, {bc}, {ac}. {abc}. What do you think?
0
43,490
09/04/2008 11:03:04
4,495
09/04/2008 07:45:31
0
4
When is Control.DestroyHandle called?
When is this called? More specifically, I have a control I'm creating - how can I release handles when the window is closed. In normal win32 I'd do it during wm_close - is DestroyHandle the .net equivalent?
.net
winforms
null
null
null
null
open
When is Control.DestroyHandle called? === When is this called? More specifically, I have a control I'm creating - how can I release handles when the window is closed. In normal win32 I'd do it during wm_close - is DestroyHandle the .net equivalent?
0
43,500
09/04/2008 11:17:57
2,348
08/21/2008 19:00:04
35
4
Is there a built-in method to compare collections in C#?
I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary<string, object> and an IList<object>. Is there a built-in method to do this?
c#
.net
null
null
null
null
open
Is there a built-in method to compare collections in C#? === I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary<string, object> and an IList<object>. Is there a built-in method to do this?
0
43,503
09/04/2008 11:21:41
46
08/01/2008 13:13:21
780
38
is it possible to detect if a flash movie also contains (plays) sound?
Is there a way to detect if a flash movie contains any sound or is playing any music? It would be nice if this could be done inside a webbrowser (actionscript **from another flash object**, javascript,..) and could be done *before* the flash movie starts playing. However, I have my doubts this will be possible altogether, so any other (programmable) solution is also appreciated
flash
audio
null
null
null
null
open
is it possible to detect if a flash movie also contains (plays) sound? === Is there a way to detect if a flash movie contains any sound or is playing any music? It would be nice if this could be done inside a webbrowser (actionscript **from another flash object**, javascript,..) and could be done *before* the flash movie starts playing. However, I have my doubts this will be possible altogether, so any other (programmable) solution is also appreciated
0
43,504
09/04/2008 11:21:41
383
08/05/2008 10:46:37
2,543
236
SQL Server 2005 One-way Replication
In the business I work for we are discussion methods to reduce the read load on our primary database. One option that has been suggested is to have live one-way replication from our primary database to a slave database. Applications would then read from the slave database and write directly to the primary database. So... - Application Reads From Slave - Application Writes to Primary - Primary Updates Slave Automatically What are the major pros and cons for this method?
replication
sql-server
null
null
null
null
open
SQL Server 2005 One-way Replication === In the business I work for we are discussion methods to reduce the read load on our primary database. One option that has been suggested is to have live one-way replication from our primary database to a slave database. Applications would then read from the slave database and write directly to the primary database. So... - Application Reads From Slave - Application Writes to Primary - Primary Updates Slave Automatically What are the major pros and cons for this method?
0
43,507
09/04/2008 11:23:13
184
08/03/2008 05:34:19
1,932
28
How sophisticated should be my Ajax code?
I have seen simple example Ajax source codes in many online tutorials. What I want to know is whether using the source code in the examples are perfectly alright or not? Is there anything more to be added to the code that goes into a real world application? What all steps are to be taken to make the application more robust and secure? Here is a sample source code I got from the web: function getChats() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { return; } var url="getchat.php?latest="+latest; xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function GetXmlHttpObject() { var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; }
ajax
null
null
null
null
null
open
How sophisticated should be my Ajax code? === I have seen simple example Ajax source codes in many online tutorials. What I want to know is whether using the source code in the examples are perfectly alright or not? Is there anything more to be added to the code that goes into a real world application? What all steps are to be taken to make the application more robust and secure? Here is a sample source code I got from the web: function getChats() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { return; } var url="getchat.php?latest="+latest; xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function GetXmlHttpObject() { var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; }
0
43,509
09/04/2008 11:26:27
4,301
09/02/2008 18:34:26
71
10
What happened to to the .Net Framework Configuration tool?
Older versions of the .Net Framework used to install "Microsoft .NET Framework v1.0 / v1.1 / v2.0 Configuration" in the Control Panel, under Administrative Tools. I just noticed that there isn't a v3.0 or v3.5 version of this. Is this functionality now hiding somewhere else, or do I have to use the command-line tools instead?
.net
visual-studio
.net-3.5
null
null
null
open
What happened to to the .Net Framework Configuration tool? === Older versions of the .Net Framework used to install "Microsoft .NET Framework v1.0 / v1.1 / v2.0 Configuration" in the Control Panel, under Administrative Tools. I just noticed that there isn't a v3.0 or v3.5 version of this. Is this functionality now hiding somewhere else, or do I have to use the command-line tools instead?
0
43,511
09/04/2008 11:27:34
3,602
08/29/2008 09:40:56
1
1
Can I prevent an inherited virtual method from being overridden in subclasses?
I have some classes layed out like this class A { public virtual void Render() { } } class B : A { public override void Render() { // Prepare the object for rendering SpecialRender(); // Do some cleanup } protected virtual void SpecialRender() { } } class C : B { protected override void SpecialRender() { // Do some cool stuff } } Is it possible to prevent the C class from overriding the Render method, without breaking the following code? A obj = new C(); obj.Render(); // calls B.Render -> c.SpecialRender
c#
polymorphism
null
null
null
null
open
Can I prevent an inherited virtual method from being overridden in subclasses? === I have some classes layed out like this class A { public virtual void Render() { } } class B : A { public override void Render() { // Prepare the object for rendering SpecialRender(); // Do some cleanup } protected virtual void SpecialRender() { } } class C : B { protected override void SpecialRender() { // Do some cool stuff } } Is it possible to prevent the C class from overriding the Render method, without breaking the following code? A obj = new C(); obj.Render(); // calls B.Render -> c.SpecialRender
0
43,524
09/04/2008 11:34:10
3,233
08/27/2008 13:54:44
59
4
Why is Visual Studio 2005 so slow?
It is slow to load anything other than a small project. It is slow to quit; it can sometimes take minutes. It can be slow to open new files. The record macro feature used to be useful. It is now so slow to start up it's almost always quicker to do it manually!
visual-studio
visual-c++
microsoft
null
null
null
open
Why is Visual Studio 2005 so slow? === It is slow to load anything other than a small project. It is slow to quit; it can sometimes take minutes. It can be slow to open new files. The record macro feature used to be useful. It is now so slow to start up it's almost always quicker to do it manually!
0
43,525
09/04/2008 11:34:38
2,592
08/23/2008 12:32:00
67
4
Images not displaying in WebKit based browsers
For some strange, bizarre reason, my images in my website just will not display on webkit based languages (such as safari and chrome). This is the image tag `<img src="images/dukkah.jpg" class="imgleft"/>` Not only does it not display in the website, it wont display when accessed directly at `http://kilkin.massiveatom.com/kilkin/images/dukkah.jpg` ...Why?
html
null
null
null
null
null
open
Images not displaying in WebKit based browsers === For some strange, bizarre reason, my images in my website just will not display on webkit based languages (such as safari and chrome). This is the image tag `<img src="images/dukkah.jpg" class="imgleft"/>` Not only does it not display in the website, it wont display when accessed directly at `http://kilkin.massiveatom.com/kilkin/images/dukkah.jpg` ...Why?
0
43,533
09/04/2008 11:38:47
4,500
09/04/2008 09:26:22
1
2
Embedding flv (flash) player in windows forms
I'm trying to the the flv Flash player [from here][1] in a windows forms application. I currently have it playing 1 .flv file with no problems but I really need to be able to play multiple files. Has anyone had experienace of using the playlists that this control offers or is there a better way to do this? [1]: http://www.jeroenwijering.com/?item=JW_FLV_Player
c#
winforms
flash
flv
embeddedflashplayer
null
open
Embedding flv (flash) player in windows forms === I'm trying to the the flv Flash player [from here][1] in a windows forms application. I currently have it playing 1 .flv file with no problems but I really need to be able to play multiple files. Has anyone had experienace of using the playlists that this control offers or is there a better way to do this? [1]: http://www.jeroenwijering.com/?item=JW_FLV_Player
0
43,536
09/04/2008 11:39:39
428
08/05/2008 16:12:27
113
5
C# Dynamic Form Controls
Using C# 2.0 what is the best way to implement dynamic form controls? I need to provide a set of controls per data object, so should i just do it manually and lay them out while increment the top value or is there a better way?
c#
winforms
dynamicdata
null
null
null
open
C# Dynamic Form Controls === Using C# 2.0 what is the best way to implement dynamic form controls? I need to provide a set of controls per data object, so should i just do it manually and lay them out while increment the top value or is there a better way?
0
43,580
09/04/2008 12:07:27
2,260
08/21/2008 11:39:22
346
37
How to find the mime type of a file in python?
Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in the HTTP response. Based on that assumption, in addition to the bytes of the file, you also want to save the MIME type. How would you find the MIME type of a file? I'm currently on a Mac, but this should also work on Windows. Does the browser add this information when posting the file to the web page? Is there a neat python library for finding this information? A WebService or (even better) a downloadable database?
python
mime
null
null
null
null
open
How to find the mime type of a file in python? === Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in the HTTP response. Based on that assumption, in addition to the bytes of the file, you also want to save the MIME type. How would you find the MIME type of a file? I'm currently on a Mac, but this should also work on Windows. Does the browser add this information when posting the file to the web page? Is there a neat python library for finding this information? A WebService or (even better) a downloadable database?
0
43,584
09/04/2008 12:09:20
4,512
09/04/2008 12:08:34
1
0
"undefined handler" from prototype.js line 3877
A very niche problem: I sometimes (30% of the time) get an 'undefined handler' javascript error on line 3877 of the prototype.js library (version 1.6.0.2 from google: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js). Now on this page I have a Google Map and I use the Prototype Window library. The problem occurs in IE7 and FF3. This is the info FireBug gives:<br /> handler is undefined<br /> ? in prototype.js@3871()prototype.js (line 3877)<br /> handler.call(element, event);<br /> I switched to a local version of prototypejs and added some debugging in the offending method (createWraper) but the debugging never appears before the error... I googled around and found 1 other mention of the error on the same line, but no answer so I'm posting it here where maybe, some day someone will have an answer :).
javascript
prototype
googlemaps
prototypejs
null
null
open
"undefined handler" from prototype.js line 3877 === A very niche problem: I sometimes (30% of the time) get an 'undefined handler' javascript error on line 3877 of the prototype.js library (version 1.6.0.2 from google: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js). Now on this page I have a Google Map and I use the Prototype Window library. The problem occurs in IE7 and FF3. This is the info FireBug gives:<br /> handler is undefined<br /> ? in prototype.js@3871()prototype.js (line 3877)<br /> handler.call(element, event);<br /> I switched to a local version of prototypejs and added some debugging in the offending method (createWraper) but the debugging never appears before the error... I googled around and found 1 other mention of the error on the same line, but no answer so I'm posting it here where maybe, some day someone will have an answer :).
0
43,589
09/04/2008 12:12:45
572
08/06/2008 20:56:54
2,875
216
In PHP, is there an easy way to get the first and last date of a month?
I need to get the first and last day of a month in the format YYYY-MM-DD given only the month and year. Is there a good, easy way to do this?
php
null
null
null
null
null
open
In PHP, is there an easy way to get the first and last date of a month? === I need to get the first and last day of a month in the format YYYY-MM-DD given only the month and year. Is there a good, easy way to do this?
0
43,591
09/04/2008 12:14:13
2,361
08/21/2008 20:41:09
378
20
Override WebClientProtocol.Timeout via web.config
Is it possible to override default value of [WebClientProtocol.Timeout][1] property via web.config? [1]: http://msdn.microsoft.com/en-us/library/system.web.services.protocols.webclientprotocol.timeout.aspx
.net
configuration
null
null
null
null
open
Override WebClientProtocol.Timeout via web.config === Is it possible to override default value of [WebClientProtocol.Timeout][1] property via web.config? [1]: http://msdn.microsoft.com/en-us/library/system.web.services.protocols.webclientprotocol.timeout.aspx
0
43,596
09/04/2008 12:16:42
4,227
09/02/2008 13:08:22
35
2
How well does WPF blend with XNA in real life?
I understand that there are several ways to blend XNA and WPF within the same application. I find it enticing to use WPF for all GUI and HUD stuff in my XNA games. Does anyone have any practical experience on how well this approach works in real life using .NET 3.5 SP1 ? Any pitfalls (such as the ["airspace problem"][1])? Any hint on what appoach works best? [1]: http://blogs.msdn.com/nickkramer/archive/2005/07/14/438640.aspx
wpf
interop
xna
direct3d
null
null
open
How well does WPF blend with XNA in real life? === I understand that there are several ways to blend XNA and WPF within the same application. I find it enticing to use WPF for all GUI and HUD stuff in my XNA games. Does anyone have any practical experience on how well this approach works in real life using .NET 3.5 SP1 ? Any pitfalls (such as the ["airspace problem"][1])? Any hint on what appoach works best? [1]: http://blogs.msdn.com/nickkramer/archive/2005/07/14/438640.aspx
0
43,598
09/04/2008 12:17:10
2,984
08/26/2008 10:16:45
21
2
Suggestions for a good commit message: format/guideline ?
I'm at the beginning of a new project, and I'm trying to set up the repository in a smart fashion and establish some code style guidelines for everyone to be able to concentrate on code. Most of it is done, but I'm still unsure about the format I should enforce for commit messages. I'm all for freedom and just telling people to make them clear and thorough, but I've that it rarely works, people having very different notions of "clear" :). And so far, I've never found a satisfying scheme. What I most often do is: a one line summary of the commit, then bullet points describing each change in more detail. But often it's kind of hard to decide what deserves a bullet point and what doesn't, and some sort of classification, by features, or file or minor/major changes would seem appropriate. Sadly each time I try to do that, I end up writing stupidly long commit messages for trivial changes... So how do you do it?
version-control
commit-message
null
null
null
null
open
Suggestions for a good commit message: format/guideline ? === I'm at the beginning of a new project, and I'm trying to set up the repository in a smart fashion and establish some code style guidelines for everyone to be able to concentrate on code. Most of it is done, but I'm still unsure about the format I should enforce for commit messages. I'm all for freedom and just telling people to make them clear and thorough, but I've that it rarely works, people having very different notions of "clear" :). And so far, I've never found a satisfying scheme. What I most often do is: a one line summary of the commit, then bullet points describing each change in more detail. But often it's kind of hard to decide what deserves a bullet point and what doesn't, and some sort of classification, by features, or file or minor/major changes would seem appropriate. Sadly each time I try to do that, I end up writing stupidly long commit messages for trivial changes... So how do you do it?
0
43,632
09/04/2008 12:33:26
305
08/04/2008 14:04:19
1,473
99
Can you make just part of a regex case-insensitive?
I've seen lots of examples of making an entire regular expression case-insensitive. What I'm wondering about is having just part of the expression be case-insensitive. For example, let's say I have a string like this: fooFOOfOoFoOBARBARbarbarbAr What if I want to match all occurrences of "foo" regardless of case but I only want to match the upper-case "BAR"s? The ideal solution would be something that works across regex flavors but I'm interested in hearing language-specific ones as well (Thanks [Espo]([@Espo](http://stackoverflow.com/questions/43632/can-you-make-just-part-of-a-regex-case-insensitive#43636))
regex
null
null
null
null
null
open
Can you make just part of a regex case-insensitive? === I've seen lots of examples of making an entire regular expression case-insensitive. What I'm wondering about is having just part of the expression be case-insensitive. For example, let's say I have a string like this: fooFOOfOoFoOBARBARbarbarbAr What if I want to match all occurrences of "foo" regardless of case but I only want to match the upper-case "BAR"s? The ideal solution would be something that works across regex flavors but I'm interested in hearing language-specific ones as well (Thanks [Espo]([@Espo](http://stackoverflow.com/questions/43632/can-you-make-just-part-of-a-regex-case-insensitive#43636))
0
43,638
09/04/2008 12:37:04
1,695
08/18/2008 02:49:06
379
42
Is there a good WPF diagrammer / toolkit / provider ?
Basically we need a custom diagram component in our new WPF based application. **Needs** to show text/lines, linked 2D Nodes and custom images apart from the other diagramming features like Undo/Redo, Align, Group, etc.. ala Visio. The initial team did a bit of investigation and settled on the WinForms Northwoods GoDiagrams suite... a solution to embed it in our WPF application. Are there any equivalent WPF diagramming packages out there yet? Preferably tried ones. Thanks..
.net
wpf
diagram
null
null
null
open
Is there a good WPF diagrammer / toolkit / provider ? === Basically we need a custom diagram component in our new WPF based application. **Needs** to show text/lines, linked 2D Nodes and custom images apart from the other diagramming features like Undo/Redo, Align, Group, etc.. ala Visio. The initial team did a bit of investigation and settled on the WinForms Northwoods GoDiagrams suite... a solution to embed it in our WPF application. Are there any equivalent WPF diagramming packages out there yet? Preferably tried ones. Thanks..
0
43,639
09/04/2008 12:37:07
3,885
08/31/2008 16:43:36
1
1
What framework you recomend for fast secure web application development?
I need to choose a framework for a new project I will start from scratch. The application performance requirements are very low. It needs to allow fast development and enforce good development practices. The final application should be easy to deploy and handle well database migrations. The application will handle most of the time simple CRUD operations for a specific domain. It needs to be very secure. In the long term I will need to certify it's security. I have experience programming in PHP and now I am working as a Java developer. The language for the framework is not important as long as it meets the requirements stated above. Thanks in advance for your answers.
web
development
framework
intranet
null
06/08/2012 15:08:29
not constructive
What framework you recomend for fast secure web application development? === I need to choose a framework for a new project I will start from scratch. The application performance requirements are very low. It needs to allow fast development and enforce good development practices. The final application should be easy to deploy and handle well database migrations. The application will handle most of the time simple CRUD operations for a specific domain. It needs to be very secure. In the long term I will need to certify it's security. I have experience programming in PHP and now I am working as a Java developer. The language for the framework is not important as long as it meets the requirements stated above. Thanks in advance for your answers.
4
43,643
09/04/2008 12:37:58
4,013
09/01/2008 10:58:24
25
7
How do I style (css) radio buttons and labels?
Given the code bellow, how do I style the radio buttons to be next to the labels and style the label of the selected radio button differently than the other labels? <div class="input radio"> <fieldset> <legend>What color is the sky?</legend> <input type="hidden" name="data[Submit][question]" value="" id="SubmitQuestion" /> <input type="radio" name="data[Submit][question]" id="SubmitQuestion1" value="1" /> <label for="SubmitQuestion1">A strange radient green.</label> <input type="radio" name="data[Submit][question]" id="SubmitQuestion2" value="2" /> <label for="SubmitQuestion2">A dark gloomy orange</label> <input type="radio" name="data[Submit][question]" id="SubmitQuestion3" value="3" /> <label for="SubmitQuestion3">A perfect glittering blue</label> </fieldset> </div>
html
css
style
radio-button
null
null
open
How do I style (css) radio buttons and labels? === Given the code bellow, how do I style the radio buttons to be next to the labels and style the label of the selected radio button differently than the other labels? <div class="input radio"> <fieldset> <legend>What color is the sky?</legend> <input type="hidden" name="data[Submit][question]" value="" id="SubmitQuestion" /> <input type="radio" name="data[Submit][question]" id="SubmitQuestion1" value="1" /> <label for="SubmitQuestion1">A strange radient green.</label> <input type="radio" name="data[Submit][question]" id="SubmitQuestion2" value="2" /> <label for="SubmitQuestion2">A dark gloomy orange</label> <input type="radio" name="data[Submit][question]" id="SubmitQuestion3" value="3" /> <label for="SubmitQuestion3">A perfect glittering blue</label> </fieldset> </div>
0
43,644
09/04/2008 12:38:30
115
08/02/2008 05:44:40
665
93
Can I update/select from a table in one query?
I need to select data when a page is viewed and update the 'views' column is there a way to do this in one query, or do I have to use to distinct queries?
mysql
null
null
null
null
null
open
Can I update/select from a table in one query? === I need to select data when a page is viewed and update the 'views' column is there a way to do this in one query, or do I have to use to distinct queries?
0
43,649
09/04/2008 12:38:51
4,513
09/04/2008 12:30:30
1
0
How to get involved in an open source project
What's the best way to get involved in an open source project? There are several projects I'd be interested in, and others I'd be happy to look into if just to keep my skills sharp in languages I don't currently use on a day to day basis. However, I'm not sure how to get started.
project
opensource
involved
null
null
07/16/2012 12:14:03
off topic
How to get involved in an open source project === What's the best way to get involved in an open source project? There are several projects I'd be interested in, and others I'd be happy to look into if just to keep my skills sharp in languages I don't currently use on a day to day basis. However, I'm not sure how to get started.
2
43,662
09/04/2008 12:43:51
4,227
09/02/2008 13:08:22
35
2
Getting started with modern software arcitecure and design using a book
I am a rather oldschool developer with some basic knowledge of software design principles and a good background on classic (gof) design patterns. While I continue my life as such I see lots of strange buzzwords emerge: Aspectoriented Design, Componentoriented Design, Domain Driven Design, Domain Specific Languages, Serviceoriented (SOA) Design, Test Driven Design, Extreme Programming, Agile Development, Continuous Integration, Dependency Injection, Software Factories ... Is there good book around that I can take with me on a roadtrip while it is taking me on a trip through all (most) of the above, delivering an 10,000 foot view on modern software archiceture and desing principles and approaches.
architecture
design
null
null
null
11/22/2011 16:40:27
not constructive
Getting started with modern software arcitecure and design using a book === I am a rather oldschool developer with some basic knowledge of software design principles and a good background on classic (gof) design patterns. While I continue my life as such I see lots of strange buzzwords emerge: Aspectoriented Design, Componentoriented Design, Domain Driven Design, Domain Specific Languages, Serviceoriented (SOA) Design, Test Driven Design, Extreme Programming, Agile Development, Continuous Integration, Dependency Injection, Software Factories ... Is there good book around that I can take with me on a roadtrip while it is taking me on a trip through all (most) of the above, delivering an 10,000 foot view on modern software archiceture and desing principles and approaches.
4
43,672
09/04/2008 12:47:39
184
08/03/2008 05:34:19
1,957
31
What all types of executables can be decompiled?
I think that java executables (jar files) are trivial to decompile and get the source code. What about other languages? .net and all? Which all languages can compile only to a decompile-able code?
decompiling
null
null
null
null
null
open
What all types of executables can be decompiled? === I think that java executables (jar files) are trivial to decompile and get the source code. What about other languages? .net and all? Which all languages can compile only to a decompile-able code?
0
43,709
09/04/2008 13:00:13
2,239
08/21/2008 06:42:29
1
0
Pros and Cons of different approaches to web programming in Python
I'd like to do some server-side scripting using Python. But I'm kind of lost with the number of ways to do that. It starts with the do-it-yourself CGI approach and it seems to end with some pretty robust frameworks that would basically do all the job themselves. And a huge lot of stuff in between, like [web.py](http://webpy.org/), [Pyroxide](http://pyroxide.org/) and [Django](http://wiki.python.org/moin/Django). * What are the **pros** and **cons** of the frameworks or approaches that *you've worked on*? * What **trade-offs** are there? * For **what kind of projects** they do well and for what they don't?
python
html
cgi
null
null
null
open
Pros and Cons of different approaches to web programming in Python === I'd like to do some server-side scripting using Python. But I'm kind of lost with the number of ways to do that. It starts with the do-it-yourself CGI approach and it seems to end with some pretty robust frameworks that would basically do all the job themselves. And a huge lot of stuff in between, like [web.py](http://webpy.org/), [Pyroxide](http://pyroxide.org/) and [Django](http://wiki.python.org/moin/Django). * What are the **pros** and **cons** of the frameworks or approaches that *you've worked on*? * What **trade-offs** are there? * For **what kind of projects** they do well and for what they don't?
0
43,711
09/04/2008 13:02:12
1,404
08/15/2008 11:06:47
1
3
What's a good way to overwrite DateTime.Now during testing?
I've got some (C#) code that relies on today's date to correctly calculate things in the future. If I use today's date in the testing, I have to repeat the calculation in the test, which doesn't feel right. What's the best way to set the date to a known value within the test so that I can test that the result is a known value?
c#
unit-testing
testing
null
null
null
open
What's a good way to overwrite DateTime.Now during testing? === I've got some (C#) code that relies on today's date to correctly calculate things in the future. If I use today's date in the testing, I have to repeat the calculation in the test, which doesn't feel right. What's the best way to set the date to a known value within the test so that I can test that the result is a known value?
0
43,713
09/04/2008 13:03:54
3,885
08/31/2008 16:43:36
16
3
What fo you think about eiffel programming language?
I think it's a very carefully designed language. I like the programming concepts it promotes. After the [first touch][1] I was very impressed. I was wondering if there are any job ads for this language. The license price is a bit prohibitive so I think there are very few small companies that will choose it. Have you worked on large projects involving Eiffel? What kind of path should I follow if I plan to apply in the future for job involving Eiffel? [1]: http://dev.spartancoder.com/?q=node/65
programming-languages
null
null
null
null
08/29/2011 02:13:13
not constructive
What fo you think about eiffel programming language? === I think it's a very carefully designed language. I like the programming concepts it promotes. After the [first touch][1] I was very impressed. I was wondering if there are any job ads for this language. The license price is a bit prohibitive so I think there are very few small companies that will choose it. Have you worked on large projects involving Eiffel? What kind of path should I follow if I plan to apply in the future for job involving Eiffel? [1]: http://dev.spartancoder.com/?q=node/65
4
43,738
09/04/2008 13:18:16
976
08/11/2008 10:53:45
1
0
DefaultValue for System.Drawing.SystemColors
I have a line color property in my custom grid control. I want it to default to Drawing.SystemColors.InactiveBorder. I tried: [DefaultValue(typeof(System.Drawing.SystemColors), "InactiveBorder")] public Color LineColor { get; set; } But it doesn't seem to work. How do I do that with the default value attribute?
c#
usercontrols
.net
null
null
null
open
DefaultValue for System.Drawing.SystemColors === I have a line color property in my custom grid control. I want it to default to Drawing.SystemColors.InactiveBorder. I tried: [DefaultValue(typeof(System.Drawing.SystemColors), "InactiveBorder")] public Color LineColor { get; set; } But it doesn't seem to work. How do I do that with the default value attribute?
0
43,742
09/04/2008 13:19:58
1,801
08/18/2008 16:01:48
81
16
SQL Profiler on SQL Server 2005 Professional Edition
I want to use SQL Profiler to trace the queries executed agains my database, track performance, etc. However it seems that the SQL Profiler is only available in the Enterprise edition of SQL Server 2005. Is this the case indeed, and can I do something about it?
sql
sql-server
sql2005
null
null
null
open
SQL Profiler on SQL Server 2005 Professional Edition === I want to use SQL Profiler to trace the queries executed agains my database, track performance, etc. However it seems that the SQL Profiler is only available in the Enterprise edition of SQL Server 2005. Is this the case indeed, and can I do something about it?
0
43,743
09/04/2008 13:20:03
383
08/05/2008 10:46:37
2,571
241
ASP.NET MVC Performance
I found some wild remarks that ASP.NET MVC is 30x faster than ASP.NET WebForms. What real performance difference is there, has this been measured and what are the performance benefits. This is to help me consider moving to ASP.NET MVC.
asp.net
mvc
null
null
null
null
open
ASP.NET MVC Performance === I found some wild remarks that ASP.NET MVC is 30x faster than ASP.NET WebForms. What real performance difference is there, has this been measured and what are the performance benefits. This is to help me consider moving to ASP.NET MVC.
0
43,764
09/04/2008 13:31:53
2,878
08/25/2008 17:36:28
1
1
MS Access Reporting - can it be pretty?
I am working on a project converting a "spreadsheet application" to a database solution. A macro was written that takes screen shots of each page and pastes them into a PowerPoint presentation. Because of the nice formatting options in Excel, the presentation looks very pretty. The problem I'm having is that I haven't ever seen an Access report that would be pretty enough to display to upper management. I think the output still has to be a PowerPoint presentation. It needs to look as close as possible to the original output. I am currently trying to write some code to use a .pot (presentation template) and fill in the data programmatically. Putting the data into a PowerPoint table has been tricky because the tables are not easy to manipulate. For example, if a particular description is too long, I need to break into the next cell down (word-wrap isn't allowed because I can only have *n* lines per page). Is there a way to make an Access report pretty, am I headed down the right path, or should I just try to programmatically fill in the Excel spreadsheet and use the code that already exists there to produce the presentation? (I'd still need to figure out how to know when to break a line when using a non-monospaced font, as the users are currently doing that manually when they enter the data in the spreadsheet)
excel
ms-access
reporting
powerpoint
null
null
open
MS Access Reporting - can it be pretty? === I am working on a project converting a "spreadsheet application" to a database solution. A macro was written that takes screen shots of each page and pastes them into a PowerPoint presentation. Because of the nice formatting options in Excel, the presentation looks very pretty. The problem I'm having is that I haven't ever seen an Access report that would be pretty enough to display to upper management. I think the output still has to be a PowerPoint presentation. It needs to look as close as possible to the original output. I am currently trying to write some code to use a .pot (presentation template) and fill in the data programmatically. Putting the data into a PowerPoint table has been tricky because the tables are not easy to manipulate. For example, if a particular description is too long, I need to break into the next cell down (word-wrap isn't allowed because I can only have *n* lines per page). Is there a way to make an Access report pretty, am I headed down the right path, or should I just try to programmatically fill in the Excel spreadsheet and use the code that already exists there to produce the presentation? (I'd still need to figure out how to know when to break a line when using a non-monospaced font, as the users are currently doing that manually when they enter the data in the spreadsheet)
0
43,765
09/04/2008 13:31:57
3,279
08/27/2008 16:46:21
188
12
Pin Emacs buffers to windows (for cscope)
For my day job, I live in Emacs. Utterly. I also have become pretty dependent on CScope to help me find things in the code. Normally, I have 2 windows in a split (C-x 3): ![alt text][1] And I use the right window for code buffers and the left window for the CScope search buffer. When you do a CScope search and select a result, it automatically updates the right-side window to show the buffer referred to by the result. This is all well and good, except that it causes me to lose my place in some other buffer that I was studying. Sometimes this is no biggie, because [C-s u] gets me back to where I was. What would be better, though, is to have 3 split windows like this ([C-x 2] in the left window): ![alt text][2] And have the bottom left window contain the CScope search buffer, and the top left window be the only buffer that CScope ever updates. That way, I can see my CScope searches and navigate around the code without losing the buffer I'm focused on. Anyone know how I can do that? [1]: http://bitthicket.com/files/emacs-2split.JPG [2]: http://bitthicket.com/files/emacs-3split.jpg
emacs
null
null
null
null
null
open
Pin Emacs buffers to windows (for cscope) === For my day job, I live in Emacs. Utterly. I also have become pretty dependent on CScope to help me find things in the code. Normally, I have 2 windows in a split (C-x 3): ![alt text][1] And I use the right window for code buffers and the left window for the CScope search buffer. When you do a CScope search and select a result, it automatically updates the right-side window to show the buffer referred to by the result. This is all well and good, except that it causes me to lose my place in some other buffer that I was studying. Sometimes this is no biggie, because [C-s u] gets me back to where I was. What would be better, though, is to have 3 split windows like this ([C-x 2] in the left window): ![alt text][2] And have the bottom left window contain the CScope search buffer, and the top left window be the only buffer that CScope ever updates. That way, I can see my CScope searches and navigate around the code without losing the buffer I'm focused on. Anyone know how I can do that? [1]: http://bitthicket.com/files/emacs-2split.JPG [2]: http://bitthicket.com/files/emacs-3split.jpg
0
43,766
09/04/2008 13:32:05
4,231
09/02/2008 13:21:16
83
5
VS.Net 2005 required on Build box with .Net 2.0 C++ Projects?
We have a build box that uses CruiseControl.Net and has been building VB.Net and C# projects using msbuild. All I have installed on the box as far as .Net is concerned is .Net 2.0 SDK (I'm trying to keep the box as clean as possible). We are now trying to get a C++ app building on this box. The problem we are running into is that the header files (e.g. windows.h) are not installed with the SDK. Do I have to install VS 2005 to get this to work?
msbuild
build-automation
cruisecontrol.net
c++
null
null
open
VS.Net 2005 required on Build box with .Net 2.0 C++ Projects? === We have a build box that uses CruiseControl.Net and has been building VB.Net and C# projects using msbuild. All I have installed on the box as far as .Net is concerned is .Net 2.0 SDK (I'm trying to keep the box as clean as possible). We are now trying to get a C++ app building on this box. The problem we are running into is that the header files (e.g. windows.h) are not installed with the SDK. Do I have to install VS 2005 to get this to work?
0
43,768
09/04/2008 13:32:36
93
08/01/2008 18:23:58
324
11
WPF control performance
What is a good (and preferably simple) way to test the rendering performance of WPF custom controls? I have several complex controls in which rendering performance is highly crucial. I want to be able to make sure that I can have lots of them drawwing out in a designer with a minimal impact on performance.
.net
wpf
performance
unit-testing
testing
null
open
WPF control performance === What is a good (and preferably simple) way to test the rendering performance of WPF custom controls? I have several complex controls in which rendering performance is highly crucial. I want to be able to make sure that I can have lots of them drawwing out in a designer with a minimal impact on performance.
0
43,775
09/04/2008 13:36:46
1,876
08/19/2008 02:26:08
40
5
Modulus operation with negatives values - weird thing ??
Can you please tell me how much is (-2) % 5 ? According to my pyhton interpreter is 3, but do you have a wise explanation for this ? I've read that in some languages the result can be machine-dependent, but I'm not sure though. Thanks for your help.
python
modulo
null
null
null
null
open
Modulus operation with negatives values - weird thing ?? === Can you please tell me how much is (-2) % 5 ? According to my pyhton interpreter is 3, but do you have a wise explanation for this ? I've read that in some languages the result can be machine-dependent, but I'm not sure though. Thanks for your help.
0
43,777
09/04/2008 13:39:15
4,142
09/02/2008 02:02:27
88
4
'method' vs. 'message' vs. 'function' vs. '???'
I recently asked a question about what I called "method calls". The answer referred to "messages". As a self-taught hobby programmer trying to phrase questions that don't make me look like an idiot, I'm realizing that the terminology that I use reveals a lot about how I learned to program. Is there a distinction between the various terms for methods/messages/etc. in OO programming? Is this a difference that comes from different programming languages using different terminology to describe similar concepts? I seem to remember that in pre-OO languages, a distinction would sometimes be made between "subroutines" and "functions" based on whether a return value was expected, but even then, was this a language-by-language distinction?
language-agnostic
terminology
null
null
null
null
open
'method' vs. 'message' vs. 'function' vs. '???' === I recently asked a question about what I called "method calls". The answer referred to "messages". As a self-taught hobby programmer trying to phrase questions that don't make me look like an idiot, I'm realizing that the terminology that I use reveals a lot about how I learned to program. Is there a distinction between the various terms for methods/messages/etc. in OO programming? Is this a difference that comes from different programming languages using different terminology to describe similar concepts? I seem to remember that in pre-OO languages, a distinction would sometimes be made between "subroutines" and "functions" based on whether a return value was expected, but even then, was this a language-by-language distinction?
0
43,778
09/04/2008 13:40:19
1,944
08/19/2008 14:49:14
325
15
SQLite-ruby gem: Failed to build gem native extension
On Windows, when I do this: gem install sqlite3-ruby I get the following error: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby --platform Win32 checking for fdatasync() in rt.lib... no checking for sqlite3.h... no nmake 'nmake' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out **Same thing happens with the hpricot gem**. I seem to remember these gems installed just fine on < 1.0 gems, but now I'm on 1.2.0, things have gone screwy. I have also tried this: gem install sqlite3-ruby --platform Win32 Needless to say, this doesn't work either (same error) Does anyone know what is going on here and how to fix this?
ruby
gem
windows
null
null
null
open
SQLite-ruby gem: Failed to build gem native extension === On Windows, when I do this: gem install sqlite3-ruby I get the following error: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby --platform Win32 checking for fdatasync() in rt.lib... no checking for sqlite3.h... no nmake 'nmake' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out **Same thing happens with the hpricot gem**. I seem to remember these gems installed just fine on < 1.0 gems, but now I'm on 1.2.0, things have gone screwy. I have also tried this: gem install sqlite3-ruby --platform Win32 Needless to say, this doesn't work either (same error) Does anyone know what is going on here and how to fix this?
0
43,802
09/04/2008 13:54:17
2,628
08/23/2008 18:34:26
290
7
How do You Build a Date or Calendar Object From a String in Java?
I have a string representation of a date that I need to create an object from. I've looked through Date and Calendar API but haven't found anything that can do this other than creating my own ugly parse method. I know there must be a way, does anyone know of a solution?
java
dates
null
null
null
null
open
How do You Build a Date or Calendar Object From a String in Java? === I have a string representation of a date that I need to create an object from. I've looked through Date and Calendar API but haven't found anything that can do this other than creating my own ugly parse method. I know there must be a way, does anyone know of a solution?
0
43,803
09/04/2008 13:54:43
83
08/01/2008 16:31:56
1,115
81
How do I best populate an HTML table in ASP.NET?
This is what I've got. It works. But, is there a simpler or better way? ASPX Page&hellip; <asp:Repeater ID="RepeaterBooks" runat="server"> <HeaderTemplate> <table class="report"> <tr> <th>Published</th> <th>Title</th> <th>Author</th> <th>Price</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Literal ID="LiteralPublished" runat="server" /></td> <td><asp:Literal ID="LiteralTitle" runat="server" /></td> <td><asp:Literal ID="LiteralAuthor" runat="server" /></td> <td><asp:Literal ID="LiteralPrice" runat="server" /></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> ASPX.VB Code Behind&hellip; Protected Sub Page_Load( ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim db As New BookstoreDataContext RepeaterBooks.DataSource = From b In db.Books _ Order By b.Published _ Select b RepeaterBooks.DataBind() End Sub Sub RepeaterBooks_ItemDataBound( ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles RepeaterBooks.ItemDataBound If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then Dim b As Book = DirectCast(e.Item.DataItem, Book) DirectCast(e.Item.FindControl("LiteralPublished"), Literal).Text = "<nobr>" + b.Published.ToShortDateString + "</nobr>" DirectCast(e.Item.FindControl("LiteralTitle"), Literal).Text = "<nobr>" + TryNbsp(HttpContext.Current.Server.HtmlEncode(b.Title)) + "</nobr>" DirectCast(e.Item.FindControl("LiteralAuthor"), Literal).Text = "<nobr>" + TryNbsp(HttpContext.Current.Server.HtmlEncode(b.Author)) + "</nobr>" DirectCast(e.Item.FindControl("LiteralPrice"), Literal).Text = "<nobr>" + TryNbsp(HttpContext.Current.Server.HtmlEncode(b.Price)) + "</nobr>" End If End Sub Function TryNbsp(ByVal s As String) As String If s = "" Then Return "&nbsp;" Else Return s End If End Function
asp.net
vb.net
html
null
null
null
open
How do I best populate an HTML table in ASP.NET? === This is what I've got. It works. But, is there a simpler or better way? ASPX Page&hellip; <asp:Repeater ID="RepeaterBooks" runat="server"> <HeaderTemplate> <table class="report"> <tr> <th>Published</th> <th>Title</th> <th>Author</th> <th>Price</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:Literal ID="LiteralPublished" runat="server" /></td> <td><asp:Literal ID="LiteralTitle" runat="server" /></td> <td><asp:Literal ID="LiteralAuthor" runat="server" /></td> <td><asp:Literal ID="LiteralPrice" runat="server" /></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> ASPX.VB Code Behind&hellip; Protected Sub Page_Load( ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim db As New BookstoreDataContext RepeaterBooks.DataSource = From b In db.Books _ Order By b.Published _ Select b RepeaterBooks.DataBind() End Sub Sub RepeaterBooks_ItemDataBound( ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles RepeaterBooks.ItemDataBound If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then Dim b As Book = DirectCast(e.Item.DataItem, Book) DirectCast(e.Item.FindControl("LiteralPublished"), Literal).Text = "<nobr>" + b.Published.ToShortDateString + "</nobr>" DirectCast(e.Item.FindControl("LiteralTitle"), Literal).Text = "<nobr>" + TryNbsp(HttpContext.Current.Server.HtmlEncode(b.Title)) + "</nobr>" DirectCast(e.Item.FindControl("LiteralAuthor"), Literal).Text = "<nobr>" + TryNbsp(HttpContext.Current.Server.HtmlEncode(b.Author)) + "</nobr>" DirectCast(e.Item.FindControl("LiteralPrice"), Literal).Text = "<nobr>" + TryNbsp(HttpContext.Current.Server.HtmlEncode(b.Price)) + "</nobr>" End If End Sub Function TryNbsp(ByVal s As String) As String If s = "" Then Return "&nbsp;" Else Return s End If End Function
0
43,805
09/04/2008 13:54:48
1,196
08/13/2008 12:33:04
1,571
114
Example of c# based rule language?
Can you provide a good example of rule definition language written in C#. Java guys have [JESS][1], is there anything good for C#? [1]: http://herzberg.ca.sandia.gov/
rule-language
null
null
null
null
null
open
Example of c# based rule language? === Can you provide a good example of rule definition language written in C#. Java guys have [JESS][1], is there anything good for C#? [1]: http://herzberg.ca.sandia.gov/
0
43,808
09/04/2008 13:56:45
686
08/07/2008 19:26:04
13
2
How to prefetch Oracle sequence ID-s in a distributed environment
I have a distributed Java application running on 5 application servers. The servers all use the same Oracle 9i database running on a 6th machine. The application need to prefetch a batch of 100 IDs from a sequence. It's relatively easy to do in a single-threaded, non-distributed environment, you can just issue these queries: select seq.nextval from dual; alter sequence seq increment by 100; select seq.nextval from dual; The first select fetches the first sequence ID that the application can use, the second select returns the last one that can be used. Things get way more interesting in a multithreaded environment. You can't be sure that before the second select another thread doesn't increase the sequence by 100 again. This issue can be solved by synchronizing the access on the Java side - you only let one thread begin fetching the IDs at one time. The situation becomes really hard when you can't synchronize because parts of the application doesn't run on the same JVM, not even on the same physical machine. I found some references on forums that others have problems with solving this problem too, but none of the answers are really working not to mention being reasonable. Can the community provide a solution for this problem? Some more information: - I can't really play with the transaction isolation levels. I use JPA and the change would affect the entire application, not only the prefetching queries and that's not acceptable for me. - On PostgreSQL I could do the following: select setval('seq', nextval('seq') + n - 1 )
java
oracle
null
null
null
null
open
How to prefetch Oracle sequence ID-s in a distributed environment === I have a distributed Java application running on 5 application servers. The servers all use the same Oracle 9i database running on a 6th machine. The application need to prefetch a batch of 100 IDs from a sequence. It's relatively easy to do in a single-threaded, non-distributed environment, you can just issue these queries: select seq.nextval from dual; alter sequence seq increment by 100; select seq.nextval from dual; The first select fetches the first sequence ID that the application can use, the second select returns the last one that can be used. Things get way more interesting in a multithreaded environment. You can't be sure that before the second select another thread doesn't increase the sequence by 100 again. This issue can be solved by synchronizing the access on the Java side - you only let one thread begin fetching the IDs at one time. The situation becomes really hard when you can't synchronize because parts of the application doesn't run on the same JVM, not even on the same physical machine. I found some references on forums that others have problems with solving this problem too, but none of the answers are really working not to mention being reasonable. Can the community provide a solution for this problem? Some more information: - I can't really play with the transaction isolation levels. I use JPA and the change would affect the entire application, not only the prefetching queries and that's not acceptable for me. - On PostgreSQL I could do the following: select setval('seq', nextval('seq') + n - 1 )
0
43,809
09/04/2008 13:57:15
1,310
08/14/2008 13:42:16
543
28
Which jstl url should I reference in my jsps?
I'm getting the following error when trying to run a jsp. I'm using Tomcat 6.0.18, and I'd like to use the latest version of jstl. What version of jstl should I use, and which URL goes with which version of jstl? I'm getting this error "According to TLD or attribute directive in tag file, attribute key does not accept any expressions" <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> I'll just say I had this working, but I want to switch the jstl jar file that has the tld files in the jar file. (instead of having to deploy them somewhere in the web application and define the references in web.xml).
java
jsp
web-applications
jstl
null
null
open
Which jstl url should I reference in my jsps? === I'm getting the following error when trying to run a jsp. I'm using Tomcat 6.0.18, and I'd like to use the latest version of jstl. What version of jstl should I use, and which URL goes with which version of jstl? I'm getting this error "According to TLD or attribute directive in tag file, attribute key does not accept any expressions" <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> I'll just say I had this working, but I want to switch the jstl jar file that has the tld files in the jar file. (instead of having to deploy them somewhere in the web application and define the references in web.xml).
0
43,811
09/04/2008 13:57:25
3,757
08/30/2008 15:17:20
96
5
jQuery slicing and click events
This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so... I have a list of checkboxes, and I can get them with the selector `'input[type=checkbox]'`. I want the user to be able to shift-click and select a range of checkboxes. To accomplish this, I need to get the index of a checkbox in the list, so I can pass that index to `.slice(start, end)`. How do I get the index when the user clicks a box?
jquery
null
null
null
null
null
open
jQuery slicing and click events === This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so... I have a list of checkboxes, and I can get them with the selector `'input[type=checkbox]'`. I want the user to be able to shift-click and select a range of checkboxes. To accomplish this, I need to get the index of a checkbox in the list, so I can pass that index to `.slice(start, end)`. How do I get the index when the user clicks a box?
0
43,815
09/04/2008 13:58:19
4,109
09/01/2008 20:11:02
11
1
How do I get my 2008 Team Build to be triggered by developer check in's
I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service. I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not cause a build to trigger despite the option to build every check in being ticked on the build definition. The source tree is configured is a pretty straight forward manner with code either under a *Main* folder or under a *Branch\branchName* folder. Each branch of code (including main) has a standard Team Build definition relating to the solution file contained within. The only thing that is slightly changed from default settings is that the build server working folder; i.e. for main this is *Server:"$\main" Local:"c:\build\main"* due to path length. The only thing I've been able to guess at (possible red herring) is that there might be some oddity with the developer workspaces. Currently each developer maps Server:"$\" to local:"c:\tfs\" so that there is only one workspace for all branches. This is mainly to avoid re-mapping problems that some of the developers had previously gotten themselves into. But I can't see how this would affect CI. Any help appreciated.
tfs
msbuild
visual-studio-team-system
build-automation
null
null
open
How do I get my 2008 Team Build to be triggered by developer check in's === I have a Team Foundation Server 2008 Installation and a separate machine with the Team Build service. I can create team builds and trigger them manually in Visual Studio or via the command line (where they complete successfully). However check ins to the source tree do not cause a build to trigger despite the option to build every check in being ticked on the build definition. The source tree is configured is a pretty straight forward manner with code either under a *Main* folder or under a *Branch\branchName* folder. Each branch of code (including main) has a standard Team Build definition relating to the solution file contained within. The only thing that is slightly changed from default settings is that the build server working folder; i.e. for main this is *Server:"$\main" Local:"c:\build\main"* due to path length. The only thing I've been able to guess at (possible red herring) is that there might be some oddity with the developer workspaces. Currently each developer maps Server:"$\" to local:"c:\tfs\" so that there is only one workspace for all branches. This is mainly to avoid re-mapping problems that some of the developers had previously gotten themselves into. But I can't see how this would affect CI. Any help appreciated.
0
43,819
09/04/2008 14:04:10
2,469
08/22/2008 12:41:47
352
32
Oracle equivalent to MSSQL DateDiff
We are now using NHibernate to connect to different database base on where our software is installed. So I am porting many SQL Procedures to Oracle. MSSQL has a nice function called DateDiff which takes a date part, startdate and enddate. Date parts examples are day, week, month, year, etc. . . What is the Oracle equivalent? I have not found one do I have to create my own version of it?
oracle
date
sql
psql
mssql
null
open
Oracle equivalent to MSSQL DateDiff === We are now using NHibernate to connect to different database base on where our software is installed. So I am porting many SQL Procedures to Oracle. MSSQL has a nice function called DateDiff which takes a date part, startdate and enddate. Date parts examples are day, week, month, year, etc. . . What is the Oracle equivalent? I have not found one do I have to create my own version of it?
0
43,823
09/04/2008 14:06:57
1,078
08/12/2008 10:39:00
305
15
How well will WCF scale to a large number of client users?
Does anyone have any experience with how well services build with Microsoft's WCF will scale to a large number of users? The level I'm thinking of is in the region of 1000+ client users connecting to a collection of services providing the business logic for our application, and these talking to a database, in something akin to a traditional 3-tier architecture. Are there any particular gotchas that have slowed down performance, or any design lessons learnt that have enabled this level of scalability?
wcf
scalability
soa
null
null
null
open
How well will WCF scale to a large number of client users? === Does anyone have any experience with how well services build with Microsoft's WCF will scale to a large number of users? The level I'm thinking of is in the region of 1000+ client users connecting to a collection of services providing the business logic for our application, and these talking to a database, in something akin to a traditional 3-tier architecture. Are there any particular gotchas that have slowed down performance, or any design lessons learnt that have enabled this level of scalability?
0
43,832
09/04/2008 14:11:26
1,185
08/13/2008 12:02:03
989
68
PLS-00306 error on call to cursor
I'm fairly new to Oracle triggers and PL/SQL still, but I think I might be missing something here. Here is the relevant part of the trigger, CURSOR columnNames (inTableName IN VARCHAR2) IS SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = inTableName; /* Removed for brevity */ OPEN columnNames('TEMP'); And here is the error message that I'm getting back, <pre> 27/20 PLS-00306: wrong number or types of arguments in call to 'COLUMNNAMES' 27/2 PL/SQL: Statement ignored </pre> If I am understanding the documentation correctly, that should work, but since it is not I must be doing something wrong. Any ideas?
oracle
plsql
triggers
cursors
null
null
open
PLS-00306 error on call to cursor === I'm fairly new to Oracle triggers and PL/SQL still, but I think I might be missing something here. Here is the relevant part of the trigger, CURSOR columnNames (inTableName IN VARCHAR2) IS SELECT COLUMN_NAME FROM USER_TAB_COLUMNS WHERE TABLE_NAME = inTableName; /* Removed for brevity */ OPEN columnNames('TEMP'); And here is the error message that I'm getting back, <pre> 27/20 PLS-00306: wrong number or types of arguments in call to 'COLUMNNAMES' 27/2 PL/SQL: Statement ignored </pre> If I am understanding the documentation correctly, that should work, but since it is not I must be doing something wrong. Any ideas?
0
43,842
09/04/2008 14:15:26
2,628
08/23/2008 18:34:26
305
7
How Would You Create a Pattern from a Date that is Stored in a String?
I have a string that contains the representation of a date. It looks like: **Thu Nov 30 19:00:00 EST 2006** I'm trying to create a Date object using SimpleDateFormat and have 2 problems. 1.) I can't figure out the pattern to hard-code the solution into the SimpleDateFormat constructor 2.) I can't find a way I could parse the string using API to determine the pattern so I could reuse this for different patterns of date output If anyone knows a solution using API or a custom solution I would greatly appreciate it.
java
date
null
null
null
null
open
How Would You Create a Pattern from a Date that is Stored in a String? === I have a string that contains the representation of a date. It looks like: **Thu Nov 30 19:00:00 EST 2006** I'm trying to create a Date object using SimpleDateFormat and have 2 problems. 1.) I can't figure out the pattern to hard-code the solution into the SimpleDateFormat constructor 2.) I can't find a way I could parse the string using API to determine the pattern so I could reuse this for different patterns of date output If anyone knows a solution using API or a custom solution I would greatly appreciate it.
0
43,856
09/04/2008 14:22:02
3,379
08/28/2008 10:27:56
45
3
What web control library to use for easy form creation with many different types of input fields?
I'm about to create a web application that requires a lot of different web forms where the user needs to be able to input a lot of different types of information. What I mean is that one of those forms may require some text input fields, some integer input fields, some decimal input fields, some date input fields, some datetime input fields, etc. I would like to have a, maybe JavaScript-based, control library that I can simple provide with some text labels, input types and default values. The control library would then somehow render the form in HTML without me having to create an HTML table, select the appropriate standard web controls and all that. I have used [dhtmlxGrid][1] to create quite a lot of tables and that works well for me. What I need now is something that can help me in a similar way when creating something like card forms. I have also found [ActiveWidgets][2], but it looks like it will require a lot of work on my behalf. I'm not only looking for individual web controls, but rather something like a library that can help me with the overall card. I'm guessing many of you have had this problem before. Looking forward to hearing what solutions you have found to be the best. BTW: I'm working in VisualStudio with ASP.NET. [1]: http://www.dhtmlx.com/ [2]: http://www.activewidgets.com/
c#
asp.net
visual-studio
usercontrols
null
null
open
What web control library to use for easy form creation with many different types of input fields? === I'm about to create a web application that requires a lot of different web forms where the user needs to be able to input a lot of different types of information. What I mean is that one of those forms may require some text input fields, some integer input fields, some decimal input fields, some date input fields, some datetime input fields, etc. I would like to have a, maybe JavaScript-based, control library that I can simple provide with some text labels, input types and default values. The control library would then somehow render the form in HTML without me having to create an HTML table, select the appropriate standard web controls and all that. I have used [dhtmlxGrid][1] to create quite a lot of tables and that works well for me. What I need now is something that can help me in a similar way when creating something like card forms. I have also found [ActiveWidgets][2], but it looks like it will require a lot of work on my behalf. I'm not only looking for individual web controls, but rather something like a library that can help me with the overall card. I'm guessing many of you have had this problem before. Looking forward to hearing what solutions you have found to be the best. BTW: I'm working in VisualStudio with ASP.NET. [1]: http://www.dhtmlx.com/ [2]: http://www.activewidgets.com/
0
43,866
09/04/2008 14:26:06
4,052
09/01/2008 14:36:26
1
8
How SID is different from Service name in Oracle tnsnames.ora
Why do I need two of them? When I have to use one or another?
oracle
db
administration
null
null
null
open
How SID is different from Service name in Oracle tnsnames.ora === Why do I need two of them? When I have to use one or another?
0
43,870
09/04/2008 14:27:16
4,045
09/01/2008 14:14:53
21
1
How to concatenate strings of a string field in a PostgreSQL 'group by' query?
I am going to answer my own question because I just found the answer, but thought it still worth posting here. I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table: ID COMPANY_ID EMPLOYEE 1 1 Anna 2 1 Bill 3 2 Carol 4 2 Dave and I wanted to group by company_id to get something like: COMPANY_ID EMPLOYEE 1 Anna, Bill 2 Carol, Dave
postgresql
null
null
null
null
null
open
How to concatenate strings of a string field in a PostgreSQL 'group by' query? === I am going to answer my own question because I just found the answer, but thought it still worth posting here. I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table: ID COMPANY_ID EMPLOYEE 1 1 Anna 2 1 Bill 3 2 Carol 4 2 Dave and I wanted to group by company_id to get something like: COMPANY_ID EMPLOYEE 1 Anna, Bill 2 Carol, Dave
0
43,874
09/04/2008 14:30:06
1,980
08/19/2008 16:40:39
1
0
Restrict selection of SELECT option without disabling the field
I have a multiple selection SELECT field which I don't want the end user to be able to change the value of. For UI reasons, I would like to be able to do this without using the disabled="true" attribute. I've tried using onmousedown, onfocus, onclick and setting each to blur or return false but with no success. Can this be done or am I trying to do the impossible?
html
select
null
null
null
null
open
Restrict selection of SELECT option without disabling the field === I have a multiple selection SELECT field which I don't want the end user to be able to change the value of. For UI reasons, I would like to be able to do this without using the disabled="true" attribute. I've tried using onmousedown, onfocus, onclick and setting each to blur or return false but with no success. Can this be done or am I trying to do the impossible?
0
43,877
09/04/2008 14:30:52
1,172
08/13/2008 10:10:51
31
1
Managing web services in FlexBuilder - How does the manager work?
In FlexBuilder 3, there are two items under the 'Data' menu to import and manage web services. After importing a webservice, I can update it with the manage option. However, the webservices seems to disappear after they are imported. The manager does however recognize that a certain WSDL URL was imported and refuses to do anything with it. How does the manager know this, and how can I make it refresh a certain WSDL URL?
web-services
flex
flexbuilder
null
null
null
open
Managing web services in FlexBuilder - How does the manager work? === In FlexBuilder 3, there are two items under the 'Data' menu to import and manage web services. After importing a webservice, I can update it with the manage option. However, the webservices seems to disappear after they are imported. The manager does however recognize that a certain WSDL URL was imported and refuses to do anything with it. How does the manager know this, and how can I make it refresh a certain WSDL URL?
0
43,890
09/04/2008 14:35:14
1,820
08/18/2008 18:06:03
1,065
47
Crop MP3 to first 30 seconds (PHP or Linux)
I want to be able to generate a new (fully valid) MP3 file from an existing MP3 file to be used as a preview -- try-before-you-buy style. The new file should only contain the first *n* seconds of the track. I need to write this in PHP, but it would be ok to shell out to a linux executable. There is a good library [getid3][1] for PHP, but at first glance, it appears to only have the ability to manipulate the tags. I could be wrong; documentation is somewhat lacking for this lib. Now, I know I could just "chop the stream" at *n* seconds (calculating from the bitrate and header size) when delivering the file, but this is a bit dirty and a real PITA on a VBR track. I'd like to be able to generate a proper MP3 file. Anyone any ideas? [1]: http://getid3.sourceforge.net/
php
linux
mp3
id3
null
null
open
Crop MP3 to first 30 seconds (PHP or Linux) === I want to be able to generate a new (fully valid) MP3 file from an existing MP3 file to be used as a preview -- try-before-you-buy style. The new file should only contain the first *n* seconds of the track. I need to write this in PHP, but it would be ok to shell out to a linux executable. There is a good library [getid3][1] for PHP, but at first glance, it appears to only have the ability to manipulate the tags. I could be wrong; documentation is somewhat lacking for this lib. Now, I know I could just "chop the stream" at *n* seconds (calculating from the bitrate and header size) when delivering the file, but this is a bit dirty and a real PITA on a VBR track. I'd like to be able to generate a proper MP3 file. Anyone any ideas? [1]: http://getid3.sourceforge.net/
0
43,903
09/04/2008 14:41:09
2,184
08/20/2008 20:01:42
1
0
SQL Server 2005 Temporary Tables
In a stored procedure, when is #Temptable created in SQL Server 2005? When creating the query execution plan or when executing the stored procedure? if (@x = 1) begin select 1 as Text into #Temptable end else begin select 2 as Text into #Temptable end
sql-server
temporarytables
null
null
null
null
open
SQL Server 2005 Temporary Tables === In a stored procedure, when is #Temptable created in SQL Server 2005? When creating the query execution plan or when executing the stored procedure? if (@x = 1) begin select 1 as Text into #Temptable end else begin select 2 as Text into #Temptable end
0
43,908
09/04/2008 14:43:18
4,177
09/02/2008 09:02:28
71
14
Resources for building a Visual Studio plug-in?
I'd like to build a pretty simple plug-in for Visual Studio, but I don't really know how this has to be done. Is this doable in (non-managed) C++? I'd like to know what resources you'd recommend me... Thanks.
visual-studio
plugin-development
null
null
null
07/27/2012 10:20:04
not constructive
Resources for building a Visual Studio plug-in? === I'd like to build a pretty simple plug-in for Visual Studio, but I don't really know how this has to be done. Is this doable in (non-managed) C++? I'd like to know what resources you'd recommend me... Thanks.
4
43,926
09/04/2008 14:53:14
2,268
08/21/2008 12:28:19
11
2
jQuery: Can you select by CSS rule, not class?
A .container can contain many .components, and .components themselves can contain .containers (which in turn can contain .components etc. etc.) Given code like this: $(".container .component").each(function() { $(".container", this).css('border', '1px solid #f00'); }); What do I need to add to the line within the braces to select only the nested .containers that have their width in CSS set to 'auto'? I'm sure it's something simple, but I haven't really used jQuery all that much.
jquery
selector
javascript
null
null
null
open
jQuery: Can you select by CSS rule, not class? === A .container can contain many .components, and .components themselves can contain .containers (which in turn can contain .components etc. etc.) Given code like this: $(".container .component").each(function() { $(".container", this).css('border', '1px solid #f00'); }); What do I need to add to the line within the braces to select only the nested .containers that have their width in CSS set to 'auto'? I'm sure it's something simple, but I haven't really used jQuery all that much.
0
43,939
09/04/2008 15:00:35
4,301
09/02/2008 18:34:26
93
14
Targeting multiple versions of .net framework
Suppose I have some code that would, in theory, compile against *any* version of the .net framework. Think "Hello World", if you like. If I actually compile the code, though, I'll get an executable that runs against one *particular* version. Is there any way to arrange things so that the compiled exe will just run against whatever version it finds? I strongly suspect that the answer is no, but I'd be happy to be proven wrong...
.net
null
null
null
null
null
open
Targeting multiple versions of .net framework === Suppose I have some code that would, in theory, compile against *any* version of the .net framework. Think "Hello World", if you like. If I actually compile the code, though, I'll get an executable that runs against one *particular* version. Is there any way to arrange things so that the compiled exe will just run against whatever version it finds? I strongly suspect that the answer is no, but I'd be happy to be proven wrong...
0
43,940
09/04/2008 15:01:44
191
08/03/2008 09:55:26
116
3
Custom Aggregate Functions in MS SQL Server?
How can I create a custom aggregate function in MS SQL Server? An example would help a lot.
sql-server
database
mssql
null
null
null
open
Custom Aggregate Functions in MS SQL Server? === How can I create a custom aggregate function in MS SQL Server? An example would help a lot.
0
43,947
09/04/2008 15:03:33
2,977
08/26/2008 09:57:30
56
6
What is the best way of adding in regularly used blocks of code when marking up in Textmate?
Caveat - I'm relatively new to coding as well as Textmate, so apologies if there is an obvious answer I'm missing here. I do a lot of html/css markup, there are certain patterns that I use a lot, for example, forms, navigation menus etc. What I would like is a way to store those patterns and insert them quickly when I need them. Is there a way to do this using Textmate?
html
markup
textmate
designpatterns
null
null
open
What is the best way of adding in regularly used blocks of code when marking up in Textmate? === Caveat - I'm relatively new to coding as well as Textmate, so apologies if there is an obvious answer I'm missing here. I do a lot of html/css markup, there are certain patterns that I use a lot, for example, forms, navigation menus etc. What I would like is a way to store those patterns and insert them quickly when I need them. Is there a way to do this using Textmate?
0
43,955
09/04/2008 15:06:01
2,241
08/21/2008 07:15:26
31
4
Changing the default title of confirm() in javascript
Is it possible to modify the title of the message box the confirm() function opens in javascript? I could create a modal popup box, but I would like to do this as minimalistic as possible. I would like to do something like this: confirm("This is the content of the message box", "Modified title"); The default title in IE is "Windows internet explorer" and in Firefox it's "[Javascript-program]." Not very informative. Though I can understand from a browser security stand point that you shouldn't be able to do this.
javascript
null
null
null
null
null
open
Changing the default title of confirm() in javascript === Is it possible to modify the title of the message box the confirm() function opens in javascript? I could create a modal popup box, but I would like to do this as minimalistic as possible. I would like to do something like this: confirm("This is the content of the message box", "Modified title"); The default title in IE is "Windows internet explorer" and in Firefox it's "[Javascript-program]." Not very informative. Though I can understand from a browser security stand point that you shouldn't be able to do this.
0
43,960
09/04/2008 15:07:30
3,262
08/27/2008 15:30:29
97
6
COTS Workshop Registration System
Does anyone have any experience with any COTS systems for managing workshops and the associated registrations, courses, communications, etc.? We have a home-built Perl system that is about 8 years old and is currently embedded as an iframe in a SharePoint portal site (externally facing). Needless to say, it isn't integrated into our site well, looks like crap, needs an overhaul, lacks features, etc. It would be nice to find either a product we can install or a service that provides those features. Thanks!
apps
cots
null
null
null
null
open
COTS Workshop Registration System === Does anyone have any experience with any COTS systems for managing workshops and the associated registrations, courses, communications, etc.? We have a home-built Perl system that is about 8 years old and is currently embedded as an iframe in a SharePoint portal site (externally facing). Needless to say, it isn't integrated into our site well, looks like crap, needs an overhaul, lacks features, etc. It would be nice to find either a product we can install or a service that provides those features. Thanks!
0
43,970
09/04/2008 15:10:13
1,694
08/18/2008 02:45:22
906
33
Configuring sendmail behind a firewall
I'm setting up a server which is on a network behind a firewall and I want programs on this computer to be able to use sendmail to send emails to any email address. We have an SMTP server running on this network (let's call it mailrelay.example.com) which is how we're supposed to get outgoing emails through the firewall. So how do I configure sendmail to send all mail through mailrelay.example.com? Googling hasn't given me the answer yet, and has only revealed that sendmail configuration is extremely complex and annoying.
configuration
firewall
sendmail
null
null
null
open
Configuring sendmail behind a firewall === I'm setting up a server which is on a network behind a firewall and I want programs on this computer to be able to use sendmail to send emails to any email address. We have an SMTP server running on this network (let's call it mailrelay.example.com) which is how we're supposed to get outgoing emails through the firewall. So how do I configure sendmail to send all mail through mailrelay.example.com? Googling hasn't given me the answer yet, and has only revealed that sendmail configuration is extremely complex and annoying.
0
43,971
09/04/2008 15:10:22
3,043
08/26/2008 13:24:14
932
101
Dynamic robots.txt
Let's say I have a web site for hosting community generated content that targets a very specific set of users. Now, let's say in the interest of fostering a better community I have an off-topic area where community members can post or talk about anything they want, regardless of the site's main theme. Now, I _want_ most of the content to get indexed by Google. The notable exception is the off-topic content. Each thread has it's own page, but all the threads are listed in the same folder so I can just exclude search engines from a folder somewhere. It has to be per-page. A traditional robots.txt file would get huge, so how else could I accomplish this?
seo
null
null
null
null
null
open
Dynamic robots.txt === Let's say I have a web site for hosting community generated content that targets a very specific set of users. Now, let's say in the interest of fostering a better community I have an off-topic area where community members can post or talk about anything they want, regardless of the site's main theme. Now, I _want_ most of the content to get indexed by Google. The notable exception is the off-topic content. Each thread has it's own page, but all the threads are listed in the same folder so I can just exclude search engines from a folder somewhere. It has to be per-page. A traditional robots.txt file would get huge, so how else could I accomplish this?
0
43,975
09/04/2008 15:11:16
3,885
08/31/2008 16:43:36
41
4
Can you recommend good UML tutorials ?
I know I could search for this on the internet but the signal to noise ratio is too low. Have you found or know about any good tutorials on UML? I would really like to find something that explains UML modeling from a practical point of view. Also a complete application example would be very helpful. Thanks.
documentation
tutorials
uml
null
null
null
open
Can you recommend good UML tutorials ? === I know I could search for this on the internet but the signal to noise ratio is too low. Have you found or know about any good tutorials on UML? I would really like to find something that explains UML modeling from a practical point of view. Also a complete application example would be very helpful. Thanks.
0
43,992
09/04/2008 15:15:24
744
08/08/2008 13:43:38
176
3
Is it unsafe to allow users to embed any flash file (swf)?
I want to allow my users to embed their own Flash animations in their posts. Usually the actual file is hosted on some free image hosting site. I wouldn't actually load the flash unless the user clicked a button to play (so that nothing auto-plays on page load). I know people can make some really annoying crap in flash, but I can't find any information about potential *serious* damage a flash app could cause. **Is it unsafe to embed just any flash file from the internets? If so, how can I let users embed innocent animations but still keep out the harmful apps?**
security
flash
embed
null
null
null
open
Is it unsafe to allow users to embed any flash file (swf)? === I want to allow my users to embed their own Flash animations in their posts. Usually the actual file is hosted on some free image hosting site. I wouldn't actually load the flash unless the user clicked a button to play (so that nothing auto-plays on page load). I know people can make some really annoying crap in flash, but I can't find any information about potential *serious* damage a flash app could cause. **Is it unsafe to embed just any flash file from the internets? If so, how can I let users embed innocent animations but still keep out the harmful apps?**
0
43,995
09/04/2008 15:16:36
4,003
09/01/2008 09:32:58
11
4
Why is branching and merging easier in Mercurial than in Subversion?
Handling multiple merges onto branches in Subversion or CVS is just one of those things that has to be experienced. It is inordinately easier to keep track of branches and merges in Mercurial (and probably any other distributed system) but I don't know why. Does anyone else know?
git
version-control
mercurial
subversion
null
null
open
Why is branching and merging easier in Mercurial than in Subversion? === Handling multiple merges onto branches in Subversion or CVS is just one of those things that has to be experienced. It is inordinately easier to keep track of branches and merges in Mercurial (and probably any other distributed system) but I don't know why. Does anyone else know?
0
44,005
09/04/2008 15:21:44
1,809
08/18/2008 17:04:41
21
5
Propagation of Oracle Transactions Between C++ and Java
We have an existing C++ application that we are going to gradually replace with a new Java-based system. Until we have completely reimplemented everything in Java we expect the C++ and Java to have to communicate with each other (RMI, SOAP, messaging, etc - we haven't decided). Now my manager thinks we'll need the Java and C++ sides to participate in the same Oracle DB transaction. This is related to, but different from the usual distrbuted transaction problem of having a single process co-ordinate 2 transactional resources, such as a DB and a message queue. I think propagating a transaction across processes is a terrible idea from a performance and stability point-of-view, but I am still going to be asked for a solution. I am familiar with XA transactions and I've done some work with the JBoss Transaction Manager, but my googling hasn't turned up anything good on propagating an XA transaction between 2 processes. We are using Spring on the Java side and their documentation explicitly states they do not provide any help with transaction propagation. We are not planning on using a traditional JEE server (for example: IBM Websphere), which may have support for propagation (not that I can find any definitive documentation). Any help or pointers on solutions is greatly appreciated.
java
oracle
transactions
jta
jts
null
open
Propagation of Oracle Transactions Between C++ and Java === We have an existing C++ application that we are going to gradually replace with a new Java-based system. Until we have completely reimplemented everything in Java we expect the C++ and Java to have to communicate with each other (RMI, SOAP, messaging, etc - we haven't decided). Now my manager thinks we'll need the Java and C++ sides to participate in the same Oracle DB transaction. This is related to, but different from the usual distrbuted transaction problem of having a single process co-ordinate 2 transactional resources, such as a DB and a message queue. I think propagating a transaction across processes is a terrible idea from a performance and stability point-of-view, but I am still going to be asked for a solution. I am familiar with XA transactions and I've done some work with the JBoss Transaction Manager, but my googling hasn't turned up anything good on propagating an XA transaction between 2 processes. We are using Spring on the Java side and their documentation explicitly states they do not provide any help with transaction propagation. We are not planning on using a traditional JEE server (for example: IBM Websphere), which may have support for propagation (not that I can find any definitive documentation). Any help or pointers on solutions is greatly appreciated.
0