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
82,266
83,228
Launch Local Mail Client from App Hosted on Citrix
I have a desktop application (Windows Forms) which my client hosts on a Citrix server. I would like to launch the user's locally configured mail client to send mail from my application. How do I do this? In addition to this, I will need to attach a file to the email before it is sent.
I'm not at all sure how the Citrix client would handle mailto: links (or if you can configure that), but if you haven't tried them, I suggest you do. Example: mailto:someone@example.com?subject=hello&body=see+attachment&attachment=\\host\path-to\file.foo Also note that not all email clients support the attachment param...
Launch Local Mail Client from App Hosted on Citrix I have a desktop application (Windows Forms) which my client hosts on a Citrix server. I would like to launch the user's locally configured mail client to send mail from my application. How do I do this? In addition to this, I will need to attach a file to the email be...
TITLE: Launch Local Mail Client from App Hosted on Citrix QUESTION: I have a desktop application (Windows Forms) which my client hosts on a Citrix server. I would like to launch the user's locally configured mail client to send mail from my application. How do I do this? In addition to this, I will need to attach a fi...
[ "citrix" ]
0
1
1,263
1
0
2008-09-17T11:47:04.027000
2008-09-17T13:33:09.653000
82,268
82,353
Tools for command line file parsing in cygwin
I have to deal with text files in a motley selection of formats. Here's an example (Columns A and B are tab delimited): A B a Name1=Val1, Name2=Val2, Name3=Val3 b Name1=Val4, Name3=Val5 c Name1=Val6, Name2=Val7, Name3=Val8 The files could have headers or not, have mixed delimiting schemes, have columns with name/value ...
I don't like sed too much, but it works for such things: var="Name2";sed -n "1p;s/\([^ ]*\).*$var=\([^,]*\).*/\1 \2/p" < filename Gives you: A B a Val2 c Val7
Tools for command line file parsing in cygwin I have to deal with text files in a motley selection of formats. Here's an example (Columns A and B are tab delimited): A B a Name1=Val1, Name2=Val2, Name3=Val3 b Name1=Val4, Name3=Val5 c Name1=Val6, Name2=Val7, Name3=Val8 The files could have headers or not, have mixed del...
TITLE: Tools for command line file parsing in cygwin QUESTION: I have to deal with text files in a motley selection of formats. Here's an example (Columns A and B are tab delimited): A B a Name1=Val1, Name2=Val2, Name3=Val3 b Name1=Val4, Name3=Val5 c Name1=Val6, Name2=Val7, Name3=Val8 The files could have headers or n...
[ "parsing", "cygwin" ]
0
1
1,561
6
0
2008-09-17T11:47:43.290000
2008-09-17T12:04:23.267000
82,269
82,695
How do I use the same field type in multiple lists on SharePoint?
I have a SharePoint site with multiple lists, some of which have the same fields - a choice of products or countries. How can I build the lists in a way that I configure the choice field once and use it in multiple lists, so that in the future, if I add a value to the choice, I add it only once?
If you go to Site Settings, under Galleries there is an option for Site Columns. You can create your choice list there. Then, under the Library Settings there is an option to Add From Existing Site Columns. You should be able to see and select your newly created column there.
How do I use the same field type in multiple lists on SharePoint? I have a SharePoint site with multiple lists, some of which have the same fields - a choice of products or countries. How can I build the lists in a way that I configure the choice field once and use it in multiple lists, so that in the future, if I add ...
TITLE: How do I use the same field type in multiple lists on SharePoint? QUESTION: I have a SharePoint site with multiple lists, some of which have the same fields - a choice of products or countries. How can I build the lists in a way that I configure the choice field once and use it in multiple lists, so that in the...
[ "sharepoint" ]
0
1
807
2
0
2008-09-17T11:47:47.410000
2008-09-17T12:41:38.107000
82,286
82,405
Placing Share Documents subfolder as a webpart in SharePoint
I want to place a Webpart on a page that holds a subfolder of the Document Library in SharePoint, but somehow, the only thing I get is the root folder of the document library. Is there a Webpart that fills this need?
By default I don't think that is possible. The list web part that would show the Shared Documents understands how to render the library, but doesn't understand how to filter to only show the contents of one subfolder. It would be nice to create a Filter Web Part and to provide that filter to the List web part so that i...
Placing Share Documents subfolder as a webpart in SharePoint I want to place a Webpart on a page that holds a subfolder of the Document Library in SharePoint, but somehow, the only thing I get is the root folder of the document library. Is there a Webpart that fills this need?
TITLE: Placing Share Documents subfolder as a webpart in SharePoint QUESTION: I want to place a Webpart on a page that holds a subfolder of the Document Library in SharePoint, but somehow, the only thing I get is the root folder of the document library. Is there a Webpart that fills this need? ANSWER: By default I do...
[ "sharepoint" ]
3
1
20,886
8
0
2008-09-17T11:50:04.300000
2008-09-17T12:11:03.343000
82,305
82,356
Is it possible to build a Linux/Motif Eclipse RCP application?
I am trying to build an Eclipse application that would work with a linux/motif installation target. However, this seems not to be possible even though the export option is available in the product export wizard. I've checked the content of the delta pack and indeed, the packages for linux/motif are missing. After check...
We have a similar issue. We are building Eclipse applications and one of our platforms is Solaris 10 x86 which was supported for a short time as an early access build in 3.2 and dropped. I believe 3.2 and 3.3 supported motif so your best bet may be to revert to an older version of Eclipse. I develop in 3.4 and when we ...
Is it possible to build a Linux/Motif Eclipse RCP application? I am trying to build an Eclipse application that would work with a linux/motif installation target. However, this seems not to be possible even though the export option is available in the product export wizard. I've checked the content of the delta pack an...
TITLE: Is it possible to build a Linux/Motif Eclipse RCP application? QUESTION: I am trying to build an Eclipse application that would work with a linux/motif installation target. However, this seems not to be possible even though the export option is available in the product export wizard. I've checked the content of...
[ "java", "linux", "eclipse", "rcp", "motif" ]
1
1
1,029
1
0
2008-09-17T11:54:53.413000
2008-09-17T12:04:59.537000
82,319
82,408
How can I determine the length (i.e. duration) of a .wav file in C#?
In the uncompressed situation I know I need to read the wav header, pull out the number of channels, bits, and sample rate and work it out from there: (channels) * (bits) * (samples/s) * (seconds) = (filesize) Is there a simpler way - a free library, or something in the.net framework perhaps? How would I do this if the...
You may consider using the mciSendString(...) function (error checking is omitted for clarity): using System; using System.Text; using System.Runtime.InteropServices; namespace Sound { public static class SoundInfo { [DllImport("winmm.dll")] private static extern uint mciSendString( string command, StringBuilder retur...
How can I determine the length (i.e. duration) of a .wav file in C#? In the uncompressed situation I know I need to read the wav header, pull out the number of channels, bits, and sample rate and work it out from there: (channels) * (bits) * (samples/s) * (seconds) = (filesize) Is there a simpler way - a free library, ...
TITLE: How can I determine the length (i.e. duration) of a .wav file in C#? QUESTION: In the uncompressed situation I know I need to read the wav header, pull out the number of channels, bits, and sample rate and work it out from there: (channels) * (bits) * (samples/s) * (seconds) = (filesize) Is there a simpler way ...
[ "c#", "audio", "compression" ]
32
22
63,650
16
0
2008-09-17T11:58:10.677000
2008-09-17T12:11:20.613000
82,323
157,780
How to Set Grid Column MaxWidth depending on Window or Screen Size in XAML
I have a 3 column grid in a window with a GridSplitter on the first column. I want to set the MaxWidth of the first column to a third of the parent Window or Page Width (or ActualWidth ) and I would prefer to do this in XAML if possible. This is some sample XAML to play with in XamlPad (or similar) which shows what I'm...
I think the XAML-only approach is somewhat circuitous, but here is a way to do it.
How to Set Grid Column MaxWidth depending on Window or Screen Size in XAML I have a 3 column grid in a window with a GridSplitter on the first column. I want to set the MaxWidth of the first column to a third of the parent Window or Page Width (or ActualWidth ) and I would prefer to do this in XAML if possible. This is...
TITLE: How to Set Grid Column MaxWidth depending on Window or Screen Size in XAML QUESTION: I have a 3 column grid in a window with a GridSplitter on the first column. I want to set the MaxWidth of the first column to a third of the parent Window or Page Width (or ActualWidth ) and I would prefer to do this in XAML if...
[ "wpf", "xaml", "width", "actualwidth" ]
9
9
33,019
2
0
2008-09-17T11:59:44.557000
2008-10-01T14:10:28.023000
82,340
82,392
Is there a way to specify a different session store with Tomcat?
Tomcat (version 5 here) stores session information in memory. When clustering this information is periodically broadcast to other servers in the cluster to keep things in sync. You can use a database store to make sessions persistant but this information is only written periodically as well and is only really used for ...
There definitely is a way. Though I'd strongly vote for sticky sessions - saves so much load for your servers/database (unless something fails)... http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html has information about SessionManager configuration and setup for Tomcat. Depending on your exact requirements you...
Is there a way to specify a different session store with Tomcat? Tomcat (version 5 here) stores session information in memory. When clustering this information is periodically broadcast to other servers in the cluster to keep things in sync. You can use a database store to make sessions persistant but this information ...
TITLE: Is there a way to specify a different session store with Tomcat? QUESTION: Tomcat (version 5 here) stores session information in memory. When clustering this information is periodically broadcast to other servers in the cluster to keep things in sync. You can use a database store to make sessions persistant but...
[ "java", "tomcat", "session" ]
4
3
6,563
4
0
2008-09-17T12:02:25.953000
2008-09-17T12:09:50.867000
82,350
82,395
Way to Alt-Tab through all applications in Virtual and Host PC
I am using VirtualPc 2007 more and more, the one annoyance is "Alt-Tab". What I want is to be able to use alt-tab to iterate through all of the applications in the host pc and virtual(s) as if they were one long list. Is there a setting or program to do this?
No. If the VPC is in full screen mode, alt+tab works only within the context of the VPC. If the VPC Screen is not focused, you will get the collection of applications that are in the Host (including the instance of VPC)
Way to Alt-Tab through all applications in Virtual and Host PC I am using VirtualPc 2007 more and more, the one annoyance is "Alt-Tab". What I want is to be able to use alt-tab to iterate through all of the applications in the host pc and virtual(s) as if they were one long list. Is there a setting or program to do thi...
TITLE: Way to Alt-Tab through all applications in Virtual and Host PC QUESTION: I am using VirtualPc 2007 more and more, the one annoyance is "Alt-Tab". What I want is to be able to use alt-tab to iterate through all of the applications in the host pc and virtual(s) as if they were one long list. Is there a setting or...
[ "virtual-pc" ]
5
5
7,550
3
0
2008-09-17T12:03:58.947000
2008-09-17T12:10:19.820000
82,359
82,517
In Struts 1.3, what's the best way for the Controller to fill the View with variables?
I've just inherited some old Struts code. If Struts (1.3) follows the MVC pattern, how do the Action classes fill the View with variables to render in HTML? So far, I've seen the Action classes push variables in (1) the HTTP request with request.setAttribute("name", user.getName()) (2) in ActionForm classes, using meth...
As Struts 1.3 is considered old-school, I'd recommend to go with the flow and use the style that already is used throughout the application you inherited. If all different styles are already used, pick the most used one. After that, pick your personal favourite. Mine would be 1 or 3 - the form (2) is usually best suite...
In Struts 1.3, what's the best way for the Controller to fill the View with variables? I've just inherited some old Struts code. If Struts (1.3) follows the MVC pattern, how do the Action classes fill the View with variables to render in HTML? So far, I've seen the Action classes push variables in (1) the HTTP request ...
TITLE: In Struts 1.3, what's the best way for the Controller to fill the View with variables? QUESTION: I've just inherited some old Struts code. If Struts (1.3) follows the MVC pattern, how do the Action classes fill the View with variables to render in HTML? So far, I've seen the Action classes push variables in (1)...
[ "java", "model-view-controller", "struts" ]
0
0
1,100
2
0
2008-09-17T12:05:26.900000
2008-09-17T12:22:37.763000
82,365
82,390
Smooth ProgressBar in WPF
I'm using the ProgressBar control in a WPF application and I'm getting this old, Windows 3.1 Progress Blocks thing. In VB6, there was a property to show a smooth ProgressBar. Is there such a thing for WPF?
This KB article seems to explain what you are looking for... there is a link to a VB version of the article too.
Smooth ProgressBar in WPF I'm using the ProgressBar control in a WPF application and I'm getting this old, Windows 3.1 Progress Blocks thing. In VB6, there was a property to show a smooth ProgressBar. Is there such a thing for WPF?
TITLE: Smooth ProgressBar in WPF QUESTION: I'm using the ProgressBar control in a WPF application and I'm getting this old, Windows 3.1 Progress Blocks thing. In VB6, there was a property to show a smooth ProgressBar. Is there such a thing for WPF? ANSWER: This KB article seems to explain what you are looking for... ...
[ "c#", "wpf", "progress-bar" ]
6
4
24,719
4
0
2008-09-17T12:06:05.557000
2008-09-17T12:09:38.043000
82,380
87,156
Best way to handle URLs in a multilingual site in ASP.net
I need to do a multilingual website, with urls like www.domain.com/en/home.aspx for english www.domain.com/es/home.aspx for spanish In the past, I would set up two virtual directories in IIS, and then detect the URL in global.aspx and change the language according to the URL Sub Application_BeginRequest(ByVal sender As...
I decided to go with the new ASP.net Routing. Why not urlRewriting? Because I don't want to change the clean URL that routing gives to you. Here is the code: Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application startup RegisterRoutes(RouteTable.Routes) End Sub Public Sub ...
Best way to handle URLs in a multilingual site in ASP.net I need to do a multilingual website, with urls like www.domain.com/en/home.aspx for english www.domain.com/es/home.aspx for spanish In the past, I would set up two virtual directories in IIS, and then detect the URL in global.aspx and change the language accordi...
TITLE: Best way to handle URLs in a multilingual site in ASP.net QUESTION: I need to do a multilingual website, with urls like www.domain.com/en/home.aspx for english www.domain.com/es/home.aspx for spanish In the past, I would set up two virtual directories in IIS, and then detect the URL in global.aspx and change th...
[ "asp.net", "internationalization", "multilingual" ]
7
7
5,059
7
0
2008-09-17T12:08:16.173000
2008-09-17T20:16:36.593000
82,391
82,402
Should Tables be avoided in HTML at any cost?
It is advisable to use tables in HTML pages (now that we have CSS)? What are the applications of tables? What features/abilities does tables have that are not in CSS? Related Questions Tables instead of DIVs DIV vs TABLE DIVs vs. TABLEs a rebuttal please
No - not at all. But use tables for tabular data. Just don't use them for general layouting. But if you display tabular data, like results or maybe even a form, go ahead and use tables!
Should Tables be avoided in HTML at any cost? It is advisable to use tables in HTML pages (now that we have CSS)? What are the applications of tables? What features/abilities does tables have that are not in CSS? Related Questions Tables instead of DIVs DIV vs TABLE DIVs vs. TABLEs a rebuttal please
TITLE: Should Tables be avoided in HTML at any cost? QUESTION: It is advisable to use tables in HTML pages (now that we have CSS)? What are the applications of tables? What features/abilities does tables have that are not in CSS? Related Questions Tables instead of DIVs DIV vs TABLE DIVs vs. TABLEs a rebuttal please ...
[ "html", "css", "html-table" ]
40
80
17,682
27
0
2008-09-17T12:09:46.263000
2008-09-17T12:10:50.443000
82,404
83,229
WAITFOR command
Given the problem that a stored procedure on SQL Server 2005, which is looping through a cursor, must be run once an hour and it takes about 5 minutes to run, but it takes up a large chunk of processor time: edit: I'd remove the cursor if I could, unfortunatly, I have to be doing a bunch of processing and running other...
Putting the WAITFOR inside the loop would indeed slow it down and allow other things to go faster. You might also consider a WHILE loop instead of a cursor - in my experience it runs faster. You might also consider moving your cursor to a fast-forward, read-only cursor - that can limit how much memory it takes up. decl...
WAITFOR command Given the problem that a stored procedure on SQL Server 2005, which is looping through a cursor, must be run once an hour and it takes about 5 minutes to run, but it takes up a large chunk of processor time: edit: I'd remove the cursor if I could, unfortunatly, I have to be doing a bunch of processing a...
TITLE: WAITFOR command QUESTION: Given the problem that a stored procedure on SQL Server 2005, which is looping through a cursor, must be run once an hour and it takes about 5 minutes to run, but it takes up a large chunk of processor time: edit: I'd remove the cursor if I could, unfortunatly, I have to be doing a bun...
[ "sql-server" ]
5
4
3,243
5
0
2008-09-17T12:11:01.817000
2008-09-17T13:33:10.730000
82,409
83,844
Is there a way to override the empty constructor in a class generated by LINQtoSQL?
If I have a table in my database called 'Users', there will be a class generated by LINQtoSQL called 'User' with an already declared empty constructor. What is the best practice if I want to override this constructor and add my own logic to it?
The default constructor which is generated by the O/R-Designer, calls a partial function called OnCreated - so the best practice is not to override the default constructor, but instead implement the partial function OnCreated in MyDataClasses.cs to initialize items: partial void OnCreated() { Name = ""; } If you are im...
Is there a way to override the empty constructor in a class generated by LINQtoSQL? If I have a table in my database called 'Users', there will be a class generated by LINQtoSQL called 'User' with an already declared empty constructor. What is the best practice if I want to override this constructor and add my own logi...
TITLE: Is there a way to override the empty constructor in a class generated by LINQtoSQL? QUESTION: If I have a table in my database called 'Users', there will be a class generated by LINQtoSQL called 'User' with an already declared empty constructor. What is the best practice if I want to override this constructor a...
[ "c#", ".net", "linq", "linq-to-sql" ]
9
12
4,425
4
0
2008-09-17T12:11:24.780000
2008-09-17T14:30:45.990000
82,415
82,526
Prefetch instructions on ARM
Newer ARM processors include the PLD and PLI instructions. I'm writing tight inner loops (in C++) which have a non-sequential memory access pattern, but a pattern that naturally my code fully understands. I would anticipate a substantial speedup if I could prefetch the next location whilst processing the current memory...
There should be some Compiler-specific Features. There is no standard way to do it for C/C++. Check out you compiler Compiler Reference Guide. For RealView Compiler see this or this.
Prefetch instructions on ARM Newer ARM processors include the PLD and PLI instructions. I'm writing tight inner loops (in C++) which have a non-sequential memory access pattern, but a pattern that naturally my code fully understands. I would anticipate a substantial speedup if I could prefetch the next location whilst ...
TITLE: Prefetch instructions on ARM QUESTION: Newer ARM processors include the PLD and PLI instructions. I'm writing tight inner loops (in C++) which have a non-sequential memory access pattern, but a pattern that naturally my code fully understands. I would anticipate a substantial speedup if I could prefetch the nex...
[ "c++", "arm", "assembly" ]
4
5
6,529
4
0
2008-09-17T12:11:54.607000
2008-09-17T12:23:37.870000
82,417
86,991
Change report data visibility based on rendering format in Reporting Services
Is it possible to hide or exclude certain data from a report if it's being rendered in a particular format (csv, xml, excel, pdf, html). The problem is that I want hyperlinks to other reports to not be rendered when the report is generated in Excel format - but they should be there when the report is rendered in HTML f...
The way I did this w/SSRS 2005 for a web app using the ReportViewer control is I had a hidden boolean report parameter which was used in the report decide if to render text as hyperlinks or not. Then the trick was how to send that parameter value depending on the rendering format. The way I did that was by disabling th...
Change report data visibility based on rendering format in Reporting Services Is it possible to hide or exclude certain data from a report if it's being rendered in a particular format (csv, xml, excel, pdf, html). The problem is that I want hyperlinks to other reports to not be rendered when the report is generated in...
TITLE: Change report data visibility based on rendering format in Reporting Services QUESTION: Is it possible to hide or exclude certain data from a report if it's being rendered in a particular format (csv, xml, excel, pdf, html). The problem is that I want hyperlinks to other reports to not be rendered when the repo...
[ "sql-server", "reporting-services", "report" ]
2
3
1,889
2
0
2008-09-17T12:12:10.690000
2008-09-17T19:58:40.053000
82,429
82,946
When Hibernate flushes a Session, how does it decide which objects in the session are dirty?
My understanding of Hibernate is that as objects are loaded from the DB they are added to the Session. At various points, depending on your configuration, the session is flushed. At this point, modified objects are written to the database. How does Hibernate decide which objects are 'dirty' and need to be written? Do t...
Hibernate does/can use bytecode generation (CGLIB) so that it knows a field is dirty as soon as you call the setter (or even assign to the field afaict). This immediately marks that field/object as dirty, but doesn't reduce the number of objects that need to be dirty-checked during flush. All it does is impact the impl...
When Hibernate flushes a Session, how does it decide which objects in the session are dirty? My understanding of Hibernate is that as objects are loaded from the DB they are added to the Session. At various points, depending on your configuration, the session is flushed. At this point, modified objects are written to t...
TITLE: When Hibernate flushes a Session, how does it decide which objects in the session are dirty? QUESTION: My understanding of Hibernate is that as objects are loaded from the DB they are added to the Session. At various points, depending on your configuration, the session is flushed. At this point, modified object...
[ "java", "hibernate", "session", "orm", "flush" ]
19
24
15,702
5
0
2008-09-17T12:13:18.300000
2008-09-17T13:07:12.680000
82,431
82,459
Hosting a website on your own server
Is there a detailed guide which explains how to host a website on your own server on linux. I have currently hosted it on one of the commerical web-hosts. Also the domain is registered to a different vendor. Thanks
This guide is probably more info than you really requested, but webserver information is in there. It's Gentoo-specific, but you can apply the same information with minor translations to any other distro.
Hosting a website on your own server Is there a detailed guide which explains how to host a website on your own server on linux. I have currently hosted it on one of the commerical web-hosts. Also the domain is registered to a different vendor. Thanks
TITLE: Hosting a website on your own server QUESTION: Is there a detailed guide which explains how to host a website on your own server on linux. I have currently hosted it on one of the commerical web-hosts. Also the domain is registered to a different vendor. Thanks ANSWER: This guide is probably more info than you...
[ "linux", "dns", "web-hosting" ]
4
6
7,534
5
0
2008-09-17T12:13:29.313000
2008-09-17T12:16:35.297000
82,442
85,503
Extension Methods not working for an interface
Inspired by the MVC storefront the latest project I'm working on is using extension methods on IQueryable to filter results. I have this interface; IPrimaryKey { int ID { get; } } and I have this extension method public static IPrimaryKey GetByID(this IQueryable source, int id) { return source(obj => obj.ID == id); } L...
It works, when done right. cfeduke's solution works. However, you don't have to make the IPrimaryKey interface generic, in fact, you don't have to change your original definition at all: public static IPrimaryKey GetByID (this IQueryable source, int id) where T: IPrimaryKey { return source(obj => obj.ID == id); }
Extension Methods not working for an interface Inspired by the MVC storefront the latest project I'm working on is using extension methods on IQueryable to filter results. I have this interface; IPrimaryKey { int ID { get; } } and I have this extension method public static IPrimaryKey GetByID(this IQueryable source, in...
TITLE: Extension Methods not working for an interface QUESTION: Inspired by the MVC storefront the latest project I'm working on is using extension methods on IQueryable to filter results. I have this interface; IPrimaryKey { int ID { get; } } and I have this extension method public static IPrimaryKey GetByID(this IQu...
[ "c#", ".net", "extension-methods" ]
6
13
3,142
3
0
2008-09-17T12:14:31.667000
2008-09-17T17:15:31.257000
82,454
82,886
What impact (if any) does Delphi 2009's switch to Unicode(/UTF16) have on executable size and memory footprint?
Here's one from the "No question's too dumb" department: Well, as the subject says: Is there an impact? If so, how much? Will all the string literals I have in my code and in my DFM resources now take up twice as much space inside the compiled binaries? What about runtime memory usage of compiled applications? Will all...
D2009 uses UTF-16 for the default string type, although you can make variables UTF-8 if you need to. Jan Goyvaerts discusses the size/speed tradeoff in a good blog post. String literals in DFMs have been UTF-8 since at least D7. Hence, there will be no increase in size due to strings in DFMs with D2009.
What impact (if any) does Delphi 2009's switch to Unicode(/UTF16) have on executable size and memory footprint? Here's one from the "No question's too dumb" department: Well, as the subject says: Is there an impact? If so, how much? Will all the string literals I have in my code and in my DFM resources now take up twic...
TITLE: What impact (if any) does Delphi 2009's switch to Unicode(/UTF16) have on executable size and memory footprint? QUESTION: Here's one from the "No question's too dumb" department: Well, as the subject says: Is there an impact? If so, how much? Will all the string literals I have in my code and in my DFM resource...
[ "delphi", "unicode", "delphi-2009" ]
2
1
1,298
4
0
2008-09-17T12:15:58.573000
2008-09-17T13:01:42.753000
82,468
82,937
Perforce. Getting the file status in the sandbox
How can I figure out the state of the files in my client, I want to know if the file needs an updated, or patched, or modified etc. In CVS, I used to simply run "cvs -n -q update. > file". Later look for M,U,P,C attributes to get the current status of the file. In perforce, "p4 sync -n" doesn't give output like "cvs -n...
To my knowledge, there isn't a command that will give you exactly what you want. In looking what the update command does, there is no single alternative in Perforce. I think that the closest that you will come will be to use the 'p4 fstat' command and parse the output from there to get the information that you need. Yo...
Perforce. Getting the file status in the sandbox How can I figure out the state of the files in my client, I want to know if the file needs an updated, or patched, or modified etc. In CVS, I used to simply run "cvs -n -q update. > file". Later look for M,U,P,C attributes to get the current status of the file. In perfor...
TITLE: Perforce. Getting the file status in the sandbox QUESTION: How can I figure out the state of the files in my client, I want to know if the file needs an updated, or patched, or modified etc. In CVS, I used to simply run "cvs -n -q update. > file". Later look for M,U,P,C attributes to get the current status of t...
[ "perforce" ]
3
4
4,627
4
0
2008-09-17T12:17:34.763000
2008-09-17T13:06:38.220000
82,483
83,995
How to catch ALL exceptions/crashes in a .NET app
Possible Duplicate:.NET - What’s the best way to implement a “catch all exceptions handler” I have a.NET console app app that is crashing and displaying a message to the user. All of my code is in a try{ } catch(Exception e){ } block, but still errors are occasionally displayed. In a Win32 app, you can capture all poss...
Contrary to what some others have posted, there's nothing wrong catching all exceptions. The important thing is to handle them all appropriately. If you have a stack overflow or out of memory condition, the app should shut down for them. Also, keep in mind that OOM conditions can prevent your exception handler from run...
How to catch ALL exceptions/crashes in a .NET app Possible Duplicate:.NET - What’s the best way to implement a “catch all exceptions handler” I have a.NET console app app that is crashing and displaying a message to the user. All of my code is in a try{ } catch(Exception e){ } block, but still errors are occasionally d...
TITLE: How to catch ALL exceptions/crashes in a .NET app QUESTION: Possible Duplicate:.NET - What’s the best way to implement a “catch all exceptions handler” I have a.NET console app app that is crashing and displaying a message to the user. All of my code is in a try{ } catch(Exception e){ } block, but still errors ...
[ "c#", ".net", "exception" ]
40
29
58,655
11
0
2008-09-17T12:19:02.403000
2008-09-17T14:44:28.747000
82,495
84,292
Has anyone tried transactional memory for C++?
I was checking out Intel's "whatif" site and their Transactional Memory compiler (each thread has to make atomic commits or rollback the system's memory, like a Database would). It seems like a promising way to replace locks and mutexes but I can't find many testimonials. Does anyone here have any input?
I have not used Intel's compiler, however, Herb Sutter had some interesting comments on it... From Sutter Speaks: The Future of Concurrency Do you see a lot of interest in and usage of transactional memory, or is the concept too difficult for most developers to grasp? It's not yet possible to answer who's using it beca...
Has anyone tried transactional memory for C++? I was checking out Intel's "whatif" site and their Transactional Memory compiler (each thread has to make atomic commits or rollback the system's memory, like a Database would). It seems like a promising way to replace locks and mutexes but I can't find many testimonials. ...
TITLE: Has anyone tried transactional memory for C++? QUESTION: I was checking out Intel's "whatif" site and their Transactional Memory compiler (each thread has to make atomic commits or rollback the system's memory, like a Database would). It seems like a promising way to replace locks and mutexes but I can't find m...
[ "c++", "multithreading", "locking", "intel", "transactional-memory" ]
11
8
5,402
5
0
2008-09-17T12:20:08.690000
2008-09-17T15:12:27.993000
82,509
85,542
Is it possible to drag and drop from/to outside a Flash applet with JavaScript?
Let's say I want a web page that contains a Flash applet and I'd like to drag and drop some objects from or to the rest of the web page, is this at all possible? Bonus if you know a website somewhere that does that!
This one intrigued me. I know jessegavin posted some code while I went to figure this out, but this one is tested. I have a super-simple working example that lets you drag to and from flash. It's pretty messy as I threw it together during my lunch break. Here's the demo And the source The base class is taken directly f...
Is it possible to drag and drop from/to outside a Flash applet with JavaScript? Let's say I want a web page that contains a Flash applet and I'd like to drag and drop some objects from or to the rest of the web page, is this at all possible? Bonus if you know a website somewhere that does that!
TITLE: Is it possible to drag and drop from/to outside a Flash applet with JavaScript? QUESTION: Let's say I want a web page that contains a Flash applet and I'd like to drag and drop some objects from or to the rest of the web page, is this at all possible? Bonus if you know a website somewhere that does that! ANSWE...
[ "javascript", "flash", "drag-and-drop" ]
6
12
2,978
6
0
2008-09-17T12:22:01.617000
2008-09-17T17:19:27.330000
82,518
82,891
Reviews for programmable, tiling window manager ion3
I find the concept of the programmable, tiling, keyboard-focuessed window manager ion3 very appealing, but I think it takes some time to customize it to your needs until you can really evaluate this totally different UI-concept. Therefore, I would like to read reviews of people who tried it for a longer time as environ...
I've used it off and on for the last few years, I think its a great window manager, but I keep crawling back to kde3 whatever I use. Its however difficult to put into quantifiable terms why this happens, but its right up there with the gnome-vs-kde battle. Neither side can understand the other. I would also just love t...
Reviews for programmable, tiling window manager ion3 I find the concept of the programmable, tiling, keyboard-focuessed window manager ion3 very appealing, but I think it takes some time to customize it to your needs until you can really evaluate this totally different UI-concept. Therefore, I would like to read review...
TITLE: Reviews for programmable, tiling window manager ion3 QUESTION: I find the concept of the programmable, tiling, keyboard-focuessed window manager ion3 very appealing, but I think it takes some time to customize it to your needs until you can really evaluate this totally different UI-concept. Therefore, I would l...
[ "keyboard", "window-managers", "tiling" ]
1
1
1,770
3
0
2008-09-17T12:22:41.507000
2008-09-17T13:01:57.607000
82,530
82,600
svn over HTTP proxy
I'm on laptop (Ubuntu) with a network that use HTTP proxy (only http connections allowed). When I use svn up for url like 'http://.....' everything is cool (google chrome repository works perfect), but right now I need to svn up from server with 'svn://....' and I see connection refused. I've set proxy configuration in...
In /etc/subversion/servers you are setting http-proxy-host, which has nothing to do with svn:// which connects to a different server usually running on port 3690 started by svnserve command. If you have access to the server, you can setup svn+ssh:// as explained here. Update: You could also try using connect-tunnel, wh...
svn over HTTP proxy I'm on laptop (Ubuntu) with a network that use HTTP proxy (only http connections allowed). When I use svn up for url like 'http://.....' everything is cool (google chrome repository works perfect), but right now I need to svn up from server with 'svn://....' and I see connection refused. I've set pr...
TITLE: svn over HTTP proxy QUESTION: I'm on laptop (Ubuntu) with a network that use HTTP proxy (only http connections allowed). When I use svn up for url like 'http://.....' everything is cool (google chrome repository works perfect), but right now I need to svn up from server with 'svn://....' and I see connection re...
[ "linux", "svn", "ubuntu", "proxy" ]
51
62
102,576
7
0
2008-09-17T12:23:56.823000
2008-09-17T12:30:50.363000
82,632
82,677
Differences between NHibernate, Castle, Linq - Who are they aimed at?
This answer says that Linq is targeted at a slightly different group of developers than NHibernate, Castle, etc. Being rather new to C#, nevermind all the DB stuff surrounding it: Are there other major, for lack of a better term, SQL wrappers than NHibernate, Castle, Linq? What are the differences between them? What ki...
When you say Castle I assume you mean Castle Active Record? The difference is NHibernate is an OR/M and is aimed at developers who want to focus on the domain rather than the database. With linq to sql, your database is pre-existing and you're relationships and some of programming will be driven by how your database is...
Differences between NHibernate, Castle, Linq - Who are they aimed at? This answer says that Linq is targeted at a slightly different group of developers than NHibernate, Castle, etc. Being rather new to C#, nevermind all the DB stuff surrounding it: Are there other major, for lack of a better term, SQL wrappers than NH...
TITLE: Differences between NHibernate, Castle, Linq - Who are they aimed at? QUESTION: This answer says that Linq is targeted at a slightly different group of developers than NHibernate, Castle, etc. Being rather new to C#, nevermind all the DB stuff surrounding it: Are there other major, for lack of a better term, SQ...
[ "c#", "database", "linq", "nhibernate" ]
9
17
4,027
4
0
2008-09-17T12:35:06.703000
2008-09-17T12:40:13.260000
82,644
83,380
Can you use Microsoft Entity Framework with Oracle?
Is it possible to use Microsoft Entity Framework with Oracle database?
DevArt's OraDirect provider now supports entity framework. See http://devart.com/news/2008/directs475.html
Can you use Microsoft Entity Framework with Oracle? Is it possible to use Microsoft Entity Framework with Oracle database?
TITLE: Can you use Microsoft Entity Framework with Oracle? QUESTION: Is it possible to use Microsoft Entity Framework with Oracle database? ANSWER: DevArt's OraDirect provider now supports entity framework. See http://devart.com/news/2008/directs475.html
[ ".net", "oracle", "entity-framework", "odp.net" ]
98
27
110,874
7
0
2008-09-17T12:36:35.250000
2008-09-17T13:45:55.190000
82,645
3,427,285
Best way for allowing subdomain session cookies using Tomcat
By default tomcat will create a session cookie for the current domain. If you are on www.example.com, your cookie will be created for www.example.com (will only work on www.example.com). Whereas for example.com it will be created for.example.com (desired behaviour, will work on any subdomain of example.com as well as e...
This is apparently supported via a configuration setting in 6.0.27 and onwards: Configuration is done by editing META-INF/context.xml https://issues.apache.org/bugzilla/show_bug.cgi?id=48379
Best way for allowing subdomain session cookies using Tomcat By default tomcat will create a session cookie for the current domain. If you are on www.example.com, your cookie will be created for www.example.com (will only work on www.example.com). Whereas for example.com it will be created for.example.com (desired beha...
TITLE: Best way for allowing subdomain session cookies using Tomcat QUESTION: By default tomcat will create a session cookie for the current domain. If you are on www.example.com, your cookie will be created for www.example.com (will only work on www.example.com). Whereas for example.com it will be created for.example...
[ "java", "tomcat", "session", "cookies", "subdomain" ]
28
34
36,499
5
0
2008-09-17T12:36:45.560000
2010-08-06T19:56:13.123000
82,653
82,739
Is there any list of blog engines, written in Django?
Is there any list of blog engines, written in Django?
EDIT: Original link went dead so here's an updated link with extracts of the list sorted with the most recently updated source at the top. Eleven Django blog engines you should know by Monty Lounge Industries Biblion Django-article Flother Basic-Blog Hello-Newman Banjo djangotechblog Django-YABA Shifting Bits (this is ...
Is there any list of blog engines, written in Django? Is there any list of blog engines, written in Django?
TITLE: Is there any list of blog engines, written in Django? QUESTION: Is there any list of blog engines, written in Django? ANSWER: EDIT: Original link went dead so here's an updated link with extracts of the list sorted with the most recently updated source at the top. Eleven Django blog engines you should know by ...
[ "python", "django" ]
19
23
4,136
7
0
2008-09-17T12:37:48.037000
2008-09-17T12:45:14.823000
82,654
83,325
What is the best way to print screens from an ASP.NET page .NET1.1/.NET2.0
I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this.
I've used the print style sheet here's and article http://alistapart.com/stories/goingtoprint/ that will go through the way to set that up. Rather than setting up a special page that would need to be maintained as well.
What is the best way to print screens from an ASP.NET page .NET1.1/.NET2.0 I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this.
TITLE: What is the best way to print screens from an ASP.NET page .NET1.1/.NET2.0 QUESTION: I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this. ANSWER: I've used the print style sheet here's and article http://alistapart.com/stories/goi...
[ "printing", "asp.net-2.0", "asp.net-1.1" ]
1
1
397
4
0
2008-09-17T12:37:51.050000
2008-09-17T13:40:38.590000
82,661
84,797
How do you clear your MRU list in Visual Studio?
I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?
There is an MSDN article here which suggests that you just move the projects to a new directory. However, as you mentioned, the list of projects is kept in the registry under this key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ \ProjectMRUList and the list of recent files is kept in this key: HKEY_CURRENT_USER\...
How do you clear your MRU list in Visual Studio? I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?
TITLE: How do you clear your MRU list in Visual Studio? QUESTION: I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go? ANSWER: There is an MSDN article here which suggests that you just move the projects to a new d...
[ "visual-studio", "registry", "mru" ]
45
55
31,337
10
0
2008-09-17T12:38:27.850000
2008-09-17T15:58:38.430000
82,691
84,947
What are the best remoting technologies for mobile applications?
I have a java back-end that needs to expose services to clients running in the following environments: J2ME Windows Mobile iPhone I am looking for the best tool for each platform. I do not search a technology that works everywhere. I need something "light" adapted to low speed internet access. Right now I am using SOAP...
Hessian. http://hessian.caucho.com. Implementations in multiple languages (including ObjC), super light weight, and doesn't require reliance on dom/xml parsers for translation from wire to object models. Once we found Hessian, we forgot we ever knew XML.
What are the best remoting technologies for mobile applications? I have a java back-end that needs to expose services to clients running in the following environments: J2ME Windows Mobile iPhone I am looking for the best tool for each platform. I do not search a technology that works everywhere. I need something "light...
TITLE: What are the best remoting technologies for mobile applications? QUESTION: I have a java back-end that needs to expose services to clients running in the following environments: J2ME Windows Mobile iPhone I am looking for the best tool for each platform. I do not search a technology that works everywhere. I nee...
[ "java", "iphone", "windows-mobile", "java-me", "mobile" ]
3
5
1,617
5
0
2008-09-17T12:41:02.290000
2008-09-17T16:17:53.407000
82,721
82,862
How do I alter a TEXT column on a database table in SQL server?
In a SQL server database, I have a table which contains a TEXT field which is set to allow NULLs. I need to change this to not allow NULLs. I can do this no problem via Enterprise Manager, but when I try to run the following script, alter table dbo.[EventLog] Alter column [Message] text Not null, I get an error: Cannot...
You can use Enterprise Manager to create your script. Right click on the table in EM and select Design. Uncheck the Allow Nulls column for the Text field. Instead of hitting the regular save icon (the floppy), click an icon that looks like a golden scroll with a tiny floppy or just do Table Designer > Generate Change S...
How do I alter a TEXT column on a database table in SQL server? In a SQL server database, I have a table which contains a TEXT field which is set to allow NULLs. I need to change this to not allow NULLs. I can do this no problem via Enterprise Manager, but when I try to run the following script, alter table dbo.[EventL...
TITLE: How do I alter a TEXT column on a database table in SQL server? QUESTION: In a SQL server database, I have a table which contains a TEXT field which is set to allow NULLs. I need to change this to not allow NULLs. I can do this no problem via Enterprise Manager, but when I try to run the following script, alter...
[ "sql-server", "t-sql" ]
2
4
7,541
6
0
2008-09-17T12:43:49.257000
2008-09-17T12:58:21.997000
82,726
82,743
Convert DOS/Windows line endings to Linux line endings in Vim
If I open files I created in Windows, the lines all end with ^M. How do I delete these characters all at once?
dos2unix is a commandline utility that will do this. In Vim,:%s/^M//g will if you use Ctrl - v Ctrl - m to input the ^M (On Windows, use Ctrl - q Ctrl -m instead). Vim may not show the ^M characters if the file is loaded with a dos (Windows) file format. In this case you can:set ff=unix and then save the file with:w or...
Convert DOS/Windows line endings to Linux line endings in Vim If I open files I created in Windows, the lines all end with ^M. How do I delete these characters all at once?
TITLE: Convert DOS/Windows line endings to Linux line endings in Vim QUESTION: If I open files I created in Windows, the lines all end with ^M. How do I delete these characters all at once? ANSWER: dos2unix is a commandline utility that will do this. In Vim,:%s/^M//g will if you use Ctrl - v Ctrl - m to input the ^M ...
[ "file", "vim", "newline", "carriage-return", "linefeed" ]
831
1,216
696,366
29
0
2008-09-17T12:44:26.010000
2008-09-17T12:45:38.567000
82,776
105,639
How do I reference a diagram in a DSL T4 template?
Google's not coming to my rescue, here, and I just know this is the perfect place to ask. I'm writing a custom DirectiveProcessor for a DSL and I want to be able to access a diagram from within my T4 template. Within my DirectiveProcessor, I've loaded the domain model and my diagram using (wait for it...) LoadModelAndD...
Well, after lots of further work, I decided I didn't need to access my diagram **from within** a custom DirectiveProcessor. I've still got a custom DirectiveProcessor because the standard generated one doesn't load the existing diagram when it loads the domain model. Getting a custom DirectiveProcessor to load the diag...
How do I reference a diagram in a DSL T4 template? Google's not coming to my rescue, here, and I just know this is the perfect place to ask. I'm writing a custom DirectiveProcessor for a DSL and I want to be able to access a diagram from within my T4 template. Within my DirectiveProcessor, I've loaded the domain model ...
TITLE: How do I reference a diagram in a DSL T4 template? QUESTION: Google's not coming to my rescue, here, and I just know this is the perfect place to ask. I'm writing a custom DirectiveProcessor for a DSL and I want to be able to access a diagram from within my T4 template. Within my DirectiveProcessor, I've loaded...
[ "visual-studio", "diagram", "dsl" ]
2
2
641
1
0
2008-09-17T12:49:25.873000
2008-09-19T21:08:34.057000
82,782
82,820
Whats the best windows tool for merging RSS Feeds?
It seems like such a simple thing, but I can't find any obvious solutions... I want to be able to take two or three feeds, and then merge then in to a single rss feed, to be published internally on our network. Is there a simple tool out there that will do this? Free or commercial.. update: Should have mentioned, looki...
There are a whole pile of options here: http://allrss.com/rssremixers.html.
Whats the best windows tool for merging RSS Feeds? It seems like such a simple thing, but I can't find any obvious solutions... I want to be able to take two or three feeds, and then merge then in to a single rss feed, to be published internally on our network. Is there a simple tool out there that will do this? Free o...
TITLE: Whats the best windows tool for merging RSS Feeds? QUESTION: It seems like such a simple thing, but I can't find any obvious solutions... I want to be able to take two or three feeds, and then merge then in to a single rss feed, to be published internally on our network. Is there a simple tool out there that wi...
[ "rss", "merge" ]
1
1
337
5
0
2008-09-17T12:49:39.350000
2008-09-17T12:53:56.783000
82,788
83,102
Sharepoint UserProfileManager without Manage User Profiles right
I have an issue that is driving me a bit nuts: Using a UserProfileManager as an non-authorized user. The problem: The user does not have "Manage User Profiles" rights, but I still want to use the UserProfileManager. The idea of using SPSecurity.RunWithElevatedPrivileges does not seem to work, as the UserProfileManager ...
The permission that needs set is actually found in the Shared Service Provider. Navigate to Central Admin Navigate to the Shared Service Provider Under User Profiles and My Sites navigate to Personalization services permissions. If the account doesn't already exist, add the account for which your sites App Domain is ru...
Sharepoint UserProfileManager without Manage User Profiles right I have an issue that is driving me a bit nuts: Using a UserProfileManager as an non-authorized user. The problem: The user does not have "Manage User Profiles" rights, but I still want to use the UserProfileManager. The idea of using SPSecurity.RunWithEle...
TITLE: Sharepoint UserProfileManager without Manage User Profiles right QUESTION: I have an issue that is driving me a bit nuts: Using a UserProfileManager as an non-authorized user. The problem: The user does not have "Manage User Profiles" rights, but I still want to use the UserProfileManager. The idea of using SPS...
[ "c#", "sharepoint" ]
4
4
21,425
4
0
2008-09-17T12:50:36.493000
2008-09-17T13:21:41.613000
82,806
82,874
What are the best methods to ensure our SharePoint implementation is accessible?
Are there any blogs, guides, checklists, or controls we should be using to ensure our SharePoint implementation is accessible? Preferrably to the W3C double A standard, or as close to that as we can get. We're implementing an extranet solution.
This study has already been funded by Microsoft, and unfortunately the results only seem to be online in a Word Document. The document is hosted on this blog: http://blog.mastykarz.nl/best-practices-for-developing-accessible-web-sites-in-microsoft-office-sharepoint-server-2007/ And the path to the document is here: htt...
What are the best methods to ensure our SharePoint implementation is accessible? Are there any blogs, guides, checklists, or controls we should be using to ensure our SharePoint implementation is accessible? Preferrably to the W3C double A standard, or as close to that as we can get. We're implementing an extranet solu...
TITLE: What are the best methods to ensure our SharePoint implementation is accessible? QUESTION: Are there any blogs, guides, checklists, or controls we should be using to ensure our SharePoint implementation is accessible? Preferrably to the W3C double A standard, or as close to that as we can get. We're implementin...
[ "sharepoint", "accessibility" ]
1
2
484
6
0
2008-09-17T12:51:42.810000
2008-09-17T12:59:46.770000
82,814
405,781
SoundPlayer crash on Vista
The following code is causing an intermittent crash on a Vista machine. using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE)) myPlayer.Play(); I highly suspect it is this code because the program crashes mid-beep or just before the beep is played every time. I have top-level traps for all Thread...
Actually, the above code (that is, new SoundPlayer(BEEPPURE)).Play(); was crashing for me. This article explains why, and provides an alternative to SoundPlayer that works flawlessly: http://www.codeproject.com/KB/audio-video/soundplayerbug.aspx?msg=2862832#xx2862832xx
SoundPlayer crash on Vista The following code is causing an intermittent crash on a Vista machine. using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE)) myPlayer.Play(); I highly suspect it is this code because the program crashes mid-beep or just before the beep is played every time. I have top...
TITLE: SoundPlayer crash on Vista QUESTION: The following code is causing an intermittent crash on a Vista machine. using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE)) myPlayer.Play(); I highly suspect it is this code because the program crashes mid-beep or just before the beep is played ever...
[ "c#", "winforms", "windows-vista", "audio" ]
2
3
1,278
5
0
2008-09-17T12:52:58.923000
2009-01-02T01:10:03.557000
82,838
82,857
Best way to read commandline parameters in console application
Below are two ways of reading in the commandline parameters. The first is the way that I'm accustom to seeing using the parameter in the main. The second I stumbled on when reviewing code. I noticed that the second assigns the first item in the array to the path and application but the first skips this. Is it just pref...
Second way is better because it can be used outside the main(), so when you refactor it's one less thing to think about. Also I don't like the "magic" that puts the args in the method parameter for the first way.
Best way to read commandline parameters in console application Below are two ways of reading in the commandline parameters. The first is the way that I'm accustom to seeing using the parameter in the main. The second I stumbled on when reviewing code. I noticed that the second assigns the first item in the array to the...
TITLE: Best way to read commandline parameters in console application QUESTION: Below are two ways of reading in the commandline parameters. The first is the way that I'm accustom to seeing using the parameter in the main. The second I stumbled on when reviewing code. I noticed that the second assigns the first item i...
[ ".net", "command-line", "parameters" ]
22
24
38,917
4
0
2008-09-17T12:56:03.203000
2008-09-17T12:58:10.203000
82,842
156,198
MySQL tools which ease creation of SQL JOIN statements?
Does anyone know tools which look at a MySQL database, show you all the tables graphically and allow you to create complicated JOIN statements via drag-and-drop?
Before you buy anything, see if the free, official MySQL's GUI tools (specifically the MySQL Query Browser ) will work for you. Personally, I'm fairly comfortable interacting with MySQL's command line interface and haven't used their GUI tools very much, but I just downloaded Query Browser and it seems like it does exa...
MySQL tools which ease creation of SQL JOIN statements? Does anyone know tools which look at a MySQL database, show you all the tables graphically and allow you to create complicated JOIN statements via drag-and-drop?
TITLE: MySQL tools which ease creation of SQL JOIN statements? QUESTION: Does anyone know tools which look at a MySQL database, show you all the tables graphically and allow you to create complicated JOIN statements via drag-and-drop? ANSWER: Before you buy anything, see if the free, official MySQL's GUI tools (speci...
[ "sql", "mysql" ]
9
4
2,541
3
0
2008-09-17T12:56:24.217000
2008-10-01T03:58:06.137000
82,850
676,624
What files are you allowed to modify in SharePoint 2007?
What files can we modify so that our solution is still supported by Microsoft? Is it allowed to customize error pages? Can we modify the web.config files to use custom HTTPHandlers?
Here is the closest I can find to a official response from Microsoft: http://technet.microsoft.com/en-us/library/cc263010.aspx
What files are you allowed to modify in SharePoint 2007? What files can we modify so that our solution is still supported by Microsoft? Is it allowed to customize error pages? Can we modify the web.config files to use custom HTTPHandlers?
TITLE: What files are you allowed to modify in SharePoint 2007? QUESTION: What files can we modify so that our solution is still supported by Microsoft? Is it allowed to customize error pages? Can we modify the web.config files to use custom HTTPHandlers? ANSWER: Here is the closest I can find to a official response ...
[ "sharepoint" ]
1
0
383
5
0
2008-09-17T12:57:49.330000
2009-03-24T09:14:40.720000
82,855
82,964
Is object mocking used extensively?
I am curious about how many of you folks incorporate mocking of objects (frameworks like JMock, NMock, RhinoMocks hand in hand with unit testing frameworks) into your daily development process. What are your experiences? You see, I develop on top of a GIS (geographic information systems) platform, in which most of work...
On a recent project that I worked on we used mock objects extensively in our unit testing approach. The project was 100% Java and moderately sized (about 100,000 lines of non-commented code). It was a Swing-based desktop application - and the only effective way that we found to test the user interface logic was through...
Is object mocking used extensively? I am curious about how many of you folks incorporate mocking of objects (frameworks like JMock, NMock, RhinoMocks hand in hand with unit testing frameworks) into your daily development process. What are your experiences? You see, I develop on top of a GIS (geographic information syst...
TITLE: Is object mocking used extensively? QUESTION: I am curious about how many of you folks incorporate mocking of objects (frameworks like JMock, NMock, RhinoMocks hand in hand with unit testing frameworks) into your daily development process. What are your experiences? You see, I develop on top of a GIS (geographi...
[ "unit-testing", "mocking" ]
7
5
769
6
0
2008-09-17T12:58:02.827000
2008-09-17T13:08:59.977000
82,864
92,246
How to create an automatic Revision History table in Word 2007
Is it possible in Word 2007 to create a revision history table automatically using track changes or some other method? e.g. Revision History DateVersionDescriptionAuthor 16/09/20081.0CreatedJohn Smith 17/09/20081.1Fixed dumb spelling errorsColin Jones
I don't think it's possible to do automatically. I'd suggest that you keep track manually with a table like you suggested, and then keep all your documents in a version control system under a separate documentation branch in order to have an automatic revision history. If you feel up to it, you could also create a tool...
How to create an automatic Revision History table in Word 2007 Is it possible in Word 2007 to create a revision history table automatically using track changes or some other method? e.g. Revision History DateVersionDescriptionAuthor 16/09/20081.0CreatedJohn Smith 17/09/20081.1Fixed dumb spelling errorsColin Jones
TITLE: How to create an automatic Revision History table in Word 2007 QUESTION: Is it possible in Word 2007 to create a revision history table automatically using track changes or some other method? e.g. Revision History DateVersionDescriptionAuthor 16/09/20081.0CreatedJohn Smith 17/09/20081.1Fixed dumb spelling error...
[ "ms-office", "word-2007" ]
7
4
22,186
2
0
2008-09-17T12:58:43.340000
2008-09-18T12:53:24.280000
82,867
83,139
How to create a MaskedEditExtender on the fly?
I want to create a number of masked edit extenders from codebehind. Something like: private MaskedEditExtender m_maskedEditExtender; protected override void OnLoad(EventArgs e) { base.OnLoad(e); m_maskedEditExtender = new MaskedEditExtender() { BehaviorID = "clientName" }; m_maskedEditExtender.Mask = "999999999"; this....
See ASP.NET Page Life Cycle Overview if this is in a Page subclass. If you scroll down to the event list, that page advises you to use the PreInit event to create any dynamic controls. It's necessary to do that early to ensure that ASP.NET cleanly loads ViewState at the right stage, among other things. If you are doing...
How to create a MaskedEditExtender on the fly? I want to create a number of masked edit extenders from codebehind. Something like: private MaskedEditExtender m_maskedEditExtender; protected override void OnLoad(EventArgs e) { base.OnLoad(e); m_maskedEditExtender = new MaskedEditExtender() { BehaviorID = "clientName" };...
TITLE: How to create a MaskedEditExtender on the fly? QUESTION: I want to create a number of masked edit extenders from codebehind. Something like: private MaskedEditExtender m_maskedEditExtender; protected override void OnLoad(EventArgs e) { base.OnLoad(e); m_maskedEditExtender = new MaskedEditExtender() { BehaviorID...
[ "asp.net", "maskededitextender" ]
1
1
3,485
3
0
2008-09-17T12:59:29.873000
2008-09-17T13:24:57.597000
82,872
84,601
PHP - RSS builder
I have a old website that generate its own RSS everytime a new post is created. Everything worked when I was on a server with PHP 4 but now that the host change to PHP 5, I always have a "bad formed XML". I was using xml_parser_create() and xml_parse(...) and fwrite(..) to save everything. Here is the example when savi...
At swcombine.com we use Feedcreator. Use that one and your problem will be gone.:) Here is the PHP code to use it once installed: function feed_simnews() { $objRSS = new UniversalFeedCreator(); $objRSS->title = 'My News'; $objRSS->link = 'http://link.to/news.php'; $objRSS->description = 'daily news from me'; $objRSS->x...
PHP - RSS builder I have a old website that generate its own RSS everytime a new post is created. Everything worked when I was on a server with PHP 4 but now that the host change to PHP 5, I always have a "bad formed XML". I was using xml_parser_create() and xml_parse(...) and fwrite(..) to save everything. Here is the...
TITLE: PHP - RSS builder QUESTION: I have a old website that generate its own RSS everytime a new post is created. Everything worked when I was on a server with PHP 4 but now that the host change to PHP 5, I always have a "bad formed XML". I was using xml_parser_create() and xml_parse(...) and fwrite(..) to save every...
[ "php", "rss" ]
2
2
2,187
6
0
2008-09-17T12:59:46.097000
2008-09-17T15:37:50.150000
82,875
83,195
How can I list the tables in a SQLite database file that was opened with ATTACH?
What SQL can be used to list the tables, and the rows within those tables in an SQLite database file – once I have attached it with the ATTACH command on the sqlite3 command line tool?
The.tables, and.schema "helper" functions don't look into ATTACHed databases: they just query the SQLITE_MASTER table for the "main" database. Consequently, if you used ATTACH some_file.db AS my_db; then you need to do SELECT name FROM my_db.sqlite_master WHERE type='table'; Note that temporary tables don't show up wit...
How can I list the tables in a SQLite database file that was opened with ATTACH? What SQL can be used to list the tables, and the rows within those tables in an SQLite database file – once I have attached it with the ATTACH command on the sqlite3 command line tool?
TITLE: How can I list the tables in a SQLite database file that was opened with ATTACH? QUESTION: What SQL can be used to list the tables, and the rows within those tables in an SQLite database file – once I have attached it with the ATTACH command on the sqlite3 command line tool? ANSWER: The.tables, and.schema "hel...
[ "sql", "sqlite", "database-schema" ]
1,376
682
1,235,071
19
0
2008-09-17T12:59:53.633000
2008-09-17T13:30:00.113000
82,878
112,075
Does anyone use Iron speed designer for rapid asp.net development?
Visual studio is pretty good but doesn't create stored procedures automatically. Iron Speed designer does supposedly. But is it any good?
I have used Ironspeed extensively for the past two years for most of our ASP.NET forms over data projects. It works. Does several things well: stored procs, fast layout of table browse and CRUD screens, fast layout of single record CRUD screens. It manages the round-trip (or half-round trip) process decently, detecting...
Does anyone use Iron speed designer for rapid asp.net development? Visual studio is pretty good but doesn't create stored procedures automatically. Iron Speed designer does supposedly. But is it any good?
TITLE: Does anyone use Iron speed designer for rapid asp.net development? QUESTION: Visual studio is pretty good but doesn't create stored procedures automatically. Iron Speed designer does supposedly. But is it any good? ANSWER: I have used Ironspeed extensively for the past two years for most of our ASP.NET forms o...
[ "asp.net", "gui-designer", "ironspeed" ]
5
18
11,907
6
0
2008-09-17T13:00:28.280000
2008-09-21T20:44:47.013000
82,881
83,055
In C# .NET 2.0, what's an easy way to do a foreach in reverse?
Lets say I have a Dictionary object: Dictionary myDictionary = new Dictionary (); Now I want to iterate through the dictionary in reverse order. I can't use a simple for loop because I don't know the keys of the dictionary. A foreach is easy: foreach (SomeObject object in myDictionary.Values) { // Do stuff to object } ...
I'd use a SortedList instead of a dictionary. You can still access it by Key, but you can access it by index as well. SortedList sCol = new SortedList(); sCol.Add("bee", "Some extended string matching bee"); sCol.Add("ay", "value matching ay"); sCol.Add("cee", "Just a standard cee"); // Go through it backwards. for (...
In C# .NET 2.0, what's an easy way to do a foreach in reverse? Lets say I have a Dictionary object: Dictionary myDictionary = new Dictionary (); Now I want to iterate through the dictionary in reverse order. I can't use a simple for loop because I don't know the keys of the dictionary. A foreach is easy: foreach (SomeO...
TITLE: In C# .NET 2.0, what's an easy way to do a foreach in reverse? QUESTION: Lets say I have a Dictionary object: Dictionary myDictionary = new Dictionary (); Now I want to iterate through the dictionary in reverse order. I can't use a simple for loop because I don't know the keys of the dictionary. A foreach is ea...
[ "c#", ".net", "collections", "iteration" ]
17
20
19,508
14
0
2008-09-17T13:00:40.667000
2008-09-17T13:17:01.097000
82,882
82,928
Stored procedures or OR mappers?
Which is better? Or use and OR mapper with SP's? If you have a system with SP's already, is an OR mapper worth it?
I like ORM's because you don't have to reinvent the wheel. That being said, it completely depends on your application needs, development style and that of the team. This question has already been covered Why is parameterized SQL generated by NHibernate just as fast as a stored procedure?
Stored procedures or OR mappers? Which is better? Or use and OR mapper with SP's? If you have a system with SP's already, is an OR mapper worth it?
TITLE: Stored procedures or OR mappers? QUESTION: Which is better? Or use and OR mapper with SP's? If you have a system with SP's already, is an OR mapper worth it? ANSWER: I like ORM's because you don't have to reinvent the wheel. That being said, it completely depends on your application needs, development style an...
[ "sql", "stored-procedures" ]
3
4
1,448
15
0
2008-09-17T13:00:51.947000
2008-09-17T13:05:58.423000
82,908
82,986
CausesValidation is set to "False" but the client side validation is still firing
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on the client side when I press the Cancel button, which has the CausesValidation attribute set to "False". How can I get this to stop? I do not believe that Validation Groups are supported in 1.1. Here's a code sample: Update: The...
Validation Groups were not added to ASP.NET until version 2.0. This is a 1.1 question. Double check your setting and make sure you are not overwriting it in the code behind.
CausesValidation is set to "False" but the client side validation is still firing I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on the client side when I press the Cancel button, which has the CausesValidation attribute set to "False". How can I get this to stop? I do not beli...
TITLE: CausesValidation is set to "False" but the client side validation is still firing QUESTION: I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on the client side when I press the Cancel button, which has the CausesValidation attribute set to "False". How can I get this to s...
[ "c#", "asp.net", "javascript", "validation" ]
1
1
5,074
2
0
2008-09-17T13:03:41.643000
2008-09-17T13:11:06.977000
82,929
82,984
Sort with one option forced to top of list
I have a PHP application that displays a list of options to a user. The list is generated from a simple query against SQL 2000. What I would like to do is have a specific option at the top of the list, and then have the remaining options sorted alphabetically. For example, here's the options if sorted alphabetically: C...
SELECT name FROM locations ORDER BY CASE WHEN name = 'Montreal' THEN 0 ELSE 1 END, name
Sort with one option forced to top of list I have a PHP application that displays a list of options to a user. The list is generated from a simple query against SQL 2000. What I would like to do is have a specific option at the top of the list, and then have the remaining options sorted alphabetically. For example, her...
TITLE: Sort with one option forced to top of list QUESTION: I have a PHP application that displays a list of options to a user. The list is generated from a simple query against SQL 2000. What I would like to do is have a specific option at the top of the list, and then have the remaining options sorted alphabetically...
[ "sql", "sorting" ]
4
6
1,731
5
0
2008-09-17T13:05:59.780000
2008-09-17T13:11:00.533000
82,933
82,973
Managing feature creep in GUIs
Does anyone have any practical suggestions about how to manage feature creep in GUIs? I'm getting strong pressure from both internal and external sources to add, modify, tweak, etc. I always cringe when someone approaches me with the words "wouldn't it be nice if...?". I can't just turn around and yell "NO" at them, be...
Have feature requests handled in a formal process, normally through the project manager and whoever analyzed the requirements originally. Its always better to palm those sorts of decisions off to someone that isn't the developer, assuming that whoever is going to do that job is actually capable of it. If you're freelan...
Managing feature creep in GUIs Does anyone have any practical suggestions about how to manage feature creep in GUIs? I'm getting strong pressure from both internal and external sources to add, modify, tweak, etc. I always cringe when someone approaches me with the words "wouldn't it be nice if...?". I can't just turn a...
TITLE: Managing feature creep in GUIs QUESTION: Does anyone have any practical suggestions about how to manage feature creep in GUIs? I'm getting strong pressure from both internal and external sources to add, modify, tweak, etc. I always cringe when someone approaches me with the words "wouldn't it be nice if...?". I...
[ "project-management" ]
13
15
1,606
28
0
2008-09-17T13:06:14.100000
2008-09-17T13:10:06.977000
82,993
85,166
Windows CD Burning API
We need to programatically burn files to CD in a C\C++ Windows XP/Vista application we are developing using Borlands Turbo C++. What is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party software/drivers if one is available.
We used the following: Store files in the directory returned by GetBurnPath, then write using Burn. GetCDRecordableInfo is used to check when the CD is ready. #include #include #include struct MEDIAINFO { BYTE nSessions; BYTE nLastTrack; ULONG nStartAddress; ULONG nNextWritable; ULONG nFreeBlocks; }; //================...
Windows CD Burning API We need to programatically burn files to CD in a C\C++ Windows XP/Vista application we are developing using Borlands Turbo C++. What is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party software/drivers if one...
TITLE: Windows CD Burning API QUESTION: We need to programatically burn files to CD in a C\C++ Windows XP/Vista application we are developing using Borlands Turbo C++. What is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party softw...
[ "c++", "c", "windows", "cd-burning" ]
12
15
12,498
4
0
2008-09-17T13:12:02.387000
2008-09-17T16:42:23.147000
83,009
86,174
What's the best/fastest/easiest way to collapse all projects in Visual Studio?
I'm currently using DPack as this adds a "Collapse All Projects" option to the Solution node in Solution Explorer. It works pretty well but can take a while to execute and doesn't always collapse everything fully. Are there any better alternatives? Preferably free and easy to install/setup. There are lots out there but...
For VS2005, I've been using CoolCommands 4.0. The feature description is more complete for the older 3.0 version. Version 3 had an.msi installer. Version 4 is a.zip file (which was easier for my environment anyway). My favorite features (a subset of the complete list): From the Solution explorer: Collapse All Projects ...
What's the best/fastest/easiest way to collapse all projects in Visual Studio? I'm currently using DPack as this adds a "Collapse All Projects" option to the Solution node in Solution Explorer. It works pretty well but can take a while to execute and doesn't always collapse everything fully. Are there any better altern...
TITLE: What's the best/fastest/easiest way to collapse all projects in Visual Studio? QUESTION: I'm currently using DPack as this adds a "Collapse All Projects" option to the Solution node in Solution Explorer. It works pretty well but can take a while to execute and doesn't always collapse everything fully. Are there...
[ "visual-studio" ]
9
7
6,690
5
0
2008-09-17T13:13:18.937000
2008-09-17T18:31:22.993000
83,038
83,489
Executing stored procedures with date parameters: Command Object vs Connection Object
When supplying dates to a stored procedure via a parameter I'm a little confused over which format to use for the dates. My original VBA syntax used the ADO Connection object to execute the stored procedure: Set SentDetailRS = Me.ADOConnectionToIntegrity.Execute("dbo.s_SelectAggregatedSentDetailList '" & fCSQLDate(Effe...
Be careful, and do not believe that ADO is taking care of the problem. Universal SQL date format is 'YYYYMMDD', while both SQL and ACCESS are influenced by the regional settings of the machine in the way they display dates and convert them in character strings. Do not forget that Date separator is # in Access, while it...
Executing stored procedures with date parameters: Command Object vs Connection Object When supplying dates to a stored procedure via a parameter I'm a little confused over which format to use for the dates. My original VBA syntax used the ADO Connection object to execute the stored procedure: Set SentDetailRS = Me.ADOC...
TITLE: Executing stored procedures with date parameters: Command Object vs Connection Object QUESTION: When supplying dates to a stored procedure via a parameter I'm a little confused over which format to use for the dates. My original VBA syntax used the ADO Connection object to execute the stored procedure: Set Sent...
[ "sql-server", "vba", "ms-access", "ado" ]
0
1
7,268
6
0
2008-09-17T13:15:28.947000
2008-09-17T13:56:58.113000
83,040
83,183
Connecting to Oracle using PHP
How do I connect to a remote Oracle database instance from PHP? I need to query (read only) the remote Oracle database for some information; do I need to have an Oracle Instant Client installed? Is the OCI extension for PHP enough?
From PHP Manual You will need the Oracle client libraries to use this extension. The most convenient way to install all the required files is to use Oracle Instant Client, which is available from Oracle's site
Connecting to Oracle using PHP How do I connect to a remote Oracle database instance from PHP? I need to query (read only) the remote Oracle database for some information; do I need to have an Oracle Instant Client installed? Is the OCI extension for PHP enough?
TITLE: Connecting to Oracle using PHP QUESTION: How do I connect to a remote Oracle database instance from PHP? I need to query (read only) the remote Oracle database for some information; do I need to have an Oracle Instant Client installed? Is the OCI extension for PHP enough? ANSWER: From PHP Manual You will need ...
[ "php", "oracle" ]
9
7
18,316
5
0
2008-09-17T13:15:45.623000
2008-09-17T13:29:03.187000
83,045
83,127
Command switch to toggle Notepads word wrap
I have a costumer showing Notepad with a large set of data that looks totally misaligned if word wrap is on and I want to force it off. Is there a command switch to do this?
I dont think there is a command switch to do this at all. If you want to force it off all the time then you may want to edit the registry: Hive: HKEY_CURRENT_USER Key: SOFTWARE\Microsoft\Notepad Name: fWrap Type: REG_DWORD Value: 0 You could even create a.reg file and put it in a batch file to run it and reset it every...
Command switch to toggle Notepads word wrap I have a costumer showing Notepad with a large set of data that looks totally misaligned if word wrap is on and I want to force it off. Is there a command switch to do this?
TITLE: Command switch to toggle Notepads word wrap QUESTION: I have a costumer showing Notepad with a large set of data that looks totally misaligned if word wrap is on and I want to force it off. Is there a command switch to do this? ANSWER: I dont think there is a command switch to do this at all. If you want to fo...
[ "command-line-arguments" ]
0
2
3,234
4
0
2008-09-17T13:16:10.193000
2008-09-17T13:24:16.600000
83,058
83,199
Removing static file cachebusting in rails
I have a rails application which is still showing the cachebusting numeric string at the end of the URL for static mode, even though I have put it into the production environment. Can someone tell me what config option I need to set to prevent this behaviour...
That file isn't there to break the cache during day-to-day operations. At least in theory, proxy servers are allowed to cache HTTP GET requests (as long the parameters remain the same). Instead, that number is there to allow you to smoothly upgrade your CSS and JavaScript files from one version to the next. As I unders...
Removing static file cachebusting in rails I have a rails application which is still showing the cachebusting numeric string at the end of the URL for static mode, even though I have put it into the production environment. Can someone tell me what config option I need to set to prevent this behaviour...
TITLE: Removing static file cachebusting in rails QUESTION: I have a rails application which is still showing the cachebusting numeric string at the end of the URL for static mode, even though I have put it into the production environment. Can someone tell me what config option I need to set to prevent this behaviour....
[ "ruby-on-rails", "caching" ]
1
4
585
2
0
2008-09-17T13:17:15.480000
2008-09-17T13:30:36.617000
83,068
91,869
ORA-03113: end-of-file on communication channel after long inactivity in ASP.Net app
I've got a load-balanced (not using Session state) ASP.Net 2.0 app on IIS5 running back to a single Oracle 10g server, using version 10.1.0.301 of the ODAC/ODP.Net drivers. After a long period of inactivity (a few hours), the application, seemingly randomly, will throw an Oracle exception: Exception: ORA-03113: end-of-...
ORA-03113: end-of-file on communication channel Is the database letting you know that the network connection is no more. This could be because: A network issue - faulty connection, or firewall issue The server process on the database that is servicing you died unexpectedly. For 1) ( firewall ) search tahiti.oracle.com ...
ORA-03113: end-of-file on communication channel after long inactivity in ASP.Net app I've got a load-balanced (not using Session state) ASP.Net 2.0 app on IIS5 running back to a single Oracle 10g server, using version 10.1.0.301 of the ODAC/ODP.Net drivers. After a long period of inactivity (a few hours), the applicati...
TITLE: ORA-03113: end-of-file on communication channel after long inactivity in ASP.Net app QUESTION: I've got a load-balanced (not using Session state) ASP.Net 2.0 app on IIS5 running back to a single Oracle 10g server, using version 10.1.0.301 of the ODAC/ODP.Net drivers. After a long period of inactivity (a few hou...
[ "oracle", "oracle10g", "odp.net", "oracleexception" ]
24
19
179,776
8
0
2008-09-17T13:18:42.027000
2008-09-18T11:56:28.847000
83,073
84,986
Why not use tables for layout in HTML?
It seems to be the general opinion that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to separate content from layout But this is a fallacious argument; Cliche Thinking. I guess it's true that using the table eleme...
I'm going to go through your arguments one after another and try to show the errors in them. It's good to separate content from layout But this is a fallacious argument; Cliché Thinking. It's not fallacious at all because HTML was designed intentionally. Misuse of an element might not be completely out of question (aft...
Why not use tables for layout in HTML? It seems to be the general opinion that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to separate content from layout But this is a fallacious argument; Cliche Thinking. I gue...
TITLE: Why not use tables for layout in HTML? QUESTION: It seems to be the general opinion that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to separate content from layout But this is a fallacious argument; Clic...
[ "html", "css" ]
664
495
478,919
66
0
2008-09-17T13:19:09.297000
2008-09-17T16:23:06.623000
83,086
83,149
VS 2008 vs VS 2008 Express
I'm using Visual Studio Team System 2008 at work to do web development. I've gotten quite used to it but can't really afford to purchase even VS 2008 Standard at this time. I have never used any of the Express editions before but I was thinking about downloading VS C# Express and VS Web Developer Express. Am I wasting ...
You can do serious development on the express editions. They have taken out a few things most notably the plug in system. If you are use to using a bunch of plug ins you may find that not being able to use them is a deterrent. Here is a link to a comparison of the express edition and the other editions. http://msdn.mic...
VS 2008 vs VS 2008 Express I'm using Visual Studio Team System 2008 at work to do web development. I've gotten quite used to it but can't really afford to purchase even VS 2008 Standard at this time. I have never used any of the Express editions before but I was thinking about downloading VS C# Express and VS Web Devel...
TITLE: VS 2008 vs VS 2008 Express QUESTION: I'm using Visual Studio Team System 2008 at work to do web development. I've gotten quite used to it but can't really afford to purchase even VS 2008 Standard at this time. I have never used any of the Express editions before but I was thinking about downloading VS C# Expres...
[ "visual-studio-2008", "visual-studio-express" ]
7
13
9,491
10
0
2008-09-17T13:20:05.627000
2008-09-17T13:25:58.063000
83,088
83,150
PHP/mySQL - regular recalculation of benchmark values as new users submit their data
I am confronted with a new kind of problem which I haven't encountered yet in my very young programming "career" and would like to know your opinion about how to tackle it best. The situation A research application (php/mysql) gathers stress related health data from users. User gets a an analyses after filling in the q...
What you're considering could be done in a number of ways. You could setup a trigger in your DB to recalculate the values whenever a new record is updated. You could store the code needed to update the values in a sproc if necessary. You could write a PHP script and run it regularly via cron. #1 will slow down inserts ...
PHP/mySQL - regular recalculation of benchmark values as new users submit their data I am confronted with a new kind of problem which I haven't encountered yet in my very young programming "career" and would like to know your opinion about how to tackle it best. The situation A research application (php/mysql) gathers ...
TITLE: PHP/mySQL - regular recalculation of benchmark values as new users submit their data QUESTION: I am confronted with a new kind of problem which I haven't encountered yet in my very young programming "career" and would like to know your opinion about how to tackle it best. The situation A research application (p...
[ "php", "mysql", "stored-procedures", "cron" ]
2
1
385
5
0
2008-09-17T13:20:17.513000
2008-09-17T13:26:02.120000
83,093
90,031
hibernate insert batch with partitioned postgresql
is there a solution for batch insert via hibernate in partitioned postgresql table? currently i'm getting an error like this... ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expect...
You might want to try using a custom Batcher by setting the hibernate.jdbc.factory_class property. Making sure hibernate won't check the update count of batch operations might fix your problem, you can achieve that by making your custom Batcher extend the class BatchingBatcher, and then overriding the method doExecuteB...
hibernate insert batch with partitioned postgresql is there a solution for batch insert via hibernate in partitioned postgresql table? currently i'm getting an error like this... ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row...
TITLE: hibernate insert batch with partitioned postgresql QUESTION: is there a solution for batch insert via hibernate in partitioned postgresql table? currently i'm getting an error like this... ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update retur...
[ "hibernate", "postgresql", "insert", "database-partitioning" ]
13
4
9,697
6
0
2008-09-17T13:21:04.800000
2008-09-18T04:31:51.630000
83,106
90,771
Widget notifying other widget(s)
How should widgets in GWT inform other widgets to refresh themselfs or perform some other action. Should I use sinkEvent / onBrowserEvent? And if so is there a way to create custom Events?
I have solved this problem using the Observer Pattern and a central Controller. The central controller is the only class that has knowledge of all widgets in the application and determines the way they fit together. If someone changes something on widget A, widget A fires an event. In the eventhandler you call the cent...
Widget notifying other widget(s) How should widgets in GWT inform other widgets to refresh themselfs or perform some other action. Should I use sinkEvent / onBrowserEvent? And if so is there a way to create custom Events?
TITLE: Widget notifying other widget(s) QUESTION: How should widgets in GWT inform other widgets to refresh themselfs or perform some other action. Should I use sinkEvent / onBrowserEvent? And if so is there a way to create custom Events? ANSWER: I have solved this problem using the Observer Pattern and a central Con...
[ "gwt" ]
1
3
456
3
0
2008-09-17T13:22:18.867000
2008-09-18T07:46:02.350000
83,117
83,286
Logging activities in multithreaded applications
I have a layered application in Java which has a multi thread data access layer which is invoked from different points. A single call to this layer is likely to spawn several threads to parallelize requests to the DB. What I'm looking for is a logging tool that would allow me to define "activities" that are composed by...
You should also have a look at the nested diagnostic context feature of log4j. Pushing different contexts to the logger for different callers might do the trick for you.
Logging activities in multithreaded applications I have a layered application in Java which has a multi thread data access layer which is invoked from different points. A single call to this layer is likely to spawn several threads to parallelize requests to the DB. What I'm looking for is a logging tool that would all...
TITLE: Logging activities in multithreaded applications QUESTION: I have a layered application in Java which has a multi thread data access layer which is invoked from different points. A single call to this layer is likely to spawn several threads to parallelize requests to the DB. What I'm looking for is a logging t...
[ "java", "logging", "log4j" ]
5
5
5,929
8
0
2008-09-17T13:23:24.637000
2008-09-17T13:36:27.197000
83,156
83,281
File and directory with same name in same parent directory - Solaris 8, ufs
Ok, I have been working with Solaris for a 10+ years, and have never seen this... I have a directory listing which includes both a file and subdirectory with the same name: -rw-r--r-- 1 root other 15922214 Nov 29 2006 msheehan drwxrwxrwx 12 msheehan sysadmin 2048 Mar 25 15:39 msheehan I use file to discover contents of...
I would guess that these are in fact two different filenames that "look" the same, as the command file was able to distinguish them when the shell passed the expanded versions of the name in. Try piping ls into od or another hex/octal dump utility to see if they really have the same name, or if there are non-printing c...
File and directory with same name in same parent directory - Solaris 8, ufs Ok, I have been working with Solaris for a 10+ years, and have never seen this... I have a directory listing which includes both a file and subdirectory with the same name: -rw-r--r-- 1 root other 15922214 Nov 29 2006 msheehan drwxrwxrwx 12 msh...
TITLE: File and directory with same name in same parent directory - Solaris 8, ufs QUESTION: Ok, I have been working with Solaris for a 10+ years, and have never seen this... I have a directory listing which includes both a file and subdirectory with the same name: -rw-r--r-- 1 root other 15922214 Nov 29 2006 msheehan...
[ "file", "directory", "filesystems", "solaris" ]
4
6
2,991
8
0
2008-09-17T13:26:38.420000
2008-09-17T13:36:12.920000
83,159
83,256
How to insert XmlCursor content to DOM Document
Some API returns me XmlCursor pointing on root of XML Document. I need to insert all of this into another org.w3c.DOM represented document. At start: XmlCursor poiting on some text DOM Document: At the end I want to have original DOM document changed like this: some text NOTE: document.importNode(cursor.getDomNode()) d...
Try something like this: Node originalNode = cursor.getDomNode(); Node importNode = document.importNode(originalNode.getFirstChild()); Node otherNode = document.createElement("someOtherInsertedElement"); otherNode.appendChild(importNode); document.appendChild(otherNode); So in other words: Get the DOM Node from the cur...
How to insert XmlCursor content to DOM Document Some API returns me XmlCursor pointing on root of XML Document. I need to insert all of this into another org.w3c.DOM represented document. At start: XmlCursor poiting on some text DOM Document: At the end I want to have original DOM document changed like this: some text ...
TITLE: How to insert XmlCursor content to DOM Document QUESTION: Some API returns me XmlCursor pointing on root of XML Document. I need to insert all of this into another org.w3c.DOM represented document. At start: XmlCursor poiting on some text DOM Document: At the end I want to have original DOM document changed lik...
[ "java", "xml", "xmlbeans" ]
2
6
3,792
2
0
2008-09-17T13:27:04.817000
2008-09-17T13:34:37.090000
83,172
83,417
Embedding Live Video from an IP WebCam
We are using a Sony SNC-RZ30N IP-based webcam to monitor osprey nests and would like to stream the video feed via our own webserver. Rather than use the built-in webserver of the camera (which requires either ActiveX or Java on the client side) to display the live feed, I would like to weed out just the live feed and d...
I don't have enough reputation to comment, so a new answer... In that case I think there are only two options: run a service that converts the existing video feed to a more useable feed (for example to wmv, is accepted by most clients), or create some kind of 'applet' (like in Flash) that updates the image every second...
Embedding Live Video from an IP WebCam We are using a Sony SNC-RZ30N IP-based webcam to monitor osprey nests and would like to stream the video feed via our own webserver. Rather than use the built-in webserver of the camera (which requires either ActiveX or Java on the client side) to display the live feed, I would li...
TITLE: Embedding Live Video from an IP WebCam QUESTION: We are using a Sony SNC-RZ30N IP-based webcam to monitor osprey nests and would like to stream the video feed via our own webserver. Rather than use the built-in webserver of the camera (which requires either ActiveX or Java on the client side) to display the liv...
[ "video", "streaming", "webcam", "sony" ]
1
1
5,293
3
0
2008-09-17T13:27:59.120000
2008-09-17T13:49:10.940000
83,225
83,266
How to set up the browser scrollbar to scroll part of a page?
I've seen this done in a few sites, an example is artofadambetts.com. The scroll bar on the page scrolls only an element of the page, not the entire page. I looked at the source and havent't been able to figure it out yet. How is this done?
That's pretty nifty. He uses "position:fixed" on most of the divs, and the one that scrolls is the one that doesn't have it.
How to set up the browser scrollbar to scroll part of a page? I've seen this done in a few sites, an example is artofadambetts.com. The scroll bar on the page scrolls only an element of the page, not the entire page. I looked at the source and havent't been able to figure it out yet. How is this done?
TITLE: How to set up the browser scrollbar to scroll part of a page? QUESTION: I've seen this done in a few sites, an example is artofadambetts.com. The scroll bar on the page scrolls only an element of the page, not the entire page. I looked at the source and havent't been able to figure it out yet. How is this done?...
[ "javascript", "html", "css" ]
7
10
22,984
11
0
2008-09-17T13:32:48.733000
2008-09-17T13:35:06.560000
83,232
83,265
Is there a serializable generic Key/Value pair class in .NET?
I'm looking for a key/value pair object that I can include in a web service. I tried using.NET's System.Collections.Generic.KeyValuePair<> class, but it does not properly serialize in a web service. In a web service, the Key and Value properties are not serialized, making this class useless, unless someone knows a way ...
Just define a struct/class. [Serializable] public struct KeyValuePair { public K Key {get;set;} public V Value {get;set;} }
Is there a serializable generic Key/Value pair class in .NET? I'm looking for a key/value pair object that I can include in a web service. I tried using.NET's System.Collections.Generic.KeyValuePair<> class, but it does not properly serialize in a web service. In a web service, the Key and Value properties are not seri...
TITLE: Is there a serializable generic Key/Value pair class in .NET? QUESTION: I'm looking for a key/value pair object that I can include in a web service. I tried using.NET's System.Collections.Generic.KeyValuePair<> class, but it does not properly serialize in a web service. In a web service, the Key and Value prope...
[ "c#", ".net" ]
82
96
100,995
10
0
2008-09-17T13:33:24.240000
2008-09-17T13:35:05.140000
83,242
83,381
mysqldump | mysql yields 'too many open files' error. Why?
I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a no-go. We're talking 500G of database). This process fails...
mysqldump by default performs a per-table lock of all involved tables. If you have many tables that can exceed the amount of file descriptors of the mysql server process. Try --skip-lock-tables or if locking is imperative --lock-all-tables. http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html --lock-all-tables, -x Loc...
mysqldump | mysql yields 'too many open files' error. Why? I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a...
TITLE: mysqldump | mysql yields 'too many open files' error. Why? QUESTION: I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldum...
[ "mysql", "rhel" ]
6
10
9,426
4
0
2008-09-17T13:33:55.547000
2008-09-17T13:45:56.127000
83,260
83,371
How can I get the unique values of an array in .net?
Say I've got this array: MyArray(0)="aaa" MyArray(1)="bbb" MyArray(2)="aaa" Is there a.net function which can give me the unique values? I would like something like this as an output of the function: OutputArray(0)="aaa" OutputArray(1)="bbb"
Assuming you have.Net 3.5/LINQ: string[] OutputArray = MyArray.Distinct().ToArray();
How can I get the unique values of an array in .net? Say I've got this array: MyArray(0)="aaa" MyArray(1)="bbb" MyArray(2)="aaa" Is there a.net function which can give me the unique values? I would like something like this as an output of the function: OutputArray(0)="aaa" OutputArray(1)="bbb"
TITLE: How can I get the unique values of an array in .net? QUESTION: Say I've got this array: MyArray(0)="aaa" MyArray(1)="bbb" MyArray(2)="aaa" Is there a.net function which can give me the unique values? I would like something like this as an output of the function: OutputArray(0)="aaa" OutputArray(1)="bbb" ANSWER...
[ ".net", "arrays", "unique" ]
6
11
8,812
4
0
2008-09-17T13:34:46.763000
2008-09-17T13:45:14.507000
83,269
83,316
Codeplex/Sourceforge for internal use
I'm looking for a free/open source collaborative project manager that can be deployed internally in my workplace that would act similar to Codeplex or Sourceforge. Does anyone know of something like this, and if so do you have experience with it. Requirements: Open Source or Free Locally Deployable Has the same types o...
I like redmine for this: http://www.redmine.org. The only thing it's missing from your criteria is voting, but there might even be a plugin for this. Trac is also popular ( http://trac.edgewall.org ) but it lacks suport for aggregation of data across projects.
Codeplex/Sourceforge for internal use I'm looking for a free/open source collaborative project manager that can be deployed internally in my workplace that would act similar to Codeplex or Sourceforge. Does anyone know of something like this, and if so do you have experience with it. Requirements: Open Source or Free L...
TITLE: Codeplex/Sourceforge for internal use QUESTION: I'm looking for a free/open source collaborative project manager that can be deployed internally in my workplace that would act similar to Codeplex or Sourceforge. Does anyone know of something like this, and if so do you have experience with it. Requirements: Ope...
[ "open-source", "project-management", "version-control", "codeplex" ]
6
8
1,999
10
0
2008-09-17T13:35:31.800000
2008-09-17T13:40:10.557000
83,279
83,322
Best way to implement a 3-column website using <DIV> tags?
I'm developing a 3-column website using a layout like this:......... But, considering the default CSS 'position' property of 's is 'static', my 's were shown one below the other, as expected. So I set the CSS property 'position' to 'relative', and changed the 'top' property of the 'middle' and 'right' 's to -(minus) th...
If you haven't already checked out A List Apart you should, as it contains some excellent tutorials and guidelines for website design. This article in particular should help you out.
Best way to implement a 3-column website using <DIV> tags? I'm developing a 3-column website using a layout like this:......... But, considering the default CSS 'position' property of 's is 'static', my 's were shown one below the other, as expected. So I set the CSS property 'position' to 'relative', and changed the '...
TITLE: Best way to implement a 3-column website using <DIV> tags? QUESTION: I'm developing a 3-column website using a layout like this:......... But, considering the default CSS 'position' property of 's is 'static', my 's were shown one below the other, as expected. So I set the CSS property 'position' to 'relative',...
[ "layout", "html", "css" ]
21
23
53,279
9
0
2008-09-17T13:36:04.997000
2008-09-17T13:40:23.410000
83,295
83,376
In what situations would you get different users seeing different rows in a table on SQL Server?
SQL Server Version 2000. We've a bunch of desktops talking to MSSQL Server. When looking for a specific record, some desktops return the correct data, but some do not. The SQL Command is "SELECT * FROM PODORDH WHERE ([NO]=6141)" On one or two desktops, this returns a record. On the server and on all other desktops, no ...
This error probably comes from an user who deleted/inserted that record within a transaction but did not yet commit said transaction.
In what situations would you get different users seeing different rows in a table on SQL Server? SQL Server Version 2000. We've a bunch of desktops talking to MSSQL Server. When looking for a specific record, some desktops return the correct data, but some do not. The SQL Command is "SELECT * FROM PODORDH WHERE ([NO]=6...
TITLE: In what situations would you get different users seeing different rows in a table on SQL Server? QUESTION: SQL Server Version 2000. We've a bunch of desktops talking to MSSQL Server. When looking for a specific record, some desktops return the correct data, but some do not. The SQL Command is "SELECT * FROM POD...
[ "sql-server", "sql-server-2000" ]
1
4
316
6
0
2008-09-17T13:37:36.273000
2008-09-17T13:45:34.973000
83,299
83,352
What's the easiest way to use C source code in a Java application?
I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Windows. It's a library of mostly mathematical functions, so as far as I can tell it doesn't use anything that's platform-dependent, it's just very b...
Your best bet is probably to grab a good c book (K&R: The C Progranmming language) a cup of tea and start translating! I would be skeptical about trusting a translation program, more often then not the best translator is yourself! If you do this one, then its done and you don't need to keep re-doing it. There might be ...
What's the easiest way to use C source code in a Java application? I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Windows. It's a library of mostly mathematical functions, so as far as I can tell ...
TITLE: What's the easiest way to use C source code in a Java application? QUESTION: I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Windows. It's a library of mostly mathematical functions, so as ...
[ "java", "c", "translation" ]
9
5
6,082
7
0
2008-09-17T13:38:09.967000
2008-09-17T13:42:52.233000
83,319
83,338
WPF 3.5 WebBrowser control and ZIndex
I'm trying to figure out why the control does not honor ZIndex. Example 1 - which works fine Example 2 - which does not work Thanks, -- Ed
Unfortunately this is because the WebBrowser control is a wrapper around the Internet Explorer COM control. This means that it gets its own HWND and does not allow WPF to draw anything over it. It has the same restrictions as hosting any other Win32 or WinForms control in WPF. MSDN has more information about WPF/Win32 ...
WPF 3.5 WebBrowser control and ZIndex I'm trying to figure out why the control does not honor ZIndex. Example 1 - which works fine Example 2 - which does not work Thanks, -- Ed
TITLE: WPF 3.5 WebBrowser control and ZIndex QUESTION: I'm trying to figure out why the control does not honor ZIndex. Example 1 - which works fine Example 2 - which does not work Thanks, -- Ed ANSWER: Unfortunately this is because the WebBrowser control is a wrapper around the Internet Explorer COM control. This mea...
[ "wpf", "browser", "z-index" ]
10
21
14,469
6
0
2008-09-17T13:40:14.987000
2008-09-17T13:41:55.763000
83,320
83,597
What is the difference between TrueType fonts and Type-1 fonts?
What is the difference between TrueType fonts and Type-1 fonts?
The Postscript Type-1 specification was created by Adobe back in 1985 or so. Type-1 fonts are vector based. You can find the specification in " Adobe Type 1. Font Format. ". TrueType fonts were defined by Apple a couple of years earlier so True Type and PostScript were competitors in the 1990s. Microsoft picked up True...
What is the difference between TrueType fonts and Type-1 fonts? What is the difference between TrueType fonts and Type-1 fonts?
TITLE: What is the difference between TrueType fonts and Type-1 fonts? QUESTION: What is the difference between TrueType fonts and Type-1 fonts? ANSWER: The Postscript Type-1 specification was created by Adobe back in 1985 or so. Type-1 fonts are vector based. You can find the specification in " Adobe Type 1. Font Fo...
[ "fonts", "truetype" ]
20
20
37,948
3
0
2008-09-17T13:40:17.327000
2008-09-17T14:05:08.903000
83,329
83,347
How can I extract a predetermined range of lines from a text file on Unix?
I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know both the start and end line numbers of the data that I want. Does anyone know a Unix command (or series of commands) to extr...
sed -n '16224,16482p;16483q' filename > newfile From the sed manual: p - Print out the pattern space (to the standard output). This command is usually only used in conjunction with the -n command-line option. n - If auto-print is not disabled, print the pattern space, then, regardless, replace the pattern space with th...
How can I extract a predetermined range of lines from a text file on Unix? I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know both the start and end line numbers of the data t...
TITLE: How can I extract a predetermined range of lines from a text file on Unix? QUESTION: I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know both the start and end line num...
[ "text-processing" ]
666
963
654,688
28
0
2008-09-17T13:40:59.947000
2008-09-17T13:42:34.123000
83,397
83,424
strpos function issue in PHP not finding the needle
In php I have open a.php file and want to evaluate certain lines. Specifically when the $table_id and $line variables are assigned a value. Within the text file I have:... $table_id = 'crs_class'; // table name $screen = 'crs_class.detail.screen.inc'; // file identifying screen structure... amongst other lines. The if ...
use!==false instead of ===true stripos returns the position as an integer if the needle is found. And that's never ===bool. You might also be interested in PHP's tokenizer module or the lexer package in the pear repository.
strpos function issue in PHP not finding the needle In php I have open a.php file and want to evaluate certain lines. Specifically when the $table_id and $line variables are assigned a value. Within the text file I have:... $table_id = 'crs_class'; // table name $screen = 'crs_class.detail.screen.inc'; // file identify...
TITLE: strpos function issue in PHP not finding the needle QUESTION: In php I have open a.php file and want to evaluate certain lines. Specifically when the $table_id and $line variables are assigned a value. Within the text file I have:... $table_id = 'crs_class'; // table name $screen = 'crs_class.detail.screen.inc'...
[ "php", "string" ]
4
8
12,329
5
0
2008-09-17T13:46:59.620000
2008-09-17T13:49:51
83,402
83,455
Interacting with Outlook appointments using rails
I have a rails application running on a Linux server. I would like to interact with Outlook/Exchange 2003 appointments from the rails application. For example, certain actions should trigger sending an appointment, and then preferably accepting/canceling the appointment in Outlook should trigger events in the applicati...
Outlook appointments are just e-mails with special header information. There's some information in this tutorial on the required parts. I sent a few meeting invites from my Outlook to my Gmail account and took a look at the raw headers there - you can figure most of the protocol out from that. The iCalendar specs may h...
Interacting with Outlook appointments using rails I have a rails application running on a Linux server. I would like to interact with Outlook/Exchange 2003 appointments from the rails application. For example, certain actions should trigger sending an appointment, and then preferably accepting/canceling the appointment...
TITLE: Interacting with Outlook appointments using rails QUESTION: I have a rails application running on a Linux server. I would like to interact with Outlook/Exchange 2003 appointments from the rails application. For example, certain actions should trigger sending an appointment, and then preferably accepting/canceli...
[ "ruby-on-rails", "ruby", "outlook", "exchange-server" ]
14
10
6,199
6
0
2008-09-17T13:47:27.840000
2008-09-17T13:53:20.837000
83,405
83,518
XML parser for JavaScript
I am looking for a good JavaScript library for parsing XML data. It should be much easier to use than the built-in XML DOM parsers bundled with the browsers. I got spoiled a bit working with JSON and am looking forward to something on similar lines for XML.
I use jQuery for this. Here is a good example: (EDIT: Note - the following blog seems to have gone away.) http://blog.reindel.com/2007/09/24/jquery-and-xml-revisited/ There are also lots and lots of good examples in the jQuery documentation: http://www.webmonkey.com/tutorial/Easy_XML_Consumption_using_jQuery?oldid=2003...
XML parser for JavaScript I am looking for a good JavaScript library for parsing XML data. It should be much easier to use than the built-in XML DOM parsers bundled with the browsers. I got spoiled a bit working with JSON and am looking forward to something on similar lines for XML.
TITLE: XML parser for JavaScript QUESTION: I am looking for a good JavaScript library for parsing XML data. It should be much easier to use than the built-in XML DOM parsers bundled with the browsers. I got spoiled a bit working with JSON and am looking forward to something on similar lines for XML. ANSWER: I use jQu...
[ "javascript", "xml", "json", "browser", "parsing" ]
16
6
11,061
4
0
2008-09-17T13:47:42.643000
2008-09-17T13:58:43.833000
83,410
83,791
How do I call a SQL Server stored procedure from PowerShell?
I have a large CSV file and I want to execute a stored procedure for each line. What is the best way to execute a stored procedure from PowerShell?
This answer was pulled from http://www.databasejournal.com/features/mssql/article.php/3683181 This same example can be used for any adhoc queries. Let us execute the stored procedure “sp_helpdb” as shown below. $SqlConnection = New-Object System.Data.SqlClient.SqlConnection $SqlConnection.ConnectionString = "Server=HOM...
How do I call a SQL Server stored procedure from PowerShell? I have a large CSV file and I want to execute a stored procedure for each line. What is the best way to execute a stored procedure from PowerShell?
TITLE: How do I call a SQL Server stored procedure from PowerShell? QUESTION: I have a large CSV file and I want to execute a stored procedure for each line. What is the best way to execute a stored procedure from PowerShell? ANSWER: This answer was pulled from http://www.databasejournal.com/features/mssql/article.ph...
[ "sql-server", "powershell" ]
48
79
134,235
8
0
2008-09-17T13:48:25.513000
2008-09-17T14:25:50.913000
83,419
84,294
Stored procedures a no-go in the php/mysql world?
I'm quoting part of an answer which I received for another question of mine: In the PHP/MySQL world I would say stored procedures are no-go I would like to know: Is that so? Why? Why not? [edit]I mean this as a general question without a specific need in mind[/edit]
I develop and maintain a large PHP/MySQL application. Here is my experience with stored procedures. Over time our application has grown very complex. And with all the logic on the php side, some operations would query the database with over 100 short queries. MySQL is so quick that the performance was still acceptable,...
Stored procedures a no-go in the php/mysql world? I'm quoting part of an answer which I received for another question of mine: In the PHP/MySQL world I would say stored procedures are no-go I would like to know: Is that so? Why? Why not? [edit]I mean this as a general question without a specific need in mind[/edit]
TITLE: Stored procedures a no-go in the php/mysql world? QUESTION: I'm quoting part of an answer which I received for another question of mine: In the PHP/MySQL world I would say stored procedures are no-go I would like to know: Is that so? Why? Why not? [edit]I mean this as a general question without a specific need ...
[ "php", "mysql", "stored-procedures" ]
19
24
2,053
10
0
2008-09-17T13:49:21.377000
2008-09-17T15:12:32.533000
83,439
83,538
Remove spaces from std::string in C++
What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way?
The best thing to do is to use the algorithm remove_if and isspace: remove_if(str.begin(), str.end(), isspace); Now the algorithm itself can't change the container(only modify the values), so it actually shuffles the values around and returns a pointer to where the end now should be. So we have to call string::erase to...
Remove spaces from std::string in C++ What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way?
TITLE: Remove spaces from std::string in C++ QUESTION: What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way? ANSWER: The best thing to do is to use the algorithm remove_if and isspace: remove_if(str.begin(), str.end(...
[ "c++", "string", "stl", "whitespace" ]
273
308
511,178
19
0
2008-09-17T13:51:34.680000
2008-09-17T14:00:02.723000
83,471
83,582
String list in SqlCommand through Parameters in C#
Working with a SqlCommand in C# I've created a query that contains a IN (list...) part in the where clause. Instead of looping through my string list generating the list I need for the query (dangerous if you think in sqlInjection). I thought that I could create a parameter like: SELECT blahblahblah WHERE blahblahblah ...
What you are trying to do is possible but not using your current approach. This is a very common problem with all possible solutions prior to SQL Server 2008 having trade offs related to performance, security and memory usage. This link shows some approaches for SQL Server 2000/2005 SQL Server 2008 supports passing a t...
String list in SqlCommand through Parameters in C# Working with a SqlCommand in C# I've created a query that contains a IN (list...) part in the where clause. Instead of looping through my string list generating the list I need for the query (dangerous if you think in sqlInjection). I thought that I could create a para...
TITLE: String list in SqlCommand through Parameters in C# QUESTION: Working with a SqlCommand in C# I've created a query that contains a IN (list...) part in the where clause. Instead of looping through my string list generating the list I need for the query (dangerous if you think in sqlInjection). I thought that I c...
[ "c#", "sql", "sql-server" ]
8
4
30,291
8
0
2008-09-17T13:55:38.227000
2008-09-17T14:03:36.600000
83,475
84,719
Deleting Rows from a SQL Table marked for Replication
I erroneously delete all the rows from a MS SQL 2000 table that is used in merge replication (the table is on the publisher). I then compounded the issue by using a DTS operation to retrieve the rows from a backup database and repopulate the table. This has created the following issue: The delete operation marked the r...
Thanks for the tips...I eventually found a solution: I deleted the merge delete trigger from the table Deleted the DTSed rows Recreated the merge delete trigger Added my rows correctly using an insert statement. I was a little worried bout fiddling with the merge triggers but every thing appears to be working correctly...
Deleting Rows from a SQL Table marked for Replication I erroneously delete all the rows from a MS SQL 2000 table that is used in merge replication (the table is on the publisher). I then compounded the issue by using a DTS operation to retrieve the rows from a backup database and repopulate the table. This has created ...
TITLE: Deleting Rows from a SQL Table marked for Replication QUESTION: I erroneously delete all the rows from a MS SQL 2000 table that is used in merge replication (the table is on the publisher). I then compounded the issue by using a DTS operation to retrieve the rows from a backup database and repopulate the table....
[ "sql-server", "sql-server-2000", "replication" ]
2
0
5,759
6
0
2008-09-17T13:55:49.350000
2008-09-17T15:48:24.540000
83,476
83,672
Google Authentication API: How to get the user's gmail address
I've been studying the Google authentication API (AuthSub)... My question is, how do I get the user's account information (at least their Gmail address) after the authentication has passed? Because currently, all I get back from the authentication process is a token granting me access to which ever Google service I hav...
Using the Google AppEngine GData services, you can request the user to give you access to their Google Mail, Calendar, Picasa, etc. Check it out here.
Google Authentication API: How to get the user's gmail address I've been studying the Google authentication API (AuthSub)... My question is, how do I get the user's account information (at least their Gmail address) after the authentication has passed? Because currently, all I get back from the authentication process i...
TITLE: Google Authentication API: How to get the user's gmail address QUESTION: I've been studying the Google authentication API (AuthSub)... My question is, how do I get the user's account information (at least their Gmail address) after the authentication has passed? Because currently, all I get back from the authen...
[ "google-api", "google-authentication", "authsub" ]
6
2
13,341
4
0
2008-09-17T13:55:51.003000
2008-09-17T14:13:47.463000
83,531
83,783
SQL Select Upcoming Birthdays
I'm trying to write a stored procedure to select employees who have birthdays that are upcoming. SELECT * FROM Employees WHERE Birthday > @Today AND Birthday < @Today + @NumDays This will not work because the birth year is part of Birthday, so if my birthday was '09-18-1983' that will not fall between '09-18-2008' and ...
Note: I've edited this to fix what I believe was a significant bug. The currently posted version works for me. This should work after you modify the field and table names to correspond to your database. SELECT BRTHDATE AS BIRTHDAY,FLOOR(DATEDIFF(dd,EMP.BRTHDATE,GETDATE()) / 365.25) AS AGE_NOW,FLOOR(DATEDIFF(dd,EMP.BRTH...
SQL Select Upcoming Birthdays I'm trying to write a stored procedure to select employees who have birthdays that are upcoming. SELECT * FROM Employees WHERE Birthday > @Today AND Birthday < @Today + @NumDays This will not work because the birth year is part of Birthday, so if my birthday was '09-18-1983' that will not ...
TITLE: SQL Select Upcoming Birthdays QUESTION: I'm trying to write a stored procedure to select employees who have birthdays that are upcoming. SELECT * FROM Employees WHERE Birthday > @Today AND Birthday < @Today + @NumDays This will not work because the birth year is part of Birthday, so if my birthday was '09-18-19...
[ "sql", "sql-server", "t-sql" ]
28
39
74,154
38
0
2008-09-17T13:59:40.853000
2008-09-17T14:25:07.297000
83,547
84,168
Algorithm to find which numbers from a list of size n sum to another number
I have a decimal number (let's call it goal ) and an array of other decimal numbers (let's call the array elements ) and I need to find all the combinations of numbers from elements which sum to goal. I have a preference for a solution in C# (.Net 2.0) but may the best algorithm win irrespective. Your method signature ...
Interesting answers. Thank you for the pointers to Wikipedia - whilst interesting - they don't actually solve the problem as stated as I was looking for exact matches - more of an accounting/book balancing problem than a traditional bin-packing / knapsack problem. I have been following the development of stack overflow...
Algorithm to find which numbers from a list of size n sum to another number I have a decimal number (let's call it goal ) and an array of other decimal numbers (let's call the array elements ) and I need to find all the combinations of numbers from elements which sum to goal. I have a preference for a solution in C# (....
TITLE: Algorithm to find which numbers from a list of size n sum to another number QUESTION: I have a decimal number (let's call it goal ) and an array of other decimal numbers (let's call the array elements ) and I need to find all the combinations of numbers from elements which sum to goal. I have a preference for a...
[ "c#", "algorithm", "math", "np-complete" ]
14
15
28,141
6
0
2008-09-17T14:00:40.053000
2008-09-17T15:00:49.207000
83,553
83,587
How to tie into a domain server's login for program access rights
I need to write a program used internally where different users will have different abilities within the program. Rather than making users have a new username and password, how do I tie into an existing domain server's login system? Assume.NET (C#, VB, ASP, etc) -Adam
For WinForms, use System.Threading.Thread.CurrentPrincipal with the IsInRole() method to check which groups they are a member of. You do need to set the principal policy of the AppDomain to WindowsPrincipal first. Use this to get the current user name: private string getWindowsUsername() { AppDomain.CurrentDomain.SetPr...
How to tie into a domain server's login for program access rights I need to write a program used internally where different users will have different abilities within the program. Rather than making users have a new username and password, how do I tie into an existing domain server's login system? Assume.NET (C#, VB, A...
TITLE: How to tie into a domain server's login for program access rights QUESTION: I need to write a program used internally where different users will have different abilities within the program. Rather than making users have a new username and password, how do I tie into an existing domain server's login system? Ass...
[ "c#" ]
1
4
514
3
0
2008-09-17T14:01:07.103000
2008-09-17T14:04:10.060000
83,640
83,705
C++ does begin/end/rbegin/rend execute in constant time for std::set, std::map, etc?
For data types such as std::set and std::map where lookup occurs in logarithmic time, is the implementation required to maintain the begin and end iterators? Does accessing begin and end imply a lookup that could occur in logarithmic time? I have always assumed that begin and end always occur in constant time, however ...
They happen in constant time. I'm looking at page 466 of the ISO/IEC 14882:2003 standard: Table 65 - Container Requiments a.begin(); (constant complexity) a.end(); (constant complexity) Table 66 - Reversible Container Requirements a.rbegin(); (constant complexity) a.rend(); (constant complexity)
C++ does begin/end/rbegin/rend execute in constant time for std::set, std::map, etc? For data types such as std::set and std::map where lookup occurs in logarithmic time, is the implementation required to maintain the begin and end iterators? Does accessing begin and end imply a lookup that could occur in logarithmic t...
TITLE: C++ does begin/end/rbegin/rend execute in constant time for std::set, std::map, etc? QUESTION: For data types such as std::set and std::map where lookup occurs in logarithmic time, is the implementation required to maintain the begin and end iterators? Does accessing begin and end imply a lookup that could occu...
[ "c++", "stl" ]
9
10
3,608
6
0
2008-09-17T14:09:20.237000
2008-09-17T14:16:45.430000
83,653
83,667
Shorthand if + nullable types (C#)
The following returns Type of conditional expression cannot be determined because there is no implicit conversion between 'double' and ' ' aNullableDouble = (double.TryParse(aString, out aDouble)? aDouble: null) The reason why I can't just use aNullableBool instead of the roundtrip with aDouble is because aNullableDoub...
aNullableDouble = double.TryParse(aString, out aDouble)? (double?)aDouble: null;
Shorthand if + nullable types (C#) The following returns Type of conditional expression cannot be determined because there is no implicit conversion between 'double' and ' ' aNullableDouble = (double.TryParse(aString, out aDouble)? aDouble: null) The reason why I can't just use aNullableBool instead of the roundtrip wi...
TITLE: Shorthand if + nullable types (C#) QUESTION: The following returns Type of conditional expression cannot be determined because there is no implicit conversion between 'double' and ' ' aNullableDouble = (double.TryParse(aString, out aDouble)? aDouble: null) The reason why I can't just use aNullableBool instead o...
[ "c#", "conditional-operator" ]
7
9
3,916
5
0
2008-09-17T14:11:23.617000
2008-09-17T14:13:28.433000
83,673
83,751
Volumetric particles
I'm toying with the idea of volumetric particles. By 'volumetric' I don't mean actually 3D model per particle - usually it's more expensive and harder to blend with other particles. What I mean is 2D particles that will look as close as possible to be volumetric. Right now what I/we have tried is particles with additio...
It sounds like you are asking for information on techniques for the simulation of participating media: "Participating media may absorb, emit and/or scatter light. The simplest participating medium only absorbs light. That means that light passing through the medium is attenuated depending on the density of the medium."...
Volumetric particles I'm toying with the idea of volumetric particles. By 'volumetric' I don't mean actually 3D model per particle - usually it's more expensive and harder to blend with other particles. What I mean is 2D particles that will look as close as possible to be volumetric. Right now what I/we have tried is p...
TITLE: Volumetric particles QUESTION: I'm toying with the idea of volumetric particles. By 'volumetric' I don't mean actually 3D model per particle - usually it's more expensive and harder to blend with other particles. What I mean is 2D particles that will look as close as possible to be volumetric. Right now what I/...
[ "graphics", "3d", "effects" ]
6
2
2,037
3
0
2008-09-17T14:13:55.640000
2008-09-17T14:22:34.293000
83,674
83,736
Mixing ActiveRecord find Conditions
I want to find records on a combination of created_on >= some date AND name IN some list of names. For ">=" I'd have to use sql condition. For "IN" I'd have to use a hash of conditions where the key is:name and the value is the array of names. Is there a way to combine the two?
You can use named scopes in rails 2.1 and above Class Test < ActiveRecord::Base named_scope:created_after_2005,:conditions => "created_on > 2005-01-01" named_scope:named_fred,:conditions => {:name => "fred"} end then you can do Test.created_after_2005.named_fred Or you can give named_scope a lambda allowing you to pass...
Mixing ActiveRecord find Conditions I want to find records on a combination of created_on >= some date AND name IN some list of names. For ">=" I'd have to use sql condition. For "IN" I'd have to use a hash of conditions where the key is:name and the value is the array of names. Is there a way to combine the two?
TITLE: Mixing ActiveRecord find Conditions QUESTION: I want to find records on a combination of created_on >= some date AND name IN some list of names. For ">=" I'd have to use sql condition. For "IN" I'd have to use a hash of conditions where the key is:name and the value is the array of names. Is there a way to comb...
[ "ruby-on-rails", "ruby", "activerecord" ]
10
28
22,278
7
0
2008-09-17T14:14:12.800000
2008-09-17T14:20:40.257000
83,687
83,772
How do I display a substitute password character in a UILabel?
I have a need to display a UITableView containing a user's account credentials. For this, I'm using UILabels in UITableViewCell. When I display their password, I'd obviously like to just display a placeholder password character instead of their actual password, similar to a UITextField when it's set to secure text entr...
Why not just use a UITextField, make the field non-editable and change the border style to make it look like a UILabel?
How do I display a substitute password character in a UILabel? I have a need to display a UITableView containing a user's account credentials. For this, I'm using UILabels in UITableViewCell. When I display their password, I'd obviously like to just display a placeholder password character instead of their actual passw...
TITLE: How do I display a substitute password character in a UILabel? QUESTION: I have a need to display a UITableView containing a user's account credentials. For this, I'm using UILabels in UITableViewCell. When I display their password, I'd obviously like to just display a placeholder password character instead of ...
[ "ios", "objective-c" ]
8
9
11,635
6
0
2008-09-17T14:15:05.107000
2008-09-17T14:24:22.523000
83,728
83,956
What interrupt would you hook from DOS to get the real-time clock
What interrupt would you hook from DOS to get the real-time clock?
The realtime clock cannot generate interrupts. It was (maybe still is) coupled with the cmos-ram because it was buffered by the battery. It can only be accessed via the ports 0x70 and 0x71. You can however hook the interrupt of the PIT (programmable interrupt timer). That's interrupt 0x08 (e.g. hardware IRQ0). As far a...
What interrupt would you hook from DOS to get the real-time clock What interrupt would you hook from DOS to get the real-time clock?
TITLE: What interrupt would you hook from DOS to get the real-time clock QUESTION: What interrupt would you hook from DOS to get the real-time clock? ANSWER: The realtime clock cannot generate interrupts. It was (maybe still is) coupled with the cmos-ram because it was buffered by the battery. It can only be accessed...
[ "x86", "interrupt", "assembly" ]
4
3
2,261
3
0
2008-09-17T14:19:24.237000
2008-09-17T14:40:59.613000