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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
153,266 | 153,310 | How to cast a number to a byte? | In C and C++ you can tell the compiler that a number is a 'long' by putting an 'l' at the end of the number. e.g long x = 0l; How can I tell the C# compiler that a number is a byte? | According to the C# language specification there is no way to specify a byte literal. You'll have to cast down to byte in order to get a byte. Your best bet is probably to specify in hex and cast down, like this: byte b = (byte) 0x10; | How to cast a number to a byte? In C and C++ you can tell the compiler that a number is a 'long' by putting an 'l' at the end of the number. e.g long x = 0l; How can I tell the C# compiler that a number is a byte? | TITLE:
How to cast a number to a byte?
QUESTION:
In C and C++ you can tell the compiler that a number is a 'long' by putting an 'l' at the end of the number. e.g long x = 0l; How can I tell the C# compiler that a number is a byte?
ANSWER:
According to the C# language specification there is no way to specify a byte li... | [
"c#",
"casting"
] | 8 | 8 | 30,614 | 5 | 0 | 2008-09-30T14:23:40.370000 | 2008-09-30T14:29:44.130000 |
153,286 | 153,314 | What to learn first? | I went to school for programming years ago and when I got out I found a job in system administration and that is the direction my career took. I'd like to get back into development of some sort and have been 'playing' with C# and ASP.NET, but I've been hearing lots of buzz for other 'new' languages (by new I mean that ... | You should learn at least 1 compiled language (like C# or Java) and 1 Script Language (Python, Ruby, etc). This is usually enough to help most developers succeed at what they do, regardless of the age of the language. As for new vs old, I'd stick with C# for now as it's pretty popular. Learning a new language wouldn't ... | What to learn first? I went to school for programming years ago and when I got out I found a job in system administration and that is the direction my career took. I'd like to get back into development of some sort and have been 'playing' with C# and ASP.NET, but I've been hearing lots of buzz for other 'new' languages... | TITLE:
What to learn first?
QUESTION:
I went to school for programming years ago and when I got out I found a job in system administration and that is the direction my career took. I'd like to get back into development of some sort and have been 'playing' with C# and ASP.NET, but I've been hearing lots of buzz for oth... | [
"c#",
"asp.net",
"ruby",
"f#"
] | 5 | 12 | 932 | 11 | 0 | 2008-09-30T14:26:46.040000 | 2008-09-30T14:30:41.617000 |
153,287 | 153,400 | File name corruption on file download (IE) | I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers: HTTP/1.1 200 OK Date: Tue, 30 Sep 2008 14:00:39 GMT Server: Microsoft-IIS/6.0 Content-Disposition: attachment; filename=filename.doc; Content-Type: application/octet-stream Content... | gmail handles file name escaping somewhat differently: the file name is quoted (double-quotes), and single-byte periods are not URL-escaped. This way, the long file name in the question is OK. Content-Disposition: attachment; filename="%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3... | File name corruption on file download (IE) I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers: HTTP/1.1 200 OK Date: Tue, 30 Sep 2008 14:00:39 GMT Server: Microsoft-IIS/6.0 Content-Disposition: attachment; filename=filename.doc; Con... | TITLE:
File name corruption on file download (IE)
QUESTION:
I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers: HTTP/1.1 200 OK Date: Tue, 30 Sep 2008 14:00:39 GMT Server: Microsoft-IIS/6.0 Content-Disposition: attachment; filename... | [
"internet-explorer",
"http",
"internationalization",
"http-headers"
] | 3 | 6 | 5,396 | 4 | 0 | 2008-09-30T14:26:46.277000 | 2008-09-30T14:51:47.680000 |
153,291 | 200,264 | How to decouple a middle tier and a dataset to allow for unit testing? | I have a question at SO asking how to wire a middle tier to a DataSet. I put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal for my code. How would this code be de-coupled to allow for unit testing? Thank you, Keit... | IMO; DataSets are evil. They are, and should only be used as, offline databases. Nothing more, IMO. However, what you do in your Data Access Layer (DAL) should not really impact your Business layer (BL). I'd just use objects (use interfaces) between them (IList) and then use an interface to define your DAL (IRepository... | How to decouple a middle tier and a dataset to allow for unit testing? I have a question at SO asking how to wire a middle tier to a DataSet. I put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal for my code. How w... | TITLE:
How to decouple a middle tier and a dataset to allow for unit testing?
QUESTION:
I have a question at SO asking how to wire a middle tier to a DataSet. I put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal ... | [
"c#",
".net",
"integration-testing"
] | 0 | 3 | 979 | 5 | 0 | 2008-09-30T14:27:01.017000 | 2008-10-14T07:34:53.227000 |
153,295 | 406,757 | Animations with full alpha in Qt? | Is there an animation format supported in Qt (using v4.4) that will support a full alpha channel? GIF only has one-bit transparency, and I don't think Qt supports APNG. Update: MNG seems to be supported, but that's even less popular than APNG! Maybe SVG is my best bet. | Qt supports SVG 1.2 Tiny as well as GIF and MNG. On a side-note, an animation API is being worked on which might be interesting for you; http://labs.trolltech.com/blogs/2008/11/05/qt-animation-framework/ and http://labs.trolltech.com/page/Projects/Graphics/Kinetic | Animations with full alpha in Qt? Is there an animation format supported in Qt (using v4.4) that will support a full alpha channel? GIF only has one-bit transparency, and I don't think Qt supports APNG. Update: MNG seems to be supported, but that's even less popular than APNG! Maybe SVG is my best bet. | TITLE:
Animations with full alpha in Qt?
QUESTION:
Is there an animation format supported in Qt (using v4.4) that will support a full alpha channel? GIF only has one-bit transparency, and I don't think Qt supports APNG. Update: MNG seems to be supported, but that's even less popular than APNG! Maybe SVG is my best bet... | [
"qt",
"animation",
"alphablending"
] | 1 | 3 | 1,767 | 3 | 0 | 2008-09-30T14:27:43.963000 | 2009-01-02T13:12:25.333000 |
153,309 | 284,976 | DSL Tools: Create a new Diagram in custom code | I am using DSL Tools for Visual Studio 2005. I have a DSL where at a certain point I would like to create a new Diagram using custom code. So far, I was able to create a new Diagram by overwriting the current, already opened diagram. Code follows: FEGeneratorDiagram diag = new FEGeneratorDiagram(ThisElem.Store); diag.A... | //Create a Store Type[] modelTypes = new Type[] { typeof(CoreDesignSurfaceDomainModel), typeof(FEGeneratorDomainModel) }; Store store = new Store(modelTypes); RootElement root; using (Transaction t = store.TransactionManager.BeginTransaction("Create Elements")) { root = FEGeneratorSerializationHelper.Instance.LoadModel... | DSL Tools: Create a new Diagram in custom code I am using DSL Tools for Visual Studio 2005. I have a DSL where at a certain point I would like to create a new Diagram using custom code. So far, I was able to create a new Diagram by overwriting the current, already opened diagram. Code follows: FEGeneratorDiagram diag =... | TITLE:
DSL Tools: Create a new Diagram in custom code
QUESTION:
I am using DSL Tools for Visual Studio 2005. I have a DSL where at a certain point I would like to create a new Diagram using custom code. So far, I was able to create a new Diagram by overwriting the current, already opened diagram. Code follows: FEGener... | [
"dsl",
"dsl-tools"
] | 0 | 0 | 942 | 1 | 0 | 2008-09-30T14:29:21.340000 | 2008-11-12T19:02:30.883000 |
153,344 | 282,680 | JPA annotations and Interfaces | I have a class Animal and an interface it inherits from IAnimal. @MappedSuperclass public class Animal implements Serializable, IAnimal{...}.
@Entity public class Jaguar extends Animal{...} My first question is, do I need to annotate the interface? I asked this because I am getting this error when I run my tests: Erro... | This error is occurring because you spelled Animal with a common a in the query. Try this: SELECT s FROM Animal s WHERE s.atype =:atype | JPA annotations and Interfaces I have a class Animal and an interface it inherits from IAnimal. @MappedSuperclass public class Animal implements Serializable, IAnimal{...}.
@Entity public class Jaguar extends Animal{...} My first question is, do I need to annotate the interface? I asked this because I am getting this ... | TITLE:
JPA annotations and Interfaces
QUESTION:
I have a class Animal and an interface it inherits from IAnimal. @MappedSuperclass public class Animal implements Serializable, IAnimal{...}.
@Entity public class Jaguar extends Animal{...} My first question is, do I need to annotate the interface? I asked this because ... | [
"jpa",
"java-ee-5"
] | 1 | 1 | 1,464 | 2 | 0 | 2008-09-30T14:37:58.103000 | 2008-11-12T01:04:57.407000 |
153,368 | 164,986 | Is anyone using Microsoft Software Licensing and Protection Services (SLP) in production? | Microsoft has come out with this fairly new technology that I am considering using for a.NET 3.5 application. I am curious, is anyone using this technology already? I am worried that the use of the secure virtual machine will negatively affect performance. Also, the way Microsoft advertises the product, it seems as tho... | Microsoft announced today that they are not accepting any new customers for SLP. Sounds like the whole program is going down the drain... I'm glad my company didn't sign up for it yet! | Is anyone using Microsoft Software Licensing and Protection Services (SLP) in production? Microsoft has come out with this fairly new technology that I am considering using for a.NET 3.5 application. I am curious, is anyone using this technology already? I am worried that the use of the secure virtual machine will nega... | TITLE:
Is anyone using Microsoft Software Licensing and Protection Services (SLP) in production?
QUESTION:
Microsoft has come out with this fairly new technology that I am considering using for a.NET 3.5 application. I am curious, is anyone using this technology already? I am worried that the use of the secure virtual... | [
".net",
"licensing",
"performance"
] | 4 | 4 | 1,091 | 3 | 0 | 2008-09-30T14:42:59.810000 | 2008-10-02T23:09:50.777000 |
153,372 | 3,836,682 | NameSpaceBinding and wsadmin | I am trying to create a StringNameSpaceBinding using the wsadmin tool of Websphere 6.1 Here are the steps i take set cell [$AdminConfig getid /Cell:cell/] $AdminConfig create StringNameSpaceBinding $cell { {name bindname} {nameInNameSpace Bindings/string} {stringToBind "This is the String value that gets bound"} } But ... | I'm betting that the following command: set cell [$AdminConfig getid /Cell:cell/] Doesn't work. Most likely, cell is not the name of your cell. You don't need to specify a cell name; there's only one cell in the WAS topology. I would change this to: set cell [$AdminConfig getid /Cell:/] Good luck. | NameSpaceBinding and wsadmin I am trying to create a StringNameSpaceBinding using the wsadmin tool of Websphere 6.1 Here are the steps i take set cell [$AdminConfig getid /Cell:cell/] $AdminConfig create StringNameSpaceBinding $cell { {name bindname} {nameInNameSpace Bindings/string} {stringToBind "This is the String v... | TITLE:
NameSpaceBinding and wsadmin
QUESTION:
I am trying to create a StringNameSpaceBinding using the wsadmin tool of Websphere 6.1 Here are the steps i take set cell [$AdminConfig getid /Cell:cell/] $AdminConfig create StringNameSpaceBinding $cell { {name bindname} {nameInNameSpace Bindings/string} {stringToBind "Th... | [
"websphere",
"websphere-6.1",
"wsadmin",
"jacl"
] | 3 | 4 | 4,169 | 2 | 0 | 2008-09-30T14:44:10.710000 | 2010-10-01T05:09:11.600000 |
153,376 | 153,390 | Fixed Statement in C# | We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here? class TestClass { int iMyVariable; static void Main() { TestClass oTestClass = new TestClass(); unsafe { fixed (int* p = &oTestClasst.iMyVariable) { *p = 9; } } } } | It fixes the pointer in memory. Garbage collected languages have the freedom to move objects around memory for efficiency. This is all transparent to the programmer because they don't really use pointers in "normal" CLR code. However, when you do require pointers, then you need to fix it in memory if you want to work w... | Fixed Statement in C# We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here? class TestClass { int iMyVariable; static void Main() { TestClass oTestClass = new TestClass(); unsafe { fixed (int* p = &oTestClasst.iMyVariable) { *p = 9; ... | TITLE:
Fixed Statement in C#
QUESTION:
We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here? class TestClass { int iMyVariable; static void Main() { TestClass oTestClass = new TestClass(); unsafe { fixed (int* p = &oTestClasst.iMyVa... | [
"c#",
".net",
"memory-management",
"garbage-collection",
"unsafe"
] | 12 | 17 | 4,104 | 5 | 0 | 2008-09-30T14:44:58.477000 | 2008-09-30T14:49:04.460000 |
153,381 | 153,646 | Javascript String concatenation faster than this example? | I have to concatenate a bunch of Strings in Javascript and am searching for the fastest way to do so. Let's assume that the Javascript has to create a large XML-"file" that, naturally, consists of many small Strings. So I came up with: var sbuffer = []; for (var idx=0; idx<10000; idx=idx+1) { sbuffer.push(‘ Data comes ... | Changing the line: sbuffer.push(‘Data comes here... bla... ’); to sbuffer[sbuffer.length] = ‘Data comes here... bla... ’; will give you 5-50% speed gain (depending on browser, in IE - gain will be highest) Regards. | Javascript String concatenation faster than this example? I have to concatenate a bunch of Strings in Javascript and am searching for the fastest way to do so. Let's assume that the Javascript has to create a large XML-"file" that, naturally, consists of many small Strings. So I came up with: var sbuffer = []; for (var... | TITLE:
Javascript String concatenation faster than this example?
QUESTION:
I have to concatenate a bunch of Strings in Javascript and am searching for the fastest way to do so. Let's assume that the Javascript has to create a large XML-"file" that, naturally, consists of many small Strings. So I came up with: var sbuf... | [
"javascript",
"performance",
"join"
] | 7 | 13 | 9,011 | 7 | 0 | 2008-09-30T14:46:51.920000 | 2008-09-30T15:45:12.983000 |
153,388 | 156,746 | How to solve Delphi's [Pascal Fatal Error] F2084 Internal Error: LA33? | I'm really sick of this problem. Google searches always seem to suggest "delete all bpls for the package", "delete all dcus". Sometimes this just-does-not-work. Hopefully I can get some other ideas here. I have a package written in-house, which had been installed without issue a few months ago. Having made a few change... | I managed to solve this, following the below procedure Create a new package One by one, add the components to the package, compile & install, until it failed. Investigate the unit causing the failure. As it turns out, the unit in question had a class constant array, eg TMyClass = class(TComponent) private const ErrStrs... | How to solve Delphi's [Pascal Fatal Error] F2084 Internal Error: LA33? I'm really sick of this problem. Google searches always seem to suggest "delete all bpls for the package", "delete all dcus". Sometimes this just-does-not-work. Hopefully I can get some other ideas here. I have a package written in-house, which had ... | TITLE:
How to solve Delphi's [Pascal Fatal Error] F2084 Internal Error: LA33?
QUESTION:
I'm really sick of this problem. Google searches always seem to suggest "delete all bpls for the package", "delete all dcus". Sometimes this just-does-not-work. Hopefully I can get some other ideas here. I have a package written in... | [
"delphi",
"installation",
"package"
] | 19 | 16 | 25,028 | 13 | 0 | 2008-09-30T14:48:38.657000 | 2008-10-01T08:46:57.223000 |
153,392 | 166,805 | tomcat session replication without multicast | i am planning to use 2 dedicated root servers rented at a hosting provider. those machines will run tomcat 6 in a cluster. if i will add additional machines later on - it is unlikely that they will be accessible with multicast, because they will be located in different subnets. is it possible to run tomcat without mult... | With no control over the distance between both servers (they might be in two different datacenters) and no dedicated inter-server-communication line, I'd rather run them via round-robin DNS or a loadbalancer that redirects clients to either www1.yourdomain.xxx or www2.yourdomain.xxx and handle server-communication care... | tomcat session replication without multicast i am planning to use 2 dedicated root servers rented at a hosting provider. those machines will run tomcat 6 in a cluster. if i will add additional machines later on - it is unlikely that they will be accessible with multicast, because they will be located in different subne... | TITLE:
tomcat session replication without multicast
QUESTION:
i am planning to use 2 dedicated root servers rented at a hosting provider. those machines will run tomcat 6 in a cluster. if i will add additional machines later on - it is unlikely that they will be accessible with multicast, because they will be located ... | [
"java",
"tomcat",
"multicast",
"failovercluster"
] | 4 | 3 | 8,992 | 4 | 0 | 2008-09-30T14:49:28.950000 | 2008-10-03T13:20:41.987000 |
153,394 | 153,564 | OO vs. Layered; balancing "OO purity" with getting things done | I believe in OO, but not to the point where inappropriate designs/implementations should be used just to be "OO Compliant". So, how to deal with the Serlvet/EJB/DataContainer layered architecture: Servlets receive requests and call a "business layer" (e.g. session EJBs) The business layer locates DataContainers from th... | So I'll address my thoughts on this in a few bullet points: It seems in a Java EE system at some point you have to deal with the plumbing of Java EE, the plumbing doesn't always benefit from OO concepts, but it certainly can with a bit of creativity and work. For example you could might take advantage of things such as... | OO vs. Layered; balancing "OO purity" with getting things done I believe in OO, but not to the point where inappropriate designs/implementations should be used just to be "OO Compliant". So, how to deal with the Serlvet/EJB/DataContainer layered architecture: Servlets receive requests and call a "business layer" (e.g. ... | TITLE:
OO vs. Layered; balancing "OO purity" with getting things done
QUESTION:
I believe in OO, but not to the point where inappropriate designs/implementations should be used just to be "OO Compliant". So, how to deal with the Serlvet/EJB/DataContainer layered architecture: Servlets receive requests and call a "busi... | [
"oop",
"class-design"
] | 5 | 3 | 692 | 6 | 0 | 2008-09-30T14:50:31.180000 | 2008-09-30T15:30:44.327000 |
153,396 | 2,475,885 | Echo2: How to create a centered Pane? | I'm new to the Echo 2 framework. I think it should be simple, but I found no way to center the generated content horizontally and vertically. Is there any possibility to get a centered ContentPane (or something similar) with a fixed width and height? thx, André | Found the solution with echoPointNG: public static ContainerEx createCenteredPane( int width, int height ) { ContainerEx cp = new ContainerEx(); cp.setPosition( Positionable.ABSOLUTE ); cp.setOutsets( new Insets( width / 2 * -1, height / 2 * -1, 0, 0 ) ); cp.setWidth( new Extent( width ) ); cp.setHeight( new Extent( he... | Echo2: How to create a centered Pane? I'm new to the Echo 2 framework. I think it should be simple, but I found no way to center the generated content horizontally and vertically. Is there any possibility to get a centered ContentPane (or something similar) with a fixed width and height? thx, André | TITLE:
Echo2: How to create a centered Pane?
QUESTION:
I'm new to the Echo 2 framework. I think it should be simple, but I found no way to center the generated content horizontally and vertically. Is there any possibility to get a centered ContentPane (or something similar) with a fixed width and height? thx, André
A... | [
"panel",
"center",
"echo2"
] | 2 | 0 | 194 | 1 | 0 | 2008-09-30T14:51:10.523000 | 2010-03-19T08:30:55.650000 |
153,407 | 154,150 | What is the best way to Update 'TranslatePosition' from Silverlight beta 2 to RC? | I am upgrading a silverlight beta 2 app to RC0 and have a function that translates a point from a child element to it's parent. The purpose of the function is to ensure that an element appears exactly on top of the child even though they are not on the same canvas and don't share a parent. Here is the current function:... | See TransformToVisual method of framework element. It does exactly what you want: given another control, it generates a new transform that maps the coordinates of a point relative to the current control, to coordinates relative to the passed in control. var transform = from.TransformToVisual(to); return transform.Trans... | What is the best way to Update 'TranslatePosition' from Silverlight beta 2 to RC? I am upgrading a silverlight beta 2 app to RC0 and have a function that translates a point from a child element to it's parent. The purpose of the function is to ensure that an element appears exactly on top of the child even though they ... | TITLE:
What is the best way to Update 'TranslatePosition' from Silverlight beta 2 to RC?
QUESTION:
I am upgrading a silverlight beta 2 app to RC0 and have a function that translates a point from a child element to it's parent. The purpose of the function is to ensure that an element appears exactly on top of the child... | [
"silverlight"
] | 0 | 2 | 316 | 2 | 0 | 2008-09-30T14:53:54.400000 | 2008-09-30T17:39:05.470000 |
153,413 | 153,519 | How can I get an XElement's .InnerText value in Linq to XML? | I'm trying to extract the polygons from placemarks in a KML file. So far so good: Imports Imports System.Xml.Linq
Partial Class Test_ImportPolygons Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim Kml As XDocument = XDocument.Load(Server.MapP... | What I was missing was that Placemark. is a collection of XElements, not a single XElement. This works: For Each Placemark As XElement In Kml... Dim Name As String = Placemark..Value Dim PolygonsXml As String = "" For Each Polygon As XElement In Placemark. PolygonsXml &= Polygon.ToString Next Next XElement.ToString is ... | How can I get an XElement's .InnerText value in Linq to XML? I'm trying to extract the polygons from placemarks in a KML file. So far so good: Imports Imports System.Xml.Linq
Partial Class Test_ImportPolygons Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Hand... | TITLE:
How can I get an XElement's .InnerText value in Linq to XML?
QUESTION:
I'm trying to extract the polygons from placemarks in a KML file. So far so good: Imports Imports System.Xml.Linq
Partial Class Test_ImportPolygons Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As Syst... | [
"vb.net",
"linq",
"linq-to-xml",
"kml"
] | 3 | 1 | 4,959 | 3 | 0 | 2008-09-30T14:54:57.267000 | 2008-09-30T15:19:00.283000 |
153,416 | 153,502 | Encrypt plain text inside EXE / RAM :: HxD editor | HxD (hex editor) allows to search/view/edit RAM. How can I protect a EXE against such editor? Data is encrypted inside INI/registry/DB, but is decoded at RAM. What is the solution? At runtime decode, use and recode data inside RAM ASAP? | You are trying to hold back the sea with a teaspoon. This kind of "in memory protection" is what good (evil?) malware does. I have seen live demonstrations of how to break this kind of "protection". It is ultimately useless - at some point your clear text must be available for execution by the computer. A competent pro... | Encrypt plain text inside EXE / RAM :: HxD editor HxD (hex editor) allows to search/view/edit RAM. How can I protect a EXE against such editor? Data is encrypted inside INI/registry/DB, but is decoded at RAM. What is the solution? At runtime decode, use and recode data inside RAM ASAP? | TITLE:
Encrypt plain text inside EXE / RAM :: HxD editor
QUESTION:
HxD (hex editor) allows to search/view/edit RAM. How can I protect a EXE against such editor? Data is encrypted inside INI/registry/DB, but is decoded at RAM. What is the solution? At runtime decode, use and recode data inside RAM ASAP?
ANSWER:
You ar... | [
"security",
"hex-editors"
] | 1 | 0 | 2,354 | 3 | 0 | 2008-09-30T14:55:37.533000 | 2008-09-30T15:15:14.333000 |
153,420 | 163,228 | Is it feasible to create a REST client with Flex? | I'm starting a project using a Restful architecture implemented in Java (using the new JAX-RS standard) We are planning to develop the GUI with a Flex application. I have already found some problems with this implementation using the HTTPService component (the response error codes, headers access...). Any of you guys h... | The problem here is that a lot of the web discussions around this issue are a year or more old. I'm working through this same research right now, and this is what I've learned today. This IBM Developer Works article from August 2008 by Jorge Rasillo and Mike Burr shows how to do a Flex front-end / RESTful back-end app ... | Is it feasible to create a REST client with Flex? I'm starting a project using a Restful architecture implemented in Java (using the new JAX-RS standard) We are planning to develop the GUI with a Flex application. I have already found some problems with this implementation using the HTTPService component (the response ... | TITLE:
Is it feasible to create a REST client with Flex?
QUESTION:
I'm starting a project using a Restful architecture implemented in Java (using the new JAX-RS standard) We are planning to develop the GUI with a Flex application. I have already found some problems with this implementation using the HTTPService compon... | [
"java",
"apache-flex",
"rest"
] | 32 | 23 | 17,008 | 15 | 0 | 2008-09-30T14:56:40.977000 | 2008-10-02T16:10:31.297000 |
153,427 | 153,538 | Is there a JUnit TestRunner for running groups of tests? | I am currently using JUnit 4 and have a need to divide my tests into groups that can be run selectively in any combination. I know TestNG has a feature to annotate tests to assign them to groups, but I can't migrate to TestNG right now. It seems this could easily be accomplished in JUnit with some custom annotations an... | Check out Spring's SpringJUnit4ClassRunner. I've used it to optionally run tests based on a System property, using the IfProfileValue annotation. This: @IfProfileValue(name="test-groups", values={"unit-tests", "integration-tests"}) public void testWhichRunsForUnitOrIntegrationTestGroups() { //... } Will run if the Syst... | Is there a JUnit TestRunner for running groups of tests? I am currently using JUnit 4 and have a need to divide my tests into groups that can be run selectively in any combination. I know TestNG has a feature to annotate tests to assign them to groups, but I can't migrate to TestNG right now. It seems this could easily... | TITLE:
Is there a JUnit TestRunner for running groups of tests?
QUESTION:
I am currently using JUnit 4 and have a need to divide my tests into groups that can be run selectively in any combination. I know TestNG has a feature to annotate tests to assign them to groups, but I can't migrate to TestNG right now. It seems... | [
"java",
"unit-testing",
"junit"
] | 14 | 6 | 8,510 | 9 | 0 | 2008-09-30T14:58:18.867000 | 2008-09-30T15:24:55.153000 |
153,438 | 155,597 | Retrieving the original error number from a COM method called via reflection | I have a VB6 COM component which I need to call from my.Net method. I use reflection to create an instance of the COM object and activate it in the following manner: f_oType = Type.GetTypeFromProgID(MyProgId); f_oInstance = Activator.CreateInstance(f_oType); I need to use GetTypeFromProgID rather than using tlbimp to c... | I looked at your code a little closer and with reflection you handle TargetInvocationException and work with the inner exception that is a COMException... Code example below (I ran and tested this as well): private void button1_Click(object sender, EventArgs e) { try { var f_oType = Type.GetTypeFromProgID("Project1.Cla... | Retrieving the original error number from a COM method called via reflection I have a VB6 COM component which I need to call from my.Net method. I use reflection to create an instance of the COM object and activate it in the following manner: f_oType = Type.GetTypeFromProgID(MyProgId); f_oInstance = Activator.CreateIns... | TITLE:
Retrieving the original error number from a COM method called via reflection
QUESTION:
I have a VB6 COM component which I need to call from my.Net method. I use reflection to create an instance of the COM object and activate it in the following manner: f_oType = Type.GetTypeFromProgID(MyProgId); f_oInstance = A... | [
"c#",
".net",
"com",
"interop"
] | 0 | 2 | 2,244 | 3 | 0 | 2008-09-30T15:00:01.233000 | 2008-09-30T23:35:52.803000 |
153,439 | 153,562 | jQuery index selectors | I'm trying to place 4 of my image containers into a new pane, having a total of 16 images. The jQuery below is what I came up with to do it. The first pane comes out correctly with 4 images in it. But the second has 4 images, plus the 3rd pane. And the 3rd pane has 4 images plus the 4th pane. I don't know exactly why t... | I think your problem is your use of the gt() and lt() selectors. You should look up slice() instead. Check out this post: http://docs.jquery.com/Traversing/slice | jQuery index selectors I'm trying to place 4 of my image containers into a new pane, having a total of 16 images. The jQuery below is what I came up with to do it. The first pane comes out correctly with 4 images in it. But the second has 4 images, plus the 3rd pane. And the 3rd pane has 4 images plus the 4th pane. I d... | TITLE:
jQuery index selectors
QUESTION:
I'm trying to place 4 of my image containers into a new pane, having a total of 16 images. The jQuery below is what I came up with to do it. The first pane comes out correctly with 4 images in it. But the second has 4 images, plus the 3rd pane. And the 3rd pane has 4 images plus... | [
"javascript",
"jquery",
"dom"
] | 5 | 5 | 3,490 | 2 | 0 | 2008-09-30T15:00:01.810000 | 2008-09-30T15:30:29.367000 |
153,445 | 153,455 | How to track System Dependencies? | Introduction In my current organisation, we have many desktop and web applications all feeding into each other at some point. When looking after older applications or creating new applications, it's proving very difficult to try and remember which system rely on other systems in order to work. I'm not talking about sof... | I would say to clearly state that on your architecture design document. There are some good tools for this like Enterprise Architect. This tool allows you to create diagrams using the UML standard for describing these dependencies in a clear and visual way. | How to track System Dependencies? Introduction In my current organisation, we have many desktop and web applications all feeding into each other at some point. When looking after older applications or creating new applications, it's proving very difficult to try and remember which system rely on other systems in order ... | TITLE:
How to track System Dependencies?
QUESTION:
Introduction In my current organisation, we have many desktop and web applications all feeding into each other at some point. When looking after older applications or creating new applications, it's proving very difficult to try and remember which system rely on other... | [
"dependencies",
"system"
] | 16 | 6 | 16,509 | 10 | 0 | 2008-09-30T15:01:09.937000 | 2008-09-30T15:03:20.510000 |
153,451 | 156,750 | How to check if System.Net.WebClient.DownloadData is downloading a binary file? | I am trying to use WebClient to download a file from web using a WinForms application. However, I really only want to download HTML file. Any other type I will want to ignore. I checked the WebResponse.ContentType, but its value is always null. Anyone have any idea what could be the cause? | Given your update, you can do this by changing the.Method in GetWebRequest: using System; using System.Net; static class Program { static void Main() { using (MyClient client = new MyClient()) { client.HeadOnly = true; string uri = "http://www.google.com"; byte[] body = client.DownloadData(uri); // note should be 0-len... | How to check if System.Net.WebClient.DownloadData is downloading a binary file? I am trying to use WebClient to download a file from web using a WinForms application. However, I really only want to download HTML file. Any other type I will want to ignore. I checked the WebResponse.ContentType, but its value is always n... | TITLE:
How to check if System.Net.WebClient.DownloadData is downloading a binary file?
QUESTION:
I am trying to use WebClient to download a file from web using a WinForms application. However, I really only want to download HTML file. Any other type I will want to ignore. I checked the WebResponse.ContentType, but its... | [
"c#",
"file",
"download",
"webclient"
] | 23 | 61 | 56,969 | 7 | 0 | 2008-09-30T15:02:06.737000 | 2008-10-01T08:49:06.873000 |
153,461 | 157,838 | How do I set HttpOnly on a session cookie in Rails 2.1? | I notice that Rails 2.2 (currently edge) supports setting HttpOnly on the session cookie. Is there a way of setting it on a Rails 2.1 application without moving to edge/2.2? | I have written a monkey patch to add this support to Rails 2.1, from the patch for Rails 2.2. I've not tested on anything other than Rails 2.1, and your mileage may vary! | How do I set HttpOnly on a session cookie in Rails 2.1? I notice that Rails 2.2 (currently edge) supports setting HttpOnly on the session cookie. Is there a way of setting it on a Rails 2.1 application without moving to edge/2.2? | TITLE:
How do I set HttpOnly on a session cookie in Rails 2.1?
QUESTION:
I notice that Rails 2.2 (currently edge) supports setting HttpOnly on the session cookie. Is there a way of setting it on a Rails 2.1 application without moving to edge/2.2?
ANSWER:
I have written a monkey patch to add this support to Rails 2.1,... | [
"ruby-on-rails",
"security",
"cookies",
"httponly"
] | 1 | 1 | 1,552 | 3 | 0 | 2008-09-30T15:04:55.933000 | 2008-10-01T14:20:46.890000 |
153,468 | 154,082 | What are the best Open Source tools for developing Flash applications? What are the best places to start learning? | As far as tools go, I am aware of Haxe, MTASC, and swfmill. Can you offer any success or horror stories related to any of them? Are there any others that I should be investigating? With respect to learning, the Adobe Developer Connection seems to contain decent reference materials, but the tutorials all assume that the... | If you are going to be targeting mobile devices (or the Wii) you will probably want to stick to Flash 7. Adobe still doesn't have a Flash 9 SDK available to those (embedded/mobile) platforms. The newest SDK is FlashLite 3 which supports Flash 8. Anything build before or around Oct. '07 would most likely still be using ... | What are the best Open Source tools for developing Flash applications? What are the best places to start learning? As far as tools go, I am aware of Haxe, MTASC, and swfmill. Can you offer any success or horror stories related to any of them? Are there any others that I should be investigating? With respect to learning... | TITLE:
What are the best Open Source tools for developing Flash applications? What are the best places to start learning?
QUESTION:
As far as tools go, I am aware of Haxe, MTASC, and swfmill. Can you offer any success or horror stories related to any of them? Are there any others that I should be investigating? With r... | [
"flash",
"open-source"
] | 10 | 1 | 6,639 | 6 | 0 | 2008-09-30T15:06:16.570000 | 2008-09-30T17:23:19.377000 |
153,473 | 153,532 | Keeping in sync with database | The solution we developed uses a database (sqlserver 2005) for persistence purposes, and thus, all updated data is saved to the database, instead of sent to the program. I have a front-end (desktop) that currently keeps polling the database for updates that may happen anytime on some critical data, and I am not really ... | Since you're on SQL2005, you can use a SqlDependency to be notified of changes. Note that you can use it pretty effortlessly with System.Web.Caching.Cache, which, despite it's namespace runs just fine in a WinForms app. | Keeping in sync with database The solution we developed uses a database (sqlserver 2005) for persistence purposes, and thus, all updated data is saved to the database, instead of sent to the program. I have a front-end (desktop) that currently keeps polling the database for updates that may happen anytime on some criti... | TITLE:
Keeping in sync with database
QUESTION:
The solution we developed uses a database (sqlserver 2005) for persistence purposes, and thus, all updated data is saved to the database, instead of sent to the program. I have a front-end (desktop) that currently keeps polling the database for updates that may happen any... | [
"c#",
"sql-server",
".net-3.5"
] | 2 | 2 | 1,878 | 6 | 0 | 2008-09-30T15:07:57.800000 | 2008-09-30T15:22:39.480000 |
153,478 | 153,636 | Is there a SQL Server profiler similar to Java/.Net profilers? | I love the way I can profile a Java/.Net app to find performance bottlenecks or memory problems. For example, it's very easy to find a performance bottleneck looking at the call tree with execution times and invocation counts per method. In SQL Server, I have stored procedures that call other stored procedures that dep... | Check out SQL Nexus Tool. This has some good reports on identifying bottlenecks. SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It loads and analyzes performance data collected by SQLDiag and PSSDiag. It can dramatically reduce the amount of time you spend manually analyzin... | Is there a SQL Server profiler similar to Java/.Net profilers? I love the way I can profile a Java/.Net app to find performance bottlenecks or memory problems. For example, it's very easy to find a performance bottleneck looking at the call tree with execution times and invocation counts per method. In SQL Server, I ha... | TITLE:
Is there a SQL Server profiler similar to Java/.Net profilers?
QUESTION:
I love the way I can profile a Java/.Net app to find performance bottlenecks or memory problems. For example, it's very easy to find a performance bottleneck looking at the call tree with execution times and invocation counts per method. I... | [
"java",
"sql-server",
"stored-procedures",
"profiling"
] | 4 | 6 | 1,135 | 8 | 0 | 2008-09-30T15:10:09.713000 | 2008-09-30T15:42:40.960000 |
153,482 | 160,706 | Setting ISO-8859-1 encoding for a single Tapestry 4 page in application that is otherwise totally UTF-8 | I have a Tapestry application that is serving its page as UTF-8. That is, server responses have header: Content-type: text/html;charset=UTF-8 Now within this application there is a single page that should be served with ISO-8859-1 encoding. That is, server response should have this header: Content-type: text/html;chars... | Have you considered a Filter? Maybe not as elegant as something within Tapestry, but using a plain Filter, that registers the url mapping(s) of interest. One of its init parameters would be the encoding your after. Example: public class EncodingFilter implements Filter { private String encoding; private FilterConfig fi... | Setting ISO-8859-1 encoding for a single Tapestry 4 page in application that is otherwise totally UTF-8 I have a Tapestry application that is serving its page as UTF-8. That is, server responses have header: Content-type: text/html;charset=UTF-8 Now within this application there is a single page that should be served w... | TITLE:
Setting ISO-8859-1 encoding for a single Tapestry 4 page in application that is otherwise totally UTF-8
QUESTION:
I have a Tapestry application that is serving its page as UTF-8. That is, server responses have header: Content-type: text/html;charset=UTF-8 Now within this application there is a single page that ... | [
"java",
"encoding",
"utf-8",
"tapestry",
"iso-8859-1"
] | 4 | 3 | 3,048 | 4 | 0 | 2008-09-30T15:10:48.183000 | 2008-10-02T02:59:56.860000 |
153,491 | 153,535 | Automated Python to Java translation | Is there a tool out there that can automatically convert Python to Java? Can Jython do this? | It may not be an easy problem. Determining how to map classes defined in Python into types in Java will be a big challange because of differences in each of type binding time. (duck typing vs. compile time binding). | Automated Python to Java translation Is there a tool out there that can automatically convert Python to Java? Can Jython do this? | TITLE:
Automated Python to Java translation
QUESTION:
Is there a tool out there that can automatically convert Python to Java? Can Jython do this?
ANSWER:
It may not be an easy problem. Determining how to map classes defined in Python into types in Java will be a big challange because of differences in each of type b... | [
"java",
"python",
"jython",
"code-translation"
] | 34 | 8 | 125,085 | 4 | 0 | 2008-09-30T15:13:05.727000 | 2008-09-30T15:23:47.650000 |
153,496 | 153,650 | .Net CF Prevent Overzealous, Impatient Clicking (while screen is redrawing) | .Net Compact Framework Scenario: User is on a screen. Device can't finds a printer and asks the user if they want to try again. If they click "No", the current screen is closed and they are returned to the parent menu screen. If they click the "No" button multiple times, the first click will be used by the No button an... | Random thoughts: Disable the some of the controls on the parent dialog while a modal dialog is up. I do not believe that you can disable the entire form since it is the parent of the modal dialog. Alternatively I would suggest using a Transparent control to catch the clicks but transparency is not supported on CF. How ... | .Net CF Prevent Overzealous, Impatient Clicking (while screen is redrawing) .Net Compact Framework Scenario: User is on a screen. Device can't finds a printer and asks the user if they want to try again. If they click "No", the current screen is closed and they are returned to the parent menu screen. If they click the ... | TITLE:
.Net CF Prevent Overzealous, Impatient Clicking (while screen is redrawing)
QUESTION:
.Net Compact Framework Scenario: User is on a screen. Device can't finds a printer and asks the user if they want to try again. If they click "No", the current screen is closed and they are returned to the parent menu screen. ... | [
"forms",
"compact-framework",
"refresh"
] | 3 | 2 | 1,446 | 2 | 0 | 2008-09-30T15:14:24.320000 | 2008-09-30T15:46:50.513000 |
153,507 | 153,517 | Calculate the position of an accelerating body after a certain time | How do I calculate the position of an accelerating body (e.g. a car) after a certain time (e.g. 1 second)? For a moving body that it not accelerating, it is a linear relationship, so I presume for an accelerating body it involves a square somewhere. Any ideas? | The equation is: s = ut + (1/2)a t^2 where s is position, u is velocity at t=0, t is time and a is a constant acceleration. For example, if a car starts off stationary, and accelerates for two seconds with an acceleration of 3m/s^2, it moves (1/2) * 3 * 2^2 = 6m This equation comes from integrating analytically the equ... | Calculate the position of an accelerating body after a certain time How do I calculate the position of an accelerating body (e.g. a car) after a certain time (e.g. 1 second)? For a moving body that it not accelerating, it is a linear relationship, so I presume for an accelerating body it involves a square somewhere. An... | TITLE:
Calculate the position of an accelerating body after a certain time
QUESTION:
How do I calculate the position of an accelerating body (e.g. a car) after a certain time (e.g. 1 second)? For a moving body that it not accelerating, it is a linear relationship, so I presume for an accelerating body it involves a sq... | [
"math",
"physics",
"equation"
] | 21 | 36 | 62,011 | 5 | 0 | 2008-09-30T15:16:57.513000 | 2008-09-30T15:18:54.933000 |
153,524 | 153,536 | Code to logging ratio? | What is the ideal code to logging ratio? I'm not used to writing logs as most of the applications I've developed have not had much logging. Recently though I've changed job, and I've noticed that you can't see the application code for the calls to log4net. I appreciate that this is useful but surely having too many deb... | There is actually a nice library for adding in logging after the fact as you say, PostSharp. It lets you do it via attribute-based programming, among many other very useful things beyond just logging. I agree that what you say is a little excessive for logging. Some others bring up some good points, especially the bank... | Code to logging ratio? What is the ideal code to logging ratio? I'm not used to writing logs as most of the applications I've developed have not had much logging. Recently though I've changed job, and I've noticed that you can't see the application code for the calls to log4net. I appreciate that this is useful but sur... | TITLE:
Code to logging ratio?
QUESTION:
What is the ideal code to logging ratio? I'm not used to writing logs as most of the applications I've developed have not had much logging. Recently though I've changed job, and I've noticed that you can't see the application code for the calls to log4net. I appreciate that this... | [
"logging",
"coding-style"
] | 49 | 13 | 16,113 | 14 | 0 | 2008-09-30T15:20:57.690000 | 2008-09-30T15:24:43.547000 |
153,553 | 153,590 | Flex/Flash Debugging in the Browser | I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I need to see the error that the Flash/Flex app is getting from the ASP.NET app. Is there any way to debug the response that Flash/Flex is getting? | Install the Debug version of the FlashPlayer for Firefox. Maybe this is already enough and an Error might pop up. If not use the FlexBuilder and debug the Flex application. If you don't have a license for the FlexBuilder you may also use the Evaluation licence. | Flex/Flash Debugging in the Browser I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I need to see the error that the Flash/Flex app is getting from the ASP.NET app. Is there any way to debug the response that Flash/Flex is getting? | TITLE:
Flex/Flash Debugging in the Browser
QUESTION:
I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I need to see the error that the Flash/Flex app is getting from the ASP.NET app. Is there any way to debug the response that Flash/Flex is getting?
ANSWER:
Install the Debug version of the FlashP... | [
"asp.net",
"apache-flex",
"flash",
"debugging"
] | 2 | 3 | 1,263 | 3 | 0 | 2008-09-30T15:28:45.113000 | 2008-09-30T15:35:58.747000 |
153,559 | 154,190 | What are some good profilers for native C++ on Windows? | I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies. The key features I'm looking for are: Process level metrics Component level metrics Line-level m... | On Windows, GlowCode is affordable, fairly easy to use, and offers a free trial so you can see if it works for you. | What are some good profilers for native C++ on Windows? I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies. The key features I'm looking for are: Pr... | TITLE:
What are some good profilers for native C++ on Windows?
QUESTION:
I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies. The key features I'm l... | [
"c++",
"windows",
"performance",
"profiling"
] | 17 | 9 | 17,480 | 8 | 0 | 2008-09-30T15:29:48.837000 | 2008-09-30T17:49:43.073000 |
153,572 | 153,582 | Parser-generator that outputs C# given a BNF grammar? | I'm looking for a tool that will be able to build a parser (in C#) if I give it a BNF grammar (eg. http://savage.net.au/SQL/sql-2003-2.bnf ) Does such a generator exist? | Normally BNF grammars are too ambiguous. ANTLR will be probably good for what you are looking for. | Parser-generator that outputs C# given a BNF grammar? I'm looking for a tool that will be able to build a parser (in C#) if I give it a BNF grammar (eg. http://savage.net.au/SQL/sql-2003-2.bnf ) Does such a generator exist? | TITLE:
Parser-generator that outputs C# given a BNF grammar?
QUESTION:
I'm looking for a tool that will be able to build a parser (in C#) if I give it a BNF grammar (eg. http://savage.net.au/SQL/sql-2003-2.bnf ) Does such a generator exist?
ANSWER:
Normally BNF grammars are too ambiguous. ANTLR will be probably good ... | [
"c#",
"parsing",
"bnf"
] | 10 | 14 | 15,026 | 5 | 0 | 2008-09-30T15:32:02.763000 | 2008-09-30T15:35:07.250000 |
153,573 | 153,744 | How can I clear event subscriptions in C#? | Take the following C# class: c1 { event EventHandler someEvent; } If there are a lot of subscriptions to c1 's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous delegates. Currently my solution is to add a Re... | From within the class, you can set the (hidden) variable to null. A null reference is the canonical way of representing an empty invocation list, effectively. From outside the class, you can't do this - events basically expose "subscribe" and "unsubscribe" and that's it. It's worth being aware of what field-like events... | How can I clear event subscriptions in C#? Take the following C# class: c1 { event EventHandler someEvent; } If there are a lot of subscriptions to c1 's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lambdas/anonymous dele... | TITLE:
How can I clear event subscriptions in C#?
QUESTION:
Take the following C# class: c1 { event EventHandler someEvent; } If there are a lot of subscriptions to c1 's someEvent event and I want to clear them all, what is the best way to achieve this? Also consider that subscriptions to this event could be/are lamb... | [
"c#",
".net",
"events",
"delegates"
] | 152 | 194 | 129,181 | 10 | 0 | 2008-09-30T15:32:17.867000 | 2008-09-30T16:05:02.233000 |
153,581 | 155,786 | Can I assign a global hotkey to an Adobe AIR app? | Is it possible to assign a global hotkey to a specific feature in an Adobe AIR app, i.e. the app feature responds to the hotkey whether the app is active or not (it must be running of course, but only in the system tray). | I don't this it's possible with Adobe AIR itself. The only method I can think of: Install 3rd party hotkey application (like AutoHotkey or HotKeyBind ) Configure hotkey application to make CTRL + ALT + Q to launch " c:\programs\thvo42\coolapp.exe --hotkey q " In your AIR application, register for the NativeApplication.... | Can I assign a global hotkey to an Adobe AIR app? Is it possible to assign a global hotkey to a specific feature in an Adobe AIR app, i.e. the app feature responds to the hotkey whether the app is active or not (it must be running of course, but only in the system tray). | TITLE:
Can I assign a global hotkey to an Adobe AIR app?
QUESTION:
Is it possible to assign a global hotkey to a specific feature in an Adobe AIR app, i.e. the app feature responds to the hotkey whether the app is active or not (it must be running of course, but only in the system tray).
ANSWER:
I don't this it's pos... | [
"air",
"development-environment",
"customization"
] | 12 | 4 | 2,216 | 3 | 0 | 2008-09-30T15:34:50.090000 | 2008-10-01T00:59:14.773000 |
153,584 | 155,172 | How to iterate over a timespan after days, hours, weeks and months? | How do I iterate over a timespan after days, hours, weeks or months? Something like: for date in foo(from_date, to_date, delta=HOURS): print date Where foo is a function, returning an iterator. I've been looking at the calendar module, but that only works for one specific year or month, not between dates. | Use dateutil and its rrule implementation, like so: from dateutil import rrule from datetime import datetime, timedelta
now = datetime.now() hundredDaysLater = now + timedelta(days=100)
for dt in rrule.rrule(rrule.MONTHLY, dtstart=now, until=hundredDaysLater): print dt Output is 2008-09-30 23:29:54 2008-10-30 23:29:5... | How to iterate over a timespan after days, hours, weeks and months? How do I iterate over a timespan after days, hours, weeks or months? Something like: for date in foo(from_date, to_date, delta=HOURS): print date Where foo is a function, returning an iterator. I've been looking at the calendar module, but that only wo... | TITLE:
How to iterate over a timespan after days, hours, weeks and months?
QUESTION:
How do I iterate over a timespan after days, hours, weeks or months? Something like: for date in foo(from_date, to_date, delta=HOURS): print date Where foo is a function, returning an iterator. I've been looking at the calendar module... | [
"python",
"datetime"
] | 76 | 122 | 56,570 | 8 | 0 | 2008-09-30T15:35:22.600000 | 2008-09-30T21:30:00.907000 |
153,585 | 153,601 | SQL sub-query problem with grouping, average | In MS Transact SQL, let's say I have a table (Orders) like this: Order Date Order Total Customer # 09/30/2008 8.00 1 09/15/2008 6.00 1 09/01/2008 9.50 1 09/01/2008 1.45 2 09/16/2008 4.50 2 09/17/2008 8.75 3 09/18/2008 2.50 3 What I need out of this is: for each customer the average order amount for the most recent two ... | This should make it select avg(total), customer from orders o1 where orderdate in ( select top 2 date from orders o2 where o2.customer = o1.customer order by date desc ) group by customer | SQL sub-query problem with grouping, average In MS Transact SQL, let's say I have a table (Orders) like this: Order Date Order Total Customer # 09/30/2008 8.00 1 09/15/2008 6.00 1 09/01/2008 9.50 1 09/01/2008 1.45 2 09/16/2008 4.50 2 09/17/2008 8.75 3 09/18/2008 2.50 3 What I need out of this is: for each customer the ... | TITLE:
SQL sub-query problem with grouping, average
QUESTION:
In MS Transact SQL, let's say I have a table (Orders) like this: Order Date Order Total Customer # 09/30/2008 8.00 1 09/15/2008 6.00 1 09/01/2008 9.50 1 09/01/2008 1.45 2 09/16/2008 4.50 2 09/17/2008 8.75 3 09/18/2008 2.50 3 What I need out of this is: for ... | [
"sql",
"sql-server-2005"
] | 4 | 5 | 2,264 | 3 | 0 | 2008-09-30T15:35:34.207000 | 2008-09-30T15:38:11.253000 |
153,592 | 153,780 | How do I determine the intersection point of two lines in GDI+? | I'm using.NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics.DrawLine. This simple implementation works fine, but as the surface gets more complex, I need a more robust way to represent the objects. One of these robust requirements is determining... | The representation of lines by y = mx + c is problematic for computer graphics, because vertical lines require m to be infinite. Furthermore, lines in computer graphics have a start and end point, unlike mathematical lines which are infinite in extent. One is usually only interested in a crossing of lines if the crossi... | How do I determine the intersection point of two lines in GDI+? I'm using.NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics.DrawLine. This simple implementation works fine, but as the surface gets more complex, I need a more robust way to repres... | TITLE:
How do I determine the intersection point of two lines in GDI+?
QUESTION:
I'm using.NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics.DrawLine. This simple implementation works fine, but as the surface gets more complex, I need a more ro... | [
"c#",
".net",
"graphics",
"geometry",
"gdi+"
] | 2 | 9 | 10,228 | 3 | 0 | 2008-09-30T15:36:04.767000 | 2008-09-30T16:12:42.057000 |
153,593 | 156,308 | Programmatically access a Microsoft Project (MPP) file from C# | What are my options for programmatically accessing a Microsoft Project file? What are the pros and cons of each approach? I will basically need to import all data from the file into another data structure. Using the Office Interop assembies is low on the preference scale. | Here are the options: Interop (messy and horribly slow for large projects) Save project in XML and work with it (messy) Save project in the database (that's not publishing and it is available for project 2003 only - see ODBC option while saving). I've seen it being used a lot in the integration scenarios Projette (comm... | Programmatically access a Microsoft Project (MPP) file from C# What are my options for programmatically accessing a Microsoft Project file? What are the pros and cons of each approach? I will basically need to import all data from the file into another data structure. Using the Office Interop assembies is low on the pr... | TITLE:
Programmatically access a Microsoft Project (MPP) file from C#
QUESTION:
What are my options for programmatically accessing a Microsoft Project file? What are the pros and cons of each approach? I will basically need to import all data from the file into another data structure. Using the Office Interop assembie... | [
"c#",
"ms-project"
] | 20 | 5 | 34,543 | 5 | 0 | 2008-09-30T15:36:12.893000 | 2008-10-01T05:09:21.020000 |
153,596 | 153,672 | Efficient way of logging to txt file from a console program | What would be the most efficient way of recording to a log (.txt) from a console program on C# and.NET 2.2? My program loops multiple times always outputting different data based on what the user wants, so I'm searching for the most efficient way to achieve this. I know I can always reopen a stream and then close it, b... | You could hook into the tracing framework that forms part of the CLR. Using a simple class like: http://www.chaosink.co.uk/files/tracing.zip you can selectively log diagnostic information. To use it add the class to your application. Create an inistance of the tracer in your class like: private Tracing trace = new Trac... | Efficient way of logging to txt file from a console program What would be the most efficient way of recording to a log (.txt) from a console program on C# and.NET 2.2? My program loops multiple times always outputting different data based on what the user wants, so I'm searching for the most efficient way to achieve th... | TITLE:
Efficient way of logging to txt file from a console program
QUESTION:
What would be the most efficient way of recording to a log (.txt) from a console program on C# and.NET 2.2? My program loops multiple times always outputting different data based on what the user wants, so I'm searching for the most efficient... | [
"c#",
".net",
"performance",
"logging"
] | 4 | 3 | 2,680 | 6 | 0 | 2008-09-30T15:36:46.823000 | 2008-09-30T15:52:14.433000 |
153,602 | 153,649 | Create MSBuild custom task to modify C# code *before* compile | I want to create a custom MSBuild task that changes my.cs files before they are compiled by csc.exe (but, of course, that doesn't modify them in place - I don't want actual source files touched). I am aware of PostSharp and other AOP frameworks for.NET and they are not an option for this particular project, plus I'd li... | Given your restrictions I think you can do the following: Create custom task that accepts the list of cs files to adapt prior to compilation The custom task adapts the list of files received and creates them on disk The custom task sets the list of changed files on the output parameter The output of the task would repl... | Create MSBuild custom task to modify C# code *before* compile I want to create a custom MSBuild task that changes my.cs files before they are compiled by csc.exe (but, of course, that doesn't modify them in place - I don't want actual source files touched). I am aware of PostSharp and other AOP frameworks for.NET and t... | TITLE:
Create MSBuild custom task to modify C# code *before* compile
QUESTION:
I want to create a custom MSBuild task that changes my.cs files before they are compiled by csc.exe (but, of course, that doesn't modify them in place - I don't want actual source files touched). I am aware of PostSharp and other AOP framew... | [
"c#",
".net",
"vb.net",
"msbuild",
"build-process"
] | 8 | 6 | 3,246 | 1 | 0 | 2008-09-30T15:38:17.197000 | 2008-09-30T15:46:41.107000 |
153,616 | 153,813 | MPI or Sockets? | I'm working on a loosely coupled cluster for some data processing. The network code and processing code is in place, but we are evaluating different methodologies in our approach. Right now, as we should be, we are I/O bound on performance issues, and we're trying to decrease that bottleneck. Obviously, faster switches... | MPI MIGHT use sockets. But there are also MPI implementation to be used with SAN (System area network) that use direct distributed shared memory. That of course if you have the hardware for that. So MPI allows you to use such resources in the future. On that case you can gain massive performance improvements (on my exp... | MPI or Sockets? I'm working on a loosely coupled cluster for some data processing. The network code and processing code is in place, but we are evaluating different methodologies in our approach. Right now, as we should be, we are I/O bound on performance issues, and we're trying to decrease that bottleneck. Obviously,... | TITLE:
MPI or Sockets?
QUESTION:
I'm working on a loosely coupled cluster for some data processing. The network code and processing code is in place, but we are evaluating different methodologies in our approach. Right now, as we should be, we are I/O bound on performance issues, and we're trying to decrease that bott... | [
"c++",
"c",
"cluster-computing",
"hpc"
] | 10 | 21 | 9,309 | 10 | 0 | 2008-09-30T15:40:15.193000 | 2008-09-30T16:18:58.330000 |
153,630 | 153,683 | How can you get the "real" HttpContext within an ASP.NET MVC application? | Unfortunately, I need to do this. I'm using ELMAH for my error log. Before I route to my error.aspx view, I have to grab the default ELMAH error log so I can log the exception. You used to be able to use Elmah.ErrorLog.Default However, this is now marked as obsolete. The compiler directs me to use the method Elmah.Erro... | Try System.Web.HttpContext.Current. It should do the trick. Gets HTTP-specific information about an individual HTTP request. MSDN | How can you get the "real" HttpContext within an ASP.NET MVC application? Unfortunately, I need to do this. I'm using ELMAH for my error log. Before I route to my error.aspx view, I have to grab the default ELMAH error log so I can log the exception. You used to be able to use Elmah.ErrorLog.Default However, this is no... | TITLE:
How can you get the "real" HttpContext within an ASP.NET MVC application?
QUESTION:
Unfortunately, I need to do this. I'm using ELMAH for my error log. Before I route to my error.aspx view, I have to grab the default ELMAH error log so I can log the exception. You used to be able to use Elmah.ErrorLog.Default H... | [
"asp.net-mvc",
"elmah"
] | 55 | 94 | 34,520 | 2 | 0 | 2008-09-30T15:41:54.770000 | 2008-09-30T15:53:21.183000 |
153,633 | 153,642 | Natural Sort in MySQL | Is there an elegant way to have performant, natural sorting in a MySQL database? For example if I have this data set: Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy Tactics Any other elegant solution than ... | I think this is why a lot of things are sorted by release date. A solution could be to create another column in your table for the "SortKey". This could be a sanitized version of the title which conforms to a pattern you create for easy sorting or a counter. | Natural Sort in MySQL Is there an elegant way to have performant, natural sorting in a MySQL database? For example if I have this data set: Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy Tactics Any other ... | TITLE:
Natural Sort in MySQL
QUESTION:
Is there an elegant way to have performant, natural sorting in a MySQL database? For example if I have this data set: Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy ... | [
"sql",
"mysql",
"sorting",
"natural-sort"
] | 99 | 23 | 96,390 | 23 | 0 | 2008-09-30T15:42:27.857000 | 2008-09-30T15:44:44.480000 |
153,644 | 153,692 | Why do you need $ when accessing array and hash elements in Perl? | Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elements? In other words, assuming you have an array @myarray and a hash %myhash, why do you need to do: $x = $myarray[1]; $y = $myhash{'foo'}; instead o... | Slices aren't illegal: @slice = @myarray[1, 2, 5]; @slice = @myhash{qw/foo bar baz/}; And I suspect that's part of the reason why you need to specify if you want to get a single value out of the hash/array or not. | Why do you need $ when accessing array and hash elements in Perl? Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elements? In other words, assuming you have an array @myarray and a hash %myhash, why d... | TITLE:
Why do you need $ when accessing array and hash elements in Perl?
QUESTION:
Since arrays and hashes can only contain scalars in Perl, why do you have to use the $ to tell the interpreter that the value is a scalar when accessing array or hash elements? In other words, assuming you have an array @myarray and a h... | [
"perl",
"arrays",
"hash",
"sigils"
] | 12 | 18 | 2,851 | 9 | 0 | 2008-09-30T15:44:45.400000 | 2008-09-30T15:55:35.063000 |
153,666 | 156,509 | Automating Word Mailmerge not working as expected | I'm having a problem with some mail merge code that is supposed to produce letters within our application. I'm aware that this code is a bit rough at the moment, but we're in the "Get something working" phase before we tidy it up. Now the way this is supposed to work, and the way it works when we do it manually, is we ... | I've found the solution. When you merge a document, it creates a new document with the merge results in it. Code fragment below explains. wrdDoc = wrdApp.Documents.Add(TemplateFileName) wrdDoc.Select() Dim wrdSelection As Word.Selection Dim wrdMailMerge As Word.MailMerge
wrdDoc.MailMerge.OpenDataSource(DataFileName)
... | Automating Word Mailmerge not working as expected I'm having a problem with some mail merge code that is supposed to produce letters within our application. I'm aware that this code is a bit rough at the moment, but we're in the "Get something working" phase before we tidy it up. Now the way this is supposed to work, a... | TITLE:
Automating Word Mailmerge not working as expected
QUESTION:
I'm having a problem with some mail merge code that is supposed to produce letters within our application. I'm aware that this code is a bit rough at the moment, but we're in the "Get something working" phase before we tidy it up. Now the way this is s... | [
".net",
"automation",
"ms-word",
"mailmerge",
"word-automation"
] | 2 | 4 | 4,622 | 3 | 0 | 2008-09-30T15:49:59.150000 | 2008-10-01T07:00:43.967000 |
153,676 | 153,704 | GUIDs in a C++ Linux GCC app | I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a GUID that is more equivalent to the Win32 one?... | This Internet Draft describes one type of UUID in great details and I have used a similar approach with great success when I needed a UUID implementation and could not link to an existing library for architectural reasons. This article provides a good overview. | GUIDs in a C++ Linux GCC app I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a GUID that is more... | TITLE:
GUIDs in a C++ Linux GCC app
QUESTION:
I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a... | [
"c++",
"linux",
"gcc",
"guid"
] | 8 | 10 | 12,123 | 4 | 0 | 2008-09-30T15:52:43.993000 | 2008-09-30T15:58:10.457000 |
153,678 | 565,489 | 7-Zip (7za.dll) .NET wrapper | Is there some code or a library that lets me control the 7-Zip unpacking functionality from C# code? | There is a project on CodePlex, SevenZipSharp. I haven't tried it yet, but it looks promising. | 7-Zip (7za.dll) .NET wrapper Is there some code or a library that lets me control the 7-Zip unpacking functionality from C# code? | TITLE:
7-Zip (7za.dll) .NET wrapper
QUESTION:
Is there some code or a library that lets me control the 7-Zip unpacking functionality from C# code?
ANSWER:
There is a project on CodePlex, SevenZipSharp. I haven't tried it yet, but it looks promising. | [
".net",
"7zip"
] | 6 | 5 | 7,589 | 1 | 0 | 2008-09-30T15:52:55.507000 | 2009-02-19T14:17:29.907000 |
153,706 | 153,802 | change default collation in phpmyadmin | It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how i change this? | In your Mysql configuration change the default-character-set operative under the [mysqld] tab. For example: [mysqld] default-character-set=utf8 Don't forget to restart your Mysql server afterwards for the changes to take effect. | change default collation in phpmyadmin It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how i change this? | TITLE:
change default collation in phpmyadmin
QUESTION:
It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how i change this?
ANSWER:
In your Mysql configuration change the default-character-set operative under the [mysqld] tab. For example: [mysqld] default-character-set=utf8 ... | [
"mysql",
"phpmyadmin"
] | 39 | 23 | 66,624 | 9 | 0 | 2008-09-30T15:58:54.820000 | 2008-09-30T16:17:11.877000 |
153,707 | 153,830 | Inheriting from protected classes in C+++ | Suppose I have the following declaration: class Over1 { protected: class Under1 { }; }; I know that I could do the following: class Over2: public Over1 { protected: class Under2: public Under1 { }; }; But is there a way to declare Under2 without Over2? Since you would have to extend Over1 to use any derivative of Under... | Using templates and explicit specializations you can do this with just one additional class declaration in Over1. class Over1 { protected: class Under1 { };
template class UnderImplementor; };
struct Under2Tag; struct Under3Tag; struct Under4Tag;
template <> class Over1::UnderImplementor: public Over1::Under1 { };
... | Inheriting from protected classes in C+++ Suppose I have the following declaration: class Over1 { protected: class Under1 { }; }; I know that I could do the following: class Over2: public Over1 { protected: class Under2: public Under1 { }; }; But is there a way to declare Under2 without Over2? Since you would have to e... | TITLE:
Inheriting from protected classes in C+++
QUESTION:
Suppose I have the following declaration: class Over1 { protected: class Under1 { }; }; I know that I could do the following: class Over2: public Over1 { protected: class Under2: public Under1 { }; }; But is there a way to declare Under2 without Over2? Since y... | [
"c++",
"inheritance",
"oop",
"private"
] | 3 | 1 | 472 | 4 | 0 | 2008-09-30T15:58:55.040000 | 2008-09-30T16:23:31.067000 |
153,721 | 155,921 | What alternatives are there to Google App Engine? | What alternatives are there to GAE, given that I already have a good bit of code working that I would like to keep. In other words, I'm digging python. However, my use case is more of a low number of requests, higher CPU usage type use case, and I'm worried that I may not be able to stay with App Engine forever. I have... | I don't think there is another alternative (with regards to code portability) to GAE right now since GAE is in a class of its own. Sure GAE is cloud computing, but I see GAE as a subset of cloud computing. Amazon's EC2 is also cloud computing (as well as Joyent Accelerators, Slicehost Slices), but obviously they are tw... | What alternatives are there to Google App Engine? What alternatives are there to GAE, given that I already have a good bit of code working that I would like to keep. In other words, I'm digging python. However, my use case is more of a low number of requests, higher CPU usage type use case, and I'm worried that I may n... | TITLE:
What alternatives are there to Google App Engine?
QUESTION:
What alternatives are there to GAE, given that I already have a good bit of code working that I would like to keep. In other words, I'm digging python. However, my use case is more of a low number of requests, higher CPU usage type use case, and I'm wo... | [
"google-app-engine",
"cloud"
] | 48 | 24 | 27,144 | 13 | 0 | 2008-09-30T16:00:54.207000 | 2008-10-01T01:58:20.683000 |
153,724 | 153,785 | How to round a number to n decimal places in Java | What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations. I also would like only significant digits to be displayed -... | Use setRoundingMode, set the RoundingMode explicitly to handle your issue with the half-even round, then use the format pattern for your required output. Example: DecimalFormat df = new DecimalFormat("#.####"); df.setRoundingMode(RoundingMode.CEILING); for (Number n: Arrays.asList(12, 123.12345, 0.23, 0.1, 2341234.2124... | How to round a number to n decimal places in Java What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations. I also wo... | TITLE:
How to round a number to n decimal places in Java
QUESTION:
What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most sit... | [
"java",
"decimal",
"rounding",
"digits"
] | 1,471 | 884 | 2,090,060 | 39 | 0 | 2008-09-30T16:01:34.613000 | 2008-09-30T16:14:15.940000 |
153,731 | 787,580 | Validation Block vs Nhibernate.Validator | I am looking for validation framework and while I am already using NHibernate I am thinking of using NHibernate.validator from contrib project however I also look at MS Validation Block which seem to be robust but i am not yet get into detail of each one yet so I wonder has anyone had step into these two frameworks and... | NHibernate Validator does not require you to use NHibernate for persistence. Usage can be as simple as: var engine = new ValidatorEngine(); InvalidValue[] errors = engine.Validate(someModelObjectWithAttributes);
foreach(var error in errors) { Console.WriteLine(error.Message); } Of course it can hook into NHibernate an... | Validation Block vs Nhibernate.Validator I am looking for validation framework and while I am already using NHibernate I am thinking of using NHibernate.validator from contrib project however I also look at MS Validation Block which seem to be robust but i am not yet get into detail of each one yet so I wonder has anyo... | TITLE:
Validation Block vs Nhibernate.Validator
QUESTION:
I am looking for validation framework and while I am already using NHibernate I am thinking of using NHibernate.validator from contrib project however I also look at MS Validation Block which seem to be robust but i am not yet get into detail of each one yet so... | [
"nhibernate",
"validation",
"model"
] | 6 | 10 | 3,178 | 4 | 0 | 2008-09-30T16:02:48.337000 | 2009-04-24T21:06:19.143000 |
153,732 | 153,844 | How do I break up high-cpu requests on Google App Engine? | To give an example of the kind of request that I can't figure out what else to do for: The application is a bowling score/stat tracker. When someone enters their scores in advanced mode, a number of stats are calculated, as well as their score. The data is modeled as: Game - members like name, user, reference to the bo... | A few suggestions: You could store the stats for frames as part of the same entity as the game, rather than having a separate entity for each, by storing it as a list of bitfields (stored in integers) for the pins standing at the end of each half-frame, for example. Let me know if you want more details on how this woul... | How do I break up high-cpu requests on Google App Engine? To give an example of the kind of request that I can't figure out what else to do for: The application is a bowling score/stat tracker. When someone enters their scores in advanced mode, a number of stats are calculated, as well as their score. The data is model... | TITLE:
How do I break up high-cpu requests on Google App Engine?
QUESTION:
To give an example of the kind of request that I can't figure out what else to do for: The application is a bowling score/stat tracker. When someone enters their scores in advanced mode, a number of stats are calculated, as well as their score.... | [
"performance",
"google-app-engine",
"quotas"
] | 1 | 1 | 1,010 | 1 | 0 | 2008-09-30T16:02:51.910000 | 2008-09-30T16:26:06.050000 |
153,735 | 153,841 | What are RFC's? | I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice. | The term comes from the days of ARPANET, the predecessor to the internet, where the researchers would basically just throw ideas out there to, well, make a request for comments from the other researchers on the project. They could be about pretty much anything and were not very formal at the time. If you go read them, ... | What are RFC's? I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice. | TITLE:
What are RFC's?
QUESTION:
I think there are a lot of people out there unaware of RFC's (Request for Comments). I know what they are at a logical level, but can anybody give a good description for a new developer? Also, sharing some resources on how to use and read them would be nice.
ANSWER:
The term comes fro... | [
"standards",
"rfc"
] | 43 | 41 | 28,621 | 6 | 0 | 2008-09-30T16:03:25.310000 | 2008-09-30T16:25:41.247000 |
153,742 | 153,992 | Vector and Layer Data Structure | I'm working with some code that is confusing me and I'm wondering if I'm just not grokking the data structures. The data I'm working with utilizes vectors and layers. I believe a vector is just a row of data but I'm not sure. Any information you could provide or point me to about the use of these would be very helpful. | The simplest view of a vector is a fixed-size list, such as a one-dimensional array. I've never heard of a "Layer", and googling turned up nothing relevant either. What are you trying to do? | Vector and Layer Data Structure I'm working with some code that is confusing me and I'm wondering if I'm just not grokking the data structures. The data I'm working with utilizes vectors and layers. I believe a vector is just a row of data but I'm not sure. Any information you could provide or point me to about the use... | TITLE:
Vector and Layer Data Structure
QUESTION:
I'm working with some code that is confusing me and I'm wondering if I'm just not grokking the data structures. The data I'm working with utilizes vectors and layers. I believe a vector is just a row of data but I'm not sure. Any information you could provide or point m... | [
"computer-science",
"data-layers"
] | 0 | 1 | 172 | 1 | 0 | 2008-09-30T16:04:14.340000 | 2008-09-30T17:01:06.920000 |
153,748 | 154,496 | How to inject Javascript in WebBrowser control? | I've tried this: string newScript = textBox1.Text; HtmlElement head = browserCtrl.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = browserCtrl.Document.CreateElement("script"); lblStatus.Text = scriptEl.GetType().ToString(); scriptEl.SetAttribute("type", "text/javascript"); head.AppendChild(scriptEl); s... | For some reason Richard's solution didn't work on my end (insertAdjacentText failed with an exception). This however seems to work: HtmlElement head = webBrowser1.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = webBrowser1.Document.CreateElement("script"); IHTMLScriptElement element = (IHTMLScriptEleme... | How to inject Javascript in WebBrowser control? I've tried this: string newScript = textBox1.Text; HtmlElement head = browserCtrl.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = browserCtrl.Document.CreateElement("script"); lblStatus.Text = scriptEl.GetType().ToString(); scriptEl.SetAttribute("type", "... | TITLE:
How to inject Javascript in WebBrowser control?
QUESTION:
I've tried this: string newScript = textBox1.Text; HtmlElement head = browserCtrl.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = browserCtrl.Document.CreateElement("script"); lblStatus.Text = scriptEl.GetType().ToString(); scriptEl.SetA... | [
"c#",
"javascript",
".net",
"winforms",
"webbrowser-control"
] | 83 | 102 | 173,597 | 16 | 0 | 2008-09-30T16:05:54.773000 | 2008-09-30T19:11:43.033000 |
153,759 | 153,804 | jQuery Datepicker with text input that doesn't allow user input | How do I use the jQuery Datepicker with a textbox input: $("#my_txtbox").datepicker({ // options }); that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user clicks on it, but I want the textbox to ignore any user input using the keyboard ... | You should be able to use the readonly attribute on the text input, and jQuery will still be able to edit its contents. | jQuery Datepicker with text input that doesn't allow user input How do I use the jQuery Datepicker with a textbox input: $("#my_txtbox").datepicker({ // options }); that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user clicks on it, but... | TITLE:
jQuery Datepicker with text input that doesn't allow user input
QUESTION:
How do I use the jQuery Datepicker with a textbox input: $("#my_txtbox").datepicker({ // options }); that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user... | [
"jquery",
"datepicker"
] | 147 | 282 | 270,398 | 25 | 0 | 2008-09-30T16:08:24.440000 | 2008-09-30T16:17:35.790000 |
153,769 | 153,779 | How to see the schema of a db2 table (file) | As in subject... is there a way of looking at an empty table schema without inserting any rows and issuing a SELECT? | Are you looking for DESCRIBE? db2 describe table user1.department Table: USER1.DEPARTMENT
Column Type Type name schema name Length Scale Nulls ------------------ ----------- ------------------ -------- -------- -------- AREA SYSIBM SMALLINT 2 0 No DEPT SYSIBM CHARACTER 3 0 No DEPTNAME SYSIBM CHARACTER 20 0 Yes | How to see the schema of a db2 table (file) As in subject... is there a way of looking at an empty table schema without inserting any rows and issuing a SELECT? | TITLE:
How to see the schema of a db2 table (file)
QUESTION:
As in subject... is there a way of looking at an empty table schema without inserting any rows and issuing a SELECT?
ANSWER:
Are you looking for DESCRIBE? db2 describe table user1.department Table: USER1.DEPARTMENT
Column Type Type name schema name Length ... | [
"file",
"db2",
"schema"
] | 7 | 8 | 55,827 | 4 | 0 | 2008-09-30T16:10:09.630000 | 2008-09-30T16:12:23.090000 |
153,773 | 153,822 | What is the preferred way to redirect a request in Pylons without losing form data? | I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do this? | Receiving data from a POST depends on the web browser sending data along. When the web browser receives a redirect, it does not resend that data along. One solution would be to URL encode the data you want to keep and use that with a GET. In the worst case, you could always add the data you want to keep to the session ... | What is the preferred way to redirect a request in Pylons without losing form data? I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do this? | TITLE:
What is the preferred way to redirect a request in Pylons without losing form data?
QUESTION:
I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do t... | [
"python",
"post",
"request",
"header",
"pylons"
] | 4 | 2 | 1,437 | 1 | 0 | 2008-09-30T16:11:23.247000 | 2008-09-30T16:21:30.400000 |
153,775 | 157,127 | Wcf and Interfaces as Parameters | i have a library with some entities that share the same interface. clients and service share this assembly. now i wonder if there is a way to have this Interface-type as Parameter in my service contracts so that i can use the same method for all classes implementing the interface. the entities themselve are all decorat... | I solved the problem using the ServiceKnownType attribute at the implementations of the OperationContracts. When telling your classes that implement the interface as ServiceKnownType's, you can use the interface as parameter and therefore are able to use all classes implementing your interface as long as they are seria... | Wcf and Interfaces as Parameters i have a library with some entities that share the same interface. clients and service share this assembly. now i wonder if there is a way to have this Interface-type as Parameter in my service contracts so that i can use the same method for all classes implementing the interface. the e... | TITLE:
Wcf and Interfaces as Parameters
QUESTION:
i have a library with some entities that share the same interface. clients and service share this assembly. now i wonder if there is a way to have this Interface-type as Parameter in my service contracts so that i can use the same method for all classes implementing th... | [
"c#",
".net",
"wcf",
"web-services"
] | 7 | 7 | 5,030 | 3 | 0 | 2008-09-30T16:11:28.643000 | 2008-10-01T11:05:56.920000 |
153,776 | 153,873 | How can I call a javascript function from inside a method? | I am inside of... public class bgchange: IMapServerDropDownBoxAction { void IServerAction.ServerAction(ToolbarItemInfo info) { Some code... and after "some code" I want to trigger [WebMethod] public static void DoSome() {
} Which triggers some javascript. Is this possible? Ok, switch methods here. I was able to call d... | I'm not sure I fully understand the sequence of what you are trying to do, what's client-side and what's not.... However, you could add a Start-up javascript method to the page which would then call the WebMethod. When calling a WebMethod via javascript, you can add a call-back function, which would then be called when... | How can I call a javascript function from inside a method? I am inside of... public class bgchange: IMapServerDropDownBoxAction { void IServerAction.ServerAction(ToolbarItemInfo info) { Some code... and after "some code" I want to trigger [WebMethod] public static void DoSome() {
} Which triggers some javascript. Is t... | TITLE:
How can I call a javascript function from inside a method?
QUESTION:
I am inside of... public class bgchange: IMapServerDropDownBoxAction { void IServerAction.ServerAction(ToolbarItemInfo info) { Some code... and after "some code" I want to trigger [WebMethod] public static void DoSome() {
} Which triggers som... | [
"c#",
"asp.net",
"javascript",
"arcgis"
] | 4 | 4 | 15,884 | 4 | 0 | 2008-09-30T16:11:40.720000 | 2008-09-30T16:32:23.837000 |
153,782 | 153,794 | Dropdown controls in ASP.NET 2.0 | I am using a codebehind page in ASP.NET to perform a SQL query. The query is loaded into a string, the connection is established (To Oracle), and we get it started by having the connection perform.ExecuteReader into a OleDBDataReader (We'll call it DataRead). I'll try to hammer out an example below. (Consider Drop as a... | The Add function can take a ListItem, so you can do Dim li as new ListItem(DataRead.Item("Subgroup of Bunnies"), "myValue") Drop.Items.Add(li) | Dropdown controls in ASP.NET 2.0 I am using a codebehind page in ASP.NET to perform a SQL query. The query is loaded into a string, the connection is established (To Oracle), and we get it started by having the connection perform.ExecuteReader into a OleDBDataReader (We'll call it DataRead). I'll try to hammer out an e... | TITLE:
Dropdown controls in ASP.NET 2.0
QUESTION:
I am using a codebehind page in ASP.NET to perform a SQL query. The query is loaded into a string, the connection is established (To Oracle), and we get it started by having the connection perform.ExecuteReader into a OleDBDataReader (We'll call it DataRead). I'll try ... | [
"asp.net",
"drop-down-menu",
"asp.net-2.0"
] | 1 | 6 | 897 | 5 | 0 | 2008-09-30T16:13:05.427000 | 2008-09-30T16:15:56.793000 |
153,795 | 153,869 | From objects to tables using activerecord | I'm getting some objects from an external library and I need to store those objects in a database. Is there a way to create the tables and relationships starting from the objects, or I have to dig into them and create migrations and models by hand? Thanks! Roberto | Even if you could dynamically create tables on the fly like that (not saying that you can). I wouldn't want to do that. There is so much potential for error there. I would create the migrations by hand and have the tables and fields pre-created and fill them in with rows as needed. | From objects to tables using activerecord I'm getting some objects from an external library and I need to store those objects in a database. Is there a way to create the tables and relationships starting from the objects, or I have to dig into them and create migrations and models by hand? Thanks! Roberto | TITLE:
From objects to tables using activerecord
QUESTION:
I'm getting some objects from an external library and I need to store those objects in a database. Is there a way to create the tables and relationships starting from the objects, or I have to dig into them and create migrations and models by hand? Thanks! Rob... | [
"ruby-on-rails",
"ruby",
"activerecord"
] | 2 | 2 | 475 | 5 | 0 | 2008-09-30T16:16:01.067000 | 2008-09-30T16:32:04.117000 |
153,801 | 155,094 | Concatenate RTF files in PHP (REGEX) | I've got a script that takes a user uploaded RTF document and merges in some person data into the letter (name, address, etc), and does this for multiple people. I merge the letter contents, then combine that with the next merge letter contents, for all people records. Affectively I'm combining a single RTF document in... | I would question the use of RTF in this case. It's not entirely clear to me what you're trying to do overall, so I can't necessarily suggest anything better, but if you can try to explain your project more broadly, maybe I can help. If this is really the way you want to go though, this regex gave me the correct output ... | Concatenate RTF files in PHP (REGEX) I've got a script that takes a user uploaded RTF document and merges in some person data into the letter (name, address, etc), and does this for multiple people. I merge the letter contents, then combine that with the next merge letter contents, for all people records. Affectively I... | TITLE:
Concatenate RTF files in PHP (REGEX)
QUESTION:
I've got a script that takes a user uploaded RTF document and merges in some person data into the letter (name, address, etc), and does this for multiple people. I merge the letter contents, then combine that with the next merge letter contents, for all people reco... | [
"php",
"regex",
"rtf"
] | 2 | 2 | 2,936 | 2 | 0 | 2008-09-30T16:17:11.610000 | 2008-09-30T21:06:32.913000 |
153,815 | 153,849 | How should I store a GUID in Oracle? | I am coming from the SQL server world where we had uniqueidentifier. Is there an equivalent in oracle? This column will be frequently queried so performance is the key. I am generating the GUID in.Net and will be passing it to Oracle. For a couple reasons it cannot be generated by oracle so I cannot use sequence. | CREATE table test (testguid RAW(16) default SYS_GUID() ) This blog studied the relative performance. | How should I store a GUID in Oracle? I am coming from the SQL server world where we had uniqueidentifier. Is there an equivalent in oracle? This column will be frequently queried so performance is the key. I am generating the GUID in.Net and will be passing it to Oracle. For a couple reasons it cannot be generated by o... | TITLE:
How should I store a GUID in Oracle?
QUESTION:
I am coming from the SQL server world where we had uniqueidentifier. Is there an equivalent in oracle? This column will be frequently queried so performance is the key. I am generating the GUID in.Net and will be passing it to Oracle. For a couple reasons it cannot... | [
"database",
"oracle",
"guid"
] | 59 | 67 | 80,067 | 7 | 0 | 2008-09-30T16:19:24.663000 | 2008-09-30T16:27:23.847000 |
153,825 | 155,645 | How can I apply mathematical function to MySQL query? | I've got the following query to determine how many votes a story has received: SELECT s_id, s_title, s_time, (s_time-now()) AS s_timediff,
( (SELECT COUNT(*) FROM s_ups WHERE stories.q_id=s_ups.s_id) - (SELECT COUNT(*) FROM s_downs WHERE stories.s_id=s_downs.s_id) ) AS votes
FROM stories I'd like to apply the followi... | Try this: SELECT s_id, s_title, log10(Z) + (Y * s_timediff)/45000 AS redditfunction FROM ( SELECT stories.s_id, stories.s_title, stories.s_time, stories.s_time - now() AS s_timediff, count(s_ups.s_id) - count(s_downs.s_id) as X, if(X>0,1,if(x<0,-1,0)) as Y, if(abs(x)>=1,abs(x),1) as Z FROM stories LEFT JOIN s_ups ON st... | How can I apply mathematical function to MySQL query? I've got the following query to determine how many votes a story has received: SELECT s_id, s_title, s_time, (s_time-now()) AS s_timediff,
( (SELECT COUNT(*) FROM s_ups WHERE stories.q_id=s_ups.s_id) - (SELECT COUNT(*) FROM s_downs WHERE stories.s_id=s_downs.s_id) ... | TITLE:
How can I apply mathematical function to MySQL query?
QUESTION:
I've got the following query to determine how many votes a story has received: SELECT s_id, s_title, s_time, (s_time-now()) AS s_timediff,
( (SELECT COUNT(*) FROM s_ups WHERE stories.q_id=s_ups.s_id) - (SELECT COUNT(*) FROM s_downs WHERE stories.s... | [
"php",
"mysql",
"voting"
] | 8 | 4 | 3,037 | 2 | 0 | 2008-09-30T16:21:49.400000 | 2008-09-30T23:56:04.330000 |
153,835 | 169,475 | What do you use for validation against XML schema? | When I want to validate my XML docuemnts against a schema in my server-side Java, I use the built-in JRE Xerces implementation and javax.xml.validation.Schema. It works fine, but when validation fails, Xerces gives error messages that are very close to useless, for example: cvc-minLength-valid: Value '' with length = '... | In your handler for the validation, you should receive a SAXParseException with that message, as well as the column number and the line number in the XML file. Isnt't it the case? | What do you use for validation against XML schema? When I want to validate my XML docuemnts against a schema in my server-side Java, I use the built-in JRE Xerces implementation and javax.xml.validation.Schema. It works fine, but when validation fails, Xerces gives error messages that are very close to useless, for exa... | TITLE:
What do you use for validation against XML schema?
QUESTION:
When I want to validate my XML docuemnts against a schema in my server-side Java, I use the built-in JRE Xerces implementation and javax.xml.validation.Schema. It works fine, but when validation fails, Xerces gives error messages that are very close t... | [
"java",
"validation",
"xsd"
] | 2 | 2 | 1,399 | 5 | 0 | 2008-09-30T16:24:08.100000 | 2008-10-04T01:09:29.437000 |
153,838 | 154,405 | Saving MFC Model as SQLite database | I am playing with a CAD application using MFC. I was thinking it would be nice to save the document (model) as an SQLite database. Advantages: I avoid file format changes (SQLite takes care of that) Free query engine Undo stack is simplified (table name, column name, new value and so on...) Opinions? | This is a fine idea. Sqlite is very pleasant to work with! But remember the old truism (I can't get an authoritative answer from Google about where it originally is from) that storing your data in a relational database is like parking your car by driving it into the garage, disassembling it, and putting each piece into... | Saving MFC Model as SQLite database I am playing with a CAD application using MFC. I was thinking it would be nice to save the document (model) as an SQLite database. Advantages: I avoid file format changes (SQLite takes care of that) Free query engine Undo stack is simplified (table name, column name, new value and so... | TITLE:
Saving MFC Model as SQLite database
QUESTION:
I am playing with a CAD application using MFC. I was thinking it would be nice to save the document (model) as an SQLite database. Advantages: I avoid file format changes (SQLite takes care of that) Free query engine Undo stack is simplified (table name, column name... | [
"sqlite",
"mfc"
] | 1 | 3 | 880 | 2 | 0 | 2008-09-30T16:25:00.860000 | 2008-09-30T18:45:56.557000 |
153,861 | 153,871 | [] brackets in sql statements | What do the brackets do in a sql statement? For example, in the statement: insert into table1 ([columnname1], columnname2) values (val1, val2) Also, what does it do if the table name is in brackets? | The [] marks the delimitation of a identifier, so if you have a column whose name contains spaces like Order Qty you need to enclose it with [] like: select [Order qty] from [Client sales] They are also to escape reserved keywords used as identifiers | [] brackets in sql statements What do the brackets do in a sql statement? For example, in the statement: insert into table1 ([columnname1], columnname2) values (val1, val2) Also, what does it do if the table name is in brackets? | TITLE:
[] brackets in sql statements
QUESTION:
What do the brackets do in a sql statement? For example, in the statement: insert into table1 ([columnname1], columnname2) values (val1, val2) Also, what does it do if the table name is in brackets?
ANSWER:
The [] marks the delimitation of a identifier, so if you have a ... | [
"sql",
"ms-access"
] | 29 | 47 | 51,049 | 8 | 0 | 2008-09-30T16:30:48.910000 | 2008-09-30T16:32:06.380000 |
153,874 | 153,927 | What is a Pointer? | See: Understanding Pointers In many C flavoured languages, and some older languages like Fortran, one can use Pointers. As someone who has only really programmed in basic, javascript, and actionscript, can you explain to me what a Pointer is, and what it is most useful for? Thanks! | Pointers are not as hard as they sound. As others have said already, they are variables that hold the address of some other variable. Suppose I wanted to give you directions to my house. I wouldn't give you a picture of my house, or a scale model of my house; I'd just give you the address. You could infer whatever you ... | What is a Pointer? See: Understanding Pointers In many C flavoured languages, and some older languages like Fortran, one can use Pointers. As someone who has only really programmed in basic, javascript, and actionscript, can you explain to me what a Pointer is, and what it is most useful for? Thanks! | TITLE:
What is a Pointer?
QUESTION:
See: Understanding Pointers In many C flavoured languages, and some older languages like Fortran, one can use Pointers. As someone who has only really programmed in basic, javascript, and actionscript, can you explain to me what a Pointer is, and what it is most useful for? Thanks!
... | [
"programming-languages",
"pointers",
"language-features"
] | 5 | 4 | 3,756 | 5 | 0 | 2008-09-30T16:32:28.313000 | 2008-09-30T16:42:58.460000 |
153,877 | 154,005 | What is the difference between ManualResetEvent and AutoResetEvent in .NET? | I have read the documentation on this and I think I understand. An AutoResetEvent resets when the code passes through event.WaitOne(), but a ManualResetEvent does not. Is this correct? | Yes. It's like the difference between a tollbooth and a door. The ManualResetEvent is the door, which needs to be closed (reset) manually. The AutoResetEvent is a tollbooth, allowing one car to go by and automatically closing before the next one can get through. | What is the difference between ManualResetEvent and AutoResetEvent in .NET? I have read the documentation on this and I think I understand. An AutoResetEvent resets when the code passes through event.WaitOne(), but a ManualResetEvent does not. Is this correct? | TITLE:
What is the difference between ManualResetEvent and AutoResetEvent in .NET?
QUESTION:
I have read the documentation on this and I think I understand. An AutoResetEvent resets when the code passes through event.WaitOne(), but a ManualResetEvent does not. Is this correct?
ANSWER:
Yes. It's like the difference be... | [
"c#",
".net",
"multithreading",
"autoresetevent",
"manualresetevent"
] | 583 | 990 | 203,078 | 11 | 0 | 2008-09-30T16:33:21.510000 | 2008-09-30T17:03:07.443000 |
153,879 | 153,952 | How do I add a multiline REG_SZ string to the registry from the command line? | As part of a build setup on a windows machine I need to add a registry entry and I'd like to do it from a simple batch file. The entry is for a third party app so the format is fixed. The entry takes the form of a REG_SZ string but needs to contain newlines ie. 0xOA characters as separators. I've hit a few problems. Fi... | You could create a VBScript(.vbs) file and just call it from a batch file, assuming you're doing other things in the batch other than this registry change. In vbscript you would be looking at something like: set WSHShell = CreateObject("WScript.Shell") WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SOMEKEY", "value", "type" You... | How do I add a multiline REG_SZ string to the registry from the command line? As part of a build setup on a windows machine I need to add a registry entry and I'd like to do it from a simple batch file. The entry is for a third party app so the format is fixed. The entry takes the form of a REG_SZ string but needs to c... | TITLE:
How do I add a multiline REG_SZ string to the registry from the command line?
QUESTION:
As part of a build setup on a windows machine I need to add a registry entry and I'd like to do it from a simple batch file. The entry is for a third party app so the format is fixed. The entry takes the form of a REG_SZ str... | [
"windows",
"registry",
"batch-file"
] | 8 | 2 | 18,603 | 4 | 0 | 2008-09-30T16:33:33.053000 | 2008-09-30T16:50:16.290000 |
153,889 | 154,212 | When would you NOT want to use memcached in a Ruby on Rails app? | Assuming a MySQL datastore, when would you NOT want to use memcached in a Ruby on Rails app? | Memcache is a strong distributed cache, but isn't any faster than local caching for some content. Caching should allow you to avoid bottlenecks, which is usually database requests and network requests. If you can cache your full page locally as HTML because it doesn't change very often (isn't very dynamic), then your w... | When would you NOT want to use memcached in a Ruby on Rails app? Assuming a MySQL datastore, when would you NOT want to use memcached in a Ruby on Rails app? | TITLE:
When would you NOT want to use memcached in a Ruby on Rails app?
QUESTION:
Assuming a MySQL datastore, when would you NOT want to use memcached in a Ruby on Rails app?
ANSWER:
Memcache is a strong distributed cache, but isn't any faster than local caching for some content. Caching should allow you to avoid bot... | [
"ruby-on-rails",
"ruby",
"memcached"
] | 4 | 6 | 1,862 | 4 | 0 | 2008-09-30T16:34:38.650000 | 2008-09-30T17:56:33.057000 |
153,890 | 153,895 | Printing leading 0's in C | I'm trying to find a good way to print leading 0, such as 01001 for a ZIP Code. While the number would be stored as 1001, what is a good way to do it? I thought of using either case statements or if to figure out how many digits the number is and then convert it to an char array with extra 0 's for printing, but I can'... | printf("%05d", zipCode); The 0 indicates what you are padding with and the 5 shows the width of the integer number. Example 1: If you use "%02d" (useful for dates) this would only pad zeros for numbers in the ones column. E.g., 06 instead of 6. Example 2: "%03d" would pad 2 zeros for one number in the ones column and p... | Printing leading 0's in C I'm trying to find a good way to print leading 0, such as 01001 for a ZIP Code. While the number would be stored as 1001, what is a good way to do it? I thought of using either case statements or if to figure out how many digits the number is and then convert it to an char array with extra 0 '... | TITLE:
Printing leading 0's in C
QUESTION:
I'm trying to find a good way to print leading 0, such as 01001 for a ZIP Code. While the number would be stored as 1001, what is a good way to do it? I thought of using either case statements or if to figure out how many digits the number is and then convert it to an char ar... | [
"c",
"printf"
] | 420 | 692 | 516,954 | 11 | 0 | 2008-09-30T16:34:43.817000 | 2008-09-30T16:36:18.587000 |
153,909 | 153,937 | Why is my JavaScript function sometimes "not defined"? | I call my JavaScript function. Why do I sometimes get the error 'myFunction is not defined' when it is defined? For example. I'll occasionally get 'copyArray is not defined' even in this example: function copyArray( pa ) { var la = []; for (var i=0; i < pa.length; i++) la.push( pa[i] ); return la; }
Function.prototype... | It shouldn't be possible for this to happen if you're just including the scripts on the page. The "copyArray" function should always be available when the JavaScript code starts executing no matter if it is declared before or after it -- unless you're loading the JavaScript files in dynamically with a dependency librar... | Why is my JavaScript function sometimes "not defined"? I call my JavaScript function. Why do I sometimes get the error 'myFunction is not defined' when it is defined? For example. I'll occasionally get 'copyArray is not defined' even in this example: function copyArray( pa ) { var la = []; for (var i=0; i < pa.length; ... | TITLE:
Why is my JavaScript function sometimes "not defined"?
QUESTION:
I call my JavaScript function. Why do I sometimes get the error 'myFunction is not defined' when it is defined? For example. I'll occasionally get 'copyArray is not defined' even in this example: function copyArray( pa ) { var la = []; for (var i=... | [
"javascript"
] | 42 | 9 | 171,570 | 13 | 0 | 2008-09-30T16:38:57.377000 | 2008-09-30T16:47:14.033000 |
153,912 | 154,616 | How to get list of keys from ASP.NET session state backed by SQL server? | I'm looking for a good way to visualize ASP.NET session state data stored in SQL server, preferably without creating a throwaway.aspx page. Is there a good way to get a list of the keys (and serialized data, if possible) directly from SQL server? Ideally, I'd like to run some T-SQL commands directly against the databas... | Can you elaborate slightly, is there no reference to a HttpContext available (You can use this from backend code as well FYI), which prevents you from utilizing the built in serialization and keys dictionary? EDIT, in response to your update. I believe the ASPState database creates and destroys temporary tables as need... | How to get list of keys from ASP.NET session state backed by SQL server? I'm looking for a good way to visualize ASP.NET session state data stored in SQL server, preferably without creating a throwaway.aspx page. Is there a good way to get a list of the keys (and serialized data, if possible) directly from SQL server? ... | TITLE:
How to get list of keys from ASP.NET session state backed by SQL server?
QUESTION:
I'm looking for a good way to visualize ASP.NET session state data stored in SQL server, preferably without creating a throwaway.aspx page. Is there a good way to get a list of the keys (and serialized data, if possible) directly... | [
"asp.net",
"session"
] | 0 | 0 | 1,208 | 2 | 0 | 2008-09-30T16:39:50.887000 | 2008-09-30T19:37:59.867000 |
153,928 | 154,744 | Can I see TFS file history with labels? | We currently are using both Visual Source Safe and Team Foundation Server at work (VSS for old projects, TFS for current or new projects). We have always used Labels in source control for each build. In VSS if you chose to see a file history you could include labels. In TFS I cannot find an option to include the lables... | In the 2008 version of TFS, you don't see labels in the standard history of files and folders. If you really want to know why - see Brian Harry's blog post " Why TFS Labels are not like VSS Labels ". To find labels in Visual Studio, go to File, Source Control, Label, Find Label... From that you can see what versions of... | Can I see TFS file history with labels? We currently are using both Visual Source Safe and Team Foundation Server at work (VSS for old projects, TFS for current or new projects). We have always used Labels in source control for each build. In VSS if you chose to see a file history you could include labels. In TFS I can... | TITLE:
Can I see TFS file history with labels?
QUESTION:
We currently are using both Visual Source Safe and Team Foundation Server at work (VSS for old projects, TFS for current or new projects). We have always used Labels in source control for each build. In VSS if you chose to see a file history you could include la... | [
"tfs",
"label"
] | 31 | 21 | 28,327 | 6 | 0 | 2008-09-30T16:43:20.237000 | 2008-09-30T20:05:56.523000 |
153,934 | 153,948 | How do I reference the calling dom element in a jquery ajax success function? | I'm trying to modify the class of an element if an ajax call based on that element is successful Item My understanding of the problem is that in the success function this references the ajax object parameters, NOT the calling dom element like it does within other places of the click function. So, how do I reference the... | You can just store it in a variable. Example: $("#a.toggle").click(function(e) { var target = $(this); $.ajax({ url: '/changeItem.php', dataType: 'json', type: 'POST', success: function(data,text) { if(data.error=='') { if(target.hasClass('class1')) { target.removeClass('class1').addClass('class2'); } else if(target.ha... | How do I reference the calling dom element in a jquery ajax success function? I'm trying to modify the class of an element if an ajax call based on that element is successful Item My understanding of the problem is that in the success function this references the ajax object parameters, NOT the calling dom element like... | TITLE:
How do I reference the calling dom element in a jquery ajax success function?
QUESTION:
I'm trying to modify the class of an element if an ajax call based on that element is successful Item My understanding of the problem is that in the success function this references the ajax object parameters, NOT the callin... | [
"javascript",
"jquery"
] | 8 | 18 | 17,992 | 4 | 0 | 2008-09-30T16:45:50.903000 | 2008-09-30T16:49:27.977000 |
153,942 | 284,412 | What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application | After developing a WPF application without Source Control, I decided to add the solution to TFS. After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event would be logged in the Application Event log:.NET Runtime version 2.0.50727.3053 - Fatal Execut... | Same issue, but without Power Commands installed. The only workaround I've been able to consistently use is to Clean/Rebuild the solution before opening ANY xaml file. If you can't get into your solution because the XAML is loading on start up, delete the suo. | What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application After developing a WPF application without Source Control, I decided to add the solution to TFS. After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event wou... | TITLE:
What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application
QUESTION:
After developing a WPF application without Source Control, I decided to add the solution to TFS. After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the f... | [
"wpf",
"visual-studio-2008",
"powercommands"
] | 18 | 5 | 9,774 | 8 | 0 | 2008-09-30T16:48:24.470000 | 2008-11-12T16:02:37.890000 |
153,944 | 153,967 | Is SQL syntax case sensitive? | Is SQL case sensitive? I've used MySQL and SQL Server which both seem to be case insensitive. Is this always the case? Does the standard define case-sensitivity? | The SQL keywords are case insensitive ( SELECT, FROM, WHERE, etc), but they are often written in all caps. However, in some setups, table and column names are case sensitive. MySQL has a configuration option to enable/disable it. Usually case sensitive table and column names are the default on Linux MySQL and case inse... | Is SQL syntax case sensitive? Is SQL case sensitive? I've used MySQL and SQL Server which both seem to be case insensitive. Is this always the case? Does the standard define case-sensitivity? | TITLE:
Is SQL syntax case sensitive?
QUESTION:
Is SQL case sensitive? I've used MySQL and SQL Server which both seem to be case insensitive. Is this always the case? Does the standard define case-sensitivity?
ANSWER:
The SQL keywords are case insensitive ( SELECT, FROM, WHERE, etc), but they are often written in all ... | [
"sql",
"case-sensitive"
] | 231 | 216 | 271,805 | 11 | 0 | 2008-09-30T16:49:04.717000 | 2008-09-30T16:52:16.083000 |
153,953 | 168,915 | GLIBC: debugging memory leaks: how to interpret output of mtrace() | I’m trying to debug a memory leak problem. I’m using mtrace() to get a malloc/free/realloc trace. I’ve ran my prog and have now a huge log file. So far so good. But I have problems interpreting the file. Look at these lines: @ /usr/java/ibm-java2-x86_64-50/jre/bin/libj9prt23.so:[0x2b270a384a34] + 0x1502570 0x68 @ /usr/... | The function that is allocating the memory is being called more than once. The caller address points to the code that did the allocation, and that code is simply being run more than once. Here is an example in C: void *allocate (void) { return (malloc(1000)); }
int main() { mtrace(); allocate(); allocate(); } The outp... | GLIBC: debugging memory leaks: how to interpret output of mtrace() I’m trying to debug a memory leak problem. I’m using mtrace() to get a malloc/free/realloc trace. I’ve ran my prog and have now a huge log file. So far so good. But I have problems interpreting the file. Look at these lines: @ /usr/java/ibm-java2-x86_64... | TITLE:
GLIBC: debugging memory leaks: how to interpret output of mtrace()
QUESTION:
I’m trying to debug a memory leak problem. I’m using mtrace() to get a malloc/free/realloc trace. I’ve ran my prog and have now a huge log file. So far so good. But I have problems interpreting the file. Look at these lines: @ /usr/jav... | [
"c",
"memory-leaks",
"glibc",
"mtrace"
] | 5 | 6 | 7,340 | 4 | 0 | 2008-09-30T16:50:30.813000 | 2008-10-03T21:07:33.183000 |
153,956 | 154,012 | Python GUI Application redistribution | I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't have a working Python installation and obviously don't ha... | http://wiki.wxpython.org/CreatingStandaloneExecutables It shouldn't be that large unless you have managed to include the debug build of wx. I seem to rememebr about 4Mb for the python.dll and similair for wx. | Python GUI Application redistribution I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't have a working Pyth... | TITLE:
Python GUI Application redistribution
QUESTION:
I need to develop a small-medium sized desktop GUI application, preferably with Python as a language of choice because of time constraints. What GUI library choices do I have which allow me to redistribute my application standalone, assuming that the users don't h... | [
"python",
"user-interface",
"wxpython",
"distribution",
"freeze"
] | 11 | 6 | 5,521 | 7 | 0 | 2008-09-30T16:50:38.440000 | 2008-09-30T17:03:57.567000 |
153,961 | 155,452 | Viewing a MOSS 2007 page as another user would see it - without logging in as that user | In Moss 2007 you have the ability to set the target audience for each individual web part within a page. Is there a way to preview how the page will look to another user without logging in as that user? What I am looking for is a way for someone with full control/design permissions on a site to be able to preview how t... | Edit: After re-reading the question I released that you want the users to be able to preview a page. I think you will need to look into writing a preview control that uses Impersonation to load the page. Not sure how feasible this is, but surely someone has created a preview feature. Sounds like a pretty common scenari... | Viewing a MOSS 2007 page as another user would see it - without logging in as that user In Moss 2007 you have the ability to set the target audience for each individual web part within a page. Is there a way to preview how the page will look to another user without logging in as that user? What I am looking for is a wa... | TITLE:
Viewing a MOSS 2007 page as another user would see it - without logging in as that user
QUESTION:
In Moss 2007 you have the ability to set the target audience for each individual web part within a page. Is there a way to preview how the page will look to another user without logging in as that user? What I am l... | [
"sharepoint",
"moss",
"target-audience"
] | 9 | 2 | 2,559 | 5 | 0 | 2008-09-30T16:51:04.323000 | 2008-09-30T22:48:10.047000 |
153,974 | 154,025 | Encapsulating an algorithm into a class | I'm wondering how (un)common it is to encapsulate an algorithm into a class? More concretely, instead of having a number of separate functions that forward common parameters between each other: void f(int common1, int param1, int *out1); void g(int common1, int common2, int param1, int *out2) { f(common1, param1,..); }... | It's not a bad strategy at all. In fact, if you have the ability in your language (which you do in C++) to define some type of abstract superclass which defines an opaque interface to the underlying functionality, you can swap different algorithms in and out at runtime (think sorting algorithms, for example). If your c... | Encapsulating an algorithm into a class I'm wondering how (un)common it is to encapsulate an algorithm into a class? More concretely, instead of having a number of separate functions that forward common parameters between each other: void f(int common1, int param1, int *out1); void g(int common1, int common2, int param... | TITLE:
Encapsulating an algorithm into a class
QUESTION:
I'm wondering how (un)common it is to encapsulate an algorithm into a class? More concretely, instead of having a number of separate functions that forward common parameters between each other: void f(int common1, int param1, int *out1); void g(int common1, int ... | [
"design-patterns",
"coding-style",
"class-design"
] | 12 | 5 | 5,050 | 6 | 0 | 2008-09-30T16:55:38.367000 | 2008-09-30T17:06:35.703000 |
153,983 | 154,002 | Are there any better command prompts for Windows? | For some reason the Windows command prompt is "special" in that you have to go to a properties dialog to resize it horizontally rather than just dragging the corner of the window like every other app. Unsurprisingly this feature made it into P-P-P-Powershell as well -- is there any way around this via command prompt re... | 2019 Update: Microsoft has released the terminal app on Github & the Windows Store, and it has tabs, panels, acrylic transparency, and other features. 2016 Update: Windows 10's default conhost UI has more features, including free resize, transparency, etc (this includes cmd & powershell) I now use ConEmu (walkthrough h... | Are there any better command prompts for Windows? For some reason the Windows command prompt is "special" in that you have to go to a properties dialog to resize it horizontally rather than just dragging the corner of the window like every other app. Unsurprisingly this feature made it into P-P-P-Powershell as well -- ... | TITLE:
Are there any better command prompts for Windows?
QUESTION:
For some reason the Windows command prompt is "special" in that you have to go to a properties dialog to resize it horizontally rather than just dragging the corner of the window like every other app. Unsurprisingly this feature made it into P-P-P-Powe... | [
"windows",
"command-line",
"cmd"
] | 32 | 31 | 7,916 | 8 | 0 | 2008-09-30T16:58:50.217000 | 2008-09-30T17:02:52.500000 |
153,988 | 154,071 | How can I copy data records between two instances of an SQLServer database | I need to copy some records from our SQLServer 2005 test server to our live server. It's a flat lookup table, so no foreign keys or other referential integrity to worry about. I could key-in the records again on the live server, but this is tiresome. I could export the test server records and table data in its entirety... | If your production SQL server and test SQL server can talk, you could just do in with a SQL insert statement. first run the following on your test server: Execute sp_addlinkedserver PRODUCTION_SERVER_NAME Then just create the insert statement: INSERT INTO [PRODUCTION_SERVER_NAME].DATABASE_NAME.dbo.TABLE_NAME (Names_of_... | How can I copy data records between two instances of an SQLServer database I need to copy some records from our SQLServer 2005 test server to our live server. It's a flat lookup table, so no foreign keys or other referential integrity to worry about. I could key-in the records again on the live server, but this is tire... | TITLE:
How can I copy data records between two instances of an SQLServer database
QUESTION:
I need to copy some records from our SQLServer 2005 test server to our live server. It's a flat lookup table, so no foreign keys or other referential integrity to worry about. I could key-in the records again on the live server... | [
"sql-server",
"database",
"sql-server-2005",
"copy"
] | 33 | 50 | 83,358 | 4 | 0 | 2008-09-30T17:00:16.827000 | 2008-09-30T17:20:40.397000 |
153,989 | 154,225 | How do I get the scroll position / range from a wx.TextCtrl control in wxPython | I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some issues with the scrolling behaviour. Basically, I'd like it so that if the scrollb... | I just tested a simple example (checking GetScrollPos(0) and GetScrollRange(0) in EVT_TEXT event handler for wx.TextCtrl ) and it works fine for me - they return index of currently shown line and total number of lines, respectively. Maybe the problem is your wxPython version? I used: >>> import wx >>> wx.version() '2.8... | How do I get the scroll position / range from a wx.TextCtrl control in wxPython I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but I'm having some is... | TITLE:
How do I get the scroll position / range from a wx.TextCtrl control in wxPython
QUESTION:
I have a little logging app (written in wxPython) that receives data from a bit of kit we're developing, and I want to display the text in a scrolling window. As it stands I'm using a wx.TextCtrl for the text display, but ... | [
"wxpython",
"scroll",
"wxwidgets",
"textctrl",
"wx.textctrl"
] | 1 | 1 | 9,002 | 2 | 0 | 2008-09-30T17:00:23.753000 | 2008-09-30T18:00:19.647000 |
153,994 | 154,340 | Generic type args which specificy the extending class? | I want to have a class which implements an interface, which specifies the specific subclass as a parameter. public abstract Task implements TaskStatus { TaskStatus listener;
protected complete() { // ugly, unsafe cast callback.complete((T) this); } }
public interface TaskStatus { public void complete(T task); } But i... | It is not clear what you are trying to do inside of Task. However, if you define the generic class Task as follows: class Task > {... } The following two are possible: class MyTask extends Task {... } class YourTask extends Task {... } But the following is prohibited: class MyTask extends Task {... } The above definiti... | Generic type args which specificy the extending class? I want to have a class which implements an interface, which specifies the specific subclass as a parameter. public abstract Task implements TaskStatus { TaskStatus listener;
protected complete() { // ugly, unsafe cast callback.complete((T) this); } }
public inter... | TITLE:
Generic type args which specificy the extending class?
QUESTION:
I want to have a class which implements an interface, which specifies the specific subclass as a parameter. public abstract Task implements TaskStatus { TaskStatus listener;
protected complete() { // ugly, unsafe cast callback.complete((T) this);... | [
"java",
"generics",
"design-patterns"
] | 5 | 4 | 1,967 | 4 | 0 | 2008-09-30T17:01:15.670000 | 2008-09-30T18:30:45.267000 |
153,996 | 154,050 | Respecting XP themes when designing WinForms UI | How do you deal with the different XP themes when designing a WinForms UI? Do you avoid hard coded color values or just accept that your UI will not look good on non standard themes? For instance, I have a light blue gradient panel that looks good against the standard control background color but would clash with other... | Avoid hex colors and colors with names like "White" or "Green". The color picker for most objects should be able to show you colors with names like "ActiveWindow" or "ForegroundText". Those are the colors you want to be using. They are available via code also, and you want to choose them so that the names have some rel... | Respecting XP themes when designing WinForms UI How do you deal with the different XP themes when designing a WinForms UI? Do you avoid hard coded color values or just accept that your UI will not look good on non standard themes? For instance, I have a light blue gradient panel that looks good against the standard con... | TITLE:
Respecting XP themes when designing WinForms UI
QUESTION:
How do you deal with the different XP themes when designing a WinForms UI? Do you avoid hard coded color values or just accept that your UI will not look good on non standard themes? For instance, I have a light blue gradient panel that looks good agains... | [
"winforms",
"user-interface"
] | 6 | 10 | 729 | 1 | 0 | 2008-09-30T17:01:52.563000 | 2008-09-30T17:12:21.883000 |
154,004 | 154,018 | Passing in a text to a javascript function that may have a single quote | I have a link that I dynamically create which looks something like the following: Edit with the Edit function then taking the passed in value and putting it into a Yahoo Rich Text Editor. This works well except for when there is a single quote in the text being passed. The obvious problem being that the link then looks... | Convert quote charaters to their HTML equivalents, " etc. before you insert them into the HTML. There's a long list of HTML/XML character codes on wikipedia. There may well be a function to do this for you, depending on how you're dynamically generating the code: PHP has htmlspecialchars, and though I'm not familiar wi... | Passing in a text to a javascript function that may have a single quote I have a link that I dynamically create which looks something like the following: Edit with the Edit function then taking the passed in value and putting it into a Yahoo Rich Text Editor. This works well except for when there is a single quote in t... | TITLE:
Passing in a text to a javascript function that may have a single quote
QUESTION:
I have a link that I dynamically create which looks something like the following: Edit with the Edit function then taking the passed in value and putting it into a Yahoo Rich Text Editor. This works well except for when there is a... | [
"javascript"
] | 3 | 14 | 11,426 | 5 | 0 | 2008-09-30T17:03:03.387000 | 2008-09-30T17:04:37.877000 |
154,013 | 154,027 | Why won't Django auto-escape my <script> tags? | My Django app has a Person table, which contains the following text in a field named details: When I call PersonForm.details in my template, the page renders the script accordingly (a.k.a., an alert with the word "Hello" is displayed). I'm confused by this behavior because I always thought Django 1.0 autoescaped templa... | You need to mark the values as | safe I think (I'm guessing that you're filling in the value from the database here(?)): {{ value|safe }} Could you post a sample of the template? Might make it easier to see what's wrong [Edit]..or are you saying that you want it to escape the values (make them safe)? Have you tried man... | Why won't Django auto-escape my <script> tags? My Django app has a Person table, which contains the following text in a field named details: When I call PersonForm.details in my template, the page renders the script accordingly (a.k.a., an alert with the word "Hello" is displayed). I'm confused by this behavior because... | TITLE:
Why won't Django auto-escape my <script> tags?
QUESTION:
My Django app has a Person table, which contains the following text in a field named details: When I call PersonForm.details in my template, the page renders the script accordingly (a.k.a., an alert with the word "Hello" is displayed). I'm confused by thi... | [
"django",
"templates"
] | 2 | 5 | 4,596 | 2 | 0 | 2008-09-30T17:04:01.357000 | 2008-09-30T17:06:54.190000 |
154,041 | 154,053 | How to turn on FastParse option in SSIS? | The book that I purchased to help with my SSIS understanding seems to have glossed over this, and I wanted to know exactly what is the method to turn on FastParse in SSIS? | To set fast parse (from here ) Right-click the Flat File source or Data Conversion transformation, and then click Show Advanced Editor. In the Advanced Editor dialog box, click the Input and Output Properties tab. In the Inputs and Outputs pane, click the column for which you want to enable fast parse. In the Propertie... | How to turn on FastParse option in SSIS? The book that I purchased to help with my SSIS understanding seems to have glossed over this, and I wanted to know exactly what is the method to turn on FastParse in SSIS? | TITLE:
How to turn on FastParse option in SSIS?
QUESTION:
The book that I purchased to help with my SSIS understanding seems to have glossed over this, and I wanted to know exactly what is the method to turn on FastParse in SSIS?
ANSWER:
To set fast parse (from here ) Right-click the Flat File source or Data Conversi... | [
"sql",
"sql-server",
"ssis"
] | 4 | 6 | 1,365 | 1 | 0 | 2008-09-30T17:09:48.160000 | 2008-09-30T17:14:02.707000 |
154,059 | 154,068 | How do I check for an empty/undefined/null string in JavaScript? | Is there a string.Empty in JavaScript, or is it just a case of checking for ""? | Empty string, undefined, null,... To check for a truthy value: if (strValue) { // strValue was non-empty string, true, 42, Infinity, [],... } To check for a falsy value: if (!strValue) { // strValue was empty string, false, 0, null, undefined,... } Empty string (only!) To check for exactly an empty string, compare for ... | How do I check for an empty/undefined/null string in JavaScript? Is there a string.Empty in JavaScript, or is it just a case of checking for ""? | TITLE:
How do I check for an empty/undefined/null string in JavaScript?
QUESTION:
Is there a string.Empty in JavaScript, or is it just a case of checking for ""?
ANSWER:
Empty string, undefined, null,... To check for a truthy value: if (strValue) { // strValue was non-empty string, true, 42, Infinity, [],... } To che... | [
"javascript",
"null",
"is-empty"
] | 4,015 | 4,953 | 5,475,355 | 55 | 0 | 2008-09-30T17:17:45.273000 | 2008-09-30T17:20:14.207000 |
154,060 | 708,982 | Overriding namespaces in gSOAP | I am using gSOAP as a Web Service toolkit and have generated the stub and proxy classes through soapcpp2 from multiple WSDL s all at once. Thus all the namespace bindings are in a single.nsmap file. Now the problem is that all the namespace bindings are being sent with all the method calls I make. The HTTP POST packet ... | Check soapcpp2 and its -q flag, it will help you. Other than that, the -penv flag will pack basic gSOAP-related methods within the executable, not including any service objects. Therefore the files generated with -penv can be shared across multiple namespaces, pertaining to different generated gSOAP Web Services. | Overriding namespaces in gSOAP I am using gSOAP as a Web Service toolkit and have generated the stub and proxy classes through soapcpp2 from multiple WSDL s all at once. Thus all the namespace bindings are in a single.nsmap file. Now the problem is that all the namespace bindings are being sent with all the method call... | TITLE:
Overriding namespaces in gSOAP
QUESTION:
I am using gSOAP as a Web Service toolkit and have generated the stub and proxy classes through soapcpp2 from multiple WSDL s all at once. Thus all the namespace bindings are in a single.nsmap file. Now the problem is that all the namespace bindings are being sent with a... | [
"c++",
"web-services",
"gsoap"
] | 1 | 3 | 2,997 | 1 | 0 | 2008-09-30T17:17:57.033000 | 2009-04-02T09:30:23.310000 |
154,064 | 154,133 | How to filter a report object when saving through FileDialog in MS Access | I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have: Set dlgSave = FileDialog(msoFileDialogSaveAs) With dlgSave.Title = "Provide the place to save this file".ButtonName = "Save As...".InitialFileName = Me.cmbPickAReportToPrint.Value & "-" & Format(Date... | I've found that the easiest way to do this without touching the report code itself is to open the report in preview mode with the filter applied, and then output the report to whatever format you need. If.Show Then DoCmd.OpenReport Me.cmbPickAReportToPrint.Value, acViewPreview,, "fieldToFilterOn = 'value'" DoCmd.Output... | How to filter a report object when saving through FileDialog in MS Access I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have: Set dlgSave = FileDialog(msoFileDialogSaveAs) With dlgSave.Title = "Provide the place to save this file".ButtonName = "Save A... | TITLE:
How to filter a report object when saving through FileDialog in MS Access
QUESTION:
I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have: Set dlgSave = FileDialog(msoFileDialogSaveAs) With dlgSave.Title = "Provide the place to save this file".Bu... | [
"ms-access",
"vba",
"report",
"filedialog"
] | 3 | 3 | 1,604 | 1 | 0 | 2008-09-30T17:18:13.180000 | 2008-09-30T17:36:03.513000 |
154,075 | 154,090 | Using the "start" command with parameters passed to the started program | I have a Virtual Machine in Virtual PC 2007. To start it from the desktop, I have the following command in a batch file: "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch But that leaves a dos prompt on the host machine until the virtual machine shuts down, and I exit out of the Virtual PC cons... | START has a peculiarity involving double quotes around the first parameter. If the first parameter has double quotes it uses that as the optional TITLE for the new window. I believe what you want is: start "" "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc MY-PC -launch In other words, give it an empty title... | Using the "start" command with parameters passed to the started program I have a Virtual Machine in Virtual PC 2007. To start it from the desktop, I have the following command in a batch file: "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch But that leaves a dos prompt on the host machine unt... | TITLE:
Using the "start" command with parameters passed to the started program
QUESTION:
I have a Virtual Machine in Virtual PC 2007. To start it from the desktop, I have the following command in a batch file: "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch But that leaves a dos prompt on th... | [
"windows",
"command-prompt"
] | 263 | 550 | 461,078 | 12 | 0 | 2008-09-30T17:21:11.300000 | 2008-09-30T17:25:33.193000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.