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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
172,905 | 173,193 | Using Linux, how to specify which ethernet interface data is transmitted on | I'm working on a Linux based server system in which there are two network interfaces, both on the same subnet (for now, lets just say they are 172.17.32.10 & 172.17.32.11 ). When I send data to a host on the network, I would like to specify which interface on my server the data is transmitted on. I need to be able to s... | No offense intended, but the answer about using bind() is quite wrong. bind() will control the source IP address placed within the packet IP header. It does not control which interface will be used to send the packet: the kernel's routing table will be consulted to determine which interface has the lowest cost to reach... | Using Linux, how to specify which ethernet interface data is transmitted on I'm working on a Linux based server system in which there are two network interfaces, both on the same subnet (for now, lets just say they are 172.17.32.10 & 172.17.32.11 ). When I send data to a host on the network, I would like to specify whi... | TITLE:
Using Linux, how to specify which ethernet interface data is transmitted on
QUESTION:
I'm working on a Linux based server system in which there are two network interfaces, both on the same subnet (for now, lets just say they are 172.17.32.10 & 172.17.32.11 ). When I send data to a host on the network, I would l... | [
"linux",
"routes",
"networking",
"tcp"
] | 15 | 18 | 11,036 | 1 | 0 | 2008-10-06T00:28:29.300000 | 2008-10-06T04:23:40.930000 |
172,906 | 172,972 | Parsing XML with multi-line records | I'd like to take XML in the format below and load each code record into a domain object in my BootStrap.groovy. I want to preserve the formatting of each snippet of code. XML Groovy println "This is Groovy" println "A very powerful language" Groovy 3.times { println "hello" } Perl @foo = split(","); Domain Object Code ... | roughly something like this: def CODE_XML = ''' Groovy println "This is Groovy" println "A very powerful language" Groovy 3.times { println "hello" } Perl @foo = split(","); ''' def records = new XmlParser().parseText(CODE_XML) records.code.each() { code -> new Code(language: code.language, snippet: code.snippet).save(... | Parsing XML with multi-line records I'd like to take XML in the format below and load each code record into a domain object in my BootStrap.groovy. I want to preserve the formatting of each snippet of code. XML Groovy println "This is Groovy" println "A very powerful language" Groovy 3.times { println "hello" } Perl @f... | TITLE:
Parsing XML with multi-line records
QUESTION:
I'd like to take XML in the format below and load each code record into a domain object in my BootStrap.groovy. I want to preserve the formatting of each snippet of code. XML Groovy println "This is Groovy" println "A very powerful language" Groovy 3.times { println... | [
"xml",
"grails",
"groovy"
] | 1 | 1 | 4,056 | 3 | 0 | 2008-10-06T00:28:37.300000 | 2008-10-06T01:28:12.890000 |
172,908 | 173,281 | Calling .NET COM web service wrapper from Excel | I'm trying to call a web service from Excel 2003 module. The way i've implemented it is creating a.NET COM library with all the classes/methods i need to be exposed. When i try to call a method that queries a web service from Excel the execution just stops on that line without any error. May be it has to do with refere... | To solve the problem i used Access instead of Excel. In Access it was showing me errors. It turned out that the location of all the reference assemblies should be the location of caller application (in this case it was C:\Program Files\Microsoft Office\OFFICE11). Sencondly my web services proxies were loading the endpo... | Calling .NET COM web service wrapper from Excel I'm trying to call a web service from Excel 2003 module. The way i've implemented it is creating a.NET COM library with all the classes/methods i need to be exposed. When i try to call a method that queries a web service from Excel the execution just stops on that line wi... | TITLE:
Calling .NET COM web service wrapper from Excel
QUESTION:
I'm trying to call a web service from Excel 2003 module. The way i've implemented it is creating a.NET COM library with all the classes/methods i need to be exposed. When i try to call a method that queries a web service from Excel the execution just sto... | [
".net",
"web-services",
"excel",
"com"
] | 1 | 1 | 1,304 | 2 | 0 | 2008-10-06T00:31:35.203000 | 2008-10-06T05:43:57.913000 |
172,918 | 176,454 | Div 100% height works on Firefox but not in IE | I have a container div that holds two internal divs; both should take 100% width and 100% height within the container. I set both internal divs to 100% height. That works fine in Firefox, however in IE the divs do not stretch to 100% height but only the height of the text inside them. The following is a simplified vers... | I think "works fine in Firefox" is in the Quirks mode rendering only. In the Standard mode rendering, that might not work fine in Firefox too. percentage depends on "containing block", instead of viewport. CSS Specification says The percentage is calculated with respect to the height of the generated box's containing b... | Div 100% height works on Firefox but not in IE I have a container div that holds two internal divs; both should take 100% width and 100% height within the container. I set both internal divs to 100% height. That works fine in Firefox, however in IE the divs do not stretch to 100% height but only the height of the text ... | TITLE:
Div 100% height works on Firefox but not in IE
QUESTION:
I have a container div that holds two internal divs; both should take 100% width and 100% height within the container. I set both internal divs to 100% height. That works fine in Firefox, however in IE the divs do not stretch to 100% height but only the h... | [
"html",
"css",
"internet-explorer",
"firefox"
] | 46 | 74 | 106,150 | 8 | 0 | 2008-10-06T00:40:13.347000 | 2008-10-06T22:26:53.287000 |
172,921 | 173,249 | Haskell FFI / C MPFR library wrapper woes | In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap MPFR using the FFI but despite all my efforts the simplest bit of code doesn't work. It compiles, it runs, but it crashes mockingly after pretending to work for a while. A simple C version of the code happily p... | I see the problem too, on a $ uname -a Linux burnup 2.6.26-gentoo-r1 #1 SMP PREEMPT Tue Sep 9 00:05:54 EDT 2008 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux $ gcc --version gcc (GCC) 4.2.4 (Gentoo 4.2.4 p1.0) $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.8.3 I also see the ... | Haskell FFI / C MPFR library wrapper woes In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap MPFR using the FFI but despite all my efforts the simplest bit of code doesn't work. It compiles, it runs, but it crashes mockingly after pretending to work for a while... | TITLE:
Haskell FFI / C MPFR library wrapper woes
QUESTION:
In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap MPFR using the FFI but despite all my efforts the simplest bit of code doesn't work. It compiles, it runs, but it crashes mockingly after pretending t... | [
"c",
"haskell",
"floating-point",
"ffi",
"mpfr"
] | 4 | 3 | 794 | 3 | 0 | 2008-10-06T00:41:17.713000 | 2008-10-06T05:07:54.397000 |
172,925 | 172,992 | How do databases work internally? | I've been working with databases for the last few years and I'd like to think that I've gotten fairly competent with using them. However I was reading recently about Joel's Law of Leaky Abstractions and I realised that even though I can write a query to get pretty much anything I want out of a database, I have no idea ... | What does a database actually do to find out what matches a select statement? To be blunt, it's a matter of brute force. Simply, it reads through each candidate record in the database and matches the expression to the fields. So, if you have "select * from table where name = 'fred'", it literally runs through each reco... | How do databases work internally? I've been working with databases for the last few years and I'd like to think that I've gotten fairly competent with using them. However I was reading recently about Joel's Law of Leaky Abstractions and I realised that even though I can write a query to get pretty much anything I want ... | TITLE:
How do databases work internally?
QUESTION:
I've been working with databases for the last few years and I'd like to think that I've gotten fairly competent with using them. However I was reading recently about Joel's Law of Leaky Abstractions and I realised that even though I can write a query to get pretty muc... | [
"database",
"reference",
"internals"
] | 84 | 89 | 35,361 | 5 | 0 | 2008-10-06T00:47:22.053000 | 2008-10-06T01:40:23.973000 |
172,934 | 177,279 | Displaying an IGrouping<> with nested ListViews | I need to retrieve a set of Widgets from my data access layer, grouped by widget.Manufacturer, to display in a set of nested ASP.NET ListViews. The problem is that (as far as I can tell) the nested ListView approach requires me to shape the data before using it, and I can't figure out the best approach to take. The bes... | Ok, I'm going to contradict my prior statement. Since eval wants some kind of property name in the nested control, we should probably shape that data. public class CustomGroup { public TKey Key {get;set;} public IEnumerable Values {get;set;} } // and use it thusly... IEnumerable > result = GetAllWidgets(widgetTypeId).G... | Displaying an IGrouping<> with nested ListViews I need to retrieve a set of Widgets from my data access layer, grouped by widget.Manufacturer, to display in a set of nested ASP.NET ListViews. The problem is that (as far as I can tell) the nested ListView approach requires me to shape the data before using it, and I can... | TITLE:
Displaying an IGrouping<> with nested ListViews
QUESTION:
I need to retrieve a set of Widgets from my data access layer, grouped by widget.Manufacturer, to display in a set of nested ASP.NET ListViews. The problem is that (as far as I can tell) the nested ListView approach requires me to shape the data before u... | [
"asp.net",
"linq",
"listview"
] | 10 | 12 | 7,196 | 3 | 0 | 2008-10-06T00:54:22.897000 | 2008-10-07T05:03:09.633000 |
172,942 | 173,220 | Implementation of ISupportErrorInfo - what does it mean? | What does the ISupportErrorInfo interface mean? I'm at a bit of a loss to understand it. From MSDN: This interface ensures that error information can be propagated up the call chain correctly. Automation objects that use the error handling interfaces must implement ISupportErrorInfo. This method indicates whether or no... | My understanding of it (based on some related MSDN pages) is that by implementing ISupportErrorInfo, you are indicating that one or more interfaces on your class returns error information by calling SetErrorInfo, as opposed to just returning a failure HRESULT. To that end, your implementation of ISuportErrorInfo::Inter... | Implementation of ISupportErrorInfo - what does it mean? What does the ISupportErrorInfo interface mean? I'm at a bit of a loss to understand it. From MSDN: This interface ensures that error information can be propagated up the call chain correctly. Automation objects that use the error handling interfaces must impleme... | TITLE:
Implementation of ISupportErrorInfo - what does it mean?
QUESTION:
What does the ISupportErrorInfo interface mean? I'm at a bit of a loss to understand it. From MSDN: This interface ensures that error information can be propagated up the call chain correctly. Automation objects that use the error handling inter... | [
"com",
"error-handling"
] | 14 | 22 | 3,954 | 1 | 0 | 2008-10-06T01:04:01.567000 | 2008-10-06T04:40:21.053000 |
172,945 | 172,949 | PHP Libraries: SVN Access | Are there any decent PHP libraries available for accessing SVN repositories? Right now I just have some scripts executing commands to the command line and parsing the feedback, I'd love to find something less dependent on the command line and more tightly integrated. Any ideas? | A quick google search; https://www.php.net/svn http://php-svn-client.tigris.org http://pecl.php.net/package/svn | PHP Libraries: SVN Access Are there any decent PHP libraries available for accessing SVN repositories? Right now I just have some scripts executing commands to the command line and parsing the feedback, I'd love to find something less dependent on the command line and more tightly integrated. Any ideas? | TITLE:
PHP Libraries: SVN Access
QUESTION:
Are there any decent PHP libraries available for accessing SVN repositories? Right now I just have some scripts executing commands to the command line and parsing the feedback, I'd love to find something less dependent on the command line and more tightly integrated. Any idea... | [
"php",
"svn"
] | 2 | 5 | 3,133 | 2 | 0 | 2008-10-06T01:06:37.600000 | 2008-10-06T01:11:04.983000 |
172,951 | 172,971 | hashing sensitive data | I need to scramble the names and logins of all the users in a UAT database we have. (because of the data protection act) However, there is a catch. The testers still need to be able to login using the hashed login names so if a user login is "Jesse.J.James" then the hash should be something like Ypois.X.Qasdf i.e. appr... | You do not need to hash the data. You should just randomize it so it has no relation to the original data. For example, update all the login names, and replace each letter with another random letter. | hashing sensitive data I need to scramble the names and logins of all the users in a UAT database we have. (because of the data protection act) However, there is a catch. The testers still need to be able to login using the hashed login names so if a user login is "Jesse.J.James" then the hash should be something like ... | TITLE:
hashing sensitive data
QUESTION:
I need to scramble the names and logins of all the users in a UAT database we have. (because of the data protection act) However, there is a catch. The testers still need to be able to login using the hashed login names so if a user login is "Jesse.J.James" then the hash should ... | [
"c#",
"encryption",
"hash"
] | 0 | 8 | 821 | 9 | 0 | 2008-10-06T01:13:20.363000 | 2008-10-06T01:25:08.420000 |
172,957 | 173,075 | Detecting Back Button/Hash Change in URL | I just set up my new homepage at http://ritter.vg. I'm using jQuery, but very minimally. It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. //general functions function getUrl(u) { return u + '.html'; } function loadURL(u) { $.get(getUrl(u), function(r){ $('#main... | Use the jQuery hashchange event plugin instead. Regarding your full ajax navigation, try to have SEO friendly ajax. Otherwise your pages shown nothing in browsers with JavaScript limitations. | Detecting Back Button/Hash Change in URL I just set up my new homepage at http://ritter.vg. I'm using jQuery, but very minimally. It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. //general functions function getUrl(u) { return u + '.html'; } function loadURL(u)... | TITLE:
Detecting Back Button/Hash Change in URL
QUESTION:
I just set up my new homepage at http://ritter.vg. I'm using jQuery, but very minimally. It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. //general functions function getUrl(u) { return u + '.html'; } f... | [
"javascript",
"ajax",
"navigation",
"fragment-identifier",
"hashchange"
] | 63 | 31 | 113,956 | 7 | 0 | 2008-10-06T01:18:51.617000 | 2008-10-06T02:46:02.530000 |
173,005 | 173,012 | Converting mysql TIME from 24 HR to AM/PM format | I want to display the TIME field from my mysql table on my website, but rather than showing 21:00:00 etc I want to show 8:00 PM. I need a function/code to do this or even any pointers in the right direction. Will mark the first reply with some code as the correct reply. | Check this out: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html I'd imagine you'd want date_format(). Example: DATE_FORMAT($date, "%r") | Converting mysql TIME from 24 HR to AM/PM format I want to display the TIME field from my mysql table on my website, but rather than showing 21:00:00 etc I want to show 8:00 PM. I need a function/code to do this or even any pointers in the right direction. Will mark the first reply with some code as the correct reply. | TITLE:
Converting mysql TIME from 24 HR to AM/PM format
QUESTION:
I want to display the TIME field from my mysql table on my website, but rather than showing 21:00:00 etc I want to show 8:00 PM. I need a function/code to do this or even any pointers in the right direction. Will mark the first reply with some code as t... | [
"php",
"mysql",
"datetime",
"date",
"time"
] | 16 | 21 | 70,016 | 5 | 0 | 2008-10-06T01:51:44.263000 | 2008-10-06T02:00:08.973000 |
173,008 | 173,010 | Apache: Multiple log files? | What are the access.log.* files? | Apache, I believe, does log rotation. So these would be the older log files with the access.log file being the current one. | Apache: Multiple log files? What are the access.log.* files? | TITLE:
Apache: Multiple log files?
QUESTION:
What are the access.log.* files?
ANSWER:
Apache, I believe, does log rotation. So these would be the older log files with the access.log file being the current one. | [
"apache",
"logging"
] | 1 | 3 | 1,229 | 2 | 0 | 2008-10-06T01:55:12.900000 | 2008-10-06T01:56:31.447000 |
173,009 | 173,026 | How do you make a WPF slider snap only to discrete integer positions? | All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions. How does one do this in WPF since the Value property on the Slider is double? | If you set your tick marks in the right way, you can use IsSnapToTickEnabled. This worked pretty well for me. See MSDN for details. | How do you make a WPF slider snap only to discrete integer positions? All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions. How does one do this in WPF since the Valu... | TITLE:
How do you make a WPF slider snap only to discrete integer positions?
QUESTION:
All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions. How does one do this in ... | [
"wpf",
"controls",
"slider"
] | 135 | 107 | 107,231 | 4 | 0 | 2008-10-06T01:56:26.267000 | 2008-10-06T02:10:51.293000 |
173,040 | 173,071 | Can anyone think of some good reasons *not* to use an Object-Oriented DBMS to back a website? | Say you're coding some kind of web application. Something where people can contribute content, e.g. a simple photo-sharing site. How many good reasons can you think of to not go with an object-oriented database (e.g. db4o)? | An OODBMS is better if you only need to access your data through your objects. If your solution requires additional pathways to your data (e.g. ad-hoc queries, reporting, other applications that need data access but can't make use of your objects), then a traditional RDBMS system is better. Note: OODBMSes have made a l... | Can anyone think of some good reasons *not* to use an Object-Oriented DBMS to back a website? Say you're coding some kind of web application. Something where people can contribute content, e.g. a simple photo-sharing site. How many good reasons can you think of to not go with an object-oriented database (e.g. db4o)? | TITLE:
Can anyone think of some good reasons *not* to use an Object-Oriented DBMS to back a website?
QUESTION:
Say you're coding some kind of web application. Something where people can contribute content, e.g. a simple photo-sharing site. How many good reasons can you think of to not go with an object-oriented databa... | [
"web-applications",
"db4o",
"object-oriented-database"
] | 10 | 7 | 1,107 | 11 | 0 | 2008-10-06T02:18:36.067000 | 2008-10-06T02:42:41.353000 |
173,056 | 860,542 | parameterised jsp:includes of stripes actions? | I've been trying to solve this, and have been getting stuck, so I thought I'd ask. Imagine two ActionBeans, A and B. A.jsp has this section in it:...... Take it as read that the B ActionBean does some terribly interesting stuff depending on whether the "ponies" parameter is set to either on or off. The parameter string... | The reason that this wasn't working was because of massaging done by our implementation of HttpServletRequest. It works fine with the "normal" implementation. | parameterised jsp:includes of stripes actions? I've been trying to solve this, and have been getting stuck, so I thought I'd ask. Imagine two ActionBeans, A and B. A.jsp has this section in it:...... Take it as read that the B ActionBean does some terribly interesting stuff depending on whether the "ponies" parameter i... | TITLE:
parameterised jsp:includes of stripes actions?
QUESTION:
I've been trying to solve this, and have been getting stuck, so I thought I'd ask. Imagine two ActionBeans, A and B. A.jsp has this section in it:...... Take it as read that the B ActionBean does some terribly interesting stuff depending on whether the "p... | [
"parameterized",
"stripes",
"jspinclude"
] | 1 | 1 | 1,713 | 2 | 0 | 2008-10-06T02:29:16.387000 | 2009-05-13T21:33:36.133000 |
173,070 | 173,123 | 2.9999999999999999 >> .5? | I heard that you could right-shift a number by.5 instead of using Math.floor(). I decided to check its limits to make sure that it was a suitable replacement, so I checked the following values and got the following results in Google Chrome: 2.5 >>.5 == 2; 2.9999 >>.5 == 2; 2.999999999999999 >>.5 == 2; // 15 9s 2.999999... | Actually, you're simply ending up doing a floor() on the first operand, without any floating point operations going on. Since the left shift and right shift bitwise operations only make sense with integer operands, the JavaScript engine is converting the two operands to integers first: 2.999999 >> 0.5 Becomes: Math.flo... | 2.9999999999999999 >> .5? I heard that you could right-shift a number by.5 instead of using Math.floor(). I decided to check its limits to make sure that it was a suitable replacement, so I checked the following values and got the following results in Google Chrome: 2.5 >>.5 == 2; 2.9999 >>.5 == 2; 2.999999999999999 >>... | TITLE:
2.9999999999999999 >> .5?
QUESTION:
I heard that you could right-shift a number by.5 instead of using Math.floor(). I decided to check its limits to make sure that it was a suitable replacement, so I checked the following values and got the following results in Google Chrome: 2.5 >>.5 == 2; 2.9999 >>.5 == 2; 2.... | [
"javascript",
"bit-manipulation",
"precision"
] | 14 | 64 | 2,042 | 10 | 0 | 2008-10-06T02:42:28.497000 | 2008-10-06T03:25:52.543000 |
173,080 | 173,114 | C# .NET 3.0/3.5 features in 2.0 using Visual Studio 2008 | What are some of the new features that can be used in.NET 2.0 that are specific to C# 3.0/3.5 after upgrading to Visual Studio 2008? Also, what are some of the features that aren't available? Available Lambdas Extension methods (by declaring an empty System.Runtime.CompilerServices.ExtensionAttribute) Automatic propert... | You can use any new C# 3.0 feature that is handled by the compiler by emitting 2.0-compatible IL and doesn't reference any of the new 3.5 assemblies: Lambdas (used as Func<..>, not Expression > ) Extension methods (by declaring an empty System.Runtime.CompilerServices.ExtensionAttribute ) Automatic properties Object In... | C# .NET 3.0/3.5 features in 2.0 using Visual Studio 2008 What are some of the new features that can be used in.NET 2.0 that are specific to C# 3.0/3.5 after upgrading to Visual Studio 2008? Also, what are some of the features that aren't available? Available Lambdas Extension methods (by declaring an empty System.Runti... | TITLE:
C# .NET 3.0/3.5 features in 2.0 using Visual Studio 2008
QUESTION:
What are some of the new features that can be used in.NET 2.0 that are specific to C# 3.0/3.5 after upgrading to Visual Studio 2008? Also, what are some of the features that aren't available? Available Lambdas Extension methods (by declaring an ... | [
"c#",
".net",
"visual-studio"
] | 13 | 16 | 2,843 | 7 | 0 | 2008-10-06T02:47:28.160000 | 2008-10-06T03:18:24.573000 |
173,108 | 173,128 | Election 2008 data files - how to know which candidate received the financial contribution? | I was trying to programmatically go through presidential campaign contributions to see which web 2.0 people contributed to which candidates. You can get the data file indiv08.zip on the site http://www.fec.gov/finance/disclosure/ftpdet.shtml#a2007_2008 I can parse out who contributed and how much they contributed, but ... | On page 3 of the tutorial that is linked at the top of the page you liked to contains the column names including "Candidate Identification". | Election 2008 data files - how to know which candidate received the financial contribution? I was trying to programmatically go through presidential campaign contributions to see which web 2.0 people contributed to which candidates. You can get the data file indiv08.zip on the site http://www.fec.gov/finance/disclosure... | TITLE:
Election 2008 data files - how to know which candidate received the financial contribution?
QUESTION:
I was trying to programmatically go through presidential campaign contributions to see which web 2.0 people contributed to which candidates. You can get the data file indiv08.zip on the site http://www.fec.gov/... | [
"file-format"
] | 2 | 2 | 156 | 1 | 0 | 2008-10-06T03:15:26.653000 | 2008-10-06T03:34:12.340000 |
173,115 | 242,743 | mootools or javascript : what does $tmp stand for or what does it pertain too | I'm currently working on the Tips.js from mootools library and my code breaks on the line that has those el.$tmp, and console says it's undefined Can anybody help me? | in 1.11 (haven't checked in 1.2+) $tmp is a reference to the element itself, created and used internally by the garbage collector: var Garbage = {
elements: [],
collect: function(el){ if (!el.$tmp){ Garbage.elements.push(el); el.$tmp = {'opacity': 1}; } return el; },
trash: function(elements){ for (var i = 0, j = el... | mootools or javascript : what does $tmp stand for or what does it pertain too I'm currently working on the Tips.js from mootools library and my code breaks on the line that has those el.$tmp, and console says it's undefined Can anybody help me? | TITLE:
mootools or javascript : what does $tmp stand for or what does it pertain too
QUESTION:
I'm currently working on the Tips.js from mootools library and my code breaks on the line that has those el.$tmp, and console says it's undefined Can anybody help me?
ANSWER:
in 1.11 (haven't checked in 1.2+) $tmp is a refe... | [
"javascript",
"mootools"
] | 1 | 1 | 2,071 | 3 | 0 | 2008-10-06T03:18:49.157000 | 2008-10-28T10:10:40.093000 |
173,144 | 173,152 | What's the best way to only allow a PHP file to be included? | I want to make sure people can't type the name of a PHP script in the URL and run it. What's the best way of doing this? I could set a variable in the file that will be including this file, and then check that variable in the file being included, but is there an easier way? | You could check the URI and see if that file is being called with ` $_SERVER['SCRIPT_FILENAME'] or you could move the file outside the public folder, this is a better solution. | What's the best way to only allow a PHP file to be included? I want to make sure people can't type the name of a PHP script in the URL and run it. What's the best way of doing this? I could set a variable in the file that will be including this file, and then check that variable in the file being included, but is there... | TITLE:
What's the best way to only allow a PHP file to be included?
QUESTION:
I want to make sure people can't type the name of a PHP script in the URL and run it. What's the best way of doing this? I could set a variable in the file that will be including this file, and then check that variable in the file being incl... | [
"php"
] | 13 | 8 | 9,659 | 9 | 0 | 2008-10-06T03:49:01.763000 | 2008-10-06T03:53:34.593000 |
173,145 | 173,397 | conditional logic based on type | Given: interface I { }
class B: I { }
class C: I { }
class A {
public void Method(B arg) { }
public void Method(C arg) { }
public void Method(I arg) { // THIS is the method I want to simplify. if (I is B) { this.Method(arg as B); } else if (I is C) { this.Method(arg as C); } } } I know that there are better ways ... | What you want is double dispatch, and visitor pattern in particular. | conditional logic based on type Given: interface I { }
class B: I { }
class C: I { }
class A {
public void Method(B arg) { }
public void Method(C arg) { }
public void Method(I arg) { // THIS is the method I want to simplify. if (I is B) { this.Method(arg as B); } else if (I is C) { this.Method(arg as C); } } } I ... | TITLE:
conditional logic based on type
QUESTION:
Given: interface I { }
class B: I { }
class C: I { }
class A {
public void Method(B arg) { }
public void Method(C arg) { }
public void Method(I arg) { // THIS is the method I want to simplify. if (I is B) { this.Method(arg as B); } else if (I is C) { this.Method(a... | [
"c#",
".net",
"polymorphism"
] | 2 | 5 | 1,717 | 6 | 0 | 2008-10-06T03:49:29.313000 | 2008-10-06T06:57:27.047000 |
173,158 | 173,237 | How do you stay focused and ship projects? | I find way too many projects to get involved in, way to many languages to play with (and way too many cool features within those languages), and way too many books to read... How do you guys stay focused and actually get anything done, rather than leaving a trail of partially complete "experiments?" | Money, and the feeling of accomplishment that goes along with actually finishing something. When I first thought about working for myself I started coming up with ideas of software that I would develop and then later sell. Of course, I really didn't know if what I was making would actually sell, so it was easy to get d... | How do you stay focused and ship projects? I find way too many projects to get involved in, way to many languages to play with (and way too many cool features within those languages), and way too many books to read... How do you guys stay focused and actually get anything done, rather than leaving a trail of partially ... | TITLE:
How do you stay focused and ship projects?
QUESTION:
I find way too many projects to get involved in, way to many languages to play with (and way too many cool features within those languages), and way too many books to read... How do you guys stay focused and actually get anything done, rather than leaving a t... | [
"project-management"
] | 5 | 6 | 478 | 7 | 0 | 2008-10-06T03:56:42.060000 | 2008-10-06T05:00:21.357000 |
173,159 | 173,650 | Difference Between ViewData and TempData? | I know what ViewData is and use it all the time, but in ASP.NET Preview 5 they introduced something new called TempData. I normally strongly type my ViewData, instead of using the dictionary of objects approach. So, when should I use TempData instead of ViewData? Are there any best practices for this? | In one sentence: TempData are like ViewData with one difference: They only contain data between two successive requests, after that they are destroyed. You can use TempData to pass error messages or something similar. Although outdated, this article has good description of the TempData lifecycle. As Ben Scheirman said ... | Difference Between ViewData and TempData? I know what ViewData is and use it all the time, but in ASP.NET Preview 5 they introduced something new called TempData. I normally strongly type my ViewData, instead of using the dictionary of objects approach. So, when should I use TempData instead of ViewData? Are there any ... | TITLE:
Difference Between ViewData and TempData?
QUESTION:
I know what ViewData is and use it all the time, but in ASP.NET Preview 5 they introduced something new called TempData. I normally strongly type my ViewData, instead of using the dictionary of objects approach. So, when should I use TempData instead of ViewDa... | [
"asp.net-mvc"
] | 104 | 100 | 51,199 | 6 | 0 | 2008-10-06T03:57:42.153000 | 2008-10-06T09:16:55.130000 |
173,205 | 173,226 | Getting color of a data series from a flot chart | After seeing the cool new "reputation" tab on the stackoverflow user page, I was inspired to play with the Flot charting library a little. I have a line chart that has several hundred series. Only a couple of these series will be visible at any given time. My data series are grouped into several "categories" and I assi... | There's an example at the bottom of http://flot.googlecode.com/svn/trunk/API.txt that does just that. Something like: var plot = $.plot(placeholder, data, options) var series = plot.getData(); for (var i = 0; i < series.length; ++i) alert(series[i].color); | Getting color of a data series from a flot chart After seeing the cool new "reputation" tab on the stackoverflow user page, I was inspired to play with the Flot charting library a little. I have a line chart that has several hundred series. Only a couple of these series will be visible at any given time. My data series... | TITLE:
Getting color of a data series from a flot chart
QUESTION:
After seeing the cool new "reputation" tab on the stackoverflow user page, I was inspired to play with the Flot charting library a little. I have a line chart that has several hundred series. Only a couple of these series will be visible at any given ti... | [
"jquery",
"flot"
] | 8 | 14 | 8,481 | 1 | 0 | 2008-10-06T04:28:33.743000 | 2008-10-06T04:46:38.623000 |
173,207 | 549,715 | JQuery's $ is in conflict with that of StringTemplate.Net in ASP.Net MVC | I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to.Net, as my template engine to generate html and to send JSON. However, when I view the page, I could not see it. After debugging, I've realized that the $ is used by the StringTemplate to access property... | You can of course move your js logic into a.js file. But if you want it inline with your StringTemplate views, you can escape it using the \$ construct. In addition, you can simply use the jQuery("selector"), instead of $("selector") construct if you want to avoid the escaping syntax. Here's a good article on using Str... | JQuery's $ is in conflict with that of StringTemplate.Net in ASP.Net MVC I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to.Net, as my template engine to generate html and to send JSON. However, when I view the page, I could not see it. After debugging, ... | TITLE:
JQuery's $ is in conflict with that of StringTemplate.Net in ASP.Net MVC
QUESTION:
I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to.Net, as my template engine to generate html and to send JSON. However, when I view the page, I could not see it.... | [
"asp.net",
"asp.net-mvc",
"templates",
"stringtemplate"
] | 17 | 13 | 15,575 | 14 | 0 | 2008-10-06T04:30:25.440000 | 2009-02-14T20:13:26.300000 |
173,209 | 173,221 | How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project? | Specifically, in VS 2008, I want to connect to a data source that you can have by right-clicking on the automatically-generated App_Data folder (an.mdf "database"). Seems easy, and it is once you know how. | So here's the answer from MSDN: Choos[e] "Add New Data Source" from the Data menu.[And follow the connection wizard] Very easy, except that I have no Data menu. If you don't have a Data menu, do the following: Click on Tools >> Connect to Database... Select "Microsoft SQL Server Database File", take the default Data pr... | How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project? Specifically, in VS 2008, I want to connect to a data source that you can have by right-clicking on the automatically-generated App_Data folder (an.mdf "database"). Seems easy, and it is once you know how. | TITLE:
How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project?
QUESTION:
Specifically, in VS 2008, I want to connect to a data source that you can have by right-clicking on the automatically-generated App_Data folder (an.mdf "database"). Seems easy, and it is once you know how.
ANSWE... | [
"c#",
"asp.net",
"database",
"visual-studio-2008"
] | 10 | 9 | 72,546 | 5 | 0 | 2008-10-06T04:32:06.170000 | 2008-10-06T04:40:40.817000 |
173,219 | 173,502 | php-cgi runs as root | I run php 5.2.6 as a cgi under lighttpd 1.4 and for some reason it's always running as root. All php-cgi processes in are owned by root and all files written to the file system are owned by root. I've tried setting the user in lighttpd as non privileged, and confirmed, it's running right it's just php that runs as root... | Ensure: server.username = "nonprivuser" server.groupname = "nonprivgroup" stop lighttpd. check for existing php processes and kill them. start lighttpd check php processes are running as non priv if php is still running as root, then you possibly have a SETUID script somewhere loading them ( you really shouldn't, but i... | php-cgi runs as root I run php 5.2.6 as a cgi under lighttpd 1.4 and for some reason it's always running as root. All php-cgi processes in are owned by root and all files written to the file system are owned by root. I've tried setting the user in lighttpd as non privileged, and confirmed, it's running right it's just ... | TITLE:
php-cgi runs as root
QUESTION:
I run php 5.2.6 as a cgi under lighttpd 1.4 and for some reason it's always running as root. All php-cgi processes in are owned by root and all files written to the file system are owned by root. I've tried setting the user in lighttpd as non privileged, and confirmed, it's runnin... | [
"php",
"fastcgi",
"lighttpd"
] | 1 | 2 | 2,312 | 2 | 0 | 2008-10-06T04:40:05.203000 | 2008-10-06T07:50:22.620000 |
173,241 | 173,251 | What library should be included to use TransparentBlt? | What library should be included to use TransparentBlt? This is VC98 (Visual Studio 6) linking to the Gdi32.lib. (Other GDI functions such as BitBlt link as expected), and the compilers compiles with out error or warning. Even though the Gdi32.lib is included, yet the linker returns this error: mtcombo.obj: error LNK200... | AFAIK, you will need the Msimg32.lib http://msdn.microsoft.com/en-us/library/ms532303(VS.85).aspx | What library should be included to use TransparentBlt? What library should be included to use TransparentBlt? This is VC98 (Visual Studio 6) linking to the Gdi32.lib. (Other GDI functions such as BitBlt link as expected), and the compilers compiles with out error or warning. Even though the Gdi32.lib is included, yet t... | TITLE:
What library should be included to use TransparentBlt?
QUESTION:
What library should be included to use TransparentBlt? This is VC98 (Visual Studio 6) linking to the Gdi32.lib. (Other GDI functions such as BitBlt link as expected), and the compilers compiles with out error or warning. Even though the Gdi32.lib ... | [
"c",
"winapi",
"linker",
"gdi",
"visual-studio-6"
] | 0 | 4 | 3,340 | 2 | 0 | 2008-10-06T05:05:57.257000 | 2008-10-06T05:12:48.617000 |
173,246 | 173,306 | Parsing and generating Microsoft Office 2007 files (.docx, .xlsx, .pptx) | I have a web project where I must import text and images from a user-supplied document, and one of the possible formats is Microsoft Office 2007. There's also a need to generate documents in this format. The server runs CentOS 5.2 and has PHP/Perl/Python installed. I can execute local binaries and shell scripts if I mu... | The Office 2007 file formats are open and well documented. Roughly speaking, all of the new file formats ending in "x" are zip compressed XML documents. For example: To open a Word 2007 XML file Create a temporary folder in which to store the file and its parts. Save a Word 2007 document, containing text, pictures, and... | Parsing and generating Microsoft Office 2007 files (.docx, .xlsx, .pptx) I have a web project where I must import text and images from a user-supplied document, and one of the possible formats is Microsoft Office 2007. There's also a need to generate documents in this format. The server runs CentOS 5.2 and has PHP/Perl... | TITLE:
Parsing and generating Microsoft Office 2007 files (.docx, .xlsx, .pptx)
QUESTION:
I have a web project where I must import text and images from a user-supplied document, and one of the possible formats is Microsoft Office 2007. There's also a need to generate documents in this format. The server runs CentOS 5.... | [
"php",
"python",
"perl",
"parsing",
"office-2007"
] | 14 | 18 | 17,368 | 4 | 0 | 2008-10-06T05:07:19.250000 | 2008-10-06T06:10:41.340000 |
173,247 | 863,013 | How can I make my ad hoc iPhone application's icon show up in iTunes? | I've got an iPhone app with icon file Icon.png. This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes. What do I need to do to get it to show up properly? | The cleanest way to do this is described in the official Apple documentation, in a section called Publishing Applications for Testing. Below is the exact instructions given to you on that page: The iTunes artwork your testers see should be your application’s icon. This artwork must be a 512 x 512 JPEG or PNG file named... | How can I make my ad hoc iPhone application's icon show up in iTunes? I've got an iPhone app with icon file Icon.png. This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes. What do I need to do to get it to show up properly? | TITLE:
How can I make my ad hoc iPhone application's icon show up in iTunes?
QUESTION:
I've got an iPhone app with icon file Icon.png. This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes. What do I need to do to get it to show up properly?
ANSWER:... | [
"iphone",
"icons",
"itunes",
"packaging",
"software-distribution"
] | 44 | 80 | 47,656 | 8 | 0 | 2008-10-06T05:07:32.730000 | 2009-05-14T12:22:42.733000 |
173,257 | 173,394 | Writing ID3v2 Tag parsing code, need Good examples to test | I am writing software to parse ID3v2 tags in Java. I need to find some files with good examples of the tag with lots of different frames. Ideally the tags will contain an embedded picture because that is what is kicking my butt right now. Does anyone know where I can find some good free (legal) ID3v2 tagged files (ID3v... | You can create the example files with a tagger by yourself. I'm the author of the Windows freeware tagger Mp3tag which is able to write ID3v2.3 (UTF-16 and ISO-8859-1) and ID3v2.4 tags in UTF-8 (both along with APIC frames). You can find a list of supported frames here. To create ID3v2.2 tags, I think the only program ... | Writing ID3v2 Tag parsing code, need Good examples to test I am writing software to parse ID3v2 tags in Java. I need to find some files with good examples of the tag with lots of different frames. Ideally the tags will contain an embedded picture because that is what is kicking my butt right now. Does anyone know where... | TITLE:
Writing ID3v2 Tag parsing code, need Good examples to test
QUESTION:
I am writing software to parse ID3v2 tags in Java. I need to find some files with good examples of the tag with lots of different frames. Ideally the tags will contain an embedded picture because that is what is kicking my butt right now. Does... | [
"id3"
] | 1 | 2 | 3,477 | 2 | 0 | 2008-10-06T05:20:20.643000 | 2008-10-06T06:54:06.807000 |
173,258 | 173,684 | Example code for Resizing an image using DirectX | I know it is possible, and a lot faster than using GDI+. However I haven't found any good example of using DirectX to resize an image and save it to disk. I have implemented this over and over in GDI+, thats not difficult. However GDI+ does not use any hardware acceleration, and I was hoping to get better performance b... | Do you really need to use DirectX? GDI+ does the job well for resizing images. In DirectX, you don't really need to resize images, as most likely you'll be displaying your images as textures. Since textures can only applies on 3d object (triangles/polygons/mesh), the size of the 3d object and view port determines the a... | Example code for Resizing an image using DirectX I know it is possible, and a lot faster than using GDI+. However I haven't found any good example of using DirectX to resize an image and save it to disk. I have implemented this over and over in GDI+, thats not difficult. However GDI+ does not use any hardware accelerat... | TITLE:
Example code for Resizing an image using DirectX
QUESTION:
I know it is possible, and a lot faster than using GDI+. However I haven't found any good example of using DirectX to resize an image and save it to disk. I have implemented this over and over in GDI+, thats not difficult. However GDI+ does not use any ... | [
"image-processing",
"directx"
] | 0 | 1 | 4,693 | 2 | 0 | 2008-10-06T05:21:00.830000 | 2008-10-06T09:30:47.957000 |
173,269 | 173,445 | Direct3D Camera aspect ratio/scaling problem | I'm using SlimDX/C# to write a Direct3D application. I configured the camera as per textbox way: private float cameraZ = 5.0f; camera = new Camera(); camera.FieldOfView =(float)(Math.PI/2); camera.NearPlane = 0.5f; camera.FarPlane = 1000.0f; camera.Location = new Vector3(0.0f, 0.0f, cameraZ); camera.Target = Vector3.Ze... | I've figured out the problem and answer already. Apparently I did scale the mesh, and to match the aspect ratio, and I apply the Matrix.Scaling after Matrix.RotationYawPitchRoll. When I rotate the mesh facing forward only I realize that it looks the same no matter vertically or horizontally, the scaling is stretching i... | Direct3D Camera aspect ratio/scaling problem I'm using SlimDX/C# to write a Direct3D application. I configured the camera as per textbox way: private float cameraZ = 5.0f; camera = new Camera(); camera.FieldOfView =(float)(Math.PI/2); camera.NearPlane = 0.5f; camera.FarPlane = 1000.0f; camera.Location = new Vector3(0.0... | TITLE:
Direct3D Camera aspect ratio/scaling problem
QUESTION:
I'm using SlimDX/C# to write a Direct3D application. I configured the camera as per textbox way: private float cameraZ = 5.0f; camera = new Camera(); camera.FieldOfView =(float)(Math.PI/2); camera.NearPlane = 0.5f; camera.FarPlane = 1000.0f; camera.Location... | [
"directx",
"direct3d"
] | 2 | 1 | 766 | 1 | 0 | 2008-10-06T05:33:01.900000 | 2008-10-06T07:18:16.430000 |
173,272 | 173,333 | C#/.NET, what to look at? | I see lots of job ads for C#/.NET programmers, so I thought it could be a good idea to have had a look at it. After looking at a few tutorials I found nothing really new to me. Just a language with a syntax somewhere between Java and C++ (arguably nicer than both though). So, what features in particular should I look a... | Compared with Java: The "using" statement (try/finally is rarely explicit in C#) (C# 1) Delegates as a first class concept (C# 1) Properties and events as first class concepts (C# 1) User-defined value types (C# 1) Operator overloading (use with care!) (C# 1) Iterator blocks (C# 2) Generics without type erasure (C# 2) ... | C#/.NET, what to look at? I see lots of job ads for C#/.NET programmers, so I thought it could be a good idea to have had a look at it. After looking at a few tutorials I found nothing really new to me. Just a language with a syntax somewhere between Java and C++ (arguably nicer than both though). So, what features in ... | TITLE:
C#/.NET, what to look at?
QUESTION:
I see lots of job ads for C#/.NET programmers, so I thought it could be a good idea to have had a look at it. After looking at a few tutorials I found nothing really new to me. Just a language with a syntax somewhere between Java and C++ (arguably nicer than both though). So,... | [
"c#"
] | 1 | 6 | 394 | 6 | 0 | 2008-10-06T05:35:19.663000 | 2008-10-06T06:28:53.690000 |
173,278 | 173,323 | Is there a way to prevent a SystemExit exception raised from sys.exit() from being caught? | The docs say that calling sys.exit() raises a SystemExit exception which can be caught in outer levels. I have a situation in which I want to definitively and unquestionably exit from inside a test case, however the unittest module catches SystemExit and prevents the exit. This is normally great, but the specific situa... | You can call os._exit() to directly exit, without throwing an exception: import os os._exit(1) This bypasses all of the python shutdown logic, such as the atexit module, and will not run through the exception handling logic that you're trying to avoid in this situation. The argument is the exit code that will be return... | Is there a way to prevent a SystemExit exception raised from sys.exit() from being caught? The docs say that calling sys.exit() raises a SystemExit exception which can be caught in outer levels. I have a situation in which I want to definitively and unquestionably exit from inside a test case, however the unittest modu... | TITLE:
Is there a way to prevent a SystemExit exception raised from sys.exit() from being caught?
QUESTION:
The docs say that calling sys.exit() raises a SystemExit exception which can be caught in outer levels. I have a situation in which I want to definitively and unquestionably exit from inside a test case, however... | [
"python",
"exception",
"exit",
"systemexit"
] | 80 | 113 | 83,176 | 2 | 0 | 2008-10-06T05:40:13.943000 | 2008-10-06T06:24:53.900000 |
173,290 | 173,299 | python dictionary update method | I have a list string tag. I am trying to initialize a dictionary with the key as the tag string and values as the array index. for i, ithTag in enumerate(tag): tagDict.update(ithTag=i) The above returns me {'ithTag': 608} 608 is the 608th index My problem is that while the i is being interpreted as a variable, Python i... | You actually want to do this: for i, tag in enumerate(tag): tagDict[tag] = i The.update() method is used for updating a dictionary using another dictionary, not for changing a single key/value pair. | python dictionary update method I have a list string tag. I am trying to initialize a dictionary with the key as the tag string and values as the array index. for i, ithTag in enumerate(tag): tagDict.update(ithTag=i) The above returns me {'ithTag': 608} 608 is the 608th index My problem is that while the i is being int... | TITLE:
python dictionary update method
QUESTION:
I have a list string tag. I am trying to initialize a dictionary with the key as the tag string and values as the array index. for i, ithTag in enumerate(tag): tagDict.update(ithTag=i) The above returns me {'ithTag': 608} 608 is the 608th index My problem is that while ... | [
"python",
"dictionary",
"variables"
] | 18 | 46 | 47,460 | 6 | 0 | 2008-10-06T05:53:32.980000 | 2008-10-06T06:05:00.257000 |
173,305 | 173,549 | Qt context menu breaking selection in QTreeView | I have a QTreeView class with a context menu installed as follows: m_ui.tree->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_ui.tree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowTreeContextMenu(const QPoint&)));... void ShowTreeContextMenu(const QPoint& point) { m_treeContextMenu->exec(m_u... | You don't say which version of Qt you are using, but we found the same problem in Qt4.4.0, it worked in 4.3. We reported this to Trolltech as a bug 225615 This is still marked as pending, so in the meantime I would follow Shy's suggestion of intercepting the right click and making the selection yourself. | Qt context menu breaking selection in QTreeView I have a QTreeView class with a context menu installed as follows: m_ui.tree->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_ui.tree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowTreeContextMenu(const QPoint&)));... void ShowTreeContextMenu(co... | TITLE:
Qt context menu breaking selection in QTreeView
QUESTION:
I have a QTreeView class with a context menu installed as follows: m_ui.tree->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_ui.tree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowTreeContextMenu(const QPoint&)));... void Show... | [
"qt",
"user-interface",
"contextmenu",
"qtreeview"
] | 1 | 1 | 7,011 | 3 | 0 | 2008-10-06T06:10:26.270000 | 2008-10-06T08:08:39.337000 |
173,329 | 173,344 | How to decrypt a password from SQL server? | I have this query in sql server 2000: select pwdencrypt('AAAA') which outputs an encrypted string of 'AAAA': 0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D How can I convert (decrypt) the output from its origin (which is 'AAAA')? | I believe pwdencrypt is using a hash so you cannot really reverse the hashed string - the algorithm is designed so it's impossible. If you are verifying the password that a user entered the usual technique is to hash it and then compare it to the hashed version in the database. This is how you could verify a usered ent... | How to decrypt a password from SQL server? I have this query in sql server 2000: select pwdencrypt('AAAA') which outputs an encrypted string of 'AAAA': 0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D How can I convert (decrypt) the output from its origin (which is 'AAAA')? | TITLE:
How to decrypt a password from SQL server?
QUESTION:
I have this query in sql server 2000: select pwdencrypt('AAAA') which outputs an encrypted string of 'AAAA': 0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D How can I convert (decrypt) the output from its origin ... | [
"sql-server",
"encryption",
"hash",
"passwords"
] | 17 | 17 | 398,184 | 6 | 0 | 2008-10-06T06:27:29.917000 | 2008-10-06T06:33:03.290000 |
173,338 | 173,377 | SMS alerting to respond to error situations faster | What is the easiest way to set up an SMS alerting system so that I will receive notification if my server doesn't respond or a GET query doesn't return correct content? | You can completely outsource the monitoring and alerting, for example by subscribing to Pingdom. The most basic Pingdom plan will monitor up to 5 services (including using HTTP GETs with optional content pattern matching) and send an SMS after a configurable amount of downtime. If you want to roll your own solution, th... | SMS alerting to respond to error situations faster What is the easiest way to set up an SMS alerting system so that I will receive notification if my server doesn't respond or a GET query doesn't return correct content? | TITLE:
SMS alerting to respond to error situations faster
QUESTION:
What is the easiest way to set up an SMS alerting system so that I will receive notification if my server doesn't respond or a GET query doesn't return correct content?
ANSWER:
You can completely outsource the monitoring and alerting, for example by ... | [
"sms",
"alerts"
] | 2 | 2 | 371 | 4 | 0 | 2008-10-06T06:30:12.033000 | 2008-10-06T06:44:15.483000 |
173,348 | 173,365 | Which database implementations allow sandboxing users in separate databases? | Can anyone tell me if there are RDBMSs that allow me to create a separate database for every user so that there is full separation of users' data? Are there any? I know I can add UID to every table but this solution has its own problems (for example per user database schema changes are impossible). | Doesnt MySQL, PostgreSQL, Oracle and so on and so on allow you to do that?. There's the grant statements to control ACLs | Which database implementations allow sandboxing users in separate databases? Can anyone tell me if there are RDBMSs that allow me to create a separate database for every user so that there is full separation of users' data? Are there any? I know I can add UID to every table but this solution has its own problems (for e... | TITLE:
Which database implementations allow sandboxing users in separate databases?
QUESTION:
Can anyone tell me if there are RDBMSs that allow me to create a separate database for every user so that there is full separation of users' data? Are there any? I know I can add UID to every table but this solution has its o... | [
"database"
] | 1 | 1 | 189 | 5 | 0 | 2008-10-06T06:35:05.470000 | 2008-10-06T06:41:18.953000 |
173,366 | 176,380 | How do you free a wrapped C++ object when associated Javascript object is garbage collected in V8? | V8's documentation explains how to create a Javascript object that wraps a C++ object. The Javascript object holds on to a pointer to a C++ object instance. My question is, let's say you create the C++ object on the heap, how can you get a notification when the Javascript object is collected by the gc, so you can free ... | The trick is to create a Persistent handle (second bullet point from the linked-to API reference: " Persistent handles are not held on a stack and are deleted only when you specifically remove them.... Use a persistent handle when you need to keep a reference to an object for more than one function call, or when handle... | How do you free a wrapped C++ object when associated Javascript object is garbage collected in V8? V8's documentation explains how to create a Javascript object that wraps a C++ object. The Javascript object holds on to a pointer to a C++ object instance. My question is, let's say you create the C++ object on the heap,... | TITLE:
How do you free a wrapped C++ object when associated Javascript object is garbage collected in V8?
QUESTION:
V8's documentation explains how to create a Javascript object that wraps a C++ object. The Javascript object holds on to a pointer to a C++ object instance. My question is, let's say you create the C++ o... | [
"javascript",
"c++",
"v8"
] | 25 | 23 | 5,741 | 3 | 0 | 2008-10-06T06:41:32.370000 | 2008-10-06T22:00:05.680000 |
173,374 | 173,385 | How do you deal with large dependencies in Boost? | Boost is a very large library with many inter-dependencies -- which also takes a long time to compile (which for me slows down our CruiseControl response time). The only parts of boost I use are boost::regex and boost::format. Is there an easy way to extract only the parts of boost necessary for a particular boost sub-... | First, you can use the bcp tool (can be found in the tools subfolder) to extract the headers and files you are using. This won't help with compile times, though. Second, you don't have to rebuild Boost every time. Just pre-build the lib files once and at every version change, and copy the "stage" folder at build time. | How do you deal with large dependencies in Boost? Boost is a very large library with many inter-dependencies -- which also takes a long time to compile (which for me slows down our CruiseControl response time). The only parts of boost I use are boost::regex and boost::format. Is there an easy way to extract only the pa... | TITLE:
How do you deal with large dependencies in Boost?
QUESTION:
Boost is a very large library with many inter-dependencies -- which also takes a long time to compile (which for me slows down our CruiseControl response time). The only parts of boost I use are boost::regex and boost::format. Is there an easy way to e... | [
"c++",
"boost",
"dependencies"
] | 9 | 8 | 2,772 | 4 | 0 | 2008-10-06T06:42:48.810000 | 2008-10-06T06:49:07.207000 |
173,378 | 173,406 | Has anyone built web-apps that can run totally off-line? | I'm building an app that authors would (hopefully) use to help them, uh.. author things. Think of it like a wiki but just for one person, but cooler. I wish to make it as accessible as possible to my (potential) adoring masses, and so I'm thinking about making it a web-app. It certainly doesn't have to be, there is no ... | There is an additional option, and that is to use the new HTML5 offline application features, namely the Application Cache, Client-Side Databases, and Local Storage APIs. Currently I believe that Safari is the only shipping browser to support any of these, and i believe it only supports the client side databases and lo... | Has anyone built web-apps that can run totally off-line? I'm building an app that authors would (hopefully) use to help them, uh.. author things. Think of it like a wiki but just for one person, but cooler. I wish to make it as accessible as possible to my (potential) adoring masses, and so I'm thinking about making it... | TITLE:
Has anyone built web-apps that can run totally off-line?
QUESTION:
I'm building an app that authors would (hopefully) use to help them, uh.. author things. Think of it like a wiki but just for one person, but cooler. I wish to make it as accessible as possible to my (potential) adoring masses, and so I'm thinki... | [
"offline"
] | 11 | 4 | 2,503 | 17 | 0 | 2008-10-06T06:44:16.280000 | 2008-10-06T07:04:25.817000 |
173,392 | 173,773 | What is the best installation tool for java? | Depends on your experience could you recommend something? I've use izpack, and it's very nice tool, is there any other, better tool? | In MS Windows NSIS is great and it's free & OSS Ref: Java Launcher with automatic JRE installation | What is the best installation tool for java? Depends on your experience could you recommend something? I've use izpack, and it's very nice tool, is there any other, better tool? | TITLE:
What is the best installation tool for java?
QUESTION:
Depends on your experience could you recommend something? I've use izpack, and it's very nice tool, is there any other, better tool?
ANSWER:
In MS Windows NSIS is great and it's free & OSS Ref: Java Launcher with automatic JRE installation | [
"java",
"installation"
] | 17 | 10 | 14,888 | 9 | 0 | 2008-10-06T06:53:00.333000 | 2008-10-06T10:06:02.847000 |
173,393 | 173,416 | Example of using Service Exists MSBuild task in Microsoft.Sdc.Tasks? | I'm trying to use the Microsoft.Sdc.Tasks.ServiceProcess.Exists to check whether or not a service exists. There is no example of using it in the documentation though. Anyone have one? | I've not actually used this in production myself, and I'm not sure which version you have (I have a copy of Release 2.1.3155.0) and according to the accompanying.chm help file the Task has the following properties: DoesExist Returns TRUE if the service specified exists IsDisabled Returns TRUE if the service is disabled... | Example of using Service Exists MSBuild task in Microsoft.Sdc.Tasks? I'm trying to use the Microsoft.Sdc.Tasks.ServiceProcess.Exists to check whether or not a service exists. There is no example of using it in the documentation though. Anyone have one? | TITLE:
Example of using Service Exists MSBuild task in Microsoft.Sdc.Tasks?
QUESTION:
I'm trying to use the Microsoft.Sdc.Tasks.ServiceProcess.Exists to check whether or not a service exists. There is no example of using it in the documentation though. Anyone have one?
ANSWER:
I've not actually used this in productio... | [
".net",
"msbuild"
] | 1 | 1 | 2,385 | 2 | 0 | 2008-10-06T06:53:31.393000 | 2008-10-06T07:07:37.603000 |
173,400 | 173,479 | How to check if PHP array is associative or sequential? | PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array "is a list" (contains only numeric keys starting from 0)? Basically, I want to be able to differentiate between this: $sequentialArray = [ 'apple', 'orange', 'tomato', 'carrot' ... | Since 8.1 PHP has a simple answer, array_is_list(). For the legacy code you can use the following function (wrapping it in function_exists() to make it portable): if (!function_exists('array_is_list')) { function array_is_list(array $arr) { if ($arr === []) { return true; } return array_keys($arr) === range(0, count($a... | How to check if PHP array is associative or sequential? PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array "is a list" (contains only numeric keys starting from 0)? Basically, I want to be able to differentiate between this: $se... | TITLE:
How to check if PHP array is associative or sequential?
QUESTION:
PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array "is a list" (contains only numeric keys starting from 0)? Basically, I want to be able to differentiate... | [
"php",
"arrays"
] | 924 | 790 | 340,357 | 60 | 0 | 2008-10-06T07:01:13.140000 | 2008-10-06T07:36:26.533000 |
173,409 | 173,436 | How can I find the execution time of a section of my program in C? | I'm trying to find a way to get the execution time of a section of code in C. I've already tried both time() and clock() from time.h, but it seems that time() returns seconds and clock() seems to give me milliseconds (or centiseconds?) I would like something more precise though. Is there a way I can grab the time with ... | You referred to clock() and time() - were you looking for gettimeofday()? That will fill in a struct timeval, which contains seconds and microseconds. Of course the actual resolution is up to the hardware. | How can I find the execution time of a section of my program in C? I'm trying to find a way to get the execution time of a section of code in C. I've already tried both time() and clock() from time.h, but it seems that time() returns seconds and clock() seems to give me milliseconds (or centiseconds?) I would like some... | TITLE:
How can I find the execution time of a section of my program in C?
QUESTION:
I'm trying to find a way to get the execution time of a section of code in C. I've already tried both time() and clock() from time.h, but it seems that time() returns seconds and clock() seems to give me milliseconds (or centiseconds?)... | [
"c",
"timing"
] | 16 | 16 | 17,456 | 11 | 0 | 2008-10-06T07:04:44.677000 | 2008-10-06T07:15:12.643000 |
173,431 | 173,462 | Developing a scheduled task for Windows | I have to develop an application using C#.net that has to be run once a day. It only runs for at most one minute, so developing a Windows service is overkill and a scheduled task is the appropriate way. However, I have a few questions about how the application can communicate its results: How do I indicate to the task ... | In answer to your questions - If a task fails because it threw an unchecked exception you'll see that in the Sheduled Task viewer, there will be a 'Last Result' with a value something like 0xe0434f4d. Alternatively if you return an exit code that will be also be shown in the Last Result column of the Scheduled Task vie... | Developing a scheduled task for Windows I have to develop an application using C#.net that has to be run once a day. It only runs for at most one minute, so developing a Windows service is overkill and a scheduled task is the appropriate way. However, I have a few questions about how the application can communicate its... | TITLE:
Developing a scheduled task for Windows
QUESTION:
I have to develop an application using C#.net that has to be run once a day. It only runs for at most one minute, so developing a Windows service is overkill and a scheduled task is the appropriate way. However, I have a few questions about how the application c... | [
".net",
"scheduled-tasks"
] | 11 | 8 | 6,199 | 4 | 0 | 2008-10-06T07:14:14.003000 | 2008-10-06T07:25:48.863000 |
173,433 | 176,312 | How to fix DWMAPI.DLL delay-load dependency under WinXP? | I have built a.dll under WinXP that claims it can't find DWMAPI.DLL when it's loaded. The problem is that this DLL is a Vista DLL, and this a known issue for XP users that have IE7 installed. The recommendation is to uninstall IE7 or repair the.NET Framework via Add/Remove programs. I did the repair, and nothing change... | Based on your updated problem, DWMAPI.dll is probably not your problem. Dependency walker will always give you that error whenever you are linking to mshtml as it always checks delay loaded DLLs. At this point my best guess is that you have your project set to dynamically load the runtime libraries and the search path ... | How to fix DWMAPI.DLL delay-load dependency under WinXP? I have built a.dll under WinXP that claims it can't find DWMAPI.DLL when it's loaded. The problem is that this DLL is a Vista DLL, and this a known issue for XP users that have IE7 installed. The recommendation is to uninstall IE7 or repair the.NET Framework via ... | TITLE:
How to fix DWMAPI.DLL delay-load dependency under WinXP?
QUESTION:
I have built a.dll under WinXP that claims it can't find DWMAPI.DLL when it's loaded. The problem is that this DLL is a Vista DLL, and this a known issue for XP users that have IE7 installed. The recommendation is to uninstall IE7 or repair the.... | [
"dll",
"windows-xp",
"dwm"
] | 27 | 7 | 79,157 | 4 | 0 | 2008-10-06T07:14:14.893000 | 2008-10-06T21:40:39.417000 |
173,460 | 1,156,994 | MinGW library converted to Windows library gives odd link in VC++6 | I used the MinGW.a to Windows.lib transformation process as detailed in a thread on the gmp-discuss list, as below (acting against a library created with --disable-shared --enable-static.) cp libgmp.a gmp.a ranlib gmp.a mv gmp.a gmp.lib I now have a.lib file against which VC++6 seems to have no difficulty linking. What... | Someone else had a similar problem and the fix was relatively simple. | MinGW library converted to Windows library gives odd link in VC++6 I used the MinGW.a to Windows.lib transformation process as detailed in a thread on the gmp-discuss list, as below (acting against a library created with --disable-shared --enable-static.) cp libgmp.a gmp.a ranlib gmp.a mv gmp.a gmp.lib I now have a.lib... | TITLE:
MinGW library converted to Windows library gives odd link in VC++6
QUESTION:
I used the MinGW.a to Windows.lib transformation process as detailed in a thread on the gmp-discuss list, as below (acting against a library created with --disable-shared --enable-static.) cp libgmp.a gmp.a ranlib gmp.a mv gmp.a gmp.li... | [
"visual-c++",
"dll",
"mingw",
"gmp"
] | 2 | 0 | 1,992 | 1 | 0 | 2008-10-06T07:24:17.523000 | 2009-07-21T02:17:02.777000 |
173,466 | 176,890 | Using Microsoft.Sdc.Tasks.ServiceProcess.ControlService how do I check if a service exists on a remote machine? | I'm trying to check if a service exists on a remote machine using the Microsoft.Sdc.Tasks.ServiceProcess.ControlService task. When I use the above task declaration I get this output from MSBUILD. (42,54): error MSB4065: The "ServiceExists" parameter is not marked for output by the "ControlService" task. Is there a way ... | The answer was to pull the code and recompile with the ServiceExists property properly marked with the [Output] attribute. Would recommend anyone that finds this answer look at the MS Build Extension Pack instead as this problem doesn't exist in that set of MS Build tasks and it is more actively developed. | Using Microsoft.Sdc.Tasks.ServiceProcess.ControlService how do I check if a service exists on a remote machine? I'm trying to check if a service exists on a remote machine using the Microsoft.Sdc.Tasks.ServiceProcess.ControlService task. When I use the above task declaration I get this output from MSBUILD. (42,54): err... | TITLE:
Using Microsoft.Sdc.Tasks.ServiceProcess.ControlService how do I check if a service exists on a remote machine?
QUESTION:
I'm trying to check if a service exists on a remote machine using the Microsoft.Sdc.Tasks.ServiceProcess.ControlService task. When I use the above task declaration I get this output from MSB... | [
".net",
"msbuild"
] | 1 | 4 | 686 | 1 | 0 | 2008-10-06T07:27:19.657000 | 2008-10-07T01:21:51.937000 |
173,473 | 173,514 | Positioning flash content using CSS | I have a generated HTML page with flash content in it. I am trying to reposition the flash content and make it "absolute". I have tried to wrap the object tags with a div tag, but to no avail. Can anyone tell me how to do this? Removing the generated positioning attributes does not work. See relevant code below (it is ... | you should place the JS script that actually creates you object inside your div not before it. | Positioning flash content using CSS I have a generated HTML page with flash content in it. I am trying to reposition the flash content and make it "absolute". I have tried to wrap the object tags with a div tag, but to no avail. Can anyone tell me how to do this? Removing the generated positioning attributes does not w... | TITLE:
Positioning flash content using CSS
QUESTION:
I have a generated HTML page with flash content in it. I am trying to reposition the flash content and make it "absolute". I have tried to wrap the object tags with a div tag, but to no avail. Can anyone tell me how to do this? Removing the generated positioning att... | [
"html",
"css",
"flash",
"actionscript",
"cs3"
] | 1 | 3 | 3,264 | 4 | 0 | 2008-10-06T07:34:09.423000 | 2008-10-06T07:55:42.343000 |
173,484 | 330,298 | Does anyone have experience with PyS60 mobile development | I am in the position of having to make a technology choice early in a project which is targetted at mobile phones. I saw that there is a python derivative for S60 and wondered whether anyone could share experiences, good and bad, and suggest appropriate IDE's and emulators. Please don't tell me that I should be develop... | PyS60 -- its cool:) I worked quite a lot on PyS60 ver 1.3 FP2. It is a great language to port your apps on Symbian Mobiles and Powerful too. I did my Major project in PyS60, which was a GSM locator (its not the latest version) app for Symbian phones. There is also a very neat py2sis utility which converts your py apps ... | Does anyone have experience with PyS60 mobile development I am in the position of having to make a technology choice early in a project which is targetted at mobile phones. I saw that there is a python derivative for S60 and wondered whether anyone could share experiences, good and bad, and suggest appropriate IDE's an... | TITLE:
Does anyone have experience with PyS60 mobile development
QUESTION:
I am in the position of having to make a technology choice early in a project which is targetted at mobile phones. I saw that there is a python derivative for S60 and wondered whether anyone could share experiences, good and bad, and suggest ap... | [
"python",
"mobile",
"pys60"
] | 10 | 8 | 1,775 | 7 | 0 | 2008-10-06T07:37:30.493000 | 2008-12-01T08:50:45.787000 |
173,487 | 173,939 | Problems with shutting down JBoss in Eclipse if I change JNDI port | 1st phase I have a problem shutting down my running JBoss instance under Eclipse since I changed the JNDI port of JBoss. Of course I can shut it down from the console view but not with the stop button (it still searches JNDI port at the default 1099 port). I'm looking forward to any solutions. Thank you! Used environme... | OK, what you have to do is File->New->Other->Server, and set up your JBoss server there. It will then appear in Preferences->JBossTools->Servers. Convoluted. | Problems with shutting down JBoss in Eclipse if I change JNDI port 1st phase I have a problem shutting down my running JBoss instance under Eclipse since I changed the JNDI port of JBoss. Of course I can shut it down from the console view but not with the stop button (it still searches JNDI port at the default 1099 por... | TITLE:
Problems with shutting down JBoss in Eclipse if I change JNDI port
QUESTION:
1st phase I have a problem shutting down my running JBoss instance under Eclipse since I changed the JNDI port of JBoss. Of course I can shut it down from the console view but not with the stop button (it still searches JNDI port at th... | [
"java",
"eclipse",
"jboss",
"jboss-tools"
] | 8 | 1 | 23,523 | 7 | 0 | 2008-10-06T07:38:31.833000 | 2008-10-06T11:23:59.583000 |
173,495 | 175,805 | Create destinations for all bookmarks in a PDF file with iText API | I'd like to write some (java) code that takes a PDF document, and creates named destinations from all of the bookmarks. I think the iText API is the easiest way of doing this, but I have never used the API before. How would you go about writing this sort of code with the iText API? Can iText do the parsing needed to ma... | I'll just warn you up front that you may be disappointed with this. iText isn't really intended to be used as a parser. It's really more for creating entirely new PDF documents, but you can take a whack at it. To start, using iText, you won't be able to modify the existing PDF document. What you can do, though, is to m... | Create destinations for all bookmarks in a PDF file with iText API I'd like to write some (java) code that takes a PDF document, and creates named destinations from all of the bookmarks. I think the iText API is the easiest way of doing this, but I have never used the API before. How would you go about writing this sor... | TITLE:
Create destinations for all bookmarks in a PDF file with iText API
QUESTION:
I'd like to write some (java) code that takes a PDF document, and creates named destinations from all of the bookmarks. I think the iText API is the easiest way of doing this, but I have never used the API before. How would you go abou... | [
"pdf",
"pdf-generation",
"itext",
"bookmarks",
"tagged-pdf"
] | 7 | 3 | 6,025 | 2 | 0 | 2008-10-06T07:42:34.477000 | 2008-10-06T19:28:50.103000 |
173,496 | 173,506 | Code syntax formatter for posting code on webpages | Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website? I have seen several websites with very nicely formatted code and I dont believe they do this manually. | Google prettify - http://code.google.com/p/google-code-prettify/ | Code syntax formatter for posting code on webpages Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website? I have seen several websites with very nicely formatted code and I dont believe they do this manually. | TITLE:
Code syntax formatter for posting code on webpages
QUESTION:
Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website? I have seen several websites with very nicely formatted code and I dont believe they do this manually.
ANSWER:
Google prettify - http://code... | [
"syntax-highlighting"
] | 3 | 5 | 916 | 5 | 0 | 2008-10-06T07:46:35.107000 | 2008-10-06T07:51:16.207000 |
173,497 | 173,556 | C# open source NMEA parser | Am looking for C# open source NMEA parser. | Well, I'm not familiar with it myself, but some quick searches show one on CodeProject, which links to 2 other such, here and here. Any of those help? | C# open source NMEA parser Am looking for C# open source NMEA parser. | TITLE:
C# open source NMEA parser
QUESTION:
Am looking for C# open source NMEA parser.
ANSWER:
Well, I'm not familiar with it myself, but some quick searches show one on CodeProject, which links to 2 other such, here and here. Any of those help? | [
"c#",
"nmea"
] | 10 | 7 | 31,792 | 4 | 0 | 2008-10-06T07:47:51.423000 | 2008-10-06T08:10:01.147000 |
173,498 | 173,586 | Using PHP to take the first line of a CSV file and create a MySQL Table with the data | I am trying to take a rather large CSV file and insert it into a MySQL database for referencing in a project. I would like to use the first line of the file to create the table using proper data types and not varchar for each column. The ultimate goal is to automate this process as I have several similar files but the ... | Building on Nouveau 's code you could do this for($i = 0; $i <= count($fieldList); $i++) { if (is_numeric($fieldList[$i])) { if (strpos($fieldList[$i],'.')!== false){ $fieldList[$i] = (int)$fieldList[$i]; }else{ $fieldList[$i] = (float)$fieldList[$i]; } }
switch(gettype($fieldList[$i])) { case 'integer': $typeInfo = '... | Using PHP to take the first line of a CSV file and create a MySQL Table with the data I am trying to take a rather large CSV file and insert it into a MySQL database for referencing in a project. I would like to use the first line of the file to create the table using proper data types and not varchar for each column. ... | TITLE:
Using PHP to take the first line of a CSV file and create a MySQL Table with the data
QUESTION:
I am trying to take a rather large CSV file and insert it into a MySQL database for referencing in a project. I would like to use the first line of the file to create the table using proper data types and not varchar... | [
"php",
"mysql",
"file-io",
"csv"
] | 2 | 4 | 7,743 | 4 | 0 | 2008-10-06T07:48:34.620000 | 2008-10-06T08:37:47.953000 |
173,503 | 240,749 | How to generate pdf files _with_ utf-8 multibyte characters using Zend Framework | I've got a "little" problem with Zend Framework Zend_Pdf class. Multibyte characters are stripped from generated pdf files. E.g. when I write aąbcčdeę it becomes abcd with lithuanian letters stripped. I'm not sure if it's particularly Zend_Pdf problem or php in general. Source text is encoded in utf-8, as well as the p... | Zend_Pdf supports UTF-8 in version 1.5 of Zend Framework. However, the standard PDF fonts support only the Latin1 character set. This means you can't use Zend_Pdf_Font::FONT_TIMES_BOLD or any other "built-in" font. To use special characters you must load another TTF font that includes characters from other character se... | How to generate pdf files _with_ utf-8 multibyte characters using Zend Framework I've got a "little" problem with Zend Framework Zend_Pdf class. Multibyte characters are stripped from generated pdf files. E.g. when I write aąbcčdeę it becomes abcd with lithuanian letters stripped. I'm not sure if it's particularly Zend... | TITLE:
How to generate pdf files _with_ utf-8 multibyte characters using Zend Framework
QUESTION:
I've got a "little" problem with Zend Framework Zend_Pdf class. Multibyte characters are stripped from generated pdf files. E.g. when I write aąbcčdeę it becomes abcd with lithuanian letters stripped. I'm not sure if it's... | [
"php",
"zend-framework",
"pdf",
"unicode"
] | 5 | 10 | 14,889 | 4 | 0 | 2008-10-06T07:50:31.700000 | 2008-10-27T17:33:14.223000 |
173,504 | 173,510 | Why use Glassfish instead of Apache? What's it strengths and weaknesses? | Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people use Glassfish. Which made me wonder, why would I want to use Glassfish (in the sense that I... | GlassFish is an Application Server which can also be used as a Web Server (Http Server). A web Server means: Handling HTTP requests (usually from browsers). A Servlet Container (e.g. Tomcat) means: It can handle servlets & JSP. An Application Server (e.g. GlassFish) means: It can manage Java EE applications (usually bo... | Why use Glassfish instead of Apache? What's it strengths and weaknesses? Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people use Glassfish. Whi... | TITLE:
Why use Glassfish instead of Apache? What's it strengths and weaknesses?
QUESTION:
Sorry for my ignorance here, but when I hear the word webserver, I immediately imagine Apache, although I know people use Microsoft's IIS too. However since I've been hanging out here at Stackoverflow I've noticed lots of people ... | [
"glassfish"
] | 62 | 73 | 61,932 | 4 | 0 | 2008-10-06T07:50:37.160000 | 2008-10-06T07:53:58.883000 |
173,520 | 283,088 | How can I change the 259 char limit inside WinForms Treeview LabelEdit? | My VB.Net Winforms app is a tool to allow hierarchical data to be edited in a tree, then stored in a database. I am using a treeview control. Content is drag-dropped from other documents onto the treenodes, or the nodes can be edited directly. if I edit the database field directly, and enter a bit of content (a thousan... | I would recommend taking a different approach. You probably don't want to show your users all 10000 or characters of a document anyway in their TreeNode, so create an custom data storage class with properties like Name and Content to store the document and it's title. Add your content to the Content property and a titl... | How can I change the 259 char limit inside WinForms Treeview LabelEdit? My VB.Net Winforms app is a tool to allow hierarchical data to be edited in a tree, then stored in a database. I am using a treeview control. Content is drag-dropped from other documents onto the treenodes, or the nodes can be edited directly. if I... | TITLE:
How can I change the 259 char limit inside WinForms Treeview LabelEdit?
QUESTION:
My VB.Net Winforms app is a tool to allow hierarchical data to be edited in a tree, then stored in a database. I am using a treeview control. Content is drag-dropped from other documents onto the treenodes, or the nodes can be edi... | [
"vb.net",
"treeview"
] | 1 | 2 | 1,259 | 1 | 0 | 2008-10-06T07:57:23.323000 | 2008-11-12T04:55:40.827000 |
173,527 | 173,547 | Creating a new rrd database based on an existing one | I have some old rrdtool databases, for which the exact creation recipe has long been since lost. I need to create a new database with the same characteristics as the current ones. I've dumped a couple of old databases and pored over the contents but I'm not sure how to interpret the metadata. I think it appears in the ... | rrdtools' rrdinfo is your friend! It will tell you how the rrd file's data source(s) and archive(s) were created. Example $ rrdtool info random.rrd filename = "random.rrd" rrd_version = "0001" step = 300 last_update = 955892996 ds[a].type = "GAUGE" ds[a].minimal_heartbeat = 600 ds[a].min = NaN ds[a].max = NaN ds[a].las... | Creating a new rrd database based on an existing one I have some old rrdtool databases, for which the exact creation recipe has long been since lost. I need to create a new database with the same characteristics as the current ones. I've dumped a couple of old databases and pored over the contents but I'm not sure how ... | TITLE:
Creating a new rrd database based on an existing one
QUESTION:
I have some old rrdtool databases, for which the exact creation recipe has long been since lost. I need to create a new database with the same characteristics as the current ones. I've dumped a couple of old databases and pored over the contents but... | [
"clone",
"reverse-engineering",
"rrdtool",
"rrd"
] | 4 | 3 | 4,650 | 3 | 0 | 2008-10-06T07:59:53.193000 | 2008-10-06T08:08:35.923000 |
173,560 | 173,600 | Flush disk write cache | When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk? I want to do this programmatically in C++. Closing the file does perform a flush at the application level, but not... | You haven't specified the development environment, so:.Net IO streams have a.Flush method that does what you want. Win32 API There is the FlushFileBuffers call, which takes a file handle as argument. EDIT (based on a comment from the OA): FlushFileBuffers does not need administrative privileges; it does only if the han... | Flush disk write cache When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk? I want to do this programmatically in C++. Closing the file does perform a flush at the app... | TITLE:
Flush disk write cache
QUESTION:
When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk? I want to do this programmatically in C++. Closing the file does perform ... | [
"windows",
"windows-xp",
"disk"
] | 6 | 2 | 19,351 | 8 | 0 | 2008-10-06T08:12:48.707000 | 2008-10-06T08:43:57.020000 |
173,579 | 173,800 | How to pass mouse events to applications behind mine in C#/Vista? | I am writing a very specialized app in C# that floats as a mostly transparent window over the entire desktop. I want to be able to create and pass mouse events to applications behind mine, and have them appear to operate "normally", responding to those events. It would also be preferable if the window manager could res... | After looking at System hooks and other low level solutions I found a much simpler method. First, set the TransparencyKey and BackColor of the form to be the same. This didn't make any visual difference to me as my form was visually transparent already, but this will help in letting mouse events through. Second, the fo... | How to pass mouse events to applications behind mine in C#/Vista? I am writing a very specialized app in C# that floats as a mostly transparent window over the entire desktop. I want to be able to create and pass mouse events to applications behind mine, and have them appear to operate "normally", responding to those e... | TITLE:
How to pass mouse events to applications behind mine in C#/Vista?
QUESTION:
I am writing a very specialized app in C# that floats as a mostly transparent window over the entire desktop. I want to be able to create and pass mouse events to applications behind mine, and have them appear to operate "normally", res... | [
"c#",
"events",
"windows-vista",
"mouse"
] | 4 | 2 | 4,943 | 3 | 0 | 2008-10-06T08:28:20.717000 | 2008-10-06T10:18:12.180000 |
173,581 | 178,629 | How do I restore a windows size and position in a wxRuby app? | Does anyone know of any sample code for restoring a window's position and size in wxRuby? | YAML would be a better choice to serialize the prefs, but here I just store a comma-delimited string in the prefs.txt file. require "rubygems" require "wx" include Wx
class MyApp < App def on_init left, top, width, height = *prefs position = Point.new(left, top) size = Size.new(width, height) main = Frame.new(nil, -1,... | How do I restore a windows size and position in a wxRuby app? Does anyone know of any sample code for restoring a window's position and size in wxRuby? | TITLE:
How do I restore a windows size and position in a wxRuby app?
QUESTION:
Does anyone know of any sample code for restoring a window's position and size in wxRuby?
ANSWER:
YAML would be a better choice to serialize the prefs, but here I just store a comma-delimited string in the prefs.txt file. require "rubygems... | [
"ruby",
"wxruby"
] | 2 | 3 | 499 | 1 | 0 | 2008-10-06T08:29:13.057000 | 2008-10-07T14:12:08.433000 |
173,596 | 173,631 | How to map caller memory in a Windows CE device driver past the end of a call to XXX_IOControl? | I'm implementing a ioctl in a Windows CE device driver that takes a pointer to a large chunk of application memory to perform asynchronous I/O initiated through an application call to DeviceIoControl. When using MapCallerPtr(), the pointer gets unmapped when the XXX_IOControl function returns; when the pointer is used ... | Answering my own question: In XXX_IOControl, map the pointer using MapPtrToProcess() and save the thread's permissions using GetCurrentPermissions(). In the thread that will use the mapped pointer, call SetProcPermissions() with the saved return value from GetCurrentPermissions(), dereference pointers, and then restore... | How to map caller memory in a Windows CE device driver past the end of a call to XXX_IOControl? I'm implementing a ioctl in a Windows CE device driver that takes a pointer to a large chunk of application memory to perform asynchronous I/O initiated through an application call to DeviceIoControl. When using MapCallerPtr... | TITLE:
How to map caller memory in a Windows CE device driver past the end of a call to XXX_IOControl?
QUESTION:
I'm implementing a ioctl in a Windows CE device driver that takes a pointer to a large chunk of application memory to perform asynchronous I/O initiated through an application call to DeviceIoControl. When ... | [
"windows-ce",
"device-driver"
] | 1 | 1 | 680 | 1 | 0 | 2008-10-06T08:43:31.263000 | 2008-10-06T09:06:49.597000 |
173,616 | 173,625 | How do you structure your NUnit tests on a large project? | I am interested in seeing if I can improve the way we use NUnit in a Visual Studio solution containing 30+ projects. First, would you have one assembly of tests for every assembly in the solution, or would you try to keep the number of test assemblies down? I started off creating many test assemblies, but I think this ... | To answer your first question: You can use categories to keep everything organised in a single assembly if that's how you want to go. As to whether it would cut down on build time, I would hazard a guess at perhaps, I don't think it'd be a huge amount overall though. To answer your second: You can use categories and th... | How do you structure your NUnit tests on a large project? I am interested in seeing if I can improve the way we use NUnit in a Visual Studio solution containing 30+ projects. First, would you have one assembly of tests for every assembly in the solution, or would you try to keep the number of test assemblies down? I st... | TITLE:
How do you structure your NUnit tests on a large project?
QUESTION:
I am interested in seeing if I can improve the way we use NUnit in a Visual Studio solution containing 30+ projects. First, would you have one assembly of tests for every assembly in the solution, or would you try to keep the number of test ass... | [
"unit-testing",
"nunit"
] | 9 | 6 | 3,002 | 4 | 0 | 2008-10-06T08:56:28.617000 | 2008-10-06T09:02:20.463000 |
173,617 | 204,531 | Calling JS from Applet: MalformedURLException: unknown protocol: javascript | I read that you could call JavaScript code from a Java Applet by calling JApplet.getAppletContext().showDocument( "javascript:alert('Hello World');" ); However, when I do this i get the following error: java.net.MalformedURLException: unknown protocol: javascript How do I work around this? | I get the same exception as you do because of that the URL class does not accept javascript: as a valid protocol. There is a workaround though; supply an URLStreamHandler to the URL constructor. Example: final URLStreamHandler streamHandler = new URLStreamHandler() {
@Override protected URLConnection openConnection(UR... | Calling JS from Applet: MalformedURLException: unknown protocol: javascript I read that you could call JavaScript code from a Java Applet by calling JApplet.getAppletContext().showDocument( "javascript:alert('Hello World');" ); However, when I do this i get the following error: java.net.MalformedURLException: unknown p... | TITLE:
Calling JS from Applet: MalformedURLException: unknown protocol: javascript
QUESTION:
I read that you could call JavaScript code from a Java Applet by calling JApplet.getAppletContext().showDocument( "javascript:alert('Hello World');" ); However, when I do this i get the following error: java.net.MalformedURLEx... | [
"java",
"javascript",
"url"
] | 2 | 4 | 5,332 | 2 | 0 | 2008-10-06T08:57:52.453000 | 2008-10-15T12:33:15.387000 |
173,618 | 173,630 | Is there a portable equivalent to DebugBreak()/__debugbreak? | In MSVC, DebugBreak() or __debugbreak cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different. When compiling with gcc (or any other standard compiler) I want to do a break into debugger, too. Is there a platform independent function or intrinsic? I saw the XCode que... | What about defining a conditional macro based on #ifdef that expands to different constructs based on the current architecture or platform. Something like: #ifdef _MSC_VER #define DEBUG_BREAK __debugbreak() #else... #endif This would be expanded by the preprocessor the correct debugger break instruction based on the pl... | Is there a portable equivalent to DebugBreak()/__debugbreak? In MSVC, DebugBreak() or __debugbreak cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different. When compiling with gcc (or any other standard compiler) I want to do a break into debugger, too. Is there a pl... | TITLE:
Is there a portable equivalent to DebugBreak()/__debugbreak?
QUESTION:
In MSVC, DebugBreak() or __debugbreak cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different. When compiling with gcc (or any other standard compiler) I want to do a break into debugger, ... | [
"c++",
"portability",
"debugbreak"
] | 89 | 20 | 64,799 | 11 | 0 | 2008-10-06T08:57:53.357000 | 2008-10-06T09:05:26.477000 |
173,621 | 176,224 | Is it possible to make git svn "relocate" branch files on checkout? | Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get a working copy with only the branch sub-tree. Is it possible to make git relocate the ... | If possible, fix it on the server side: Subversion doesn't copy data when branching ( svn copy ), it just hardlinks, so there's really no obvious reason to branch out only a subtree. If that's not feasible, you should have a look at http://help.github.com/subtree-merge/ -- it may do the trick, but I haven't tried it my... | Is it possible to make git svn "relocate" branch files on checkout? Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get a working copy wit... | TITLE:
Is it possible to make git svn "relocate" branch files on checkout?
QUESTION:
Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get ... | [
"branch",
"git-svn"
] | 1 | 3 | 781 | 2 | 0 | 2008-10-06T08:59:02.870000 | 2008-10-06T21:14:41.653000 |
173,627 | 173,679 | Where can I find sample uses of LWJGL? | I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples. | Google "import org.lwjgl" to find lots of examples, as all code that uses LWJGL must contain that string to import parts of the package. | Where can I find sample uses of LWJGL? I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples. | TITLE:
Where can I find sample uses of LWJGL?
QUESTION:
I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples.
ANSWER:
Google "import org.lwjgl" to find lots of examples, as all code that uses LWJGL must contain that string to import parts of the package. | [
"java",
"opengl",
"openal",
"lwjgl"
] | 4 | 2 | 2,553 | 3 | 0 | 2008-10-06T09:03:46.950000 | 2008-10-06T09:28:14.780000 |
173,629 | 174,052 | What Oracle driver should I install in my MS SQL server to be able to use DTS to copy data from the Oracle server to the MS SQL server? | I have an Oracle server (version 9, I believe) and a MS SQL server (version 2000). The MS SQL server is running MS Windows Server 2003. I would like to use DTS to extract some data from the Oracle server and pour it into the MS SQL server. I'm having problems finding out what driver I should install on my MS SQL server... | My first choice would be the Instant Client: http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html Although this was not available for 9i, the 10g client will certainly connect to 9i without any problems, and the 11g probably would also. | What Oracle driver should I install in my MS SQL server to be able to use DTS to copy data from the Oracle server to the MS SQL server? I have an Oracle server (version 9, I believe) and a MS SQL server (version 2000). The MS SQL server is running MS Windows Server 2003. I would like to use DTS to extract some data fro... | TITLE:
What Oracle driver should I install in my MS SQL server to be able to use DTS to copy data from the Oracle server to the MS SQL server?
QUESTION:
I have an Oracle server (version 9, I believe) and a MS SQL server (version 2000). The MS SQL server is running MS Windows Server 2003. I would like to use DTS to ext... | [
"sql",
"oracle",
"odbc",
"driver",
"dts"
] | 0 | 1 | 3,596 | 1 | 0 | 2008-10-06T09:05:13.560000 | 2008-10-06T12:17:55.777000 |
173,641 | 173,651 | How do I see Debug.WriteLine statements when using TestDriven.Net? | I'm trying to use TestDriven.Net not only to test my code, but to call a function on my code whose purpose is to print out the internal state of the code to the Debug window. Here's a very simplified example of what I'm trying to do.. _ Public Class UnitTest _ Public Sub TestDebug() Dim oClass1 As New Class1
Assert.Ar... | I found that while Debug.Writeline() doesn't work with unit tests, Console.WriteLine() does. The reason is that when you run tests, the debugger process isn't invoked, and Debug.WriteLine() is ignored. However, if you use "Test with Debugger", I think (haven't tried) Debug.WriteLine() will work. | How do I see Debug.WriteLine statements when using TestDriven.Net? I'm trying to use TestDriven.Net not only to test my code, but to call a function on my code whose purpose is to print out the internal state of the code to the Debug window. Here's a very simplified example of what I'm trying to do.. _ Public Class Uni... | TITLE:
How do I see Debug.WriteLine statements when using TestDriven.Net?
QUESTION:
I'm trying to use TestDriven.Net not only to test my code, but to call a function on my code whose purpose is to print out the internal state of the code to the Debug window. Here's a very simplified example of what I'm trying to do.. ... | [
".net",
"debugging",
"testdriven.net"
] | 5 | 11 | 14,314 | 7 | 0 | 2008-10-06T09:13:25.493000 | 2008-10-06T09:17:14.723000 |
173,643 | 177,980 | Version control for video editing work | I am looking into improving the backup process a group of animators use. Currently they back up their work into external hard drives or DVDs manually, taking full copies of everything. The data consists of thousands of high resolution images, project files of various video editing software and sound files. Basically ev... | If your scope is just "backup" then I'd say stick to backup solutions. But if you are thinking about the whole lifecycle of the animator's work, then the type of use typically falls into the "Digital Asset Management" category for the very reasons you mention: huge data volumes; binary formats. Since version control (S... | Version control for video editing work I am looking into improving the backup process a group of animators use. Currently they back up their work into external hard drives or DVDs manually, taking full copies of everything. The data consists of thousands of high resolution images, project files of various video editing... | TITLE:
Version control for video editing work
QUESTION:
I am looking into improving the backup process a group of animators use. Currently they back up their work into external hard drives or DVDs manually, taking full copies of everything. The data consists of thousands of high resolution images, project files of var... | [
"version-control",
"video",
"image"
] | 11 | 3 | 7,392 | 7 | 0 | 2008-10-06T09:14:03.060000 | 2008-10-07T11:10:25.383000 |
173,652 | 173,769 | How do I make modal dialog for a Page in my WPF-application? | I have a WPF Window which has a among other controls hosts a Frame. In that frame I display different pages. Is there way to make a dialog modal to only a page? When I'm showing the dialog it should not be possible to click on any control on the page but it should be possible to click on a control on the same window th... | If I am correct in interpreting your message, you want something that works similar to what Billy Hollis demonstrates in his StaffLynx application. I recently built a similar control and it turns out that this sort of idea is relatively simple to implement in WPF. I created a custom control called DialogPresenter. In t... | How do I make modal dialog for a Page in my WPF-application? I have a WPF Window which has a among other controls hosts a Frame. In that frame I display different pages. Is there way to make a dialog modal to only a page? When I'm showing the dialog it should not be possible to click on any control on the page but it s... | TITLE:
How do I make modal dialog for a Page in my WPF-application?
QUESTION:
I have a WPF Window which has a among other controls hosts a Frame. In that frame I display different pages. Is there way to make a dialog modal to only a page? When I'm showing the dialog it should not be possible to click on any control on... | [
"wpf",
"modal-dialog"
] | 27 | 27 | 42,524 | 4 | 0 | 2008-10-06T09:17:42.303000 | 2008-10-06T10:05:15.563000 |
173,670 | 173,845 | Why is there no RAII in .NET? | Being primarily a C++ developer the absence of RAII (Resource Acquisition Is Initialization) in Java and.NET has always bothered me. The fact that the onus of cleaning up is moved from the class writer to its consumer (by means of try finally or.NET's using construct ) seems to be markedly inferior. I see why in Java t... | A better title would be "Why is there no RAII in C#/VB". C++/CLI (The evolution of the abortion that was Managed C++) has RAII in the exact same sense as C++. It's all just syntax sugar for the same finalisation pattern that the rest of the CLI languages use (Destructors in managed objects for C++/CLI are effectively f... | Why is there no RAII in .NET? Being primarily a C++ developer the absence of RAII (Resource Acquisition Is Initialization) in Java and.NET has always bothered me. The fact that the onus of cleaning up is moved from the class writer to its consumer (by means of try finally or.NET's using construct ) seems to be markedly... | TITLE:
Why is there no RAII in .NET?
QUESTION:
Being primarily a C++ developer the absence of RAII (Resource Acquisition Is Initialization) in Java and.NET has always bothered me. The fact that the onus of cleaning up is moved from the class writer to its consumer (by means of try finally or.NET's using construct ) se... | [
".net",
"struct",
"destructor",
"raii",
"value-type"
] | 66 | 15 | 9,387 | 7 | 0 | 2008-10-06T09:25:16.500000 | 2008-10-06T10:48:14.743000 |
173,681 | 173,686 | String literals inside functions: automatic variables or allocated in heap? | Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually? I've a situation like the code shown below wherein I'm assigning a string literal to a private field of the class (marked as ONE in the code) and retrieving it much later in my program and ... | String literals will be placed in the initialized data or text (code) segment of your binary by the compiler, rather than residing in (runtime allocated) memory or the stack. So you should be using a pointer, since you're going to be referencing the string literal that the compiler has already produced for you. Note th... | String literals inside functions: automatic variables or allocated in heap? Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually? I've a situation like the code shown below wherein I'm assigning a string literal to a private field of the class... | TITLE:
String literals inside functions: automatic variables or allocated in heap?
QUESTION:
Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually? I've a situation like the code shown below wherein I'm assigning a string literal to a private ... | [
"c++",
"c",
"memory",
"memory-management",
"memory-leaks"
] | 3 | 9 | 2,926 | 5 | 0 | 2008-10-06T09:29:41.360000 | 2008-10-06T09:31:29.937000 |
173,703 | 185,268 | How do I develop for both Portrait and Landscape display formats? | I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if there are any VB.NET code snippets to help me along with this task. | The way to determine the current orientation is with the System.Windows.Forms.SystemInformation.ScreenOrientation property. To get the actual size of the screen, check System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height (and.Width ) You can declare an event handler (with the AddHandler statement) for Microsoft... | How do I develop for both Portrait and Landscape display formats? I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if there are any VB.NE... | TITLE:
How do I develop for both Portrait and Landscape display formats?
QUESTION:
I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if t... | [
"vb.net",
"windows-xp",
"landscape",
"portrait"
] | 0 | 1 | 2,516 | 1 | 0 | 2008-10-06T09:42:53.080000 | 2008-10-08T23:01:58.800000 |
173,706 | 173,923 | How can I delete a specific node within a XML file by using vbscript | I am having the problem that I cannot select a specific XML node which needs to be deleted. I have already tried to select the node by using the XPath which works fine for some XML files but I cannot figure out the correct XPath for a node in a more complex file. Does anybody know a freeware tool which can load a XML f... | This is a default namespace issue. Try including the following code after you load in the XML: objDom.SetProperty "SelectionNamespaces", "xmlns:cf=""http://schemas.microsoft.com/SystemsManagementServer/2005/03/ConsoleFramework""" You then use this cf prefix in your XPath eg: objDom.SelectSingleNode("/cf:SmsFormData/cf:... | How can I delete a specific node within a XML file by using vbscript I am having the problem that I cannot select a specific XML node which needs to be deleted. I have already tried to select the node by using the XPath which works fine for some XML files but I cannot figure out the correct XPath for a node in a more c... | TITLE:
How can I delete a specific node within a XML file by using vbscript
QUESTION:
I am having the problem that I cannot select a specific XML node which needs to be deleted. I have already tried to select the node by using the XPath which works fine for some XML files but I cannot figure out the correct XPath for ... | [
"xml",
"xpath",
"vbscript"
] | 0 | 2 | 9,822 | 8 | 0 | 2008-10-06T09:44:57.583000 | 2008-10-06T11:17:34.993000 |
173,712 | 378,139 | Inline editing in a winforms textbox at design time | I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project. So far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-friendly by allowing in-line editing - does anyone know of an example of ... | You will need to create a designer that supports this behavior. For an example, use Reflector to look at the designer the ListView uses for resizing its columns. This should give you an idea of the work involved and what you need to do. There is MSDN documentation on some of this, but it isn't as helpful as you may lik... | Inline editing in a winforms textbox at design time I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project. So far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-friendly by allowing ... | TITLE:
Inline editing in a winforms textbox at design time
QUESTION:
I'm using a custom winforms 2.0 designer (i.e. my apps hosting the designer) which is being used for a small internal project. So far all the controls have their properties edited via the property grid - but I'd like to make it a little more user-fri... | [
".net",
"winforms",
"forms",
"designer"
] | 1 | 1 | 405 | 1 | 0 | 2008-10-06T09:47:01.090000 | 2008-12-18T15:15:47.357000 |
173,717 | 173,722 | SQL Server: Copying column within table | What is the easiest way to copy the all the values from a column in a table to another column in the same table? | With a single statement (if the columns have the same datatype) UPDATE SET = | SQL Server: Copying column within table What is the easiest way to copy the all the values from a column in a table to another column in the same table? | TITLE:
SQL Server: Copying column within table
QUESTION:
What is the easiest way to copy the all the values from a column in a table to another column in the same table?
ANSWER:
With a single statement (if the columns have the same datatype) UPDATE SET = | [
"sql",
"copying"
] | 24 | 50 | 33,473 | 2 | 0 | 2008-10-06T09:49:17.653000 | 2008-10-06T09:50:53.920000 |
173,726 | 174,047 | When and why are database joins expensive? | I'm doing some research into databases and I'm looking at some limitations of relational DBs. I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does the DBMS need to do to execute a join operation, where is the bottleneck? How can denormalization help to overcome this expen... | Denormalising to improve performance? It sounds convincing, but it doesn't hold water. Chris Date, who in company with Dr Ted Codd was the original proponent of the relational data model, ran out of patience with misinformed arguments against normalisation and systematically demolished them using scientific method: he ... | When and why are database joins expensive? I'm doing some research into databases and I'm looking at some limitations of relational DBs. I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does the DBMS need to do to execute a join operation, where is the bottleneck? How can ... | TITLE:
When and why are database joins expensive?
QUESTION:
I'm doing some research into databases and I'm looking at some limitations of relational DBs. I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does the DBMS need to do to execute a join operation, where is the bo... | [
"database",
"performance",
"join",
"relational-database",
"denormalization"
] | 410 | 537 | 103,393 | 7 | 0 | 2008-10-06T09:52:19.473000 | 2008-10-06T12:16:04.003000 |
173,727 | 173,764 | How to save encrypted data in cookie (using php)? | I would like to save data in cookies (user name, email address, etc...) but I don't the user to easily read it or modify it. I need to be able able to read the data back. How can I do that with php 5.2+? It would be used for "welcome back bob" kind of feature. It is not a replacement for persistence or session storage. | We use mcrypt in our projects to achieve encryption. Below is a code sample based on content found on the internet: td = mcrypt_module_open('rijndael-256', '', 'ofb', ''); // algorithm $this->ks = mcrypt_enc_get_key_size($this->td); // key size needed for the algorithm $this->salt = substr(md5($salt), 0, $this->ks); }
... | How to save encrypted data in cookie (using php)? I would like to save data in cookies (user name, email address, etc...) but I don't the user to easily read it or modify it. I need to be able able to read the data back. How can I do that with php 5.2+? It would be used for "welcome back bob" kind of feature. It is not... | TITLE:
How to save encrypted data in cookie (using php)?
QUESTION:
I would like to save data in cookies (user name, email address, etc...) but I don't the user to easily read it or modify it. I need to be able able to read the data back. How can I do that with php 5.2+? It would be used for "welcome back bob" kind of ... | [
"php",
"security",
"encryption",
"cookies"
] | 1 | 9 | 8,073 | 5 | 0 | 2008-10-06T09:52:31.377000 | 2008-10-06T10:02:40.170000 |
173,739 | 1,212,856 | Why does Installshield 2008 not roll back XML Changes? | I am using Installshield 2008 Premier to edit some XML files which are already on the targetsystem. This process does work fine with the "XML file changes" function. My problem is, that Installshield does not remove these changes on uninstall. I have set the "Remove element on uninstall" checkbox within the added eleme... | Unfortunately, it doesn't appear solvable. Basically, the xml changes made during the install dont appear to be "finalized" until the installation actually completes. Because of this, the xml file appears to get left with the "readonly" and "hidden" attributes set. In my experience with IS2009, I've had to write an ins... | Why does Installshield 2008 not roll back XML Changes? I am using Installshield 2008 Premier to edit some XML files which are already on the targetsystem. This process does work fine with the "XML file changes" function. My problem is, that Installshield does not remove these changes on uninstall. I have set the "Remov... | TITLE:
Why does Installshield 2008 not roll back XML Changes?
QUESTION:
I am using Installshield 2008 Premier to edit some XML files which are already on the targetsystem. This process does work fine with the "XML file changes" function. My problem is, that Installshield does not remove these changes on uninstall. I h... | [
"xml",
"installshield"
] | 0 | 1 | 478 | 1 | 0 | 2008-10-06T09:57:10.337000 | 2009-07-31T14:29:48.867000 |
173,747 | 173,762 | What is the best / easiest way to talk to SQLite from .NET? | Question says it all, really. My application is a time tracker. It's currently written as a spreadsheet, but there's just too much data and I would like to impose a bit more structure on it. SQLite seems like a neat way to go. I would be open to other suggestions, too. | There are some providers available: http://sqlite.phxsoftware.com/ http://sourceforge.net/projects/sqlite-dotnet2 And you can get up and running in just three minutes according to this chap: http://www.mikeduncan.com/sqlite-on-dotnet-in-3-mins/ Updated Jan 5 2009: We actually have this rolled out to our shared (partial... | What is the best / easiest way to talk to SQLite from .NET? Question says it all, really. My application is a time tracker. It's currently written as a spreadsheet, but there's just too much data and I would like to impose a bit more structure on it. SQLite seems like a neat way to go. I would be open to other suggesti... | TITLE:
What is the best / easiest way to talk to SQLite from .NET?
QUESTION:
Question says it all, really. My application is a time tracker. It's currently written as a spreadsheet, but there's just too much data and I would like to impose a bit more structure on it. SQLite seems like a neat way to go. I would be open... | [
".net",
"sqlite"
] | 3 | 7 | 502 | 3 | 0 | 2008-10-06T09:59:19.787000 | 2008-10-06T10:02:17.173000 |
173,757 | 218,509 | Apache uses excessive CPU | We run a medium-size site that gets a few hundred thousand pageviews a day. Up until last weekend we ran with a load usually below 0.2 on a virtual machine. The OS is Ubuntu. When deploying the latest version of our application, we also did an apt-get dist-upgrade before deploying. After we had deployed we noticed that... | The answer ended up being not-Apache related. As mentioned, we were on a virtual machine. Our user sessions are pretty big (think 500kB per active user), so we had a lot of disk IO. The disk was nearly full, meaning that Ubuntu spent a lot of time moving things around (or so we think). There was no easy way to extend t... | Apache uses excessive CPU We run a medium-size site that gets a few hundred thousand pageviews a day. Up until last weekend we ran with a load usually below 0.2 on a virtual machine. The OS is Ubuntu. When deploying the latest version of our application, we also did an apt-get dist-upgrade before deploying. After we ha... | TITLE:
Apache uses excessive CPU
QUESTION:
We run a medium-size site that gets a few hundred thousand pageviews a day. Up until last weekend we ran with a load usually below 0.2 on a virtual machine. The OS is Ubuntu. When deploying the latest version of our application, we also did an apt-get dist-upgrade before depl... | [
"php",
"mysql",
"performance",
"apache"
] | 12 | 12 | 15,860 | 5 | 0 | 2008-10-06T10:01:17.910000 | 2008-10-20T13:54:15.753000 |
173,770 | 508,968 | What ways are there of drawing 3D trees using Java and OpenGL? | I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality as SpeedTree. I want the trees to not look repetitive. Speed is not a concern, I... | http://arbaro.sourceforge.net/ http://www.propro.ru/go/Wshop/povtree/povtree.html Non java: http://www.aust-manufaktur.de/austt.html | What ways are there of drawing 3D trees using Java and OpenGL? I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality as SpeedTree. I w... | TITLE:
What ways are there of drawing 3D trees using Java and OpenGL?
QUESTION:
I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality... | [
"java",
"c++",
"c",
"opengl",
"procedural-generation"
] | 6 | 5 | 4,645 | 9 | 0 | 2008-10-06T10:05:26.373000 | 2009-02-03T21:28:36.767000 |
173,775 | 173,917 | Is SVN 1.5 Merge-tracking ready for prime-time? | I'm already using SVN 1.5, both sever(VisualSVN 1.5.1) and client-side(TortoiseSVN 1.5.1) but we are using a fairly lengthy SVN Branch-Merge dance. How ready is the Merge-Tracking facility of SVN 1.5.x and is it yet possible to use it from TortoiseSVN? | Subversion releases are generally pretty solid, version 1.5 has been in the works for 2 years. That being said, there are always some known issues. | Is SVN 1.5 Merge-tracking ready for prime-time? I'm already using SVN 1.5, both sever(VisualSVN 1.5.1) and client-side(TortoiseSVN 1.5.1) but we are using a fairly lengthy SVN Branch-Merge dance. How ready is the Merge-Tracking facility of SVN 1.5.x and is it yet possible to use it from TortoiseSVN? | TITLE:
Is SVN 1.5 Merge-tracking ready for prime-time?
QUESTION:
I'm already using SVN 1.5, both sever(VisualSVN 1.5.1) and client-side(TortoiseSVN 1.5.1) but we are using a fairly lengthy SVN Branch-Merge dance. How ready is the Merge-Tracking facility of SVN 1.5.x and is it yet possible to use it from TortoiseSVN?
... | [
"svn",
"tortoisesvn",
"visualsvn-server",
"merge-tracking"
] | 9 | 6 | 748 | 2 | 0 | 2008-10-06T10:06:23.873000 | 2008-10-06T11:15:19.650000 |
173,784 | 175,990 | How can I iterate recursively though a sharepoint list using webservices? | in sharepoint webservices, I can use getListItems() to obtain the child elements of a list. In a document library, sometimes the element is a folder. "ows_FSObjType = 1" Is there any way to ask SP for the child elements of this folder? Querying with getListItems() using the folder ID gives me a SOAP Exception. Edit: I ... | On the GetListItems method, one of the optional parameters is an XMLNode called "QueryOptions". One of the elements you can put in that node is. So you should be able to pass in something like: /My/Path/Here I may be off a bit syntatically (didn't try to build and run a query when making this post), but the general ide... | How can I iterate recursively though a sharepoint list using webservices? in sharepoint webservices, I can use getListItems() to obtain the child elements of a list. In a document library, sometimes the element is a folder. "ows_FSObjType = 1" Is there any way to ask SP for the child elements of this folder? Querying w... | TITLE:
How can I iterate recursively though a sharepoint list using webservices?
QUESTION:
in sharepoint webservices, I can use getListItems() to obtain the child elements of a list. In a document library, sometimes the element is a folder. "ows_FSObjType = 1" Is there any way to ask SP for the child elements of this ... | [
"web-services",
"sharepoint"
] | 0 | 3 | 5,948 | 1 | 0 | 2008-10-06T10:12:08.217000 | 2008-10-06T20:13:03.713000 |
173,786 | 174,920 | How do I stop a UIScrollView from bouncing horizontally? | I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag horizontally, and basically expose blank sections of the UI. I have tried setting: scrollView.alwaysBounceHorizontal = NO; scrollView.direction... | That's strange, because whenever I create a scroll view with frame and content size within the bounds of the screen on either dimension, the scroll view does not scroll (or bounce) in that direction. // Should scroll vertically but not horizontally UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMa... | How do I stop a UIScrollView from bouncing horizontally? I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag horizontally, and basically expose blank sections of the UI. I have tried setting: scr... | TITLE:
How do I stop a UIScrollView from bouncing horizontally?
QUESTION:
I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag horizontally, and basically expose blank sections of the UI. I have ... | [
"iphone",
"cocoa-touch"
] | 19 | 16 | 60,484 | 12 | 0 | 2008-10-06T10:12:35.453000 | 2008-10-06T16:04:29.270000 |
173,790 | 174,101 | Java: Serializing unknown Arraysize | If I safe an Array and reload it, is there a possibility to get the size if its unknown? Thanks | It sounds like you're serializing and storing the individual objects in the array (after much reading between the lines). Use the ObjectOutputStream to store the array itself. If the objects stored in the array are serializable, they'll be stored too. When you deserialize you'll get the entire array back intact. | Java: Serializing unknown Arraysize If I safe an Array and reload it, is there a possibility to get the size if its unknown? Thanks | TITLE:
Java: Serializing unknown Arraysize
QUESTION:
If I safe an Array and reload it, is there a possibility to get the size if its unknown? Thanks
ANSWER:
It sounds like you're serializing and storing the individual objects in the array (after much reading between the lines). Use the ObjectOutputStream to store the... | [
"java",
"serialization",
"objectsize"
] | 1 | 2 | 1,076 | 6 | 0 | 2008-10-06T10:14:19.523000 | 2008-10-06T12:43:14.667000 |
173,810 | 173,819 | AutoPostback with TextBox loses focus | A TextBox is set to AutoPostback as changing the value should cause a number of (display-only) fields to be recalculated and displayed. That works fine. However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when the page is redrawn so there is no focus anywhere. I want ... | This is "by design". If you are using ASP.NET 2.0+ you can try calling the Focus method of your TextBox once the postback occurs (preferably in the TextChanged event of the TextBox). I am not sure if there is any built-in way to track focus but I found this article in CodeProject which should do the trick. | AutoPostback with TextBox loses focus A TextBox is set to AutoPostback as changing the value should cause a number of (display-only) fields to be recalculated and displayed. That works fine. However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when the page is redrawn ... | TITLE:
AutoPostback with TextBox loses focus
QUESTION:
A TextBox is set to AutoPostback as changing the value should cause a number of (display-only) fields to be recalculated and displayed. That works fine. However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when th... | [
"asp.net",
"textbox",
"focus",
"autopostback"
] | 7 | 4 | 22,698 | 3 | 0 | 2008-10-06T10:27:28.763000 | 2008-10-06T10:31:15.650000 |
173,813 | 173,824 | Should exceptions be in a different project | When structuring a visual studio solution I tend to structure it so that various components are in different project (As I would assume most people do) I tend to have a bunch of User defined exceptions. The Question is should these exceptions be in a separate project to the (for example) Model classes? I tend to put th... | It depends on how you imagine them being used and how you deploy your application. As a rule of thumb - never create more packages/assemblies than needed. There's one strong case for putting Exceptions and Interface classes in their own assembly and that's when they're supposed to be shared among clients that not neces... | Should exceptions be in a different project When structuring a visual studio solution I tend to structure it so that various components are in different project (As I would assume most people do) I tend to have a bunch of User defined exceptions. The Question is should these exceptions be in a separate project to the (... | TITLE:
Should exceptions be in a different project
QUESTION:
When structuring a visual studio solution I tend to structure it so that various components are in different project (As I would assume most people do) I tend to have a bunch of User defined exceptions. The Question is should these exceptions be in a separat... | [
"visual-studio",
"exception",
"coding-style"
] | 1 | 3 | 163 | 3 | 0 | 2008-10-06T10:29:05.840000 | 2008-10-06T10:33:09.030000 |
173,814 | 173,820 | Using ALTER to drop a column if it exists in MySQL | How can ALTER be used to drop a column in a MySQL table if that column exists? I know I can use ALTER TABLE my_table DROP COLUMN my_column, but that will throw an error if my_column does not exist. Is there alternative syntax for dropping the column conditionally? I'm using MySQL version 4.0.18. | For MySQL, there is none: MySQL Feature Request. Allowing this is arguably a really bad idea, anyway: IF EXISTS indicates that you're running destructive operations on a database with (to you) unknown structure. There may be situations where this is acceptable for quick-and-dirty local work, but if you're tempted to ru... | Using ALTER to drop a column if it exists in MySQL How can ALTER be used to drop a column in a MySQL table if that column exists? I know I can use ALTER TABLE my_table DROP COLUMN my_column, but that will throw an error if my_column does not exist. Is there alternative syntax for dropping the column conditionally? I'm ... | TITLE:
Using ALTER to drop a column if it exists in MySQL
QUESTION:
How can ALTER be used to drop a column in a MySQL table if that column exists? I know I can use ALTER TABLE my_table DROP COLUMN my_column, but that will throw an error if my_column does not exist. Is there alternative syntax for dropping the column c... | [
"mysql",
"ddl",
"mysql4"
] | 129 | 101 | 180,952 | 10 | 0 | 2008-10-06T10:29:16.247000 | 2008-10-06T10:31:22.140000 |
173,821 | 173,828 | How to get the function name while in a function for debug strings? | I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me? At the moment I am doing: SlideInfoHeader* lynxThreeFile::readSlideInfoHeader(QDataStream & in) { qDebug("lynxThreeFile::readSlideInfoHeader"... | " __FUNCTION__ " is supported by both MSVC and GCC and should give you the information you need. | How to get the function name while in a function for debug strings? I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me? At the moment I am doing: SlideInfoHeader* lynxThreeFile::readSlideInfoHe... | TITLE:
How to get the function name while in a function for debug strings?
QUESTION:
I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me? At the moment I am doing: SlideInfoHeader* lynxThreeFil... | [
"c++",
"debugging",
"qt"
] | 19 | 27 | 9,039 | 6 | 0 | 2008-10-06T10:31:52.980000 | 2008-10-06T10:34:28.420000 |
173,834 | 173,863 | Getting the schema for a table | Given an SQLConnection object how can you get a schema for a single table? I seemed to be able to get the schema from a DataSet which I'd gotten from running a query, but all the schema info I could get from the connection seemed to be related to what tables were available and not the actual details on the tables. | I think accessing the schema from the query (via GetSchemaTable) is the only way to do it. You can run a query which returns no rows (select * from table where 1=2) if the schema is all you're interested in. You should use the KeyInfo CommandBehaviour to execute the source query, as otherwise not all the information re... | Getting the schema for a table Given an SQLConnection object how can you get a schema for a single table? I seemed to be able to get the schema from a DataSet which I'd gotten from running a query, but all the schema info I could get from the connection seemed to be related to what tables were available and not the act... | TITLE:
Getting the schema for a table
QUESTION:
Given an SQLConnection object how can you get a schema for a single table? I seemed to be able to get the schema from a DataSet which I'd gotten from running a query, but all the schema info I could get from the connection seemed to be related to what tables were availab... | [
"c#",
"sql",
"sql-server",
"ado.net",
"schema"
] | 7 | 5 | 13,133 | 3 | 0 | 2008-10-06T10:42:15.613000 | 2008-10-06T10:55:04.977000 |
173,841 | 208,576 | Twin Slider control .net | Has anyone seen a good twin slider control for.Net (Win forms or WPF). I'm looking for something that will allow me to select a range from within a set so the first slider would be the start of the range and the second would be the end. I remember seeing a Swing double slider but it was 6 years ago and I can't for the ... | Devexpress have a good one: The RangeTrackBarControl control extends the functionality provided by the TrackBarControl enabling end-users to select a range of values. Two sliders can be used to set the minimum and maximum values: alt text http://www.devexpress.com/Help/XtraEditors/img/RangeTrackBarControl.png you can g... | Twin Slider control .net Has anyone seen a good twin slider control for.Net (Win forms or WPF). I'm looking for something that will allow me to select a range from within a set so the first slider would be the start of the range and the second would be the end. I remember seeing a Swing double slider but it was 6 years... | TITLE:
Twin Slider control .net
QUESTION:
Has anyone seen a good twin slider control for.Net (Win forms or WPF). I'm looking for something that will allow me to select a range from within a set so the first slider would be the start of the range and the second would be the end. I remember seeing a Swing double slider ... | [
".net",
"winforms",
"controls",
"slider"
] | 5 | 7 | 3,129 | 2 | 0 | 2008-10-06T10:46:46.117000 | 2008-10-16T13:33:57.153000 |
173,846 | 179,251 | How to do dynamic URL redirects in Struts 2? | I'm trying to have my Struts2 app redirect to a generated URL. In this case, I want the URL to use the current date, or a date I looked up in a database. So /section/document becomes /section/document/2008-10-06 What's the best way to do this? | Here's how we do it: In Struts.xml, have a dynamic result such as: ${url} In the action: private String url;
public String getUrl() { return url; }
public String execute() { [other stuff to setup your date] url = "/section/document" + date; return "redirect"; } You can actually use this same technology to set dynamic... | How to do dynamic URL redirects in Struts 2? I'm trying to have my Struts2 app redirect to a generated URL. In this case, I want the URL to use the current date, or a date I looked up in a database. So /section/document becomes /section/document/2008-10-06 What's the best way to do this? | TITLE:
How to do dynamic URL redirects in Struts 2?
QUESTION:
I'm trying to have my Struts2 app redirect to a generated URL. In this case, I want the URL to use the current date, or a date I looked up in a database. So /section/document becomes /section/document/2008-10-06 What's the best way to do this?
ANSWER:
Here... | [
"java",
"url",
"redirect",
"struts2"
] | 28 | 65 | 79,989 | 6 | 0 | 2008-10-06T10:48:23.790000 | 2008-10-07T16:15:35.173000 |
173,851 | 173,887 | What is the canonical way to determine commandline vs. http execution of a PHP script? | I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect SERVER['argc'], but it turns out this is populated, even when using the 'Apache 2.0 Handler' server API. | Use the php_sapi_name() function. if (php_sapi_name() == "cli") { // In cli-mode } else { // Not in cli-mode } Here are some relevant notes from the docs: php_sapi_name — Returns the type of interface between web server and PHP Although not exhaustive, the possible return values include aolserver, apache, apache2filter... | What is the canonical way to determine commandline vs. http execution of a PHP script? I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect SERVER['argc'], but... | TITLE:
What is the canonical way to determine commandline vs. http execution of a PHP script?
QUESTION:
I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect S... | [
"php",
"http",
"command-line",
"command-line-interface"
] | 170 | 249 | 46,266 | 5 | 0 | 2008-10-06T10:51:04.267000 | 2008-10-06T11:07:22.160000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.