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,188,269 | 6,188,350 | Changing CSS based on querystring | Using jquery, is it possible to swap the whole css file with another css file based on a querystring parameter? For example, if the url is http://mysite.com/page1.php?style=1 This should use style1.css If the url is http://mysite.com/page1.php?style=2 This should use style2.css How can this be done with jquery | This doesn't strictly answer the question posed, but it best solves the problem: Do it in PHP. ';?> | Changing CSS based on querystring Using jquery, is it possible to swap the whole css file with another css file based on a querystring parameter? For example, if the url is http://mysite.com/page1.php?style=1 This should use style1.css If the url is http://mysite.com/page1.php?style=2 This should use style2.css How can... | TITLE:
Changing CSS based on querystring
QUESTION:
Using jquery, is it possible to swap the whole css file with another css file based on a querystring parameter? For example, if the url is http://mysite.com/page1.php?style=1 This should use style1.css If the url is http://mysite.com/page1.php?style=2 This should use ... | [
"jquery"
] | 2 | 5 | 4,517 | 3 | 0 | 2011-05-31T13:24:12.410000 | 2011-05-31T13:31:14.667000 |
6,188,273 | 6,188,440 | How do I get build details in a custom workflow activity? | I need to add a custom activity to the default workflow template to increase assembly versions at the earliest point possible in the build process. What I would like to achieve is to create and map the exact same workspace (that is be created further down in the workflow) inside my custom activity so that I can check o... | I followed the series of blog articles by Ewald Hofman as a primer and created a custom activity that does the check-out, update and check-in of a GlobalAssemblyInfo file that I parse the current version from. My task is inserted at the top of the "Update Drop Location" which is right after it does the "Get the build" ... | How do I get build details in a custom workflow activity? I need to add a custom activity to the default workflow template to increase assembly versions at the earliest point possible in the build process. What I would like to achieve is to create and map the exact same workspace (that is be created further down in the... | TITLE:
How do I get build details in a custom workflow activity?
QUESTION:
I need to add a custom activity to the default workflow template to increase assembly versions at the earliest point possible in the build process. What I would like to achieve is to create and map the exact same workspace (that is be created f... | [
"c#",
"build"
] | 2 | 3 | 5,485 | 1 | 0 | 2011-05-31T13:24:28.283000 | 2011-05-31T13:38:05.340000 |
6,188,274 | 6,201,263 | Java Applet painting clips to [195,200] despite resize | Intention I have a java.applet.Applet subclass MyApplet with a java.awt.Canvas subclass MyCanvas added to it. My code changes the size of MyApplet to new Dimension(600,400) and changes the size of MyCanvas to match. When MyCanvas is paint ed, it should fill its whole area with red draw a blue circle of width 300 and he... | Finally found it! The environment that Eclipse provides to Applets is by default configured to have size 200, 200. All painting clips to this area unless the default Run Configuration is changed. This can be done as follows: Right-click the root folder of your applet in the Package view Select Run As... -> Run Configur... | Java Applet painting clips to [195,200] despite resize Intention I have a java.applet.Applet subclass MyApplet with a java.awt.Canvas subclass MyCanvas added to it. My code changes the size of MyApplet to new Dimension(600,400) and changes the size of MyCanvas to match. When MyCanvas is paint ed, it should fill its who... | TITLE:
Java Applet painting clips to [195,200] despite resize
QUESTION:
Intention I have a java.applet.Applet subclass MyApplet with a java.awt.Canvas subclass MyCanvas added to it. My code changes the size of MyApplet to new Dimension(600,400) and changes the size of MyCanvas to match. When MyCanvas is paint ed, it s... | [
"java",
"eclipse",
"canvas",
"applet",
"clip"
] | 2 | 0 | 1,059 | 3 | 0 | 2011-05-31T13:24:28.110000 | 2011-06-01T12:37:51.367000 |
6,188,277 | 6,188,344 | Remove hyperlink but keep text? | Mentalist Whenever a hyperlink has a title of "Show Profile" I want to remove the hyperlink and replace it with only with the text. So instead of Mentalist I want to have only Mentalist. Any idea how to solve that? | this should work: $('a[title="Show Profile"]').contents().unwrap(); Here a Fiddle with the proof. | Remove hyperlink but keep text? Mentalist Whenever a hyperlink has a title of "Show Profile" I want to remove the hyperlink and replace it with only with the text. So instead of Mentalist I want to have only Mentalist. Any idea how to solve that? | TITLE:
Remove hyperlink but keep text?
QUESTION:
Mentalist Whenever a hyperlink has a title of "Show Profile" I want to remove the hyperlink and replace it with only with the text. So instead of Mentalist I want to have only Mentalist. Any idea how to solve that?
ANSWER:
this should work: $('a[title="Show Profile"]')... | [
"javascript",
"jquery",
"hyperlink"
] | 38 | 97 | 43,594 | 4 | 0 | 2011-05-31T13:24:35.717000 | 2011-05-31T13:30:53.717000 |
6,188,282 | 6,190,873 | Setting Custom HTTP Header for GWT Forms | How can I set additional HTTP headers while submitting forms with GWT. (I am using FormPanel for building the form) Summary From accepted answer: HTTP headers cannot be set using FormPanel - FormPanel wraps the standard HTML, which doesn't allow setting custom headers. | HTTP headers cannot be set using FormPanel - FormPanel wraps the standard HTML, which doesn't allow setting custom headers. To set your own headers use a RequestBuilder: RequestBuilder rb = new RequestBuilder(Method.POST, "http://www.my-server.com"); rb.setHeader("X-My-Header", "VALUE"); Request r = rb.sendRequest(null... | Setting Custom HTTP Header for GWT Forms How can I set additional HTTP headers while submitting forms with GWT. (I am using FormPanel for building the form) Summary From accepted answer: HTTP headers cannot be set using FormPanel - FormPanel wraps the standard HTML, which doesn't allow setting custom headers. | TITLE:
Setting Custom HTTP Header for GWT Forms
QUESTION:
How can I set additional HTTP headers while submitting forms with GWT. (I am using FormPanel for building the form) Summary From accepted answer: HTTP headers cannot be set using FormPanel - FormPanel wraps the standard HTML, which doesn't allow setting custom ... | [
"gwt",
"http-headers"
] | 8 | 5 | 3,564 | 1 | 0 | 2011-05-31T13:24:59.053000 | 2011-05-31T16:51:41.297000 |
6,188,284 | 6,188,327 | custom windows counter | I am writing a java application which generate integer values at times. The java application is running on Windows machine. I don't know if this is possible but I was wondering if I can create a Windows counter "MyCounter" for these values so that I can track the "counter" in Windows Performances Monitor. | I don't think it's something that can be done in Java alone, but it could certainly be done using JNI. The JNI mechanism lets Java code interface with platform native code, so you'd create the counter in C++ (for example) and then invoke that C++ code from Java through JNI. JNA is a higher-lever layer on top of JNI whi... | custom windows counter I am writing a java application which generate integer values at times. The java application is running on Windows machine. I don't know if this is possible but I was wondering if I can create a Windows counter "MyCounter" for these values so that I can track the "counter" in Windows Performances... | TITLE:
custom windows counter
QUESTION:
I am writing a java application which generate integer values at times. The java application is running on Windows machine. I don't know if this is possible but I was wondering if I can create a Windows counter "MyCounter" for these values so that I can track the "counter" in Wi... | [
"java"
] | 0 | 1 | 314 | 2 | 0 | 2011-05-31T13:25:16.257000 | 2011-05-31T13:28:33.450000 |
6,188,297 | 6,188,309 | What's the term that refers to attributes that accept no value (i.e. "checked" and "selected")? | The attributes checked and selected, of the and the tags respectively, belong to a group of attributes that don't accept a value. What's the term that refers to that group of attributes? | Boolean attributes: Some attributes play the role of boolean variables (e.g., the selected attribute for the OPTION element). Their appearance in the start tag of an element implies that the value of the attribute is "true". Their absence implies a value of "false". Boolean attributes may legally take a single value: t... | What's the term that refers to attributes that accept no value (i.e. "checked" and "selected")? The attributes checked and selected, of the and the tags respectively, belong to a group of attributes that don't accept a value. What's the term that refers to that group of attributes? | TITLE:
What's the term that refers to attributes that accept no value (i.e. "checked" and "selected")?
QUESTION:
The attributes checked and selected, of the and the tags respectively, belong to a group of attributes that don't accept a value. What's the term that refers to that group of attributes?
ANSWER:
Boolean at... | [
"html",
"terminology"
] | 13 | 10 | 1,352 | 2 | 0 | 2011-05-31T13:26:00.423000 | 2011-05-31T13:26:57.163000 |
6,188,311 | 6,188,426 | Columns to include in nonclustered index | I was just reading from here https://stackoverflow.com/questions/6187904/hard-and-fast-rule-for-include-columns-in-index regarding included columns. n index is typically CREATE INDEX ON (KeyColList) INCLUDE (NonKeyColList) Where: KeyColList = Key columns = used for row restriction and processing WHERE, JOIN, ORDER BY, ... | I would think you would want something like: CREATE NONCLUSTERED INDEX MyIndex ON MyTable(Col1, Col2, Col3, Col4, Col5, Col6) INCLUDE (Col7, Col8, Col9, Col10) You're filtering on Col1-Col6 and retrieving Col7-Col10. Not sure how this will work with the group by, though. You may want to rewrite it as a DISTINCT since t... | Columns to include in nonclustered index I was just reading from here https://stackoverflow.com/questions/6187904/hard-and-fast-rule-for-include-columns-in-index regarding included columns. n index is typically CREATE INDEX ON (KeyColList) INCLUDE (NonKeyColList) Where: KeyColList = Key columns = used for row restricti... | TITLE:
Columns to include in nonclustered index
QUESTION:
I was just reading from here https://stackoverflow.com/questions/6187904/hard-and-fast-rule-for-include-columns-in-index regarding included columns. n index is typically CREATE INDEX ON (KeyColList) INCLUDE (NonKeyColList) Where: KeyColList = Key columns = used... | [
"sql",
"sql-server",
"sql-server-2005",
"sql-server-2008"
] | 1 | 1 | 669 | 2 | 0 | 2011-05-31T13:27:04.927000 | 2011-05-31T13:36:36.633000 |
6,188,314 | 6,188,417 | Animating a UIImageView off the screen | I have a UIImageView that I need to animate off the screen. I'm doing this by adjusting the frame to 0 in a 1 second animation block. If I leave the content type alone, which is one of the scaling types, it will shrink to 0 as I want it to, but it will pinch the image as it adjusts to the new frame size. I need it to j... | You want to change the scaleMode property. You can change it to aspect fit if you want it to shrink while scaling correctly. Otherwise, you can try some of the other ones. EDIT: As per your comment, you need to set the clipsToBounds property. | Animating a UIImageView off the screen I have a UIImageView that I need to animate off the screen. I'm doing this by adjusting the frame to 0 in a 1 second animation block. If I leave the content type alone, which is one of the scaling types, it will shrink to 0 as I want it to, but it will pinch the image as it adjust... | TITLE:
Animating a UIImageView off the screen
QUESTION:
I have a UIImageView that I need to animate off the screen. I'm doing this by adjusting the frame to 0 in a 1 second animation block. If I leave the content type alone, which is one of the scaling types, it will shrink to 0 as I want it to, but it will pinch the ... | [
"iphone",
"ios",
"ipad",
"uiview",
"uiimageview"
] | 0 | 0 | 452 | 2 | 0 | 2011-05-31T13:27:22.733000 | 2011-05-31T13:35:43.723000 |
6,188,319 | 6,188,476 | How to return nothing and close connection in asp .net for GET request | I have a simple asp.net web form. I want to let the web form return nothing and close connection immediately when the particular value at Query String is not right. How do I do that? I mean stop processing the request without returning anything at all and close the connection. Any idea? | Although Response.End() has been mentioned, it raises exceptions (ThreadAbortException). If you're expecting to do this often, then the performance of your site might decrease because of this. Instead, you could use HttpApplication.CompleteRequest which ends the request, but not throw an exception. | How to return nothing and close connection in asp .net for GET request I have a simple asp.net web form. I want to let the web form return nothing and close connection immediately when the particular value at Query String is not right. How do I do that? I mean stop processing the request without returning anything at a... | TITLE:
How to return nothing and close connection in asp .net for GET request
QUESTION:
I have a simple asp.net web form. I want to let the web form return nothing and close connection immediately when the particular value at Query String is not right. How do I do that? I mean stop processing the request without retur... | [
".net",
"asp.net",
"vb.net",
"visual-studio",
"get"
] | 2 | 3 | 444 | 2 | 0 | 2011-05-31T13:27:51.707000 | 2011-05-31T13:40:21.920000 |
6,188,323 | 6,190,152 | Create Custom Membership Provider (Entity Framework vs Linq) | I'm starting work on a Custom Membership provider and I was wondering which option would be the best to develop this application in Linq or Entity Framework? Also I have a need to link two table from different database via a common ID and I was wondering does anyone know of any good tutorials about creating a MVC 3 Web... | By Linq, you mean Linq to SQL vs. Entity framework? If so, then I would recommend using Entity Framework. Microsoft's development on Linq to SQL has virtually stopped so EF has a better future. NerdDinner is one of the more popular tutorial applications that uses ASP MVC 2 and entity framework. ASP MVC 2 is similar eno... | Create Custom Membership Provider (Entity Framework vs Linq) I'm starting work on a Custom Membership provider and I was wondering which option would be the best to develop this application in Linq or Entity Framework? Also I have a need to link two table from different database via a common ID and I was wondering does... | TITLE:
Create Custom Membership Provider (Entity Framework vs Linq)
QUESTION:
I'm starting work on a Custom Membership provider and I was wondering which option would be the best to develop this application in Linq or Entity Framework? Also I have a need to link two table from different database via a common ID and I ... | [
"linq",
"entity-framework",
"asp.net-mvc-3"
] | 1 | 1 | 809 | 1 | 0 | 2011-05-31T13:28:08.520000 | 2011-05-31T15:46:59.633000 |
6,188,328 | 6,188,380 | cannot understand the following code in objective c? | the following is declared inside the @interface of another class... I don't understand the syntax and what it is trying to say @interface someclass:NSObject.... @end
@interface NSObject (HSRequestClassDelegate)
-(void) finishedWithData:(HSRequest *) request data:(NSMutableData *) data; -(void) failedWithError:(HSRequ... | This is a definition of an informal protocol. Prior to protocols being introduced, protocols were defined as a category on NSObject. | cannot understand the following code in objective c? the following is declared inside the @interface of another class... I don't understand the syntax and what it is trying to say @interface someclass:NSObject.... @end
@interface NSObject (HSRequestClassDelegate)
-(void) finishedWithData:(HSRequest *) request data:(N... | TITLE:
cannot understand the following code in objective c?
QUESTION:
the following is declared inside the @interface of another class... I don't understand the syntax and what it is trying to say @interface someclass:NSObject.... @end
@interface NSObject (HSRequestClassDelegate)
-(void) finishedWithData:(HSRequest ... | [
"objective-c",
"cocoa"
] | 0 | 3 | 69 | 2 | 0 | 2011-05-31T13:28:42.133000 | 2011-05-31T13:33:27.523000 |
6,188,332 | 6,188,460 | UIImagePickerController Change Camera Source via delegate? | I would like to be able to change the UIImagePickerControllerCameraDevice via a button. The Button I would like to use is placed in an overlay that is showing over the top of the ImagePicker when it runs. I have an inkling that this will require me to use a delegate but my knowledge on delegates is very minimal. could ... | Since you are using a view controller associated to the overlay, you can define a property for the image picker controller in the overlay view controller, probably assign ed rather than retain ed and define the actions of the button within the overlay view controller to affect the image picker controller instance refer... | UIImagePickerController Change Camera Source via delegate? I would like to be able to change the UIImagePickerControllerCameraDevice via a button. The Button I would like to use is placed in an overlay that is showing over the top of the ImagePicker when it runs. I have an inkling that this will require me to use a del... | TITLE:
UIImagePickerController Change Camera Source via delegate?
QUESTION:
I would like to be able to change the UIImagePickerControllerCameraDevice via a button. The Button I would like to use is placed in an overlay that is showing over the top of the ImagePicker when it runs. I have an inkling that this will requi... | [
"iphone",
"objective-c",
"ios",
"delegates",
"uiimagepickercontroller"
] | 1 | 2 | 3,221 | 1 | 0 | 2011-05-31T13:29:29.630000 | 2011-05-31T13:39:03.500000 |
6,188,345 | 6,188,715 | Function application in LINQ expressions | We are trying to find a workaround for the issue that the Entity Framework doesn't support non-scalar entities. We are using a particular equality so we try to build an expression that for a given input and a function from that input checks whether that equality holds. private static Expression > UserEquals (User user,... | So, if I'm understanding you correctly you want to do this: public class Foo { public int Id { get; set; } public User User { get; set; } }
public class User { public int Id { get; set; } public string Text { get; set; } }
public static IQueryable WhereUserEquals(this IQueryable source, User user) { // this is your i... | Function application in LINQ expressions We are trying to find a workaround for the issue that the Entity Framework doesn't support non-scalar entities. We are using a particular equality so we try to build an expression that for a given input and a function from that input checks whether that equality holds. private s... | TITLE:
Function application in LINQ expressions
QUESTION:
We are trying to find a workaround for the issue that the Entity Framework doesn't support non-scalar entities. We are using a particular equality so we try to build an expression that for a given input and a function from that input checks whether that equalit... | [
"c#",
"linq",
"entity-framework",
"functional-programming",
"entity-framework-4.1"
] | 2 | 3 | 903 | 4 | 0 | 2011-05-31T13:31:02.337000 | 2011-05-31T13:58:49.940000 |
6,188,353 | 6,188,446 | SUBSELECT contains an error - but sql statement continues | I have the following example code: create table #tempmembers ( memberid int )
update Members set Member_EMail = NULL where Member_ID in (select member_id from #tempmembers) The subselect contains an error, since #tempmembes does not contain a column named member_id, but the sql statements run WITHOUT any errors and up... | It's inheriting member_id from the outer query so is equivalent to:... (select Members.member_id from #tempmembers) This will fail as expected:... (select #tempmembers.member_id from #tempmembers) | SUBSELECT contains an error - but sql statement continues I have the following example code: create table #tempmembers ( memberid int )
update Members set Member_EMail = NULL where Member_ID in (select member_id from #tempmembers) The subselect contains an error, since #tempmembes does not contain a column named membe... | TITLE:
SUBSELECT contains an error - but sql statement continues
QUESTION:
I have the following example code: create table #tempmembers ( memberid int )
update Members set Member_EMail = NULL where Member_ID in (select member_id from #tempmembers) The subselect contains an error, since #tempmembes does not contain a ... | [
"sql-server",
"t-sql"
] | 3 | 3 | 162 | 1 | 0 | 2011-05-31T13:31:25.713000 | 2011-05-31T13:38:21.877000 |
6,188,370 | 6,188,814 | Update Score to Overwrite Previous Score | I have a page that lists poem titles, average scores and lists the judges who have scored the poems. These items are in 3 columns. When the judge clicks on the poem title, he is taken to the poem overview page that displays the poem content and allows the judge to rate the poem from 1 to 3. If the judge has already sco... | Add cfqueryparam to the duplicateCheck, updateScore and qRatePoem queries, primarily to avoid SQL injection. You can change this (which is a string comparison) to this (numeric comparison) or even just this (boolean) These 2 IF statements are identical, so if there are no errors, you will do both an Update then an Inse... | Update Score to Overwrite Previous Score I have a page that lists poem titles, average scores and lists the judges who have scored the poems. These items are in 3 columns. When the judge clicks on the poem title, he is taken to the poem overview page that displays the poem content and allows the judge to rate the poem ... | TITLE:
Update Score to Overwrite Previous Score
QUESTION:
I have a page that lists poem titles, average scores and lists the judges who have scored the poems. These items are in 3 columns. When the judge clicks on the poem title, he is taken to the poem overview page that displays the poem content and allows the judge... | [
"sql",
"coldfusion"
] | 0 | 0 | 265 | 2 | 0 | 2011-05-31T13:32:42.267000 | 2011-05-31T14:06:37.083000 |
6,188,371 | 6,188,604 | Fill Grid width inside a listbox | I have a grid as the datatemplate for items in a listbox and it's not filling the whole width of the control. I have tried the suggestions in the other questions but they are not working: This is the listbox xaml Name Attribute Value and I am using a theme file from the following project: http://wpfthemes.codeplex.com/... | You need to make the ListBoxItems stretch their content, either by changing the respective property on the ListBox:...or by setting it on the items via the ItemContainerStyle: By default both will work as the ListBoxItem default style binds the HorizontalContentAlignment property to the owning ListBox's property. | Fill Grid width inside a listbox I have a grid as the datatemplate for items in a listbox and it's not filling the whole width of the control. I have tried the suggestions in the other questions but they are not working: This is the listbox xaml Name Attribute Value and I am using a theme file from the following projec... | TITLE:
Fill Grid width inside a listbox
QUESTION:
I have a grid as the datatemplate for items in a listbox and it's not filling the whole width of the control. I have tried the suggestions in the other questions but they are not working: This is the listbox xaml Name Attribute Value and I am using a theme file from th... | [
"wpf",
"layout",
"listbox"
] | 17 | 30 | 7,344 | 1 | 0 | 2011-05-31T13:32:42.787000 | 2011-05-31T13:49:48.597000 |
6,188,372 | 6,189,291 | how to use jQuery to slide on and off a div | i have this div: Services title goes here Aenean ultrices purus porttitor oro er risus molestie vestibulum. Morbi et nus metus justo, semper eget condimentum vitae, con varius ut sapien. Ut egestas enim non ante sagittis eget egestas tellus consequat. Services title goes here Aenean ultrices purus porttitor oro er risu... | Something like this? Fiddle: http://jsfiddle.net/StJ9e/1/ $('div.BOX_A h1, div.BOX_B h1').click(function() { $(this).siblings('.slide').slideToggle(); }); Or if your looking for an accordion type effect: Fiddle: http://jsfiddle.net/bK4rN/2/ var $last = jQuery('.BOX_A.slide');
$('.services_box').delegate('div > h1', 'c... | how to use jQuery to slide on and off a div i have this div: Services title goes here Aenean ultrices purus porttitor oro er risus molestie vestibulum. Morbi et nus metus justo, semper eget condimentum vitae, con varius ut sapien. Ut egestas enim non ante sagittis eget egestas tellus consequat. Services title goes here... | TITLE:
how to use jQuery to slide on and off a div
QUESTION:
i have this div: Services title goes here Aenean ultrices purus porttitor oro er risus molestie vestibulum. Morbi et nus metus justo, semper eget condimentum vitae, con varius ut sapien. Ut egestas enim non ante sagittis eget egestas tellus consequat. Servic... | [
"javascript",
"jquery",
"jquery-animate",
"slide"
] | 0 | 2 | 501 | 3 | 0 | 2011-05-31T13:32:49.387000 | 2011-05-31T14:40:39.327000 |
6,188,376 | 6,188,515 | Generate all sum combinations | Given a set of 6 numbers e.g 1,5,8,9,2,6 and 2 operands e.g + and - i was wondering how you would go about generating all possible valid sums e.g 1+8=9 and so on. The numbers could be an positive number 0-9 and the operands could be +-/* squared and Square Root If any one can help i would really appreciate it. Thanks | "positive number 0-9" 0 is not a positive number. "the operands could be +-/* squared and Square Root" The square and the square root do only take one parameter, so how do you apply this over two elements of your list? As you didn't specify any language here the solution for the addition as stated in your post: a = [1,... | Generate all sum combinations Given a set of 6 numbers e.g 1,5,8,9,2,6 and 2 operands e.g + and - i was wondering how you would go about generating all possible valid sums e.g 1+8=9 and so on. The numbers could be an positive number 0-9 and the operands could be +-/* squared and Square Root If any one can help i would ... | TITLE:
Generate all sum combinations
QUESTION:
Given a set of 6 numbers e.g 1,5,8,9,2,6 and 2 operands e.g + and - i was wondering how you would go about generating all possible valid sums e.g 1+8=9 and so on. The numbers could be an positive number 0-9 and the operands could be +-/* squared and Square Root If any one... | [
"objective-c",
"c",
"algorithm",
"combinations"
] | 0 | 1 | 1,141 | 3 | 0 | 2011-05-31T13:33:13.800000 | 2011-05-31T13:43:34.433000 |
6,188,379 | 6,188,769 | How to read pdf content from server and save in file? | I have a server link from where I need to read the pdf content. I used the following code but it give result in some other format. public String readPDF() throws Exception { BufferedReader in = null; String page = ""; try { HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(); request.setURI(new... | Have a look on the following code to store pdf file try {
URL u = new URL("http://14.140.41.194/monali/i.pdf"); HttpURLConnection c = (HttpURLConnection) u.openConnection(); c.setRequestMethod("GET"); c.setDoOutput(true); c.connect(); String fileName = Environment.getExternalStorageDirectory().getAbsolutePath(); FileO... | How to read pdf content from server and save in file? I have a server link from where I need to read the pdf content. I used the following code but it give result in some other format. public String readPDF() throws Exception { BufferedReader in = null; String page = ""; try { HttpClient client = new DefaultHttpClient(... | TITLE:
How to read pdf content from server and save in file?
QUESTION:
I have a server link from where I need to read the pdf content. I used the following code but it give result in some other format. public String readPDF() throws Exception { BufferedReader in = null; String page = ""; try { HttpClient client = new ... | [
"android"
] | 2 | 3 | 2,176 | 1 | 0 | 2011-05-31T13:33:25.620000 | 2011-05-31T14:02:48.210000 |
6,188,383 | 6,188,484 | what's wrong in this el expression? | for the el expression: #{admin.getDetailTypeTranslation('ContactDetailType_'+detailType)} The parameter passed to getDetailTypeTranslation is 'ContactDetailType_' (without the detailType value) What am I doing wrong? | In EL, the + is exclusively a sum operator. You can use to create a new variable which exist of a string concatenated with an EL expression and then use the new variable instead. Please note that this problem is not related to JSF, but to EL in general. | what's wrong in this el expression? for the el expression: #{admin.getDetailTypeTranslation('ContactDetailType_'+detailType)} The parameter passed to getDetailTypeTranslation is 'ContactDetailType_' (without the detailType value) What am I doing wrong? | TITLE:
what's wrong in this el expression?
QUESTION:
for the el expression: #{admin.getDetailTypeTranslation('ContactDetailType_'+detailType)} The parameter passed to getDetailTypeTranslation is 'ContactDetailType_' (without the detailType value) What am I doing wrong?
ANSWER:
In EL, the + is exclusively a sum operat... | [
"java",
"el"
] | 3 | 5 | 244 | 2 | 0 | 2011-05-31T13:33:39.907000 | 2011-05-31T13:41:02.140000 |
6,188,387 | 6,282,538 | UIViewController init vs initWithNibName:bundle: | In my app I am pushing a view controller (a UITableViewController) that has also a property/outlet referencing a UITableViewCell. It appears that creating the controller with: PreferencesController *pController = [[PreferencesController alloc] init]; doesn't create the object for the UITableViewCell in the xib file, th... | There seems to be something magical about the name PreferencesController. I just had the exact same problem. Renaming my class (and xib) to something else solved the problem. | UIViewController init vs initWithNibName:bundle: In my app I am pushing a view controller (a UITableViewController) that has also a property/outlet referencing a UITableViewCell. It appears that creating the controller with: PreferencesController *pController = [[PreferencesController alloc] init]; doesn't create the o... | TITLE:
UIViewController init vs initWithNibName:bundle:
QUESTION:
In my app I am pushing a view controller (a UITableViewController) that has also a property/outlet referencing a UITableViewCell. It appears that creating the controller with: PreferencesController *pController = [[PreferencesController alloc] init]; do... | [
"ios",
"uitableview",
"uiviewcontroller",
"init"
] | 5 | 4 | 11,772 | 3 | 0 | 2011-05-31T13:33:56.227000 | 2011-06-08T17:08:02.687000 |
6,188,390 | 6,188,599 | Database Design for Many To Many Relationship | I am in the middle of rewriting an MS Access database and unfortunately we need to keep some of the strange processes that exist in the current DB. I am having some trouble doing the DB design so I am hoping for some advice/direction. New tables: tblCurrentDayRecords BusinessDate (PK) Acct (PK) ActivityDate (PK) Type R... | You kind of lost me in your description, but I can tell you that in general, for a many-to-many relationship, you will need to have a table that relates the rows in table 1 to the rows in table 2. Is this what you're looking for? tblRecordNotes BusinessDate (PK) Acct (PK) ActivityDate (PK) RecordGuid (PK) Then processi... | Database Design for Many To Many Relationship I am in the middle of rewriting an MS Access database and unfortunately we need to keep some of the strange processes that exist in the current DB. I am having some trouble doing the DB design so I am hoping for some advice/direction. New tables: tblCurrentDayRecords Busine... | TITLE:
Database Design for Many To Many Relationship
QUESTION:
I am in the middle of rewriting an MS Access database and unfortunately we need to keep some of the strange processes that exist in the current DB. I am having some trouble doing the DB design so I am hoping for some advice/direction. New tables: tblCurren... | [
"sql-server",
"database-design",
"many-to-many"
] | 0 | 3 | 171 | 1 | 0 | 2011-05-31T13:34:12.500000 | 2011-05-31T13:49:32.717000 |
6,188,400 | 6,188,432 | Alert not working what's wrong in this | I write the following to alert but it is not displaying the alert box what's wrong in this protected void Timer1_Tick(object sender, EventArgs e) { string str = string.Empty; str = "Total Count: '" + click + "'";
Response.Write(" "); click = 0; } | You have nested single quotes, try without: str = "Total Count: " + click; Response.Write(" "); | Alert not working what's wrong in this I write the following to alert but it is not displaying the alert box what's wrong in this protected void Timer1_Tick(object sender, EventArgs e) { string str = string.Empty; str = "Total Count: '" + click + "'";
Response.Write(" "); click = 0; } | TITLE:
Alert not working what's wrong in this
QUESTION:
I write the following to alert but it is not displaying the alert box what's wrong in this protected void Timer1_Tick(object sender, EventArgs e) { string str = string.Empty; str = "Total Count: '" + click + "'";
Response.Write(" "); click = 0; }
ANSWER:
You ha... | [
"c#",
".net",
"asp.net",
"javascript"
] | 0 | 2 | 1,062 | 4 | 0 | 2011-05-31T13:34:36.947000 | 2011-05-31T13:37:06.587000 |
6,188,405 | 6,189,075 | How do I Iterate through a dataset in reporting services | I have the following code: public sub PrettyRows() dim ds as dataset = report.dataset1 dim GroupName as string = "" FOR EACH dRow AS Datarow IN if groupname <> drow(0) then groupname = drow(0) drow(0) = groupname else drow(0) = "" NEXT End Sub
Protected Overrides Sub OnInit() PrettyRows() end sub The Protected Overrid... | Why not lift this out into a grouping in your Table/Matrix/Tablix etc? If you want it collapsed/combined over several rows rather than over a header, then you should be able to refer to a hidden text box in a very thin header. Or use the scoped RowNumber function to detect the first row in the grouping (which is your s... | How do I Iterate through a dataset in reporting services I have the following code: public sub PrettyRows() dim ds as dataset = report.dataset1 dim GroupName as string = "" FOR EACH dRow AS Datarow IN if groupname <> drow(0) then groupname = drow(0) drow(0) = groupname else drow(0) = "" NEXT End Sub
Protected Override... | TITLE:
How do I Iterate through a dataset in reporting services
QUESTION:
I have the following code: public sub PrettyRows() dim ds as dataset = report.dataset1 dim GroupName as string = "" FOR EACH dRow AS Datarow IN if groupname <> drow(0) then groupname = drow(0) drow(0) = groupname else drow(0) = "" NEXT End Sub
... | [
"vb.net",
"reporting-services"
] | 1 | 2 | 2,698 | 1 | 0 | 2011-05-31T13:34:59.633000 | 2011-05-31T14:26:35.410000 |
6,188,407 | 6,188,469 | DateTime formatting: Why don't ToShortTimeString and "{0:t}" display the same thing? | var todayAt2PM = new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 14, 0, 0); Debug.Print("{0:t}", todayAt2PM); Debug.Print("{0}", todayAt2PM.ToString("t")); Debug.Print("{0}", todayAt2PM.ToShortTimeString()); When I run this in C#, I get: 14:00 2:00 PM 2:00 PM CultureInfo.CurrentCulture and Cultur... | I think the problem is with Debug.Print rather than with the t format specifier. If you use Console.WriteLine instead of Debug.Print, it gives the expected result. EDIT: just had a look with Reflector... Debug.Print always uses the invariant culture, not the current culture, and the time format in that culture is 24-ho... | DateTime formatting: Why don't ToShortTimeString and "{0:t}" display the same thing? var todayAt2PM = new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 14, 0, 0); Debug.Print("{0:t}", todayAt2PM); Debug.Print("{0}", todayAt2PM.ToString("t")); Debug.Print("{0}", todayAt2PM.ToShortTimeString()); When... | TITLE:
DateTime formatting: Why don't ToShortTimeString and "{0:t}" display the same thing?
QUESTION:
var todayAt2PM = new DateTime( DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 14, 0, 0); Debug.Print("{0:t}", todayAt2PM); Debug.Print("{0}", todayAt2PM.ToString("t")); Debug.Print("{0}", todayAt2PM.ToShortT... | [
"c#",
"datetime"
] | 3 | 6 | 567 | 1 | 0 | 2011-05-31T13:35:04.060000 | 2011-05-31T13:39:46.293000 |
6,188,427 | 6,188,527 | Could I have some help converting inner joins in sql into linq? | I want to use chained linq. I am having some trouble with the syntax. select * from APPLES inner join BANANAS on APPLES.id = BANANAS.someid I have: var result = workspace.GetDataSource ().Join(.......) but I am unsure about what goes into the Join bit. Could someone help me out? | How about: var result = from a in workspace.GetDataSource () from b in workspace.GetDataSource () where a.id == b.someid select a; or if you want to use join notation: var result = from a in workspace.GetDataSource () join b in workspace.GetDataSource () on a.id equals b.someid select a; Note, you can change the select... | Could I have some help converting inner joins in sql into linq? I want to use chained linq. I am having some trouble with the syntax. select * from APPLES inner join BANANAS on APPLES.id = BANANAS.someid I have: var result = workspace.GetDataSource ().Join(.......) but I am unsure about what goes into the Join bit. Cou... | TITLE:
Could I have some help converting inner joins in sql into linq?
QUESTION:
I want to use chained linq. I am having some trouble with the syntax. select * from APPLES inner join BANANAS on APPLES.id = BANANAS.someid I have: var result = workspace.GetDataSource ().Join(.......) but I am unsure about what goes into... | [
"linq-to-sql"
] | 0 | 4 | 133 | 1 | 0 | 2011-05-31T13:36:39.787000 | 2011-05-31T13:44:59.753000 |
6,188,429 | 6,188,572 | Float vs Double performance in C# considering cache | I checked and could find numerous posts about performance of float vs double ( here is one, and here is another). In most cases, it is said that they have the same performance because they are converted by FPU to 10-bye real numbers. But I'm still not convinced. What if the locality issues are considered appropriately?... | What if the locality issues are considered appropriately? Still the same because those are normally not as high as you think. If you deal with float and double except just copying it, there is some significant time spent actually CALCULATING. Your XOR example is a good example where you think wrong. XOR is a SIMPLE EAS... | Float vs Double performance in C# considering cache I checked and could find numerous posts about performance of float vs double ( here is one, and here is another). In most cases, it is said that they have the same performance because they are converted by FPU to 10-bye real numbers. But I'm still not convinced. What ... | TITLE:
Float vs Double performance in C# considering cache
QUESTION:
I checked and could find numerous posts about performance of float vs double ( here is one, and here is another). In most cases, it is said that they have the same performance because they are converted by FPU to 10-bye real numbers. But I'm still no... | [
"c#",
"performance",
"types",
"x86"
] | 2 | 3 | 1,260 | 1 | 0 | 2011-05-31T13:36:50.210000 | 2011-05-31T13:48:08.460000 |
6,188,430 | 6,188,661 | Adding tableView with navigation controller to a view-based project - iPhone Programming | I have a view based project with a set of buttons. When one of the buttons is pressed I would like a table view with a Navigation controller to be created. I have this code in another project. My code is basically this tutorial with some minor changes (just the first 2 parts): CODE Is there a way to import this code in... | You can create a controller (which has your table view) and then create a navigation controller with its root controller as the controller having the table view. And from here you can present this navigation controller. Navigation controller has a method called as - (id)initWithRootViewController:(UIViewController *)ro... | Adding tableView with navigation controller to a view-based project - iPhone Programming I have a view based project with a set of buttons. When one of the buttons is pressed I would like a table view with a Navigation controller to be created. I have this code in another project. My code is basically this tutorial wit... | TITLE:
Adding tableView with navigation controller to a view-based project - iPhone Programming
QUESTION:
I have a view based project with a set of buttons. When one of the buttons is pressed I would like a table view with a Navigation controller to be created. I have this code in another project. My code is basically... | [
"iphone",
"objective-c",
"ios",
"uitableview",
"uinavigationcontroller"
] | 0 | 1 | 2,200 | 1 | 0 | 2011-05-31T13:37:03.313000 | 2011-05-31T13:54:47.710000 |
6,188,431 | 6,188,522 | Set the colour of text in a QPushButton in PyQt4 using Python | I would like to create some clickable blue text on my GUI, kind of like a HTML hyperlink! I am using Python 2.6 and PyQt4. I have managed to set the text colour of a QLabel before, but cannot remember how i did that, even if i did its not clickable. So I have moved onto a QPushButton that I can make flat like so: testb... | You can use a Style Sheet. testbutton.setStyleSheet('QPushButton {color: blue}') | Set the colour of text in a QPushButton in PyQt4 using Python I would like to create some clickable blue text on my GUI, kind of like a HTML hyperlink! I am using Python 2.6 and PyQt4. I have managed to set the text colour of a QLabel before, but cannot remember how i did that, even if i did its not clickable. So I hav... | TITLE:
Set the colour of text in a QPushButton in PyQt4 using Python
QUESTION:
I would like to create some clickable blue text on my GUI, kind of like a HTML hyperlink! I am using Python 2.6 and PyQt4. I have managed to set the text colour of a QLabel before, but cannot remember how i did that, even if i did its not c... | [
"python",
"pyqt4"
] | 2 | 7 | 12,085 | 3 | 0 | 2011-05-31T13:37:03.623000 | 2011-05-31T13:44:33.403000 |
6,188,438 | 6,189,857 | Add an image (alert) to DOJO dialog | An unexpected error occurred OK Can I add an image to a dojo dialog? to to make it appear like an alert box or something? Above is my current code? Something like | You will need a CSS style called 'alertIcon', something like:.alertIcon { width:32px; height:32px; background-repeat:no-repeat; background: url("path/to/alert/icon/alertIcon.png"); } and here is some modified HTML: An unexpected error occurred OK | Add an image (alert) to DOJO dialog An unexpected error occurred OK Can I add an image to a dojo dialog? to to make it appear like an alert box or something? Above is my current code? Something like | TITLE:
Add an image (alert) to DOJO dialog
QUESTION:
An unexpected error occurred OK Can I add an image to a dojo dialog? to to make it appear like an alert box or something? Above is my current code? Something like
ANSWER:
You will need a CSS style called 'alertIcon', something like:.alertIcon { width:32px; height:3... | [
"dojo"
] | 1 | 1 | 3,550 | 2 | 0 | 2011-05-31T13:37:57.803000 | 2011-05-31T15:23:23.567000 |
6,188,445 | 6,229,487 | How do I create browsable intent in the android manifest? | I have an Android app that should open links sent via email. I only want to open links to a certain website, though. I know that opening youTube links provides the user with a dialog asking whether to open it in the browser or in the youTube app, so this is what I am going for. In my android manifest file, I have the f... | The answer was to add the default category to the second intent filter, just as @advantej suggested. | How do I create browsable intent in the android manifest? I have an Android app that should open links sent via email. I only want to open links to a certain website, though. I know that opening youTube links provides the user with a dialog asking whether to open it in the browser or in the youTube app, so this is what... | TITLE:
How do I create browsable intent in the android manifest?
QUESTION:
I have an Android app that should open links sent via email. I only want to open links to a certain website, though. I know that opening youTube links provides the user with a dialog asking whether to open it in the browser or in the youTube ap... | [
"android",
"android-manifest",
"android-intent",
"browsable"
] | 6 | 6 | 6,311 | 1 | 0 | 2011-05-31T13:38:19.367000 | 2011-06-03T15:52:05.883000 |
6,188,447 | 6,188,521 | Android Activity not rotating to all sides? | I have a activity that I want to rotate. I use the following in my AndroidManifest.xml: So, I say that the screen orientation should change when the device is rotated. No I see the problem. When I use my device in normal position (portrait with buttons on the bottom), it works fine. Also rotating the device to the righ... | my Motorola DEFY has only 3 rotations, I have test it in android default web browser, on the vertical position it has only one and on horizontal it has both rotations.. even though I don't think that the activities have all 3 rotations, I think they have only vertical and horizontal rotations, one for both.. | Android Activity not rotating to all sides? I have a activity that I want to rotate. I use the following in my AndroidManifest.xml: So, I say that the screen orientation should change when the device is rotated. No I see the problem. When I use my device in normal position (portrait with buttons on the bottom), it work... | TITLE:
Android Activity not rotating to all sides?
QUESTION:
I have a activity that I want to rotate. I use the following in my AndroidManifest.xml: So, I say that the screen orientation should change when the device is rotated. No I see the problem. When I use my device in normal position (portrait with buttons on th... | [
"android",
"rotation",
"android-manifest",
"autorotate"
] | 2 | 2 | 822 | 1 | 0 | 2011-05-31T13:38:31.300000 | 2011-05-31T13:44:29.053000 |
6,188,456 | 6,188,560 | Can a page that ALWAYS redirects get a PostBack? | I've inherited an old Asp.Net website (I've had limited exposure to Asp & Web stuff). One of the pages takes values from a query string, does some giggery pokery with them and then re-directs to another page. The existing code has some Session State logic in there to remember the giggery pokery in case of PostBacks, bu... | If it always redirects then no it cannot receive a postback, (from itself) there are details of the page lifecycle here: http://msdn.microsoft.com/en-us/library/ms972976.aspx | Can a page that ALWAYS redirects get a PostBack? I've inherited an old Asp.Net website (I've had limited exposure to Asp & Web stuff). One of the pages takes values from a query string, does some giggery pokery with them and then re-directs to another page. The existing code has some Session State logic in there to rem... | TITLE:
Can a page that ALWAYS redirects get a PostBack?
QUESTION:
I've inherited an old Asp.Net website (I've had limited exposure to Asp & Web stuff). One of the pages takes values from a query string, does some giggery pokery with them and then re-directs to another page. The existing code has some Session State log... | [
"asp.net",
"postback"
] | 1 | 2 | 99 | 2 | 0 | 2011-05-31T13:38:56.493000 | 2011-05-31T13:47:23.900000 |
6,188,459 | 6,188,506 | In C#, how can you access a static property of a user-defined type without knowing the type at compiletime? | I have some classes that all implement a certain interface. I want to store a unique string in each class that I can get without creating an object for that class. I searched through a lot of posts here already and couldn't find an answer. If I create an object for each class, then what I want is simply: class X:IBase{... | Reflection is your friend: interface IBase { } class X: IBase { static string m = "x";} class Y: IBase { static string m = "y";} class Z: IBase { static string m = "z";}
static void Main() { Type[] arr = { typeof(X), typeof(Y), typeof(Z) }; foreach (Type t in arr) { FieldInfo fieldInfo = t.GetField("m", BindingFlags.S... | In C#, how can you access a static property of a user-defined type without knowing the type at compiletime? I have some classes that all implement a certain interface. I want to store a unique string in each class that I can get without creating an object for that class. I searched through a lot of posts here already a... | TITLE:
In C#, how can you access a static property of a user-defined type without knowing the type at compiletime?
QUESTION:
I have some classes that all implement a certain interface. I want to store a unique string in each class that I can get without creating an object for that class. I searched through a lot of po... | [
"c#",
"static",
"types"
] | 1 | 2 | 244 | 4 | 0 | 2011-05-31T13:39:03.327000 | 2011-05-31T13:42:28.740000 |
6,188,464 | 6,188,499 | pydev - call a function with only self as argument | I am new to PyDev, written scripts using mainly notepad++ and jedit where I never had these issues. In a module, I have defined a function - get_user_inputs(self). I used the argument self as PyDev would not let me define the function othewise (and apparently it is the right thing to do). Now my question is how do I ca... | The argument self is only necessary for class methods. It doesn't make sense for normal functions. That means you either omitted a vital information in your question or there is a bug in PyDev. | pydev - call a function with only self as argument I am new to PyDev, written scripts using mainly notepad++ and jedit where I never had these issues. In a module, I have defined a function - get_user_inputs(self). I used the argument self as PyDev would not let me define the function othewise (and apparently it is the... | TITLE:
pydev - call a function with only self as argument
QUESTION:
I am new to PyDev, written scripts using mainly notepad++ and jedit where I never had these issues. In a module, I have defined a function - get_user_inputs(self). I used the argument self as PyDev would not let me define the function othewise (and ap... | [
"python",
"pydev"
] | 0 | 1 | 219 | 1 | 0 | 2011-05-31T13:39:13.827000 | 2011-05-31T13:42:11.690000 |
6,188,465 | 6,188,495 | Homework - Printing lines of a file between two line numbers | Using Python, how do I print the lines of a text file, given a starting and ending line number? I have come up with a function, but this doesn't work. def printPart(src, des, varFile): returnLines = "" for curLine in range(src, des): returnLines += linecache.getline(varFile, curLine) return returnLines | Since file objects are iterable in Python, you can apply all the functions from itertools to them. Have a look at itertools.islice(). (Since this is homework, I'll leave the details to you.) | Homework - Printing lines of a file between two line numbers Using Python, how do I print the lines of a text file, given a starting and ending line number? I have come up with a function, but this doesn't work. def printPart(src, des, varFile): returnLines = "" for curLine in range(src, des): returnLines += linecache.... | TITLE:
Homework - Printing lines of a file between two line numbers
QUESTION:
Using Python, how do I print the lines of a text file, given a starting and ending line number? I have come up with a function, but this doesn't work. def printPart(src, des, varFile): returnLines = "" for curLine in range(src, des): returnL... | [
"python",
"file",
"line"
] | 1 | 6 | 490 | 2 | 0 | 2011-05-31T13:39:34.437000 | 2011-05-31T13:41:55.540000 |
6,188,466 | 6,188,586 | What is "Aware" ? When should I include in my Class name? | Sometimes, I find some class names including Aware such as ApplicationContextAware and MessageSourceAware (spring). Does this Aware have any special meanings or is it a famous rule? | Those are not classes, are interfaces. The name is just a convention on Spring meaning that some special framework object is going to be injected to that class if it is managed by the framework. Directly from the docs of ApplicationContextAware: Interface to be implemented by any object that wishes to be notified of th... | What is "Aware" ? When should I include in my Class name? Sometimes, I find some class names including Aware such as ApplicationContextAware and MessageSourceAware (spring). Does this Aware have any special meanings or is it a famous rule? | TITLE:
What is "Aware" ? When should I include in my Class name?
QUESTION:
Sometimes, I find some class names including Aware such as ApplicationContextAware and MessageSourceAware (spring). Does this Aware have any special meanings or is it a famous rule?
ANSWER:
Those are not classes, are interfaces. The name is ju... | [
"java",
"spring",
"naming-conventions"
] | 21 | 19 | 8,606 | 4 | 0 | 2011-05-31T13:39:39.430000 | 2011-05-31T13:48:59.297000 |
6,188,470 | 6,188,550 | Unable to execute java GUI program with Eclipse 3.6 | I am unable to execute java gui program in eclipse 3.6 under ubuntu 11.04. when i click on run as Java Application nothing happens. When i switched to console there just So what to do. I have installed jdk 1.6.0_25 Also there is an openjdk installed in my system. but i don't know how to configure this with eclipse. Her... | You need to set your window visible in order for it to show. add the line setVisible(true); | Unable to execute java GUI program with Eclipse 3.6 I am unable to execute java gui program in eclipse 3.6 under ubuntu 11.04. when i click on run as Java Application nothing happens. When i switched to console there just So what to do. I have installed jdk 1.6.0_25 Also there is an openjdk installed in my system. but ... | TITLE:
Unable to execute java GUI program with Eclipse 3.6
QUESTION:
I am unable to execute java gui program in eclipse 3.6 under ubuntu 11.04. when i click on run as Java Application nothing happens. When i switched to console there just So what to do. I have installed jdk 1.6.0_25 Also there is an openjdk installed ... | [
"java",
"eclipse",
"user-interface",
"ubuntu"
] | 0 | 4 | 3,895 | 1 | 0 | 2011-05-31T13:39:50.407000 | 2011-05-31T13:46:30.753000 |
6,188,471 | 6,188,629 | How to cause delay that work synchronic with the code -javascript | for(i=0;i<10;i++){
code
setTimeout
code
} I want to prevent from the loop to proceed until timeout is finish,any idea?? | If you've got Function.prototype.bind() available: function operation() { if (!this) return; // do something setTimeout(operation.bind(--this), 1000); } setTimeout(operation.bind(10), 1000); | How to cause delay that work synchronic with the code -javascript for(i=0;i<10;i++){
code
setTimeout
code
} I want to prevent from the loop to proceed until timeout is finish,any idea?? | TITLE:
How to cause delay that work synchronic with the code -javascript
QUESTION:
for(i=0;i<10;i++){
code
setTimeout
code
} I want to prevent from the loop to proceed until timeout is finish,any idea??
ANSWER:
If you've got Function.prototype.bind() available: function operation() { if (!this) return; // do some... | [
"javascript"
] | 0 | 0 | 162 | 4 | 0 | 2011-05-31T13:39:59.203000 | 2011-05-31T13:52:22.403000 |
6,188,478 | 6,188,659 | Insert document inside another document | how can I insert a document inside another document with mongodb? I've tried something like the code below but I always have a problem converting my list of setting in the field Settings: var settingViewModels = new[]{ setting }; var query = Query.EQ("Name", applicationName); var update = Update.AddToSet("Settings", Bs... | If you want add setting item to the Settings[] array of Application collection you should use ToBsonDocument() extention method from MongoDB.Bson namespace: var update = Update.AddToSet("Settings", setting.ToBsonDocument()); You no need create BsonArray. | Insert document inside another document how can I insert a document inside another document with mongodb? I've tried something like the code below but I always have a problem converting my list of setting in the field Settings: var settingViewModels = new[]{ setting }; var query = Query.EQ("Name", applicationName); var... | TITLE:
Insert document inside another document
QUESTION:
how can I insert a document inside another document with mongodb? I've tried something like the code below but I always have a problem converting my list of setting in the field Settings: var settingViewModels = new[]{ setting }; var query = Query.EQ("Name", app... | [
"c#",
"mongodb",
"mongodb-.net-driver"
] | 1 | 2 | 899 | 1 | 0 | 2011-05-31T13:40:31.237000 | 2011-05-31T13:54:46.807000 |
6,188,498 | 6,188,898 | Jquery datepicker value on Controller action method | I've created a extension method of Jquery datepicker, below are the source code. public static string DatePicker(this HtmlHelper htmlHelper, string name, DateTime? value) { if (!string.IsNullOrEmpty(name)) { return " " + " "; }
return string.Empty; } I have used the above extension method in the View. @Html.LabelFor(m... | The short answer is: because your input name should be "Committee.AppointedDate" but you pass "CommitteeAppointedDate". | Jquery datepicker value on Controller action method I've created a extension method of Jquery datepicker, below are the source code. public static string DatePicker(this HtmlHelper htmlHelper, string name, DateTime? value) { if (!string.IsNullOrEmpty(name)) { return " " + " "; }
return string.Empty; } I have used the ... | TITLE:
Jquery datepicker value on Controller action method
QUESTION:
I've created a extension method of Jquery datepicker, below are the source code. public static string DatePicker(this HtmlHelper htmlHelper, string name, DateTime? value) { if (!string.IsNullOrEmpty(name)) { return " " + " "; }
return string.Empty; ... | [
"c#",
".net",
"asp.net",
"jquery-ui",
"asp.net-mvc-3"
] | 0 | 1 | 625 | 1 | 0 | 2011-05-31T13:42:09.410000 | 2011-05-31T14:13:20.640000 |
6,188,500 | 6,188,972 | Xcode Error: "EXC_BAD_ACCESS" | I am attempting to compile and run a C program in Xcode. This program requires a text file for reading input and another text file for writing the data. I have put the program, and these two text files in the Source folder. The program builds successfully, but when I try to run the program I get the error: GDB: Program... | The program works almost properly. I got this output: timeImpact: 28.457277 xImpact: 7798.595703 yImpact: 0.000000 vxImpact: 315.561859 vyImpact: 73.370865 Number of Bounce(s): 1
timeImpact: -315.561096 xImpact: 984718.250000 yImpact: 0.000000 vxImpact: -3213.589600 vyImpact: 36.704834 Number of Bounce(s): 2
timeImpa... | Xcode Error: "EXC_BAD_ACCESS" I am attempting to compile and run a C program in Xcode. This program requires a text file for reading input and another text file for writing the data. I have put the program, and these two text files in the Source folder. The program builds successfully, but when I try to run the program... | TITLE:
Xcode Error: "EXC_BAD_ACCESS"
QUESTION:
I am attempting to compile and run a C program in Xcode. This program requires a text file for reading input and another text file for writing the data. I have put the program, and these two text files in the Source folder. The program builds successfully, but when I try ... | [
"c",
"xcode"
] | 1 | 3 | 4,409 | 2 | 0 | 2011-05-31T13:42:14.170000 | 2011-05-31T14:19:27.363000 |
6,188,502 | 6,188,519 | Unable to delete log entries in database due to insufficient space | We ran into an issue where our log table got far larger far faster than was really anticipated and appear to have filled up most of our allocated database space. We don't have the ability to increase the amount of available space, so we decided to clear out the log files. However, apparently we don't have enough space ... | You should be able to use the truncate table instead. http://msdn.microsoft.com/en-us/library/ms177570.aspx | Unable to delete log entries in database due to insufficient space We ran into an issue where our log table got far larger far faster than was really anticipated and appear to have filled up most of our allocated database space. We don't have the ability to increase the amount of available space, so we decided to clear... | TITLE:
Unable to delete log entries in database due to insufficient space
QUESTION:
We ran into an issue where our log table got far larger far faster than was really anticipated and appear to have filled up most of our allocated database space. We don't have the ability to increase the amount of available space, so w... | [
"sql",
"sql-server-2008-r2"
] | 1 | 1 | 1,485 | 4 | 0 | 2011-05-31T13:42:19.520000 | 2011-05-31T13:44:01.143000 |
6,188,516 | 6,189,679 | FullCalendar with JSON feed loading slowly | I'm using FullCalendar to load events from custom post types on WP, through a JSON feed. It's working, but it's taking some time to load. Please check here: http://cea3.iscte.pt/en/agenda-3/ (june or august). Do any of you have a clue what can be causing it? This is the full code for the JSON feed: posts wposts, $wpdb-... | It does seem like it takes a few seconds to load. I use this calendar and it takes about 2-6 seconds to load- The longest was 6 seconds but i had about 3 sources and ~40 events. Now I am not sure if that for you is a long time because you did not specify how long it actaully takes. It looks like the call is on the same... | FullCalendar with JSON feed loading slowly I'm using FullCalendar to load events from custom post types on WP, through a JSON feed. It's working, but it's taking some time to load. Please check here: http://cea3.iscte.pt/en/agenda-3/ (june or august). Do any of you have a clue what can be causing it? This is the full c... | TITLE:
FullCalendar with JSON feed loading slowly
QUESTION:
I'm using FullCalendar to load events from custom post types on WP, through a JSON feed. It's working, but it's taking some time to load. Please check here: http://cea3.iscte.pt/en/agenda-3/ (june or august). Do any of you have a clue what can be causing it? ... | [
"wordpress",
"fullcalendar"
] | 3 | 1 | 1,827 | 1 | 0 | 2011-05-31T13:43:53.280000 | 2011-05-31T15:10:08.123000 |
6,188,526 | 6,188,562 | Linked List in Java, How to cast String array into List? | Can you tell me what does this method return type is: List recommend(Car a, Driver b) {... } I just want to know about List keyword. Is this standard linked list or soemthing else. If i have objects of passenger type. How can I add them in a List? | List in java is an interface. It means that it is not a concrete implementation, but the interface to it. The concrete implementation the method can return can be LinkedList, ArrayList or any other class which implements the List interface. Read more in javadoc. Basically, you add the elements to the list using methods... | Linked List in Java, How to cast String array into List? Can you tell me what does this method return type is: List recommend(Car a, Driver b) {... } I just want to know about List keyword. Is this standard linked list or soemthing else. If i have objects of passenger type. How can I add them in a List? | TITLE:
Linked List in Java, How to cast String array into List?
QUESTION:
Can you tell me what does this method return type is: List recommend(Car a, Driver b) {... } I just want to know about List keyword. Is this standard linked list or soemthing else. If i have objects of passenger type. How can I add them in a Lis... | [
"java",
"arrays",
"list",
"linked-list"
] | 2 | 5 | 2,670 | 7 | 0 | 2011-05-31T13:44:58.487000 | 2011-05-31T13:47:32.953000 |
6,188,529 | 6,188,579 | How can I rewrite jQuery without guard clause? | How can I rewrite this jQuery to be more terse and without the guard clause? var myTextBox = $('#myTextBox');
if (myTextBox ) myTextBox.val(""); The guard clause is there simply to ensure that the element exists on the page before trying to set it's value but the code seems bloated and most of it unnecessary. What's t... | $('#myTextBox').val("") will do nothing if the jQuery object has a length of 0, so simply use it. | How can I rewrite jQuery without guard clause? How can I rewrite this jQuery to be more terse and without the guard clause? var myTextBox = $('#myTextBox');
if (myTextBox ) myTextBox.val(""); The guard clause is there simply to ensure that the element exists on the page before trying to set it's value but the code see... | TITLE:
How can I rewrite jQuery without guard clause?
QUESTION:
How can I rewrite this jQuery to be more terse and without the guard clause? var myTextBox = $('#myTextBox');
if (myTextBox ) myTextBox.val(""); The guard clause is there simply to ensure that the element exists on the page before trying to set it's valu... | [
"javascript",
"jquery"
] | 1 | 6 | 215 | 4 | 0 | 2011-05-31T13:45:02.343000 | 2011-05-31T13:48:26.040000 |
6,188,530 | 6,189,802 | Can't find Html.TextBox | I am trying to get an old application that was written using a mvc preview version and have run in the following problem. <%= Html.TextBox("Register_Name", ViewData.Model.Register.Name, 20, 30, new { _class = "textInput username" })%> This is the error i get: 'System.Web.Mvc.HtmlHelper' does not contain a definition fo... | do you have in start of the page where do you want to use it <%@ Page..... Inherits="System.Web.Mvc.ViewPage"%> | Can't find Html.TextBox I am trying to get an old application that was written using a mvc preview version and have run in the following problem. <%= Html.TextBox("Register_Name", ViewData.Model.Register.Name, 20, 30, new { _class = "textInput username" })%> This is the error i get: 'System.Web.Mvc.HtmlHelper' does not... | TITLE:
Can't find Html.TextBox
QUESTION:
I am trying to get an old application that was written using a mvc preview version and have run in the following problem. <%= Html.TextBox("Register_Name", ViewData.Model.Register.Name, 20, 30, new { _class = "textInput username" })%> This is the error i get: 'System.Web.Mvc.Ht... | [
"c#",
"asp.net",
"asp.net-mvc-2",
".net-3.0"
] | 0 | 0 | 436 | 2 | 0 | 2011-05-31T13:45:08.270000 | 2011-05-31T15:19:28.773000 |
6,188,534 | 6,191,426 | How to capture entire webpage in iPhone safari? | Like in Firefox (Desktop version) I can take using Fireshot and in Android mobile I can take using Dolphin Screen Cut I already know that we take screendump using wake+home it doesn't take screencapture of whole webpage including the area under the scroll and it would be difficult to take multiple screenshots by pressi... | After-all I found the solution This app worked for me perfectly Website Screenshot (iPhone app) | How to capture entire webpage in iPhone safari? Like in Firefox (Desktop version) I can take using Fireshot and in Android mobile I can take using Dolphin Screen Cut I already know that we take screendump using wake+home it doesn't take screencapture of whole webpage including the area under the scroll and it would be ... | TITLE:
How to capture entire webpage in iPhone safari?
QUESTION:
Like in Firefox (Desktop version) I can take using Fireshot and in Android mobile I can take using Dolphin Screen Cut I already know that we take screendump using wake+home it doesn't take screencapture of whole webpage including the area under the scrol... | [
"iphone",
"screen-scraping",
"mobile-safari",
"screenshot"
] | 1 | 1 | 9,944 | 4 | 0 | 2011-05-31T13:45:25.710000 | 2011-05-31T17:47:17.920000 |
6,188,543 | 6,188,691 | Customize header section for UITableViewController | I'll need to customize the header section of a UITableViewController where for each sections a different header text is returned (getting data from datasource as well). This is accomplished using the following: - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { NSArray *temp =... | You can set explicitly the delegate: detailViewController.tableView.delegate = detailViewController; Or you can do it in the controller initial function. EDIT: your init method should conform to the canonical init. Furthermore, it seems to me that you have not created your UITableView. Try and use this code: - (id)init... | Customize header section for UITableViewController I'll need to customize the header section of a UITableViewController where for each sections a different header text is returned (getting data from datasource as well). This is accomplished using the following: - (NSString *)tableView:(UITableView *)tableView titleForH... | TITLE:
Customize header section for UITableViewController
QUESTION:
I'll need to customize the header section of a UITableViewController where for each sections a different header text is returned (getting data from datasource as well). This is accomplished using the following: - (NSString *)tableView:(UITableView *)t... | [
"iphone",
"objective-c",
"ipad",
"uitableview"
] | 6 | 3 | 26,801 | 4 | 0 | 2011-05-31T13:45:53.840000 | 2011-05-31T13:57:12.510000 |
6,188,544 | 6,188,684 | Dynamic forms | I want to create a script that does the following: When answering questions via a radio, drop-down, or checkbox, the script checks When selecting a radio button (or dropdown, or any form element except text and textarea) it checks if the given option will make the script to ask more questions. Example: A checkbox in fr... | Assuming some html structure like this: What do you want? thing item How many of them? five ten And using jQuery library (which makes life lots easier in cases like this) you can do this: $('.sub-question').hide() $('.top-question').bind('change',function(){ $('.sub-question').show() }) As demonstrated here: http://jsf... | Dynamic forms I want to create a script that does the following: When answering questions via a radio, drop-down, or checkbox, the script checks When selecting a radio button (or dropdown, or any form element except text and textarea) it checks if the given option will make the script to ask more questions. Example: A ... | TITLE:
Dynamic forms
QUESTION:
I want to create a script that does the following: When answering questions via a radio, drop-down, or checkbox, the script checks When selecting a radio button (or dropdown, or any form element except text and textarea) it checks if the given option will make the script to ask more ques... | [
"php",
"jquery",
"ajax",
"dynamic-forms"
] | 2 | 3 | 663 | 3 | 0 | 2011-05-31T13:45:57.597000 | 2011-05-31T13:56:42.360000 |
6,188,548 | 6,191,546 | MVP - Showing/hiding controls based on business logic | What would be the best way of going about this? I have a method in the presenter that populates various textboxes using a switch statement, but also needs to make sure that only these textboxes are visible, eg.: switch (operation.CalculationType) { case CalcType.Type1: textbox1.Visible = true _view.TextBox1 = "some val... | If the variable _view is not an interface you should make it one, implement it and then add a method or methods that setup which textboxes are visible. This way it is clear in the code what you are trying to do and it not tied to that particular form implementation. Inteface IFormView Sub DisplayType1 Sub DisplayType2.... | MVP - Showing/hiding controls based on business logic What would be the best way of going about this? I have a method in the presenter that populates various textboxes using a switch statement, but also needs to make sure that only these textboxes are visible, eg.: switch (operation.CalculationType) { case CalcType.Typ... | TITLE:
MVP - Showing/hiding controls based on business logic
QUESTION:
What would be the best way of going about this? I have a method in the presenter that populates various textboxes using a switch statement, but also needs to make sure that only these textboxes are visible, eg.: switch (operation.CalculationType) {... | [
"controls",
"hide",
"mvp",
"show"
] | 0 | 0 | 341 | 1 | 0 | 2011-05-31T13:46:13.047000 | 2011-05-31T17:59:00.087000 |
6,188,549 | 6,188,590 | value becoming 0 for no obvious reason | for some reason, the value mod i am creating is becoming 0 in keygen despite being correct when it is made and after keygen is run. i dont get why. can anyone tell me? class RC5{ private: uint64_t w, r, b; uint128_t mod; std::string mode; std::vector S;
public: RC5(std::string KEY, std::string MODE, uint64_t W = 32, u... | erm, because in the ctor you are modifying a local variable called mod which shadows your class member. | value becoming 0 for no obvious reason for some reason, the value mod i am creating is becoming 0 in keygen despite being correct when it is made and after keygen is run. i dont get why. can anyone tell me? class RC5{ private: uint64_t w, r, b; uint128_t mod; std::string mode; std::vector S;
public: RC5(std::string KE... | TITLE:
value becoming 0 for no obvious reason
QUESTION:
for some reason, the value mod i am creating is becoming 0 in keygen despite being correct when it is made and after keygen is run. i dont get why. can anyone tell me? class RC5{ private: uint64_t w, r, b; uint128_t mod; std::string mode; std::vector S;
public: ... | [
"c++",
"variables",
"member"
] | 1 | 10 | 122 | 2 | 0 | 2011-05-31T13:46:19.693000 | 2011-05-31T13:49:10.657000 |
6,188,552 | 6,190,884 | Are there image processing modules for Python 3? | I am facing an image processing task, and I'm using Python 3.2 (on a 64-bit Windows system). All my searches for image processing libraries have come up with are libraries for older versions of Python (most notably PIL, whose current version - 1.1.7 - supports Python 2.7). Does anyone know of an image processing librar... | You can get a source version of PIL which will compile on python3.1 here: https://github.com/sloonz/pil-py3k also binary installer for 3.2 and 64-bit windows here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil ref: Image library for Python 3 | Are there image processing modules for Python 3? I am facing an image processing task, and I'm using Python 3.2 (on a 64-bit Windows system). All my searches for image processing libraries have come up with are libraries for older versions of Python (most notably PIL, whose current version - 1.1.7 - supports Python 2.7... | TITLE:
Are there image processing modules for Python 3?
QUESTION:
I am facing an image processing task, and I'm using Python 3.2 (on a 64-bit Windows system). All my searches for image processing libraries have come up with are libraries for older versions of Python (most notably PIL, whose current version - 1.1.7 - s... | [
"image",
"python-3.x"
] | 14 | 5 | 13,851 | 2 | 0 | 2011-05-31T13:46:44.730000 | 2011-05-31T16:52:38.083000 |
6,188,571 | 6,189,421 | @Select condition with Enum type does not work in @AlternateMessage annotation | Inherit com.google.gwt.i18n.I18N in your module. Create a simple Messages interface: public interface Languages extends Messages { enum Gender { MALE, FEMALE; } @AlternateMessage({ "MALE", "{0} gave you his credits.", "FEMALE", "{0} gave you her credits." }) @DefaultMessage("{0} gave you their credits.") String gaveCre... | I think it should have worked, but unfortunately there was a bug (fixed last week) that would only process @Select when there's also a @PluralCount in the method: http://code.google.com/p/google-web-toolkit/source/detail?r=10226 | @Select condition with Enum type does not work in @AlternateMessage annotation Inherit com.google.gwt.i18n.I18N in your module. Create a simple Messages interface: public interface Languages extends Messages { enum Gender { MALE, FEMALE; } @AlternateMessage({ "MALE", "{0} gave you his credits.", "FEMALE", "{0} gave you... | TITLE:
@Select condition with Enum type does not work in @AlternateMessage annotation
QUESTION:
Inherit com.google.gwt.i18n.I18N in your module. Create a simple Messages interface: public interface Languages extends Messages { enum Gender { MALE, FEMALE; } @AlternateMessage({ "MALE", "{0} gave you his credits.", "FEMA... | [
"gwt",
"resources",
"internationalization"
] | 2 | 2 | 628 | 1 | 0 | 2011-05-31T13:48:06.417000 | 2011-05-31T14:50:34.193000 |
6,188,573 | 6,188,996 | Ruby Hash difference in 1.8.7 and 1.9.2 | Given the following script, I see a different output using Ruby 1.8.7 and Ruby 1.9.2. My question is, what has changed in Ruby hashes that enforces this particular behavior? def to_params(_hash) params = '' stack = []
_hash.each do |k, v| if v.is_a?(Hash) stack << [k,v] else #v = v.first if v.is_a?(Array) params << "#... | Two things have changed (the latter being your observation): Hashes are ordered now array.to_s used to return array.join, now it returns array.inspect (see 1.8.7 and 1.9.2 ). | Ruby Hash difference in 1.8.7 and 1.9.2 Given the following script, I see a different output using Ruby 1.8.7 and Ruby 1.9.2. My question is, what has changed in Ruby hashes that enforces this particular behavior? def to_params(_hash) params = '' stack = []
_hash.each do |k, v| if v.is_a?(Hash) stack << [k,v] else #v ... | TITLE:
Ruby Hash difference in 1.8.7 and 1.9.2
QUESTION:
Given the following script, I see a different output using Ruby 1.8.7 and Ruby 1.9.2. My question is, what has changed in Ruby hashes that enforces this particular behavior? def to_params(_hash) params = '' stack = []
_hash.each do |k, v| if v.is_a?(Hash) stack... | [
"ruby"
] | 5 | 7 | 829 | 1 | 0 | 2011-05-31T13:48:11.080000 | 2011-05-31T14:21:29.593000 |
6,188,578 | 6,188,640 | LInq querying collection inside collection | my object contains a collection of collections. i like to get all child object ids and store it in a string array. MainObject contains List of parent Parent contains List of Child Child properties are (Id,Name) how can i query MainObject and find all child ids and store it in string array using linq? | You can use SelectMany: var stringArray = MainObject.ListOfParent.SelectMany(p => p.ListOfChildren.Select(c => c.Id.ToString())).ToArray() | LInq querying collection inside collection my object contains a collection of collections. i like to get all child object ids and store it in a string array. MainObject contains List of parent Parent contains List of Child Child properties are (Id,Name) how can i query MainObject and find all child ids and store it in ... | TITLE:
LInq querying collection inside collection
QUESTION:
my object contains a collection of collections. i like to get all child object ids and store it in a string array. MainObject contains List of parent Parent contains List of Child Child properties are (Id,Name) how can i query MainObject and find all child id... | [
"c#",
"linq",
"linq-to-objects"
] | 7 | 15 | 10,247 | 3 | 0 | 2011-05-31T13:48:25.027000 | 2011-05-31T13:52:51.670000 |
6,188,584 | 6,188,665 | ViewModel and Singleton Pattern | I have one ViewModel for enums handling (few entities in Entity Framework). 1) Philosophically, is it a good practice to use a SINGLETON PATTERN for this ViewModel, because it's widespread over all application and it's used on many places. 2) Isn't it a problem for ViewModel (and associated ObjectContext ) to live for ... | This should probably be broken up into two separate questions, but I'll take a stab at both: No. There's no reason a ViewModel should be a Singleton. You actually WANT multiple instances (since each is going to vary) rather than a single instance that lives for the run of the application. Just because an object is wide... | ViewModel and Singleton Pattern I have one ViewModel for enums handling (few entities in Entity Framework). 1) Philosophically, is it a good practice to use a SINGLETON PATTERN for this ViewModel, because it's widespread over all application and it's used on many places. 2) Isn't it a problem for ViewModel (and associa... | TITLE:
ViewModel and Singleton Pattern
QUESTION:
I have one ViewModel for enums handling (few entities in Entity Framework). 1) Philosophically, is it a good practice to use a SINGLETON PATTERN for this ViewModel, because it's widespread over all application and it's used on many places. 2) Isn't it a problem for View... | [
"c#",
".net",
"entity-framework",
"mvvm"
] | 10 | 19 | 22,378 | 5 | 0 | 2011-05-31T13:48:56.163000 | 2011-05-31T13:54:58.953000 |
6,188,591 | 6,188,624 | Download Github pull request as unified diff | How can I download the changes contained in a Github pull request as a unified diff? | To view a commit as a diff/patch file, just add.diff or.patch to the end of the URL, for example: https://github.com/weppos/whois/pull/90 https://github.com/weppos/whois/pull/90.diff https://github.com/weppos/whois/pull/90.patch | Download Github pull request as unified diff How can I download the changes contained in a Github pull request as a unified diff? | TITLE:
Download Github pull request as unified diff
QUESTION:
How can I download the changes contained in a Github pull request as a unified diff?
ANSWER:
To view a commit as a diff/patch file, just add.diff or.patch to the end of the URL, for example: https://github.com/weppos/whois/pull/90 https://github.com/weppos... | [
"git",
"version-control",
"github",
"diff"
] | 372 | 679 | 100,721 | 4 | 0 | 2011-05-31T13:49:16.553000 | 2011-05-31T13:51:42.467000 |
6,188,601 | 6,188,707 | How to relaunch application when app went to background to foreground in android? | In my application, i had wierd problem that when app goes background (press home button), then i should restart my app when it comes to foreground, Instead of getting previous state. Can any one help me to sort out this. EDIT: i explain my problem clearly,I am having four Activities A1,A2,A3,A4. A1 - ListActivity - loa... | Try to set in the manifest file for your homeActivity the "android:clearTaskOnLaunch" property to true. In this way when you press the home button, once the application is restarted it will display your homeActivity instead of the last started activity. | How to relaunch application when app went to background to foreground in android? In my application, i had wierd problem that when app goes background (press home button), then i should restart my app when it comes to foreground, Instead of getting previous state. Can any one help me to sort out this. EDIT: i explain m... | TITLE:
How to relaunch application when app went to background to foreground in android?
QUESTION:
In my application, i had wierd problem that when app goes background (press home button), then i should restart my app when it comes to foreground, Instead of getting previous state. Can any one help me to sort out this.... | [
"android",
"relaunch"
] | 1 | 1 | 3,676 | 2 | 0 | 2011-05-31T13:49:40.343000 | 2011-05-31T13:58:32.983000 |
6,188,620 | 6,188,670 | Guide to good text file IO C/C++ on linux | I often find myself needing to write functions to load/save from/to ASCII (or similar) text files; such as config files or data. I can and have done so many times but never feel like I do it well. ie the results are not very tolerant of minor changes to the file format. Can anyone point me to a good guide to writing ro... | Off the top of my head, there's: Glib's key-value file parser YAML Both of these are pretty standard under linux. | Guide to good text file IO C/C++ on linux I often find myself needing to write functions to load/save from/to ASCII (or similar) text files; such as config files or data. I can and have done so many times but never feel like I do it well. ie the results are not very tolerant of minor changes to the file format. Can any... | TITLE:
Guide to good text file IO C/C++ on linux
QUESTION:
I often find myself needing to write functions to load/save from/to ASCII (or similar) text files; such as config files or data. I can and have done so many times but never feel like I do it well. ie the results are not very tolerant of minor changes to the fi... | [
"c++",
"c",
"linux",
"file-io"
] | 4 | 5 | 612 | 2 | 0 | 2011-05-31T13:51:19.317000 | 2011-05-31T13:55:26.647000 |
6,188,623 | 6,208,442 | Flex TitleWindow simulate drop and prevent dragging for a few seconds? | I wish while I am dragging and moving around TitleWindow instance and a specific event occure to simulate drop of the window, and not further moving been possible for a few seconds. It is very unusual question but it will be more than handy each point to a solution P.S: The whole idea is as follow: When I am dragging a... | @Yordan: Let's see if I understand you correctly. The demo below will "stop" a window from being drug offstage. When you try to drag it off the top or left border, it will "simulate the release mouse button" as you requested. The right and bottom border won't cause this to occur. AutoDropTitleWindow.mxml: import mx.man... | Flex TitleWindow simulate drop and prevent dragging for a few seconds? I wish while I am dragging and moving around TitleWindow instance and a specific event occure to simulate drop of the window, and not further moving been possible for a few seconds. It is very unusual question but it will be more than handy each poi... | TITLE:
Flex TitleWindow simulate drop and prevent dragging for a few seconds?
QUESTION:
I wish while I am dragging and moving around TitleWindow instance and a specific event occure to simulate drop of the window, and not further moving been possible for a few seconds. It is very unusual question but it will be more t... | [
"apache-flex",
"actionscript-3",
"move",
"drag"
] | 0 | 2 | 618 | 1 | 0 | 2011-05-31T13:51:41.920000 | 2011-06-01T22:22:04.450000 |
6,188,627 | 6,188,758 | Where to store minor user data types when implementing DI/IoC | There's a same question I keep asking myself each time a new Dependency Injection based solution is being started. I usually have a dedicated assembly for interfaces - this one is referenced by each and every other solution modules. Should I need to use some small user data types, I use to store those in interfaces ass... | Why do you need to reference Common.Scheduler when you call IScheduler.ScheduleTask? This method correctly uses the interface, so calling this method doesn't require you to reference Common.Scheduler. You only need to reference that assembly if you are working with one of the concrete types SimpleTask or ComplexTask. I... | Where to store minor user data types when implementing DI/IoC There's a same question I keep asking myself each time a new Dependency Injection based solution is being started. I usually have a dedicated assembly for interfaces - this one is referenced by each and every other solution modules. Should I need to use some... | TITLE:
Where to store minor user data types when implementing DI/IoC
QUESTION:
There's a same question I keep asking myself each time a new Dependency Injection based solution is being started. I usually have a dedicated assembly for interfaces - this one is referenced by each and every other solution modules. Should ... | [
"c#",
".net",
"design-patterns",
"dependency-injection"
] | 0 | 0 | 102 | 1 | 0 | 2011-05-31T13:51:56.410000 | 2011-05-31T14:01:58.593000 |
6,188,633 | 6,188,688 | In Mercurial, what's the difference between a 'head' and a 'branch'? | I'm new to Mercurial, and DVCS in general. What's the difference between a head and a branch? | If you view it as a tree, then a head is a leaf, at the very end of a branch. It's explained really well at Mercurial's own wiki: Branches Heads | In Mercurial, what's the difference between a 'head' and a 'branch'? I'm new to Mercurial, and DVCS in general. What's the difference between a head and a branch? | TITLE:
In Mercurial, what's the difference between a 'head' and a 'branch'?
QUESTION:
I'm new to Mercurial, and DVCS in general. What's the difference between a head and a branch?
ANSWER:
If you view it as a tree, then a head is a leaf, at the very end of a branch. It's explained really well at Mercurial's own wiki: ... | [
"mercurial",
"dvcs"
] | 7 | 8 | 2,664 | 4 | 0 | 2011-05-31T13:52:36.473000 | 2011-05-31T13:57:03.397000 |
6,188,636 | 6,190,973 | C# Tie ListView items with objects | Whats the best way to tie ListView item with a object so when i move the item form one listview to another then i would be still able to tell to what object its assigned. For example, i have object Cards. All these are listed in a allCards ListView. I have another selectedCards ListView and a button what moves selected... | To expand on @CharithJ's answer, this is how you would use the tag property: ListView allCardsListView = new ListView(); ListView selectedCardsListView = new ListView(); List allCards = new List (); List selectedCards = new List (); public Form1() { InitializeComponent();
foreach (Card selectedCard in selectedCards) {... | C# Tie ListView items with objects Whats the best way to tie ListView item with a object so when i move the item form one listview to another then i would be still able to tell to what object its assigned. For example, i have object Cards. All these are listed in a allCards ListView. I have another selectedCards ListVi... | TITLE:
C# Tie ListView items with objects
QUESTION:
Whats the best way to tie ListView item with a object so when i move the item form one listview to another then i would be still able to tell to what object its assigned. For example, i have object Cards. All these are listed in a allCards ListView. I have another se... | [
"c#",
"winforms",
"listview"
] | 6 | 5 | 11,056 | 4 | 0 | 2011-05-31T13:52:46.287000 | 2011-05-31T17:01:59.377000 |
6,188,639 | 6,189,453 | View-Model wiring up difficulties | So I have fields on my view wired up to my base model class like so: <%= Html.TextBox("FixedRateOverride", Model.FixedRateOverride.HasValue? Model.FixedRateOverride.Value.ToString(Chatham.Web.Data.Constants.Format.FiveDecimalPlacesFormatString): "", new { @class = "economicTextBox", propertyName = "FixedRateOverride", ... | I found one way to do it, but I doubt it's the most efficient or recommended way, although it might be. I change the call to the Model in the embedded controls to just casting it as the sub-model like so: ((SubModel)Model) Seems to work, but like I said, looks weird, and there is probably a better way to do it, but thi... | View-Model wiring up difficulties So I have fields on my view wired up to my base model class like so: <%= Html.TextBox("FixedRateOverride", Model.FixedRateOverride.HasValue? Model.FixedRateOverride.Value.ToString(Chatham.Web.Data.Constants.Format.FiveDecimalPlacesFormatString): "", new { @class = "economicTextBox", pr... | TITLE:
View-Model wiring up difficulties
QUESTION:
So I have fields on my view wired up to my base model class like so: <%= Html.TextBox("FixedRateOverride", Model.FixedRateOverride.HasValue? Model.FixedRateOverride.Value.ToString(Chatham.Web.Data.Constants.Format.FiveDecimalPlacesFormatString): "", new { @class = "ec... | [
"c#",
".net",
"asp.net-mvc-2",
"view",
"model"
] | 1 | 0 | 143 | 1 | 0 | 2011-05-31T13:52:51.357000 | 2011-05-31T14:52:45.133000 |
6,188,641 | 6,188,828 | Finding set of colours that are distinguishable to each other | I am writing a graph plotting program. I thus am looking ways to obtain colours that are distinguishable to each other in order to plot various graphs in one cell. Is there an algorithm or some website that obtains rgb values that matches this criteria? EDIT: I am looking for 16 different colours | For an automatic solution, you can take one color as the base color and obtain good matching colors by changing the hue in the HSV/HSB color space. If you need 4 colors for example you could rotate the hue by 90° for each color. | Finding set of colours that are distinguishable to each other I am writing a graph plotting program. I thus am looking ways to obtain colours that are distinguishable to each other in order to plot various graphs in one cell. Is there an algorithm or some website that obtains rgb values that matches this criteria? EDIT... | TITLE:
Finding set of colours that are distinguishable to each other
QUESTION:
I am writing a graph plotting program. I thus am looking ways to obtain colours that are distinguishable to each other in order to plot various graphs in one cell. Is there an algorithm or some website that obtains rgb values that matches t... | [
"graph",
"colors"
] | 2 | 1 | 171 | 2 | 0 | 2011-05-31T13:52:57.380000 | 2011-05-31T14:07:54.057000 |
6,188,643 | 6,261,604 | How to safely stream data through a server socket to another socket? | I'm writing a server application for an iPhone application im designing. iPhone app is written in C# (MonoTouch) and the server is written in C# too (.NET 4.0) I'm using asynchronous sockets for the network layer. The server allows two or more iPhones ("devices") to connect to each other and be able to send data bi-dir... | Thanks for the help everyone, i've realised the simpliest approach is to use synchronous send commands on the client, or at least a send command that must complete before the next item is sent. Im handling this with my own send queue on the client, rather than various parts of the app just calling send() when they need... | How to safely stream data through a server socket to another socket? I'm writing a server application for an iPhone application im designing. iPhone app is written in C# (MonoTouch) and the server is written in C# too (.NET 4.0) I'm using asynchronous sockets for the network layer. The server allows two or more iPhones... | TITLE:
How to safely stream data through a server socket to another socket?
QUESTION:
I'm writing a server application for an iPhone application im designing. iPhone app is written in C# (MonoTouch) and the server is written in C# too (.NET 4.0) I'm using asynchronous sockets for the network layer. The server allows t... | [
"c#",
"thread-safety",
"xamarin.ios",
"asyncsocket"
] | 0 | 0 | 1,671 | 3 | 0 | 2011-05-31T13:53:01.500000 | 2011-06-07T06:55:18.203000 |
6,188,652 | 6,188,662 | escaping a value in javascript when submitting form onclick | I am sending sensitive data encrypted when the user clicks the onclick event. This encrypted data at times contains a plus sign ( + ) When I retrieve this request variable on the server, the + is getting converted to a whitespace. This causes the decryption to fail. Example: xrUxHtYpO2Yu3Z31ve+KNA== gets converted to: ... | The function you're looking for is "encodeURIComponent()": var encoded = encodeURIComponent("nasty string"); You shouldn't need any code at all on the server side; URL encoding will almost certainly be implicitly un-done by your web framework. (Edit - ah, if you're using some Java/JSP web framework, then you definitely... | escaping a value in javascript when submitting form onclick I am sending sensitive data encrypted when the user clicks the onclick event. This encrypted data at times contains a plus sign ( + ) When I retrieve this request variable on the server, the + is getting converted to a whitespace. This causes the decryption to... | TITLE:
escaping a value in javascript when submitting form onclick
QUESTION:
I am sending sensitive data encrypted when the user clicks the onclick event. This encrypted data at times contains a plus sign ( + ) When I retrieve this request variable on the server, the + is getting converted to a whitespace. This causes... | [
"java",
"javascript",
"jsp"
] | 1 | 5 | 1,432 | 2 | 0 | 2011-05-31T13:53:31.653000 | 2011-05-31T13:54:48.240000 |
6,188,653 | 6,193,012 | Relocate contents of dynamic folder | I have a zip file which has one base folder inside it with other content inside that. I don't always know what that base folder is going to be called until I unzip it. I'd like to move that base folder, and rename it at the same time, in ant - but can't seem to find out how. I've written code to extract the contents of... | You can do all this in one step - copy from the zip file and rename the files changing the dir name as you copy. The copy task accepts a nested resource collection, so you can use a zipfileset to specify the files to copy directly from the zip file. In order to rename the files as they are copied, you can use a mapper,... | Relocate contents of dynamic folder I have a zip file which has one base folder inside it with other content inside that. I don't always know what that base folder is going to be called until I unzip it. I'd like to move that base folder, and rename it at the same time, in ant - but can't seem to find out how. I've wri... | TITLE:
Relocate contents of dynamic folder
QUESTION:
I have a zip file which has one base folder inside it with other content inside that. I don't always know what that base folder is going to be called until I unzip it. I'd like to move that base folder, and rename it at the same time, in ant - but can't seem to find... | [
"ant",
"rename",
"move"
] | 1 | 2 | 660 | 2 | 0 | 2011-05-31T13:53:47.863000 | 2011-05-31T20:13:02.010000 |
6,188,655 | 6,188,783 | Getting number of commits made to branch in git | Let say I create a branch called foo from master and while working on it, I perform a lot of local commits. I am now done with the branch an want to merge it back into master however while I don't want to squash all commits into just one commit when merging back which I know can be done with: #from master branch git me... | I'd simply git rebase -i origin/master or whatever you branched from, so the resulting history will appear I started from later version and the merge back will probably be fast-forward (it's easier to work with, especially since you are rewriting the actual history to logical changesets anyway). But if you want to keep... | Getting number of commits made to branch in git Let say I create a branch called foo from master and while working on it, I perform a lot of local commits. I am now done with the branch an want to merge it back into master however while I don't want to squash all commits into just one commit when merging back which I k... | TITLE:
Getting number of commits made to branch in git
QUESTION:
Let say I create a branch called foo from master and while working on it, I perform a lot of local commits. I am now done with the branch an want to merge it back into master however while I don't want to squash all commits into just one commit when merg... | [
"git",
"version-control"
] | 0 | 2 | 150 | 2 | 0 | 2011-05-31T13:54:05.337000 | 2011-05-31T14:04:06.047000 |
6,188,669 | 6,191,281 | Is there any multiple file uploader control in asp.net (just the same as pre-image)? | this is what my project need for multiple file uploader control, is there any control can do the same thing as it? | You could try the Flajaxian File Uploader. It's a free open source ASP.Net control for doing multiple uploads. It does require the use of Flash in the browser, which is a dependency you will need to consider. It describes itself as: a.NET web control designed for asynchronous file upload of multiple files at the same t... | Is there any multiple file uploader control in asp.net (just the same as pre-image)? this is what my project need for multiple file uploader control, is there any control can do the same thing as it? | TITLE:
Is there any multiple file uploader control in asp.net (just the same as pre-image)?
QUESTION:
this is what my project need for multiple file uploader control, is there any control can do the same thing as it?
ANSWER:
You could try the Flajaxian File Uploader. It's a free open source ASP.Net control for doing ... | [
"jquery",
"asp.net",
"multifile-uploader"
] | 0 | 0 | 814 | 1 | 0 | 2011-05-31T13:55:19.050000 | 2011-05-31T17:33:15.363000 |
6,188,671 | 6,188,724 | Quickest and most efficient way to traverse an ArrayList in reverse | Is there a quicker, more efficient means of doing so than using a ListIterator? ListIterator itr = list.listIterator(list.size()); while(itr.hasPrevious()){ System.out.println(itr.previous()); } | Depending on the implementation of the List and ListIterator the following may be (slightly) quicker. List l; for (int i = l.size()-1; i >=0; i--) { System.out.println(l.get(i)); } This may be faster for an ArrayList but it will almost certainly be slower for a LinkedList. Your best bet is to just use the iterator. It ... | Quickest and most efficient way to traverse an ArrayList in reverse Is there a quicker, more efficient means of doing so than using a ListIterator? ListIterator itr = list.listIterator(list.size()); while(itr.hasPrevious()){ System.out.println(itr.previous()); } | TITLE:
Quickest and most efficient way to traverse an ArrayList in reverse
QUESTION:
Is there a quicker, more efficient means of doing so than using a ListIterator? ListIterator itr = list.listIterator(list.size()); while(itr.hasPrevious()){ System.out.println(itr.previous()); }
ANSWER:
Depending on the implementatio... | [
"java",
"arraylist",
"iteration",
"micro-optimization"
] | 8 | 10 | 9,005 | 5 | 0 | 2011-05-31T13:55:53.310000 | 2011-05-31T13:59:19.480000 |
6,188,672 | 6,188,713 | Where do you declare a constant in Objective-C? | I declared a constant in a header file const double EARTH_RADIUS=6353; that is imported to various other headers and I got a linker error. Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew normal i386 cd /Users/Teguh/D... | You can declare in the header, define it in a code file. Simply declare it as extern const double EARTH_RADIUS; then in a.m file somewhere (usually the.m for the.h you declared it in) const double EARTH_RADIUS = 6353; | Where do you declare a constant in Objective-C? I declared a constant in a header file const double EARTH_RADIUS=6353; that is imported to various other headers and I got a linker error. Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/Badge... | TITLE:
Where do you declare a constant in Objective-C?
QUESTION:
I declared a constant in a header file const double EARTH_RADIUS=6353; that is imported to various other headers and I got a linker error. Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iph... | [
"objective-c"
] | 56 | 98 | 74,165 | 4 | 0 | 2011-05-31T13:55:56.833000 | 2011-05-31T13:58:45.210000 |
6,188,674 | 6,188,834 | pass text values without lose Enter(return)value jquery | i have a text area where i put my code and below div that shows a preview about the user are typing in the text area the problem it's that if the user press the enter key i lose the value. How can i pass this value???. Or am i doing wrong my method the html the js $(document).ready(initialize);
function initialize(){
... | I did small change to your code is this what you need? function previewData() {
$messageValues.html(''); var aux = this.value.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,' '); $messageValues.append(' ' + aux + ' '); } http://jsfiddle.net/hfV7y/ | pass text values without lose Enter(return)value jquery i have a text area where i put my code and below div that shows a preview about the user are typing in the text area the problem it's that if the user press the enter key i lose the value. How can i pass this value???. Or am i doing wrong my method the html the js... | TITLE:
pass text values without lose Enter(return)value jquery
QUESTION:
i have a text area where i put my code and below div that shows a preview about the user are typing in the text area the problem it's that if the user press the enter key i lose the value. How can i pass this value???. Or am i doing wrong my meth... | [
"jquery",
"string"
] | 0 | 1 | 200 | 2 | 0 | 2011-05-31T13:56:01.997000 | 2011-05-31T14:08:27.757000 |
6,188,678 | 6,188,872 | Url pathname issue in Ajax Post | In development I make an Ajax post which works in development. However when I put it on the Test server it doesn't work because IIS has assigned the application a subfolder, and this is missing in my development environment. I have found work around (see below) but I am the first to admit this should not be the solutio... | If you have your javascript in.aspx file, you can generate url like this: function OperationsManagerFlagClickFunc(userId) { $.ajax({ url: "<%= Url.Action("UpdateOperationsManagerFlag","User") %>", type: "POST", data: { "userId": userId }, success: function (data) { } }); } | Url pathname issue in Ajax Post In development I make an Ajax post which works in development. However when I put it on the Test server it doesn't work because IIS has assigned the application a subfolder, and this is missing in my development environment. I have found work around (see below) but I am the first to admi... | TITLE:
Url pathname issue in Ajax Post
QUESTION:
In development I make an Ajax post which works in development. However when I put it on the Test server it doesn't work because IIS has assigned the application a subfolder, and this is missing in my development environment. I have found work around (see below) but I am... | [
"asp.net-mvc",
"ajax"
] | 0 | 1 | 312 | 2 | 0 | 2011-05-31T13:56:27.033000 | 2011-05-31T14:11:45.837000 |
6,188,680 | 6,204,068 | Mapping a boolean with hibernate | I'm running into trouble with hibernate. I recently set my hbm2ddl to validate, and it has been complaining a lot about wrong datatypes. I have fixed every problem except for booleans. I have a field opener in my class, which is mapped as: The column opener is a tinyint (4) and has a value of 1 or 0. So far I've tried ... | If you can't change your SQL type in your table, i recommend you to do this: and create your class: import org.hibernate.usertype.UserType;
public class YourClassUserType implements UserType{... } you have to implement methods from the interface UserType. The implementation will transform byte to boolean (because a TI... | Mapping a boolean with hibernate I'm running into trouble with hibernate. I recently set my hbm2ddl to validate, and it has been complaining a lot about wrong datatypes. I have fixed every problem except for booleans. I have a field opener in my class, which is mapped as: The column opener is a tinyint (4) and has a va... | TITLE:
Mapping a boolean with hibernate
QUESTION:
I'm running into trouble with hibernate. I recently set my hbm2ddl to validate, and it has been complaining a lot about wrong datatypes. I have fixed every problem except for booleans. I have a field opener in my class, which is mapped as: The column opener is a tinyin... | [
"java",
"hibernate",
"hbm2ddl",
"hbm"
] | 7 | 4 | 38,111 | 6 | 0 | 2011-05-31T13:56:32.547000 | 2011-06-01T15:55:29.627000 |
6,188,682 | 6,189,479 | haskell word searching program development | hello I am making some word searching program for example when "text.txt" file contains "foo foos foor fo.. foo fool" and search "foo" then only number 2 printed and search again and again but I am haskell beginner my code is here:module +Text.Regex.Posix putStrLn "type text file" filepath <- getLine data <- readFile f... | Here is what I made of it. It doesn't does any error checking and is as basic as possible. import Text.Regex.Posix ((=~)) import Control.Monad (when) import Text.Printf (printf)
-- Calculates the number of matching words matchWord:: String -> String -> Int matchWord file word = length. filter (== word). concat $ file ... | haskell word searching program development hello I am making some word searching program for example when "text.txt" file contains "foo foos foor fo.. foo fool" and search "foo" then only number 2 printed and search again and again but I am haskell beginner my code is here:module +Text.Regex.Posix putStrLn "type text f... | TITLE:
haskell word searching program development
QUESTION:
hello I am making some word searching program for example when "text.txt" file contains "foo foos foor fo.. foo fool" and search "foo" then only number 2 printed and search again and again but I am haskell beginner my code is here:module +Text.Regex.Posix put... | [
"function",
"haskell",
"recursion",
"ghci"
] | 1 | 2 | 1,106 | 3 | 0 | 2011-05-31T13:56:39.550000 | 2011-05-31T14:54:40.530000 |
6,188,689 | 6,189,315 | How to deal with XML namespaces | I've got a feeling that this question is quite straightforward but it is years since I did any xslt so maybe someone can help? I have a piece of xml which has been generated by the.net class DataContractSerializer, and I need to extract data from this xml using xslt to end up with some html. The thing that is complicat... | This is going to work, but it's not the proper way: //*[local-name()='Account']/grba:Name and //*[local-name()='Agent']/grba:Name Looking better at your input, you have parent namespaces. You need to select the correct namespace of the element. For example Account and Agent are in grbd scope, while Name is in grba. Fol... | How to deal with XML namespaces I've got a feeling that this question is quite straightforward but it is years since I did any xslt so maybe someone can help? I have a piece of xml which has been generated by the.net class DataContractSerializer, and I need to extract data from this xml using xslt to end up with some h... | TITLE:
How to deal with XML namespaces
QUESTION:
I've got a feeling that this question is quite straightforward but it is years since I did any xslt so maybe someone can help? I have a piece of xml which has been generated by the.net class DataContractSerializer, and I need to extract data from this xml using xslt to ... | [
"xml",
"xslt",
"namespaces",
"transform",
"xml-namespaces"
] | 2 | 2 | 1,271 | 3 | 0 | 2011-05-31T13:57:04.430000 | 2011-05-31T14:42:27.753000 |
6,188,690 | 6,188,753 | Is it possible to make small circles via CSS? | Rather than using images, I was wondering if anyone knows how to make small circles with outlines using CSS. I'm trying to make something similar to the bullseye symbol or Target logo. | Have a look at this library: http://jsdraw2d.jsfiction.com/ For drawing circles there are examples in http://jsdraw2d.jsfiction.com/demo/circleellipse.htm | Is it possible to make small circles via CSS? Rather than using images, I was wondering if anyone knows how to make small circles with outlines using CSS. I'm trying to make something similar to the bullseye symbol or Target logo. | TITLE:
Is it possible to make small circles via CSS?
QUESTION:
Rather than using images, I was wondering if anyone knows how to make small circles with outlines using CSS. I'm trying to make something similar to the bullseye symbol or Target logo.
ANSWER:
Have a look at this library: http://jsdraw2d.jsfiction.com/ Fo... | [
"css",
"geometry"
] | 12 | 2 | 20,385 | 4 | 0 | 2011-05-31T13:57:05.863000 | 2011-05-31T14:01:45.660000 |
6,188,704 | 6,188,806 | How to get the Thread to Invoke in DotNet | If I have minimum 2 classes. One class creates the Bitmap and the other draws the bitmap on UI form. I want to ask you if there is any variable I can transport from UIClass to the GeneratorClass except the whole Form or any control. I prefer to transport the "Thread" as property from UIClass to GeneratorClass and in Ge... | You would pass the current SynchronizationContext to the thread. in your thread it would look something like this: void ThreadMethod(object parameter) { var context = (SynchronizationContext)parameter;
context.Send((s) => TheMethodYouWantToRunOnTheUiThread(), null); } You would start your thread like this: var newThre... | How to get the Thread to Invoke in DotNet If I have minimum 2 classes. One class creates the Bitmap and the other draws the bitmap on UI form. I want to ask you if there is any variable I can transport from UIClass to the GeneratorClass except the whole Form or any control. I prefer to transport the "Thread" as propert... | TITLE:
How to get the Thread to Invoke in DotNet
QUESTION:
If I have minimum 2 classes. One class creates the Bitmap and the other draws the bitmap on UI form. I want to ask you if there is any variable I can transport from UIClass to the GeneratorClass except the whole Form or any control. I prefer to transport the "... | [
".net",
"multithreading",
"invoke",
"dispatcher"
] | 1 | 2 | 539 | 1 | 0 | 2011-05-31T13:58:28.740000 | 2011-05-31T14:06:14.933000 |
6,188,714 | 6,188,793 | SVG mouse events work in Firefox4 but not in IE8 | I have a standalone SVG file and a separate Javascript file to deal with mouse events triggered from the SVG file. The projects works well with Firefox but somehow I got problems with IE when managing mouse events: I get this error message: " clientx is null or not an object ". The SVG image is printed OK though. Do yo... | IE8 doesn't support SVG. There are Javascript tools available to help with that, but natively it doesn't support it. Of the tools I mentioned, my favourite is Raphael, but Raphael is a library for drawing the graphics; since you already have the SVG in your code, you may find a simple conversion library is more useful.... | SVG mouse events work in Firefox4 but not in IE8 I have a standalone SVG file and a separate Javascript file to deal with mouse events triggered from the SVG file. The projects works well with Firefox but somehow I got problems with IE when managing mouse events: I get this error message: " clientx is null or not an ob... | TITLE:
SVG mouse events work in Firefox4 but not in IE8
QUESTION:
I have a standalone SVG file and a separate Javascript file to deal with mouse events triggered from the SVG file. The projects works well with Firefox but somehow I got problems with IE when managing mouse events: I get this error message: " clientx is... | [
"javascript",
"firefox",
"svg",
"internet-explorer-8",
"dom-events"
] | 1 | 3 | 1,460 | 2 | 0 | 2011-05-31T13:58:45.780000 | 2011-05-31T14:04:40.930000 |
6,188,718 | 6,188,936 | Presenting full screen modal views from a UISplitView? | Just looking for some advice. What is the best way to present a full screen modal view controller from a UISplitViewController (set as the root)? | There's no difference presenting a modal view controller from a UISplitViewController that from any other UIViewController. You simply call - (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated. | Presenting full screen modal views from a UISplitView? Just looking for some advice. What is the best way to present a full screen modal view controller from a UISplitViewController (set as the root)? | TITLE:
Presenting full screen modal views from a UISplitView?
QUESTION:
Just looking for some advice. What is the best way to present a full screen modal view controller from a UISplitViewController (set as the root)?
ANSWER:
There's no difference presenting a modal view controller from a UISplitViewController that f... | [
"ios",
"ipad",
"uisplitviewcontroller",
"modalviewcontroller"
] | 1 | 2 | 1,416 | 2 | 0 | 2011-05-31T13:58:58.473000 | 2011-05-31T14:16:17.617000 |
6,188,720 | 6,188,805 | How to get content from one file, that contains in another file | How to get rows from one file, that contains in another file Example, i have // first foo bar // second foo;1;3;p1 bar;1;3;p2 foobar;1;3;p2 This files are big, first file contain ~ 500 000 records, and second ~ 20-15 millions I need to get this result // attention there is no "p1" or "p2" for example foo;1;3 bar;1;3 | This looks like it wants the join command, possibly with sorting. But with millions of records, it's time to think seriously about a real DBMS. join -t\; -o 0,2.2,2.3 <(sort -t\; -k 1,1 first) <(sort -t\; -k 1,1 second) (This requires bash or zsh for the <(command) syntax; portably, you would need to sort into temporar... | How to get content from one file, that contains in another file How to get rows from one file, that contains in another file Example, i have // first foo bar // second foo;1;3;p1 bar;1;3;p2 foobar;1;3;p2 This files are big, first file contain ~ 500 000 records, and second ~ 20-15 millions I need to get this result // a... | TITLE:
How to get content from one file, that contains in another file
QUESTION:
How to get rows from one file, that contains in another file Example, i have // first foo bar // second foo;1;3;p1 bar;1;3;p2 foobar;1;3;p2 This files are big, first file contain ~ 500 000 records, and second ~ 20-15 millions I need to ge... | [
"linux",
"command-line-interface"
] | 0 | 2 | 211 | 2 | 0 | 2011-05-31T13:59:03.810000 | 2011-05-31T14:06:02.397000 |
6,188,721 | 6,188,791 | editing attached source file in java | I am using eclipse IDE and want to edit the attached source file of the jar file. For doing this i downloaded the src.zip and attached the file, but it is opening as a.class though I am able to read the file (which is a.class file) but i also want to edit the file. Why I am not allowed to edit it? how to open an attach... | That's not possible. In order to edit the source, you have to unpack the JAR and create an eclipse project, from which you can then create a JAR with the modified code. | editing attached source file in java I am using eclipse IDE and want to edit the attached source file of the jar file. For doing this i downloaded the src.zip and attached the file, but it is opening as a.class though I am able to read the file (which is a.class file) but i also want to edit the file. Why I am not allo... | TITLE:
editing attached source file in java
QUESTION:
I am using eclipse IDE and want to edit the attached source file of the jar file. For doing this i downloaded the src.zip and attached the file, but it is opening as a.class though I am able to read the file (which is a.class file) but i also want to edit the file.... | [
"java",
"eclipse"
] | 1 | 2 | 1,602 | 3 | 0 | 2011-05-31T13:59:04.557000 | 2011-05-31T14:04:36.023000 |
6,188,722 | 6,188,775 | AutoFill-LoginName-TextBox-MVC 3 -ASP.NET | I am using windows authentication. I have login name availble in a string, got that from current logged in user. I am using MVC3 with Razor. I need to autopopulate the textbox with the current logged in username and should be readonly. How can I bind these in MVC 3 ASp.NET. Any directions, Please? Thank you | You can pass login name to view in viewbag: In your controller code: ViewBag.UserName = username; And use it in your view like this: | AutoFill-LoginName-TextBox-MVC 3 -ASP.NET I am using windows authentication. I have login name availble in a string, got that from current logged in user. I am using MVC3 with Razor. I need to autopopulate the textbox with the current logged in username and should be readonly. How can I bind these in MVC 3 ASp.NET. Any... | TITLE:
AutoFill-LoginName-TextBox-MVC 3 -ASP.NET
QUESTION:
I am using windows authentication. I have login name availble in a string, got that from current logged in user. I am using MVC3 with Razor. I need to autopopulate the textbox with the current logged in username and should be readonly. How can I bind these in ... | [
"c#",
"asp.net",
".net",
"asp.net-mvc-3"
] | 0 | 1 | 889 | 1 | 0 | 2011-05-31T13:59:10.920000 | 2011-05-31T14:03:28.653000 |
6,188,723 | 6,188,819 | Problem in Reading MpegTs File with VLC | I have written an encoder for mpegts and I am trying to play it using VLC,but VLC is not able to play my file. My encoder looks fine as it is writting PAT, PMT tables, video data properly. Could any one please help me, what could be the major issue? This is the log I got from VLC: main debug: processing request item Re... | It's not clear to me but I do see two unknown pids, and VLC thinks there's nothing to do. So potentially playable packets, if actually present in your TS, are being ignored because it can't associate the pid with a decoder. Find a Transport Stream viewer program and compare your TS with other known working ones, lookin... | Problem in Reading MpegTs File with VLC I have written an encoder for mpegts and I am trying to play it using VLC,but VLC is not able to play my file. My encoder looks fine as it is writting PAT, PMT tables, video data properly. Could any one please help me, what could be the major issue? This is the log I got from VLC... | TITLE:
Problem in Reading MpegTs File with VLC
QUESTION:
I have written an encoder for mpegts and I am trying to play it using VLC,but VLC is not able to play my file. My encoder looks fine as it is writting PAT, PMT tables, video data properly. Could any one please help me, what could be the major issue? This is the ... | [
"video",
"mpeg2-ts"
] | 0 | 1 | 2,454 | 1 | 0 | 2011-05-31T13:59:14.930000 | 2011-05-31T14:06:54.790000 |
6,188,726 | 6,188,802 | jQuery - Bind/UnBind events to image click event | I have a 'click' event associated with 6 image buttons. It is currently possible to click the other 5 when 1 is clicked. Is it possible to remove the click events on the other 5 temporarily? I have an animation that occurs on each, but if the user clicks multiple while the animation is running, it causes the animation ... | Rather than unbind the handlers and rebind them when the animation is done, why not just save the running state, and in your click callback check for it. Then when the animation is complete reset the state. var running = false;
$('.button').click(function() { if(running) { return; } running = true;...
$(this).animate... | jQuery - Bind/UnBind events to image click event I have a 'click' event associated with 6 image buttons. It is currently possible to click the other 5 when 1 is clicked. Is it possible to remove the click events on the other 5 temporarily? I have an animation that occurs on each, but if the user clicks multiple while t... | TITLE:
jQuery - Bind/UnBind events to image click event
QUESTION:
I have a 'click' event associated with 6 image buttons. It is currently possible to click the other 5 when 1 is clicked. Is it possible to remove the click events on the other 5 temporarily? I have an animation that occurs on each, but if the user click... | [
"jquery"
] | 0 | 0 | 1,286 | 1 | 0 | 2011-05-31T13:59:41.047000 | 2011-05-31T14:05:40.970000 |
6,188,727 | 6,189,741 | How to add autoload-function to CodeIgniter? | I would like to be able to use OOP and create new objects in my controllers in CodeIgniter. So I need to use an autoload-function: function __autoload( $classname ) { require_once("../records/$classname.php"); } But how can I add that to CodeIgniter? | You can add your auto loader above to app/config/config.php. I've used a similar autoload function before in this location and it's worked quite neatly. function __autoload($class) { if (strpos($class, 'CI_')!== 0) { @include_once(APPPATH. 'core/'. $class. EXT); } } Courtesy of Phil Sturgeon. This way may be more porta... | How to add autoload-function to CodeIgniter? I would like to be able to use OOP and create new objects in my controllers in CodeIgniter. So I need to use an autoload-function: function __autoload( $classname ) { require_once("../records/$classname.php"); } But how can I add that to CodeIgniter? | TITLE:
How to add autoload-function to CodeIgniter?
QUESTION:
I would like to be able to use OOP and create new objects in my controllers in CodeIgniter. So I need to use an autoload-function: function __autoload( $classname ) { require_once("../records/$classname.php"); } But how can I add that to CodeIgniter?
ANSWE... | [
"php",
"oop",
"codeigniter",
"autoload"
] | 5 | 9 | 12,574 | 3 | 0 | 2011-05-31T13:59:46.693000 | 2011-05-31T15:14:15.237000 |
6,188,730 | 6,224,218 | Check if WMIC is installed, writing data into files from batch file | I am using the Windows Management Instrumentation Command-line (WMIC) for reading data from a computer like it's Hardware components and IP settings. As I am using a batch file (Windows) for filling files for each computer/node with data the query logic is implemented there. So far it has been working quite good on my ... | Since that is only printed on the very first run of WMIC, you can just make two calls. One dummy one to eat away the string: wmic foo >nul 2>&1 and after that what you actually wanted to execute. | Check if WMIC is installed, writing data into files from batch file I am using the Windows Management Instrumentation Command-line (WMIC) for reading data from a computer like it's Hardware components and IP settings. As I am using a batch file (Windows) for filling files for each computer/node with data the query logi... | TITLE:
Check if WMIC is installed, writing data into files from batch file
QUESTION:
I am using the Windows Management Instrumentation Command-line (WMIC) for reading data from a computer like it's Hardware components and IP settings. As I am using a batch file (Windows) for filling files for each computer/node with d... | [
"windows",
"batch-file",
"installation",
"wmic"
] | 3 | 3 | 2,971 | 1 | 0 | 2011-05-31T14:00:05.190000 | 2011-06-03T07:28:06.740000 |
6,188,731 | 6,188,815 | how to increment a variable in first activity depending on the TextView values in second activity | hi all I have a variable in first activity i need to add values returned from second activity and store it in this variables. Switching between activities happens multiple times.... Any ideas..? here is a piece of code which stores current value each time and not the Sum of it... double quantity = Double.parseDouble(s1... | If the amount of variables stays the same you could always use sharedpreferences. They are super simple to use and you can add a sharedpreference listener to update your activity when a value is changed. If the amount of variables changes (eg you have 3 integers at one time but maybe your user can change it so you need... | how to increment a variable in first activity depending on the TextView values in second activity hi all I have a variable in first activity i need to add values returned from second activity and store it in this variables. Switching between activities happens multiple times.... Any ideas..? here is a piece of code whi... | TITLE:
how to increment a variable in first activity depending on the TextView values in second activity
QUESTION:
hi all I have a variable in first activity i need to add values returned from second activity and store it in this variables. Switching between activities happens multiple times.... Any ideas..? here is a... | [
"android"
] | 0 | 2 | 369 | 2 | 0 | 2011-05-31T14:00:21.870000 | 2011-05-31T14:06:44.090000 |
6,188,738 | 6,188,820 | When initing an object autorelease is used. But release later called on object | My project uses the oauthconsumer code in it. When I am compiling and analising my code I get a noticed about an 'Object sent- autorelease too many times'. It would be a fair assumption to make the code was written by a lot better engineer than me so I hesitate to 'fix' it. Is the following code wrong? - (void)connecti... | Just remove the autorelease and you'll be fine. The better engineer clearly made a mistake. | When initing an object autorelease is used. But release later called on object My project uses the oauthconsumer code in it. When I am compiling and analising my code I get a noticed about an 'Object sent- autorelease too many times'. It would be a fair assumption to make the code was written by a lot better engineer t... | TITLE:
When initing an object autorelease is used. But release later called on object
QUESTION:
My project uses the oauthconsumer code in it. When I am compiling and analising my code I get a noticed about an 'Object sent- autorelease too many times'. It would be a fair assumption to make the code was written by a lot... | [
"iphone",
"objective-c"
] | 1 | 1 | 95 | 2 | 0 | 2011-05-31T14:00:51.093000 | 2011-05-31T14:06:55.647000 |
6,188,739 | 6,189,907 | jQuery UI Modal Dialog - Prevent Action Unless OK clicked | EDIT: I want to replace the following with a jquery UI dialog: I don't want the action to post back unless the OK is clicked on the dialog. It works perfectly fine in regular javascript with confirm. I would like to replace it with jQuery UI dialog so it looks a little prettier. Is it possible? I created a dialog that ... | You can't really do this - the click handler returns immediately so you have to prevent the link from being followed yourself, if (and only if) Javascript is enabled. (Return false from your cancel handler to prevent the link from being followed) To actually change page address when clicking OK, set window.location in ... | jQuery UI Modal Dialog - Prevent Action Unless OK clicked EDIT: I want to replace the following with a jquery UI dialog: I don't want the action to post back unless the OK is clicked on the dialog. It works perfectly fine in regular javascript with confirm. I would like to replace it with jQuery UI dialog so it looks a... | TITLE:
jQuery UI Modal Dialog - Prevent Action Unless OK clicked
QUESTION:
EDIT: I want to replace the following with a jquery UI dialog: I don't want the action to post back unless the OK is clicked on the dialog. It works perfectly fine in regular javascript with confirm. I would like to replace it with jQuery UI di... | [
"c#",
"jquery",
"asp.net",
"jquery-ui",
"jquery-ui-dialog"
] | 2 | 3 | 5,994 | 4 | 0 | 2011-05-31T14:01:02.477000 | 2011-05-31T15:27:02.990000 |
6,188,740 | 6,188,854 | List of objects that have a list of other objects as one of their parameters | I have this object Object1 defined as public Object1(String item, List obj2) in a class (whilst Object2 is defined in another class as public Object2(String item1, String item2) ) Next, in the main program, I'm creating a list of Object1 objects: public static List obj1 = new List ();
List obj2 = new List ();:
obj1.a... | If I understand you well, you should have a different list for each Object1 obj1.add("first", new List ()); obj1.add("second", new List ()); obj1.add("third", new List ()); Have you considered using a Map? | List of objects that have a list of other objects as one of their parameters I have this object Object1 defined as public Object1(String item, List obj2) in a class (whilst Object2 is defined in another class as public Object2(String item1, String item2) ) Next, in the main program, I'm creating a list of Object1 objec... | TITLE:
List of objects that have a list of other objects as one of their parameters
QUESTION:
I have this object Object1 defined as public Object1(String item, List obj2) in a class (whilst Object2 is defined in another class as public Object2(String item1, String item2) ) Next, in the main program, I'm creating a lis... | [
"list",
"object"
] | 0 | 1 | 191 | 1 | 0 | 2011-05-31T14:01:05.067000 | 2011-05-31T14:10:03.860000 |
6,188,741 | 6,188,830 | any example or tutorial for how to connect to MS SQL Server in a GWT project | I'm having hard time to find out how to read and write from /into MS SQL server 2008 using GWT. does any body know of any step by step guide or sample that can help me? thanks | First you have to uses Microsofts JDBC connector instead of MySQL connector connect with ms sql Database Access in GWT – The Missing Tutorial | any example or tutorial for how to connect to MS SQL Server in a GWT project I'm having hard time to find out how to read and write from /into MS SQL server 2008 using GWT. does any body know of any step by step guide or sample that can help me? thanks | TITLE:
any example or tutorial for how to connect to MS SQL Server in a GWT project
QUESTION:
I'm having hard time to find out how to read and write from /into MS SQL server 2008 using GWT. does any body know of any step by step guide or sample that can help me? thanks
ANSWER:
First you have to uses Microsofts JDBC c... | [
"java",
"sql-server",
"gwt"
] | 1 | 2 | 1,823 | 2 | 0 | 2011-05-31T14:01:10.280000 | 2011-05-31T14:08:02.327000 |
6,188,750 | 6,189,033 | insert hyperlink for more that 1000 entries in excel | i habe many entries in excell ( more than 3000 ). actually their are hyperlink but just like a text. i need to convert them in excel hyperlink but dont know how do to that with thousends of entries. please help. \\192.162.0.2\public \\192.162.0.2\public\Big-PC.log \\192.162.0.2\public\InstantReview-ExperimentalHive.reg... | Just use the formula & drag; =HYPERLINK(A1, A1) Edit; I put =HYPERLINK(B3, B3) in the formula bar and hit enter (to get the colour effects that don't seem to appear otherwise for some reason) then dragged down; | insert hyperlink for more that 1000 entries in excel i habe many entries in excell ( more than 3000 ). actually their are hyperlink but just like a text. i need to convert them in excel hyperlink but dont know how do to that with thousends of entries. please help. \\192.162.0.2\public \\192.162.0.2\public\Big-PC.log \\... | TITLE:
insert hyperlink for more that 1000 entries in excel
QUESTION:
i habe many entries in excell ( more than 3000 ). actually their are hyperlink but just like a text. i need to convert them in excel hyperlink but dont know how do to that with thousends of entries. please help. \\192.162.0.2\public \\192.162.0.2\pu... | [
"excel",
"hyperlink"
] | 0 | 2 | 1,656 | 2 | 0 | 2011-05-31T14:01:39.393000 | 2011-05-31T14:24:24.320000 |
6,188,752 | 6,188,816 | clearTimeout() doesn't do what it's supposed to do | can anyone see what is wrong with the following code. it's supposed to display a count down from 30 and afterwards it refreshes the page with jquery's ajax load() function. it works fine for the first or second count down but then the timer starts too count down to fastand sometimes goes to the negative numbers and doe... | Add a call to "stopRefresh()" to the "startTimer()" call. function startTimer(){ stopRefresh(); count = 30; timer = setTimeout(refreshPage,count * 1000); interval= setInterval(updateTimer,1000); } My guess is that your code is managing to start up more than one instance of the interval timer. They'll all decrement the ... | clearTimeout() doesn't do what it's supposed to do can anyone see what is wrong with the following code. it's supposed to display a count down from 30 and afterwards it refreshes the page with jquery's ajax load() function. it works fine for the first or second count down but then the timer starts too count down to fas... | TITLE:
clearTimeout() doesn't do what it's supposed to do
QUESTION:
can anyone see what is wrong with the following code. it's supposed to display a count down from 30 and afterwards it refreshes the page with jquery's ajax load() function. it works fine for the first or second count down but then the timer starts too... | [
"javascript",
"jquery",
"ajax"
] | 1 | 2 | 1,066 | 3 | 0 | 2011-05-31T14:01:44.693000 | 2011-05-31T14:06:51.653000 |
6,188,754 | 6,198,119 | Sencha Touch: Panel.hide()/show() works only after resize | Here's a demo app: demo Sencha Touch app. The button in the bottom-left corner should show/hide the menu panel on top of the "Location info goes here" bar, however, it works in a strange way. Here's how (IMO) it should work: I click a button A panel appears Here's how it works now: I click a button Nothing happens I re... | I've found a way to get around this. Here it is: app.viewport.dockedItems.items[0].rendered = false; app.viewport.doComponentLayout(); So, problem solved. | Sencha Touch: Panel.hide()/show() works only after resize Here's a demo app: demo Sencha Touch app. The button in the bottom-left corner should show/hide the menu panel on top of the "Location info goes here" bar, however, it works in a strange way. Here's how (IMO) it should work: I click a button A panel appears Here... | TITLE:
Sencha Touch: Panel.hide()/show() works only after resize
QUESTION:
Here's a demo app: demo Sencha Touch app. The button in the bottom-left corner should show/hide the menu panel on top of the "Location info goes here" bar, however, it works in a strange way. Here's how (IMO) it should work: I click a button A ... | [
"javascript",
"html",
"google-chrome",
"sencha-touch",
"extjs"
] | 0 | 4 | 8,067 | 3 | 0 | 2011-05-31T14:01:46.313000 | 2011-06-01T08:10:54.157000 |
6,188,762 | 6,252,665 | NullReferenceException on if statement with only a bool check | I'm experiencing a "strange" situation with a live ASP.NET MVC 3 app. The error start on production after X hours of use. I did not have been able to reproduce the error on my development machine. Here is my controller action signature: [HttpPost] public ActionResult AddBanking(int id, int? page, int bankId, string q, ... | After separating my action into two disctinct action (for the two forms in the view) I discover that the errors was relating to the second form and related to the validation of the Model passed. Here are my two actions now: [HttpPost] public ActionResult AddBanking(int id, int? page, int bankId, string q)
[HttpPost] p... | NullReferenceException on if statement with only a bool check I'm experiencing a "strange" situation with a live ASP.NET MVC 3 app. The error start on production after X hours of use. I did not have been able to reproduce the error on my development machine. Here is my controller action signature: [HttpPost] public Act... | TITLE:
NullReferenceException on if statement with only a bool check
QUESTION:
I'm experiencing a "strange" situation with a live ASP.NET MVC 3 app. The error start on production after X hours of use. I did not have been able to reproduce the error on my development machine. Here is my controller action signature: [Ht... | [
"c#",
"asp.net-mvc-3",
"nullreferenceexception"
] | 1 | 0 | 2,963 | 2 | 0 | 2011-05-31T14:02:06.113000 | 2011-06-06T13:24:29.140000 |
6,188,767 | 6,188,817 | Execute button event handler the entire time mouse button is depressed | I'd like to create a javascript mousedown event handler for a button. While the button is depressed, I need the handler to execute repeatedly until the button is released (mouseup is fired). E.g. holding an Up button should cause a text box value to increment until it is released. What's the best way to handle this? | You can make use of setInterval: http://jsfiddle.net/5wypC/1/. var interval = null; var i = 0;
$('button').mousedown(function() { clearInterval(interval); // Make sure to clear any intervals // that are occasionally still running interval = setInterval(function() { $('textarea').val(i++); }, 100); });
$('button').mou... | Execute button event handler the entire time mouse button is depressed I'd like to create a javascript mousedown event handler for a button. While the button is depressed, I need the handler to execute repeatedly until the button is released (mouseup is fired). E.g. holding an Up button should cause a text box value to... | TITLE:
Execute button event handler the entire time mouse button is depressed
QUESTION:
I'd like to create a javascript mousedown event handler for a button. While the button is depressed, I need the handler to execute repeatedly until the button is released (mouseup is fired). E.g. holding an Up button should cause a... | [
"javascript",
"jquery"
] | 1 | 5 | 183 | 1 | 0 | 2011-05-31T14:02:33.637000 | 2011-05-31T14:06:51.990000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.