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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6,189,961 | 6,190,416 | @EJB dependency Injection doesn't work in JBoss AS 6 NullPointerException | public interface ModelClient { public JSONObject _callModel(URL url); }
@Stateless @Local(ModelClient.class) public class ModelClientBean implements ModelClient { public JSONObject _callModel(URL url) { /* some implementation */ } }
@Stateless(name="ejb/ModelServiceBean") public class ModelServiceBean {
@EJB private... | How do you get hold to an instance of ModelServiceBean? Injection only works when ModelServiceBean itself is injected into some managed bean (e.g. a Servlet, JSF Managed bean, etc) or when you request it via JNDI. Injection will not happen when you instantiate the class with the new operator. | @EJB dependency Injection doesn't work in JBoss AS 6 NullPointerException public interface ModelClient { public JSONObject _callModel(URL url); }
@Stateless @Local(ModelClient.class) public class ModelClientBean implements ModelClient { public JSONObject _callModel(URL url) { /* some implementation */ } }
@Stateless(... | TITLE:
@EJB dependency Injection doesn't work in JBoss AS 6 NullPointerException
QUESTION:
public interface ModelClient { public JSONObject _callModel(URL url); }
@Stateless @Local(ModelClient.class) public class ModelClientBean implements ModelClient { public JSONObject _callModel(URL url) { /* some implementation *... | [
"java",
"jakarta-ee",
"jboss",
"ejb",
"cdi"
] | 0 | 2 | 2,725 | 2 | 0 | 2011-05-31T15:32:23.737000 | 2011-05-31T16:09:41.253000 |
6,189,968 | 6,190,046 | Highlight links an corresponding images on hover | Working on a project an need a specific effect on the homepage. When a user hovers over the links in the nav the link is highlighted as well as the corresponding thumbnail on the page. Each of the links/thumbnails have classes an how we have it setup now is that on hover we search for the the element with the same clas... | i think you are complicating the event handler why just do it like this $("'#homeCatNav li a, #homeThumbsUlHolder li img").hover(mouseOver, mouseOut);
function mouseOver() { $thisClass = $(this).attr("class"); $('li.imgToHighlight').find('img'+'.'+$thisClass).addClass('hoverElem'); $('li.homeArtNameList').find('a'+'.'... | Highlight links an corresponding images on hover Working on a project an need a specific effect on the homepage. When a user hovers over the links in the nav the link is highlighted as well as the corresponding thumbnail on the page. Each of the links/thumbnails have classes an how we have it setup now is that on hover... | TITLE:
Highlight links an corresponding images on hover
QUESTION:
Working on a project an need a specific effect on the homepage. When a user hovers over the links in the nav the link is highlighted as well as the corresponding thumbnail on the page. Each of the links/thumbnails have classes an how we have it setup no... | [
"jquery",
"hover"
] | 0 | 0 | 588 | 2 | 0 | 2011-05-31T15:32:52.770000 | 2011-05-31T15:38:48.853000 |
6,189,969 | 6,190,165 | Get the index of a nested list item | I'm trying to get the index of a nested list. http://jsfiddle.net/5zJD8/12/ I've put an example up. At the moment when you click a list item you get this list item 0 list item 0 list item 1 list item 1 list item 2 I want it to do this: list item 0 list item 1 list item 2 list item 3 list item 4 Could someone point me i... | Try this: $('li').click( function() { var liIndex = $(this).index('li'); $(this).children().append(liIndex); }); http://jsfiddle.net/5zJD8/36/ you may look for more info here: http://api.jquery.com/index/ | Get the index of a nested list item I'm trying to get the index of a nested list. http://jsfiddle.net/5zJD8/12/ I've put an example up. At the moment when you click a list item you get this list item 0 list item 0 list item 1 list item 1 list item 2 I want it to do this: list item 0 list item 1 list item 2 list item 3 ... | TITLE:
Get the index of a nested list item
QUESTION:
I'm trying to get the index of a nested list. http://jsfiddle.net/5zJD8/12/ I've put an example up. At the moment when you click a list item you get this list item 0 list item 0 list item 1 list item 1 list item 2 I want it to do this: list item 0 list item 1 list i... | [
"javascript",
"jquery",
"list",
"indexing",
"nested-lists"
] | 0 | 2 | 1,336 | 2 | 0 | 2011-05-31T15:32:55.287000 | 2011-05-31T15:48:18.207000 |
6,189,970 | 6,190,012 | Convert NSNumbers into NSStrings | In the code below, I have a dictionary of NSNumbers that are turned into an Array. It is then randomly sorted and the first four rows need to be displayed in the appropriate labels. NSLog does show that the array displays the appropriate numbers. I believe the code fails because I need to convert the NSNumbers into NSS... | I believe the code fails because I need to convert the NSNumbers into NSStrings. you are right, try the following: NSString *one = [[exampleArray objectAtIndex:1] stringValue]; NSString *two = [[exampleArray objectAtIndex:2] stringValue]; NSString *three = [[exampleArray objectAtIndex:3] stringValue]; NSString *four = ... | Convert NSNumbers into NSStrings In the code below, I have a dictionary of NSNumbers that are turned into an Array. It is then randomly sorted and the first four rows need to be displayed in the appropriate labels. NSLog does show that the array displays the appropriate numbers. I believe the code fails because I need ... | TITLE:
Convert NSNumbers into NSStrings
QUESTION:
In the code below, I have a dictionary of NSNumbers that are turned into an Array. It is then randomly sorted and the first four rows need to be displayed in the appropriate labels. NSLog does show that the array displays the appropriate numbers. I believe the code fai... | [
"objective-c",
"nsstring",
"nsarray",
"nsdictionary",
"nsnumber"
] | 0 | 4 | 916 | 4 | 0 | 2011-05-31T15:32:58.170000 | 2011-05-31T15:36:29.260000 |
6,189,972 | 6,190,285 | Complex situations to deal with concerning DataContract in WCF | There are thousands of questions regarding DataContract (s) in WCF, with special attention for those situations where inheritance is involved. However I did not find no examples regarding particular situations all summarized in the one I am about to provide here. Consider the following DataContract applied to a type us... | Your issue may be solved in a much simpler way. No matter what kind of type you are using, all you need to do is, simply make it serializable. The simpler solution to it is make your sub classes as Data contracts themselves. For example if you have // Data contract for my comm type [DataContract] public class MyCommsTy... | Complex situations to deal with concerning DataContract in WCF There are thousands of questions regarding DataContract (s) in WCF, with special attention for those situations where inheritance is involved. However I did not find no examples regarding particular situations all summarized in the one I am about to provide... | TITLE:
Complex situations to deal with concerning DataContract in WCF
QUESTION:
There are thousands of questions regarding DataContract (s) in WCF, with special attention for those situations where inheritance is involved. However I did not find no examples regarding particular situations all summarized in the one I a... | [
".net",
"wcf",
"serialization",
"datacontract"
] | 1 | 4 | 1,368 | 1 | 0 | 2011-05-31T15:33:03.800000 | 2011-05-31T15:58:32.660000 |
6,189,976 | 6,190,066 | In place upgrade from SQL Server 2005 Enterprise to 2008 R2 express | I couldn't find this anywhere, so i thought I'd ask here. Can you do an in place upgrade from sql server 2005 enterprise to sql server 2008 r2 express? The reason i'm asking is because i've got a 2005 instance that is being upgraded to 2008 r2 to reduce our licenses/costs (the database fits on 2008 r2 express), and i w... | Here is a similar SO question: Importing Sql Server 2005 database into Sql Server express 2008 Basically, you can bring a 2005 database into SQL Server 2008 R2 Express as long as it conforms to the Express limitations (10GB database). However, the "in place" statement has me a bit confused. There is no upgrade path for... | In place upgrade from SQL Server 2005 Enterprise to 2008 R2 express I couldn't find this anywhere, so i thought I'd ask here. Can you do an in place upgrade from sql server 2005 enterprise to sql server 2008 r2 express? The reason i'm asking is because i've got a 2005 instance that is being upgraded to 2008 r2 to reduc... | TITLE:
In place upgrade from SQL Server 2005 Enterprise to 2008 R2 express
QUESTION:
I couldn't find this anywhere, so i thought I'd ask here. Can you do an in place upgrade from sql server 2005 enterprise to sql server 2008 r2 express? The reason i'm asking is because i've got a 2005 instance that is being upgraded t... | [
"sql-server",
"sql-server-2005",
"upgrade",
"sql-server-2008-express"
] | 1 | 0 | 2,645 | 1 | 0 | 2011-05-31T15:33:31.087000 | 2011-05-31T15:40:24.403000 |
6,189,987 | 6,190,040 | Setting margin in XAML for dynamically created WPF controls | I have a WPF that creates buttons dynamically when the form is loaded and adds them to a StackPanel that has been declared in XAML. I would like to define the style for these buttons completely in XAML inside the StackPanel.Resources. So far I am able to do this for Style properties just fine, but what I am having trou... | You state that "I know that Margin is a Thickness and cannot actually be applied in a style", this is not correct. Margins can be applied in XAML, the Thickness type has a type converter that can convert a string to a Thickness allowing you to define it as follows: | Setting margin in XAML for dynamically created WPF controls I have a WPF that creates buttons dynamically when the form is loaded and adds them to a StackPanel that has been declared in XAML. I would like to define the style for these buttons completely in XAML inside the StackPanel.Resources. So far I am able to do th... | TITLE:
Setting margin in XAML for dynamically created WPF controls
QUESTION:
I have a WPF that creates buttons dynamically when the form is loaded and adds them to a StackPanel that has been declared in XAML. I would like to define the style for these buttons completely in XAML inside the StackPanel.Resources. So far ... | [
"wpf",
"xaml",
"dynamic-controls",
"thickness"
] | 0 | 4 | 3,612 | 3 | 0 | 2011-05-31T15:34:10.103000 | 2011-05-31T15:38:19.510000 |
6,189,988 | 6,190,067 | Trying to create a method that can write to Console or Form application | I'm working on a general server and a client programs. The problem I'm facing is when I'm in the OnDataReceived in my client and server I don't know what to do with the data. Ideally it should output the received data into a window but I don't know if it will be a Form or Console application. So the question is how do ... | Your communication classes shouldn't care what happens to the data they receive. Instead, they should either make the data available to a class that wants it. One way to do so would be to provide a getData() method, which received data and then returned it to the caller. Even better would be to provide a DataArrived ev... | Trying to create a method that can write to Console or Form application I'm working on a general server and a client programs. The problem I'm facing is when I'm in the OnDataReceived in my client and server I don't know what to do with the data. Ideally it should output the received data into a window but I don't know... | TITLE:
Trying to create a method that can write to Console or Form application
QUESTION:
I'm working on a general server and a client programs. The problem I'm facing is when I'm in the OnDataReceived in my client and server I don't know what to do with the data. Ideally it should output the received data into a windo... | [
"c#",
"client",
"client-server"
] | 2 | 3 | 163 | 5 | 0 | 2011-05-31T15:34:12.023000 | 2011-05-31T15:40:26.387000 |
6,189,989 | 6,190,134 | Concatenate array of strings, and prepending another string with F# | I have a string array lines, for example lines = [| "hello"; "world" |] I'd like to make a string line that concatenates the elements in lines with "code=" string prepended. For example, I need to get the string code="helloworld" from the lines array. I could get the concatenated string with this code let concatenatedL... | + binds stronger than |>, so you need to add some parentheses: let concatenatedLine = "code=" + (lines |> String.concat "") Otherwise the compiler parses the expression like: let concatenatedLine = (("code=" + lines) |> (String.concat "")) ^^^^^^^^^^^^^^^ error FS0001 | Concatenate array of strings, and prepending another string with F# I have a string array lines, for example lines = [| "hello"; "world" |] I'd like to make a string line that concatenates the elements in lines with "code=" string prepended. For example, I need to get the string code="helloworld" from the lines array. ... | TITLE:
Concatenate array of strings, and prepending another string with F#
QUESTION:
I have a string array lines, for example lines = [| "hello"; "world" |] I'd like to make a string line that concatenates the elements in lines with "code=" string prepended. For example, I need to get the string code="helloworld" from... | [
"string",
"f#",
"concatenation"
] | 1 | 5 | 1,149 | 2 | 0 | 2011-05-31T15:34:13.317000 | 2011-05-31T15:46:12.280000 |
6,189,991 | 6,195,047 | how to refresh the item renderer of a flex datagrid after sorting? | I am using an itemRenderer for a column of datagird (to display the data in form a hyperlink in a certain fashion) inside action script. Everything works fine until I Sort any column of datagrid! When I do sort and I click the item inside this column it passes the wrong data to the function onCustomLink. I guess it is ... | I'm guessing a bit. I'm unclear exactly where the code snippet you provided shows up in your code. But, it sounds to me like your itemRenderer is not properly updating itself. The itemRenderer should listen to the dataChange event; which should be called when the dataProvider is sorted. Inside your renderer do somethin... | how to refresh the item renderer of a flex datagrid after sorting? I am using an itemRenderer for a column of datagird (to display the data in form a hyperlink in a certain fashion) inside action script. Everything works fine until I Sort any column of datagrid! When I do sort and I click the item inside this column it... | TITLE:
how to refresh the item renderer of a flex datagrid after sorting?
QUESTION:
I am using an itemRenderer for a column of datagird (to display the data in form a hyperlink in a certain fashion) inside action script. Everything works fine until I Sort any column of datagrid! When I do sort and I click the item ins... | [
"apache-flex",
"actionscript-3"
] | 2 | 4 | 10,025 | 2 | 0 | 2011-05-31T15:34:20.460000 | 2011-06-01T00:34:58.850000 |
6,190,001 | 6,190,934 | Spring 3 Security and Relative Redirect URLs | We have a Spring 3 app with Spring Security behind a Squid proxy. The issue is that Spring only knows about the internal squid url so after a successful login at example.com/login instead of redirecting to example.com/home it redirects to internal.example.com. Does anyone know how to deal with this situation? My Config... | I'm having web application with Spring security behind Apache HTTP Reverse proxy and some stupid application which behaves like you described above and the solution for us was to use mod_rewrite module http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html Anyway what are you saying is very weird because the correct Spr... | Spring 3 Security and Relative Redirect URLs We have a Spring 3 app with Spring Security behind a Squid proxy. The issue is that Spring only knows about the internal squid url so after a successful login at example.com/login instead of redirecting to example.com/home it redirects to internal.example.com. Does anyone kn... | TITLE:
Spring 3 Security and Relative Redirect URLs
QUESTION:
We have a Spring 3 app with Spring Security behind a Squid proxy. The issue is that Spring only knows about the internal squid url so after a successful login at example.com/login instead of redirecting to example.com/home it redirects to internal.example.c... | [
"java",
"spring",
"spring-security",
"squid"
] | 6 | 1 | 5,027 | 2 | 0 | 2011-05-31T15:34:57.137000 | 2011-05-31T16:57:51.513000 |
6,190,005 | 6,190,057 | java @action method parameters in netbeans | I have @Action for example: @Action public void example(String name){ //sth to do } and I would like to add this method to button generated in netbeans. When I click to Customize Code and write: myButton.setAction(example(myButton.getName())); I'm getting error: 'void' type not allowed here. Why I can't do like this?:/... | myButton.setAction is a function which expects an argument. example is a function which does not return anything. myButton.setAction(example(...)) passes the value returned by an invocation of example(...) to setAction. Do you see why that's a problem? | java @action method parameters in netbeans I have @Action for example: @Action public void example(String name){ //sth to do } and I would like to add this method to button generated in netbeans. When I click to Customize Code and write: myButton.setAction(example(myButton.getName())); I'm getting error: 'void' type no... | TITLE:
java @action method parameters in netbeans
QUESTION:
I have @Action for example: @Action public void example(String name){ //sth to do } and I would like to add this method to button generated in netbeans. When I click to Customize Code and write: myButton.setAction(example(myButton.getName())); I'm getting err... | [
"java",
"swing",
"netbeans"
] | 1 | 2 | 993 | 1 | 0 | 2011-05-31T15:35:36.140000 | 2011-05-31T15:39:39.307000 |
6,190,016 | 6,190,224 | LSDateFormat is generating default date of 12/30/1899... how to fix? | One of our databases has a page set up to print reports containing various geological information. The database in question is a FoxPro DB, and contains a date field which in FoxPro is formatted mm/dd/yy. There is a snippet of code in the report form #LSDateFormat(qLithHead.drill_date, "mm/dd/yyyy")# which is pulling t... | Coldfusion 9 has a isNull() function that returns a boolean: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0-3c4c0bb81223f1daffb-8000.html Or, if you are not running CF9, you could try: or to get rid of the ugly timestamp | LSDateFormat is generating default date of 12/30/1899... how to fix? One of our databases has a page set up to print reports containing various geological information. The database in question is a FoxPro DB, and contains a date field which in FoxPro is formatted mm/dd/yy. There is a snippet of code in the report form ... | TITLE:
LSDateFormat is generating default date of 12/30/1899... how to fix?
QUESTION:
One of our databases has a page set up to print reports containing various geological information. The database in question is a FoxPro DB, and contains a date field which in FoxPro is formatted mm/dd/yy. There is a snippet of code i... | [
"date",
"coldfusion",
"if-statement"
] | 0 | 1 | 824 | 1 | 0 | 2011-05-31T15:36:52.507000 | 2011-05-31T15:52:33.220000 |
6,190,017 | 6,190,365 | NUnit: is it possible to reference classes from my application? | I recently ran into a brick wall with Visual Studio 2008's testing framework: testing 64 bit dlls is not possible with VS 2008. I have a project that compiles to x64 only and I need to create some unit tests for the project and I can't use the VS2008 testing framework to do it. Subsequently, I downloaded the latest NUn... | How can I instantiate MyClass inside MyProjectTest? The normal way to do this is for your MyProjectTest project to contain a reference to MyProject But it seems most people don't like the idea of referencing an exe and hence would have MyClass defined in a third dll which is referenced by both the MyProject and MyProje... | NUnit: is it possible to reference classes from my application? I recently ran into a brick wall with Visual Studio 2008's testing framework: testing 64 bit dlls is not possible with VS 2008. I have a project that compiles to x64 only and I need to create some unit tests for the project and I can't use the VS2008 testi... | TITLE:
NUnit: is it possible to reference classes from my application?
QUESTION:
I recently ran into a brick wall with Visual Studio 2008's testing framework: testing 64 bit dlls is not possible with VS 2008. I have a project that compiles to x64 only and I need to create some unit tests for the project and I can't us... | [
"c#",
"unit-testing",
"testing",
"nunit",
"64-bit"
] | 2 | 4 | 565 | 2 | 0 | 2011-05-31T15:36:53.020000 | 2011-05-31T16:04:17.150000 |
6,190,018 | 6,190,118 | iPhone: Lock the UITableView and ControllerView | I have been using UITableView and UIController in every screen of my application. It is simple game application where I have every screen full of particular image at particular stage and hot area to enable the object selection. The most annoying part is even entire View has fill up with image, I am able to drag it up a... | Have you tried setting the scrollEnabled property to NO? You can access it through the tableView property of your UITableViewController. Preferred place where you can set it: -viewDidLoad. | iPhone: Lock the UITableView and ControllerView I have been using UITableView and UIController in every screen of my application. It is simple game application where I have every screen full of particular image at particular stage and hot area to enable the object selection. The most annoying part is even entire View h... | TITLE:
iPhone: Lock the UITableView and ControllerView
QUESTION:
I have been using UITableView and UIController in every screen of my application. It is simple game application where I have every screen full of particular image at particular stage and hot area to enable the object selection. The most annoying part is ... | [
"iphone",
"uitableview"
] | 0 | 1 | 884 | 3 | 0 | 2011-05-31T15:37:03.160000 | 2011-05-31T15:45:05.540000 |
6,190,019 | 6,190,160 | Split a rectangle into equal sized rectangles? | I need to split a rectangle (A CGRect structure which is {{float x,float y},{float w,float h}} ) into a number of smaller rectangles/structures, creating some sort of a grid. I'm writing a window layout manager and I want a window preview option. I saw similar questions but none of the algorithms I saw (the ones involv... | Based on your last comment, I assume that you want to split your rectangle into n subrectangles of equal size, and that they should be aligned in such a manner that the number of rows and number of columns are equal (with the last row possibly not being completely filled). If so, you can use ceil(sqrt(n)) to compute th... | Split a rectangle into equal sized rectangles? I need to split a rectangle (A CGRect structure which is {{float x,float y},{float w,float h}} ) into a number of smaller rectangles/structures, creating some sort of a grid. I'm writing a window layout manager and I want a window preview option. I saw similar questions bu... | TITLE:
Split a rectangle into equal sized rectangles?
QUESTION:
I need to split a rectangle (A CGRect structure which is {{float x,float y},{float w,float h}} ) into a number of smaller rectangles/structures, creating some sort of a grid. I'm writing a window layout manager and I want a window preview option. I saw si... | [
"c",
"cgrect"
] | 13 | 12 | 7,938 | 4 | 0 | 2011-05-31T15:37:05.297000 | 2011-05-31T15:47:38.367000 |
6,190,020 | 6,190,079 | creating an array of objects? | It seems like this question gets asked frequently, but having looked through all of them, I find I'm still without aid. I'm taking my first step into oop, and I need to create an object with an attribute "Products" that is an array of up to 7 possible objects of class "Product". I just just barely understand the {get;s... | In this case, I think you don't want an auto-implemented property. Instead, do it like this: //backing store for your public property private Product[] _products = new Product[7];
public Product[] Products { get {return _products;}} and then in the constructor: foreach(var item in _products) {item = new Product(); } Y... | creating an array of objects? It seems like this question gets asked frequently, but having looked through all of them, I find I'm still without aid. I'm taking my first step into oop, and I need to create an object with an attribute "Products" that is an array of up to 7 possible objects of class "Product". I just jus... | TITLE:
creating an array of objects?
QUESTION:
It seems like this question gets asked frequently, but having looked through all of them, I find I'm still without aid. I'm taking my first step into oop, and I need to create an object with an attribute "Products" that is an array of up to 7 possible objects of class "Pr... | [
"c#",
"asp.net"
] | 0 | 1 | 185 | 4 | 0 | 2011-05-31T15:37:08.557000 | 2011-05-31T15:41:28.027000 |
6,190,021 | 6,192,286 | Coalescing a tree of named profile samples into a top-down summation | I have an array of arrays of names that could be represented in Ruby like this: samples = [ %w[a], %w[a c], %w[a], %w[a], %w[b], %w[b], %w[a], %w[a e], %w[a e], %w[a c d], %w[a c d], %w[b], %w[b c e], %w[b c e], %w[a c], %w[a e], %w[a e] ] These are the output of a sampling profiler, where each list of names represents... | [edit] A recursive Tree class with functional programming (I use ostruct for the sake of simplicity): require 'ostruct'
class Tree < OpenStruct def self.new_from_array(plain) Tree.new(:node => "root",:count => 0,:children => children_from_array(plain)) end
def self.children_from_array(plain) plain.group_by(&:first).m... | Coalescing a tree of named profile samples into a top-down summation I have an array of arrays of names that could be represented in Ruby like this: samples = [ %w[a], %w[a c], %w[a], %w[a], %w[b], %w[b], %w[a], %w[a e], %w[a e], %w[a c d], %w[a c d], %w[b], %w[b c e], %w[b c e], %w[a c], %w[a e], %w[a e] ] These are t... | TITLE:
Coalescing a tree of named profile samples into a top-down summation
QUESTION:
I have an array of arrays of names that could be represented in Ruby like this: samples = [ %w[a], %w[a c], %w[a], %w[a], %w[b], %w[b], %w[a], %w[a e], %w[a e], %w[a c d], %w[a c d], %w[b], %w[b c e], %w[b c e], %w[a c], %w[a e], %w[... | [
"ruby",
"profiling"
] | 3 | 3 | 145 | 6 | 0 | 2011-05-31T15:37:11.337000 | 2011-05-31T19:07:16.167000 |
6,190,022 | 6,190,072 | SQL constraint to have one unique value in two columns | I need to assure that a value is unique in two columns (this is not a "two columns" index issue). Table A Column A1 Column A2
Memphis New York -> ok San Francisco Miami -> ok Washington Chicago -> ok Miami Las Vegas -> Forbidden! Miami already exists Is it possible? My example is with cities but don't focalize on that... | You need to add a constraint trigger that looks it up after insert/update. | SQL constraint to have one unique value in two columns I need to assure that a value is unique in two columns (this is not a "two columns" index issue). Table A Column A1 Column A2
Memphis New York -> ok San Francisco Miami -> ok Washington Chicago -> ok Miami Las Vegas -> Forbidden! Miami already exists Is it possibl... | TITLE:
SQL constraint to have one unique value in two columns
QUESTION:
I need to assure that a value is unique in two columns (this is not a "two columns" index issue). Table A Column A1 Column A2
Memphis New York -> ok San Francisco Miami -> ok Washington Chicago -> ok Miami Las Vegas -> Forbidden! Miami already ex... | [
"sql",
"constraints",
"unique",
"multiple-columns"
] | 4 | 2 | 821 | 2 | 0 | 2011-05-31T15:37:13.737000 | 2011-05-31T15:40:47.853000 |
6,190,042 | 6,190,188 | Fixed positioning without changing site width | I have a problem with two sides of my site, this is the link http://www.pagodamc.org When viewed in a decent resolution of say 1024*768, you don't have any overlap of the "sponsors" or the "announcements" portion of the page.(if you re size your browser, you'll see what I am referring to). However, if you re size the w... | I usually find a size that is as small as I can possibly let the site be, and then put a wrapper div around my main content with min-width: 60em; This way, the site will never compress below that size, and it's scalable (with em ). | Fixed positioning without changing site width I have a problem with two sides of my site, this is the link http://www.pagodamc.org When viewed in a decent resolution of say 1024*768, you don't have any overlap of the "sponsors" or the "announcements" portion of the page.(if you re size your browser, you'll see what I a... | TITLE:
Fixed positioning without changing site width
QUESTION:
I have a problem with two sides of my site, this is the link http://www.pagodamc.org When viewed in a decent resolution of say 1024*768, you don't have any overlap of the "sponsors" or the "announcements" portion of the page.(if you re size your browser, y... | [
"html",
"css"
] | 0 | 0 | 108 | 5 | 0 | 2011-05-31T15:38:30.570000 | 2011-05-31T15:50:10.593000 |
6,190,051 | 6,190,319 | How can I remove all objects but one from the workspace in R? | I have a workspace with lots of objects and I would like to remove all but one. Ideally I would like to avoid having to type rm(obj.1, obj.2... obj.n). Is it possible to indicate remove all objects but these ones? | Here is a simple construct that will do it, by using setdiff: rm(list=setdiff(ls(), "x")) And a full example. Run this at your own risk - it will remove all variables except x: x <- 1 y <- 2 z <- 3 ls() [1] "x" "y" "z"
rm(list=setdiff(ls(), "x"))
ls() [1] "x" | How can I remove all objects but one from the workspace in R? I have a workspace with lots of objects and I would like to remove all but one. Ideally I would like to avoid having to type rm(obj.1, obj.2... obj.n). Is it possible to indicate remove all objects but these ones? | TITLE:
How can I remove all objects but one from the workspace in R?
QUESTION:
I have a workspace with lots of objects and I would like to remove all but one. Ideally I would like to avoid having to type rm(obj.1, obj.2... obj.n). Is it possible to indicate remove all objects but these ones?
ANSWER:
Here is a simple ... | [
"r"
] | 294 | 504 | 225,589 | 14 | 0 | 2011-05-31T15:39:13.393000 | 2011-05-31T16:01:17.260000 |
6,190,052 | 6,190,084 | Increase font size in Xcode | How can I increase the font size in Xcode version 3.2.3 When I go to Edit -> Format -> Fonts -> Show Fonts and try to increase the font size, nothing happens. | You need to go to Xcode > Prefrences > Font and Color and change the font there. | Increase font size in Xcode How can I increase the font size in Xcode version 3.2.3 When I go to Edit -> Format -> Fonts -> Show Fonts and try to increase the font size, nothing happens. | TITLE:
Increase font size in Xcode
QUESTION:
How can I increase the font size in Xcode version 3.2.3 When I go to Edit -> Format -> Fonts -> Show Fonts and try to increase the font size, nothing happens.
ANSWER:
You need to go to Xcode > Prefrences > Font and Color and change the font there. | [
"xcode",
"fonts"
] | 10 | 14 | 15,574 | 4 | 0 | 2011-05-31T15:39:17.900000 | 2011-05-31T15:41:43.503000 |
6,190,053 | 6,190,472 | Saving an image out from beneath a mask from within a sprite | I've got a sprite object that gets a custom shape loaded into it, that gets used as a mask so as to cut out a custom shape from an image that is loaded in with a loader object - The loader(loada) and shape(lines) objects are both children of the sprite object - I've added code to save out the image from beneath the mas... | From what you've posted here, it looks like you're not calling the "load" function: urlLoader.load(saveJPG); | Saving an image out from beneath a mask from within a sprite I've got a sprite object that gets a custom shape loaded into it, that gets used as a mask so as to cut out a custom shape from an image that is loaded in with a loader object - The loader(loada) and shape(lines) objects are both children of the sprite object... | TITLE:
Saving an image out from beneath a mask from within a sprite
QUESTION:
I've got a sprite object that gets a custom shape loaded into it, that gets used as a mask so as to cut out a custom shape from an image that is loaded in with a loader object - The loader(loada) and shape(lines) objects are both children of... | [
"flash",
"actionscript-3"
] | 1 | 0 | 179 | 1 | 0 | 2011-05-31T15:39:29.807000 | 2011-05-31T16:14:17.120000 |
6,190,068 | 6,190,159 | Debug jboss app in Intellij idea | I am using intellij idea and jboss server. When I run it it works fine but when I debug it it gives me: ERROR: transport error 202: connect failed: Connection refused ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../... | Make sure the jboss vm is running with the parameters Idea shows in Debug dialog - specifically the port number seems incorrect to me. | Debug jboss app in Intellij idea I am using intellij idea and jboss server. When I run it it works fine but when I debug it it gives me: ERROR: transport error 202: connect failed: Connection refused ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197... | TITLE:
Debug jboss app in Intellij idea
QUESTION:
I am using intellij idea and jboss server. When I run it it works fine but when I debug it it gives me: ERROR: transport error 202: connect failed: Connection refused ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_... | [
"debugging",
"jboss",
"intellij-idea"
] | 4 | 1 | 5,915 | 4 | 0 | 2011-05-31T15:40:28.167000 | 2011-05-31T15:47:28.477000 |
6,190,073 | 6,190,375 | Custom UIButton Shape without using an image | I want to make a UIButton with that looks similar to the UIBackBarButtonItem (with an arrow pointing left for the navigation stack. I would prefer to do this without having to use an image if possible because the button will have a different size depending on the phone's orientation. Is there a way to active this affec... | You can do this with Quartz. You will need subclass UIButton and implement its drawRect: method. You will have to define a path and fill it with a gradient. You will also have to implement hitTest:withEvent: as it involves non-rectangular shape. | Custom UIButton Shape without using an image I want to make a UIButton with that looks similar to the UIBackBarButtonItem (with an arrow pointing left for the navigation stack. I would prefer to do this without having to use an image if possible because the button will have a different size depending on the phone's ori... | TITLE:
Custom UIButton Shape without using an image
QUESTION:
I want to make a UIButton with that looks similar to the UIBackBarButtonItem (with an arrow pointing left for the navigation stack. I would prefer to do this without having to use an image if possible because the button will have a different size depending ... | [
"iphone",
"uibutton",
"calayer",
"shapes"
] | 8 | 7 | 2,632 | 2 | 0 | 2011-05-31T15:40:49.507000 | 2011-05-31T16:05:20.647000 |
6,190,074 | 6,190,267 | Is there an elegant way to implement this template method- or strategy-like pattern in C#? | I am trying to decide the best way to structure some code. I will admit this may be overboard and is turning into something more academic than practical. Sometimes you just cannot help yourself. Let me contrive a simple example: Suppose you have classes/interfaces such as: interface IProcessedPhoto { }
interface IPhot... | You can use generics to bind the specific implementation of IProcessedPhoto to your IPhotoProcessor s: interface IPhotoProcessor where TProcessedPhoto: IProcessedPhoto {
TProcessedPhoto Process(byte[] bytes); void Alter(TProcessedPhoto processedPhoto);
}...
class AProcessor: IPhotoProcessor {... }
class BProcessor:... | Is there an elegant way to implement this template method- or strategy-like pattern in C#? I am trying to decide the best way to structure some code. I will admit this may be overboard and is turning into something more academic than practical. Sometimes you just cannot help yourself. Let me contrive a simple example: ... | TITLE:
Is there an elegant way to implement this template method- or strategy-like pattern in C#?
QUESTION:
I am trying to decide the best way to structure some code. I will admit this may be overboard and is turning into something more academic than practical. Sometimes you just cannot help yourself. Let me contrive ... | [
"c#",
"design-patterns"
] | 1 | 1 | 151 | 3 | 0 | 2011-05-31T15:40:53.393000 | 2011-05-31T15:56:31.940000 |
6,190,085 | 6,190,168 | Where can I load a view that needs to know the contents of an Ivar? | I am using a UIScrollView to create the illusion of lined paper behind my UITextView (I have to use a separate UIScrollView so I can have margins). In order to draw the paper with the correct number of lines, I need to pass it the contentSize.height of the UITextView. Here is what happens at the moment: the user select... | Simply try to set the property before pushing the child view controller. I assume that your code is something like in the parent view controller: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIViewController* childViewController =... [self.navigationController pushViewCo... | Where can I load a view that needs to know the contents of an Ivar? I am using a UIScrollView to create the illusion of lined paper behind my UITextView (I have to use a separate UIScrollView so I can have margins). In order to draw the paper with the correct number of lines, I need to pass it the contentSize.height of... | TITLE:
Where can I load a view that needs to know the contents of an Ivar?
QUESTION:
I am using a UIScrollView to create the illusion of lined paper behind my UITextView (I have to use a separate UIScrollView so I can have margins). In order to draw the paper with the correct number of lines, I need to pass it the con... | [
"iphone",
"cocoa-touch",
"uiscrollview",
"uitextview",
"viewwillappear"
] | 0 | 1 | 76 | 3 | 0 | 2011-05-31T15:41:43.830000 | 2011-05-31T15:48:30.317000 |
6,190,089 | 6,190,984 | Add buttons to push notification alert | Is there a way to set up how users see the push notifications alert box? My notifications are appearing without the view / cancel buttons, but i'm receiving others from different apps with those buttons. Is that a setting i should set before sending the push notification? Thanks! | There are two things going on in your question. First, you will see no buttons at all when you receive Apple Push Notification alerts and your screen is locked. All Apps will have just the Title and the Message of the Alert, without the buttons. If your phone is unlocked, you will see the buttons. Second, altering the ... | Add buttons to push notification alert Is there a way to set up how users see the push notifications alert box? My notifications are appearing without the view / cancel buttons, but i'm receiving others from different apps with those buttons. Is that a setting i should set before sending the push notification? Thanks! | TITLE:
Add buttons to push notification alert
QUESTION:
Is there a way to set up how users see the push notifications alert box? My notifications are appearing without the view / cancel buttons, but i'm receiving others from different apps with those buttons. Is that a setting i should set before sending the push noti... | [
"iphone",
"ios",
"push",
"push-notification",
"apple-push-notifications"
] | 4 | 7 | 19,749 | 2 | 0 | 2011-05-31T15:42:01.257000 | 2011-05-31T17:03:14.553000 |
6,190,091 | 6,190,230 | Finding the number of rows of each user in MYSQL | I have databases of users and each has tables. I want to loop through each user and find the number of rows of a particular table common to each. So i connect to the first DB(usersDB) and pick the names of other DB's from a table(userinfo) row(user_name). I then connect to each DB using the names obtained in userinfo a... | this may not be your issue but I noticed you arn't closing the connection to each database after you query from it. you should assign a variable to mysql_select_db and after you echo close the database like this: $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: ". mysql_error()); while($row = mysql... | Finding the number of rows of each user in MYSQL I have databases of users and each has tables. I want to loop through each user and find the number of rows of a particular table common to each. So i connect to the first DB(usersDB) and pick the names of other DB's from a table(userinfo) row(user_name). I then connect ... | TITLE:
Finding the number of rows of each user in MYSQL
QUESTION:
I have databases of users and each has tables. I want to loop through each user and find the number of rows of a particular table common to each. So i connect to the first DB(usersDB) and pick the names of other DB's from a table(userinfo) row(user_name... | [
"php",
"mysql"
] | 1 | 2 | 349 | 6 | 0 | 2011-05-31T15:42:23.317000 | 2011-05-31T15:52:48.150000 |
6,190,094 | 6,190,207 | Clear all elements of a carousel - Sencha | Dows anybody knows how to delete all elements on a carousel in sencha??? carousel = new Ext.Carousel({ fullscreen: true, defaults: { cls: 'carousel-item' }, items: [{ id:'tab-1', html: '', cls: 'card card1' },{ id:'tab-2', html: ' Clicking on either side of the indicators below ', cls: 'card card2' },{ id:'tab-3', html... | You can clear all the components inside your carousel with just a line of code: carousel.removeAll(); Hope this helps. | Clear all elements of a carousel - Sencha Dows anybody knows how to delete all elements on a carousel in sencha??? carousel = new Ext.Carousel({ fullscreen: true, defaults: { cls: 'carousel-item' }, items: [{ id:'tab-1', html: '', cls: 'card card1' },{ id:'tab-2', html: ' Clicking on either side of the indicators below... | TITLE:
Clear all elements of a carousel - Sencha
QUESTION:
Dows anybody knows how to delete all elements on a carousel in sencha??? carousel = new Ext.Carousel({ fullscreen: true, defaults: { cls: 'carousel-item' }, items: [{ id:'tab-1', html: '', cls: 'card card1' },{ id:'tab-2', html: ' Clicking on either side of th... | [
"extjs",
"carousel",
"items"
] | 4 | 5 | 2,763 | 1 | 0 | 2011-05-31T15:42:36.447000 | 2011-05-31T15:51:19.913000 |
6,190,108 | 6,190,203 | Python/Django debugging: print model's containing data | Maybe easy question but I don't know how to summarize it that I would find my answer. Is it possible to print out all available fields of model? For example in iPython I can import model and just write model name and tab will show all available fields the models have. Is it possible to do this in code without using som... | To check fields on a model I usually use?: >>> Person? Type: ModelBase Base Class: String Form: Namespace: Interactive File: /home/zk/ve/django/foo/bar/models.py Docstring: Person(id, first_name, last_name) You can also use help(). If you have an instance of the model you can look at __dict__: >>> [x for x in Person().... | Python/Django debugging: print model's containing data Maybe easy question but I don't know how to summarize it that I would find my answer. Is it possible to print out all available fields of model? For example in iPython I can import model and just write model name and tab will show all available fields the models ha... | TITLE:
Python/Django debugging: print model's containing data
QUESTION:
Maybe easy question but I don't know how to summarize it that I would find my answer. Is it possible to print out all available fields of model? For example in iPython I can import model and just write model name and tab will show all available fi... | [
"python",
"django",
"debugging",
"printing"
] | 33 | 24 | 40,621 | 6 | 0 | 2011-05-31T15:44:05.360000 | 2011-05-31T15:51:13.157000 |
6,190,113 | 6,190,186 | how to change interface metrics of network adapters using c#? | In relation to the link below https://stackoverflow.com/questions/5577406/enable-both-lan-intranet-and-usb-internet Is there a way to do it using a c# programmatically? | Here is a Code Project article that shows you how to do it: http://www.codeproject.com/KB/IP/winnetstat.aspx Basically, you use the IP Helper API and the SetIpForwardEntry method to accomplish this. Here is an article that walks you through how to implement it (with accompanying code): http://www.developer.com/ws/pc/ar... | how to change interface metrics of network adapters using c#? In relation to the link below https://stackoverflow.com/questions/5577406/enable-both-lan-intranet-and-usb-internet Is there a way to do it using a c# programmatically? | TITLE:
how to change interface metrics of network adapters using c#?
QUESTION:
In relation to the link below https://stackoverflow.com/questions/5577406/enable-both-lan-intranet-and-usb-internet Is there a way to do it using a c# programmatically?
ANSWER:
Here is a Code Project article that shows you how to do it: ht... | [
"c#",
"networking"
] | 1 | 1 | 3,461 | 2 | 0 | 2011-05-31T15:44:30.570000 | 2011-05-31T15:50:07.490000 |
6,190,120 | 6,190,214 | double.parse returning a precision difference | Why does double.parse ("1833.35") return value 1833.349999999999? | You could switch to using a decimal instead of a double if you need it to be absolutely correct. Decimal stores the number with a base 10 exponent. There is no way to represent.35 exactly using a double or float. | double.parse returning a precision difference Why does double.parse ("1833.35") return value 1833.349999999999? | TITLE:
double.parse returning a precision difference
QUESTION:
Why does double.parse ("1833.35") return value 1833.349999999999?
ANSWER:
You could switch to using a decimal instead of a double if you need it to be absolutely correct. Decimal stores the number with a base 10 exponent. There is no way to represent.35 e... | [
"c#"
] | 1 | 2 | 999 | 2 | 0 | 2011-05-31T15:45:10.070000 | 2011-05-31T15:51:47.413000 |
6,190,127 | 6,190,183 | How do I write logs and display them real-time in a Java Swing application? | I have created a GUI program that uses a class to perform some tasks. I would like to add logging in both the JFrame and the class. Logs should be kept in a file and displayed in a JTextArea concurrently. What is a convient solution for this? | Create a wrapper that updates your JTextArea logs via log4j, SLF4J or Apache Commons Logging or another logging framework public void log(String msg) { appendToJTextArea(msg); LOG.info(msg); } | How do I write logs and display them real-time in a Java Swing application? I have created a GUI program that uses a class to perform some tasks. I would like to add logging in both the JFrame and the class. Logs should be kept in a file and displayed in a JTextArea concurrently. What is a convient solution for this? | TITLE:
How do I write logs and display them real-time in a Java Swing application?
QUESTION:
I have created a GUI program that uses a class to perform some tasks. I would like to add logging in both the JFrame and the class. Logs should be kept in a file and displayed in a JTextArea concurrently. What is a convient so... | [
"java",
"swing",
"logging"
] | 3 | 7 | 11,665 | 3 | 0 | 2011-05-31T15:45:42.410000 | 2011-05-31T15:49:55.043000 |
6,190,128 | 6,203,410 | Configuring SVN repository in Amazon EC2 Ubuntu AMI | I've installed a subversion server in my Ubuntu AMI. I want to access it via svn+ssh with different users (not 'ubuntu' default user). So, I can create different user accounts with 'useradd', but I'm worried about security. I've used the 'ubuntu' user for other dev tasks, and I only need different users for subversion.... | The SVN book section on svnserve teaches how to setup svn+ssh authentication | Configuring SVN repository in Amazon EC2 Ubuntu AMI I've installed a subversion server in my Ubuntu AMI. I want to access it via svn+ssh with different users (not 'ubuntu' default user). So, I can create different user accounts with 'useradd', but I'm worried about security. I've used the 'ubuntu' user for other dev ta... | TITLE:
Configuring SVN repository in Amazon EC2 Ubuntu AMI
QUESTION:
I've installed a subversion server in my Ubuntu AMI. I want to access it via svn+ssh with different users (not 'ubuntu' default user). So, I can create different user accounts with 'useradd', but I'm worried about security. I've used the 'ubuntu' use... | [
"svn",
"ubuntu"
] | 0 | 1 | 2,393 | 1 | 0 | 2011-05-31T15:45:44.937000 | 2011-06-01T15:10:12.860000 |
6,190,132 | 6,190,288 | Automapper incorrectly populating parent/child structure | I have the following entity classes, which are mapped from virtually identical view model classes: public class Node { public IList Children { get; set; } public Node Parent { get; set; } public string Text { get; set; } }
public class Tree { public Node Root { get; set; } } Using the following view model structure Tr... | Mapper.CreateMap ().ForMember(dto => dto.Children, opt => opt.MapFrom(src => src.Children.Select(nodevm => Mapper.Map (nodevm)).ToList())).ForMember(dto => dto.Parent, opt => opt.MapFrom(src => Mapper.Map (src.Parent))).ForMember(dto => dto.Text, opt => opt.MapFrom(src => src.Text)); Something like that schould work as... | Automapper incorrectly populating parent/child structure I have the following entity classes, which are mapped from virtually identical view model classes: public class Node { public IList Children { get; set; } public Node Parent { get; set; } public string Text { get; set; } }
public class Tree { public Node Root { ... | TITLE:
Automapper incorrectly populating parent/child structure
QUESTION:
I have the following entity classes, which are mapped from virtually identical view model classes: public class Node { public IList Children { get; set; } public Node Parent { get; set; } public string Text { get; set; } }
public class Tree { p... | [
"c#",
"automapper"
] | 0 | 0 | 2,246 | 1 | 0 | 2011-05-31T15:46:00.647000 | 2011-05-31T15:59:03.777000 |
6,190,140 | 6,191,019 | jquery ui dialog box not showing | I'm trying to show a jquery dialog box with code like: var message = "Request processed successfully"; $(' '+message+' ').dialog({ buttons:{ 'Add More':function(){window.location='index.py?mode=Receivable&cm=Add';}, 'View All':function(){window.location='index.py?mode=Receivable&cm=Browse&freshLoad=1';} } }); The text,... | Lack of formatting in jQuery UI is usually due to bad or missing CSS. Make sure you have the jQuery UI CSS code and images included and the CSS file linked in your page. It should then work correctly. | jquery ui dialog box not showing I'm trying to show a jquery dialog box with code like: var message = "Request processed successfully"; $(' '+message+' ').dialog({ buttons:{ 'Add More':function(){window.location='index.py?mode=Receivable&cm=Add';}, 'View All':function(){window.location='index.py?mode=Receivable&cm=Brow... | TITLE:
jquery ui dialog box not showing
QUESTION:
I'm trying to show a jquery dialog box with code like: var message = "Request processed successfully"; $(' '+message+' ').dialog({ buttons:{ 'Add More':function(){window.location='index.py?mode=Receivable&cm=Add';}, 'View All':function(){window.location='index.py?mode=... | [
"jquery",
"jquery-ui",
"jquery-ui-dialog"
] | 0 | 0 | 4,341 | 2 | 0 | 2011-05-31T15:46:33.423000 | 2011-05-31T17:07:08.717000 |
6,190,143 | 6,190,213 | JavaScript Set Window selection | In JavaScript, there is a method window.getSelection(), that lets me get the current selection that the user has made. Is there a corresponding function, something like window.setSelection(), that will let me set, or clear, the current selection? | Maybe this will do it: window.selection.clear(); Crossbrowser version: if (window.getSelection) { if (window.getSelection().empty) { // Chrome window.getSelection().empty(); } else if (window.getSelection().removeAllRanges) { // Firefox window.getSelection().removeAllRanges(); } } else if (document.selection) { // IE? ... | JavaScript Set Window selection In JavaScript, there is a method window.getSelection(), that lets me get the current selection that the user has made. Is there a corresponding function, something like window.setSelection(), that will let me set, or clear, the current selection? | TITLE:
JavaScript Set Window selection
QUESTION:
In JavaScript, there is a method window.getSelection(), that lets me get the current selection that the user has made. Is there a corresponding function, something like window.setSelection(), that will let me set, or clear, the current selection?
ANSWER:
Maybe this wil... | [
"javascript",
"jquery",
"window",
"selection"
] | 24 | 10 | 24,719 | 4 | 0 | 2011-05-31T15:46:38.010000 | 2011-05-31T15:51:38.220000 |
6,190,147 | 6,190,371 | android market "Upload an .apk file" keeps failing, when trying to replace current apk | I have a draft apk, unpublished, up on the android market store and I've recently made a some fixes and minor enhancements. Every time, I try to 'replace' the current version, I get a terse message of "The server could not process your apk. Try again." towards the very end of download process. At first, I thought it mi... | I had the same problem last week. Just waited a few hours, and tried again. | android market "Upload an .apk file" keeps failing, when trying to replace current apk I have a draft apk, unpublished, up on the android market store and I've recently made a some fixes and minor enhancements. Every time, I try to 'replace' the current version, I get a terse message of "The server could not process yo... | TITLE:
android market "Upload an .apk file" keeps failing, when trying to replace current apk
QUESTION:
I have a draft apk, unpublished, up on the android market store and I've recently made a some fixes and minor enhancements. Every time, I try to 'replace' the current version, I get a terse message of "The server co... | [
"android",
"publish",
"apk"
] | 1 | 1 | 3,207 | 2 | 0 | 2011-05-31T15:46:51.380000 | 2011-05-31T16:04:57.450000 |
6,190,174 | 6,190,561 | structure implementation for linked list | When I was reading about Linked list, I came to know that the structure for linked list as Struct node{ Struct node *next; int value; } Why is the Struct node *next? Why cant it just be an integer pointer? Like below Struct node{ int *next; int value; } why can't this hold the next node's address? Can anyone please giv... | Why is the Struct node *next? Why cant it just be an integer pointer? Because then you would be pointing to the address of the next integer. This could be used to retrieve the value of the next int, but nothing more, so from there on onward, you would be stuck. By linking nodes together, which hold integer values, you ... | structure implementation for linked list When I was reading about Linked list, I came to know that the structure for linked list as Struct node{ Struct node *next; int value; } Why is the Struct node *next? Why cant it just be an integer pointer? Like below Struct node{ int *next; int value; } why can't this hold the n... | TITLE:
structure implementation for linked list
QUESTION:
When I was reading about Linked list, I came to know that the structure for linked list as Struct node{ Struct node *next; int value; } Why is the Struct node *next? Why cant it just be an integer pointer? Like below Struct node{ int *next; int value; } why can... | [
"data-structures"
] | 0 | 1 | 257 | 2 | 0 | 2011-05-31T15:48:46.810000 | 2011-05-31T16:22:27.260000 |
6,190,176 | 6,190,662 | Dynamic splash screens for my java application | I want to create a splash screen for my Java application. I managed to do this using the NetBeans default tool that allows me to put some image in. But i want to have something "live" there, such as a progress bar showing the status of application load, some dynamic text, etc. How do I do this? What are the things I ne... | The trick is to create a splash screen using swing and then invoke using Java reflection the method, which is in another.java file, that loades the application. When done loading, dispose your splash screen. After checking the code, you will understand how it works and now customize it your own way. Here is some code: ... | Dynamic splash screens for my java application I want to create a splash screen for my Java application. I managed to do this using the NetBeans default tool that allows me to put some image in. But i want to have something "live" there, such as a progress bar showing the status of application load, some dynamic text, ... | TITLE:
Dynamic splash screens for my java application
QUESTION:
I want to create a splash screen for my Java application. I managed to do this using the NetBeans default tool that allows me to put some image in. But i want to have something "live" there, such as a progress bar showing the status of application load, s... | [
"java",
"splash-screen"
] | 1 | 1 | 1,521 | 2 | 0 | 2011-05-31T15:49:10.757000 | 2011-05-31T16:32:16.853000 |
6,190,177 | 6,270,672 | When to use a cutom markup extension and when a type converter? | In Silverlight 5, when would it be most appropriate to use a custom markup extension over a type converter? Say for instance, I want to supply a text input which should be converted to ProperCase. Which of these two would be most appropriate for this scenario? | Your scenario calls for a Value converter, as it's semantically a value conversion. custom markup extension covers other cases: 1) The scenario can be done using existing binding options, but will lead to complicated/verbose binding expression (copy&past is your friend), and probably registering otherwise useless stati... | When to use a cutom markup extension and when a type converter? In Silverlight 5, when would it be most appropriate to use a custom markup extension over a type converter? Say for instance, I want to supply a text input which should be converted to ProperCase. Which of these two would be most appropriate for this scena... | TITLE:
When to use a cutom markup extension and when a type converter?
QUESTION:
In Silverlight 5, when would it be most appropriate to use a custom markup extension over a type converter? Say for instance, I want to supply a text input which should be converted to ProperCase. Which of these two would be most appropri... | [
"silverlight-5.0"
] | 0 | 1 | 154 | 1 | 0 | 2011-05-31T15:49:19.880000 | 2011-06-07T19:39:25.880000 |
6,190,182 | 6,190,316 | c# Form.Hide() vs. Form.Opacity = 0 | I was wondering if there are any gotchas for making a form completely transparent (as opposed to hiding it). For instance, I know that these are things that got my by surprise when hiding a form: If a form is hidden, you cannot interact with its controls (can't add HTML to a webbrowser control, can't push a button, etc... | From the up votes for my comment, I guess I'll submit it as an answer. I would discourage using Form.Opacity = 0. Even though you can disable the form to prevent accidental interaction, I would think the transparent form would overlay other windows and confuse the user as to why he can't interact with windows behind yo... | c# Form.Hide() vs. Form.Opacity = 0 I was wondering if there are any gotchas for making a form completely transparent (as opposed to hiding it). For instance, I know that these are things that got my by surprise when hiding a form: If a form is hidden, you cannot interact with its controls (can't add HTML to a webbrows... | TITLE:
c# Form.Hide() vs. Form.Opacity = 0
QUESTION:
I was wondering if there are any gotchas for making a form completely transparent (as opposed to hiding it). For instance, I know that these are things that got my by surprise when hiding a form: If a form is hidden, you cannot interact with its controls (can't add ... | [
"c#",
"winforms",
"user-interface",
"opacity"
] | 4 | 1 | 2,567 | 2 | 0 | 2011-05-31T15:49:31.533000 | 2011-05-31T16:00:49.007000 |
6,190,206 | 6,190,597 | Can chart control be used in VS 2010 while targeting 3.5? | I have visual studio 2010 and need to target 3.5. That part's no problem, but I need the chart control to work and the installer is choking, telling me "The Toolbox Controls Installer must be installed before running this installer." No luck so far on this. Any help would certainly be appreciated. | I just gave up on the installer gizmo and went for the hands-on approach. I right-clicked on the 'data' section of the toolbox, chose 'choose items', and selected the 3.5 chart controls. Seems to have worked. | Can chart control be used in VS 2010 while targeting 3.5? I have visual studio 2010 and need to target 3.5. That part's no problem, but I need the chart control to work and the installer is choking, telling me "The Toolbox Controls Installer must be installed before running this installer." No luck so far on this. Any ... | TITLE:
Can chart control be used in VS 2010 while targeting 3.5?
QUESTION:
I have visual studio 2010 and need to target 3.5. That part's no problem, but I need the chart control to work and the installer is choking, telling me "The Toolbox Controls Installer must be installed before running this installer." No luck so... | [
"asp.net",
"visual-studio-2010",
"asp.net-3.5",
"charts"
] | 2 | 5 | 2,948 | 1 | 0 | 2011-05-31T15:51:19.027000 | 2011-05-31T16:26:11.923000 |
6,190,211 | 6,190,584 | Connecting/Publishing to Facebook with FBConnect Works on Simulator, but not iPhone | I have implemented FBConnect into my iPhone App, and it works perfectly on the Simulator (v4.3). However, when I test the the same code on my iPhone (v4.3.3), it appears as though my Facebook Button now exits out of my application and opens the Facebook App. The Facebook App displays a page saying I have already author... | Have you had a look at the "Authentication and Authorization" section at https://github.com/facebook/facebook-ios-sdk? The difference between the simulator and your device is that your device has the Facebook app installed. If you didn't have the app installed, I'm guessing it would work perfectly because the authoriza... | Connecting/Publishing to Facebook with FBConnect Works on Simulator, but not iPhone I have implemented FBConnect into my iPhone App, and it works perfectly on the Simulator (v4.3). However, when I test the the same code on my iPhone (v4.3.3), it appears as though my Facebook Button now exits out of my application and o... | TITLE:
Connecting/Publishing to Facebook with FBConnect Works on Simulator, but not iPhone
QUESTION:
I have implemented FBConnect into my iPhone App, and it works perfectly on the Simulator (v4.3). However, when I test the the same code on my iPhone (v4.3.3), it appears as though my Facebook Button now exits out of my... | [
"facebook",
"ios-simulator",
"facebook-c#-sdk",
"fbconnect"
] | 1 | 2 | 1,015 | 1 | 0 | 2011-05-31T15:51:37.383000 | 2011-05-31T16:24:32.577000 |
6,190,240 | 6,190,308 | How can manual get ip address of a website throw Google DNS, OpenDNS... by send and receive packet | I want write a small program to get IP Address of some websites by manual send and receive data packet from Google DNS, Open DNS. How can help me. I wrote this but not work properly. public static void main(String args[]) throws Exception { String str="stackoverflow.com"; DatagramPacket dp=new DatagramPacket(str.getByt... | you will need to implement the DNS protocol -- a starting point could be https://www.rfc-editor.org/rfc/rfc1035 | How can manual get ip address of a website throw Google DNS, OpenDNS... by send and receive packet I want write a small program to get IP Address of some websites by manual send and receive data packet from Google DNS, Open DNS. How can help me. I wrote this but not work properly. public static void main(String args[])... | TITLE:
How can manual get ip address of a website throw Google DNS, OpenDNS... by send and receive packet
QUESTION:
I want write a small program to get IP Address of some websites by manual send and receive data packet from Google DNS, Open DNS. How can help me. I wrote this but not work properly. public static void m... | [
"java",
"sockets",
"dns",
"ip",
"packet"
] | 0 | 1 | 802 | 3 | 0 | 2011-05-31T15:53:51.490000 | 2011-05-31T15:59:58.847000 |
6,190,242 | 6,190,328 | Nhibernate 3 : Retrieve a list in a n-n relation | I have three tables: Tool, Color and ColorTool. ColorTool has 3 columns: the id (auto increment) and IdTool + IdColor. I have a List and my goal is to retrieve a List or a List (just the IdColor). My last try: var colorList = (from res in toolList select res.ToolColor.ToList()).ToList(); In this case colorList is a Lis... | How about from res in toolList from toolColor in res.ToolColor select toolColor.Color? | Nhibernate 3 : Retrieve a list in a n-n relation I have three tables: Tool, Color and ColorTool. ColorTool has 3 columns: the id (auto increment) and IdTool + IdColor. I have a List and my goal is to retrieve a List or a List (just the IdColor). My last try: var colorList = (from res in toolList select res.ToolColor.To... | TITLE:
Nhibernate 3 : Retrieve a list in a n-n relation
QUESTION:
I have three tables: Tool, Color and ColorTool. ColorTool has 3 columns: the id (auto increment) and IdTool + IdColor. I have a List and my goal is to retrieve a List or a List (just the IdColor). My last try: var colorList = (from res in toolList selec... | [
"nhibernate",
"linq-to-nhibernate"
] | 0 | 1 | 113 | 1 | 0 | 2011-05-31T15:53:55.203000 | 2011-05-31T16:01:54.030000 |
6,190,254 | 6,190,438 | Django 500 message in custom template | I have a 500.html template which gets loaded whenever my app explodes but I wanted to know if there's any way I can output the exception's message in the template? So if I do this: raise Exception("You broke it!") This will load 500.html when the DEBUG flag is set to True but how can I access the exception message in t... | Have a look at this answer: How do I include a stacktrace in my Django 500.html page? It's not good to pass the exception to your template/user as it might show some inside workings that you don't want available to the outside, but if you really need to, you could write your own 500 view, grabbing the exception and pas... | Django 500 message in custom template I have a 500.html template which gets loaded whenever my app explodes but I wanted to know if there's any way I can output the exception's message in the template? So if I do this: raise Exception("You broke it!") This will load 500.html when the DEBUG flag is set to True but how c... | TITLE:
Django 500 message in custom template
QUESTION:
I have a 500.html template which gets loaded whenever my app explodes but I wanted to know if there's any way I can output the exception's message in the template? So if I do this: raise Exception("You broke it!") This will load 500.html when the DEBUG flag is set... | [
"django",
"django-templates"
] | 10 | 19 | 9,048 | 2 | 0 | 2011-05-31T15:55:19.273000 | 2011-05-31T16:11:15.683000 |
6,190,270 | 6,190,419 | How can I add a 2nd serial integer key column to a table? (postgresql) | I have a table with 8440 records with a natural (string) primary key. Now I just discovered that to support a legacy client, I need the records to have integer keys as well. what's the easiest way to add a serial INT column to this table with a unique constraint and populate it with integer values from 1 to 8440? | Alter the table, add a new not null column of type serial, with a unique key on it. In Postgres, the serial type is a mere alias for the int type with a default value of nextval(some_sequence), the latter of which is created on the fly. | How can I add a 2nd serial integer key column to a table? (postgresql) I have a table with 8440 records with a natural (string) primary key. Now I just discovered that to support a legacy client, I need the records to have integer keys as well. what's the easiest way to add a serial INT column to this table with a uniq... | TITLE:
How can I add a 2nd serial integer key column to a table? (postgresql)
QUESTION:
I have a table with 8440 records with a natural (string) primary key. Now I just discovered that to support a legacy client, I need the records to have integer keys as well. what's the easiest way to add a serial INT column to this... | [
"postgresql"
] | 1 | 2 | 337 | 1 | 0 | 2011-05-31T15:56:49.397000 | 2011-05-31T16:10:03.110000 |
6,190,271 | 6,190,282 | How to run Photoviewer.dll in command line | When I run the following code below in a command prompt (as administrator): "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" "C:\00012.tif" it produces error as shown below: "This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed,... | rundll32 "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" "C:\00012.tif" For running a dll, there is rundll32. | How to run Photoviewer.dll in command line When I run the following code below in a command prompt (as administrator): "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" "C:\00012.tif" it produces error as shown below: "This file does not have a program associated with it for performing this action. Please install... | TITLE:
How to run Photoviewer.dll in command line
QUESTION:
When I run the following code below in a command prompt (as administrator): "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" "C:\00012.tif" it produces error as shown below: "This file does not have a program associated with it for performing this acti... | [
".net",
"windows-7",
"64-bit",
"tiff",
"photoviewer"
] | 19 | 13 | 55,102 | 4 | 0 | 2011-05-31T15:56:57.220000 | 2011-05-31T15:58:26.943000 |
6,190,276 | 6,190,361 | How to make return key on iPhone make keyboard disappear? | I have two UITextFields (e.g. username and password) but I cannot get rid of the keyboard when pressing the return key on the keyboard. How can I do this? | First you need to conform to the UITextFieldDelegate Protocol in your View/ViewController's header file like this: @interface YourViewController: UIViewController Then in your.m file you need to implement the following UITextFieldDelegate protocol method: - (BOOL)textFieldShouldReturn:(UITextField *)textField { [textFi... | How to make return key on iPhone make keyboard disappear? I have two UITextFields (e.g. username and password) but I cannot get rid of the keyboard when pressing the return key on the keyboard. How can I do this? | TITLE:
How to make return key on iPhone make keyboard disappear?
QUESTION:
I have two UITextFields (e.g. username and password) but I cannot get rid of the keyboard when pressing the return key on the keyboard. How can I do this?
ANSWER:
First you need to conform to the UITextFieldDelegate Protocol in your View/ViewC... | [
"ios",
"iphone",
"uitextfield",
"uikeyboard"
] | 107 | 241 | 117,552 | 14 | 0 | 2011-05-31T15:57:40.020000 | 2011-05-31T16:04:02.500000 |
6,190,278 | 6,190,391 | Why doesn't my ruby method call work? | When I use f.select onchange does not work for me, here is the code <%= f.select:media, Model::MEDIA_TYPES,:include_blank => true, {}, {:onchange => "function(this);"} %> A lot of functionality get messed up if I use this: <%= select_tag "media_type", options_for_select(Model::MEDIA_TYPES),:include_blank => true,:oncha... | I think, it should be: <%= f.select:media, Model::MEDIA_TYPES, {:include_blank => true}, {:onchange => "..."} %> | Why doesn't my ruby method call work? When I use f.select onchange does not work for me, here is the code <%= f.select:media, Model::MEDIA_TYPES,:include_blank => true, {}, {:onchange => "function(this);"} %> A lot of functionality get messed up if I use this: <%= select_tag "media_type", options_for_select(Model::MEDI... | TITLE:
Why doesn't my ruby method call work?
QUESTION:
When I use f.select onchange does not work for me, here is the code <%= f.select:media, Model::MEDIA_TYPES,:include_blank => true, {}, {:onchange => "function(this);"} %> A lot of functionality get messed up if I use this: <%= select_tag "media_type", options_for_... | [
"ruby-on-rails"
] | 0 | 0 | 80 | 2 | 0 | 2011-05-31T15:58:01.950000 | 2011-05-31T16:07:21.567000 |
6,190,300 | 6,190,508 | ASP.NET, Java, VB and AJAX | I have an ASP.NET application with a button that executes VB.NET on the server when clicked. Specs have changed, I've added a menu of sorts which is to replace the VB button. With some help from S.O., I've managed to manipulate some javascript which does a postback and executes the button's code. I figured I could just... | It's not obvious that you could just switch to Ajax from a postback scenario, whatever your boss tells you.:-) Lots of stuff might happen in a postback that you don't do in an Ajax call; setting other values serverside, changing visibility and such. It's hard to tell without seeing the actual code, though. The easiest ... | ASP.NET, Java, VB and AJAX I have an ASP.NET application with a button that executes VB.NET on the server when clicked. Specs have changed, I've added a menu of sorts which is to replace the VB button. With some help from S.O., I've managed to manipulate some javascript which does a postback and executes the button's c... | TITLE:
ASP.NET, Java, VB and AJAX
QUESTION:
I have an ASP.NET application with a button that executes VB.NET on the server when clicked. Specs have changed, I've added a menu of sorts which is to replace the VB button. With some help from S.O., I've managed to manipulate some javascript which does a postback and execu... | [
"javascript",
"asp.net",
"ajax",
"vb.net"
] | 0 | 0 | 222 | 1 | 0 | 2011-05-31T15:59:29.570000 | 2011-05-31T16:17:29.333000 |
6,190,301 | 6,190,558 | Cannot add a SQLCLR assembly to database, Msg 300 | I'm having trouble adding a SQLCLR assembly into a database, but a coworker of mine has no problem. Although we do have different levels of access, we can't figure out why I'm getting the error message that I'm getting. Here's my code: USE [mydatabase] GO
CREATE ASSEMBLY [My.Assembly] AUTHORIZATION [dbo] FROM 'C:\Prog... | I think you have a problem because the login is not a member of sysadmin. MSDN says, "If PERMISSION_SET = UNSAFE is specified, membership in the sysadmin fixed server role is required" Update As it was mentioned in the comment, it could be and should be done without assigning logins to sysadmin role. Unfortunately, I c... | Cannot add a SQLCLR assembly to database, Msg 300 I'm having trouble adding a SQLCLR assembly into a database, but a coworker of mine has no problem. Although we do have different levels of access, we can't figure out why I'm getting the error message that I'm getting. Here's my code: USE [mydatabase] GO
CREATE ASSEMB... | TITLE:
Cannot add a SQLCLR assembly to database, Msg 300
QUESTION:
I'm having trouble adding a SQLCLR assembly into a database, but a coworker of mine has no problem. Although we do have different levels of access, we can't figure out why I'm getting the error message that I'm getting. Here's my code: USE [mydatabase]... | [
"sql-server",
"sql-server-2008",
"permissions",
"sqlclr"
] | 7 | 2 | 5,713 | 3 | 0 | 2011-05-31T15:59:31.363000 | 2011-05-31T16:22:00.250000 |
6,190,303 | 6,190,339 | Does it matter if I have a "&" right after "?" in my url? | Does it matter if I have a "&" right after "?" in my url? For example: http://www.blah.com/blah.php?&key=23 Would any browser get stumped by that? Or, will every browser treat it as: http://www.blah.com/blah.php?key=23 Thanks. | It doesn't matter at all. You can even add as many & as you want, it won't affect the meaning of the URL as the server will remove unused ones and treats? semantically as a &. | Does it matter if I have a "&" right after "?" in my url? Does it matter if I have a "&" right after "?" in my url? For example: http://www.blah.com/blah.php?&key=23 Would any browser get stumped by that? Or, will every browser treat it as: http://www.blah.com/blah.php?key=23 Thanks. | TITLE:
Does it matter if I have a "&" right after "?" in my url?
QUESTION:
Does it matter if I have a "&" right after "?" in my url? For example: http://www.blah.com/blah.php?&key=23 Would any browser get stumped by that? Or, will every browser treat it as: http://www.blah.com/blah.php?key=23 Thanks.
ANSWER:
It doesn... | [
"url",
"get"
] | 2 | 1 | 371 | 2 | 0 | 2011-05-31T15:59:37.323000 | 2011-05-31T16:02:39.803000 |
6,190,304 | 6,191,335 | htaccess rewrite one file type with get variables | i think header is confusing, here is the situation. i host some video files and want to use on my website. but only on my website. if you realized facebook did this. but we dont have servers like them -nginx i guess-. finally i want to redirect all requests to a certain page. like that if someone request that http://ww... | RewriteCond %{QUERY_STRING} ^hash=(.*)$ RewriteRule ^(.*)/videos/(.*)$ /check.php?file=videos/$2 [R=302,L,QSA] Now your rewriteRule will only be applied if query string contains hash=xxxxx use R=301 if you want users to be redirected permanently | htaccess rewrite one file type with get variables i think header is confusing, here is the situation. i host some video files and want to use on my website. but only on my website. if you realized facebook did this. but we dont have servers like them -nginx i guess-. finally i want to redirect all requests to a certain... | TITLE:
htaccess rewrite one file type with get variables
QUESTION:
i think header is confusing, here is the situation. i host some video files and want to use on my website. but only on my website. if you realized facebook did this. but we dont have servers like them -nginx i guess-. finally i want to redirect all req... | [
"facebook",
".htaccess",
"mod-rewrite",
"video"
] | 0 | 0 | 465 | 1 | 0 | 2011-05-31T15:59:38.783000 | 2011-05-31T17:39:18.847000 |
6,190,307 | 6,190,351 | How do I iterate over a hash in JS and return all matching results? | I have the following piece of JS code within a function that responds to the user pressing enter (not displayed). The part of the code I am concerned with is shown: $.each(cityhash,function(key,value){ if(value['city']== user_input) { $('#city').empty().append(value['city']); $('#state').empty().append(value['city']); ... | You need to get rid of the empty() calls. You are clearing out #city/#state on each match. $('#city').append(value['city']); $('#state').append(value['state']); Also, you probably want to append the state name and not the city name to the #state element | How do I iterate over a hash in JS and return all matching results? I have the following piece of JS code within a function that responds to the user pressing enter (not displayed). The part of the code I am concerned with is shown: $.each(cityhash,function(key,value){ if(value['city']== user_input) { $('#city').empty(... | TITLE:
How do I iterate over a hash in JS and return all matching results?
QUESTION:
I have the following piece of JS code within a function that responds to the user pressing enter (not displayed). The part of the code I am concerned with is shown: $.each(cityhash,function(key,value){ if(value['city']== user_input) {... | [
"javascript",
"jquery",
"hash",
"each",
"loops"
] | 0 | 3 | 1,310 | 1 | 0 | 2011-05-31T15:59:57.557000 | 2011-05-31T16:03:10.193000 |
6,190,309 | 6,190,335 | Parsing in a String for a specific value | I am getting a return string from web service that I am calling. Now I want to look for specific value which should be present in that return string. Return string is something like this: pg_response_type=A pg_response_code=A01 pg_response_description=APPROVED endofdata Now I want to check in this string that if pg_res... | Simply use String.Contains: bool contains = response.Contains("pg_response_code=A01") | Parsing in a String for a specific value I am getting a return string from web service that I am calling. Now I want to look for specific value which should be present in that return string. Return string is something like this: pg_response_type=A pg_response_code=A01 pg_response_description=APPROVED endofdata Now I wa... | TITLE:
Parsing in a String for a specific value
QUESTION:
I am getting a return string from web service that I am calling. Now I want to look for specific value which should be present in that return string. Return string is something like this: pg_response_type=A pg_response_code=A01 pg_response_description=APPROVED ... | [
"c#",
"regex",
"string"
] | 0 | 6 | 160 | 2 | 0 | 2011-05-31T16:00:08.983000 | 2011-05-31T16:02:22.630000 |
6,190,312 | 6,190,431 | Validate currency amount using regular expressions in JavaScript | Possible Duplicate: What's a C# regular expression that'll validate currency, float or integer? How can I validate currency amount using regular expressions in JavaScript? Decimals separator:, Tens, hundreds, etc. separator:. Pattern: ###.###.###,## Examples of valid amounts: 1 1234 123456
1.234 123.456 1.234.567
1,2... | Based solely on the criteria you gave, this is what I came up with. /(?:^\d{1,3}(?:\.?\d{3})*(?:,\d{2})?$)|(?:^\d{1,3}(?:,?\d{3})*(?:\.\d{2})?$)/ Demo It is ugly, and it will only get worse as you find more cases that need to be matched. You'd be well served to find and use some validation library rather than try to do... | Validate currency amount using regular expressions in JavaScript Possible Duplicate: What's a C# regular expression that'll validate currency, float or integer? How can I validate currency amount using regular expressions in JavaScript? Decimals separator:, Tens, hundreds, etc. separator:. Pattern: ###.###.###,## Examp... | TITLE:
Validate currency amount using regular expressions in JavaScript
QUESTION:
Possible Duplicate: What's a C# regular expression that'll validate currency, float or integer? How can I validate currency amount using regular expressions in JavaScript? Decimals separator:, Tens, hundreds, etc. separator:. Pattern: ##... | [
"javascript",
"regex",
"currency"
] | 6 | 17 | 30,824 | 3 | 0 | 2011-05-31T16:00:24 | 2011-05-31T16:11:00.957000 |
6,190,318 | 6,191,603 | How to automatically show Title of the Entries/Articles in the Browser Title Bar in ExpressionEngine 2? | How would I output the title of an entry in ExpressionEngine and display it in the browser's title bar? Here is the content of my page's header: Test Site What I need is for each page to display the title of the entry in my browser's title bar — how can I achieve that? Part of UPDATED Code: Here is how i have done it: ... | If you want to show just the name of your ExpressionEngine site (as defined in CP Home > Admin > General Configuration) use the site name global variable: {site_name} If you want to display just the current entry title from a given channel use the following: {exp:channel:entries channel="channel_name" limit="1" dynamic... | How to automatically show Title of the Entries/Articles in the Browser Title Bar in ExpressionEngine 2? How would I output the title of an entry in ExpressionEngine and display it in the browser's title bar? Here is the content of my page's header: Test Site What I need is for each page to display the title of the entr... | TITLE:
How to automatically show Title of the Entries/Articles in the Browser Title Bar in ExpressionEngine 2?
QUESTION:
How would I output the title of an entry in ExpressionEngine and display it in the browser's title bar? Here is the content of my page's header: Test Site What I need is for each page to display the... | [
"expressionengine"
] | 3 | 6 | 2,747 | 4 | 0 | 2011-05-31T16:00:51.583000 | 2011-05-31T18:04:16.830000 |
6,190,323 | 6,190,397 | REST API question on how to handle collections as effective as possible while still conforming to the REST principles | Im pretty new to REST but as far as i have gathered i understand that the following URL's conform to the REST principles. Where the resources are laid out as follows: /user/ /library/book/ /tags ^ ^ ^ ^ |---------|-----------|---|- user resource with username as a variable |-----------|---|- many to one collection (boo... | This is strictly a design matter. I could define a bookc resource and use it like this: GET /user/dave/library/book?bookList=... how do you further specify the bookList argument is really a matter of what kind of usage you envisage of this resource. You could have, e.g.: GET /user/dave/library/book?bookList=1-10 GET /u... | REST API question on how to handle collections as effective as possible while still conforming to the REST principles Im pretty new to REST but as far as i have gathered i understand that the following URL's conform to the REST principles. Where the resources are laid out as follows: /user/ /library/book/ /tags ^ ^ ^ ^... | TITLE:
REST API question on how to handle collections as effective as possible while still conforming to the REST principles
QUESTION:
Im pretty new to REST but as far as i have gathered i understand that the following URL's conform to the REST principles. Where the resources are laid out as follows: /user/ /library/b... | [
"web-services",
"http",
"rest",
"design-principles"
] | 8 | 5 | 3,818 | 4 | 0 | 2011-05-31T16:01:22.610000 | 2011-05-31T16:07:59.493000 |
6,190,331 | 6,190,500 | How to implement an ordered, default dict? | I would like to combine OrderedDict() and defaultdict() from collections in one object, which shall be an ordered, default dict. Is this possible? | The following (using a modified version of this recipe ) works for me: from collections import OrderedDict, Callable
class DefaultOrderedDict(OrderedDict): # Source: http://stackoverflow.com/a/6190500/562769 def __init__(self, default_factory=None, *a, **kw): if (default_factory is not None and not isinstance(default_... | How to implement an ordered, default dict? I would like to combine OrderedDict() and defaultdict() from collections in one object, which shall be an ordered, default dict. Is this possible? | TITLE:
How to implement an ordered, default dict?
QUESTION:
I would like to combine OrderedDict() and defaultdict() from collections in one object, which shall be an ordered, default dict. Is this possible?
ANSWER:
The following (using a modified version of this recipe ) works for me: from collections import OrderedD... | [
"python",
"dictionary"
] | 224 | 100 | 78,533 | 11 | 0 | 2011-05-31T16:02:12.377000 | 2011-05-31T16:16:25.730000 |
6,190,343 | 6,190,877 | JTidy node processing | I'm using JTidy in order to parse web page data. My question is the following: It is possible to call the XPath.evalate method on a previously retrieved node? I'll explain better. Usually you use the xmlPath.evaluate(pattern, document, XPathConstants.NODE) method call to retrieve a list of nodes matching your xpath exp... | Yes, I think it is possible: URL url = new URL("http://www.w3.org");
// configure JTidy Tidy tidy = new Tidy(); tidy.setXHTML(true); tidy.setQuiet(true); tidy.setXmlOut(true); tidy.setShowWarnings(false);
Document doc = tidy.parseDOM(url.openConnection().getInputStream(), null); XPath xpath = XPathFactory.newInstance... | JTidy node processing I'm using JTidy in order to parse web page data. My question is the following: It is possible to call the XPath.evalate method on a previously retrieved node? I'll explain better. Usually you use the xmlPath.evaluate(pattern, document, XPathConstants.NODE) method call to retrieve a list of nodes m... | TITLE:
JTidy node processing
QUESTION:
I'm using JTidy in order to parse web page data. My question is the following: It is possible to call the XPath.evalate method on a previously retrieved node? I'll explain better. Usually you use the xmlPath.evaluate(pattern, document, XPathConstants.NODE) method call to retrieve... | [
"html",
"xml",
"parsing",
"jtidy"
] | 1 | 2 | 452 | 1 | 0 | 2011-05-31T16:02:46.200000 | 2011-05-31T16:52:03.377000 |
6,190,344 | 6,190,430 | A Connecting Program.cs And Form.cs | I have a function in my Form.cs that I want to summon in my program.cs But if the function is not static, program.cs can't use it. And if it's static, Form.cs can't use it because it involves controls which aren't static. I can delete my program.cs code and find a way to do the same in my form.cs but I was wondering if... | Why can't you access it from your program.cs? You can easily define a variable to hold the form, and then reference it: static class Program { // Any method can now access the form static Form1 MyForm;
[STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(fals... | A Connecting Program.cs And Form.cs I have a function in my Form.cs that I want to summon in my program.cs But if the function is not static, program.cs can't use it. And if it's static, Form.cs can't use it because it involves controls which aren't static. I can delete my program.cs code and find a way to do the same ... | TITLE:
A Connecting Program.cs And Form.cs
QUESTION:
I have a function in my Form.cs that I want to summon in my program.cs But if the function is not static, program.cs can't use it. And if it's static, Form.cs can't use it because it involves controls which aren't static. I can delete my program.cs code and find a w... | [
"c#",
"winforms",
"methods",
"static"
] | 5 | 7 | 16,282 | 3 | 0 | 2011-05-31T16:02:47.843000 | 2011-05-31T16:10:56.527000 |
6,190,345 | 6,190,427 | Setting Textarea text to properly formatted HTML code with jQuery | I am trying to generate the text for my Textarea thru Javascript (jQuery), because I have a variable in JS I need to include in there. This is what I do now: $("#txt_banner1").text( ' ') Now you are probably going to think: "Dude, format your code". well, thats the problem - I would like my textarea to contain my HTML ... | You could set the value of your txt_banner1 beforehand, and the just replace the producturl in the script: script: var text = $("#txt_banner1").text(); $("#txt_banner1").text(text.replace("MY_NEW_URL", producturl); | Setting Textarea text to properly formatted HTML code with jQuery I am trying to generate the text for my Textarea thru Javascript (jQuery), because I have a variable in JS I need to include in there. This is what I do now: $("#txt_banner1").text( ' ') Now you are probably going to think: "Dude, format your code". well... | TITLE:
Setting Textarea text to properly formatted HTML code with jQuery
QUESTION:
I am trying to generate the text for my Textarea thru Javascript (jQuery), because I have a variable in JS I need to include in there. This is what I do now: $("#txt_banner1").text( ' ') Now you are probably going to think: "Dude, forma... | [
"javascript",
"jquery",
"html",
"textarea",
"code-formatting"
] | 2 | 1 | 3,373 | 4 | 0 | 2011-05-31T16:02:50.113000 | 2011-05-31T16:10:31.767000 |
6,190,348 | 6,190,988 | Jinja2 ignore UndefinedErrors for objects that aren't found | I switched to Jinja from Django but a lot of my templates broke when referencing {{ entity.property }} if entity is not defined. Is there away to ignore the UndefinedErrors in certain situations, Otherwise I'll have to add in a lot of {% if entity %}{{ entity.property }}{% endif %} wrappers. Thanks, Richard | Jinja2 actually uses a special class for undefined entities. You can subclass this Undefined class from Jinja2 to include __getattr__ and other attribute accessors that you want to be able to use even on undefined entities and have them return a blank unicode string (for example). | Jinja2 ignore UndefinedErrors for objects that aren't found I switched to Jinja from Django but a lot of my templates broke when referencing {{ entity.property }} if entity is not defined. Is there away to ignore the UndefinedErrors in certain situations, Otherwise I'll have to add in a lot of {% if entity %}{{ entity.... | TITLE:
Jinja2 ignore UndefinedErrors for objects that aren't found
QUESTION:
I switched to Jinja from Django but a lot of my templates broke when referencing {{ entity.property }} if entity is not defined. Is there away to ignore the UndefinedErrors in certain situations, Otherwise I'll have to add in a lot of {% if e... | [
"python",
"jinja2"
] | 22 | 6 | 14,409 | 6 | 0 | 2011-05-31T16:03:03.720000 | 2011-05-31T17:03:31.777000 |
6,190,353 | 6,191,440 | Question about the implementation of page_address() | On x86 machines with highmem, when the kernel wants to query the kernel virtual address of a physical frame, it will use page_address. How it works depends on whether the macro WANT_PAGE_VIRTUAL is defined, which decides if void *virtual is added in struct page. If there is no void *virtual, the kernel will use a hash ... | Since there are a lot of struct page needed (one for every page!) it is very expensive to add even one more word to the structure (or conversely, shrinking the struct by even one word gives a lot of benefit). On 32-bit architectures WANT_PAGE_VIRTUAL is especially expensive -- without it, struct page is exactly 32 byte... | Question about the implementation of page_address() On x86 machines with highmem, when the kernel wants to query the kernel virtual address of a physical frame, it will use page_address. How it works depends on whether the macro WANT_PAGE_VIRTUAL is defined, which decides if void *virtual is added in struct page. If th... | TITLE:
Question about the implementation of page_address()
QUESTION:
On x86 machines with highmem, when the kernel wants to query the kernel virtual address of a physical frame, it will use page_address. How it works depends on whether the macro WANT_PAGE_VIRTUAL is defined, which decides if void *virtual is added in ... | [
"linux-kernel"
] | 5 | 7 | 716 | 1 | 0 | 2011-05-31T16:03:18.307000 | 2011-05-31T17:48:35.973000 |
6,190,366 | 6,190,555 | Latitude/Longitude Math Question (Distance Between Two Coordinates) | I currently have a database query that calculate the distance between every store in the database from there to a "home" location. I'm calculating the flight distance using this formula. http://www.movable-type.co.uk/scripts/latlong.html Then I'm ordering them and displaying them. I discovered a much better way to do i... | This method could work, but depending on how widely distributed your stores are, you may need to refine your bounds a bit because as you go up in latitute, you cross more longitude over a given distance. You may get too many or too few points just filtering by 0.05 deg for all latitudes. | Latitude/Longitude Math Question (Distance Between Two Coordinates) I currently have a database query that calculate the distance between every store in the database from there to a "home" location. I'm calculating the flight distance using this formula. http://www.movable-type.co.uk/scripts/latlong.html Then I'm order... | TITLE:
Latitude/Longitude Math Question (Distance Between Two Coordinates)
QUESTION:
I currently have a database query that calculate the distance between every store in the database from there to a "home" location. I'm calculating the flight distance using this formula. http://www.movable-type.co.uk/scripts/latlong.h... | [
"c#",
"database",
"math",
"optimization"
] | 0 | 1 | 1,551 | 2 | 0 | 2011-05-31T16:04:18.163000 | 2011-05-31T16:21:51.343000 |
6,190,367 | 6,190,822 | What is the best way to interface with a a program that uses filenames on the command line for input and output? | I need to interface with some executables that expect to be passed filenames for input or output:./helper in.txt out.txt What is the standard (and preferably cross-platform) way of doing this? I could create lots of temporary files int the /tmp directory, but I am concerned that creating tons of files might cause some ... | There isn't a right or wrong answer necessarily. Reading/writing to stdin/out is probably cleaner and doesn't use disk space. However, using temporary files is just fine too as long as you do it safely. Specifically, see the mktemp and mkstemp manual page for functions that let you create temporary files for short-term... | What is the best way to interface with a a program that uses filenames on the command line for input and output? I need to interface with some executables that expect to be passed filenames for input or output:./helper in.txt out.txt What is the standard (and preferably cross-platform) way of doing this? I could create... | TITLE:
What is the best way to interface with a a program that uses filenames on the command line for input and output?
QUESTION:
I need to interface with some executables that expect to be passed filenames for input or output:./helper in.txt out.txt What is the standard (and preferably cross-platform) way of doing th... | [
"c",
"process",
"pipe",
"temporary-files"
] | 2 | 2 | 85 | 1 | 0 | 2011-05-31T16:04:23.477000 | 2011-05-31T16:47:42.090000 |
6,190,381 | 6,217,429 | How to keep the client credentials confidential, while using OAuth2's Resource Owner Password Credentials grant type | We are building a rest service and we want to use OAauth 2 for authorization. The current draft (v2-16 from May 19th) describes four grant types. They are mechanisms or flows for obtaining authorization (an access token). Authorization Code Implicit Grant Resource Owner Credentials Client Credentials It seems we need t... | I'm facing similar issues, and am also relatively new to OAuth. I've implemented "Resource Owner Password Credentials" in our API for our official mobile app to use -- the web flows just seem like they'd be so horrible to use on a mobile platform, and once the user installs an app and trusts that it's our official app,... | How to keep the client credentials confidential, while using OAuth2's Resource Owner Password Credentials grant type We are building a rest service and we want to use OAauth 2 for authorization. The current draft (v2-16 from May 19th) describes four grant types. They are mechanisms or flows for obtaining authorization ... | TITLE:
How to keep the client credentials confidential, while using OAuth2's Resource Owner Password Credentials grant type
QUESTION:
We are building a rest service and we want to use OAauth 2 for authorization. The current draft (v2-16 from May 19th) describes four grant types. They are mechanisms or flows for obtain... | [
"security",
"oauth-2.0"
] | 78 | 58 | 21,541 | 1 | 0 | 2011-05-31T16:06:11.693000 | 2011-06-02T16:36:49.697000 |
6,190,385 | 6,190,420 | cmake doesn't display display message | Fedora 15 cmake version 2.8.4 I am using the following CMakeLists.txt. However the status message doesn't display when I run cmake. CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(proj2 C)
IF(CMAKE_COMPILER_IS_GNUCXX) MESSAGE(STATUS "==== GCC detected - Adding compiler flags") SET(CMAKE_C_FLAGS "-pthread -ggdb -Wextra -W... | You're telling cmake that it's a C project, and then checking for a CXX (i.e. C++) compiler. CMAKE_COMPILER_IS_GNUCXX will never be true in this case. That's why. | cmake doesn't display display message Fedora 15 cmake version 2.8.4 I am using the following CMakeLists.txt. However the status message doesn't display when I run cmake. CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(proj2 C)
IF(CMAKE_COMPILER_IS_GNUCXX) MESSAGE(STATUS "==== GCC detected - Adding compiler flags") SET(CM... | TITLE:
cmake doesn't display display message
QUESTION:
Fedora 15 cmake version 2.8.4 I am using the following CMakeLists.txt. However the status message doesn't display when I run cmake. CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(proj2 C)
IF(CMAKE_COMPILER_IS_GNUCXX) MESSAGE(STATUS "==== GCC detected - Adding compi... | [
"c",
"cmake"
] | 6 | 7 | 7,536 | 1 | 0 | 2011-05-31T16:06:38.100000 | 2011-05-31T16:10:06.810000 |
6,190,386 | 6,190,398 | How to get a readable "script" output? | When I run a python script I want to capture everything which is output on the screen. When I use the "script" command and capture the log in "typescript" file, the output in not readable when using vi. Its readable using | Try: python -u yourscript.py 1> log 2> err Or for appending python -u yourscript.py 1>> log 2>> err | How to get a readable "script" output? When I run a python script I want to capture everything which is output on the screen. When I use the "script" command and capture the log in "typescript" file, the output in not readable when using vi. Its readable using | TITLE:
How to get a readable "script" output?
QUESTION:
When I run a python script I want to capture everything which is output on the screen. When I use the "script" command and capture the log in "typescript" file, the output in not readable when using vi. Its readable using
ANSWER:
Try: python -u yourscript.py 1> ... | [
"linux"
] | 0 | 1 | 307 | 2 | 0 | 2011-05-31T16:06:44.280000 | 2011-05-31T16:08:07.813000 |
6,190,390 | 6,190,483 | Does anyone know why this Razor code is not compiling? | Could someone help me get this razor syntax snippet to compile? @var count = 0; @foreach (var column in Enumerable.Range(0, 20).Select(i => "Title " + i) { if(count % 5 == 0) { } @column @if(count % 5 == 4) { } count++; } | You do not need the count variable. I've made an alternative solution to Darin´s answer: @foreach (var pair in Enumerable.Range(0, 20).Select(i => new { Title = "Title " + i, Index = i })) { if(pair.Index % 5 == 0) { @: } @pair.Title if(pair.Index % 5 == 4) { @: } } As you can see in Darin´s answer and this answer, you... | Does anyone know why this Razor code is not compiling? Could someone help me get this razor syntax snippet to compile? @var count = 0; @foreach (var column in Enumerable.Range(0, 20).Select(i => "Title " + i) { if(count % 5 == 0) { } @column @if(count % 5 == 4) { } count++; } | TITLE:
Does anyone know why this Razor code is not compiling?
QUESTION:
Could someone help me get this razor syntax snippet to compile? @var count = 0; @foreach (var column in Enumerable.Range(0, 20).Select(i => "Title " + i) { if(count % 5 == 0) { } @column @if(count % 5 == 4) { } count++; }
ANSWER:
You do not need ... | [
"c#",
"asp.net-mvc-3",
"razor"
] | 2 | 4 | 2,211 | 2 | 0 | 2011-05-31T16:07:21.347000 | 2011-05-31T16:15:13.983000 |
6,190,417 | 6,190,446 | Change Home Wallpaper | I have a application that have a lot of images, and I want to programmatically do a random chanegs of images on my phone backgroind. Is it possible to change wallpaper on android? | Use a WallpaperManager. Also, you'll have to include this permission: | Change Home Wallpaper I have a application that have a lot of images, and I want to programmatically do a random chanegs of images on my phone backgroind. Is it possible to change wallpaper on android? | TITLE:
Change Home Wallpaper
QUESTION:
I have a application that have a lot of images, and I want to programmatically do a random chanegs of images on my phone backgroind. Is it possible to change wallpaper on android?
ANSWER:
Use a WallpaperManager. Also, you'll have to include this permission: | [
"android",
"background",
"wallpaper"
] | 1 | 6 | 730 | 1 | 0 | 2011-05-31T16:09:41.627000 | 2011-05-31T16:11:45.637000 |
6,190,418 | 6,190,452 | which is the easyer way :install ubuntu first and then windows 7 , or the other way around? | hy, i 'm currently formating my laptop and i ' thinking of installing ubuntu and window7.I know there are some problems with booting both.My question is which is the easy-er way:install ubuntu first and then windows 7, or the other way around? | I recommend using something like virtualbox to run virtual machines, then you can have a virtual linux development machine, and a virtual windows development machine, and your host system can be whatever you want, and optionally can be clean of any development related programs. | which is the easyer way :install ubuntu first and then windows 7 , or the other way around? hy, i 'm currently formating my laptop and i ' thinking of installing ubuntu and window7.I know there are some problems with booting both.My question is which is the easy-er way:install ubuntu first and then windows 7, or the ot... | TITLE:
which is the easyer way :install ubuntu first and then windows 7 , or the other way around?
QUESTION:
hy, i 'm currently formating my laptop and i ' thinking of installing ubuntu and window7.I know there are some problems with booting both.My question is which is the easy-er way:install ubuntu first and then wi... | [
"java",
"windows-7",
"ubuntu"
] | 0 | 0 | 391 | 1 | 0 | 2011-05-31T16:09:45.060000 | 2011-05-31T16:12:20.753000 |
6,190,423 | 6,190,742 | PHP Javascript/CSS Packaging Tool (like Haste/Juicer) | In this video: http://www.facebook.com/video/video.php?v=596368660334 Facebook talks about their implementation of Haste -- a CSS and Javascript packaging tool. Juicer seems to be very similar https://github.com/cjohansen/juicer/ Haste seems to be available onto Facebook engineers and Juicer is Ruby, I am looking for a... | I don't have time to watch the video, but it sounds like your looking for something like http://code.google.com/p/minify/ | PHP Javascript/CSS Packaging Tool (like Haste/Juicer) In this video: http://www.facebook.com/video/video.php?v=596368660334 Facebook talks about their implementation of Haste -- a CSS and Javascript packaging tool. Juicer seems to be very similar https://github.com/cjohansen/juicer/ Haste seems to be available onto Fac... | TITLE:
PHP Javascript/CSS Packaging Tool (like Haste/Juicer)
QUESTION:
In this video: http://www.facebook.com/video/video.php?v=596368660334 Facebook talks about their implementation of Haste -- a CSS and Javascript packaging tool. Juicer seems to be very similar https://github.com/cjohansen/juicer/ Haste seems to be ... | [
"php",
"javascript",
"css"
] | 2 | 2 | 1,037 | 2 | 0 | 2011-05-31T16:10:20.027000 | 2011-05-31T16:39:22.763000 |
6,190,435 | 6,190,562 | "Sphinx cannot be found on your system." when running "rake ts:index" | I'm setting up a new machine (OS X 10.6.7) to run a Rails app which uses ThinkingSphinx. I have followed the installation instructions, but I'm still getting the following: $ rake ts:index (in /Users/robert/Projects/Office/code/office) sh: line 1: 7050 Trace/BPT trap indexer 2>&1 sh: line 1: 7053 Trace/BPT trap indexer... | The sphinx indexing engine consists of a few binaries, for example for indexing, it uses an executable called "indexer". Try to set the values in config/sphinx.yml to the path where you installed sphinx, as suggested in the error message. | "Sphinx cannot be found on your system." when running "rake ts:index" I'm setting up a new machine (OS X 10.6.7) to run a Rails app which uses ThinkingSphinx. I have followed the installation instructions, but I'm still getting the following: $ rake ts:index (in /Users/robert/Projects/Office/code/office) sh: line 1: 70... | TITLE:
"Sphinx cannot be found on your system." when running "rake ts:index"
QUESTION:
I'm setting up a new machine (OS X 10.6.7) to run a Rails app which uses ThinkingSphinx. I have followed the installation instructions, but I'm still getting the following: $ rake ts:index (in /Users/robert/Projects/Office/code/offi... | [
"mysql",
"ruby-on-rails",
"thinking-sphinx"
] | 1 | 2 | 3,441 | 3 | 0 | 2011-05-31T16:11:10.520000 | 2011-05-31T16:22:35.887000 |
6,190,449 | 6,190,487 | Test if Login Failed in PHP | If user login attempt fails, I wanna write something under the login form like I do in Asp.NET (lblResult.Text = "Login Failed") Here is the Login for example: Username: Password: And if login fails, right under the form, "Login failed" kind of message should be shown but I don't know any other way besides adding the w... | Add something like this where you want the message: Login Failed Note, I'm using the alternative control structure syntax, which is slightly nicer than curly braces when writing spaghetti. | Test if Login Failed in PHP If user login attempt fails, I wanna write something under the login form like I do in Asp.NET (lblResult.Text = "Login Failed") Here is the Login for example: Username: Password: And if login fails, right under the form, "Login failed" kind of message should be shown but I don't know any ot... | TITLE:
Test if Login Failed in PHP
QUESTION:
If user login attempt fails, I wanna write something under the login form like I do in Asp.NET (lblResult.Text = "Login Failed") Here is the Login for example: Username: Password: And if login fails, right under the form, "Login failed" kind of message should be shown but I... | [
"php"
] | 1 | 6 | 3,761 | 4 | 0 | 2011-05-31T16:12:13.297000 | 2011-05-31T16:15:25.717000 |
6,190,456 | 6,190,891 | Polyfill for css :target, not(), and [tilde] sibling selectors? | I'd like to start using the css:target, not() and ~ sibling selectors now. Is there a polyfill or some other solution for these? I'd prefer to be able to simply use the css for them over using js/jQuery to simulate them for every use. | IE9.js polyfills everything you're looking for. http://ie7-js.googlecode.com/svn/test/index.html | Polyfill for css :target, not(), and [tilde] sibling selectors? I'd like to start using the css:target, not() and ~ sibling selectors now. Is there a polyfill or some other solution for these? I'd prefer to be able to simply use the css for them over using js/jQuery to simulate them for every use. | TITLE:
Polyfill for css :target, not(), and [tilde] sibling selectors?
QUESTION:
I'd like to start using the css:target, not() and ~ sibling selectors now. Is there a polyfill or some other solution for these? I'd prefer to be able to simply use the css for them over using js/jQuery to simulate them for every use.
AN... | [
"css",
"css-selectors",
"polyfills"
] | 3 | 5 | 3,513 | 2 | 0 | 2011-05-31T16:12:30.007000 | 2011-05-31T16:53:20.470000 |
6,190,468 | 6,192,298 | How to trigger function on value change? | I realise this question has to do with event-handling and i've read about Python event-handler a dispatchers, so either it did not answer my question or i completely missed out the information. I want method m() of object A to be triggered whenever value v is changing: For instance (assuming money makes happy): global_... | You need to use the Observer Pattern. In the following code, a person subscribes to receive updates from the global wealth entity. When there is a change to global wealth, this entity then alerts all its subscribers (observers) that a change happened. Person then updates itself. I make use of properties in this example... | How to trigger function on value change? I realise this question has to do with event-handling and i've read about Python event-handler a dispatchers, so either it did not answer my question or i completely missed out the information. I want method m() of object A to be triggered whenever value v is changing: For insta... | TITLE:
How to trigger function on value change?
QUESTION:
I realise this question has to do with event-handling and i've read about Python event-handler a dispatchers, so either it did not answer my question or i completely missed out the information. I want method m() of object A to be triggered whenever value v is c... | [
"python",
"event-handling",
"observer-pattern"
] | 91 | 128 | 119,520 | 6 | 0 | 2011-05-31T16:13:40.863000 | 2011-05-31T19:08:12.860000 |
6,190,471 | 6,190,596 | LINQ2Entities and Oracle: comparing on a String/nclob | I have an Entity called Product in Entity Framework which has a name field, which is of type String. This gets transformed to a NCLOB column in Oracle, by the Oracle Software I installed for Visual Studio. I am able to insert a few Products. Now I want to do for example a LINQ-query where I select a single Entity based... | You should harass Oracle about it. This should work. As long as it doesn't, their Entity Provider is broken. Apart from this showing how broken their EDM support is: Is it really required to have a name field of type nclob? Wouldn't a nvarchar be sufficient? | LINQ2Entities and Oracle: comparing on a String/nclob I have an Entity called Product in Entity Framework which has a name field, which is of type String. This gets transformed to a NCLOB column in Oracle, by the Oracle Software I installed for Visual Studio. I am able to insert a few Products. Now I want to do for exa... | TITLE:
LINQ2Entities and Oracle: comparing on a String/nclob
QUESTION:
I have an Entity called Product in Entity Framework which has a name field, which is of type String. This gets transformed to a NCLOB column in Oracle, by the Oracle Software I installed for Visual Studio. I am able to insert a few Products. Now I ... | [
"oracle",
"entity-framework",
"linq-to-entities",
"ora-00932"
] | 1 | 0 | 778 | 1 | 0 | 2011-05-31T16:14:16.900000 | 2011-05-31T16:26:07.847000 |
6,190,474 | 6,227,147 | How to disable Change Install Location button in packagemaker | I need to disable/not show a Change Install Location button in installer. How do I achieve it? Thanks | I disabled relocation for both items I would need to install and leaved in the package configuration install on system volume. This removed the Change Install Location button in installer | How to disable Change Install Location button in packagemaker I need to disable/not show a Change Install Location button in installer. How do I achieve it? Thanks | TITLE:
How to disable Change Install Location button in packagemaker
QUESTION:
I need to disable/not show a Change Install Location button in installer. How do I achieve it? Thanks
ANSWER:
I disabled relocation for both items I would need to install and leaved in the package configuration install on system volume. Th... | [
"macos",
"installation",
"packagemaker"
] | 0 | 0 | 507 | 1 | 0 | 2011-05-31T16:14:30.990000 | 2011-06-03T12:34:11.927000 |
6,190,478 | 6,190,533 | Array of THREADENTRY32 struct as function parameter causes C2061 | I want to add a method to my debugger which fills a THREADENTRY32 array with all threads of the process being currently debugged. For that, I want to use the method "EnumerateThreads" which I pass a THREADENTRY32 pointer which the function should fill out. However, I'm having trouble using a THREADENTRY32 pointer as a ... | try using: void EnumerateThreads(struct THREADENTRY32 *threadArray); this will inline forward declare the struct, however, you need the full definition from Tlhelp32.h where ever you access the members of the struct or use the sizeof operator. alternatively you need to declare the struct (by including the Tlhelp32.h ) ... | Array of THREADENTRY32 struct as function parameter causes C2061 I want to add a method to my debugger which fills a THREADENTRY32 array with all threads of the process being currently debugged. For that, I want to use the method "EnumerateThreads" which I pass a THREADENTRY32 pointer which the function should fill out... | TITLE:
Array of THREADENTRY32 struct as function parameter causes C2061
QUESTION:
I want to add a method to my debugger which fills a THREADENTRY32 array with all threads of the process being currently debugged. For that, I want to use the method "EnumerateThreads" which I pass a THREADENTRY32 pointer which the functi... | [
"c++",
"arrays",
"function",
"parameters",
"struct"
] | 0 | 1 | 361 | 1 | 0 | 2011-05-31T16:14:41.097000 | 2011-05-31T16:20:44.450000 |
6,190,482 | 6,190,514 | Google Maps api V3 update marker | I've got a map that loads. I want to add a marker that gets it's lat and long from text boxes, and I can't fathom it. Nothing happens when I click on the updatemap button. Here's my code so far: $(document).ready(function () { alert("Dom, dom dom dom dom");
var map; var marker;
function initialize() { var myLatlng = ... | Update Also, your global map reference is never set to the actual map instance since you shadow it with a local var same name. var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); This should be just map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); You're using la... | Google Maps api V3 update marker I've got a map that loads. I want to add a marker that gets it's lat and long from text boxes, and I can't fathom it. Nothing happens when I click on the updatemap button. Here's my code so far: $(document).ready(function () { alert("Dom, dom dom dom dom");
var map; var marker;
functi... | TITLE:
Google Maps api V3 update marker
QUESTION:
I've got a map that loads. I want to add a marker that gets it's lat and long from text boxes, and I can't fathom it. Nothing happens when I click on the updatemap button. Here's my code so far: $(document).ready(function () { alert("Dom, dom dom dom dom");
var map; v... | [
"jquery",
"google-maps-api-3"
] | 20 | 35 | 68,117 | 2 | 0 | 2011-05-31T16:15:08.350000 | 2011-05-31T16:18:29.893000 |
6,190,486 | 6,190,516 | SenTestingKit in Xcode 4: Asynchronous testing? | I have been searching for a way to use SenTestingKit to do some integration testing between my client-side code and our server. I haven't had any luck. It seems that once the code is run in a method, the object gets destroyed. This means that any asynchronous responses never call the selectors. Questions: Is there a wa... | Two options: switch to GHUnit, which actually contains support for waiting for asynchronous events narrow the design of your tests so that you can test things as they stand. E.g. test that your controller code causes a selector to be detached and run, and (separately) test that this selector does what it ought. If both... | SenTestingKit in Xcode 4: Asynchronous testing? I have been searching for a way to use SenTestingKit to do some integration testing between my client-side code and our server. I haven't had any luck. It seems that once the code is run in a method, the object gets destroyed. This means that any asynchronous responses ne... | TITLE:
SenTestingKit in Xcode 4: Asynchronous testing?
QUESTION:
I have been searching for a way to use SenTestingKit to do some integration testing between my client-side code and our server. I haven't had any luck. It seems that once the code is run in a method, the object gets destroyed. This means that any asynchr... | [
"objective-c",
"unit-testing",
"ocunit"
] | 11 | 9 | 7,342 | 5 | 0 | 2011-05-31T16:15:22.547000 | 2011-05-31T16:18:39.473000 |
6,190,491 | 6,190,604 | Oracle date comparisons | Say I have the following code Some Sql query... is followed by this condition AND EndDate < TO_DATE('02/14/2011','MM/DD/YY')+1 Is it that same as AND EndDate <= TO_DATE('02/14/2011','MM/DD/YY') | Note: I am assuming based on your to_date formatting that the EndDate is a date field and not a date/time data type. Both queries should return the same result set. Consider the following: --Substitue "EndDate" for SYSDATE for this exercise
-- Does "EndDate" occur before June 01, 2011? (Yes) SELECT 'TRUE' FROM DUAL WH... | Oracle date comparisons Say I have the following code Some Sql query... is followed by this condition AND EndDate < TO_DATE('02/14/2011','MM/DD/YY')+1 Is it that same as AND EndDate <= TO_DATE('02/14/2011','MM/DD/YY') | TITLE:
Oracle date comparisons
QUESTION:
Say I have the following code Some Sql query... is followed by this condition AND EndDate < TO_DATE('02/14/2011','MM/DD/YY')+1 Is it that same as AND EndDate <= TO_DATE('02/14/2011','MM/DD/YY')
ANSWER:
Note: I am assuming based on your to_date formatting that the EndDate is a ... | [
"sql",
"oracle10g"
] | 2 | 6 | 12,720 | 2 | 0 | 2011-05-31T16:15:38.993000 | 2011-05-31T16:26:37.633000 |
6,190,493 | 6,190,527 | How to make a Stacked Bar Chart? | I've got to implement a quick n dirty stacked bar chart with just DIV s and SPAN s, at the moment the idea I have in my head goes something like this: 5 4 3 2 1 However, this isn't working. Can someone put me right? I think I need to use position: absolute/relative and/or float here but everything is having little effe... | I would use divs instead of the spans and also give your divs height otherwise they will not be displayed. If you want div's to be lined horizontally then set the float:left; | How to make a Stacked Bar Chart? I've got to implement a quick n dirty stacked bar chart with just DIV s and SPAN s, at the moment the idea I have in my head goes something like this: 5 4 3 2 1 However, this isn't working. Can someone put me right? I think I need to use position: absolute/relative and/or float here but... | TITLE:
How to make a Stacked Bar Chart?
QUESTION:
I've got to implement a quick n dirty stacked bar chart with just DIV s and SPAN s, at the moment the idea I have in my head goes something like this: 5 4 3 2 1 However, this isn't working. Can someone put me right? I think I need to use position: absolute/relative and... | [
"html",
"css",
"css-position",
"positioning"
] | 1 | 2 | 3,326 | 3 | 0 | 2011-05-31T16:15:55.470000 | 2011-05-31T16:19:42.967000 |
6,190,494 | 6,190,526 | String variable out of context for use in HTML output | I'm trying to understand why the variable myUrl is out of context in the example below. What's the best way to handle this situation? Are there alternatives? The code is C# in an ASP.NET page. <% string myUrl = "http://www.website.com"; %> Home | It's because the <%= is being rendered before the script component. If you set myUrl in the code behind ( Page_Load or Init event) then it should come through into the page as you are expecting. Obviously, remove the variable declaration in the markup as well. | String variable out of context for use in HTML output I'm trying to understand why the variable myUrl is out of context in the example below. What's the best way to handle this situation? Are there alternatives? The code is C# in an ASP.NET page. <% string myUrl = "http://www.website.com"; %> Home | TITLE:
String variable out of context for use in HTML output
QUESTION:
I'm trying to understand why the variable myUrl is out of context in the example below. What's the best way to handle this situation? Are there alternatives? The code is C# in an ASP.NET page. <% string myUrl = "http://www.website.com"; %> Home
AN... | [
"c#",
"asp.net"
] | 3 | 2 | 292 | 2 | 0 | 2011-05-31T16:15:55.837000 | 2011-05-31T16:19:38.243000 |
6,190,496 | 6,190,766 | Haskell IO with interact and map | I am trying to produce an interactive Haskell program using the interact function with map. Here's what I get in ghci (as far as I can tell, that's the way all tutorials explain interact usage -- except the result). *Module> interact $ unlines. map (++ "!"). lines tteesstt! Note that what actually happens is that every... | The problem is that ghci changes the buffering mode to per-character. This is, that the program starts to process the code as soon as it is there. If you write this line into a file called foo.hs main = interact $ unlines. map (++ "!"). lines and run it using runhaskell foo.hs you will see that it works as expected, be... | Haskell IO with interact and map I am trying to produce an interactive Haskell program using the interact function with map. Here's what I get in ghci (as far as I can tell, that's the way all tutorials explain interact usage -- except the result). *Module> interact $ unlines. map (++ "!"). lines tteesstt! Note that wh... | TITLE:
Haskell IO with interact and map
QUESTION:
I am trying to produce an interactive Haskell program using the interact function with map. Here's what I get in ghci (as far as I can tell, that's the way all tutorials explain interact usage -- except the result). *Module> interact $ unlines. map (++ "!"). lines ttee... | [
"haskell",
"dictionary",
"io",
"buffering"
] | 6 | 10 | 1,437 | 2 | 0 | 2011-05-31T16:16:04.293000 | 2011-05-31T16:41:59.963000 |
6,190,510 | 6,190,523 | undeclared identifiers? | Keep getting errors with code, its a conversion from old VS to the 2010 version: #include #include #include #include #include using std::string;
#define CROSSOVER_RATE 0.7 #define MUTATION_RATE 0.001 #define POP_SIZE 100 //must be an even number #define CHROMO_LENGTH 300 #define GENE_LENGTH 4 #define MAX_ALLOWABLE_GEN... | Prefix every cin, cout ( std::cin, std::cout ) with std or declare using namespace std; at the beginning. // check to see if we have found any solutions (fitness will be 999) for (i=0; i | undeclared identifiers? Keep getting errors with code, its a conversion from old VS to the 2010 version: #include #include #include #include #include using std::string;
#define CROSSOVER_RATE 0.7 #define MUTATION_RATE 0.001 #define POP_SIZE 100 //must be an even number #define CHROMO_LENGTH 300 #define GENE_LENGTH 4 #... | TITLE:
undeclared identifiers?
QUESTION:
Keep getting errors with code, its a conversion from old VS to the 2010 version: #include #include #include #include #include using std::string;
#define CROSSOVER_RATE 0.7 #define MUTATION_RATE 0.001 #define POP_SIZE 100 //must be an even number #define CHROMO_LENGTH 300 #defi... | [
"c++",
"algorithm",
"visual-studio",
"genetic-algorithm"
] | 3 | 2 | 10,385 | 3 | 0 | 2011-05-31T16:17:54.403000 | 2011-05-31T16:19:18.223000 |
6,190,525 | 6,190,534 | How do I get the value of an object element inside an array? | I have the following array (print_r for formatting): $result = Array ( [link] => http://www.mysite.com/article/102758 [type] => Article [title] => Sweetbay, PepsiCo Round the Bases [user] => pmalinowska [date] => 1306512291 [node] => stdClass Object ( [id] => dbcd60fee884/node/102758 [nid] => 102758 [uid] => 13208 [tit... | Try $result[ "node" ]->created $result is an array while $result[ "node" ] is an object | How do I get the value of an object element inside an array? I have the following array (print_r for formatting): $result = Array ( [link] => http://www.mysite.com/article/102758 [type] => Article [title] => Sweetbay, PepsiCo Round the Bases [user] => pmalinowska [date] => 1306512291 [node] => stdClass Object ( [id] =>... | TITLE:
How do I get the value of an object element inside an array?
QUESTION:
I have the following array (print_r for formatting): $result = Array ( [link] => http://www.mysite.com/article/102758 [type] => Article [title] => Sweetbay, PepsiCo Round the Bases [user] => pmalinowska [date] => 1306512291 [node] => stdClas... | [
"php",
"arrays"
] | 6 | 7 | 11,349 | 4 | 0 | 2011-05-31T16:19:29.597000 | 2011-05-31T16:20:45.790000 |
6,190,530 | 6,198,896 | @PayloadRoot value when using Objects and not schema xml | I'm using Objects as messages from client to service server. How should the endpoint be configured so that the service would be found? @PayloadRoot seems unfitting here because i don't use xml schema but Objects annotated with @XmlRootElement (i.e. Street) my code: the spring-ws-servlet.xml the client: public class Spr... | Found out how to do it. Had to make several fixes. Most importantly @XmlRootElement name and namespace attributes are required in my case. So the working code is: test.xsd TestRequest.java package com.coral.project.entity;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="TestRequest",namespace="... | @PayloadRoot value when using Objects and not schema xml I'm using Objects as messages from client to service server. How should the endpoint be configured so that the service would be found? @PayloadRoot seems unfitting here because i don't use xml schema but Objects annotated with @XmlRootElement (i.e. Street) my cod... | TITLE:
@PayloadRoot value when using Objects and not schema xml
QUESTION:
I'm using Objects as messages from client to service server. How should the endpoint be configured so that the service would be found? @PayloadRoot seems unfitting here because i don't use xml schema but Objects annotated with @XmlRootElement (i... | [
"spring-ws"
] | 5 | 4 | 10,338 | 2 | 0 | 2011-05-31T16:20:04.340000 | 2011-06-01T09:21:06.910000 |
6,190,531 | 6,190,592 | IF DEFINED for more than one variables? | Currently I am doing this in my batch file and it works fine IF DEFINED var1 (do something) ELSE (do something else) Now I want to check more than one variables are defined or not with an AND operator between them. How can I achieve that? for example something like IF DEFINED(var1) && DEFINED(var2) (do something) ELSE ... | Nest your second if inside the (do something) IF DEFINED var1 (**IF DEFINED var2 (do something) ELSE (do something else)**) ELSE (do something else) | IF DEFINED for more than one variables? Currently I am doing this in my batch file and it works fine IF DEFINED var1 (do something) ELSE (do something else) Now I want to check more than one variables are defined or not with an AND operator between them. How can I achieve that? for example something like IF DEFINED(var... | TITLE:
IF DEFINED for more than one variables?
QUESTION:
Currently I am doing this in my batch file and it works fine IF DEFINED var1 (do something) ELSE (do something else) Now I want to check more than one variables are defined or not with an AND operator between them. How can I achieve that? for example something l... | [
"scripting",
"batch-file"
] | 0 | 0 | 135 | 2 | 0 | 2011-05-31T16:20:36.697000 | 2011-05-31T16:25:37.597000 |
6,190,536 | 6,190,626 | server - client communication | I am writing a network C program where a client sends a block of data to a server, and I want to make sure that all data have been read by the server before I close the socket from the client side. I thought of sending a special 'ok' character back from the server to the client, but I am thinking that if something wron... | I want to make sure that all data have been read by the server b* efore I close the socket from the client side *. If you are using TCP consider this: once you send the data, even if you close the socket / exit the program, the TCP stack will continue to do its best to send it. Once you send / write the data, it's gone... | server - client communication I am writing a network C program where a client sends a block of data to a server, and I want to make sure that all data have been read by the server before I close the socket from the client side. I thought of sending a special 'ok' character back from the server to the client, but I am t... | TITLE:
server - client communication
QUESTION:
I am writing a network C program where a client sends a block of data to a server, and I want to make sure that all data have been read by the server before I close the socket from the client side. I thought of sending a special 'ok' character back from the server to the ... | [
"c",
"sockets"
] | 1 | 1 | 226 | 6 | 0 | 2011-05-31T16:20:59.643000 | 2011-05-31T16:29:00.567000 |
6,190,539 | 6,190,686 | How can I correct my code to return all matching cities separate div's? | I have the following piece of JS code within a function that responds to the user pressing enter (not displayed). The part of the code I am concerned with is shown: $.each(cityhash,function(key,value){ if(value['city']== user_input) { $('#city').append(value['city']); $('#state').append(value['state']); } I have the fo... | Instead of setting the city text in an element with id="city", I would make an element with id="cities" and then append the city elements inside of that. $('#cities').append(' ' + value['city'] + ', ' + value['state'] + ' '); | How can I correct my code to return all matching cities separate div's? I have the following piece of JS code within a function that responds to the user pressing enter (not displayed). The part of the code I am concerned with is shown: $.each(cityhash,function(key,value){ if(value['city']== user_input) { $('#city').ap... | TITLE:
How can I correct my code to return all matching cities separate div's?
QUESTION:
I have the following piece of JS code within a function that responds to the user pressing enter (not displayed). The part of the code I am concerned with is shown: $.each(cityhash,function(key,value){ if(value['city']== user_inpu... | [
"javascript",
"jquery",
"html",
"hash",
"loops"
] | 0 | 2 | 92 | 3 | 0 | 2011-05-31T16:21:03.187000 | 2011-05-31T16:34:00.073000 |
6,190,541 | 6,190,618 | Rails open OpenSLL error on: Rails g jquery:install | I am getting a OpenSSL error, when I try when I run rails g jquery:install. My rails console: C:\Rails\konkurranceportalen>rails g jquery:install remove public/javascripts/controls.js remove public/javascripts/dragdrop.js remove public/javascripts/effects.js remove public/javascripts/prototype.js fetching jQuery (1.5) ... | Here is an issue discussing something similar. Assembler says the following: for quickfix, add following lines to "environment.rb": require 'openssl' OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE make sure that you remove those lines after you install jquery-rails | Rails open OpenSLL error on: Rails g jquery:install I am getting a OpenSSL error, when I try when I run rails g jquery:install. My rails console: C:\Rails\konkurranceportalen>rails g jquery:install remove public/javascripts/controls.js remove public/javascripts/dragdrop.js remove public/javascripts/effects.js remove pu... | TITLE:
Rails open OpenSLL error on: Rails g jquery:install
QUESTION:
I am getting a OpenSSL error, when I try when I run rails g jquery:install. My rails console: C:\Rails\konkurranceportalen>rails g jquery:install remove public/javascripts/controls.js remove public/javascripts/dragdrop.js remove public/javascripts/ef... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3"
] | 0 | 1 | 184 | 1 | 0 | 2011-05-31T16:21:11.050000 | 2011-05-31T16:28:14.777000 |
6,190,542 | 6,190,659 | What is the effect of creating a folder, is it an automatic namespace? | I have a two part question. Question 1. I've always thought a folder was an automatic namespace, but I just went back and refactored some code and ended up with something like this: a folder named formatter a file formatter.rb that contained references to all of the files within the folder a formatter/formatter.rb file... | No, a folder does not define a namespace all by itself. The rails autoloading mechanism though, tries to load the definition for a non existint constant A::B::C within a/b/c.rb. If you define another constant there (especially without a namespace), it will exist (without namespace). If there is both, a toplevel constan... | What is the effect of creating a folder, is it an automatic namespace? I have a two part question. Question 1. I've always thought a folder was an automatic namespace, but I just went back and refactored some code and ended up with something like this: a folder named formatter a file formatter.rb that contained referen... | TITLE:
What is the effect of creating a folder, is it an automatic namespace?
QUESTION:
I have a two part question. Question 1. I've always thought a folder was an automatic namespace, but I just went back and refactored some code and ended up with something like this: a folder named formatter a file formatter.rb that... | [
"ruby-on-rails",
"ruby"
] | 2 | 5 | 613 | 2 | 0 | 2011-05-31T16:21:12.483000 | 2011-05-31T16:32:13.343000 |
6,190,549 | 6,191,858 | Set Nullable DataTime + MVC + ADO Entity Framework | I have a problem that is a pain in the ass. See the next code: <%: Html.TextBoxFor(model => model.birth_date, new { @id = "datepicker")%> <%: Html.ValidationMessageFor(model => model.birth_date)%> When I submitting the form the value for birth_date is 01/01/0001 12:00:00 a.m. how do i stop this? I need a blank textbox.... | Three possibilities: Change the date field in the database to nullable and then regen you EDMX. I'm assuming your are using Sql Server, you can change the datefield from datetime to datetime2. You can catch the birthdate in the UI before it's rendered to the user and check for DateTime.MinValue if(model.birth_date == D... | Set Nullable DataTime + MVC + ADO Entity Framework I have a problem that is a pain in the ass. See the next code: <%: Html.TextBoxFor(model => model.birth_date, new { @id = "datepicker")%> <%: Html.ValidationMessageFor(model => model.birth_date)%> When I submitting the form the value for birth_date is 01/01/0001 12:00:... | TITLE:
Set Nullable DataTime + MVC + ADO Entity Framework
QUESTION:
I have a problem that is a pain in the ass. See the next code: <%: Html.TextBoxFor(model => model.birth_date, new { @id = "datepicker")%> <%: Html.ValidationMessageFor(model => model.birth_date)%> When I submitting the form the value for birth_date is... | [
"c#",
"asp.net",
"asp.net-mvc-2"
] | 0 | 0 | 475 | 1 | 0 | 2011-05-31T16:21:37.447000 | 2011-05-31T18:27:36.590000 |
6,190,552 | 6,190,930 | cocos2d kill layer. replaceScene doesnt call dealloc. Retain count 2 | My problem is, that some layers nerver gets deallocated. My previews conviction was, that [CCDirector sharedDirector] replaceScene:[Menu node]]; or similar does everything for me. There stays active layers in the background, if I load a new layer. That leads to weird bugs. Anyway, the code at the bottom has a retain co... | Do not call retainCount It is useless. You need to make sure your retains and releases are balanced. Sometimes, this means making sure that you have correctly torn down any dependent state that may be retaining your object. For example, this: [self schedule:@selector(showText:) interval:1]; If it is using an NSTimer wi... | cocos2d kill layer. replaceScene doesnt call dealloc. Retain count 2 My problem is, that some layers nerver gets deallocated. My previews conviction was, that [CCDirector sharedDirector] replaceScene:[Menu node]]; or similar does everything for me. There stays active layers in the background, if I load a new layer. Tha... | TITLE:
cocos2d kill layer. replaceScene doesnt call dealloc. Retain count 2
QUESTION:
My problem is, that some layers nerver gets deallocated. My previews conviction was, that [CCDirector sharedDirector] replaceScene:[Menu node]]; or similar does everything for me. There stays active layers in the background, if I loa... | [
"iphone",
"objective-c",
"memory-management",
"cocos2d-iphone"
] | 1 | 4 | 1,799 | 1 | 0 | 2011-05-31T16:21:45.200000 | 2011-05-31T16:57:08.020000 |
6,190,565 | 6,190,582 | JavaScript prototype of function not working properly | I`ve made a prototype for " between " function. Why I can't use it directly on number? It is Number object whatsoever! var a = 21; 21.between("( 16 20 ]"); // this is wrong and not working //alert ( typeof 21 ) is number a.between("( 16 20 ]"); // working | Try: (21).between("( 16 20 ]"); When the parser (well, the lexer) sees "21." it thinks you've got a floating-point constant. What also works (and what really looks icky to me personally) is: 21..between("( 16 20 ]"); | JavaScript prototype of function not working properly I`ve made a prototype for " between " function. Why I can't use it directly on number? It is Number object whatsoever! var a = 21; 21.between("( 16 20 ]"); // this is wrong and not working //alert ( typeof 21 ) is number a.between("( 16 20 ]"); // working | TITLE:
JavaScript prototype of function not working properly
QUESTION:
I`ve made a prototype for " between " function. Why I can't use it directly on number? It is Number object whatsoever! var a = 21; 21.between("( 16 20 ]"); // this is wrong and not working //alert ( typeof 21 ) is number a.between("( 16 20 ]"); // ... | [
"javascript",
"function-prototypes"
] | 3 | 6 | 188 | 1 | 0 | 2011-05-31T16:22:50.740000 | 2011-05-31T16:24:20.503000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.