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,261,681 | 6,261,797 | playing slow motion, fast forward , rewind in a video player in flash video player | We want to build a flash video player to play FLV videos. In addition to basic video controls, client also wants below features for that video player Slow Motion Fast Forward Rewind We are using ffmpeg to convert videos (from a PHP script) to flv videos. From this video flash player has to perform these operations. We ... | Fast Forward and Rewind are easy enough to do, though not in the conventional sense. Both involve timers wherein you simply seek to a previous or future point on an interval. This is not playing the video at increased speed forward and backwards. As for slow motion... you are in a much tighter fix there. There are 2 (t... | playing slow motion, fast forward , rewind in a video player in flash video player We want to build a flash video player to play FLV videos. In addition to basic video controls, client also wants below features for that video player Slow Motion Fast Forward Rewind We are using ffmpeg to convert videos (from a PHP scrip... | TITLE:
playing slow motion, fast forward , rewind in a video player in flash video player
QUESTION:
We want to build a flash video player to play FLV videos. In addition to basic video controls, client also wants below features for that video player Slow Motion Fast Forward Rewind We are using ffmpeg to convert videos... | [
"actionscript-3",
"flash"
] | 1 | 0 | 4,212 | 1 | 0 | 2011-06-07T07:03:43.967000 | 2011-06-07T07:17:08.087000 |
6,261,682 | 6,263,069 | GWT AutoBean with POJO class instead of interface | I'm hoping someone can suggest a simple solution to my problem. I have a POJO, say: public class Person { private String name; public String getName(){ return name; } public void setName(String name){ this.name = name; } } I'd like to use GWT's AutoBean functionality to serialize / deserialize this bean to JSON, but Au... | You simply can't. AutoBean generates lightweight, optimized implementations of the interfaces; it obviously cannot do this for classes. This is by design. | GWT AutoBean with POJO class instead of interface I'm hoping someone can suggest a simple solution to my problem. I have a POJO, say: public class Person { private String name; public String getName(){ return name; } public void setName(String name){ this.name = name; } } I'd like to use GWT's AutoBean functionality to... | TITLE:
GWT AutoBean with POJO class instead of interface
QUESTION:
I'm hoping someone can suggest a simple solution to my problem. I have a POJO, say: public class Person { private String name; public String getName(){ return name; } public void setName(String name){ this.name = name; } } I'd like to use GWT's AutoBea... | [
"json",
"gwt",
"serialization",
"autobean"
] | 16 | 10 | 6,412 | 2 | 0 | 2011-06-07T07:03:44.220000 | 2011-06-07T09:15:03.133000 |
6,261,684 | 6,261,700 | Why do people assign $this = $(this) in many jQuery plugins? | I often see this as the first line of a plug-in: $this = $(this); Is this just for efficiency, to avoid getting the jQuery object each and every time? | To cache the jQuery object and not have to instantiate it every time they require it. | Why do people assign $this = $(this) in many jQuery plugins? I often see this as the first line of a plug-in: $this = $(this); Is this just for efficiency, to avoid getting the jQuery object each and every time? | TITLE:
Why do people assign $this = $(this) in many jQuery plugins?
QUESTION:
I often see this as the first line of a plug-in: $this = $(this); Is this just for efficiency, to avoid getting the jQuery object each and every time?
ANSWER:
To cache the jQuery object and not have to instantiate it every time they require... | [
"javascript",
"jquery",
"jquery-plugins"
] | 7 | 6 | 1,791 | 2 | 0 | 2011-06-07T07:03:59.007000 | 2011-06-07T07:06:12.400000 |
6,261,692 | 6,261,777 | Can I create a select list with a MVC3 helper | I'm new to MVC3. I would like to create a select list / dropdown that will allow me to select between 2-3 things. I only want to be able to select the one from a list. Is there an easy way to do this with a helper. Mary Jean Here's my idea. The helper will select from choices:
1 answer 2 answers 3 answers and store th... | You could use the DropDownListFor helper. I would start by defining a view model: public class AnswersViewModel { public string SelectedAnswer { get; set; }
public IEnumerable Answers { get { return new[] { new SelectListItem { Value = "1", Text = "1 answer" }, new SelectListItem { Value = "2", Text = "2 answers" }, n... | Can I create a select list with a MVC3 helper I'm new to MVC3. I would like to create a select list / dropdown that will allow me to select between 2-3 things. I only want to be able to select the one from a list. Is there an easy way to do this with a helper. Mary Jean Here's my idea. The helper will select from choic... | TITLE:
Can I create a select list with a MVC3 helper
QUESTION:
I'm new to MVC3. I would like to create a select list / dropdown that will allow me to select between 2-3 things. I only want to be able to select the one from a list. Is there an easy way to do this with a helper. Mary Jean Here's my idea. The helper will... | [
"asp.net-mvc"
] | 7 | 14 | 8,225 | 1 | 0 | 2011-06-07T07:05:05.973000 | 2011-06-07T07:14:57.193000 |
6,261,697 | 6,262,034 | What is the best way of converting a Html table to datatable | I have a html table.I want to convert this into a datatable. What is the best way of doing so? Thanks | Don't parse the HTML yourself, there are parsing libraries out there that can do that for you. Coupled with the HTML Agility Pack and LINQ, you can make short work of this. var doc = new HtmlDocument(); doc.Load(url);
var nodes = doc.DocumentNode.SelectNodes("//table/tr"); var table = new DataTable("MyTable");
var he... | What is the best way of converting a Html table to datatable I have a html table.I want to convert this into a datatable. What is the best way of doing so? Thanks | TITLE:
What is the best way of converting a Html table to datatable
QUESTION:
I have a html table.I want to convert this into a datatable. What is the best way of doing so? Thanks
ANSWER:
Don't parse the HTML yourself, there are parsing libraries out there that can do that for you. Coupled with the HTML Agility Pack ... | [
"c#-3.0"
] | 10 | 18 | 37,604 | 2 | 0 | 2011-06-07T07:05:38.313000 | 2011-06-07T07:41:33.500000 |
6,261,706 | 6,275,384 | SqlBulkCopy - External table is not in the expected format | I'm trying to use SqlBulkCopy as per the example in Import Excel Spreadsheet Data into SQL Server Database Table Using SqlBulkCopy. I've created the table and Excel sheet OK and done the coding, but I keep getting External table is not in the expected format. at the connection.open() line. How do I get rid of this prob... | I got it. I had to change the format of the connection string and changed it to string excelConnectionString = (@"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\TEMP\Book1.xls;Extended Properties='Excel 8.0;HDR=NO;IMEX=1'"); | SqlBulkCopy - External table is not in the expected format I'm trying to use SqlBulkCopy as per the example in Import Excel Spreadsheet Data into SQL Server Database Table Using SqlBulkCopy. I've created the table and Excel sheet OK and done the coding, but I keep getting External table is not in the expected format. a... | TITLE:
SqlBulkCopy - External table is not in the expected format
QUESTION:
I'm trying to use SqlBulkCopy as per the example in Import Excel Spreadsheet Data into SQL Server Database Table Using SqlBulkCopy. I've created the table and Excel sheet OK and done the coding, but I keep getting External table is not in the ... | [
"c#",
"visual-studio-2010",
"sqlbulkcopy"
] | 0 | 0 | 1,796 | 2 | 0 | 2011-06-07T07:07:06.403000 | 2011-06-08T07:17:01.897000 |
6,261,711 | 6,275,997 | chef wont install from recipes/cookbooks | I think I'm missing something fundamental in deploying applications using Chef. I've cloned a bunch of cookbooks from the opscode repo. I made changes and knifed them appropriately. Everything is configured so I can spawn an EC2 instance using a bash script but its not executing any of the Chef installs. In roles/base.... | I used the rightscale mongodb cookbook and customized it for the latest release 1.8.1 on Ubuntu 10.04. Now deploying without issue. | chef wont install from recipes/cookbooks I think I'm missing something fundamental in deploying applications using Chef. I've cloned a bunch of cookbooks from the opscode repo. I made changes and knifed them appropriately. Everything is configured so I can spawn an EC2 instance using a bash script but its not executing... | TITLE:
chef wont install from recipes/cookbooks
QUESTION:
I think I'm missing something fundamental in deploying applications using Chef. I've cloned a bunch of cookbooks from the opscode repo. I made changes and knifed them appropriately. Everything is configured so I can spawn an EC2 instance using a bash script but... | [
"amazon-ec2",
"automated-deploy",
"chef-infra",
"chef-recipe"
] | 1 | 0 | 1,636 | 1 | 0 | 2011-06-07T07:07:48.323000 | 2011-06-08T08:18:47.757000 |
6,261,716 | 6,262,226 | Android fast running sqlite query | I'm using a database for searching and facing following issue. When new search string comes I need to block the previously executing database query. How can I do this? | You cannot stop a query as the request to the database is synchronous. But you can try to exclude the request to the database into a thread so you can stop the thread when a new request should be done. Anyway it would be a good idea to do the query in a thread oder AsyncTask so you don't block the UI when querying the ... | Android fast running sqlite query I'm using a database for searching and facing following issue. When new search string comes I need to block the previously executing database query. How can I do this? | TITLE:
Android fast running sqlite query
QUESTION:
I'm using a database for searching and facing following issue. When new search string comes I need to block the previously executing database query. How can I do this?
ANSWER:
You cannot stop a query as the request to the database is synchronous. But you can try to e... | [
"android"
] | 0 | 0 | 269 | 1 | 0 | 2011-06-07T07:08:13.850000 | 2011-06-07T07:58:18.740000 |
6,261,717 | 6,261,929 | different color for different levels of rows in jsTree | how can get different row color for different 'level' of rows in jsTree let's say that in my sample http://jsfiddle.net/radek/sTmrv/2/ basics & all will have the same color login, Basics of Edu, login, Add Academic year.... will have the same but different color and finally the 3rd level will have the same color. so fa... | Would this work for you? See http://jsfiddle.net/sTmrv/4/ You may have to play with it a bit (untested in IE). li.jstree-open > ul { background: red; display: block; } li.jstree-open > ul li.jstree-open > ul { background: #CCC; position: relative; left: -18px; padding-left: 18px; width: 100%; } | different color for different levels of rows in jsTree how can get different row color for different 'level' of rows in jsTree let's say that in my sample http://jsfiddle.net/radek/sTmrv/2/ basics & all will have the same color login, Basics of Edu, login, Add Academic year.... will have the same but different color an... | TITLE:
different color for different levels of rows in jsTree
QUESTION:
how can get different row color for different 'level' of rows in jsTree let's say that in my sample http://jsfiddle.net/radek/sTmrv/2/ basics & all will have the same color login, Basics of Edu, login, Add Academic year.... will have the same but ... | [
"css",
"jstree"
] | 1 | 3 | 3,936 | 2 | 0 | 2011-06-07T07:08:14.663000 | 2011-06-07T07:30:52.440000 |
6,261,731 | 6,262,300 | What languages or methods allow graphics & music demos to fit in 64kb EXEs? | How is it possible that in a 64kb compiled exe, these programs can generate such crazy visuals, complete with matching music? An example: Ars Nova By Phantom Lord ( YouTube video of the demo running ) This program's only 64kb in size! How did they do that? Are they using some sorts of pre-existing objects, shaders, etc... | 64K demos such as the one you linked save space by procedurally generating textures and models. Module files are typically used for the music, with most of the instruments being synthesized in code. That's the main point. Whereever possible, they generate stuff using code rather than storing the data explicitly. (And w... | What languages or methods allow graphics & music demos to fit in 64kb EXEs? How is it possible that in a 64kb compiled exe, these programs can generate such crazy visuals, complete with matching music? An example: Ars Nova By Phantom Lord ( YouTube video of the demo running ) This program's only 64kb in size! How did t... | TITLE:
What languages or methods allow graphics & music demos to fit in 64kb EXEs?
QUESTION:
How is it possible that in a 64kb compiled exe, these programs can generate such crazy visuals, complete with matching music? An example: Ars Nova By Phantom Lord ( YouTube video of the demo running ) This program's only 64kb ... | [
"3d",
"compression",
"procedural-generation",
"demoscene"
] | 6 | 5 | 706 | 4 | 0 | 2011-06-07T07:09:46.873000 | 2011-06-07T08:05:17.067000 |
6,261,733 | 6,262,119 | Linkify URLs in string with Regex expression | I want a regex expression that will match; www http https It should make only urls in the string clickable. What is the best way to do this? What I have now is this, but this doesn't match www. Also, I don't know how to make the entire text visible in the label, not just the links. I guess this could be done with some ... | Anton Hansson gave you link to valid regex and replacement code. Below is more advaced way if you wan't to do something more with found urls etc. var regex = new Regex("some valid regex"); var text = "your original text to linkify"; MatchEvaluator evaluator = LinkifyUrls; text = regex.Replace(text, evaluator);...
priv... | Linkify URLs in string with Regex expression I want a regex expression that will match; www http https It should make only urls in the string clickable. What is the best way to do this? What I have now is this, but this doesn't match www. Also, I don't know how to make the entire text visible in the label, not just the... | TITLE:
Linkify URLs in string with Regex expression
QUESTION:
I want a regex expression that will match; www http https It should make only urls in the string clickable. What is the best way to do this? What I have now is this, but this doesn't match www. Also, I don't know how to make the entire text visible in the l... | [
"c#",
"regex"
] | 1 | 3 | 1,287 | 2 | 0 | 2011-06-07T07:09:52.857000 | 2011-06-07T07:49:19.823000 |
6,261,740 | 6,262,012 | What is wrong with this SELECT query? | I found this posted on an Internet forum: You could find out you're one of those new fangled web applications developers who don't actually know much about databases and don't see anything wrong with SELECT * FROM `tbl_products` ORDER BY `product_times_bought` DESC LIMIT 0, 500 I'm new to databases, and this looks like... | Dont see any syntax error, but its the * which is considered bad practice. The issue with that is, you have no control on which columns the database returns, plus it returns all of them (wasted bandwitdh). It could have other issues like breaking the order it the table is recreated and if a column you need is not there... | What is wrong with this SELECT query? I found this posted on an Internet forum: You could find out you're one of those new fangled web applications developers who don't actually know much about databases and don't see anything wrong with SELECT * FROM `tbl_products` ORDER BY `product_times_bought` DESC LIMIT 0, 500 I'm... | TITLE:
What is wrong with this SELECT query?
QUESTION:
I found this posted on an Internet forum: You could find out you're one of those new fangled web applications developers who don't actually know much about databases and don't see anything wrong with SELECT * FROM `tbl_products` ORDER BY `product_times_bought` DES... | [
"mysql",
"select"
] | 0 | 2 | 81 | 1 | 0 | 2011-06-07T07:11:23.397000 | 2011-06-07T07:38:51.950000 |
6,261,744 | 6,273,699 | How to use InputRange!(dchar) with Stdin in D 2.0? | I'm trying to write generic code that can lex any stream of characters ( dchar s) into anywhere... whether it's from a file or from stdin into another file or stdout. How do I do this? It seems like stdin and stdout are painful to use with InputRange and OutputRange (since I have to wrap them manuallly every time), and... | The proper function which takes a dchar input range is: void func(Range)(Range input) if(isInputRange!Range && is(ElementType!Range == dchar)) {} However, you must have an input range that gets its input from stdin. There is talk of needing to rework stdio/streaming which has not been done yet. There is an undocumented... | How to use InputRange!(dchar) with Stdin in D 2.0? I'm trying to write generic code that can lex any stream of characters ( dchar s) into anywhere... whether it's from a file or from stdin into another file or stdout. How do I do this? It seems like stdin and stdout are painful to use with InputRange and OutputRange (s... | TITLE:
How to use InputRange!(dchar) with Stdin in D 2.0?
QUESTION:
I'm trying to write generic code that can lex any stream of characters ( dchar s) into anywhere... whether it's from a file or from stdin into another file or stdout. How do I do this? It seems like stdin and stdout are painful to use with InputRange ... | [
"d"
] | 4 | 2 | 158 | 1 | 0 | 2011-06-07T07:11:47.857000 | 2011-06-08T02:50:39.910000 |
6,261,754 | 6,261,847 | QString find method in Qt? | Is there any Find method in Qstring in Qt like CString find method? My Requirement is i have one Qstring QString strdata = "Sunday,01:30 - 17:30"; I want to split them. Now i want s1 = Sunday s2 = 01:30 s3 = 17:30 Where s1,s2,s3 are QString Thanks. | QString strdata = "Sunday,01:30 - 17:30";
QStringList stringlist_0; QStringList stringlist_1;
stringlist_0 = strdata.split( "," ); stringlist_1 = stringlist_0[1].split( " - " );
QString day = stringlist_0[0]; QString begin_time = stringlist_1[0]; QString end_time = stringlist_1[1]; | QString find method in Qt? Is there any Find method in Qstring in Qt like CString find method? My Requirement is i have one Qstring QString strdata = "Sunday,01:30 - 17:30"; I want to split them. Now i want s1 = Sunday s2 = 01:30 s3 = 17:30 Where s1,s2,s3 are QString Thanks. | TITLE:
QString find method in Qt?
QUESTION:
Is there any Find method in Qstring in Qt like CString find method? My Requirement is i have one Qstring QString strdata = "Sunday,01:30 - 17:30"; I want to split them. Now i want s1 = Sunday s2 = 01:30 s3 = 17:30 Where s1,s2,s3 are QString Thanks.
ANSWER:
QString strdata =... | [
"qt",
"visual-c++"
] | 2 | 3 | 3,929 | 3 | 0 | 2011-06-07T07:12:33.407000 | 2011-06-07T07:22:33.327000 |
6,261,760 | 6,261,912 | how to get data in javascript passed through php mysql query | i want to display 700 products data in a select box and on per selection i have to print a table of description. before i was doing ajax call and showing the data but the process is slow. So i have to send all the data to the client side and then use javascript to change the table of description on option change. Below... | Another solution - instead of creating global variable, set that data as an data- attribute of some related element. Don't forget to perform json_encode() on whole array/object and then htmlspecialchars() on resulting string (as others have noted, lack of htmlspecialchars() is the reason why you got only "{[" when aler... | how to get data in javascript passed through php mysql query i want to display 700 products data in a select box and on per selection i have to print a table of description. before i was doing ajax call and showing the data but the process is slow. So i have to send all the data to the client side and then use javascri... | TITLE:
how to get data in javascript passed through php mysql query
QUESTION:
i want to display 700 products data in a select box and on per selection i have to print a table of description. before i was doing ajax call and showing the data but the process is slow. So i have to send all the data to the client side and... | [
"php",
"javascript",
"jquery",
"json"
] | 1 | 2 | 4,470 | 6 | 0 | 2011-06-07T07:13:09.493000 | 2011-06-07T07:28:57.137000 |
6,261,766 | 6,262,051 | Two query for date range value returning different no of rows | two query returning different no of rows. Query1: ---------- SELECT t1.a1, t1.a2, t2.b1,t2.b2 from (SELECT a1,a2 from xyz WHERE (date BETWEEN '2011-01-01' AND '2011-01-30') AND id = 70 GROUP BY a1 a2)t1, (SELECT a1,a2 from xyz WHERE (date BETWEEN '2011-01-01' AND '2011-01-30') AND id = 70 GROUP BY a1 a2)t2, t3
where t... | The first query can ( and should ) be wrrite like so (correcting what I'm assuming should be two different date ranges): Select t1.a1, t1.a2, t2.b1,t2.b2 From ( Select a1,a2 From xyz Where date Between '2011-01-01' And '2011-01-30' And id = 70 Group By a1,a2 ) As t1 Join t3 On t3.a1 = t1.a1 Join ( Select a1,a2 From xyz... | Two query for date range value returning different no of rows two query returning different no of rows. Query1: ---------- SELECT t1.a1, t1.a2, t2.b1,t2.b2 from (SELECT a1,a2 from xyz WHERE (date BETWEEN '2011-01-01' AND '2011-01-30') AND id = 70 GROUP BY a1 a2)t1, (SELECT a1,a2 from xyz WHERE (date BETWEEN '2011-01-01... | TITLE:
Two query for date range value returning different no of rows
QUESTION:
two query returning different no of rows. Query1: ---------- SELECT t1.a1, t1.a2, t2.b1,t2.b2 from (SELECT a1,a2 from xyz WHERE (date BETWEEN '2011-01-01' AND '2011-01-30') AND id = 70 GROUP BY a1 a2)t1, (SELECT a1,a2 from xyz WHERE (date B... | [
"sql-server-2008",
"date"
] | 1 | 1 | 2,154 | 1 | 0 | 2011-06-07T07:13:21.620000 | 2011-06-07T07:43:21.397000 |
6,261,769 | 6,261,821 | Algorithm to search and assign the BEST string for each element of a string array (from another string array) | This is for automating a testing process. I have two string arrays (extracted from two different sources for testing). Each string in one of the arrays has to be assigned to a string in the other array. The strings may not always match exactly, but there may be a similar string (best match) that can be used. If the deg... | The is no gold standard ("BEST") string comparision algorithm. There are rather a number of string similarity algorithms based on various assumptions. The similarity measure takes two strings and returns a number indicating how similar the strings are. Using a similarity measure you can compare how equal the given stri... | Algorithm to search and assign the BEST string for each element of a string array (from another string array) This is for automating a testing process. I have two string arrays (extracted from two different sources for testing). Each string in one of the arrays has to be assigned to a string in the other array. The str... | TITLE:
Algorithm to search and assign the BEST string for each element of a string array (from another string array)
QUESTION:
This is for automating a testing process. I have two string arrays (extracted from two different sources for testing). Each string in one of the arrays has to be assigned to a string in the ot... | [
"algorithm"
] | 1 | 2 | 1,090 | 3 | 0 | 2011-06-07T07:13:53.520000 | 2011-06-07T07:19:49.320000 |
6,261,774 | 6,261,863 | Why does the css style in the page change when I use the Response.Write() method in asp.net to output the javascript code? | When I use the Response.Write() method in asp.net to output javascript code, such as the alert method, some of the css styles in this page are changed. For example,when I use the code in asp.net like this: Response.Write(" "); When I run the file, first it popup the alert message, but after the page loads completely, I... | That is because you are using Response.Write where you are not supposed to use it. You are using it outside of the code that is generating the page content, which means that you put the Javascript code outside of the HTML document. When you have anything before the doctype tag, the doctype is ignored and the page is pa... | Why does the css style in the page change when I use the Response.Write() method in asp.net to output the javascript code? When I use the Response.Write() method in asp.net to output javascript code, such as the alert method, some of the css styles in this page are changed. For example,when I use the code in asp.net li... | TITLE:
Why does the css style in the page change when I use the Response.Write() method in asp.net to output the javascript code?
QUESTION:
When I use the Response.Write() method in asp.net to output javascript code, such as the alert method, some of the css styles in this page are changed. For example,when I use the ... | [
"javascript",
"asp.net",
"css"
] | 1 | 3 | 2,019 | 1 | 0 | 2011-06-07T07:14:37.870000 | 2011-06-07T07:24:12.087000 |
6,261,778 | 6,262,069 | Swing - ensure visible line in text component | I have some text component (particularly it JEditorPane ), and need as response to certain event to make some line in the text component visible - i.e. scroll to it if that necessary. How to do this with Swing? I find setCaretPosition but it not always good. If caret was already at position set for it new, it not make ... | from tutorials How to Use Editor Panes and Text Panes and How to Use Scroll Panes you can get JViewPort that's determine visible Rectangle example: import java.awt.*; import javax.swing.*; import javax.swing.event.*;
public class IsRectVisible {
private static void createAndShowUI() { JFrame frame = new JFrame("IsRec... | Swing - ensure visible line in text component I have some text component (particularly it JEditorPane ), and need as response to certain event to make some line in the text component visible - i.e. scroll to it if that necessary. How to do this with Swing? I find setCaretPosition but it not always good. If caret was al... | TITLE:
Swing - ensure visible line in text component
QUESTION:
I have some text component (particularly it JEditorPane ), and need as response to certain event to make some line in the text component visible - i.e. scroll to it if that necessary. How to do this with Swing? I find setCaretPosition but it not always goo... | [
"java",
"swing",
"jscrollpane",
"viewport",
"jeditorpane"
] | 1 | 3 | 1,117 | 3 | 0 | 2011-06-07T07:15:00.840000 | 2011-06-07T07:44:14.533000 |
6,261,784 | 6,261,855 | Style attribute in IMAGE tag is not working in all browsers | I have a style attribute that is not working. In my code I am using an image for print. I want HAND CURSOR, so I added style attribute like the code below: but this is not working in browsers other than Internet Explorer. | On Quirksmode there is compatibility table which shows hand isn't indeed supported. Use cursor: pointer instead of hand (because you really don't care about IE <5.5), as it is explained in the bottom of the page: In the past the hand value was Microsoft's way of saying pointer; and IE 5.0 and 5.5 only support hand. Bec... | Style attribute in IMAGE tag is not working in all browsers I have a style attribute that is not working. In my code I am using an image for print. I want HAND CURSOR, so I added style attribute like the code below: but this is not working in browsers other than Internet Explorer. | TITLE:
Style attribute in IMAGE tag is not working in all browsers
QUESTION:
I have a style attribute that is not working. In my code I am using an image for print. I want HAND CURSOR, so I added style attribute like the code below: but this is not working in browsers other than Internet Explorer.
ANSWER:
On Quirksmo... | [
"html",
"css",
"vb.net",
"cursor"
] | 0 | 5 | 618 | 1 | 0 | 2011-06-07T07:15:25.717000 | 2011-06-07T07:23:21.253000 |
6,261,787 | 6,261,895 | Selector on a variable content with jQuery | I have this code: jQuery('#btSave').click(function (event) { var jqxhr = $.post("Controller/Action", { lastName: $("#LastName").val() }, function (data) { //here }) }); I'd like to know if in the "data" variable the id "Mydiv" exist How can I don this? Thanks, | I assume data is a string containing HTML markup. If so, then: var tree = $(data); if (tree.find("#Mydiv")[0]) { // An element with the `id` "Mydiv" exists in the tree } You don't have to use a variable, you could just do this: if ($(data).find("#Mydiv")[0]) { // An element with the `id` "Mydiv" exists in the tree }...... | Selector on a variable content with jQuery I have this code: jQuery('#btSave').click(function (event) { var jqxhr = $.post("Controller/Action", { lastName: $("#LastName").val() }, function (data) { //here }) }); I'd like to know if in the "data" variable the id "Mydiv" exist How can I don this? Thanks, | TITLE:
Selector on a variable content with jQuery
QUESTION:
I have this code: jQuery('#btSave').click(function (event) { var jqxhr = $.post("Controller/Action", { lastName: $("#LastName").val() }, function (data) { //here }) }); I'd like to know if in the "data" variable the id "Mydiv" exist How can I don this? Thanks... | [
"jquery"
] | 0 | 1 | 464 | 5 | 0 | 2011-06-07T07:15:56.467000 | 2011-06-07T07:27:52.840000 |
6,261,796 | 6,261,841 | REGEX To accept numbers separated by commas, but number range is 0-32767 | I need to write a regular expression for taking input like this 23,456,22,1,32767 i.e. No commas allowed at the start or end. Spaces may come before and/or start of comma for e.g. 23, 45,56,67 etc. Ranges of each number should be 0-32767. Currently I am using regular expression like this [0-9]+(,[0-9]+)*. This allows f... | It's probably wise to do it in two steps. First check that the range is 0-99999: ^[0-9]{1,5}( *, *[0-9]{1,5})*$ Then parse the string to a list of integers using a general purpose programming language and check that x <= 32767 for each integer x. | REGEX To accept numbers separated by commas, but number range is 0-32767 I need to write a regular expression for taking input like this 23,456,22,1,32767 i.e. No commas allowed at the start or end. Spaces may come before and/or start of comma for e.g. 23, 45,56,67 etc. Ranges of each number should be 0-32767. Currentl... | TITLE:
REGEX To accept numbers separated by commas, but number range is 0-32767
QUESTION:
I need to write a regular expression for taking input like this 23,456,22,1,32767 i.e. No commas allowed at the start or end. Spaces may come before and/or start of comma for e.g. 23, 45,56,67 etc. Ranges of each number should be... | [
"regex",
"numbers",
"expression",
"range",
"spaces"
] | 9 | 16 | 8,792 | 2 | 0 | 2011-06-07T07:16:48.760000 | 2011-06-07T07:22:01.597000 |
6,261,804 | 6,261,903 | Cannot access image site(IIS) directly | I am talking about IIS and ASP.NET application. Currently I decide to create one web application in one site (http://domain.com) and another one site for keeping images (http://images.domain.com). After a little work, I found the problem of accessing the path for creating the images from web application site to image s... | A few options, most of them applicable if both sites are on the same computer, or even on the same network domain: Give the windows user that acts as the identity of the main site's application pool, access permissions to the Images' site folder. use Impersonation to access the other images' site folders with the right... | Cannot access image site(IIS) directly I am talking about IIS and ASP.NET application. Currently I decide to create one web application in one site (http://domain.com) and another one site for keeping images (http://images.domain.com). After a little work, I found the problem of accessing the path for creating the imag... | TITLE:
Cannot access image site(IIS) directly
QUESTION:
I am talking about IIS and ASP.NET application. Currently I decide to create one web application in one site (http://domain.com) and another one site for keeping images (http://images.domain.com). After a little work, I found the problem of accessing the path for... | [
"asp.net",
"image",
"iis"
] | 1 | 0 | 2,702 | 1 | 0 | 2011-06-07T07:18:17.950000 | 2011-06-07T07:28:33.603000 |
6,261,814 | 6,263,459 | How do you regulate concurrency/relative process performance in Erlang? | Let's say I have to read from a directory that has many large XML files in it, and I have to parse that and send them to some service via network, and then write the response to disk again. If it were Java or C++ etc., I may do something like this (hope this makes sense): (File read & xml parsing process) -> bounded-qu... | There is no real way to limit the queue sizes of a process except by handling them all in a timely fashion. Best way would be to simply check available resources before spawning and wait if they are insufficient. So if you are worried about memory, check memory before spawning a new process. if discspace, check diskspa... | How do you regulate concurrency/relative process performance in Erlang? Let's say I have to read from a directory that has many large XML files in it, and I have to parse that and send them to some service via network, and then write the response to disk again. If it were Java or C++ etc., I may do something like this ... | TITLE:
How do you regulate concurrency/relative process performance in Erlang?
QUESTION:
Let's say I have to read from a directory that has many large XML files in it, and I have to parse that and send them to some service via network, and then write the response to disk again. If it were Java or C++ etc., I may do so... | [
"multithreading",
"performance",
"concurrency",
"erlang"
] | 4 | 3 | 860 | 3 | 0 | 2011-06-07T07:19:06.357000 | 2011-06-07T09:47:41.877000 |
6,261,820 | 6,263,568 | jquery Slider with two arrows | I'm looking for jquery slider with two arrow.Here is working of jquery slider with arrow. Is there any way to download it? thanks | This is what you're looking for: How to change Jquery UI Slider handle or: Changing Slider handle image | jquery Slider with two arrows I'm looking for jquery slider with two arrow.Here is working of jquery slider with arrow. Is there any way to download it? thanks | TITLE:
jquery Slider with two arrows
QUESTION:
I'm looking for jquery slider with two arrow.Here is working of jquery slider with arrow. Is there any way to download it? thanks
ANSWER:
This is what you're looking for: How to change Jquery UI Slider handle or: Changing Slider handle image | [
"jquery"
] | 0 | 0 | 4,129 | 2 | 0 | 2011-06-07T07:19:46.607000 | 2011-06-07T09:57:04.280000 |
6,261,826 | 6,262,088 | Azure Storage Connection Check | I have a console application which uploads jobs to the workers running in the cloud. The application connects to Azure Storage and uploads some files to blobs and put some messages to queues. Currently, I am using the development storage. I actually want to know at which state my client application connects to the stor... | The client doesn't send any messages until you call a command on the storage - e.g. until you try to get or put a property of a blob, container, or queue - e.g. in the sample code below (from http://msdn.microsoft.com/en-us/library/gg651129.aspx ) then messages are sent in 3 specific places: // Variables for the cloud ... | Azure Storage Connection Check I have a console application which uploads jobs to the workers running in the cloud. The application connects to Azure Storage and uploads some files to blobs and put some messages to queues. Currently, I am using the development storage. I actually want to know at which state my client a... | TITLE:
Azure Storage Connection Check
QUESTION:
I have a console application which uploads jobs to the workers running in the cloud. The application connects to Azure Storage and uploads some files to blobs and put some messages to queues. Currently, I am using the development storage. I actually want to know at which... | [
"azure"
] | 5 | 4 | 17,445 | 3 | 0 | 2011-06-07T07:20:07.470000 | 2011-06-07T07:46:23.513000 |
6,261,843 | 6,262,431 | Tool for building intelligent agent? | Suggest me any open source based platform/IDE/framework/toolkit for developing intelligent agent. I don't have any background in this area, would like to use a tool or any tutorial in building intelligent agent. | If you don't have any background at all, I suggest you start with something simple. I had quite a good experience with dmangame, a simple Python engine where you can script the behaviour of agents. The good point is that the installation is very simple, you know where to code your Python scripts for AI, there is a nice... | Tool for building intelligent agent? Suggest me any open source based platform/IDE/framework/toolkit for developing intelligent agent. I don't have any background in this area, would like to use a tool or any tutorial in building intelligent agent. | TITLE:
Tool for building intelligent agent?
QUESTION:
Suggest me any open source based platform/IDE/framework/toolkit for developing intelligent agent. I don't have any background in this area, would like to use a tool or any tutorial in building intelligent agent.
ANSWER:
If you don't have any background at all, I s... | [
"open-source",
"artificial-intelligence"
] | 2 | 1 | 3,221 | 2 | 0 | 2011-06-07T07:22:14.037000 | 2011-06-07T08:20:19.510000 |
6,261,858 | 6,271,786 | Internationalization in Hibernate validators | Does Hibernate validators supports internationalization. I saw the jar and I could see the various ValidationMessages.properties file. Can we create our own custom error messages which will be internationalized? I don't want to use error messages provided by default in Hibernate validators. We need to use our own custo... | I18N is integral part of the Bean Validation specification. By default messages are retrieved from a resource bundle named "ValidationMessages". So just provide this bundle (e.g. ValidationMessages.properties) for the language(s) you need to override the default messages from Hibernate Validator (which are retrieved fr... | Internationalization in Hibernate validators Does Hibernate validators supports internationalization. I saw the jar and I could see the various ValidationMessages.properties file. Can we create our own custom error messages which will be internationalized? I don't want to use error messages provided by default in Hiber... | TITLE:
Internationalization in Hibernate validators
QUESTION:
Does Hibernate validators supports internationalization. I saw the jar and I could see the various ValidationMessages.properties file. Can we create our own custom error messages which will be internationalized? I don't want to use error messages provided b... | [
"java",
"internationalization",
"hibernate-validator"
] | 6 | 9 | 6,519 | 1 | 0 | 2011-06-07T07:23:28.603000 | 2011-06-07T21:18:59.657000 |
6,261,859 | 6,262,075 | Get data from an internet link in Android | I am making an application which takes a URL with. *.asp extension and we pass it the required parameters and get some string result using POST method. Any suggestions on how to achieve this? UPDATED: Actually I have a.net link which takes some POST Parameters and gives me a Result. How can I do that in Android? | HTTPResponse should do the trick: DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.yoururl.com");
List nameValuePairs = new ArrayList (1); | Get data from an internet link in Android I am making an application which takes a URL with. *.asp extension and we pass it the required parameters and get some string result using POST method. Any suggestions on how to achieve this? UPDATED: Actually I have a.net link which takes some POST Parameters and gives me a Re... | TITLE:
Get data from an internet link in Android
QUESTION:
I am making an application which takes a URL with. *.asp extension and we pass it the required parameters and get some string result using POST method. Any suggestions on how to achieve this? UPDATED: Actually I have a.net link which takes some POST Parameters... | [
"android",
"hyperlink",
"http-post"
] | 5 | 4 | 4,811 | 3 | 0 | 2011-06-07T07:23:33.380000 | 2011-06-07T07:45:05.610000 |
6,261,888 | 6,261,919 | AppStore Submission: Query about Universal App | I have recently created a Universal App in Xcode 4 to build my new app. I have completed the iPad component only and intend to submit it to the app store. My question is, do I need to create a new iPad specific app for the submission or can I submit the universal app (without the iPhone component) with some tweaks? App... | A Universal app should support both platforms. If you do not have any views or code specifically for the iPhone, then you should just submit it as an iPad app. And if later you decide to add iPhone specific features, you can do so and submit an update as a universal app. Submitting a Universal app that does not have an... | AppStore Submission: Query about Universal App I have recently created a Universal App in Xcode 4 to build my new app. I have completed the iPad component only and intend to submit it to the app store. My question is, do I need to create a new iPad specific app for the submission or can I submit the universal app (with... | TITLE:
AppStore Submission: Query about Universal App
QUESTION:
I have recently created a Universal App in Xcode 4 to build my new app. I have completed the iPad component only and intend to submit it to the app store. My question is, do I need to create a new iPad specific app for the submission or can I submit the u... | [
"ipad",
"app-store",
"universal"
] | 0 | 1 | 375 | 1 | 0 | 2011-06-07T07:26:55.077000 | 2011-06-07T07:30:01.827000 |
6,261,898 | 6,261,988 | php search array which contains "key : value" items | If i have an array $output that looks like this, how can i search the array and echo out the duration value which in this case is 30. Duration is not always key [18]. Array ( [16] => hasKeyframes: true [17] => hasMetadata: true [18] => duration: 30 [19] => audiosamplerate: 22000 [20] => audiodatarate: 68 [21] => datasi... | $array=preg_grep("/duration/", $output); $array=implode(",",$array); $key_value=explode(":",$array); echo $key_value[1]; | php search array which contains "key : value" items If i have an array $output that looks like this, how can i search the array and echo out the duration value which in this case is 30. Duration is not always key [18]. Array ( [16] => hasKeyframes: true [17] => hasMetadata: true [18] => duration: 30 [19] => audiosampl... | TITLE:
php search array which contains "key : value" items
QUESTION:
If i have an array $output that looks like this, how can i search the array and echo out the duration value which in this case is 30. Duration is not always key [18]. Array ( [16] => hasKeyframes: true [17] => hasMetadata: true [18] => duration: 30 ... | [
"php",
"arrays"
] | 2 | 1 | 1,284 | 5 | 0 | 2011-06-07T07:28:03.853000 | 2011-06-07T07:36:26.987000 |
6,261,901 | 6,262,227 | SQL Connection with C# | TextBox1=Server Name
TextBox2=Db Name
TextBox3=User Name
TextBox4=Password I declared as a variable "Server Name,dbname,user name,password".My question is; I want to test my sql connection on another machine by them using. How can I do that with c#? //// SqlConnection conn = new SqlConnection
////("Data Source="+ s... | You could use the SqlConnectionStringBuilder for this scenario: SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
builder.DataSource = TextBox1.Text.Trim(); builder.InitialCatalog = TextBox2.Text.Trim(); builder.UserID = TextBox3.Text.Trim(); builder.Password = TextBox4.Text.Trim();
string result... | SQL Connection with C# TextBox1=Server Name
TextBox2=Db Name
TextBox3=User Name
TextBox4=Password I declared as a variable "Server Name,dbname,user name,password".My question is; I want to test my sql connection on another machine by them using. How can I do that with c#? //// SqlConnection conn = new SqlConnection
... | TITLE:
SQL Connection with C#
QUESTION:
TextBox1=Server Name
TextBox2=Db Name
TextBox3=User Name
TextBox4=Password I declared as a variable "Server Name,dbname,user name,password".My question is; I want to test my sql connection on another machine by them using. How can I do that with c#? //// SqlConnection conn = ... | [
"c#",
"sql-server"
] | 1 | 4 | 2,857 | 2 | 0 | 2011-06-07T07:28:17.167000 | 2011-06-07T07:58:22.207000 |
6,261,906 | 6,262,015 | dynamicly generate xml-to-linq query filter based on combobox value C# | I got a form with multiple comboboxes, where each combobox can be set to different values. Based on the combobox value I want to create a query filter. I want to iterate through all comboboxes and add its value to the filter if it dont say "All". I want to do something like this: XElement root = XElement.Load(fileName)... | You can just dynamically add Where clauses as follows: XElement root = XElement.Load(fileName); IEnumerable selectedElements = root.Elements("OrderNum").Elements("ServiceJob");
for(int i = 0; i < combArray.GetLength(0); i++) { if(combArray[i].Text!= "All") { selectedElements = selectedElements.Where(el => el.Element(c... | dynamicly generate xml-to-linq query filter based on combobox value C# I got a form with multiple comboboxes, where each combobox can be set to different values. Based on the combobox value I want to create a query filter. I want to iterate through all comboboxes and add its value to the filter if it dont say "All". I ... | TITLE:
dynamicly generate xml-to-linq query filter based on combobox value C#
QUESTION:
I got a form with multiple comboboxes, where each combobox can be set to different values. Based on the combobox value I want to create a query filter. I want to iterate through all comboboxes and add its value to the filter if it ... | [
"c#",
"xml",
"linq-to-xml"
] | 0 | 0 | 411 | 2 | 0 | 2011-06-07T07:28:51.640000 | 2011-06-07T07:39:00.063000 |
6,261,910 | 6,261,976 | Thread Confinement | I am reading Java Concurrency in Practice and kind of confused with the thread confinement concept. The book says that When an object is confined to a thread, such usage is automatically thread-safe even if the confined object itself is not So when an object is confined to a thread, no other thread can have access to i... | So when an object is confined to a thread, no other thread can have access to it? No, it's the other way around: if you ensure that no other thread has access to an object, then that object is said to be confined to a single thread. There's no language- or JVM-level mechanism that confines an object to a single thread.... | Thread Confinement I am reading Java Concurrency in Practice and kind of confused with the thread confinement concept. The book says that When an object is confined to a thread, such usage is automatically thread-safe even if the confined object itself is not So when an object is confined to a thread, no other thread c... | TITLE:
Thread Confinement
QUESTION:
I am reading Java Concurrency in Practice and kind of confused with the thread confinement concept. The book says that When an object is confined to a thread, such usage is automatically thread-safe even if the confined object itself is not So when an object is confined to a thread,... | [
"java",
"multithreading",
"concurrency",
"thread-safety",
"thread-confinement"
] | 45 | 51 | 13,176 | 8 | 0 | 2011-06-07T07:28:56.013000 | 2011-06-07T07:35:37.150000 |
6,261,916 | 6,261,938 | Calling flash file in iphone application | Can anybody suggest me how to call flash file in iphone application. Is it possible or not? Is there any way to call flash file in iphone application? Is it possible to call flash file in Titanium then we call titanium in iphone application. Can any body suggest me in details? waiting for your reply! | No it's not possible. Flash is not supported on iPhone Edit 1 (to OP's comment) No. The Flash player is not supported either in Safari on the iPhone or in iPhone apps. As I understand Titanum (which I don't have much knowledge of) it is not a runtime but a compiler that compiles "web-languages" into specific files for ... | Calling flash file in iphone application Can anybody suggest me how to call flash file in iphone application. Is it possible or not? Is there any way to call flash file in iphone application? Is it possible to call flash file in Titanium then we call titanium in iphone application. Can any body suggest me in details? w... | TITLE:
Calling flash file in iphone application
QUESTION:
Can anybody suggest me how to call flash file in iphone application. Is it possible or not? Is there any way to call flash file in iphone application? Is it possible to call flash file in Titanium then we call titanium in iphone application. Can any body sugges... | [
"iphone",
"flash",
"xcode",
"titanium"
] | 1 | 4 | 252 | 1 | 0 | 2011-06-07T07:29:05.243000 | 2011-06-07T07:31:16.547000 |
6,261,917 | 6,262,109 | Can't create a sql connection due to the fact that it won't rcognize the data source keyword | Hello I'm trying to run a simple sql command on a DB from MS VS C# 2010 and I have encountered a error I have never seen before the relevant code is: SqlConnection comCon = new SqlConnection(@"Data Source=C:\\Users\\George\\Desktop\\programming\\C#workspace\\Projects\\Examen\\Examen\\Companie.mdf;Initial Catalog=Proiec... | You are using the wrong structure. To attach a database file, you need to use the following structure: SqlConnection sqlConnection = "Server=DatabaseServerName;AttachDbFilename=d:\Database\Database.mdf; Database=DatabaseName; Trusted_Connection=Yes"; You need to have the right permissions on both the target file and da... | Can't create a sql connection due to the fact that it won't rcognize the data source keyword Hello I'm trying to run a simple sql command on a DB from MS VS C# 2010 and I have encountered a error I have never seen before the relevant code is: SqlConnection comCon = new SqlConnection(@"Data Source=C:\\Users\\George\\Des... | TITLE:
Can't create a sql connection due to the fact that it won't rcognize the data source keyword
QUESTION:
Hello I'm trying to run a simple sql command on a DB from MS VS C# 2010 and I have encountered a error I have never seen before the relevant code is: SqlConnection comCon = new SqlConnection(@"Data Source=C:\\... | [
"c#",
"sqlconnection"
] | 0 | 1 | 1,497 | 2 | 0 | 2011-06-07T07:29:32.137000 | 2011-06-07T07:47:35.190000 |
6,261,940 | 6,262,238 | how to export 3 table values to single excel using sql server 2008 | i need to export 3 full sql table values in to a single excel sheet using store procedure. i have done with single table, query i have used for single table: set @sql='bcp "select * from Veest..ven_machinedescription_day_report " queryout c:\Daily_Reports\data_file.csv -c -t, -T -S' + @@servername exec master..xp_cmdsh... | Create a view. Then export from the view to Excel. CREATE VIEW vending_report AS SELECT 'A' segment, col1, col2, shift_type, col4, col5, col6 FROM ven_machinedescription_day_report
UNION ALL
SELECT 'B', NULL, NULL, NULL, NULL, NULL, NULL
UNION ALL
SELECT 'C', col1, col2, shift_type, col4, NULL, NULL FROM ven_machin... | how to export 3 table values to single excel using sql server 2008 i need to export 3 full sql table values in to a single excel sheet using store procedure. i have done with single table, query i have used for single table: set @sql='bcp "select * from Veest..ven_machinedescription_day_report " queryout c:\Daily_Repor... | TITLE:
how to export 3 table values to single excel using sql server 2008
QUESTION:
i need to export 3 full sql table values in to a single excel sheet using store procedure. i have done with single table, query i have used for single table: set @sql='bcp "select * from Veest..ven_machinedescription_day_report " query... | [
"sql-server",
"sql-server-2008"
] | 1 | 1 | 1,317 | 1 | 0 | 2011-06-07T07:31:28.630000 | 2011-06-07T07:59:36.120000 |
6,261,941 | 6,262,583 | iOS: convertRect:toView: doesn't work as I expect | I'd like to have the coordinates relative to the main window, therefore I'm using convertRect:toView: with nil as second parameter: CGRect result = [self.view convertRect:addToList.frame toView:nil]; But as a result, I always get NSRect: {{5, 30}, {35, 35}} and that are exactly the values I use for generating the addTo... | If you look at convertRect:toView: 's documentation, you will see that the rect that you pass is defined as within the bounds of the view on which you are calling the method. Since self.view presumably takes the entire window, the rect doesn't change with respect to the window. You should message the parent of the butt... | iOS: convertRect:toView: doesn't work as I expect I'd like to have the coordinates relative to the main window, therefore I'm using convertRect:toView: with nil as second parameter: CGRect result = [self.view convertRect:addToList.frame toView:nil]; But as a result, I always get NSRect: {{5, 30}, {35, 35}} and that are... | TITLE:
iOS: convertRect:toView: doesn't work as I expect
QUESTION:
I'd like to have the coordinates relative to the main window, therefore I'm using convertRect:toView: with nil as second parameter: CGRect result = [self.view convertRect:addToList.frame toView:nil]; But as a result, I always get NSRect: {{5, 30}, {35,... | [
"ios",
"frame",
"cgrect"
] | 7 | 6 | 9,572 | 1 | 0 | 2011-06-07T07:31:32.443000 | 2011-06-07T08:33:25.487000 |
6,261,953 | 6,262,821 | Do modern JavaScript JITers need array-length caching in loops? | I find the practice of caching an array's length property inside a for loop quite distasteful. As in, for (var i = 0, l = myArray.length; i < l; ++i) { //... } In my eyes at least, this hurts readability a lot compared with the straightforward for (var i = 0; i < myArray.length; ++i) { //... } (not to mention that it l... | It depends on a few things: Whether you've proven your code is spending significant time looping Whether the slowest browser you're fully supporting benefits from array length caching Whether you or the people who work on your code find the array length caching hard to read It seems from the benchmarks I've seen (for e... | Do modern JavaScript JITers need array-length caching in loops? I find the practice of caching an array's length property inside a for loop quite distasteful. As in, for (var i = 0, l = myArray.length; i < l; ++i) { //... } In my eyes at least, this hurts readability a lot compared with the straightforward for (var i =... | TITLE:
Do modern JavaScript JITers need array-length caching in loops?
QUESTION:
I find the practice of caching an array's length property inside a for loop quite distasteful. As in, for (var i = 0, l = myArray.length; i < l; ++i) { //... } In my eyes at least, this hurts readability a lot compared with the straightfo... | [
"javascript",
"optimization",
"loops",
"jit"
] | 13 | 12 | 3,660 | 3 | 0 | 2011-06-07T07:33:01.040000 | 2011-06-07T08:52:38.973000 |
6,261,958 | 6,262,552 | Android: How to scroll ScrollView in top | I have two buttons that switching to the next list of events and the previous one. When I go to next\previous event, scrolls remains somewhere below. But I need to "rewind" it up. I'm trying: scrollViewEventDetails.pageScroll(ScrollView.FOCUS_UP); and: scrollViewEventDetails.scrollTo(0, 0); but it doesn't work. Please,... | You shoud write next: scrollViewEventDetails.fullScroll(View.FOCUS_UP);//if you move at the end of the scroll
scrollViewEventDetails.pageScroll(View.FOCUS_UP);//if you move at the middle of the scroll | Android: How to scroll ScrollView in top I have two buttons that switching to the next list of events and the previous one. When I go to next\previous event, scrolls remains somewhere below. But I need to "rewind" it up. I'm trying: scrollViewEventDetails.pageScroll(ScrollView.FOCUS_UP); and: scrollViewEventDetails.scr... | TITLE:
Android: How to scroll ScrollView in top
QUESTION:
I have two buttons that switching to the next list of events and the previous one. When I go to next\previous event, scrolls remains somewhere below. But I need to "rewind" it up. I'm trying: scrollViewEventDetails.pageScroll(ScrollView.FOCUS_UP); and: scrollVi... | [
"android"
] | 23 | 35 | 34,093 | 5 | 0 | 2011-06-07T07:33:35.933000 | 2011-06-07T08:29:48.787000 |
6,261,960 | 6,262,245 | Need help with preg_replace | $text = ' hello ';
$text_2 = preg_replace("/<([a-z][a-z0-9]*)[^>]*?(\/?)>/i",'<$1$2>', $text); OUTPUT(i have given the html format here): hello My problem is all attributes must be removed but not the attributes belongs to table. That is i am expecting the out put exactly like below( HTML FORMAT ): hello What should i... | You are very close with your current reg-ex. You need to do a check (think it is a negative look-ahead in this case?) <(?!table)([a-z][a-z0-9]*)[^>]*?(\/?)> What that first bit of reg-ex is doing is checking that it does not start with 'table', then it is your regex. | Need help with preg_replace $text = ' hello ';
$text_2 = preg_replace("/<([a-z][a-z0-9]*)[^>]*?(\/?)>/i",'<$1$2>', $text); OUTPUT(i have given the html format here): hello My problem is all attributes must be removed but not the attributes belongs to table. That is i am expecting the out put exactly like below( HTML F... | TITLE:
Need help with preg_replace
QUESTION:
$text = ' hello ';
$text_2 = preg_replace("/<([a-z][a-z0-9]*)[^>]*?(\/?)>/i",'<$1$2>', $text); OUTPUT(i have given the html format here): hello My problem is all attributes must be removed but not the attributes belongs to table. That is i am expecting the out put exactly ... | [
"php",
"preg-replace"
] | 0 | 1 | 130 | 3 | 0 | 2011-06-07T07:33:49.043000 | 2011-06-07T08:00:11.953000 |
6,261,965 | 6,262,008 | Change this with Jquery | Is it possible to use Jquery to get these classes and change the font size? Note that the tags keep changing numbers. I can also not edit the input. Akira Kurosawa Ben Jones | Something like $('a[class^="tag-link"]').css('fontSize', '1.1em') should do the trick. a[class^="tag-link"] selects all links with their class starting with "tag-link". | Change this with Jquery Is it possible to use Jquery to get these classes and change the font size? Note that the tags keep changing numbers. I can also not edit the input. Akira Kurosawa Ben Jones | TITLE:
Change this with Jquery
QUESTION:
Is it possible to use Jquery to get these classes and change the font size? Note that the tags keep changing numbers. I can also not edit the input. Akira Kurosawa Ben Jones
ANSWER:
Something like $('a[class^="tag-link"]').css('fontSize', '1.1em') should do the trick. a[class^... | [
"jquery"
] | 0 | 2 | 70 | 4 | 0 | 2011-06-07T07:34:45.303000 | 2011-06-07T07:38:08.260000 |
6,261,977 | 6,262,061 | Disable web authentification in asp .net | I use ASP.Net 4 and I have a project using the form web authentication I have a web service in the same project and I want to disable this web authentication for one page (a web service) I tryed that code: But I've a 302 redirection to the form logon. Is it possible to disable it? Edit I tryied that and it doesn't work... | Remove allowOverride="false" Also remove and add it in place of Finally, make sure your webservice is in the root Directory, otherwise you have to specify the path accordingly. | Disable web authentification in asp .net I use ASP.Net 4 and I have a project using the form web authentication I have a web service in the same project and I want to disable this web authentication for one page (a web service) I tryed that code: But I've a 302 redirection to the form logon. Is it possible to disable i... | TITLE:
Disable web authentification in asp .net
QUESTION:
I use ASP.Net 4 and I have a project using the form web authentication I have a web service in the same project and I want to disable this web authentication for one page (a web service) I tryed that code: But I've a 302 redirection to the form logon. Is it pos... | [
"asp.net",
"authentication",
"web-config"
] | 3 | 2 | 7,535 | 3 | 0 | 2011-06-07T07:35:39.313000 | 2011-06-07T07:43:46.780000 |
6,261,981 | 6,262,059 | PHP DOMNode : how to extract not only text but HTML tags also | I'm trying to make a script that scrapes a website to retrieve the latest news updates. Unfortunately I've run into a small issue that I can't seem to fix with my limited knowledge of DOM. The page I'm trying to scrape is built as follows: Author Content in HTML Date I can retrieve the fields I need just fine, except f... | replace echo $td->nodeValue. " \n"; with echo $dom->saveXML($td). " \n"; | PHP DOMNode : how to extract not only text but HTML tags also I'm trying to make a script that scrapes a website to retrieve the latest news updates. Unfortunately I've run into a small issue that I can't seem to fix with my limited knowledge of DOM. The page I'm trying to scrape is built as follows: Author Content in ... | TITLE:
PHP DOMNode : how to extract not only text but HTML tags also
QUESTION:
I'm trying to make a script that scrapes a website to retrieve the latest news updates. Unfortunately I've run into a small issue that I can't seem to fix with my limited knowledge of DOM. The page I'm trying to scrape is built as follows: ... | [
"php",
"dom",
"screen-scraping"
] | 6 | 4 | 867 | 1 | 0 | 2011-06-07T07:36:06.873000 | 2011-06-07T07:43:42.917000 |
6,261,986 | 6,264,573 | Getting assets within fragements | I am trying to parse an xml file in thread within a fragment. Partial snippet of my code is: public void onCreate(Bundle savedInstanceState) { mAdapter = new ListItemNearbyStoresAdapter(getActivity().getApplicationContext(), mStoresByKey);
setListAdapter(mAdapter);
// Load the list of stores from hard coded xml loadS... | Is accessing the assets in correct within an fragment? Use the Activity ( getActivity() ), not the Application ( getApplicationContext() ) and see if that helps. Unless you have very specific instructions from somebody who knows what they are talking about, never use getApplicationContext() in your app. | Getting assets within fragements I am trying to parse an xml file in thread within a fragment. Partial snippet of my code is: public void onCreate(Bundle savedInstanceState) { mAdapter = new ListItemNearbyStoresAdapter(getActivity().getApplicationContext(), mStoresByKey);
setListAdapter(mAdapter);
// Load the list of... | TITLE:
Getting assets within fragements
QUESTION:
I am trying to parse an xml file in thread within a fragment. Partial snippet of my code is: public void onCreate(Bundle savedInstanceState) { mAdapter = new ListItemNearbyStoresAdapter(getActivity().getApplicationContext(), mStoresByKey);
setListAdapter(mAdapter);
/... | [
"android",
"xml",
"android-fragments"
] | 3 | 14 | 7,734 | 1 | 0 | 2011-06-07T07:36:21.377000 | 2011-06-07T11:35:03.247000 |
6,261,990 | 6,262,046 | Strange NullPointerException | I have strange problem... My file strings.xml contains: My House Well, my R contains: [...] public static final class String { public static final int building_name=0x7f02383; } [...] So, when I try to call this String in my code like this: private final String BUILDING_NAME = getString(R.string.building_name); I have ... | You can't call getString before your Activity has been initialized. That's because getString is the same as context.getResources().getString(). And context is not initialized. So basically, you can not assign value to static variables in this way. But there is a way to use resource strings in your static variables. For... | Strange NullPointerException I have strange problem... My file strings.xml contains: My House Well, my R contains: [...] public static final class String { public static final int building_name=0x7f02383; } [...] So, when I try to call this String in my code like this: private final String BUILDING_NAME = getString(R.s... | TITLE:
Strange NullPointerException
QUESTION:
I have strange problem... My file strings.xml contains: My House Well, my R contains: [...] public static final class String { public static final int building_name=0x7f02383; } [...] So, when I try to call this String in my code like this: private final String BUILDING_NA... | [
"android",
"nullpointerexception",
"runtimeexception"
] | 2 | 10 | 3,360 | 4 | 0 | 2011-06-07T07:36:36.033000 | 2011-06-07T07:42:54.800000 |
6,261,991 | 6,262,183 | How do i access class property using STATIC method from a different class in PHP? | the question title seems pretty confusing, but this is what i want to achieve. i have two classes 1. Category 2. Validation In Category Class i have the following Class Property public $error; //holds all errors in an array. private $dbh; //Database object Handle(PDO). private $validate; //Holds Validation Object priva... | Give your Category instance as parameter to your validation function. You should have something like this: public function required($category, $fields = array()) { foreach($fields as $field) { if(empty($category->data[$field])) {
} } }
$this->validate->required($this); Also you do not use a static method, as mentione... | How do i access class property using STATIC method from a different class in PHP? the question title seems pretty confusing, but this is what i want to achieve. i have two classes 1. Category 2. Validation In Category Class i have the following Class Property public $error; //holds all errors in an array. private $dbh;... | TITLE:
How do i access class property using STATIC method from a different class in PHP?
QUESTION:
the question title seems pretty confusing, but this is what i want to achieve. i have two classes 1. Category 2. Validation In Category Class i have the following Class Property public $error; //holds all errors in an ar... | [
"php",
"class",
"static"
] | 0 | 3 | 318 | 4 | 0 | 2011-06-07T07:36:37.180000 | 2011-06-07T07:53:50.067000 |
6,261,993 | 6,262,198 | How to read web content from the end | Is it possible to read web content from the end? I'm trying to fetch data from a 400 KB PHP file but the new information is at the end of file. | Assuming what you really want is to download a part of a file, see Range Requests and Partial Responses. | How to read web content from the end Is it possible to read web content from the end? I'm trying to fetch data from a 400 KB PHP file but the new information is at the end of file. | TITLE:
How to read web content from the end
QUESTION:
Is it possible to read web content from the end? I'm trying to fetch data from a 400 KB PHP file but the new information is at the end of file.
ANSWER:
Assuming what you really want is to download a part of a file, see Range Requests and Partial Responses. | [
"c#",
"visual-studio"
] | 1 | 2 | 66 | 1 | 0 | 2011-06-07T07:36:42.367000 | 2011-06-07T07:55:26.583000 |
6,262,003 | 6,262,128 | GWT,Smart GWT,GWT-ext comparison | I am using GWT 2.0.3 with ext in my application.This project is no longer under active development and has been superseded by Smart GWT.I am using HMVC pattern for this application. Now with existing GWT 2.0.3 and ext version I am getting many issues.Issues are related to the followinng things. Browser Compatibility HT... | Regarding migrating - It wont be easy to migrate over to your existing code to plain gwt 2.3. ext uses different framework and classes that you will not find in the same way in gwt, you will have to end up re-coding A LOT of the things. If you want to re-code, then the options are open to you- Smart GWT is being active... | GWT,Smart GWT,GWT-ext comparison I am using GWT 2.0.3 with ext in my application.This project is no longer under active development and has been superseded by Smart GWT.I am using HMVC pattern for this application. Now with existing GWT 2.0.3 and ext version I am getting many issues.Issues are related to the followinng... | TITLE:
GWT,Smart GWT,GWT-ext comparison
QUESTION:
I am using GWT 2.0.3 with ext in my application.This project is no longer under active development and has been superseded by Smart GWT.I am using HMVC pattern for this application. Now with existing GWT 2.0.3 and ext version I am getting many issues.Issues are related... | [
"java",
"spring",
"gwt",
"architecture",
"smartgwt"
] | 1 | 4 | 2,653 | 3 | 0 | 2011-06-07T07:37:36.037000 | 2011-06-07T07:49:48.893000 |
6,262,025 | 6,262,117 | Obtaining IP Address of Callback Channel in WCF | I have a WCF service on a duplex channel, with a callback contract. The service keeps track of the clients by storing the result of OperationContext.Current.GetCallbackChannel () in a list when a client calls a SubscribeMe() method on the service. The service will periodically ping these callback channels to keep track... | Not tested (would take a while to get all the config set up!), but I think you're looking for something like this: OperationContext context = OperationContext.Current; MessageProperties messageProperties = context.IncomingMessageProperties; RemoteEndpointMessageProperty endpointProperty = messageProperties[RemoteEndpoi... | Obtaining IP Address of Callback Channel in WCF I have a WCF service on a duplex channel, with a callback contract. The service keeps track of the clients by storing the result of OperationContext.Current.GetCallbackChannel () in a list when a client calls a SubscribeMe() method on the service. The service will periodi... | TITLE:
Obtaining IP Address of Callback Channel in WCF
QUESTION:
I have a WCF service on a duplex channel, with a callback contract. The service keeps track of the clients by storing the result of OperationContext.Current.GetCallbackChannel () in a list when a client calls a SubscribeMe() method on the service. The se... | [
"c#",
".net",
"wcf"
] | 4 | 5 | 3,280 | 1 | 0 | 2011-06-07T07:40:17.517000 | 2011-06-07T07:49:04.413000 |
6,262,033 | 6,265,511 | Ruby: How do you trigger something only when inherited by a non-abstract class? | I have an abstract Base class. Let's call it Animal::Base. module Animal class Base < ActiveRecord::Base self.abstract_class = true # so that Rails won't think this is in STI-mode ordered_tree end end ordered_tree just applies the OrderedTree gem to the class that invokes the method: belongs_to:parent_node,:class_name ... | You may have to put your ordered_tree call in the Dog class. There is also the self.included method, but that runs everything within the scope of the parent class, though it passes in the child class as a parameter. So, maybe you could do something like: module Animal class Base < ActiveRecord::Base self.abstract_class... | Ruby: How do you trigger something only when inherited by a non-abstract class? I have an abstract Base class. Let's call it Animal::Base. module Animal class Base < ActiveRecord::Base self.abstract_class = true # so that Rails won't think this is in STI-mode ordered_tree end end ordered_tree just applies the OrderedTr... | TITLE:
Ruby: How do you trigger something only when inherited by a non-abstract class?
QUESTION:
I have an abstract Base class. Let's call it Animal::Base. module Animal class Base < ActiveRecord::Base self.abstract_class = true # so that Rails won't think this is in STI-mode ordered_tree end end ordered_tree just app... | [
"ruby-on-rails",
"ruby",
"inheritance"
] | 0 | 1 | 120 | 1 | 0 | 2011-06-07T07:41:33.750000 | 2011-06-07T12:58:03.117000 |
6,262,047 | 6,262,102 | jQuery body fade-in | I was wondering how to create body fade in when page is refreshing? You can see example at - saporiexports.com. And how much this kinda jQuery effect affects page performance? Only thing that I found on that page witch maybe would be related with that effect is //PRELOAD SITE $(window).load(function(){ $('#preloader').... | What that website did was to put an overlay over the whole page and fade it out. I don't think it matters much, you can test both approaches to see which is faster | jQuery body fade-in I was wondering how to create body fade in when page is refreshing? You can see example at - saporiexports.com. And how much this kinda jQuery effect affects page performance? Only thing that I found on that page witch maybe would be related with that effect is //PRELOAD SITE $(window).load(function... | TITLE:
jQuery body fade-in
QUESTION:
I was wondering how to create body fade in when page is refreshing? You can see example at - saporiexports.com. And how much this kinda jQuery effect affects page performance? Only thing that I found on that page witch maybe would be related with that effect is //PRELOAD SITE $(win... | [
"jquery",
"fadein"
] | 4 | 3 | 12,561 | 2 | 0 | 2011-06-07T07:43:09.663000 | 2011-06-07T07:47:15.777000 |
6,262,055 | 6,262,625 | Mvc 3 How to store a route in a class? | What is the best way to store a route according to all nice patterns? We have a class that returns a list with menu items. These items are then rendered into the main menu. Once you hover over an item in the menu, an ajax call is made. This means that i have to store the path and parameters for this call in the menu it... | This might work for you: public class MenuItem { public string Name { get; set; }
public RouteValueDictionary RouteValues { get { return new RouteValueDictionary( new { controller = "Pages", action = this.Name }); } } } In your view, you could do something like this: @foreach (var menuItem in Model.MenuItems) { @Html.... | Mvc 3 How to store a route in a class? What is the best way to store a route according to all nice patterns? We have a class that returns a list with menu items. These items are then rendered into the main menu. Once you hover over an item in the menu, an ajax call is made. This means that i have to store the path and ... | TITLE:
Mvc 3 How to store a route in a class?
QUESTION:
What is the best way to store a route according to all nice patterns? We have a class that returns a list with menu items. These items are then rendered into the main menu. Once you hover over an item in the menu, an ajax call is made. This means that i have to s... | [
"c#",
"asp.net-mvc-3",
"routes"
] | 1 | 1 | 202 | 3 | 0 | 2011-06-07T07:43:30.717000 | 2011-06-07T08:36:53.837000 |
6,262,071 | 6,262,113 | What is the difference between $ and jQuery | When I try to use $("#div_id") in $(document).ready it returns NULL, but when I use jQuery("#div_id") it returns the actual object! Why is that happening? UPDATE: I tried noConflict method without gaining any hints. jQuery.noConflict() function (a,b){return new c.fn.init(a,b)}
$.noConflict(); TypeError: Object functio... | See jQuery.noConflict(). Could other javascript libraries on your page be using the $ variable? $ is just a variable that is used to alias jQuery and being a variable, anything could be assigned to it. | What is the difference between $ and jQuery When I try to use $("#div_id") in $(document).ready it returns NULL, but when I use jQuery("#div_id") it returns the actual object! Why is that happening? UPDATE: I tried noConflict method without gaining any hints. jQuery.noConflict() function (a,b){return new c.fn.init(a,b)... | TITLE:
What is the difference between $ and jQuery
QUESTION:
When I try to use $("#div_id") in $(document).ready it returns NULL, but when I use jQuery("#div_id") it returns the actual object! Why is that happening? UPDATE: I tried noConflict method without gaining any hints. jQuery.noConflict() function (a,b){return ... | [
"jquery"
] | 21 | 19 | 15,125 | 6 | 0 | 2011-06-07T07:44:42.237000 | 2011-06-07T07:47:47 |
6,262,084 | 6,262,377 | How to slide image with finger touch in android? | I am developing an android application in which I want to slide images with finger touch. I have implemented an onClickListener with which I can slide images but I don't know how to implement finger touch functionality. Please suggest me any method how to slide images with finger touch. Any Suggestion or any tutorial o... | You can use onTouchListner method instead of onClickListner. Below onTouchListners example is given.. public class abc extends Activity implements OnTouchListener { ImageView img; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.one);
img = (ImageView) fi... | How to slide image with finger touch in android? I am developing an android application in which I want to slide images with finger touch. I have implemented an onClickListener with which I can slide images but I don't know how to implement finger touch functionality. Please suggest me any method how to slide images wi... | TITLE:
How to slide image with finger touch in android?
QUESTION:
I am developing an android application in which I want to slide images with finger touch. I have implemented an onClickListener with which I can slide images but I don't know how to implement finger touch functionality. Please suggest me any method how ... | [
"java",
"android",
"touch"
] | 9 | 33 | 41,635 | 5 | 0 | 2011-06-07T07:46:03.557000 | 2011-06-07T08:12:37.967000 |
6,262,087 | 6,262,897 | Possible collision of two ajax requests? | I'm having trouble with one of my sites on which two ajax requests are executed when the page loads. I'm using jQuery in combination with an PHP application based on the zend framework. The relevant HTML (simplified) looks like: First Option Second Option First Option Second Option Here is what my jQuery looks like: $(... | It seems your definitely on the right rack with the PHP session lock: Session locking (concurrency) notes The default PHP session model locks a session until the page has finished loading. So if you have two or three frames that load, and each one uses sessions, they will load one at a time. This is so that only one PH... | Possible collision of two ajax requests? I'm having trouble with one of my sites on which two ajax requests are executed when the page loads. I'm using jQuery in combination with an PHP application based on the zend framework. The relevant HTML (simplified) looks like: First Option Second Option First Option Second Opt... | TITLE:
Possible collision of two ajax requests?
QUESTION:
I'm having trouble with one of my sites on which two ajax requests are executed when the page loads. I'm using jQuery in combination with an PHP application based on the zend framework. The relevant HTML (simplified) looks like: First Option Second Option First... | [
"php",
"ajax",
"zend-framework",
"jquery"
] | 7 | 1 | 1,280 | 1 | 0 | 2011-06-07T07:46:18.573000 | 2011-06-07T08:58:48.697000 |
6,262,090 | 6,262,153 | Is this a legal regex pattern in C? | I'm trying to match on a line ending with something like: blocking=12345us The pattern I tried to match with is: char *pattern = "blocking=(\\d{1,})us"; I have tried it with only one blackslash just in case but still no luck. If I change that line to: char *pattern = "(.*)"; it matches fine... I also don't get an error... | Looking at the documentation for REs supported by regcomp it would appear that \d is not supported - try: char *pattern = "blocking=([0-9]){1,}us"; | Is this a legal regex pattern in C? I'm trying to match on a line ending with something like: blocking=12345us The pattern I tried to match with is: char *pattern = "blocking=(\\d{1,})us"; I have tried it with only one blackslash just in case but still no luck. If I change that line to: char *pattern = "(.*)"; it match... | TITLE:
Is this a legal regex pattern in C?
QUESTION:
I'm trying to match on a line ending with something like: blocking=12345us The pattern I tried to match with is: char *pattern = "blocking=(\\d{1,})us"; I have tried it with only one blackslash just in case but still no luck. If I change that line to: char *pattern ... | [
"c",
"regex",
"pattern-matching"
] | 2 | 3 | 167 | 2 | 0 | 2011-06-07T07:46:27.867000 | 2011-06-07T07:51:46.963000 |
6,262,097 | 6,262,205 | creating an efficient pagination system | So i'm creating a pagination system for a blog-like system. I already have the whole concept behind limiting the query using limit,offset. However, I came to a problem when creating the actual navigation. I have no idea how to calculate the amount of pages I have total. Now, obviously I can run a query that simply sele... | If your table uses the MyISAM engine, running COUNT(*) is an O(1) operation as it keeps a cached value of the total number of rows. Even if you weren't using that, or had a slightly different query, I doubt that doing a single COUNT would be a bottleneck in the system. If it really were a huge issue (and I would sugges... | creating an efficient pagination system So i'm creating a pagination system for a blog-like system. I already have the whole concept behind limiting the query using limit,offset. However, I came to a problem when creating the actual navigation. I have no idea how to calculate the amount of pages I have total. Now, obvi... | TITLE:
creating an efficient pagination system
QUESTION:
So i'm creating a pagination system for a blog-like system. I already have the whole concept behind limiting the query using limit,offset. However, I came to a problem when creating the actual navigation. I have no idea how to calculate the amount of pages I hav... | [
"php",
"sql",
"pagination"
] | 2 | 6 | 696 | 4 | 0 | 2011-06-07T07:46:53.130000 | 2011-06-07T07:56:06.410000 |
6,262,107 | 6,262,290 | In Java servlets, why are attributes defined only for context, request and session scopes? | In servlets, getAttribute() and setAttribute() are only associated with HttpSession, ServletRequest and ServletContext, i.e attributes are defined only for context, request and session scopes. Why not for, say, ServletResponse or ServletConfig? | ServletConfig is for init-params defined in web.xml. Setting attribute to HttpServletResponse will not avail anything, and neither it will make any sense, as response is for the client -- not from the client, i.e. browser, and that is not capable of understanding that, nonetheless. And you must understand that JSP and ... | In Java servlets, why are attributes defined only for context, request and session scopes? In servlets, getAttribute() and setAttribute() are only associated with HttpSession, ServletRequest and ServletContext, i.e attributes are defined only for context, request and session scopes. Why not for, say, ServletResponse or... | TITLE:
In Java servlets, why are attributes defined only for context, request and session scopes?
QUESTION:
In servlets, getAttribute() and setAttribute() are only associated with HttpSession, ServletRequest and ServletContext, i.e attributes are defined only for context, request and session scopes. Why not for, say, ... | [
"java",
"servlets",
"attributes"
] | 3 | 2 | 1,771 | 3 | 0 | 2011-06-07T07:47:28.017000 | 2011-06-07T08:04:29.080000 |
6,262,126 | 6,265,003 | Is it possible to have a column in a DataGridView that works as a ComboBox that allows user to enter a new value? | I know that in a normal ComboBox, if the FlatStyle is Standard, the user will be able to type a value that is not in the Items list. But if a combo box in a DataGridView is Standard, it won't let me type a new value. Is it possible to achieve this functionality in a column in a DataGridView? | Well, in a DataGridView, you can add a column of DataGridViewComboBoxColumn type. It's DisplayStyle and/or FlatStyle are dependent on the current row state. I think when you add a new row (edit mode), you are able to add values to it. References: Add items to DataGridViewComboBoxColumn in DataGridView during runtime ht... | Is it possible to have a column in a DataGridView that works as a ComboBox that allows user to enter a new value? I know that in a normal ComboBox, if the FlatStyle is Standard, the user will be able to type a value that is not in the Items list. But if a combo box in a DataGridView is Standard, it won't let me type a ... | TITLE:
Is it possible to have a column in a DataGridView that works as a ComboBox that allows user to enter a new value?
QUESTION:
I know that in a normal ComboBox, if the FlatStyle is Standard, the user will be able to type a value that is not in the Items list. But if a combo box in a DataGridView is Standard, it wo... | [
"c#",
"winforms",
"datagridview"
] | 4 | 1 | 462 | 2 | 0 | 2011-06-07T07:49:44.830000 | 2011-06-07T12:16:58.697000 |
6,262,132 | 6,262,231 | Why IE Developer Tools seems to be more descriptive than FireBug in this example? | When I call this line: Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") For FireBug it returns: >>> Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") where for IE, Developer Tools it returns: >> Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") { get: function innerHT... | Because the way Firebug runs your input generates an exception, which is then in turn hidden by Firebug. Try running: try { Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") } catch (ex) { console.log(ex); } And you'll see what I mean. As @lonesomeday suggested, try using the web console instead. | Why IE Developer Tools seems to be more descriptive than FireBug in this example? When I call this line: Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") For FireBug it returns: >>> Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") where for IE, Developer Tools it returns: >> Object.g... | TITLE:
Why IE Developer Tools seems to be more descriptive than FireBug in this example?
QUESTION:
When I call this line: Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") For FireBug it returns: >>> Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML") where for IE, Developer Tools it re... | [
"javascript",
"dom",
"firebug",
"developer-tools"
] | 0 | 3 | 267 | 1 | 0 | 2011-06-07T07:50:12.973000 | 2011-06-07T07:58:41.640000 |
6,262,138 | 6,262,216 | How do Torrent Servers Maintain Connections to reduce server load | I understand that a torrent minimizes the server load by using other participating members to fetch content. One thing I am confused about is, the different parties are connected through the server anyway, therefore complete stress of Data exchange would fall on the server anyway. At best, disk seek will be reduced. Wh... | Using the BitTorren protocol, the purpose of the server (aka tracker) is only to manage the clients in a way they can find each other. The actual data transmission happens between the clients only (that's peer-to-peer, p2p). Basically, a client asks the server about other clients which are currently getting the same to... | How do Torrent Servers Maintain Connections to reduce server load I understand that a torrent minimizes the server load by using other participating members to fetch content. One thing I am confused about is, the different parties are connected through the server anyway, therefore complete stress of Data exchange would... | TITLE:
How do Torrent Servers Maintain Connections to reduce server load
QUESTION:
I understand that a torrent minimizes the server load by using other participating members to fetch content. One thing I am confused about is, the different parties are connected through the server anyway, therefore complete stress of D... | [
"bittorrent",
"stress"
] | 0 | 2 | 272 | 2 | 0 | 2011-06-07T07:50:49.460000 | 2011-06-07T07:57:18.257000 |
6,262,140 | 6,291,347 | Completely stuck at transfering files from assets folder to sd card | I am using following reference to transfer files from assets folder to sd card How to copy files from 'assets' folder to sdcard? The problem with this approach is that it is transferring the file located at root i.e. assets folder only and onto sdcard folder only. I have tried other options also but i am completely stu... | The best way to accomplish this is to create zip file of the resources for. e.g. themes in this case(under assets) and then unzip it into sdcard. You can refer following url: unzipping files with android | Completely stuck at transfering files from assets folder to sd card I am using following reference to transfer files from assets folder to sd card How to copy files from 'assets' folder to sdcard? The problem with this approach is that it is transferring the file located at root i.e. assets folder only and onto sdcard ... | TITLE:
Completely stuck at transfering files from assets folder to sd card
QUESTION:
I am using following reference to transfer files from assets folder to sd card How to copy files from 'assets' folder to sdcard? The problem with this approach is that it is transferring the file located at root i.e. assets folder onl... | [
"android",
"android-sdcard"
] | 2 | 1 | 1,918 | 1 | 0 | 2011-06-07T07:51:06.980000 | 2011-06-09T10:26:02.887000 |
6,262,143 | 6,262,167 | Cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection' | I am getting this error: cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection' for this code: SqlConnection con1 = ConfigurationManager.ConnectionStrings["connect"].ConnectionString; How do I solve this problem? I am working with a Windows application. | This is what you need: using(SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["connect"].ConnectionString)) { // do something with con1 } Note: this is better than the other answers because it includes another hint: use the using keyword to guarantee disposal of your connection object and t... | Cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection' I am getting this error: cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection' for this code: SqlConnection con1 = ConfigurationManager.ConnectionStrings["connect"].ConnectionString; How do I solve this problem? ... | TITLE:
Cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection'
QUESTION:
I am getting this error: cannot implicitly convert type 'string' to 'System.Data.SqlClient.Sqlconnection' for this code: SqlConnection con1 = ConfigurationManager.ConnectionStrings["connect"].ConnectionString; How do I so... | [
"c#",
".net",
"sql-server",
"winforms"
] | 3 | 16 | 26,422 | 4 | 0 | 2011-06-07T07:51:16.310000 | 2011-06-07T07:52:40.827000 |
6,262,144 | 6,262,278 | Scope not refreshing on production. Using passenger and apache2 | I am coming up with a very weird problem with my app running on production. I have the following table called Qrtable and it contains 144 records, each one with code field and time field incrementing by 10minutes. I then have this scope scope:current, where("time >? and time <=?", Time.now-14.minutes, Time.now+5.minute... | It won't. It's evaluated when the class is evaluated. Use: scope:current, lambda {where("time >? and time <=?", Time.now-14.minutes, Time.now+5.minutes)} | Scope not refreshing on production. Using passenger and apache2 I am coming up with a very weird problem with my app running on production. I have the following table called Qrtable and it contains 144 records, each one with code field and time field incrementing by 10minutes. I then have this scope scope:current, wher... | TITLE:
Scope not refreshing on production. Using passenger and apache2
QUESTION:
I am coming up with a very weird problem with my app running on production. I have the following table called Qrtable and it contains 144 records, each one with code field and time field incrementing by 10minutes. I then have this scope s... | [
"ruby-on-rails-3",
"model",
"scope",
"passenger",
"production-environment"
] | 3 | 11 | 1,171 | 1 | 0 | 2011-06-07T07:51:16.920000 | 2011-06-07T08:03:27.910000 |
6,262,149 | 6,262,224 | list group and sum by column | I have the following (Decimal('1.000'), Decimal('419.760000'), Decimal('4.197600000'), Decimal('423.957600000')) (Decimal('1.000'), Decimal('62.370000'), Decimal('0.623700000'), Decimal('62.993700000')) (Decimal('2.000'), Decimal('7.920000'), Decimal('0.079200000'), Decimal('7.999200000')) And I'd like to group them by... | Assuming those three tuples are items in a tuple or list numbers: column_sums = [sum(items) for items in zip(*numbers)] Rereading your question, I think you may instead mean you want to group all numbers except the first of each row by what the number in the first row is, and then get the sum of each group. If so, do i... | list group and sum by column I have the following (Decimal('1.000'), Decimal('419.760000'), Decimal('4.197600000'), Decimal('423.957600000')) (Decimal('1.000'), Decimal('62.370000'), Decimal('0.623700000'), Decimal('62.993700000')) (Decimal('2.000'), Decimal('7.920000'), Decimal('0.079200000'), Decimal('7.999200000')) ... | TITLE:
list group and sum by column
QUESTION:
I have the following (Decimal('1.000'), Decimal('419.760000'), Decimal('4.197600000'), Decimal('423.957600000')) (Decimal('1.000'), Decimal('62.370000'), Decimal('0.623700000'), Decimal('62.993700000')) (Decimal('2.000'), Decimal('7.920000'), Decimal('0.079200000'), Decima... | [
"python",
"list"
] | 0 | 3 | 2,404 | 2 | 0 | 2011-06-07T07:51:33.810000 | 2011-06-07T07:57:59.213000 |
6,262,151 | 6,262,634 | In Perl how to find the date of the previous Monday for a given date? | I am looking for a Perl script which can give me the last Monday for any specified date. e.g. For date 2011-06-11, the script should return 2011-06-06 | I'm assuming that if the given date is a Monday, you want the same date (and not the previous Monday). Here's one way to do it with DateTime: use DateTime;
my $date = DateTime->new(year => 2011, month => 6, day => 11); my $desired_dow = 1; # Monday $date->subtract(days => ($date->day_of_week - $desired_dow) % 7); prin... | In Perl how to find the date of the previous Monday for a given date? I am looking for a Perl script which can give me the last Monday for any specified date. e.g. For date 2011-06-11, the script should return 2011-06-06 | TITLE:
In Perl how to find the date of the previous Monday for a given date?
QUESTION:
I am looking for a Perl script which can give me the last Monday for any specified date. e.g. For date 2011-06-11, the script should return 2011-06-06
ANSWER:
I'm assuming that if the given date is a Monday, you want the same date ... | [
"perl",
"date"
] | 10 | 26 | 9,375 | 9 | 0 | 2011-06-07T07:51:43.563000 | 2011-06-07T08:37:40.873000 |
6,262,155 | 6,265,454 | What is an efficient Entity Framework query to check if users are friends? | There is a table called UserFriends that holds records for users' friendships. For each friendship, there is just one record, User1ID User2ID IsConfirmed 1 2 true which is equal in terms of business logic to User1ID User2ID IsConfirmed 2 1 true but both can't happen for one pair. What is the most efficient (yet readabl... | I think if the User1ID and User2ID columns both are primary key columns this query cause an index seek and is so efficient. Tuning of a query when it is critical, without analysing the execution plan, is inefficient. For important queries, I suggest you use SQL Server (or any DBMS) to write and analyse your queries and... | What is an efficient Entity Framework query to check if users are friends? There is a table called UserFriends that holds records for users' friendships. For each friendship, there is just one record, User1ID User2ID IsConfirmed 1 2 true which is equal in terms of business logic to User1ID User2ID IsConfirmed 2 1 true ... | TITLE:
What is an efficient Entity Framework query to check if users are friends?
QUESTION:
There is a table called UserFriends that holds records for users' friendships. For each friendship, there is just one record, User1ID User2ID IsConfirmed 1 2 true which is equal in terms of business logic to User1ID User2ID IsC... | [
"c#",
"entity-framework",
"entity-framework-4",
"linq-to-entities"
] | 8 | 6 | 473 | 1 | 0 | 2011-06-07T07:51:48.890000 | 2011-06-07T12:53:28.553000 |
6,262,160 | 6,262,874 | How to get access to url (or grails params) outside of the controller? | Background: I created my own TagLib for application. One of the tags must depend on current request URL (on path & url parameters). I have two gsp files - layout and regular page. The issue: I tried to get current request url from tag handler using this: request.requestURI But instead of what I have in browser http://l... | You should be able to get a reference to the parameters simply by referencing params within the tag class. If you want to re-construct the full path of a request (as shown in the browser), you can do this using methods of the request object, which is an instance of HttpServletRequest, e.g. getContextPath() getRequestUR... | How to get access to url (or grails params) outside of the controller? Background: I created my own TagLib for application. One of the tags must depend on current request URL (on path & url parameters). I have two gsp files - layout and regular page. The issue: I tried to get current request url from tag handler using ... | TITLE:
How to get access to url (or grails params) outside of the controller?
QUESTION:
Background: I created my own TagLib for application. One of the tags must depend on current request URL (on path & url parameters). I have two gsp files - layout and regular page. The issue: I tried to get current request url from ... | [
"grails"
] | 3 | 4 | 6,387 | 3 | 0 | 2011-06-07T07:52:19.740000 | 2011-06-07T08:57:13.323000 |
6,262,161 | 6,262,252 | Can I explicitly specify the NavigateUrl on a hyperlink? | Asp.Net is awfully clever and tries to resolve the NavigateUrl of a Hyperlink relative to the control it is in or relative to the application root if you put ~/ at the start. But I have a situation where I want to explicitly set the url to a relative path and I don't want it to 'help' me at all. Hyperlink's navigate ur... | Can't you simply use a HTML anchor (without the runat="server" attribute)? E.g: link text Update: if you don't want to lose the functionality of the HyperLink control, you could create a control deriving from HyperLink and override the AddAttributesToRender() method (this is where the NavigateUrl is resolved). HyperLin... | Can I explicitly specify the NavigateUrl on a hyperlink? Asp.Net is awfully clever and tries to resolve the NavigateUrl of a Hyperlink relative to the control it is in or relative to the application root if you put ~/ at the start. But I have a situation where I want to explicitly set the url to a relative path and I d... | TITLE:
Can I explicitly specify the NavigateUrl on a hyperlink?
QUESTION:
Asp.Net is awfully clever and tries to resolve the NavigateUrl of a Hyperlink relative to the control it is in or relative to the application root if you put ~/ at the start. But I have a situation where I want to explicitly set the url to a rel... | [
"asp.net",
".net",
"hyperlink"
] | 10 | 4 | 5,804 | 2 | 0 | 2011-06-07T07:52:21.963000 | 2011-06-07T08:01:19.653000 |
6,262,171 | 6,262,200 | How to open application in Xcode 3.2.5, when xcode 4.0.2 is installed? | I have installed both xcode 3.2.5 and xcode 4.2. I want to open my application in xcode 3.2.5. How do i do that? | Open xcode 3.2.5 (from wherever you have it installed) and just... File > Open?... | How to open application in Xcode 3.2.5, when xcode 4.0.2 is installed? I have installed both xcode 3.2.5 and xcode 4.2. I want to open my application in xcode 3.2.5. How do i do that? | TITLE:
How to open application in Xcode 3.2.5, when xcode 4.0.2 is installed?
QUESTION:
I have installed both xcode 3.2.5 and xcode 4.2. I want to open my application in xcode 3.2.5. How do i do that?
ANSWER:
Open xcode 3.2.5 (from wherever you have it installed) and just... File > Open?... | [
"iphone"
] | 0 | 3 | 735 | 4 | 0 | 2011-06-07T07:53:01.113000 | 2011-06-07T07:55:32.203000 |
6,262,178 | 6,262,418 | How to find out which Ruby version an existing Rails project is based on? | I have an existing Ruby on Rails project. How do I find out which version of Ruby is originally used for the application? Edit: To sum up this thread: If there are no ruby-version specific gems, every Ruby should work. All your posts were helpful - Thanks. | If no version-specific gems are in use, I'm not sure it's possible to determine the exact ruby version used during development. In any case, the app may work fine against several versions, depending on the features it has. If the app has comprehensive tests, you could just work back to find the latest version for which... | How to find out which Ruby version an existing Rails project is based on? I have an existing Ruby on Rails project. How do I find out which version of Ruby is originally used for the application? Edit: To sum up this thread: If there are no ruby-version specific gems, every Ruby should work. All your posts were helpful... | TITLE:
How to find out which Ruby version an existing Rails project is based on?
QUESTION:
I have an existing Ruby on Rails project. How do I find out which version of Ruby is originally used for the application? Edit: To sum up this thread: If there are no ruby-version specific gems, every Ruby should work. All your ... | [
"ruby-on-rails",
"ruby"
] | 20 | 9 | 21,611 | 5 | 0 | 2011-06-07T07:53:22.360000 | 2011-06-07T08:18:37.323000 |
6,262,184 | 6,263,771 | Win32 threads producer updating a consumer thread | I am trying to use a class based implementation of Win32 threads to create a Producer thread and a Consumer thread. Information of type int x in the consumer is updated by the producer. Producer and Consumer both inherit from IRunnable struct IRunnable { virtual unsigned long run() = 0; virtual void stop() = 0; }; Whic... | In first try block you are assigning Consumer instance to newly created local variable Consumer *obj1 instead of using existing variable that was created just before try block. Try something like this instead: Consumer *obj1=0; Thread *consumerThread=0;
try { // create the threadable object first obj1 = new Consumer()... | Win32 threads producer updating a consumer thread I am trying to use a class based implementation of Win32 threads to create a Producer thread and a Consumer thread. Information of type int x in the consumer is updated by the producer. Producer and Consumer both inherit from IRunnable struct IRunnable { virtual unsigne... | TITLE:
Win32 threads producer updating a consumer thread
QUESTION:
I am trying to use a class based implementation of Win32 threads to create a Producer thread and a Consumer thread. Information of type int x in the consumer is updated by the producer. Producer and Consumer both inherit from IRunnable struct IRunnable... | [
"c++",
"multithreading",
"winapi"
] | 2 | 1 | 499 | 1 | 0 | 2011-06-07T07:53:56.203000 | 2011-06-07T10:15:46.657000 |
6,262,186 | 6,262,225 | Convert the first element of an array to a string in PHP | I have a PHP array and want to convert it to a string. I know I can use join or implode, but in my case array has only one item. Why do I have to use combine values in an array with only one item? This array is the output of my PHP function which returns an array: Array(18 => 'Something'); How do I convert this to a st... | Is there any other way to convert that array into string? You don't want to convert the array to a string, you want to get the value of the array's sole element, if I read it correctly. 'Something' ); $value = array_shift( $foo ); echo $value; // 'Something'.?> Using array_shift you don't have to worry about the index.... | Convert the first element of an array to a string in PHP I have a PHP array and want to convert it to a string. I know I can use join or implode, but in my case array has only one item. Why do I have to use combine values in an array with only one item? This array is the output of my PHP function which returns an array... | TITLE:
Convert the first element of an array to a string in PHP
QUESTION:
I have a PHP array and want to convert it to a string. I know I can use join or implode, but in my case array has only one item. Why do I have to use combine values in an array with only one item? This array is the output of my PHP function whic... | [
"php",
"arrays",
"string",
"object"
] | 37 | 40 | 168,783 | 13 | 0 | 2011-06-07T07:54:17.573000 | 2011-06-07T07:58:01.447000 |
6,262,189 | 6,262,260 | Cannot read simple binary integers from file? (C++) | My code is simply as this: UPDATED: #include #include using namespace std;
int main(int argc, char **argv) { ifstream r("foo.bin", ios::binary); ofstream w("foo.bin", ios::binary); int i;
int ints[10] = {0,1,2,3,4,5,6,8,9}; w.write((char*)&ints, sizeof(ints));
int in_ints[10]; r.read((char*)∈_ints, sizeof(in_ints));... | try w.flush() or w.close() before r.read. the problem is when you write it usually bufferes text and doesn't save it in file. so there is nothing realy in file for r.read. | Cannot read simple binary integers from file? (C++) My code is simply as this: UPDATED: #include #include using namespace std;
int main(int argc, char **argv) { ifstream r("foo.bin", ios::binary); ofstream w("foo.bin", ios::binary); int i;
int ints[10] = {0,1,2,3,4,5,6,8,9}; w.write((char*)&ints, sizeof(ints));
int ... | TITLE:
Cannot read simple binary integers from file? (C++)
QUESTION:
My code is simply as this: UPDATED: #include #include using namespace std;
int main(int argc, char **argv) { ifstream r("foo.bin", ios::binary); ofstream w("foo.bin", ios::binary); int i;
int ints[10] = {0,1,2,3,4,5,6,8,9}; w.write((char*)&ints, si... | [
"c++",
"binary",
"ifstream",
"integer"
] | 8 | 7 | 7,373 | 3 | 0 | 2011-06-07T07:54:30.117000 | 2011-06-07T08:01:45.660000 |
6,262,192 | 6,262,356 | How to handle a bunch of deleted files under Git? | I have deleted about 20 files from my project. How to commit them with one command instead of git rm them one by one? | If you don't want to commit all other changes in your working directory at the same time (as git add -A would do), you can use git rm $(git ls-files --deleted) | How to handle a bunch of deleted files under Git? I have deleted about 20 files from my project. How to commit them with one command instead of git rm them one by one? | TITLE:
How to handle a bunch of deleted files under Git?
QUESTION:
I have deleted about 20 files from my project. How to commit them with one command instead of git rm them one by one?
ANSWER:
If you don't want to commit all other changes in your working directory at the same time (as git add -A would do), you can us... | [
"git"
] | 13 | 19 | 3,833 | 2 | 0 | 2011-06-07T07:54:50.940000 | 2011-06-07T08:10:54.333000 |
6,262,213 | 6,262,288 | Which Events are fired When Request Are made in WCF | I wanted to know, when WebGet/WebInvoke requests are made in WCF service which built-in events are fired & can I override them? same for sending a response? In all the events I want to access the Data which is being sent or received. Thanks. | best way to do this is: http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.idispatchmessageinspector.aspx WCF will invoke your implementation of the dispatch message inspector, after receive request, and before send reply. There you have access to the raw Message instance, you can even modify it if ... | Which Events are fired When Request Are made in WCF I wanted to know, when WebGet/WebInvoke requests are made in WCF service which built-in events are fired & can I override them? same for sending a response? In all the events I want to access the Data which is being sent or received. Thanks. | TITLE:
Which Events are fired When Request Are made in WCF
QUESTION:
I wanted to know, when WebGet/WebInvoke requests are made in WCF service which built-in events are fired & can I override them? same for sending a response? In all the events I want to access the Data which is being sent or received. Thanks.
ANSWER:... | [
"c#",
"wcf",
"events"
] | 1 | 3 | 2,369 | 1 | 0 | 2011-06-07T07:57:13.310000 | 2011-06-07T08:04:25.830000 |
6,262,220 | 6,262,667 | Getting the control variable from switch statement | the basic syntax of switch statement in ruby is case expression when condition1 statements1 when condition2 statements2 else statements end Is there a way to get control expression value in statements? Means, is there some variable which stores expression value which can be used directly - and expression need not be ca... | There is no magic variable. It's no trouble to use an ordinary variable: case a = expensive_method when condition1 puts "#{a} meets condition 1" when condition2 puts "#{a} meets condition 2" end | Getting the control variable from switch statement the basic syntax of switch statement in ruby is case expression when condition1 statements1 when condition2 statements2 else statements end Is there a way to get control expression value in statements? Means, is there some variable which stores expression value which c... | TITLE:
Getting the control variable from switch statement
QUESTION:
the basic syntax of switch statement in ruby is case expression when condition1 statements1 when condition2 statements2 else statements end Is there a way to get control expression value in statements? Means, is there some variable which stores expres... | [
"ruby",
"switch-statement"
] | 2 | 3 | 393 | 3 | 0 | 2011-06-07T07:57:38.533000 | 2011-06-07T08:40:26.797000 |
6,262,221 | 6,262,464 | GridView's RowCommand - detecting a page refresh and not reexecuting | I have a GridView which has a RowCommand event that opens a modalpopupextender on click. A slight problem is that if a user opens and closes a modalpopup, then refreshes the page, the popup pops up again - presumably because the refresh is causing a refire of the RowCommand event. How can I detect this and avoid openin... | If the reload again triggers the rowcommand event, it appears, you are using get parameters? In general, you will have to track the responses from/to the client and decide for every response individually, how to handle it. One way to archieve this: Provide a "page-delivery-counter" within every delivered page. It is ma... | GridView's RowCommand - detecting a page refresh and not reexecuting I have a GridView which has a RowCommand event that opens a modalpopupextender on click. A slight problem is that if a user opens and closes a modalpopup, then refreshes the page, the popup pops up again - presumably because the refresh is causing a r... | TITLE:
GridView's RowCommand - detecting a page refresh and not reexecuting
QUESTION:
I have a GridView which has a RowCommand event that opens a modalpopupextender on click. A slight problem is that if a user opens and closes a modalpopup, then refreshes the page, the popup pops up again - presumably because the refr... | [
"c#",
"asp.net",
"gridview"
] | 0 | 0 | 2,389 | 2 | 0 | 2011-06-07T07:57:48.800000 | 2011-06-07T08:23:21.533000 |
6,262,222 | 6,262,259 | how to get inserted sequential uniqueidentifier | my table looks like this: create table foos( id uniqueidentifier primary KEY DEFAULT (newsequentialid()),.. ) so the id is sequentially generated automatically, I'm not setting it how do I get it's value after the insert? (with identity I was doing insert... select @@identity ) | Returning the NewSequentialID() after Insert using the Output Clause The basic idea: create table foos(id uniqueidentifier primary KEY DEFAULT (newsequentialid()))
declare @Ids table(id uniqueidentifier)
insert foos output inserted.id into @Ids default values
select * from @Ids | how to get inserted sequential uniqueidentifier my table looks like this: create table foos( id uniqueidentifier primary KEY DEFAULT (newsequentialid()),.. ) so the id is sequentially generated automatically, I'm not setting it how do I get it's value after the insert? (with identity I was doing insert... select @@iden... | TITLE:
how to get inserted sequential uniqueidentifier
QUESTION:
my table looks like this: create table foos( id uniqueidentifier primary KEY DEFAULT (newsequentialid()),.. ) so the id is sequentially generated automatically, I'm not setting it how do I get it's value after the insert? (with identity I was doing inser... | [
"sql",
"sql-server",
"sql-server-2005",
"t-sql"
] | 1 | 5 | 3,126 | 3 | 0 | 2011-06-07T07:57:48.767000 | 2011-06-07T08:01:40.420000 |
6,262,236 | 6,262,317 | R: how to read in a series of txt files to R as csv but firstly delete the first three lines of the txt files | I have a series of txt files. I have all these filenames in a csv file X in the Column V1 (X$V1), e.g. a.txt, b.txt.... The text files are in the format as follows: title:xxx date:xxx person-in-charge:xxx
sx2sa 333 444 666 ggge4 xatak eees 566 6763 gaeta What I want is to get a data.frame as follows with R. filename c... | You could use the skip parameter, like so: > read.csv('a.txt', header=FALSE, skip=4, sep=' ') V1 V2 V3 V4 V5 1 sx2sa 333 444 666 ggge4 2 xatak eees 566 6763 gaeta To combine data from multiple files, you could use rbind to stack the data frame on top of each other. | R: how to read in a series of txt files to R as csv but firstly delete the first three lines of the txt files I have a series of txt files. I have all these filenames in a csv file X in the Column V1 (X$V1), e.g. a.txt, b.txt.... The text files are in the format as follows: title:xxx date:xxx person-in-charge:xxx
sx2s... | TITLE:
R: how to read in a series of txt files to R as csv but firstly delete the first three lines of the txt files
QUESTION:
I have a series of txt files. I have all these filenames in a csv file X in the Column V1 (X$V1), e.g. a.txt, b.txt.... The text files are in the format as follows: title:xxx date:xxx person-i... | [
"r",
"import",
"dataframe"
] | 0 | 4 | 560 | 1 | 0 | 2011-06-07T07:59:34.477000 | 2011-06-07T08:07:16.800000 |
6,262,237 | 6,262,329 | How to break a video into frames using OpenCV over C++ | I am really new to openCV and I would like to break a video file that I have (*.avi) into separate frames. Does anyone know how to do it? Thanks!! | Take a look at cvCaptureFromFile, cvQueryFrame and cvSaveImage! They'll do everything you need. | How to break a video into frames using OpenCV over C++ I am really new to openCV and I would like to break a video file that I have (*.avi) into separate frames. Does anyone know how to do it? Thanks!! | TITLE:
How to break a video into frames using OpenCV over C++
QUESTION:
I am really new to openCV and I would like to break a video file that I have (*.avi) into separate frames. Does anyone know how to do it? Thanks!!
ANSWER:
Take a look at cvCaptureFromFile, cvQueryFrame and cvSaveImage! They'll do everything you n... | [
"c++",
"video",
"opencv"
] | 2 | 3 | 3,777 | 2 | 0 | 2011-06-07T07:59:34.827000 | 2011-06-07T08:08:02.817000 |
6,262,242 | 6,262,506 | Problem with Google Apps email/smtp to send mails from website | I have an Asp.Net site which uses google SMTP to send emails.. its working fine with normal gmail accounts using the below configuration Now I need to use Google Apps email and smtp and I tried to change the configuration as shown below But its throwing the Authentication failed error!!! "The SMTP server requires a sec... | From MSDN: Some SMTP servers require that the client be authenticated before the server sends e-mail on its behalf. Set this property to true when this SmtpClient object should authenticate using the default credentials of the currently logged on user. If the UseDefaultCredentials property is set to false, then the val... | Problem with Google Apps email/smtp to send mails from website I have an Asp.Net site which uses google SMTP to send emails.. its working fine with normal gmail accounts using the below configuration Now I need to use Google Apps email and smtp and I tried to change the configuration as shown below But its throwing the... | TITLE:
Problem with Google Apps email/smtp to send mails from website
QUESTION:
I have an Asp.Net site which uses google SMTP to send emails.. its working fine with normal gmail accounts using the below configuration Now I need to use Google Apps email and smtp and I tried to change the configuration as shown below Bu... | [
"asp.net",
"email",
"web-config",
"smtp",
"gmail"
] | 3 | 3 | 2,006 | 2 | 0 | 2011-06-07T08:00:07.397000 | 2011-06-07T08:26:53.037000 |
6,262,244 | 6,262,334 | Dynamic column in where clause | I'm trying to execute a query like this: SELECT Id,Name,Distance=dbo.CalculateDistance(Lat,Lon,@lat,@lon) FROM Requests WHERE Distance < 2 ORDER BY Distance DESC Error says,there is no Distance column. I tried this once but it cuts off query performance SELECT Id,Name,Distance=dbo.CalculateDistance(Lat,Lon,@lat,@lon) F... | I found the link below suggesting that you make a nested select and filter on its values; in this case the scalar computation will only be performed once. So you should be able to do something like SELECT Id, Name, Distance FROM ( SELECT Id,Name,Distance=dbo.CalculateDistance(Lat,Lon,@lat,@lon) FROM Requests) derived W... | Dynamic column in where clause I'm trying to execute a query like this: SELECT Id,Name,Distance=dbo.CalculateDistance(Lat,Lon,@lat,@lon) FROM Requests WHERE Distance < 2 ORDER BY Distance DESC Error says,there is no Distance column. I tried this once but it cuts off query performance SELECT Id,Name,Distance=dbo.Calcula... | TITLE:
Dynamic column in where clause
QUESTION:
I'm trying to execute a query like this: SELECT Id,Name,Distance=dbo.CalculateDistance(Lat,Lon,@lat,@lon) FROM Requests WHERE Distance < 2 ORDER BY Distance DESC Error says,there is no Distance column. I tried this once but it cuts off query performance SELECT Id,Name,Di... | [
"t-sql",
"sql-server-2008"
] | 2 | 3 | 504 | 1 | 0 | 2011-06-07T08:00:08.737000 | 2011-06-07T08:08:19.250000 |
6,262,249 | 6,262,274 | PHP - Will an XML-parsing singleton class only parse the XML once? | I have a class which reads some settings from an XML file with simplexml. If I build it in the singleton style and save those settings in a publicly accessible array, does that mean it would effectively retrieve the file only once? Basically, in a simplified form, this: class myClass { public $_requestConfiguration; pu... | You will indeed have only one instance and the XML file will only be read once for the execution of the script. When the script is done executing everything will be removed from memory and on the next run your 'singleton' will start reading the XML again because the static instance is no longer stored in memory. I've s... | PHP - Will an XML-parsing singleton class only parse the XML once? I have a class which reads some settings from an XML file with simplexml. If I build it in the singleton style and save those settings in a publicly accessible array, does that mean it would effectively retrieve the file only once? Basically, in a simpl... | TITLE:
PHP - Will an XML-parsing singleton class only parse the XML once?
QUESTION:
I have a class which reads some settings from an XML file with simplexml. If I build it in the singleton style and save those settings in a publicly accessible array, does that mean it would effectively retrieve the file only once? Bas... | [
"php",
"xml",
"singleton",
"simplexml",
"xml-parsing"
] | 1 | 3 | 362 | 2 | 0 | 2011-06-07T08:00:52.807000 | 2011-06-07T08:03:04.600000 |
6,262,255 | 6,262,920 | Grails best practice for validating string as integer range | I'm trying to validate a SELECT. Normally I'd use an inList, as SELECT implies a fixed number of strings, but i was wondering if there was something more elegant. In this case, I have a form with a SELECT input that has the values 0-24 as, corresponding to the next 24 months. In my cmdObject I have class FormCommand {
... | class FormCommand {
Integer startSlot
static constraints = { startSlot(nullable: false, size: 0..24) } } | Grails best practice for validating string as integer range I'm trying to validate a SELECT. Normally I'd use an inList, as SELECT implies a fixed number of strings, but i was wondering if there was something more elegant. In this case, I have a form with a SELECT input that has the values 0-24 as, corresponding to the... | TITLE:
Grails best practice for validating string as integer range
QUESTION:
I'm trying to validate a SELECT. Normally I'd use an inList, as SELECT implies a fixed number of strings, but i was wondering if there was something more elegant. In this case, I have a form with a SELECT input that has the values 0-24 as, co... | [
"grails",
"validation",
"range"
] | 0 | 1 | 1,637 | 4 | 0 | 2011-06-07T08:01:27.340000 | 2011-06-07T09:01:11.267000 |
6,262,264 | 6,262,453 | Android Surfaceview and different resolutions problem | I have encountered a weird problem and I can't manage a way to solve it. Scenario I have a Surfaceview on which I draw some images on different positions. First I created folders for l/m/hdip drawables and things worked fine. Then I decided to make only one folder drawable and let Android take care of the sizing. So I ... | SurfaceView has problems with resizing images, so the best way for you to solve this problem is to create drawable folders for each resolution you want to target. | Android Surfaceview and different resolutions problem I have encountered a weird problem and I can't manage a way to solve it. Scenario I have a Surfaceview on which I draw some images on different positions. First I created folders for l/m/hdip drawables and things worked fine. Then I decided to make only one folder d... | TITLE:
Android Surfaceview and different resolutions problem
QUESTION:
I have encountered a weird problem and I can't manage a way to solve it. Scenario I have a Surfaceview on which I draw some images on different positions. First I created folders for l/m/hdip drawables and things worked fine. Then I decided to make... | [
"android",
"surfaceview",
"screen-resolution",
"ondraw"
] | 0 | 1 | 721 | 1 | 0 | 2011-06-07T08:02:20.617000 | 2011-06-07T08:21:54.110000 |
6,262,268 | 6,263,502 | c# navigate or skip forms | i learned earlier how to move between two forms back and forth. but what if there's more forms? this is my code for form1: Form2 form2 = new Form2(); private void aboutoldtrafford_MouseClick(object sender, MouseEventArgs e) { this.Hide(); form2.ShowDialog(); this.Show(); } i can go to form2 and there's two button there... | First option - you can use UserControls instead of Forms and just call BringToFront() on control that you want to make active. Another option - move application state management to some object. Create states map public class StateManager { private Dictionary _stateMap = new Dictionary (); private ApplicationState _curr... | c# navigate or skip forms i learned earlier how to move between two forms back and forth. but what if there's more forms? this is my code for form1: Form2 form2 = new Form2(); private void aboutoldtrafford_MouseClick(object sender, MouseEventArgs e) { this.Hide(); form2.ShowDialog(); this.Show(); } i can go to form2 an... | TITLE:
c# navigate or skip forms
QUESTION:
i learned earlier how to move between two forms back and forth. but what if there's more forms? this is my code for form1: Form2 form2 = new Form2(); private void aboutoldtrafford_MouseClick(object sender, MouseEventArgs e) { this.Hide(); form2.ShowDialog(); this.Show(); } i ... | [
"c#",
"forms",
"navigation"
] | 0 | 1 | 700 | 1 | 0 | 2011-06-07T08:02:42.417000 | 2011-06-07T09:51:28.843000 |
6,262,269 | 6,262,303 | how do i convert a array of values returned from a query to comma separated values | I have a result set that is being returned using this code: while ($row = mysql_fetch_array( $result )) {
echo "ID ".$row['v2id'];
} this returns ID 2ID 3ID 4ID 8 how would i convert this to comma separated values and then store them in a variable? so if i echoed out the variable, the final output would should look l... | store all the values in an array, then join them using ", " as the glue $values = array();
while ($row = mysql_fetch_array( $result )) { $values[] = $row['v2id']; }
echo join(", ", $values); | how do i convert a array of values returned from a query to comma separated values I have a result set that is being returned using this code: while ($row = mysql_fetch_array( $result )) {
echo "ID ".$row['v2id'];
} this returns ID 2ID 3ID 4ID 8 how would i convert this to comma separated values and then store them i... | TITLE:
how do i convert a array of values returned from a query to comma separated values
QUESTION:
I have a result set that is being returned using this code: while ($row = mysql_fetch_array( $result )) {
echo "ID ".$row['v2id'];
} this returns ID 2ID 3ID 4ID 8 how would i convert this to comma separated values and... | [
"php",
"mysql",
"arrays"
] | 7 | 6 | 572 | 5 | 0 | 2011-06-07T08:02:45.420000 | 2011-06-07T08:05:41.467000 |
6,262,277 | 6,262,367 | Building my own image viewer in a UIWebView - replaceing flash image player in web pages | I'm building a new app and got a bit confused of "Howto" do it: The concept is to build an image viewer (with capturing and responding to zoomin and scalling actions) which can be placed in a UIWebView (like a flash component which can view images in web pages). My idea is to implement the image viewer based on UIScrol... | I think that overlapping an UIScrollView on a UIWebView can be troublesome. Indeed, UIScrollView is pretty "greedy" when it comes to intercepting touch, and you would have possibly two of those (the other one being the UIWebView), competing. I.e., you could get mixed and varying results and to make things work seamless... | Building my own image viewer in a UIWebView - replaceing flash image player in web pages I'm building a new app and got a bit confused of "Howto" do it: The concept is to build an image viewer (with capturing and responding to zoomin and scalling actions) which can be placed in a UIWebView (like a flash component which... | TITLE:
Building my own image viewer in a UIWebView - replaceing flash image player in web pages
QUESTION:
I'm building a new app and got a bit confused of "Howto" do it: The concept is to build an image viewer (with capturing and responding to zoomin and scalling actions) which can be placed in a UIWebView (like a fla... | [
"objective-c",
"iphone"
] | 2 | 2 | 377 | 1 | 0 | 2011-06-07T08:03:26.643000 | 2011-06-07T08:11:50.637000 |
6,262,282 | 6,262,919 | Eclipse becomes slow when project contains many links (cause: bad network share in build path) | We have in one of our applications a single eclipse project that contains all the code. I think it is a fair amount of code - not a small project, but not a huge one either. I ran a small check on it and got: Found <4245> code files Totaling <421557> lines of code This check includes any code lines that are not empty o... | This is typical of a situation with one or more resource bottlenecks. You will need to investigate with operating system tools what Eclipse is waiting for (Task Manager, and perfmon are great for Windows), and if that doesn't help investigate Eclipse itself with jvisualvm in the Oracle 6 JDK. You will most likely find ... | Eclipse becomes slow when project contains many links (cause: bad network share in build path) We have in one of our applications a single eclipse project that contains all the code. I think it is a fair amount of code - not a small project, but not a huge one either. I ran a small check on it and got: Found <4245> cod... | TITLE:
Eclipse becomes slow when project contains many links (cause: bad network share in build path)
QUESTION:
We have in one of our applications a single eclipse project that contains all the code. I think it is a fair amount of code - not a small project, but not a huge one either. I ran a small check on it and got... | [
"eclipse",
"performance"
] | 2 | 0 | 3,128 | 1 | 0 | 2011-06-07T08:03:39.560000 | 2011-06-07T09:00:52 |
6,262,295 | 6,262,448 | designing a class | I am designing a class which comprises of objects of other classes, right now i am accepting the values to instantiate this class via function parameters. This class is created per session(From the user login to logout). For a session the UserInteraction object will be global i.e:- It can be used from any file at any t... | Before you design some class at least be clear with its responsibilities and collaborations (other objects that it depends on, to perform its responsibilities). Try to think who will instantiate/use this object, its life time and how/when it will be destroyed. Be clear with these fundamental design principles http://en... | designing a class I am designing a class which comprises of objects of other classes, right now i am accepting the values to instantiate this class via function parameters. This class is created per session(From the user login to logout). For a session the UserInteraction object will be global i.e:- It can be used from... | TITLE:
designing a class
QUESTION:
I am designing a class which comprises of objects of other classes, right now i am accepting the values to instantiate this class via function parameters. This class is created per session(From the user login to logout). For a session the UserInteraction object will be global i.e:- I... | [
"c#",
".net",
"design-patterns",
"frameworks"
] | 0 | 3 | 116 | 4 | 0 | 2011-06-07T08:04:50.907000 | 2011-06-07T08:21:27.627000 |
6,262,296 | 6,264,187 | Startup shortcut for other user | I'm doing a forced remote installation with PsExecute on some client machines. The problem I have is that I execute the installers as a local admin but I would like to add a startup shoortcut for a specific user. In nsis I can only choose between the users (the local admin) or All environment. How can I add a shortcut ... | If you know the users password you can call LogonUser + SHGetFolderPath, but I assume that you don't know the password. Using some undocumented registry locations is the only alternative if you don't know the password and the user is not logged on: You need parts of the EnumUsersReg and GetUserShellFolderFromRegistry h... | Startup shortcut for other user I'm doing a forced remote installation with PsExecute on some client machines. The problem I have is that I execute the installers as a local admin but I would like to add a startup shoortcut for a specific user. In nsis I can only choose between the users (the local admin) or All enviro... | TITLE:
Startup shortcut for other user
QUESTION:
I'm doing a forced remote installation with PsExecute on some client machines. The problem I have is that I execute the installers as a local admin but I would like to add a startup shoortcut for a specific user. In nsis I can only choose between the users (the local ad... | [
"nsis"
] | 0 | 0 | 742 | 1 | 0 | 2011-06-07T08:04:53.753000 | 2011-06-07T10:57:51.617000 |
6,262,310 | 6,262,370 | display Java.util.Date in a specific format | I have the following scenario: SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); System.out.println(dateFormat.parse("31/05/2011")); gives an output Tue May 31 00:00:00 SGT 2011 but I want the output to be 31/05/2011 I need to use parse here because the dates need to be sorted as Dates and not as String... | How about: SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); System.out.println(dateFormat.format(dateFormat.parse("31/05/2011")));
> 31/05/2011 | display Java.util.Date in a specific format I have the following scenario: SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); System.out.println(dateFormat.parse("31/05/2011")); gives an output Tue May 31 00:00:00 SGT 2011 but I want the output to be 31/05/2011 I need to use parse here because the dates ... | TITLE:
display Java.util.Date in a specific format
QUESTION:
I have the following scenario: SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); System.out.println(dateFormat.parse("31/05/2011")); gives an output Tue May 31 00:00:00 SGT 2011 but I want the output to be 31/05/2011 I need to use parse here ... | [
"java",
"date"
] | 57 | 73 | 196,410 | 12 | 0 | 2011-06-07T08:06:16.783000 | 2011-06-07T08:12:08.810000 |
6,262,315 | 6,262,684 | implements interface using member as implementor | I've got class A that implements IA. Now I need to create class B that should implement also IA. Class B has instance of class A as a member. Is there any way to define that A's instance implements the IA in class B? interfase IA { void method1(); void method2();.... void methodN(); }
class A:IA { public void method1(... | If B is really supposed to implement IA, then B must redefine each of the interface methods one by one, even if each implementation is simply a call to the implementation of the encapsulated A member. Nevertheless, there is a lazy way which can prevent you from all this tedious stuff and which can be considered almost ... | implements interface using member as implementor I've got class A that implements IA. Now I need to create class B that should implement also IA. Class B has instance of class A as a member. Is there any way to define that A's instance implements the IA in class B? interfase IA { void method1(); void method2();.... voi... | TITLE:
implements interface using member as implementor
QUESTION:
I've got class A that implements IA. Now I need to create class B that should implement also IA. Class B has instance of class A as a member. Is there any way to define that A's instance implements the IA in class B? interfase IA { void method1(); void ... | [
"c#",
".net"
] | 4 | 1 | 240 | 7 | 0 | 2011-06-07T08:06:53.023000 | 2011-06-07T08:41:22.913000 |
6,262,319 | 6,263,498 | Ruby Graphviz - Labelled Transition System's Initial State? | I'm making a tool that can do some operations on a transition system and also need to visualise them. Though there isn't much documentation on the ruby-gem (this was the best I could get: http://www.omninerd.com/articles/Automating_Data_Visualization_with_Ruby_and_Graphviz ), I managed to make a graph from my transitio... | credits to Jonas Elfström, this is my solution # note: model is something of my own datatype, # having states, labels, transitions, start_state and a name # I hope the code is self-explaining @graph = GraphViz::new(model.name, "type" => "graph" )
#settings @graph.edge[:dir] = "forward" @graph.edge[:arrowsize]= "0.5"
... | Ruby Graphviz - Labelled Transition System's Initial State? I'm making a tool that can do some operations on a transition system and also need to visualise them. Though there isn't much documentation on the ruby-gem (this was the best I could get: http://www.omninerd.com/articles/Automating_Data_Visualization_with_Ruby... | TITLE:
Ruby Graphviz - Labelled Transition System's Initial State?
QUESTION:
I'm making a tool that can do some operations on a transition system and also need to visualise them. Though there isn't much documentation on the ruby-gem (this was the best I could get: http://www.omninerd.com/articles/Automating_Data_Visua... | [
"ruby",
"rubygems",
"graphviz",
"transition-systems"
] | 0 | 0 | 939 | 2 | 0 | 2011-06-07T08:07:20.327000 | 2011-06-07T09:51:18.510000 |
6,262,327 | 6,262,368 | Flex dispached event inside TitleWindow is not system wide? | I have a tree, which childs dispaching event, if i run the object outside TitleWindow - everything is working fine, but if i encapsulate it inside a TitleWindow as into the source below - the event is not anymore dispached system wide. import mx.controls.Alert; import mx.managers.PopUpManager;
private function init():... | Change your this.addEventListener( MyEvent.REQUEST_FORWARD, function( e: MyEvent ):void{ Alert.show( ":P" ) } ); to xWin.addEventListener( MyEvent.REQUEST_FORWARD, function( e: MyEvent ):void{ Alert.show( ":P" ) } ); Or maybe you're using event bubbling? I don't know details about your code and see it very problematic ... | Flex dispached event inside TitleWindow is not system wide? I have a tree, which childs dispaching event, if i run the object outside TitleWindow - everything is working fine, but if i encapsulate it inside a TitleWindow as into the source below - the event is not anymore dispached system wide. import mx.controls.Alert... | TITLE:
Flex dispached event inside TitleWindow is not system wide?
QUESTION:
I have a tree, which childs dispaching event, if i run the object outside TitleWindow - everything is working fine, but if i encapsulate it inside a TitleWindow as into the source below - the event is not anymore dispached system wide. import... | [
"apache-flex",
"events"
] | 1 | 3 | 598 | 1 | 0 | 2011-06-07T08:07:57.393000 | 2011-06-07T08:11:52.210000 |
6,262,348 | 6,262,791 | listbox scroll jumps to start | I'm using a list box, and each item is a user control. I'm able to scroll in the emulator and see the all the items. but if I leave the mouse button the list jumps to the start. Is that how the emulator behavives? or I have a bug? I tried using the scroll viewer but it did not help. and the user control looks like this... | There are a number of issues with using a usercontrol inside a ListBox. These include performance and issues with item virtualization which cna mean that items aren't shown or are shown more than once. For this reason the use of usercontrols inside a listbox is not recommended. The issue you are seeing is probably rela... | listbox scroll jumps to start I'm using a list box, and each item is a user control. I'm able to scroll in the emulator and see the all the items. but if I leave the mouse button the list jumps to the start. Is that how the emulator behavives? or I have a bug? I tried using the scroll viewer but it did not help. and th... | TITLE:
listbox scroll jumps to start
QUESTION:
I'm using a list box, and each item is a user control. I'm able to scroll in the emulator and see the all the items. but if I leave the mouse button the list jumps to the start. Is that how the emulator behavives? or I have a bug? I tried using the scroll viewer but it di... | [
"silverlight",
"xaml",
"windows-phone-7"
] | 0 | 1 | 396 | 1 | 0 | 2011-06-07T08:09:52.253000 | 2011-06-07T08:50:04.683000 |
6,262,351 | 6,262,399 | Rails 3 : How to execute action when render :action? | Rails 3 recommend Rest. For example, I make Blog system. ### PostsController
# show detail # tag have lock or unlock status def show @post = Post.find(params[:id]) @tags = @post.tags.select("posts_tags.tag_lock") end
### CommentsController
# Posts#show has comment form. # when you post comment, rails execute this ac... | I think you're fine doing it the way you are (fixed some typos): ### PostsController
# show detail # tag have lock or unlock status def show @post = Post.find(params[:id]) @tags = @post.tags.select("posts_tags.tag_lock") end
### CommentsController
# Posts#show has comment form. # when you post comment, rails execute... | Rails 3 : How to execute action when render :action? Rails 3 recommend Rest. For example, I make Blog system. ### PostsController
# show detail # tag have lock or unlock status def show @post = Post.find(params[:id]) @tags = @post.tags.select("posts_tags.tag_lock") end
### CommentsController
# Posts#show has comment... | TITLE:
Rails 3 : How to execute action when render :action?
QUESTION:
Rails 3 recommend Rest. For example, I make Blog system. ### PostsController
# show detail # tag have lock or unlock status def show @post = Post.find(params[:id]) @tags = @post.tags.select("posts_tags.tag_lock") end
### CommentsController
# Post... | [
"ruby-on-rails",
"ruby-on-rails-3",
"rest",
"rendering",
"rescue"
] | 1 | 0 | 514 | 1 | 0 | 2011-06-07T08:10:39.523000 | 2011-06-07T08:16:27.380000 |
6,262,353 | 6,262,490 | SVN Call Hudsonserver/Job/TheJob/polling without open Browser | I have a Projekt that's hosted on Subversion. And i use the Jenkins (old Hudson) for Continoues Integration. Now i make a batch-file as Subversion-PostCommithook thats run this command. start http://hudsonserver/job/TheJob/polling I don't want to poll every 2 minutes. I want to Notify the Hudsonserver. But after a whil... | Use Wget for Windows: http://gnuwin32.sourceforge.net/packages/wget.htm Or any other console HTTP clients E.g. instead of start http://hudsonserver/job/TheJob/polling write: wget.exe -O - http://hudsonserver/job/TheJob/polling | SVN Call Hudsonserver/Job/TheJob/polling without open Browser I have a Projekt that's hosted on Subversion. And i use the Jenkins (old Hudson) for Continoues Integration. Now i make a batch-file as Subversion-PostCommithook thats run this command. start http://hudsonserver/job/TheJob/polling I don't want to poll every ... | TITLE:
SVN Call Hudsonserver/Job/TheJob/polling without open Browser
QUESTION:
I have a Projekt that's hosted on Subversion. And i use the Jenkins (old Hudson) for Continoues Integration. Now i make a batch-file as Subversion-PostCommithook thats run this command. start http://hudsonserver/job/TheJob/polling I don't w... | [
"svn",
"batch-file",
"hudson-plugin-batch-task"
] | 0 | 1 | 227 | 1 | 0 | 2011-06-07T08:10:51.477000 | 2011-06-07T08:25:31.083000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.