question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
70,724
72,835
Packaging up Tomcat
In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6. Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating...
We use Ant Installer to deploy our application, app server and install it as a service. We embed Java Service Wrapper in the installer to install the Windows service.
Packaging up Tomcat In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6. Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm no...
TITLE: Packaging up Tomcat QUESTION: In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6. Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your a...
[ "java", "web-applications", "tomcat" ]
1
0
984
5
0
2008-09-16T09:30:18.200000
2008-09-16T14:22:11.120000
70,728
70,754
How do you keep search engines from indexing text ads?
Is there any way to keep search engines from indexing text ads? These are basically stylized links. I have thought about generating images with text or using javascript to write them into a DIV. What is the best and most accepted way?
One way is to use iFrames to show the ads, and use meta tags in them to tell Google not to index them. Another way would be to use JavaScript to print the ads, so they would not be there when the browser does not support JavaScript (Google Bot doesn't execute JavaScript). A lot of ad systems use the JavaScript one, but...
How do you keep search engines from indexing text ads? Is there any way to keep search engines from indexing text ads? These are basically stylized links. I have thought about generating images with text or using javascript to write them into a DIV. What is the best and most accepted way?
TITLE: How do you keep search engines from indexing text ads? QUESTION: Is there any way to keep search engines from indexing text ads? These are basically stylized links. I have thought about generating images with text or using javascript to write them into a DIV. What is the best and most accepted way? ANSWER: One...
[ "search-engine", "ads" ]
1
3
166
1
0
2008-09-16T09:31:13.860000
2008-09-16T09:36:29.323000
70,732
70,962
Implements several interfaces with conflict in signatures
Lasty, I tried to implements an hybrid structure in Java, something that looks like: public class MapOfSet > implements Set, Map > Where HasKey is the following interface: public interface HasKey { public K getKey(); } Unfortunately, there are some conflicts between methos signature of the Set interface and the Map int...
Perhaps you could add more information which operations do you really want. I guess you want to create a set which automatically groups their elements by a key, right? The question is which operations do you want to be able to have? How are elements added to the Set? Can elements be deleted by removing them from a grou...
Implements several interfaces with conflict in signatures Lasty, I tried to implements an hybrid structure in Java, something that looks like: public class MapOfSet > implements Set, Map > Where HasKey is the following interface: public interface HasKey { public K getKey(); } Unfortunately, there are some conflicts bet...
TITLE: Implements several interfaces with conflict in signatures QUESTION: Lasty, I tried to implements an hybrid structure in Java, something that looks like: public class MapOfSet > implements Set, Map > Where HasKey is the following interface: public interface HasKey { public K getKey(); } Unfortunately, there are ...
[ "java", "collections" ]
3
1
659
3
0
2008-09-16T09:32:02.597000
2008-09-16T10:16:11.677000
70,742
71,141
How do I list Oracle Apps profile options in PL/SQL?
I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time. Is there a snippet of code which will list profile options and at what level and who they are applied to...
You'll want to query APPLSYS.FND_PROFILE_OPTIONS and FND_PROFILE_OPTION_VALUES. For a comprehensive script that you can pick up the SQL from, look here: http://tipsnscripts.com/?p=16
How do I list Oracle Apps profile options in PL/SQL? I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time. Is there a snippet of code which will list profile ...
TITLE: How do I list Oracle Apps profile options in PL/SQL? QUESTION: I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time. Is there a snippet of code which ...
[ "c#", "oracle", "configuration" ]
0
1
15,498
4
0
2008-09-16T09:34:03.870000
2008-09-16T10:48:30.400000
70,753
71,063
Open-source radix/mtrie implementation in C?
I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. Is there a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself?
There is a radix-tree implementation available under the GNU General Public License version 2, or (at your option) any later version: http://www.gelato.unsw.edu.au/lxr/source/lib/radix-tree.c
Open-source radix/mtrie implementation in C? I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. Is there a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself?
TITLE: Open-source radix/mtrie implementation in C? QUESTION: I intend to use RADIX / MTRIE as my preferred data-structure for a routing implementation. Is there a decent open source implementation available (apart from freebsd-net) which I can use for my purpose, or do I need to write one myself? ANSWER: There is a ...
[ "c", "algorithm", "data-structures" ]
2
1
1,752
2
0
2008-09-16T09:36:28.513000
2008-09-16T10:32:48.003000
70,755
70,831
Do you use the Inductive User Interface pattern in Windows Forms?
And if you do, can you give some background information on the implementation and the reasons for implementing this pattern? The pattern is described in more detail in these articles: Microsoft Inductive User Interface Guidelines IUIs and Web-Style Navigation in Windows Forms, Part 1 & Part 2
Yes - we had a problem in that many of the administrators of our software found it too difficult to use. To solve this we used Microsoft's WinForms IUI framework build a new configuration and management tool for our software. User feedback has been extremely positive, particularly with everything being task driven - i....
Do you use the Inductive User Interface pattern in Windows Forms? And if you do, can you give some background information on the implementation and the reasons for implementing this pattern? The pattern is described in more detail in these articles: Microsoft Inductive User Interface Guidelines IUIs and Web-Style Navig...
TITLE: Do you use the Inductive User Interface pattern in Windows Forms? QUESTION: And if you do, can you give some background information on the implementation and the reasons for implementing this pattern? The pattern is described in more detail in these articles: Microsoft Inductive User Interface Guidelines IUIs a...
[ ".net", "winforms", "user-interface", "usability" ]
4
6
1,580
3
0
2008-09-16T09:36:33.067000
2008-09-16T09:50:31.973000
70,758
76,264
Does anyone know of a way of hiding a column in an asp.net listview?
I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there. You cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem. Does anyone know of a better way?
Here's another solution that I just did, seeing that I understand what you want to do: Here's your ASCX / ASPX Name Age IsSuperCool <%# Eval("Name") %> <%# Eval("Age") %> true Here's the code behind /// /// Handles the DataBound event of the ListView1 control. /// /// The source of the event. /// The instance containin...
Does anyone know of a way of hiding a column in an asp.net listview? I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there. You cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem. Does anyone know of ...
TITLE: Does anyone know of a way of hiding a column in an asp.net listview? QUESTION: I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there. You cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem. Do...
[ "asp.net", "listview" ]
12
20
18,064
7
0
2008-09-16T09:37:27.917000
2008-09-16T19:56:15.747000
70,762
70,836
What is the license for unlicensed material?
Suppose I've found a “text” somewhere in open access (say, on public network share). I have no means to contact the author, I even don't know who is the author. What can I legally do with such “text”? Update: I am not going to publish that “text”, but rather learn from it myself. Update: So, if I ever see an anonymous ...
IANAL: There is no license. The original author (whoever it may be) retains copyright and all the rights associated with it, and has not granted any explicit license to anyone to do anything with their work. Please do check with an actual lawyer versed in copyright, though, since it seems like there should be a way to ...
What is the license for unlicensed material? Suppose I've found a “text” somewhere in open access (say, on public network share). I have no means to contact the author, I even don't know who is the author. What can I legally do with such “text”? Update: I am not going to publish that “text”, but rather learn from it my...
TITLE: What is the license for unlicensed material? QUESTION: Suppose I've found a “text” somewhere in open access (say, on public network share). I have no means to contact the author, I even don't know who is the author. What can I legally do with such “text”? Update: I am not going to publish that “text”, but rathe...
[ "licensing" ]
5
7
660
2
0
2008-09-16T09:38:30.443000
2008-09-16T09:51:17.807000
70,773
108,918
pthread_cond_wait versus semaphore
What are the pros / cons of using pthread_cond_wait or using a semaphore? I am waiting for a state change like this: pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) { pthread_cond_wait(&cam->video_cond, &cam->video_lock); } pthread_mutex_unlock(&cam->video_lock); Using a properly initialised se...
A semaphore is suited cleanly to a producer-consumer model, although it has other uses. Your program logic is responsible for ensuring that the right number of posts are made for the number of waits. If you post a semaphore and nobody is waiting on it yet, then when they do wait they continue immediately. If your probl...
pthread_cond_wait versus semaphore What are the pros / cons of using pthread_cond_wait or using a semaphore? I am waiting for a state change like this: pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) { pthread_cond_wait(&cam->video_cond, &cam->video_lock); } pthread_mutex_unlock(&cam->video_loc...
TITLE: pthread_cond_wait versus semaphore QUESTION: What are the pros / cons of using pthread_cond_wait or using a semaphore? I am waiting for a state change like this: pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) { pthread_cond_wait(&cam->video_cond, &cam->video_lock); } pthread_mutex_unlo...
[ "c", "multithreading", "semaphore" ]
48
65
33,534
5
0
2008-09-16T09:40:31.653000
2008-09-20T18:21:54.963000
70,779
71,527
How do I quickly do something in Rmagick to test it work
I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh the rails stiack, what is the quickest clean code I can use to do this?
I wanted to do this so that I can easily hit it with a web browser, as I'm deployng to managed servers, which I do not have shell access onto (for increased security). So this is what I did class DiagnosticsController < ApplicationController require 'RMagick' def rmagick images_path = "public/images" file_name = "rmag...
How do I quickly do something in Rmagick to test it work I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh the rails stiack,...
TITLE: How do I quickly do something in Rmagick to test it work QUESTION: I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh...
[ "ruby", "rmagick" ]
3
4
3,354
4
0
2008-09-16T09:41:07.613000
2008-09-16T11:56:34.947000
70,781
1,041,384
What do you think of Model-driven Software Development?
I'm really interested to hear what you think about Model-driven Software Development for Java and/or.NET. Does it save time? Does it improve quality?
I am using MDSD in a project with IBM Rational Rhapsody for C++. The model is pretty close to UML, so there we do not really have a Domain-Specific-Language. But still I would claim to use MDSD. From my experience, there are many benefits with MDSD: a) Using MDSD helps to bring a SW architecture to a sophisticated leve...
What do you think of Model-driven Software Development? I'm really interested to hear what you think about Model-driven Software Development for Java and/or.NET. Does it save time? Does it improve quality?
TITLE: What do you think of Model-driven Software Development? QUESTION: I'm really interested to hear what you think about Model-driven Software Development for Java and/or.NET. Does it save time? Does it improve quality? ANSWER: I am using MDSD in a project with IBM Rational Rhapsody for C++. The model is pretty cl...
[ "model-driven-development", "mdsd" ]
9
8
1,386
8
0
2008-09-16T09:41:12.823000
2009-06-24T22:44:27.830000
70,782
70,803
How to get a http file metadata?
How to get a file's creation date or file size, for example this Hello.jpg at http://www.mywebsite.com/now/Hello.jpg(note: This URL does not exist)? The purpose of this question is to make my application re-download the files from the any website when it has detected that the website has an updated version of the files...
If you use the HEAD request it will send the headers for the resource, there you can check the cache control headers which will tell you if the resource has been modified, last modification time, size (content-length) and date. $ telnet www.google.com 80 Trying 216.239.59.103... Connected to www.l.google.com. Escape ch...
How to get a http file metadata? How to get a file's creation date or file size, for example this Hello.jpg at http://www.mywebsite.com/now/Hello.jpg(note: This URL does not exist)? The purpose of this question is to make my application re-download the files from the any website when it has detected that the website ha...
TITLE: How to get a http file metadata? QUESTION: How to get a file's creation date or file size, for example this Hello.jpg at http://www.mywebsite.com/now/Hello.jpg(note: This URL does not exist)? The purpose of this question is to make my application re-download the files from the any website when it has detected t...
[ "http" ]
2
6
5,002
2
0
2008-09-16T09:41:37.097000
2008-09-16T09:45:44.263000
70,785
84,955
What is the best way to use Ext JS as part of Java / Spring / Hibernate based web application?
We want to try Ext JS on new project. Is there any well-known best practice for integrating Ext JS with server side Java (Spring/Hibernate/JS) application? Is DWR a good choice for that?
My team has been using Ext with DWR for almost year a year, and have had nothing but good things to say. If you take this approach, you will end up using DWR's generated JavaScript classes for making your requests to the server. This will often be done in place of using the Ext.Ajax and Ext.data.Connection classes. Whe...
What is the best way to use Ext JS as part of Java / Spring / Hibernate based web application? We want to try Ext JS on new project. Is there any well-known best practice for integrating Ext JS with server side Java (Spring/Hibernate/JS) application? Is DWR a good choice for that?
TITLE: What is the best way to use Ext JS as part of Java / Spring / Hibernate based web application? QUESTION: We want to try Ext JS on new project. Is there any well-known best practice for integrating Ext JS with server side Java (Spring/Hibernate/JS) application? Is DWR a good choice for that? ANSWER: My team has...
[ "java", "javascript", "extjs" ]
3
7
4,697
5
0
2008-09-16T09:42:08.233000
2008-09-17T16:18:54.903000
70,797
70,833
User input and command line arguments
How do I have a Python script that can accept user input and how do I make it read in arguments if run from the command line?
To read user input you can try the cmd module for easily creating a mini-command line interpreter (with help texts and autocompletion) and raw_input ( input for Python 3+) for reading a line of text from the user. text = raw_input("prompt") # Python 2 text = input("prompt") # Python 3 Command line inputs are in sys.arg...
User input and command line arguments How do I have a Python script that can accept user input and how do I make it read in arguments if run from the command line?
TITLE: User input and command line arguments QUESTION: How do I have a Python script that can accept user input and how do I make it read in arguments if run from the command line? ANSWER: To read user input you can try the cmd module for easily creating a mini-command line interpreter (with help texts and autocomple...
[ "python", "input", "command-line-arguments" ]
633
619
1,465,661
12
0
2008-09-16T09:44:59.477000
2008-09-16T09:50:40.990000
70,811
70,919
VMWare Server: Virtual Hard Drive Type
For best performance, is it better to use a virtual IDE HDD or virtual SCSI HDD? If, SCSI, does it matter whether you use an BusLogic or LSILogic?
Go for the SCSI and LSILogic. IDE and BusLogic are for compatibility reasons. Like when you do physical2virtual... There's a whitepaper from vmware showing the difference between LSILogic and BusLogic, which in my opinion is rather small: http://www.vmware.com/pdf/ESX2_Storage_Performance.pdf Edit after like three year...
VMWare Server: Virtual Hard Drive Type For best performance, is it better to use a virtual IDE HDD or virtual SCSI HDD? If, SCSI, does it matter whether you use an BusLogic or LSILogic?
TITLE: VMWare Server: Virtual Hard Drive Type QUESTION: For best performance, is it better to use a virtual IDE HDD or virtual SCSI HDD? If, SCSI, does it matter whether you use an BusLogic or LSILogic? ANSWER: Go for the SCSI and LSILogic. IDE and BusLogic are for compatibility reasons. Like when you do physical2vir...
[ "performance", "ide", "vmware", "hard-drive", "scsi" ]
4
6
3,478
2
0
2008-09-16T09:48:04.507000
2008-09-16T10:09:53.300000
70,842
70,848
Execute program from within a C program
How should I run another program from within my C program? I need to be able to write data into STDIN of the launched program (and maybe read from it's STDOUT ) I am not sure if this is a standard C function. I need the solution that should work under Linux.
You want to use popen. It gives you a unidirectional pipe with which you can access stdin and stdout of the program. popen is standard on modern unix and unix-like OS, of which Linux is one:-) Type man popen in a terminal to read more about it. EDIT Whether popen produces unidirectional or bidirectional pipes depends o...
Execute program from within a C program How should I run another program from within my C program? I need to be able to write data into STDIN of the launched program (and maybe read from it's STDOUT ) I am not sure if this is a standard C function. I need the solution that should work under Linux.
TITLE: Execute program from within a C program QUESTION: How should I run another program from within my C program? I need to be able to write data into STDIN of the launched program (and maybe read from it's STDOUT ) I am not sure if this is a standard C function. I need the solution that should work under Linux. AN...
[ "c", "linux" ]
8
17
27,589
6
0
2008-09-16T09:52:26.680000
2008-09-16T09:54:35.957000
70,850
271,627
What is this strange C code format?
What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"Can't lock dir %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case EEXIST: fprintf(stderr,"Server dir %s not empty\n",serverdir); break; default:...
The top example is know as "Whitesmiths style". Wikipedia's entry on Indent Styles explains several styles along with their advantages and disadvantages.
What is this strange C code format? What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"Can't lock dir %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case EEXIST: fprintf(stderr,"Server dir %s not ...
TITLE: What is this strange C code format? QUESTION: What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"Can't lock dir %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case EEXIST: fprintf(stderr,"...
[ "c", "formatting" ]
1
27
2,311
10
0
2008-09-16T09:55:20.637000
2008-11-07T09:35:09.827000
70,880
70,905
deleting a buffer through a different type of pointer?
Say I have the following C++: char *p = new char[cb]; SOME_STRUCT *pSS = (SOME_STRUCT *) p; delete pSS; Is this safe according to the C++ standard? Do I need to cast back to a char* and then use delete[]? I know it'll work in most C++ compilers, because it's plain-ordinary-data, with no destructors. Is it guaranteed to...
It's not guaranteed to be safe. Here's a relevant link in the C++ FAQ lite: [16.13] Can I drop the [] when deleting array of some built-in type ( char, int, etc.)? http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.13
deleting a buffer through a different type of pointer? Say I have the following C++: char *p = new char[cb]; SOME_STRUCT *pSS = (SOME_STRUCT *) p; delete pSS; Is this safe according to the C++ standard? Do I need to cast back to a char* and then use delete[]? I know it'll work in most C++ compilers, because it's plain-...
TITLE: deleting a buffer through a different type of pointer? QUESTION: Say I have the following C++: char *p = new char[cb]; SOME_STRUCT *pSS = (SOME_STRUCT *) p; delete pSS; Is this safe according to the C++ standard? Do I need to cast back to a char* and then use delete[]? I know it'll work in most C++ compilers, b...
[ "c++", "pointers", "memory-management" ]
10
9
3,803
10
0
2008-09-16T10:01:00.747000
2008-09-16T10:06:34.073000
70,917
91,987
missing WMI namespace on Vista/Server 2008
What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008? The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that shipped with Windows 2000, but it looks like it is removed fr...
It's no longer there, but a lot of the things it controlled have been moved into the registry, what exactly are you trying to do?
missing WMI namespace on Vista/Server 2008 What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008? The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that shipped with Windo...
TITLE: missing WMI namespace on Vista/Server 2008 QUESTION: What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008? The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that ...
[ "internet-explorer", "namespaces", "wmi" ]
2
0
1,726
1
0
2008-09-16T10:09:10.900000
2008-09-18T12:17:22.447000
70,947
70,976
Refreshing all the pivot tables in my excel workbook with a macro
I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VBA?
Yes. ThisWorkbook.RefreshAll Or, if your Excel version is old enough, Dim Sheet as WorkSheet, Pivot as PivotTable For Each Sheet in ThisWorkbook.WorkSheets For Each Pivot in Sheet.PivotTables Pivot.RefreshTable Pivot.Update Next Next
Refreshing all the pivot tables in my excel workbook with a macro I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VBA?
TITLE: Refreshing all the pivot tables in my excel workbook with a macro QUESTION: I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VBA? ANSWER: Yes. ThisWorkbook.RefreshAll Or, if your Excel version is old enough, Dim Sheet as WorkSheet, Pivot a...
[ "excel", "vba", "refresh" ]
93
188
602,711
10
0
2008-09-16T10:14:20.450000
2008-09-16T10:18:52.013000
70,956
71,790
Exclude certain pages from using a HTTPModule
Is there a good way to exclude certain pages from using a HTTP module? I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config: To exclude the module from the page, I tried doing this (without success): Any thoughts?
You could use an HTTPHandler instead of an HTTPModule. Handlers let you specify a path when you declare them in Web.Config. If you must use an HTTPModule, you could just check the path of the request and if it's one to be excluded, bypass the validation.
Exclude certain pages from using a HTTPModule Is there a good way to exclude certain pages from using a HTTP module? I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config: To exclude the module from the page, I tried doing this (without success): An...
TITLE: Exclude certain pages from using a HTTPModule QUESTION: Is there a good way to exclude certain pages from using a HTTP module? I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config: To exclude the module from the page, I tried doing this (wi...
[ ".net", "asp.net" ]
18
11
12,015
3
0
2008-09-16T10:15:35.063000
2008-09-16T12:42:45.443000
70,992
71,499
Hibernate (JPA) how to do an eager query, loading all child objects
Relating to my earlier question, I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand the way to do this is to use the "fetch" keyword in the query (EJB QL). Like this: select distinct o from Order o left j...
Changing the annotation is a bad idea IMO. As it can't be changed to lazy at runtime. Better to make everything lazy, and fetch as needed. I'm not sure I understand your problem without mappings. Left join fetch should be all you need for the use case you describe. Of course you'll get back an order for every orderline...
Hibernate (JPA) how to do an eager query, loading all child objects Relating to my earlier question, I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand the way to do this is to use the "fetch" keyword in ...
TITLE: Hibernate (JPA) how to do an eager query, loading all child objects QUESTION: Relating to my earlier question, I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand the way to do this is to use the "...
[ "java", "hibernate", "jpa", "ejbql" ]
20
16
55,529
7
0
2008-09-16T10:21:47.983000
2008-09-16T11:50:07.303000
70,993
71,105
Testing ladder logic
We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask:/), and I was wondering if there's a good way of testing the validity of the system. The only way I see so far is simply constructing a huge table with all know...
The verification of "logical" systems in the IC design arena is known as "Design Verification", which is the process of ensuring that the system you design in hardware (RTL) implements the desired functionality. Ladder logic can be transformed to one of the modern HDL's like Verilog.. transform each ladder |---|R15|---...
Testing ladder logic We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask:/), and I was wondering if there's a good way of testing the validity of the system. The only way I see so far is simply constructing a hug...
TITLE: Testing ladder logic QUESTION: We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask:/), and I was wondering if there's a good way of testing the validity of the system. The only way I see so far is simply ...
[ "testing", "plc", "ladder-logic" ]
12
6
5,726
5
0
2008-09-16T10:21:50.777000
2008-09-16T10:41:08.060000
71,000
71,072
Help in creating Zip files from .Net and reading them from Java
I'm trying to create a Zip file from.Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed via WinZip or WinRar I always get an error when trying to uncompre...
I have used DotNetZip library and it seems to work properly. Typical code: using (ZipFile zipFile = new ZipFile()) { zipFile.AddDirectory(sourceFolderPath); zipFile.Save(archiveFolderName); }
Help in creating Zip files from .Net and reading them from Java I'm trying to create a Zip file from.Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed vi...
TITLE: Help in creating Zip files from .Net and reading them from Java QUESTION: I'm trying to create a Zip file from.Net that can be read from Java code. I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successful...
[ "java", ".net", "interop", "zip" ]
4
9
9,599
6
0
2008-09-16T10:22:16.687000
2008-09-16T10:35:01.103000
71,022
71,045
SQL MAX of multiple columns?
How do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date2, Date3, Cost] I need to return something like this: [Number, Most_Recent_Date, Cost] Query?
This is an old answer and broken in many way. See https://stackoverflow.com/a/6871572/194653 which has way more upvotes and works with sql server 2008+ and handles nulls, etc. Original but problematic answer: Well, you can use the CASE statement: SELECT CASE WHEN Date1 >= Date2 AND Date1 >= Date3 THEN Date1 WHEN Date2 ...
SQL MAX of multiple columns? How do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date2, Date3, Cost] I need to return something like this: [Number, Most_Recent_Date, Cost] Query?
TITLE: SQL MAX of multiple columns? QUESTION: How do you return 1 value per row of the max of several columns: TableName [Number, Date1, Date2, Date3, Cost] I need to return something like this: [Number, Most_Recent_Date, Cost] Query? ANSWER: This is an old answer and broken in many way. See https://stackoverflow.com...
[ "sql", "sql-server", "t-sql" ]
526
193
869,571
24
0
2008-09-16T10:27:02.400000
2008-09-16T10:30:31.330000
71,030
1,193,664
Can I add maven repositories in the command line?
I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like: mvn install -Dmaven.repository=http://example.com/maven2 The reason I want to do this is because I'm using a continuous integration tool where I have full co...
You can do this but you're probably better off doing it in the POM as others have said. On the command line you can specify a property for the local repository, and another repository for the remote repositories. The remote repository will have all default settings though The example below specifies two remote reposito...
Can I add maven repositories in the command line? I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like: mvn install -Dmaven.repository=http://example.com/maven2 The reason I want to do this is because I'm using ...
TITLE: Can I add maven repositories in the command line? QUESTION: I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like: mvn install -Dmaven.repository=http://example.com/maven2 The reason I want to do this is ...
[ "java", "maven-2", "build-process" ]
76
86
91,218
8
0
2008-09-16T10:28:37.297000
2009-07-28T12:04:53.650000
71,036
214,558
SCRUM - non cooperative team members
What do you do if members of your team are not cooperative during scrum meetings? They either provide a very high level definition of what they are currently working on, ("working on feature x"), or go into extremely irrelevant details, in spite of being well educated in SCRUM methodology. This causes the scrum meeting...
First of all... make sure folks are standing up... and not even leaning on the wall or a desk. At a high level, I would say that, whenever you face issues on the team, the best response is to ask the team for solutions. However, here are some of the techniques I've used for the issues you're facing. Talks too much have...
SCRUM - non cooperative team members What do you do if members of your team are not cooperative during scrum meetings? They either provide a very high level definition of what they are currently working on, ("working on feature x"), or go into extremely irrelevant details, in spite of being well educated in SCRUM metho...
TITLE: SCRUM - non cooperative team members QUESTION: What do you do if members of your team are not cooperative during scrum meetings? They either provide a very high level definition of what they are currently working on, ("working on feature x"), or go into extremely irrelevant details, in spite of being well educa...
[ "scrum" ]
19
15
5,223
15
0
2008-09-16T10:29:28.947000
2008-10-18T04:14:17.983000
71,057
71,116
Is there a good obfuscater for Perl code?
Does anyone know of a good code obsfucator for Perl? I'm being ask to look into the option of obsfucating code before releasing it to a client. I know obsfucated code can still be reverse engineered, but that's not our main concern. Some clients are making small changes to the source code that we give them and it's giv...
I've been down this road before and it's an absolute nightmare when you have to work on "obfuscated" code because it drives up costs tremendously trying to debug a problem on the client's server when you, the developer, can't read the code. You wind up with "deobfuscators", copying the "real code" to the client's serve...
Is there a good obfuscater for Perl code? Does anyone know of a good code obsfucator for Perl? I'm being ask to look into the option of obsfucating code before releasing it to a client. I know obsfucated code can still be reverse engineered, but that's not our main concern. Some clients are making small changes to the ...
TITLE: Is there a good obfuscater for Perl code? QUESTION: Does anyone know of a good code obsfucator for Perl? I'm being ask to look into the option of obsfucating code before releasing it to a client. I know obsfucated code can still be reverse engineered, but that's not our main concern. Some clients are making sma...
[ "perl", "obfuscation" ]
4
31
2,479
15
0
2008-09-16T10:31:50.533000
2008-09-16T10:42:23.300000
71,065
71,350
Migrating from Stingray Objective Toolkit
We have a collection of commercial MFC/C++ applications which we sell using Stingray Objective Toolkit, we have source code license and have ported it in the past to Solaris/IRIX/HP-UX/AIX using Bristol Technologies WindU (Windows API on UNIX, including MFC). Any long story short recently about 18 months ago we ported ...
Yes, we haved moved away from Stingray. It depends on what Stingray components you are using. For the grid control, you can use the free MFC gridcontrol from www.codeproject.com or the commercial one from http://www.bcgsoft.com/. The free one is OK but development has stalled, so no modern UI rendering etc. The 'layout...
Migrating from Stingray Objective Toolkit We have a collection of commercial MFC/C++ applications which we sell using Stingray Objective Toolkit, we have source code license and have ported it in the past to Solaris/IRIX/HP-UX/AIX using Bristol Technologies WindU (Windows API on UNIX, including MFC). Any long story sho...
TITLE: Migrating from Stingray Objective Toolkit QUESTION: We have a collection of commercial MFC/C++ applications which we sell using Stingray Objective Toolkit, we have source code license and have ported it in the past to Solaris/IRIX/HP-UX/AIX using Bristol Technologies WindU (Windows API on UNIX, including MFC). ...
[ "user-interface", "mfc", "stingray" ]
2
2
4,975
3
0
2008-09-16T10:32:56.443000
2008-09-16T11:23:20.957000
71,069
71,086
Can Maven be made less verbose?
Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news). I want to get rid of all [INFO] lines, but I couldn't find any mention of an argument or config settings that controls the verbosity of Maven. Is there no LOG4J-like way to set the log level?
You can try the -q switch. -q, --quiet Quiet output - only show errors
Can Maven be made less verbose? Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news). I want to get rid of all [INFO] lines, but I couldn't find any mention of an argument or config settings that controls the verbosity of Maven. Is there no LOG4J-like way to set the log l...
TITLE: Can Maven be made less verbose? QUESTION: Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news). I want to get rid of all [INFO] lines, but I couldn't find any mention of an argument or config settings that controls the verbosity of Maven. Is there no LOG4J-like wa...
[ "maven", "output", "verbosity" ]
147
181
69,402
9
0
2008-09-16T10:34:05.223000
2008-09-16T10:37:40.910000
71,077
71,099
Are there any compression and encryption libraries in C#?
I want to compress some files (into the ZIP format) and encrypt them if possible using C#. Is there some way to do this? Can encryption be done as a part of the compression itself?
For compression, look at the System.IO.Compression namespace and for encryption look at System.Security.Cryptography.
Are there any compression and encryption libraries in C#? I want to compress some files (into the ZIP format) and encrypt them if possible using C#. Is there some way to do this? Can encryption be done as a part of the compression itself?
TITLE: Are there any compression and encryption libraries in C#? QUESTION: I want to compress some files (into the ZIP format) and encrypt them if possible using C#. Is there some way to do this? Can encryption be done as a part of the compression itself? ANSWER: For compression, look at the System.IO.Compression nam...
[ "c#", "encryption", "compression" ]
3
12
4,580
9
0
2008-09-16T10:36:31.100000
2008-09-16T10:40:07.703000
71,092
71,194
What is the difference between UserControl, WebControl, RenderedControl and CompositeControl?
What is the difference, what is the official terms, are any terms obsolete in ASP.NET 3.5?
UserControl: A custom control, ending in.ascx, that is composed of other web controls. Its almost like a small version of an aspx webpage. It consists of a UI (the ascx) and codebehind. Cannot be reused in other projects by referencing a DLL. WebControl: A control hosted on a webpage or in a UserControl. It consists of...
What is the difference between UserControl, WebControl, RenderedControl and CompositeControl? What is the difference, what is the official terms, are any terms obsolete in ASP.NET 3.5?
TITLE: What is the difference between UserControl, WebControl, RenderedControl and CompositeControl? QUESTION: What is the difference, what is the official terms, are any terms obsolete in ASP.NET 3.5? ANSWER: UserControl: A custom control, ending in.ascx, that is composed of other web controls. Its almost like a sma...
[ "asp.net" ]
51
48
43,728
5
0
2008-09-16T10:38:45.477000
2008-09-16T10:56:15.683000
71,108
71,298
To what use is multiple indirection in C++?
Under what circumstances might you want to use multiple indirection (that is, a chain of pointers as in Foo ** ) in C++?
Most common usage as @aku pointed out is to allow a change to a pointer parameter to be visible after the function returns. #include using namespace std; struct Foo { int a; }; void CreateFoo(Foo** p) { *p = new Foo(); (*p)->a = 12; } int main(int argc, char* argv[]) { Foo* p = NULL; CreateFoo(&p); cout << p->a << e...
To what use is multiple indirection in C++? Under what circumstances might you want to use multiple indirection (that is, a chain of pointers as in Foo ** ) in C++?
TITLE: To what use is multiple indirection in C++? QUESTION: Under what circumstances might you want to use multiple indirection (that is, a chain of pointers as in Foo ** ) in C++? ANSWER: Most common usage as @aku pointed out is to allow a change to a pointer parameter to be visible after the function returns. #inc...
[ "c++", "pointers" ]
10
13
8,093
8
0
2008-09-16T10:41:21.773000
2008-09-16T11:14:26.500000
71,144
72,833
What are the pros and cons of using RMI or JMS between web and business tiers?
For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/async aspects?
By web client do you mean web browser? If so looking at stuff like DWR or JAX-RS are my recommendations. RMI or JMS only really work when both sides are Java code. With any remoting technology the biggest issue using them tends to be how intrusive the technology becomes on your business objects. e.g. using RMI interfac...
What are the pros and cons of using RMI or JMS between web and business tiers? For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/async aspects?
TITLE: What are the pros and cons of using RMI or JMS between web and business tiers? QUESTION: For a typical Web client -to- Servlet/WS -to- Business Tier (Spring or EJB) app, what are the trade-offs of approaches like remote RPC or messaging for Web (Servlet) tier to remote Business tier, aside from the basic sync/a...
[ "jakarta-ee", "remoting", "jms" ]
3
3
3,237
3
0
2008-09-16T10:49:01.257000
2008-09-16T14:21:51.760000
71,149
89,510
Creating a custom menu in .NET WinForms
Using.NET 2.0 with WinForms, I'd like to create a custom, multi-columned menu (similiar to the word 2007 look&feel, but without the ribbon). My approach was creating a control, and using a left/right docked toolstrip, I have constructed a similar look&feel of a menu. However, there are a few shortcomings of this soluti...
The MenuStrip class has a Renderer property. You can assign your own ToolStripRenderer derived class to customize the painting. It's a fair amount of work.
Creating a custom menu in .NET WinForms Using.NET 2.0 with WinForms, I'd like to create a custom, multi-columned menu (similiar to the word 2007 look&feel, but without the ribbon). My approach was creating a control, and using a left/right docked toolstrip, I have constructed a similar look&feel of a menu. However, the...
TITLE: Creating a custom menu in .NET WinForms QUESTION: Using.NET 2.0 with WinForms, I'd like to create a custom, multi-columned menu (similiar to the word 2007 look&feel, but without the ribbon). My approach was creating a control, and using a left/right docked toolstrip, I have constructed a similar look&feel of a ...
[ "c#", ".net", "winforms", "menu" ]
2
1
3,478
2
0
2008-09-16T10:49:24.267000
2008-09-18T02:34:39.570000
71,151
71,161
HTML parser in Python
Using the Python Documentation I found the HTML parser but I have no idea which library to import to use it, how do I find this out (bearing in mind it doesn't say on the page).
Try: import HTMLParser In Python 3.0, the HTMLParser module has been renamed to html.parser you can check about this here Python 3.0 import html.parser Python 2.2 and above import HTMLParser
HTML parser in Python Using the Python Documentation I found the HTML parser but I have no idea which library to import to use it, how do I find this out (bearing in mind it doesn't say on the page).
TITLE: HTML parser in Python QUESTION: Using the Python Documentation I found the HTML parser but I have no idea which library to import to use it, how do I find this out (bearing in mind it doesn't say on the page). ANSWER: Try: import HTMLParser In Python 3.0, the HTMLParser module has been renamed to html.parser y...
[ "python", "import" ]
8
21
51,979
8
0
2008-09-16T10:49:36.573000
2008-09-16T10:51:40.517000
71,157
71,938
Anyone got --standalone option to work in F# CTP?
I may have this completely wrong, but my understanding is that the --standalone compiler option tells the compiler to include the F# core and other dependencies in the exe, so that you can run it on another machine without installing any 'runtime'. However, I can't get this to work in the CTP - it doesn't even seem to ...
Answer from MS: There is a CTP update 1.9.6.2 that fixed some --standalone bugs. I'm reinstalling now... UPDATE: Works for me - so the my accepted answer is download CTP update 1.9.6.2.
Anyone got --standalone option to work in F# CTP? I may have this completely wrong, but my understanding is that the --standalone compiler option tells the compiler to include the F# core and other dependencies in the exe, so that you can run it on another machine without installing any 'runtime'. However, I can't get ...
TITLE: Anyone got --standalone option to work in F# CTP? QUESTION: I may have this completely wrong, but my understanding is that the --standalone compiler option tells the compiler to include the F# core and other dependencies in the exe, so that you can run it on another machine without installing any 'runtime'. How...
[ "f#", "functional-programming" ]
6
4
946
3
0
2008-09-16T10:50:58.083000
2008-09-16T13:00:51.610000
71,166
71,575
Help with SQL server stack dump
We're running SQL 2005 standard SP2 on a 4cpu box. Suddenly it crashdumps, after which all pooled connections are invalid and it goes into admin-only mode (only sa can connect) The short stackdump is below. After the dump a number of errors show up like '2008-09-16 10:49:34.48 Server Resource Monitor (0xec4) Worker 0x0...
See How It Works: Non-Yielding Resource Monitor on the PSS SQL Server Engineers blog. If this, and the linked whitepaper, don't help, then you're probably best to contact PSS (Microsoft Product Support Services) directly.
Help with SQL server stack dump We're running SQL 2005 standard SP2 on a 4cpu box. Suddenly it crashdumps, after which all pooled connections are invalid and it goes into admin-only mode (only sa can connect) The short stackdump is below. After the dump a number of errors show up like '2008-09-16 10:49:34.48 Server Res...
TITLE: Help with SQL server stack dump QUESTION: We're running SQL 2005 standard SP2 on a 4cpu box. Suddenly it crashdumps, after which all pooled connections are invalid and it goes into admin-only mode (only sa can connect) The short stackdump is below. After the dump a number of errors show up like '2008-09-16 10:4...
[ "sql-server" ]
1
2
9,146
1
0
2008-09-16T10:51:58.130000
2008-09-16T12:06:10.930000
71,180
71,310
How can I find last row that contains data in a specific column?
How can I find the last row that contains data in a specific column and on a specific sheet?
How about: Function GetLastRow(strSheet, strColumn) As Long Dim MyRange As Range Set MyRange = Worksheets(strSheet).Range(strColumn & "1") GetLastRow = Cells(Rows.Count, MyRange.Column).End(xlUp).Row End Function Regarding a comment, this will return the row number of the last cell even when only a single cell in the ...
How can I find last row that contains data in a specific column? How can I find the last row that contains data in a specific column and on a specific sheet?
TITLE: How can I find last row that contains data in a specific column? QUESTION: How can I find the last row that contains data in a specific column and on a specific sheet? ANSWER: How about: Function GetLastRow(strSheet, strColumn) As Long Dim MyRange As Range Set MyRange = Worksheets(strSheet).Range(strColumn & ...
[ "excel", "vba" ]
66
46
372,474
14
0
2008-09-16T10:54:53.520000
2008-09-16T11:16:30.143000
71,195
71,232
Should you obfuscate a commercial .Net application?
I was thinking about obfuscating a commercial.Net application. But is it really worth the effort to select, buy and use such a tool? Are the obfuscated binaries really safe from reverse engineering?
You may not have to buy a tool - Visual Studio.NET comes with a community version of Dotfuscator. Other free obfuscation tools are listed here, and they may meet your needs. It's possible that the obfuscated binaries aren't safe from reverse engineering, just like it's possible that your bike lock might be breakable/pi...
Should you obfuscate a commercial .Net application? I was thinking about obfuscating a commercial.Net application. But is it really worth the effort to select, buy and use such a tool? Are the obfuscated binaries really safe from reverse engineering?
TITLE: Should you obfuscate a commercial .Net application? QUESTION: I was thinking about obfuscating a commercial.Net application. But is it really worth the effort to select, buy and use such a tool? Are the obfuscated binaries really safe from reverse engineering? ANSWER: You may not have to buy a tool - Visual St...
[ "c#", ".net", "obfuscation" ]
40
40
27,538
16
0
2008-09-16T10:56:35.717000
2008-09-16T11:03:08.587000
71,198
139,736
How to emulate/replace/re-enable classical Sound Mixer controls (or commands) in Windows Vista?
I have a problem (and have been having it for some time now) -- the new sound mixer stack in Vista features new cool things, but also re-invents the wheel. Many applications that used to use Volume Mixer on a Windows system to mix different voiced outputs into one input (for example Wave-out + Line-in --> Stereo Mix) h...
Controlling the volume levels of a soundcards indivudual input/output levels in Windows Vista mixer is possible using the audio EndPoint API This should allow you to adjust the main volume, and the volume of and connected audio inputs. One wrinkle about this that when you enumerate the end points, if there isn't a micr...
How to emulate/replace/re-enable classical Sound Mixer controls (or commands) in Windows Vista? I have a problem (and have been having it for some time now) -- the new sound mixer stack in Vista features new cool things, but also re-invents the wheel. Many applications that used to use Volume Mixer on a Windows system ...
TITLE: How to emulate/replace/re-enable classical Sound Mixer controls (or commands) in Windows Vista? QUESTION: I have a problem (and have been having it for some time now) -- the new sound mixer stack in Vista features new cool things, but also re-invents the wheel. Many applications that used to use Volume Mixer on...
[ "windows", "audio", "windows-vista", "shoutcast", "mixer" ]
3
4
4,766
4
0
2008-09-16T10:57:17.057000
2008-09-26T14:08:31.593000
71,201
71,596
Hints for a high-traffic web service, c# asp.net sql2000
I'm developing a web service whose methods will be called from a "dynamic banner" that will show a sort of queue of messages read from a sql server table. The banner will have a heavy pressure in the home pages of high traffic sites; every time the banner will be loaded, it will call my web service, in order to obtain ...
It depends on a lot of things: If there is little change in the data (think backend with "publish" button or daily batches), then I would definitely use static files (updated via push from the backend). We used this solution on a couple of large sites and worked really well. If the data is small enough, memory caching ...
Hints for a high-traffic web service, c# asp.net sql2000 I'm developing a web service whose methods will be called from a "dynamic banner" that will show a sort of queue of messages read from a sql server table. The banner will have a heavy pressure in the home pages of high traffic sites; every time the banner will be...
TITLE: Hints for a high-traffic web service, c# asp.net sql2000 QUESTION: I'm developing a web service whose methods will be called from a "dynamic banner" that will show a sort of queue of messages read from a sql server table. The banner will have a heavy pressure in the home pages of high traffic sites; every time ...
[ "c#", "web-services", "high-load" ]
2
4
1,614
7
0
2008-09-16T10:57:40.377000
2008-09-16T12:10:15.180000
71,203
71,283
Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD?
Our installer is written with Inno Setup and we are actually quite happy with it. Yet some customers keep asking for an MSI installer which they could more easily distribute via Active Directory. We have already gone to some lengths to make the installer deal really well with automated and unattended installations by e...
No, there's no way to do that while still keeping the functionality your customers are 'implicitly' asking for. The only 'wrapping' in MSI you can do is to extract it on installation and start your InnoSetup installer from the temporary location where you extracted to. MSI is a fundamentally different way of working: I...
Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD? Our installer is written with Inno Setup and we are actually quite happy with it. Yet some customers keep asking for an MSI installer which they could more easily distribute via Active Directory. We have already gone t...
TITLE: Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD? QUESTION: Our installer is written with Inno Setup and we are actually quite happy with it. Yet some customers keep asking for an MSI installer which they could more easily distribute via Active Directory. We h...
[ "windows-installer", "inno-setup" ]
31
23
18,862
10
0
2008-09-16T10:58:14.963000
2008-09-16T11:11:48.097000
71,204
71,408
sqlserver express database copy options
Why can I not see an option for copying database objects when I right click > tasks on my database?
MS Sql Server Express doesn't come with SSIS which is what you will need to import/export objects out of your database. You can also manually script this process. One way is to use BCP ( http://msdn.microsoft.com/en-us/library/ms162802.aspx )
sqlserver express database copy options Why can I not see an option for copying database objects when I right click > tasks on my database?
TITLE: sqlserver express database copy options QUESTION: Why can I not see an option for copying database objects when I right click > tasks on my database? ANSWER: MS Sql Server Express doesn't come with SSIS which is what you will need to import/export objects out of your database. You can also manually script this...
[ "sql-server", "sql-server-express" ]
0
2
217
2
0
2008-09-16T10:58:21
2008-09-16T11:33:22.757000
71,223
71,272
TYPO3: How do i render tt_content text elements in my own extensions?
I'm currently writing a TYPO3 extension which is configured with a list of tt_content UID's. These point to content elements of type "text" and i want to render them by my extension. Because of TYPO3s special way of transforming the text you enter in the rich text editing when it enters the database, and again transfor...
I had the same problem a couple of months ago. Now I must say that I am no typo3 developer, so I don't know if this is the right solution. But I used something like this: $output.= $this->pi_RTEcssText( $contentFromDb ); in my extension and it works.
TYPO3: How do i render tt_content text elements in my own extensions? I'm currently writing a TYPO3 extension which is configured with a list of tt_content UID's. These point to content elements of type "text" and i want to render them by my extension. Because of TYPO3s special way of transforming the text you enter in...
TITLE: TYPO3: How do i render tt_content text elements in my own extensions? QUESTION: I'm currently writing a TYPO3 extension which is configured with a list of tt_content UID's. These point to content elements of type "text" and i want to render them by my extension. Because of TYPO3s special way of transforming the...
[ "php", "typo3" ]
7
6
7,228
2
0
2008-09-16T11:00:39.090000
2008-09-16T11:09:52.453000
71,257
71,457
Suspend Process in C#
How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#. I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it.
Here's my suggestion: [Flags] public enum ThreadAccess: int { TERMINATE = (0x0001), SUSPEND_RESUME = (0x0002), GET_CONTEXT = (0x0008), SET_CONTEXT = (0x0010), SET_INFORMATION = (0x0020), QUERY_INFORMATION = (0x0040), SET_THREAD_TOKEN = (0x0080), IMPERSONATE = (0x0100), DIRECT_IMPERSONATION = (0x0200) } [DllImport("ker...
Suspend Process in C# How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#. I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it.
TITLE: Suspend Process in C# QUESTION: How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#. I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it. ANSWER: Here's my suggestio...
[ "c#", ".net" ]
27
42
49,285
5
0
2008-09-16T11:07:34.283000
2008-09-16T11:43:18.910000
71,277
75,166
Single application build for multiple mobile devices
Is it possible to have one application binary build for multiple mobile devices (on BREW platform), rather than making a separate build for each device using build script with conditional compilation. In particular is is possible to use single BREW application build for multiple screen resolutions? Note that the goal i...
Yes, it is possible, we were able to do this at my previous place of work. What's required is tricky though: Compile for the lowest common denominator BREW version. Version 1.1 is the base for all current handsets out there. Your code must be able to handle multiple resolutions. The methods for detecting screen width a...
Single application build for multiple mobile devices Is it possible to have one application binary build for multiple mobile devices (on BREW platform), rather than making a separate build for each device using build script with conditional compilation. In particular is is possible to use single BREW application build ...
TITLE: Single application build for multiple mobile devices QUESTION: Is it possible to have one application binary build for multiple mobile devices (on BREW platform), rather than making a separate build for each device using build script with conditional compilation. In particular is is possible to use single BREW ...
[ "mobile", "brew-framework", "brewmp" ]
2
3
730
3
0
2008-09-16T11:10:48.037000
2008-09-16T18:03:34.737000
71,309
71,371
how do I use the node Builder from Scriptacolus to insert html
for example this code var html = " This text is good "; var newNode = Builder.node('div',{className: 'test'},[html]); $('placeholder').update(newNode); casues the p and a tags to be shown, how do I prevent them from being escaped?
The last parameter to Builder.node is "Array, List of other nodes to be appended as children" according to the Wiki. So when you pass it a string it is treated like text. You could use: var a = Builder.node('div').update(" foo ") Where the link is text or: var a = Builder.node('div', {'class':'cool'}, [Builder.node('di...
how do I use the node Builder from Scriptacolus to insert html for example this code var html = " This text is good "; var newNode = Builder.node('div',{className: 'test'},[html]); $('placeholder').update(newNode); casues the p and a tags to be shown, how do I prevent them from being escaped?
TITLE: how do I use the node Builder from Scriptacolus to insert html QUESTION: for example this code var html = " This text is good "; var newNode = Builder.node('div',{className: 'test'},[html]); $('placeholder').update(newNode); casues the p and a tags to be shown, how do I prevent them from being escaped? ANSWER:...
[ "javascript", "dom", "scriptaculous" ]
0
2
1,560
2
0
2008-09-16T11:16:19.427000
2008-09-16T11:26:31.697000
71,315
71,348
light-version of a repository/branch in git
I am using git on a project, that generates lots of data-files (simulation-results). I am "forced" to version and track all those results in the same repository. (This is a hard requirement and can not be changed) However I don't need them. We have about 50 MB for the project and 5 GB results in the repository. Is it f...
If you were to make a branch and delete the result files from the branch, then merging your branch back into master would also try to delete the results from master. A file delete is a change just like any other. Perhaps you could use the git submodule support to manage your code changes as a submodule of the fat repos...
light-version of a repository/branch in git I am using git on a project, that generates lots of data-files (simulation-results). I am "forced" to version and track all those results in the same repository. (This is a hard requirement and can not be changed) However I don't need them. We have about 50 MB for the project...
TITLE: light-version of a repository/branch in git QUESTION: I am using git on a project, that generates lots of data-files (simulation-results). I am "forced" to version and track all those results in the same repository. (This is a hard requirement and can not be changed) However I don't need them. We have about 50 ...
[ "git", "branch" ]
4
2
634
3
0
2008-09-16T11:17:52.793000
2008-09-16T11:23:02.313000
71,323
71,334
How to replace a character by a newline in Vim
I'm trying to replace each, in the current file by a new line::%s/,/\n/g But it inserts what looks like a ^@ instead of an actual newline. The file is not in DOS mode or anything. What should I do? If you are curious, like me, check the question Why is \r a newline for Vim? as well.
Use \r instead of \n. Substituting by \n inserts a null character into the text. To get a newline, use \r. When searching for a newline, you’d still use \n, however. This asymmetry is due to the fact that \n and \r do slightly different things: \n matches an end of line (newline), whereas \r matches a carriage return. ...
How to replace a character by a newline in Vim I'm trying to replace each, in the current file by a new line::%s/,/\n/g But it inserts what looks like a ^@ instead of an actual newline. The file is not in DOS mode or anything. What should I do? If you are curious, like me, check the question Why is \r a newline for Vim...
TITLE: How to replace a character by a newline in Vim QUESTION: I'm trying to replace each, in the current file by a new line::%s/,/\n/g But it inserts what looks like a ^@ instead of an actual newline. The file is not in DOS mode or anything. What should I do? If you are curious, like me, check the question Why is \r...
[ "vim", "replace", "escaping", "newline", "vi" ]
2,414
3,118
1,068,546
12
0
2008-09-16T11:19:39.077000
2008-09-16T11:21:03.300000
71,328
71,444
What are the best practices for avoiding xss attacks in a PHP site
I have PHP configured so that magic quotes are on and register globals are off. I do my best to always call htmlentities() for anything I am outputing that is derived from user input. I also occasionally seach my database for common things used in xss attached such as...
Escaping input is not the best you can do for successful XSS prevention. Also output must be escaped. If you use Smarty template engine, you may use |escape:'htmlall' modifier to convert all sensitive characters to HTML entities (I use own |e modifier which is alias to the above). My approach to input/output security i...
What are the best practices for avoiding xss attacks in a PHP site I have PHP configured so that magic quotes are on and register globals are off. I do my best to always call htmlentities() for anything I am outputing that is derived from user input. I also occasionally seach my database for common things used in xss a...
TITLE: What are the best practices for avoiding xss attacks in a PHP site QUESTION: I have PHP configured so that magic quotes are on and register globals are off. I do my best to always call htmlentities() for anything I am outputing that is derived from user input. I also occasionally seach my database for common th...
[ "php", "security", "xss" ]
68
60
29,362
20
0
2008-09-16T11:20:02.680000
2008-09-16T11:41:23.207000
71,336
71,642
Whatever happened to jEdit
I'm not sure if many people know about this text-editor? jEdit was kinda big in 2004, but now, Notepad++ seems to have taken the lead(on Windows) Many of the plugins haven't been updated since 2003 and the overal layout and usage is confusing... I'm sure jEdit has many nifty features, but I'll be damned if I can find o...
I've been using jEdit for a few years now, mainly on windows, but also on Ubuntu. I use it for: SQL, awk, batch files, html, xml, javascript... Just about everything except.NET stuff (for which I use Visual Studio). I love it. summary I use jEdit because it has the right balance for me of ease of setting up vs. feature...
Whatever happened to jEdit I'm not sure if many people know about this text-editor? jEdit was kinda big in 2004, but now, Notepad++ seems to have taken the lead(on Windows) Many of the plugins haven't been updated since 2003 and the overal layout and usage is confusing... I'm sure jEdit has many nifty features, but I'l...
TITLE: Whatever happened to jEdit QUESTION: I'm not sure if many people know about this text-editor? jEdit was kinda big in 2004, but now, Notepad++ seems to have taken the lead(on Windows) Many of the plugins haven't been updated since 2003 and the overal layout and usage is confusing... I'm sure jEdit has many nifty...
[ "editor", "jedit" ]
23
30
14,827
11
0
2008-09-16T11:21:10.117000
2008-09-16T12:18:11.260000
71,365
71,490
How to create project specific respository post-commit actions
Presently, we've got several main projects each in their own repository. We will have to version-control up to a dozen additional projects. VisualSVN recommends to create 1 respository for our company and then vc all projects inside that. It's a good practice to create one repository for the entire company or departmen...
I'm not sure I would agree with that VisualSVN recommendation. I have always set up separate repositories per project, and I've never run into a situation where I wish I could have merged across projects or something. If there is a chunk of common code that is shared among projects at your company, it should become a s...
How to create project specific respository post-commit actions Presently, we've got several main projects each in their own repository. We will have to version-control up to a dozen additional projects. VisualSVN recommends to create 1 respository for our company and then vc all projects inside that. It's a good practi...
TITLE: How to create project specific respository post-commit actions QUESTION: Presently, we've got several main projects each in their own repository. We will have to version-control up to a dozen additional projects. VisualSVN recommends to create 1 respository for our company and then vc all projects inside that. ...
[ "svn", "version-control" ]
3
0
618
3
0
2008-09-16T11:25:28.907000
2008-09-16T11:48:25.887000
71,374
71,552
Fastest API for rendering text in Windows Forms?
We need to optimize the text rendering for a C# Windows Forms application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family and size is consistent across the cells, though the color may vary from cell to...
A Microsoft developer has posted a GDI vs. GDI+ Text Rendering Performance article on his blog which answers the raw speed question: on his system, GDI DrawText was about 6 times faster than GDI+ DrawString. If you need to be a real speed demon, TextOut is faster than DrawText, but you'll have to take care of clipping ...
Fastest API for rendering text in Windows Forms? We need to optimize the text rendering for a C# Windows Forms application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family and size is consistent across ...
TITLE: Fastest API for rendering text in Windows Forms? QUESTION: We need to optimize the text rendering for a C# Windows Forms application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family and size is ...
[ "c#", "windows", "performance" ]
14
6
10,005
6
0
2008-09-16T11:27:07.653000
2008-09-16T12:01:20.927000
71,381
401,797
Worth migrating to Rake?
Is it really advantageous to move to Rake from ant? Anyone migrated from ant and find something monumental? FYI: Current environment is Ant for J2ME builds
I would say yes, but I have a different perspective than a Java-environment guy, because I'm a.NET-environment guy. I had written and maintained a non-trivial build script (clean, generate-assembly-info, build, test, coverage, analysis, package) in msbuild (MS' XML-driven NAnt effort) and it was very painful: XML isn't...
Worth migrating to Rake? Is it really advantageous to move to Rake from ant? Anyone migrated from ant and find something monumental? FYI: Current environment is Ant for J2ME builds
TITLE: Worth migrating to Rake? QUESTION: Is it really advantageous to move to Rake from ant? Anyone migrated from ant and find something monumental? FYI: Current environment is Ant for J2ME builds ANSWER: I would say yes, but I have a different perspective than a Java-environment guy, because I'm a.NET-environment g...
[ "ant", "build-automation", "rake" ]
8
9
1,578
4
0
2008-09-16T11:28:46.917000
2008-12-30T23:07:54.850000
71,416
72,599
Forward declaring an enum in C++
I'm trying to do something like the following: enum E; void Foo(E e); enum E {A, B, C}; which the compiler rejects. I've had a quick look on Google and the consensus seems to be "you can't do it". Why is that? Clarification 2: I'm doing this as I have private methods in a class that take said enum, and I do not want ...
The reason the enum can't be forward declared is that, without knowing the values, the compiler can't know the storage required for the enum variable. C++ compilers are allowed to specify the actual storage space based on the size necessary to contain all the values specified. If all that is visible is the forward decl...
Forward declaring an enum in C++ I'm trying to do something like the following: enum E; void Foo(E e); enum E {A, B, C}; which the compiler rejects. I've had a quick look on Google and the consensus seems to be "you can't do it". Why is that? Clarification 2: I'm doing this as I have private methods in a class that t...
TITLE: Forward declaring an enum in C++ QUESTION: I'm trying to do something like the following: enum E; void Foo(E e); enum E {A, B, C}; which the compiler rejects. I've had a quick look on Google and the consensus seems to be "you can't do it". Why is that? Clarification 2: I'm doing this as I have private methods...
[ "c++", "enums", "forward-declaration" ]
310
230
261,153
20
0
2008-09-16T11:34:53.283000
2008-09-16T14:02:47.297000
71,417
73,438
Why is \r a newline for Vim?
From question How to replace a character for a newline in Vim?. You have to use \r when replacing text for a newline, like this:%s/%/\r/g But when replacing end of lines and newlines for a character, you can do it like::%s/\n/%/g What section of the manual documents these behaviors, and what's the reasoning behind them...
From vim docs on patterns: \r matches \n matches an end-of-line - When matching in a string instead of buffer text a literal newline character is matched.
Why is \r a newline for Vim? From question How to replace a character for a newline in Vim?. You have to use \r when replacing text for a newline, like this:%s/%/\r/g But when replacing end of lines and newlines for a character, you can do it like::%s/\n/%/g What section of the manual documents these behaviors, and wha...
TITLE: Why is \r a newline for Vim? QUESTION: From question How to replace a character for a newline in Vim?. You have to use \r when replacing text for a newline, like this:%s/%/\r/g But when replacing end of lines and newlines for a character, you can do it like::%s/\n/%/g What section of the manual documents these ...
[ "vim" ]
285
157
64,479
5
0
2008-09-16T11:34:58.773000
2008-09-16T15:16:17.540000
71,423
71,665
Disable selection of rows in a datagridview
I want to disable the selection of certain rows in a datagridview. It must be possible to remove the select property for one or more datagridview rows in a datagridview shown in a winform. The goal is that the user can't select certain rows. (depending on a condition) Thankx,
If SelectionMode is FullRowSelect, then you'll need to override SetSelectedRowCore for that DataGridView, and not call the base SetSelectedRowCore for rows you don't want selected. If SelectionMode is not FullRowSelect, you'll want to additionally override SetSelectedCellCore (and not call the base SetSelectedCellCore ...
Disable selection of rows in a datagridview I want to disable the selection of certain rows in a datagridview. It must be possible to remove the select property for one or more datagridview rows in a datagridview shown in a winform. The goal is that the user can't select certain rows. (depending on a condition) Thankx,
TITLE: Disable selection of rows in a datagridview QUESTION: I want to disable the selection of certain rows in a datagridview. It must be possible to remove the select property for one or more datagridview rows in a datagridview shown in a winform. The goal is that the user can't select certain rows. (depending on a ...
[ ".net", "winforms", "datagridview", "user-interface" ]
12
16
26,565
2
0
2008-09-16T11:36:09.007000
2008-09-16T12:22:12.360000
71,429
72,163
Which Desktop Virtualization software runs most smoothly?
Background: I'm running a full-time job and a part-time job in the weekends, and both my employers have supplied a laptop for me to work on. Of course I also have my powerful workstation at home to work from, and sometimes when I'm at the office at my weekend job (it's in another city) I'm working from yet another work...
I am a consultant and tend to work in a variety of environments. I carry a Thinkpad running VMWare Server over Ubuntu64 with 4GB of RAM. I've got a 320GB secondary hard drive that I use just for VM's and have 25 or so different virtual machines that I boot up as the circumstances demand. They're a mix of Linux servers ...
Which Desktop Virtualization software runs most smoothly? Background: I'm running a full-time job and a part-time job in the weekends, and both my employers have supplied a laptop for me to work on. Of course I also have my powerful workstation at home to work from, and sometimes when I'm at the office at my weekend jo...
TITLE: Which Desktop Virtualization software runs most smoothly? QUESTION: Background: I'm running a full-time job and a part-time job in the weekends, and both my employers have supplied a laptop for me to work on. Of course I also have my powerful workstation at home to work from, and sometimes when I'm at the offic...
[ "desktop", "virtualization", "remote-desktop", "system-administration", "vdi" ]
6
12
2,905
6
0
2008-09-16T11:37:39.050000
2008-09-16T13:29:22.337000
71,440
71,454
Set a UserControl Property to Not Show Up in VS Properties Window
I have a UserControl in my Asp.net project that has a public property. I do not want this property to show up in the Visual Studio Property Window when a user highlights an instance of the UserControl in the IDE. What attribute (or other method) should I use to prevent it from showing up? class MyControl: System.Web.UI...
Use the following attribute... using System.ComponentModel; [Browsable(false)] public bool SampleProperty { get; set; } In VB.net, this will be:
Set a UserControl Property to Not Show Up in VS Properties Window I have a UserControl in my Asp.net project that has a public property. I do not want this property to show up in the Visual Studio Property Window when a user highlights an instance of the UserControl in the IDE. What attribute (or other method) should I...
TITLE: Set a UserControl Property to Not Show Up in VS Properties Window QUESTION: I have a UserControl in my Asp.net project that has a public property. I do not want this property to show up in the Visual Studio Property Window when a user highlights an instance of the UserControl in the IDE. What attribute (or othe...
[ "c#", "asp.net", "visual-studio", "properties", "attributes" ]
6
11
9,055
3
0
2008-09-16T11:41:03.377000
2008-09-16T11:43:03.637000
71,468
72,957
OCSP command-line test tool?
Does anybody know of a tool to test OCSP responses? Preferably, something that can be used from a Windows Command-line and/or can be included (easily) in a Java/python program
Looking a bit more, I think I've found some answers: a) OpenSSL at the rescue: openssl ocsp -whatever For more info, http://www.openssl.org/docs/apps/ocsp.html b) http://www.openvalidation.org/ is another way of testing a cert. And via its links, I got to: http://security.polito.it/tools/ocsp/ Ascertia OCSP Client tool...
OCSP command-line test tool? Does anybody know of a tool to test OCSP responses? Preferably, something that can be used from a Windows Command-line and/or can be included (easily) in a Java/python program
TITLE: OCSP command-line test tool? QUESTION: Does anybody know of a tool to test OCSP responses? Preferably, something that can be used from a Windows Command-line and/or can be included (easily) in a Java/python program ANSWER: Looking a bit more, I think I've found some answers: a) OpenSSL at the rescue: openssl o...
[ "java", "python", "command-line", "ocsp" ]
3
4
8,933
5
0
2008-09-16T11:44:28.643000
2008-09-16T14:32:40.190000
71,469
71,504
Map of Enums and dependency injection in Spring 2.5
Let's assume we've got the following Java code: public class Maintainer { private Map > map; public Maintainer() { this.map = new java.util.ConcurrentHashMap >(); } public void addListener( Listener listener, Enum eventType ) { List listeners; if( ( listeners = map.get( eventType ) ) == null ) { listeners = new java....
What would be wrong with doing something like the following: Defining a 'Maintainer' interface with the addListener(Listener, Enum) method. Create a DefaultMaintainer class (as above) which implements Maintainer. Then, in each Listener class, 'inject' the Maintainer interface (constructor injection might be a good choi...
Map of Enums and dependency injection in Spring 2.5 Let's assume we've got the following Java code: public class Maintainer { private Map > map; public Maintainer() { this.map = new java.util.ConcurrentHashMap >(); } public void addListener( Listener listener, Enum eventType ) { List listeners; if( ( listeners = map....
TITLE: Map of Enums and dependency injection in Spring 2.5 QUESTION: Let's assume we've got the following Java code: public class Maintainer { private Map > map; public Maintainer() { this.map = new java.util.ConcurrentHashMap >(); } public void addListener( Listener listener, Enum eventType ) { List listeners; if( ...
[ "java", "spring", "enums", "maps" ]
3
3
6,793
5
0
2008-09-16T11:44:28.877000
2008-09-16T11:51:23.773000
71,475
1,198,602
Virtual Files are opened from Temporary Internet Files
I have created a namespace extension that is rooted under Desktop. The main purpose of the extension is to provide a virtual list of ZIP files that represent a list of configurable directories. When the user clicks one of the those items the contents of the related directory are zipped in place and the resulting ZIP fi...
The problem was fixed by masking SFGAO_FILESYSTEM in the attributes returned by implementation of interface method IShellFolder::GetAttributesOf.
Virtual Files are opened from Temporary Internet Files I have created a namespace extension that is rooted under Desktop. The main purpose of the extension is to provide a virtual list of ZIP files that represent a list of configurable directories. When the user clicks one of the those items the contents of the related...
TITLE: Virtual Files are opened from Temporary Internet Files QUESTION: I have created a namespace extension that is rooted under Desktop. The main purpose of the extension is to provide a virtual list of ZIP files that represent a list of configurable directories. When the user clicks one of the those items the conte...
[ "c++", "windows", "shell32" ]
0
0
536
2
0
2008-09-16T11:45:43.240000
2009-07-29T07:40:29.423000
71,488
71,638
Calling a .Net Assembly from a SQL Server 2005 Reporting Services report?
I've currently got a set of reports with a number of common functions sitting in code blocks within the.rdl files. This obviously presents a maintainability issue and I as wondering if anyone knew a way for these different reports to share a library of common code? Ideally I'd like to have a.Net Assembly attached to my...
From within Visual Studio in the properties of the report, on the 'References' tab add the details for the assembly that contains the managed code. This code can be called from expressions within reports using the instance name that is specified. This assembly can either be stored in the GAC or the PrivateAssemblies di...
Calling a .Net Assembly from a SQL Server 2005 Reporting Services report? I've currently got a set of reports with a number of common functions sitting in code blocks within the.rdl files. This obviously presents a maintainability issue and I as wondering if anyone knew a way for these different reports to share a libr...
TITLE: Calling a .Net Assembly from a SQL Server 2005 Reporting Services report? QUESTION: I've currently got a set of reports with a number of common functions sitting in code blocks within the.rdl files. This obviously presents a maintainability issue and I as wondering if anyone knew a way for these different repor...
[ "sql-server", "reporting-services" ]
2
5
4,564
5
0
2008-09-16T11:47:52.067000
2008-09-16T12:17:27.940000
71,513
71,597
Which version of Perl should I use on Windows?
The win32.perl.org web site provides references to several Perl distributions for MS Windows. For a long time I have been using ActivePerl from ActiveState but recently I switched to Strawberry Perl. IMHO The only advantage that Active Perl still has over Strawberry Perl is the fact that it comes with Perl Tk which mea...
Strawberry Perl is just getting better and better. One problem I've repeatedly had with ActiveState is that my modules sometimes fail to install because I need an upgrade to a core module, but they won't allow that. Thus, everybody who doesn't use Windows can use my code, but they can't do that with ActiveState's Perl....
Which version of Perl should I use on Windows? The win32.perl.org web site provides references to several Perl distributions for MS Windows. For a long time I have been using ActivePerl from ActiveState but recently I switched to Strawberry Perl. IMHO The only advantage that Active Perl still has over Strawberry Perl i...
TITLE: Which version of Perl should I use on Windows? QUESTION: The win32.perl.org web site provides references to several Perl distributions for MS Windows. For a long time I have been using ActivePerl from ActiveState but recently I switched to Strawberry Perl. IMHO The only advantage that Active Perl still has over...
[ "windows", "perl", "debugging", "strawberry-perl" ]
103
82
60,777
11
0
2008-09-16T11:53:41.210000
2008-09-16T12:10:28.113000
71,525
71,549
Topology drawing tool
I need to draw some simple network topology charts, suggestions of some good tools appreciated. Edit: love freeware:-)
SmartDraw is the best there is. It costs, but is worth the dosh.
Topology drawing tool I need to draw some simple network topology charts, suggestions of some good tools appreciated. Edit: love freeware:-)
TITLE: Topology drawing tool QUESTION: I need to draw some simple network topology charts, suggestions of some good tools appreciated. Edit: love freeware:-) ANSWER: SmartDraw is the best there is. It costs, but is worth the dosh.
[ "topology" ]
1
4
11,186
6
0
2008-09-16T11:56:12.420000
2008-09-16T12:00:26.420000
71,561
71,902
How to simulate pressing enter in html text input with Selenium?
In a web interface, I've got a text field. When user enters text and accepts with enter, application performs an action. I wanted to test the behavior with Selenium. Unfortunately, invoking 'keypress' with chr(13) insert representation of the character into the field. Is there a way other then submitting the form? I'd ...
This Java code works for me: selenium.keyDown(id, "\\13"); Notice the escape. You probably need something like chr(\13)
How to simulate pressing enter in html text input with Selenium? In a web interface, I've got a text field. When user enters text and accepts with enter, application performs an action. I wanted to test the behavior with Selenium. Unfortunately, invoking 'keypress' with chr(13) insert representation of the character in...
TITLE: How to simulate pressing enter in html text input with Selenium? QUESTION: In a web interface, I've got a text field. When user enters text and accepts with enter, application performs an action. I wanted to test the behavior with Selenium. Unfortunately, invoking 'keypress' with chr(13) insert representation o...
[ "user-interface", "selenium", "selenium-rc" ]
9
10
18,394
5
0
2008-09-16T12:03:23.650000
2008-09-16T12:56:56.660000
71,562
71,604
Make SQL Server index small numbers
We're using SQL Server 2005 in a project. The users of the system have the ability to search some objects by using 'keywords'. The way we implement this is by creating a full-text catalog for the significant columns in each table that may contain these 'keywords' and then using CONTAINS to search for the keywords the u...
These "small words" are considered "noise words" by the full text index. You can customize the list of noise words. This blog post provides more details. You need to repopulate your full text index when you change the noise words file.
Make SQL Server index small numbers We're using SQL Server 2005 in a project. The users of the system have the ability to search some objects by using 'keywords'. The way we implement this is by creating a full-text catalog for the significant columns in each table that may contain these 'keywords' and then using CONTA...
TITLE: Make SQL Server index small numbers QUESTION: We're using SQL Server 2005 in a project. The users of the system have the ability to search some objects by using 'keywords'. The way we implement this is by creating a full-text catalog for the significant columns in each table that may contain these 'keywords' an...
[ "sql-server", "full-text-search" ]
6
2
2,392
3
0
2008-09-16T12:03:30.483000
2008-09-16T12:11:49.513000
71,565
71,896
One method for creating several objects or several methods for creating single objects?
If I have the following: Public Class Product Public Id As Integer Public Name As String Public AvailableColours As List(Of Colour) Public AvailableSizes As List(Of Size) End Class and I want to get a list of products from the database and display them on a page along with their available sizes and colours, should I ha...
You're probably best off benchmarking both and finding out. I've seen situations where just doing multiple queries (MySQL likes this) is faster than JOINs and one big slow query that takes a lot memory and causes the DB server to thrash. I say benchmark because it's going to depend on your database server, how much mem...
One method for creating several objects or several methods for creating single objects? If I have the following: Public Class Product Public Id As Integer Public Name As String Public AvailableColours As List(Of Colour) Public AvailableSizes As List(Of Size) End Class and I want to get a list of products from the datab...
TITLE: One method for creating several objects or several methods for creating single objects? QUESTION: If I have the following: Public Class Product Public Id As Integer Public Name As String Public AvailableColours As List(Of Colour) Public AvailableSizes As List(Of Size) End Class and I want to get a list of produ...
[ ".net", "database", "performance" ]
0
1
229
8
0
2008-09-16T12:03:49.907000
2008-09-16T12:56:19.670000
71,578
71,640
How would I change an Access DB from ISO-8859-2 to UTF-8 in a connection string?
I have a database in ISO-8859-2 format, but I need to create XML in UTF-8. This means that I must encode the database before printing in UTF-8. I know very little about ASP.Net. In PHP I would do something like this: db_connect(); mysql_query("SET NAMES 'UTF8'"); mysql_query("SET character_set_client='UTF8'"); This is ...
Assuming you have a value string in str, this is the pure-.NET way of doing this. var encoding = System.Text.Encoding.GetEncoding("iso-8859-2"); var bytes = System.Text.Encoding.Convert(encoding, System.Text.Encoding.Default, encoding.GetBytes(str)); var newString = System.Text.Encoding.Default.GetString(bytes);
How would I change an Access DB from ISO-8859-2 to UTF-8 in a connection string? I have a database in ISO-8859-2 format, but I need to create XML in UTF-8. This means that I must encode the database before printing in UTF-8. I know very little about ASP.Net. In PHP I would do something like this: db_connect(); mysql_qu...
TITLE: How would I change an Access DB from ISO-8859-2 to UTF-8 in a connection string? QUESTION: I have a database in ISO-8859-2 format, but I need to create XML in UTF-8. This means that I must encode the database before printing in UTF-8. I know very little about ASP.Net. In PHP I would do something like this: db_c...
[ "asp.net", "ms-access" ]
0
2
1,997
2
0
2008-09-16T12:06:26.093000
2008-09-16T12:17:35.210000
71,585
71,753
How to get parametrized Class instance
Since generics were introduced, Class is parametrized, so that List.class produces Class. This is clear. What I am not able to figure out is how to get a instance of Class of type which is parametrized itself, i.e. Class >. Like in this snippet: public class GenTest { static T instantiate(Class clazz) throws Exception ...
The Class class is a run-time representation of a type. Since parametrized types undergo type erasure at runtime, the class object for Class would be the same as for Class > and Class >. The reason you cannot instantiate them using the.class notation is that this is a special syntax used for class literals. The Java La...
How to get parametrized Class instance Since generics were introduced, Class is parametrized, so that List.class produces Class. This is clear. What I am not able to figure out is how to get a instance of Class of type which is parametrized itself, i.e. Class >. Like in this snippet: public class GenTest { static T ins...
TITLE: How to get parametrized Class instance QUESTION: Since generics were introduced, Class is parametrized, so that List.class produces Class. This is clear. What I am not able to figure out is how to get a instance of Class of type which is parametrized itself, i.e. Class >. Like in this snippet: public class GenT...
[ "java", "generics" ]
9
8
5,365
4
0
2008-09-16T12:08:21.830000
2008-09-16T12:35:42.310000
71,590
165,872
How to display the progress of a server script in jQuery?
With this code I can show an animated gif while the server script is running: function calculateTotals() { $('#results').load('getResults.php', null, showStatusFinished); showLoadStatus(); } function showLoadStatus() { $('#status').html(''); } function showStatusFinished() { $('#status').html('Finished.'); } However,...
After reading your comments to Andrew's answer. You would read the status like this: function getStatus() { $.getJSON("/status.php",{"session":0, "requestID":12345}, function(data) { //data is the returned JSON object from the server {name:"value"} setStatus(data.status); window.setTimeout("getStatus()",intervalInMS) }...
How to display the progress of a server script in jQuery? With this code I can show an animated gif while the server script is running: function calculateTotals() { $('#results').load('getResults.php', null, showStatusFinished); showLoadStatus(); } function showLoadStatus() { $('#status').html(''); } function showSta...
TITLE: How to display the progress of a server script in jQuery? QUESTION: With this code I can show an animated gif while the server script is running: function calculateTotals() { $('#results').load('getResults.php', null, showStatusFinished); showLoadStatus(); } function showLoadStatus() { $('#status').html(''); }...
[ "jquery", "ajax" ]
6
2
5,322
4
0
2008-09-16T12:08:45.807000
2008-10-03T06:11:10.200000
71,599
80,481
How to get IKVM to build in Visual Studio 2008?
I've downloaded the IKVM sources ( http://www.ikvm.net/ ) from http://sourceforge.net/cvs/?group_id=69637 Now I'm trying to get it to build in Visual Studio 2008 and am stuck. Does anyone know of documentation of how to build the thing, or could even give me pointers? I've tried opening the ikvm8.sln, which opens all t...
OK just got the following reply from the author: http://weblog.ikvm.net/CommentView.aspx?guid=7e91b51d-6f84-4485-b61f-ea9e068a5fcf If you want to build from cvs, you're on your own. However, you can more easily build from source if you use an official release. If you download ikvm-0.36.0.11.zip, classpath-0.95-stripped...
How to get IKVM to build in Visual Studio 2008? I've downloaded the IKVM sources ( http://www.ikvm.net/ ) from http://sourceforge.net/cvs/?group_id=69637 Now I'm trying to get it to build in Visual Studio 2008 and am stuck. Does anyone know of documentation of how to build the thing, or could even give me pointers? I'v...
TITLE: How to get IKVM to build in Visual Studio 2008? QUESTION: I've downloaded the IKVM sources ( http://www.ikvm.net/ ) from http://sourceforge.net/cvs/?group_id=69637 Now I'm trying to get it to build in Visual Studio 2008 and am stuck. Does anyone know of documentation of how to build the thing, or could even giv...
[ "c#", "visual-studio-2008", "compiler-errors", "ikvm" ]
7
0
2,831
3
0
2008-09-16T12:10:59.593000
2008-09-17T06:15:32.060000
71,602
71,627
Referenced Assemblies in Web Site
Am I correct in assuming that I always need to explicitly deploy referenced assemblies when their source changes?
Yes you do. If you use the publish command in Visual Studios, it will include all the assemblies you need in the folder you selected to publish your site. If a.dll has changed and you need to update your site, you can just publish again or copy the.dll.
Referenced Assemblies in Web Site Am I correct in assuming that I always need to explicitly deploy referenced assemblies when their source changes?
TITLE: Referenced Assemblies in Web Site QUESTION: Am I correct in assuming that I always need to explicitly deploy referenced assemblies when their source changes? ANSWER: Yes you do. If you use the publish command in Visual Studios, it will include all the assemblies you need in the folder you selected to publish y...
[ "asp.net" ]
3
2
134
1
0
2008-09-16T12:11:23.570000
2008-09-16T12:15:51.483000
71,608
71,678
How do you set up your .NET development tree?
How do you set up your.NET development tree? I use a structure like this: -projectname --config (where I put the configuration files) --doc (where I put all the document concerning the project: e-mails, documentation) --tools (all the tools I use: Nunit, Moq) --lib (all the libraries used by the solution: ninject or au...
We use a very similar layout as covered in JP Boodhoo's blog post titled Directory Structure For Projects.
How do you set up your .NET development tree? How do you set up your.NET development tree? I use a structure like this: -projectname --config (where I put the configuration files) --doc (where I put all the document concerning the project: e-mails, documentation) --tools (all the tools I use: Nunit, Moq) --lib (all the...
TITLE: How do you set up your .NET development tree? QUESTION: How do you set up your.NET development tree? I use a structure like this: -projectname --config (where I put the configuration files) --doc (where I put all the document concerning the project: e-mails, documentation) --tools (all the tools I use: Nunit, M...
[ "c#", ".net", "development-environment" ]
15
8
1,955
8
0
2008-09-16T12:12:34.283000
2008-09-16T12:23:54.383000
71,625
74,400
Why would a static nested interface be used in Java?
I have just found a static nested interface in our code-base. class Foo { public static interface Bar { /* snip */ } /* snip */ } I have never seen this before. The original developer is out of reach. Therefore I have to ask SO: What are the semantics behind a static interface? What would change, if I remove the static...
The static keyword in the above example is redundant (a nested interface is automatically "static") and can be removed with no effect on semantics; I would recommend it be removed. The same goes for "public" on interface methods and "public final" on interface fields - the modifiers are redundant and just add clutter t...
Why would a static nested interface be used in Java? I have just found a static nested interface in our code-base. class Foo { public static interface Bar { /* snip */ } /* snip */ } I have never seen this before. The original developer is out of reach. Therefore I have to ask SO: What are the semantics behind a static...
TITLE: Why would a static nested interface be used in Java? QUESTION: I have just found a static nested interface in our code-base. class Foo { public static interface Bar { /* snip */ } /* snip */ } I have never seen this before. The original developer is out of reach. Therefore I have to ask SO: What are the semanti...
[ "java", "interface", "static" ]
242
306
83,580
11
0
2008-09-16T12:15:45.307000
2008-09-16T16:46:07.700000
71,643
71,716
How can I check for a file size and add that result in an Excel spreadsheet in Perl?
Currently I monitoring a particular file with a simple shell one-liner: filesize=$(ls -lah somefile | awk '{print $5}') I'm aware that Perl has some nice modules to deal with Excel files so the idea is to, let's say, run that check daily, perhaps with cron, and write the result on a spreadsheet for further statistical ...
You can check the size of the file using the -s operator. use strict; use warnings; use File::Slurp qw(read_file write_file); use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; use Spreadsheet::WriteExcel; my $file = 'path_to_file'; my $size_file = 'path_to_file_keeping_the_size'; my $excel_file = ...
How can I check for a file size and add that result in an Excel spreadsheet in Perl? Currently I monitoring a particular file with a simple shell one-liner: filesize=$(ls -lah somefile | awk '{print $5}') I'm aware that Perl has some nice modules to deal with Excel files so the idea is to, let's say, run that check dai...
TITLE: How can I check for a file size and add that result in an Excel spreadsheet in Perl? QUESTION: Currently I monitoring a particular file with a simple shell one-liner: filesize=$(ls -lah somefile | awk '{print $5}') I'm aware that Perl has some nice modules to deal with Excel files so the idea is to, let's say, ...
[ "perl", "unix", "shell", "ksh" ]
2
7
3,863
5
0
2008-09-16T12:18:13.303000
2008-09-16T12:29:18.923000
71,644
71,900
What is the best way to handle authentication in ASP.NET MVC with a Universe database?
We use an IBM database known as Universe that holds all of our user id's, passwords, and profile information in a table called USERINFO. Can I use the Membership Provider to connect to this database and authenticate the user? The database access is actually through a web service since we don't have a direct connect to ...
As mentioned above, you'll need to create a custom membership provider which a fairly straightforward. You'll create a.NET class that inherits from System.Web.Security.MembershipProvider. There are several methods that need to be overriden in your class, but most are not even used by the MVC account controller. The mai...
What is the best way to handle authentication in ASP.NET MVC with a Universe database? We use an IBM database known as Universe that holds all of our user id's, passwords, and profile information in a table called USERINFO. Can I use the Membership Provider to connect to this database and authenticate the user? The dat...
TITLE: What is the best way to handle authentication in ASP.NET MVC with a Universe database? QUESTION: We use an IBM database known as Universe that holds all of our user id's, passwords, and profile information in a table called USERINFO. Can I use the Membership Provider to connect to this database and authenticate...
[ "c#", "asp.net-mvc", "u2", "universe" ]
3
10
2,098
3
0
2008-09-16T12:18:24.333000
2008-09-16T12:56:53.990000
71,647
71,673
ASP.Net Session_Start event not firing
I have an ASP.Net 2.0 application in which the Session_Start event is not firing in my Global.asax file. Can anyone tell why this is happening and how I can get it working? The application worked fine on my Windows XP development machine, but stopped working when deployed to the server (Win Server 2003/IIS 6/ASP.Net 2....
Is the site precompiled before adding global.asax? Try compiling it again.
ASP.Net Session_Start event not firing I have an ASP.Net 2.0 application in which the Session_Start event is not firing in my Global.asax file. Can anyone tell why this is happening and how I can get it working? The application worked fine on my Windows XP development machine, but stopped working when deployed to the s...
TITLE: ASP.Net Session_Start event not firing QUESTION: I have an ASP.Net 2.0 application in which the Session_Start event is not firing in my Global.asax file. Can anyone tell why this is happening and how I can get it working? The application worked fine on my Windows XP development machine, but stopped working when...
[ "asp.net", "iis", "session", "global-asax" ]
10
2
9,401
4
0
2008-09-16T12:18:58.997000
2008-09-16T12:23:34.820000
71,692
72,118
What's the best way to make a modular java web application
I'm building small web site in Java (Spring MVC with JSP views) and am trying to find best solution for making and including few reusable modules (like "latest news" "upcoming events"...). So the question is: Portlets, tiles or some other technology?
If you are using Spring MVC, then I would recommend using Portlets. In Spring, portlets are just lightweight controllers since they are only responsible for a fragment of the whole page, and are very easy to write. If you are using Spring 2.5, then you can enjoy all the benefits of the new annotation support, and they ...
What's the best way to make a modular java web application I'm building small web site in Java (Spring MVC with JSP views) and am trying to find best solution for making and including few reusable modules (like "latest news" "upcoming events"...). So the question is: Portlets, tiles or some other technology?
TITLE: What's the best way to make a modular java web application QUESTION: I'm building small web site in Java (Spring MVC with JSP views) and am trying to find best solution for making and including few reusable modules (like "latest news" "upcoming events"...). So the question is: Portlets, tiles or some other tech...
[ "java", "spring-mvc", "module" ]
6
4
2,476
7
0
2008-09-16T12:25:45.767000
2008-09-16T13:24:51.553000
71,715
81,953
Integration with Siebel On-Premise CRM?
Has anyone ever integrated an external web application with Siebel On-Premise CRM? Note that I'm not talking about Siebel On-Demand SaaS, but their behind-the-firewall product. Specifically, I'm trying to achieve two-way synchronization of CRM objects (contacts, accounts, sales opportunities) between my web application...
Siebel On-Premise offers a wealth of integration options. Start with Siebel Bookshelf and specifically Integration Platform Technologies: Siebel Enterprise Application Integration. For your more static data, have a look at MDM. In this case refer to Siebel Master Data Applications Reference for Industry Applications. O...
Integration with Siebel On-Premise CRM? Has anyone ever integrated an external web application with Siebel On-Premise CRM? Note that I'm not talking about Siebel On-Demand SaaS, but their behind-the-firewall product. Specifically, I'm trying to achieve two-way synchronization of CRM objects (contacts, accounts, sales o...
TITLE: Integration with Siebel On-Premise CRM? QUESTION: Has anyone ever integrated an external web application with Siebel On-Premise CRM? Note that I'm not talking about Siebel On-Demand SaaS, but their behind-the-firewall product. Specifically, I'm trying to achieve two-way synchronization of CRM objects (contacts,...
[ "integration", "crm", "siebel" ]
2
3
2,913
3
0
2008-09-16T12:29:15.383000
2008-09-17T10:48:51.590000
71,722
72,263
Branching and Merging in VSTS
How effective is merging when folders and projects have been renamed in your solution?
We've had lots of success with TFS 2005 when it comes to file deletes/renames, with a few very specific exceptions, namely: Files which have been renamed in both source and target branches (this is usually trivially solved with a click on "Ignore server changes"); Files which have been renamed in the target branch but ...
Branching and Merging in VSTS How effective is merging when folders and projects have been renamed in your solution?
TITLE: Branching and Merging in VSTS QUESTION: How effective is merging when folders and projects have been renamed in your solution? ANSWER: We've had lots of success with TFS 2005 when it comes to file deletes/renames, with a few very specific exceptions, namely: Files which have been renamed in both source and tar...
[ "visual-studio-2008", "tfs", "visual-studio-2005" ]
1
1
1,811
4
0
2008-09-16T12:30:07.783000
2008-09-16T13:38:08.027000
71,740
864,571
Java Applet crashes .NET Webbrowsercontrol
in our application we have a Java applet running inside a.NET browser control. It is a know issue from Sun that running an applet this way may crash the control. Has anyone come across the same problem and solved it? Atm we are running the applet in a Webbrowser but we need to run it in a browser control. Thx for any h...
After some time the problem solved itself. It was indeed a bug in the java runtime which is now fixed by sun. Just make sure your JRE is > 1.6.10.
Java Applet crashes .NET Webbrowsercontrol in our application we have a Java applet running inside a.NET browser control. It is a know issue from Sun that running an applet this way may crash the control. Has anyone come across the same problem and solved it? Atm we are running the applet in a Webbrowser but we need to...
TITLE: Java Applet crashes .NET Webbrowsercontrol QUESTION: in our application we have a Java applet running inside a.NET browser control. It is a know issue from Sun that running an applet this way may crash the control. Has anyone come across the same problem and solved it? Atm we are running the applet in a Webbrow...
[ "java", "browser", "applet", "controls" ]
0
1
600
2
0
2008-09-16T12:32:56.200000
2009-05-14T17:10:00.127000
71,749
272,599
How good are the tools to migrate to and from Team System?
I was wondering if anyone tried migrating between TS and SVN/CC. What I mean by migrating is importing and exporting the repository between source control systems without losing the history. How good are the tools to migrate to and from VSTS? I am also interested in knowing any opinion regarding using Team System from ...
Try tfs2svn... worked great for a project with 1200 TFS changesets. It was a bit fussy to setup when svn authentication is enabled, but otherwise great. http://sourceforge.net/projects/tfs2svn/
How good are the tools to migrate to and from Team System? I was wondering if anyone tried migrating between TS and SVN/CC. What I mean by migrating is importing and exporting the repository between source control systems without losing the history. How good are the tools to migrate to and from VSTS? I am also interest...
TITLE: How good are the tools to migrate to and from Team System? QUESTION: I was wondering if anyone tried migrating between TS and SVN/CC. What I mean by migrating is importing and exporting the repository between source control systems without losing the history. How good are the tools to migrate to and from VSTS? ...
[ "svn", "migration", "cruisecontrol.net" ]
4
3
375
3
0
2008-09-16T12:35:07.490000
2008-11-07T16:21:02.693000
71,756
71,784
Is there some way to inject SQL even if the ' character is deleted?
If I remove all the ' characters from a SQL query, is there some other way to do a SQL injection attack on the database? How can it be done? Can anyone give me examples?
Yes, there is. An excerpt from Wikipedia "SELECT * FROM data WHERE id = " + a_variable + ";" It is clear from this statement that the author intended a_variable to be a number correlating to the "id" field. However, if it is in fact a string then the end user may manipulate the statement as they choose, thereby bypassi...
Is there some way to inject SQL even if the ' character is deleted? If I remove all the ' characters from a SQL query, is there some other way to do a SQL injection attack on the database? How can it be done? Can anyone give me examples?
TITLE: Is there some way to inject SQL even if the ' character is deleted? QUESTION: If I remove all the ' characters from a SQL query, is there some other way to do a SQL injection attack on the database? How can it be done? Can anyone give me examples? ANSWER: Yes, there is. An excerpt from Wikipedia "SELECT * FROM...
[ "sql", "database", "sql-injection" ]
13
23
4,004
14
0
2008-09-16T12:36:16.787000
2008-09-16T12:41:20.487000
71,766
72,047
Class/Static Constants in Delphi
In Delphi, I want to be able to create an private object that's associated with a class, and access it from all instances of that class. In Java, I'd use: public class MyObject { private static final MySharedObject mySharedObjectInstance = new MySharedObject(); } Or, if MySharedObject needed more complicated initializa...
Here is how I'll do that using a class variable, a class procedure and an initialization block: unit MyObject; interface type TMyObject = class private class var FLogger: TLogLogger; public class procedure SetLogger(value:TLogLogger); class procedure FreeLogger; end; implementation class procedure TMyObject.SetLog...
Class/Static Constants in Delphi In Delphi, I want to be able to create an private object that's associated with a class, and access it from all instances of that class. In Java, I'd use: public class MyObject { private static final MySharedObject mySharedObjectInstance = new MySharedObject(); } Or, if MySharedObject n...
TITLE: Class/Static Constants in Delphi QUESTION: In Delphi, I want to be able to create an private object that's associated with a class, and access it from all instances of that class. In Java, I'd use: public class MyObject { private static final MySharedObject mySharedObjectInstance = new MySharedObject(); } Or, i...
[ "delphi" ]
16
18
27,692
9
0
2008-09-16T12:38:14.270000
2008-09-16T13:14:43.997000
71,775
72,018
Can Unix shell script be used to manipulate databases?
I have to read data from some files and insert the data into different tables in a database. Is Unix shell script powerful enough to do the job? Is it easy to do the job in shell script or should I go about doing this in Java?
If the data you are trying to import is in a reasonable format -- comma-delimited, for example -- and your database server has reasonable command line utilities, this should be no problem. MySQL has the "mysqlimport" command-line tool that will accept various arguments describing the format of the file: mysqlimport \ -...
Can Unix shell script be used to manipulate databases? I have to read data from some files and insert the data into different tables in a database. Is Unix shell script powerful enough to do the job? Is it easy to do the job in shell script or should I go about doing this in Java?
TITLE: Can Unix shell script be used to manipulate databases? QUESTION: I have to read data from some files and insert the data into different tables in a database. Is Unix shell script powerful enough to do the job? Is it easy to do the job in shell script or should I go about doing this in Java? ANSWER: If the data...
[ "database", "shell", "unix" ]
1
3
3,418
8
0
2008-09-16T12:39:49.163000
2008-09-16T13:10:00.467000
71,776
71,808
Grabbing every 4th file
I have 16,000 jpg's from a webcan screeb grabber that I let run for a year pointing into the back year. I want to find a way to grab every 4th image so that I can then put them into another directory so I can later turn them into a movie. Is there a simple bash script or other way under linux that I can do this. They a...
One simple way is: $ touch a b c d e f g h i j k l m n o p q r s t u v w x y z $ mv $(ls | awk '{nr++; if (nr % 4 == 0) print $0}') destdir
Grabbing every 4th file I have 16,000 jpg's from a webcan screeb grabber that I let run for a year pointing into the back year. I want to find a way to grab every 4th image so that I can then put them into another directory so I can later turn them into a movie. Is there a simple bash script or other way under linux th...
TITLE: Grabbing every 4th file QUESTION: I have 16,000 jpg's from a webcan screeb grabber that I let run for a year pointing into the back year. I want to find a way to grab every 4th image so that I can then put them into another directory so I can later turn them into a movie. Is there a simple bash script or other ...
[ "bash", "scripting" ]
4
13
4,044
9
0
2008-09-16T12:40:11.050000
2008-09-16T12:45:22.023000
71,788
145,431
Getting Emacs fill-paragraph to play nice with javadoc-like comments
I'm writing an Emacs major mode for an APL dialect I use at work. I've gotten basic font locking to work, and after setting comment-start and comment-start-skip, comment/uncomment region and fill paragraph also work. However, comment blocks often contain javadoc style comments and i would like fill-paragraph to avoid g...
The problem was that the paragraph-start regexp has to match the entire line to work, including the actual comment character. The following elisp works for the example I gave: (setq paragraph-start "^\\s-*\\#\\s-*\\\\\\(arg\\|ret\\).*$") Here a page that has an example regexp for php-mode that does this: http://barelye...
Getting Emacs fill-paragraph to play nice with javadoc-like comments I'm writing an Emacs major mode for an APL dialect I use at work. I've gotten basic font locking to work, and after setting comment-start and comment-start-skip, comment/uncomment region and fill paragraph also work. However, comment blocks often cont...
TITLE: Getting Emacs fill-paragraph to play nice with javadoc-like comments QUESTION: I'm writing an Emacs major mode for an APL dialect I use at work. I've gotten basic font locking to work, and after setting comment-start and comment-start-skip, comment/uncomment region and fill paragraph also work. However, comment...
[ "emacs", "elisp" ]
11
4
1,686
3
0
2008-09-16T12:42:34.727000
2008-09-28T07:45:37.363000
71,817
72,596
Using the docstring from one method to automatically overwrite that of another method
The problem: I have a class which contains a template method execute which calls another method _execute. Subclasses are supposed to overwrite _execute to implement some specific functionality. This functionality should be documented in the docstring of _execute. Advanced users can create their own subclasses to extend...
Well, if you don't mind copying the original method in the subclass, you can use the following technique. import new def copyfunc(func): return new.function(func.func_code, func.func_globals, func.func_name, func.func_defaults, func.func_closure) class Metaclass(type): def __new__(meta, name, bases, attrs): for key i...
Using the docstring from one method to automatically overwrite that of another method The problem: I have a class which contains a template method execute which calls another method _execute. Subclasses are supposed to overwrite _execute to implement some specific functionality. This functionality should be documented ...
TITLE: Using the docstring from one method to automatically overwrite that of another method QUESTION: The problem: I have a class which contains a template method execute which calls another method _execute. Subclasses are supposed to overwrite _execute to implement some specific functionality. This functionality sho...
[ "python", "metaclass" ]
5
5
3,394
5
0
2008-09-16T12:46:28.150000
2008-09-16T14:02:38.390000
71,838
72,782
DataGridView.HitTestInfo equivalent in Infragistics.Win.UltraWinGrid.UltraGrid?
Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of DataGridView.HitTestInfo?
Check this out. They don't convert the coordinates, but they use a special Infragistics grid event ( MouseEnterElement ) to get the element, which the mouse currently hovers over. Maybe it helps.
DataGridView.HitTestInfo equivalent in Infragistics.Win.UltraWinGrid.UltraGrid? Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of DataGridView.HitTestInfo?
TITLE: DataGridView.HitTestInfo equivalent in Infragistics.Win.UltraWinGrid.UltraGrid? QUESTION: Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of DataGridView.HitTestInfo? ANSWER: Check this out. They don't convert the coordinates, but they use a special Infragistics gr...
[ "c#", ".net", "infragistics", "ultrawingrid" ]
3
1
1,855
3
0
2008-09-16T12:48:25.213000
2008-09-16T14:17:29.680000
71,842
71,939
How can I detect from a Swing app that the PC is being shut-down?
Well behaved windows programs need to allow users to save their work when they are shutting the PC down. How can I make my app detect the shutdown event? Any solution should allow the user to abort the shutdown if user selects, say "Cancel". The normal Swing window closing hook doesn't work, nor does adding a shutdown ...
Write some JNI code to WM_QUERYENDSESSION message. You can get details for this from the MSDN documentation or by googling it. If you don't want to write too much C++ code to do this I can recommend the JNA library click here. Which gives you some nice Java abstractions for C code.
How can I detect from a Swing app that the PC is being shut-down? Well behaved windows programs need to allow users to save their work when they are shutting the PC down. How can I make my app detect the shutdown event? Any solution should allow the user to abort the shutdown if user selects, say "Cancel". The normal S...
TITLE: How can I detect from a Swing app that the PC is being shut-down? QUESTION: Well behaved windows programs need to allow users to save their work when they are shutting the PC down. How can I make my app detect the shutdown event? Any solution should allow the user to abort the shutdown if user selects, say "Can...
[ "java", "swing", "operating-system" ]
2
3
1,890
5
0
2008-09-16T12:48:45.260000
2008-09-16T13:00:55.137000
71,843
93,340
How to add a display name for a decorator in Visual Studio DSL (Domain Specific Language) Tools?
In my DSL project I have a shape with a number of decorators that are linked to properties on my domain class. But even though ieach decorator has a DisplayName property (set to a meaningfull value) it does not appear in the generated DSL project. (I have not forgtten to use regenerate the t4 files.) Do I have to creat...
I assume by a display name for the decorator you mean you want the element in the generated DSL to appear as "Example = a_value" where a_value is the actual value and Example is the property name. What I've done with this in the past is to create second property "ExampleDisplay" that's not browsable and is what the dec...
How to add a display name for a decorator in Visual Studio DSL (Domain Specific Language) Tools? In my DSL project I have a shape with a number of decorators that are linked to properties on my domain class. But even though ieach decorator has a DisplayName property (set to a meaningfull value) it does not appear in th...
TITLE: How to add a display name for a decorator in Visual Studio DSL (Domain Specific Language) Tools? QUESTION: In my DSL project I have a shape with a number of decorators that are linked to properties on my domain class. But even though ieach decorator has a DisplayName property (set to a meaningfull value) it doe...
[ "dsl", "vsx" ]
1
1
384
1
0
2008-09-16T12:48:48.520000
2008-09-18T14:59:28.657000
71,853
74,594
How can i search a non case sensitive word with Sql Server XQuery?
I'm using an Xml field in my Sql Server database table. I'm trying to search a word using the XQuery contains method but it seems to search only in case sensitive mode. The lower method isn't implemented on Sql Server XQuery implementation also. ¿Is there a simple solution to this problem?
If you're using SQL Server 2005, I'm afraid you're out of luck. If you're using SQL Server 2008, you can use the upper-case function like this: DECLARE @x xml = N'abcDEF!@4'; SELECT @x.value('fn:upper-case(/text()[1])', 'nvarchar(10)'); Here's a link on MSDN for the upper-case syntax and a couple search examples: http:...
How can i search a non case sensitive word with Sql Server XQuery? I'm using an Xml field in my Sql Server database table. I'm trying to search a word using the XQuery contains method but it seems to search only in case sensitive mode. The lower method isn't implemented on Sql Server XQuery implementation also. ¿Is the...
TITLE: How can i search a non case sensitive word with Sql Server XQuery? QUESTION: I'm using an Xml field in my Sql Server database table. I'm trying to search a word using the XQuery contains method but it seems to search only in case sensitive mode. The lower method isn't implemented on Sql Server XQuery implementa...
[ "sql", "sql-server", "xquery", "contains" ]
2
3
3,708
2
0
2008-09-16T12:49:45.833000
2008-09-16T17:05:11.850000
71,864
71,891
Delete all but the 4 newest directories
I want to delete all but the 4 newest directories in my parent directory. How would you do this in Bash?
ls -atrd */ | head --lines=-4 | xargs rm -rf Edit: added 'a' argument to ls
Delete all but the 4 newest directories I want to delete all but the 4 newest directories in my parent directory. How would you do this in Bash?
TITLE: Delete all but the 4 newest directories QUESTION: I want to delete all but the 4 newest directories in my parent directory. How would you do this in Bash? ANSWER: ls -atrd */ | head --lines=-4 | xargs rm -rf Edit: added 'a' argument to ls
[ "bash", "shell" ]
4
9
662
4
0
2008-09-16T12:52:22.613000
2008-09-16T12:55:29.923000
71,885
71,898
.NET Framework versions
I've had a little search and I was wondering if there is back compatibility for the.NET framework. The real question is, if there's a program that uses.NET Framework 1.1, can I install 3.5 and be done, or do I have to install 1.1 and then if something uses 3.5 I have to install 3.5 as well?
Unfortunately you will have to install both versions. Older version of the framework are not automatically bundled with newer versions.
.NET Framework versions I've had a little search and I was wondering if there is back compatibility for the.NET framework. The real question is, if there's a program that uses.NET Framework 1.1, can I install 3.5 and be done, or do I have to install 1.1 and then if something uses 3.5 I have to install 3.5 as well?
TITLE: .NET Framework versions QUESTION: I've had a little search and I was wondering if there is back compatibility for the.NET framework. The real question is, if there's a program that uses.NET Framework 1.1, can I install 3.5 and be done, or do I have to install 1.1 and then if something uses 3.5 I have to install...
[ ".net", "installation" ]
3
2
769
5
0
2008-09-16T12:54:52.857000
2008-09-16T12:56:32.370000
71,913
71,999
Why do we use extra expression?
Here is a sample from Kernighan & Ritchie's "The C Programming Language": int getline(char s[], int lim) { int c, i = 0; while (--lim > 0; && (c=getchar())!=EOF && c!='\n') { s[i++] = c; } if (c =='\n') { s[i++] = c; } s[i] = '\0'; return i; } Why do we should check if c!= '\n', despite we use s[i++] = c after that...
The functions reads characters from the standard input until either EOF or a newline characters is found. The second check ensures that the only newline character is put into the char array. EOF shouldn't occur in a proper c-string. Also, if the character isn't newline that means that we might have filled up our c-stri...
Why do we use extra expression? Here is a sample from Kernighan & Ritchie's "The C Programming Language": int getline(char s[], int lim) { int c, i = 0; while (--lim > 0; && (c=getchar())!=EOF && c!='\n') { s[i++] = c; } if (c =='\n') { s[i++] = c; } s[i] = '\0'; return i; } Why do we should check if c!= '\n', desp...
TITLE: Why do we use extra expression? QUESTION: Here is a sample from Kernighan & Ritchie's "The C Programming Language": int getline(char s[], int lim) { int c, i = 0; while (--lim > 0; && (c=getchar())!=EOF && c!='\n') { s[i++] = c; } if (c =='\n') { s[i++] = c; } s[i] = '\0'; return i; } Why do we should check...
[ "c" ]
1
3
421
8
0
2008-09-16T12:58:07.920000
2008-09-16T13:08:00.080000
71,919
72,001
How do I get the text size of a string on a WPF canvas?
I'm trying to find the amount of space/width that a string would take when its drawn on a WPF canvas?
I may have found an answer to my own question. The FormattedText class seems to have what I'm after.
How do I get the text size of a string on a WPF canvas? I'm trying to find the amount of space/width that a string would take when its drawn on a WPF canvas?
TITLE: How do I get the text size of a string on a WPF canvas? QUESTION: I'm trying to find the amount of space/width that a string would take when its drawn on a WPF canvas? ANSWER: I may have found an answer to my own question. The FormattedText class seems to have what I'm after.
[ ".net", "wpf" ]
2
3
1,663
1
0
2008-09-16T12:58:55.563000
2008-09-16T13:08:12.403000
71,920
71,970
How to implement a Digg-like algorithm?
How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows: Users submit content Other users view and vote on the content (assume 90% of th...
You could use something similar to the Reddit algorithm - the basic principle of which is you compute a value for a post based on the time it was posted and the score. What's neat about the Reddit algorithm is that you only need recompute the value when the score of a post changes. When you want to display your front p...
How to implement a Digg-like algorithm? How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows: Users submit content Other users view a...
TITLE: How to implement a Digg-like algorithm? QUESTION: How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows: Users submit content ...
[ "sql", "algorithm", "recommendation-engine", "digg" ]
10
6
2,567
5
0
2008-09-16T12:59:00.897000
2008-09-16T13:05:05.407000
71,932
2,186,878
Programmatic binding in Silverlight
I'm missing the boat on something here, kids. This keeps rearing its head and I don't know what's going on with it, so I hope my homeys here can help. When working in Silverlight, when I create bindings in my c# code, they never hold up when the application is running. The declarative bindings from my xaml seem ok, but...
It looks like as of Silverlight 3.1, at least, this is no longer an issue. I can't reproduce it, at any rate.
Programmatic binding in Silverlight I'm missing the boat on something here, kids. This keeps rearing its head and I don't know what's going on with it, so I hope my homeys here can help. When working in Silverlight, when I create bindings in my c# code, they never hold up when the application is running. The declarativ...
TITLE: Programmatic binding in Silverlight QUESTION: I'm missing the boat on something here, kids. This keeps rearing its head and I don't know what's going on with it, so I hope my homeys here can help. When working in Silverlight, when I create bindings in my c# code, they never hold up when the application is runni...
[ "c#", ".net", "silverlight", "data-binding" ]
7
2
23,226
2
0
2008-09-16T13:00:10.130000
2010-02-02T19:13:52.120000