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,257,362 | 6,257,456 | C# - Opening text file with notepad minimized? | It doesn't look like the Minimized style has an effect: string logFilePath = @"c:\mylog.log"; ProcessStartInfo startInfo = new ProcessStartInfo(logFilePath) {WindowStyle = ProcessWindowStyle.Minimized}; Process.Start(startInfo); Thanks. | The Community Comments section of the MSDN page for the WindowStyle Property says: To use Hidden, you'll need UseShellExecute = true To use Hidden, you'll need UseShellExecute = true among other things. These requirements should be noted in the documentation, but aren't. Have you tried that? Maybe it applies to Minimiz... | C# - Opening text file with notepad minimized? It doesn't look like the Minimized style has an effect: string logFilePath = @"c:\mylog.log"; ProcessStartInfo startInfo = new ProcessStartInfo(logFilePath) {WindowStyle = ProcessWindowStyle.Minimized}; Process.Start(startInfo); Thanks. | TITLE:
C# - Opening text file with notepad minimized?
QUESTION:
It doesn't look like the Minimized style has an effect: string logFilePath = @"c:\mylog.log"; ProcessStartInfo startInfo = new ProcessStartInfo(logFilePath) {WindowStyle = ProcessWindowStyle.Minimized}; Process.Start(startInfo); Thanks.
ANSWER:
The Commu... | [
"c#",
"process",
"minimize",
"notepad"
] | 2 | 2 | 1,241 | 1 | 0 | 2011-06-06T20:01:11.153000 | 2011-06-06T20:09:44.773000 |
6,257,369 | 6,257,429 | Problem with <<<_END php tag in IE8 | I'm designing a fairly simple reporting system. Right now using php(and later some Jquery) to let user log in and calculate totals and post to a database. My problems began of course when I tested the page in IE8. It has major problems with the echo <<<_END statement at line 75. Anyone know an alternate to coding the n... | The Heredoc identifier must on a line of itself and must be the only thing on this line (including indentation and such). Remove the leading whitespace and make sure the newline is direct after _END;. However, in your case I suggest you to just leave the PHP-mode to output the plain html For example instead of echo <<<... | Problem with <<<_END php tag in IE8 I'm designing a fairly simple reporting system. Right now using php(and later some Jquery) to let user log in and calculate totals and post to a database. My problems began of course when I tested the page in IE8. It has major problems with the echo <<<_END statement at line 75. Anyo... | TITLE:
Problem with <<<_END php tag in IE8
QUESTION:
I'm designing a fairly simple reporting system. Right now using php(and later some Jquery) to let user log in and calculate totals and post to a database. My problems began of course when I tested the page in IE8. It has major problems with the echo <<<_END statemen... | [
"php",
"syntax"
] | 1 | 4 | 304 | 2 | 0 | 2011-06-06T20:01:56.467000 | 2011-06-06T20:07:49.183000 |
6,257,370 | 6,257,696 | thread terminate called without an active exception | I've been doing threaded networking for a game, but the server dies randomly, while i've been testing the networking so that I have several clients connecting and sending bunch of packets and disconnecting then connecting back again. I am using c++ with SFML/Network and SFML/System threads. I have thread which listens ... | You need locks around data to protect against concurrent access to the same data structure from multiple threads. | thread terminate called without an active exception I've been doing threaded networking for a game, but the server dies randomly, while i've been testing the networking so that I have several clients connecting and sending bunch of packets and disconnecting then connecting back again. I am using c++ with SFML/Network a... | TITLE:
thread terminate called without an active exception
QUESTION:
I've been doing threaded networking for a game, but the server dies randomly, while i've been testing the networking so that I have several clients connecting and sending bunch of packets and disconnecting then connecting back again. I am using c++ w... | [
"c++",
"multithreading",
"network-programming",
"pthreads",
"sfml"
] | 3 | 3 | 10,418 | 2 | 0 | 2011-06-06T20:01:59.013000 | 2011-06-06T20:31:39.887000 |
6,257,372 | 6,257,452 | How to add the widths of all the images in a div with JQuery | I was looking for a way to change the width of a div to the sum of all the widths of the images within that div. In other words, I wanted #page-content to have a width that is equal to the width of all the images inside it. This is because i would like the page-content div to be wider than the browser window, so that t... | I suggest adding a class to the images as you have the links, i.e. and trying this in a $(window).load function to be sure they have loaded: var totalwidth = 0; $('img.shutterimg').each(function() { totalwidth += $(this).width(); }); $('#gallery').width(totalwidth); | How to add the widths of all the images in a div with JQuery I was looking for a way to change the width of a div to the sum of all the widths of the images within that div. In other words, I wanted #page-content to have a width that is equal to the width of all the images inside it. This is because i would like the pa... | TITLE:
How to add the widths of all the images in a div with JQuery
QUESTION:
I was looking for a way to change the width of a div to the sum of all the widths of the images within that div. In other words, I wanted #page-content to have a width that is equal to the width of all the images inside it. This is because i... | [
"jquery",
"css",
"width"
] | 1 | 6 | 1,595 | 2 | 0 | 2011-06-06T20:02:17.090000 | 2011-06-06T20:09:34.377000 |
6,257,383 | 6,257,915 | TransactionScope with Membership and Roles calls in same block (way to use only one connection?) | I have calls to the Membership API and the Roles API in the same transaction scope. I've read that opening more than one connection causes escalation requiring distributed transactions to be enabled, so I'm looking for a way to open one connection and share it with: Membership, roles, my own calls. Here's the working c... | If you have SQL2008 or higher, it can handle a transaction across multiple connections, without escalating to MSDTC. The requirement is that you use exactly the same connection string for all connections. If you're on a lower SQL server version I think that you loose. I investigated this a few months ago and found no w... | TransactionScope with Membership and Roles calls in same block (way to use only one connection?) I have calls to the Membership API and the Roles API in the same transaction scope. I've read that opening more than one connection causes escalation requiring distributed transactions to be enabled, so I'm looking for a wa... | TITLE:
TransactionScope with Membership and Roles calls in same block (way to use only one connection?)
QUESTION:
I have calls to the Membership API and the Roles API in the same transaction scope. I've read that opening more than one connection causes escalation requiring distributed transactions to be enabled, so I'... | [
"c#",
"membership",
"roles",
"transactionscope"
] | 3 | 2 | 900 | 2 | 0 | 2011-06-06T20:03:06.527000 | 2011-06-06T20:54:07.147000 |
6,257,394 | 6,258,410 | Bizarre inconsistent python ImportError - possible circular dependency? | I'm trying to refactor some python code and I'm stuck with an import error I don't understand. I suspect there might be a circular dependency somewhere but I don't see it, and I'm not getting much in the way of hints from the error messages. The codebase is large, but there are two modules of interest here: radian/mode... | Any module in the datalayer folder (including radian.py ), when it sees from radian, will assume that datalayer/radian.py is the relevant module. You might need to do from __future__ import absolute_import in datalayer/radian.py and other similarly affected modules, and then check all your imports to ensure that they'r... | Bizarre inconsistent python ImportError - possible circular dependency? I'm trying to refactor some python code and I'm stuck with an import error I don't understand. I suspect there might be a circular dependency somewhere but I don't see it, and I'm not getting much in the way of hints from the error messages. The co... | TITLE:
Bizarre inconsistent python ImportError - possible circular dependency?
QUESTION:
I'm trying to refactor some python code and I'm stuck with an import error I don't understand. I suspect there might be a circular dependency somewhere but I don't see it, and I'm not getting much in the way of hints from the erro... | [
"python",
"import"
] | 2 | 1 | 306 | 1 | 0 | 2011-06-06T20:03:57.213000 | 2011-06-06T21:47:06.650000 |
6,257,395 | 6,257,521 | Coping files from desktop to Windows Phone 7 Isolated Storage | I'm new to Phone 7 development. I am trying to create an application the will load all the DLLs that I have created from a set location on the phone. I have a basic menu application that will load all the DLLs I have created and display a list of then to the user using reflection to get an Icon out of the DLL and a des... | To retrieve the DLLs as resources you'll need to add them as embedded resources (build action) in the projet/XAP file. This will not require you to copy them to isolated storage. If you were copying them to isolated storage then you could put htem there with isolated storage explorer but this would only work for testin... | Coping files from desktop to Windows Phone 7 Isolated Storage I'm new to Phone 7 development. I am trying to create an application the will load all the DLLs that I have created from a set location on the phone. I have a basic menu application that will load all the DLLs I have created and display a list of then to the... | TITLE:
Coping files from desktop to Windows Phone 7 Isolated Storage
QUESTION:
I'm new to Phone 7 development. I am trying to create an application the will load all the DLLs that I have created from a set location on the phone. I have a basic menu application that will load all the DLLs I have created and display a l... | [
"windows-phone-7"
] | 0 | 0 | 509 | 2 | 0 | 2011-06-06T20:03:58.803000 | 2011-06-06T20:17:35.903000 |
6,257,401 | 6,257,422 | In Regex, why is "((.|\s)*?)" different than "\s*.*" | Not a complete newbie, but I still don't understand everything about Regular expressions. I was trying to use Regex to strip out tags and my first attempt was so greedy it caught the whole line SomeText I got it to work with ((.|\s)*?) This seems like it should be just as greedy, can anyone help me understand why it is... | The key difference is the *? part, which creates a reluctant quantifier, and so it tries to match as little as possible. The standard quantifier * is a greedy quantifier and tries to match as much as possible. See e.g. Greedy vs. Reluctant vs. Possessive Quantifiers As Seth Robertson noted, you might want to use a rege... | In Regex, why is "((.|\s)*?)" different than "\s*.*" Not a complete newbie, but I still don't understand everything about Regular expressions. I was trying to use Regex to strip out tags and my first attempt was so greedy it caught the whole line SomeText I got it to work with ((.|\s)*?) This seems like it should be ju... | TITLE:
In Regex, why is "((.|\s)*?)" different than "\s*.*"
QUESTION:
Not a complete newbie, but I still don't understand everything about Regular expressions. I was trying to use Regex to strip out tags and my first attempt was so greedy it caught the whole line SomeText I got it to work with ((.|\s)*?) This seems li... | [
"regex"
] | 6 | 12 | 288 | 3 | 0 | 2011-06-06T20:04:32.643000 | 2011-06-06T20:07:12.750000 |
6,257,405 | 6,268,204 | backbone.js view inheritance. `this` resolution in parent | I have a case that uses view inheritance, and my code looks essentially like: parentView = Backbone.View.extend({ events: { "some event": "business" }, initialize: function(){ _.bindAll(this); }, business: function(e){... this.someFunc && this.someFunc();... } });
childView = parentView.extend({ events: {... }, constr... | Have you tried extending this.events in the constructor, instead of in the initialize function? If you do this in initialize, you're too late; event delegation for the business function has already been setup in the constructor, and will point to parentView (see the call to this.delegateEvents(); in Backbone.View's con... | backbone.js view inheritance. `this` resolution in parent I have a case that uses view inheritance, and my code looks essentially like: parentView = Backbone.View.extend({ events: { "some event": "business" }, initialize: function(){ _.bindAll(this); }, business: function(e){... this.someFunc && this.someFunc();... } }... | TITLE:
backbone.js view inheritance. `this` resolution in parent
QUESTION:
I have a case that uses view inheritance, and my code looks essentially like: parentView = Backbone.View.extend({ events: { "some event": "business" }, initialize: function(){ _.bindAll(this); }, business: function(e){... this.someFunc && this.... | [
"javascript",
"inheritance",
"view",
"backbone.js"
] | 7 | 9 | 4,563 | 3 | 0 | 2011-06-06T20:04:50.180000 | 2011-06-07T16:04:39.453000 |
6,257,414 | 6,257,466 | HTML tags in strings break javascript/jquery | $("p").click(function(){ $(".Part1 p").html("some new text that will replace what was in the paragraph. and a paragraph "); }); Edit: added ); to the end for clarity. When I try to put html tags in my strings it either doesn't show up at all as is the case of or it breaks the script and I get an error as is the case of... | Works for me: http://jsfiddle.net/D6XCv/ But maybe you forgot to close the ")" for the click() event: $("p").click(function() { $(".Part1 p").html("some new text that will replace what was in the paragraph. and a paragraph "); }); // <== this ")"! | HTML tags in strings break javascript/jquery $("p").click(function(){ $(".Part1 p").html("some new text that will replace what was in the paragraph. and a paragraph "); }); Edit: added ); to the end for clarity. When I try to put html tags in my strings it either doesn't show up at all as is the case of or it breaks th... | TITLE:
HTML tags in strings break javascript/jquery
QUESTION:
$("p").click(function(){ $(".Part1 p").html("some new text that will replace what was in the paragraph. and a paragraph "); }); Edit: added ); to the end for clarity. When I try to put html tags in my strings it either doesn't show up at all as is the case ... | [
"javascript",
"jquery",
"html"
] | 2 | 1 | 1,108 | 4 | 0 | 2011-06-06T20:06:09.090000 | 2011-06-06T20:10:47.080000 |
6,257,421 | 6,275,376 | Only one connection at a time in phpwebsocket | I am playing with phpwebsocket. Is there a way to have only one user connected at a time? If a second user tries to connect they should be automatically disconnected and if the first user is idle for a given amount of time he should be disconnected to allow space for a new user. Is this possible - and if so, does anyon... | It's possible to limit usercount to one user, of course. You have to look at usercount and decide to accept or not new connections. In code it looks like this: if($socket==$master){ $client=socket_accept($master); if($client<0){ console("socket_accept() failed"); continue; } else{ connect($client); } } You can make a f... | Only one connection at a time in phpwebsocket I am playing with phpwebsocket. Is there a way to have only one user connected at a time? If a second user tries to connect they should be automatically disconnected and if the first user is idle for a given amount of time he should be disconnected to allow space for a new ... | TITLE:
Only one connection at a time in phpwebsocket
QUESTION:
I am playing with phpwebsocket. Is there a way to have only one user connected at a time? If a second user tries to connect they should be automatically disconnected and if the first user is idle for a given amount of time he should be disconnected to allo... | [
"php",
"websocket",
"phpwebsocket"
] | 2 | 1 | 331 | 1 | 0 | 2011-06-06T20:06:54.953000 | 2011-06-08T07:16:33.737000 |
6,257,424 | 6,257,910 | 3 Column CSS Layout needed | Looking at the layout here, I want to constrain the entire page's min width to say, 600px. I've tried setting the content's min-width, however the right hand side overlaps it. Can someone recommend a way to correct this, or another layout that satisfies this requirement? The other thing to remember in this is the order... | Here is your reviewed layout. The ordering is like you wanted it, I had to use position:absolute for the header and 'content bar'. Layout 19 1) Content here. column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text colu... | 3 Column CSS Layout needed Looking at the layout here, I want to constrain the entire page's min width to say, 600px. I've tried setting the content's min-width, however the right hand side overlaps it. Can someone recommend a way to correct this, or another layout that satisfies this requirement? The other thing to re... | TITLE:
3 Column CSS Layout needed
QUESTION:
Looking at the layout here, I want to constrain the entire page's min width to say, 600px. I've tried setting the content's min-width, however the right hand side overlaps it. Can someone recommend a way to correct this, or another layout that satisfies this requirement? The... | [
"css",
"seo",
"stylesheet"
] | 0 | 1 | 326 | 3 | 0 | 2011-06-06T20:07:15.163000 | 2011-06-06T20:53:36.943000 |
6,257,431 | 6,257,578 | Ruby/Rails - Performing automatic calculations for a models attributes | Im working on creating a game in rails and I ran into a problem for creating the scoring logic. I have a model called Score which belongs to a user and has total_points as an attribute. So every time a user creates a post(or whatever) I would like to automatically adjust the users total_score attribute. I have a feelin... | This is good use case for a ActiveRecord callback. #post.rb
belongs_to:score
after_create:update_total_score
protected
def update_total_score score.update_attribute:total_score, score.total_score + new_score_value end Note: if the post is updatable, then you would want to use after_save, but my guess is after_creat... | Ruby/Rails - Performing automatic calculations for a models attributes Im working on creating a game in rails and I ran into a problem for creating the scoring logic. I have a model called Score which belongs to a user and has total_points as an attribute. So every time a user creates a post(or whatever) I would like t... | TITLE:
Ruby/Rails - Performing automatic calculations for a models attributes
QUESTION:
Im working on creating a game in rails and I ran into a problem for creating the scoring logic. I have a model called Score which belongs to a user and has total_points as an attribute. So every time a user creates a post(or whatev... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3",
"activerecord"
] | 0 | 5 | 572 | 1 | 0 | 2011-06-06T20:07:53.860000 | 2011-06-06T20:22:56.973000 |
6,257,432 | 6,257,501 | How to check if a string only contains A-Z, a-z and 0-9? | What is the best way to validate a string with a pattern? I would use PCRE but I don't know if it is embedded in each shell and how to use it. For example, how could I validate that variable only contains A-Z, a-Z and 0-9 and does not contain spaces, ', ",...? | $ [[ "foo" =~ ^[A-Za-z0-9]*$ ]]; echo $? 0 $ [[ "foo " =~ ^[A-Za-z0-9]*$ ]]; echo $? 1 | How to check if a string only contains A-Z, a-z and 0-9? What is the best way to validate a string with a pattern? I would use PCRE but I don't know if it is embedded in each shell and how to use it. For example, how could I validate that variable only contains A-Z, a-Z and 0-9 and does not contain spaces, ', ",...? | TITLE:
How to check if a string only contains A-Z, a-z and 0-9?
QUESTION:
What is the best way to validate a string with a pattern? I would use PCRE but I don't know if it is embedded in each shell and how to use it. For example, how could I validate that variable only contains A-Z, a-Z and 0-9 and does not contain sp... | [
"regex",
"validation",
"bash",
"pcre"
] | 4 | 13 | 17,990 | 4 | 0 | 2011-06-06T20:07:56.153000 | 2011-06-06T20:14:57.987000 |
6,257,434 | 6,257,530 | Form.Show() causes an InvalidOperationException in visual studio 2010 that was not there in 2008 | I have some code that takes a form object (winforms) and calls form.Show() on a dedicated thread (it spins a new thread). This worked fine in Visual Studio 2008 (framework 3.5). I now migrated to 2010 and it fails with InvalodOperationException: "Cross-thread operation not valid: Control '' accessed from a thread other... | In a sentence; the dedicated thread must call back to the UI thread that owns the form. Cross-thread UI operations are illegal, because there are certain operations that could cause the UI control involved to become detached from the Windows message pump. This is a bad thing because then Windows cannot tell the window ... | Form.Show() causes an InvalidOperationException in visual studio 2010 that was not there in 2008 I have some code that takes a form object (winforms) and calls form.Show() on a dedicated thread (it spins a new thread). This worked fine in Visual Studio 2008 (framework 3.5). I now migrated to 2010 and it fails with Inva... | TITLE:
Form.Show() causes an InvalidOperationException in visual studio 2010 that was not there in 2008
QUESTION:
I have some code that takes a form object (winforms) and calls form.Show() on a dedicated thread (it spins a new thread). This worked fine in Visual Studio 2008 (framework 3.5). I now migrated to 2010 and ... | [
"c#",
"multithreading",
"visual-studio-2008",
"visual-studio-2010"
] | 1 | 3 | 2,686 | 1 | 0 | 2011-06-06T20:08:00.363000 | 2011-06-06T20:18:05.507000 |
6,257,443 | 6,257,562 | SQL Join Issue, Doing Something Really Wrong With Self Joins? | Okay, so I am trying to get a given output in SQL to list a custom quarter value along with an accounts given activation and termination date. My company uses an off-standard quarter reckoning so I created a little schema matching the custom quarter recognition to standard months. The query works great until i try to g... | Your problem is that when you say, Products.Subscriptions AS SubscriptionsB you're doing a cross join, so it's going to output NxN rows where N is the total number of subscriptions. I doubt you need that join at all, since you don't appear to be using any values from that instance i.e this should work just fine: SELECT... | SQL Join Issue, Doing Something Really Wrong With Self Joins? Okay, so I am trying to get a given output in SQL to list a custom quarter value along with an accounts given activation and termination date. My company uses an off-standard quarter reckoning so I created a little schema matching the custom quarter recognit... | TITLE:
SQL Join Issue, Doing Something Really Wrong With Self Joins?
QUESTION:
Okay, so I am trying to get a given output in SQL to list a custom quarter value along with an accounts given activation and termination date. My company uses an off-standard quarter reckoning so I created a little schema matching the custo... | [
"sql",
"join"
] | 1 | 1 | 203 | 3 | 0 | 2011-06-06T20:08:37.520000 | 2011-06-06T20:21:41.823000 |
6,257,459 | 6,257,561 | How to refresh ASP.NET Cache when data is updated in database? | I am currently leveraging the code below to refresh a cache at midnight every day. It works great, but the requirements are going to change such that I need to update the cache when an item in the dataset changes. I understand that there is a CacheDependency class for checking to see if a file has changed in order to r... | DotNet 2.0+ approach I suppose you've heared and read about SqlCacheDependency class, haven't you? Well if you haven't I suggest you do. It will bring a smile on your face.;) MSDN article. DotNet 1.x approach In the old days (pre.net 2.0 and pre SQL 2005) there was also a trick with usual CacheDependency class in a way... | How to refresh ASP.NET Cache when data is updated in database? I am currently leveraging the code below to refresh a cache at midnight every day. It works great, but the requirements are going to change such that I need to update the cache when an item in the dataset changes. I understand that there is a CacheDependenc... | TITLE:
How to refresh ASP.NET Cache when data is updated in database?
QUESTION:
I am currently leveraging the code below to refresh a cache at midnight every day. It works great, but the requirements are going to change such that I need to update the cache when an item in the dataset changes. I understand that there i... | [
"asp.net",
"caching"
] | 5 | 5 | 7,988 | 1 | 0 | 2011-06-06T20:09:56.620000 | 2011-06-06T20:21:25.760000 |
6,257,463 | 6,257,480 | How to get the URL without any parameters in JavaScript? | If I use: alert(window.location.href); I get everything including query strings. Is there a way to just get the main url part, for example: http://mysite.com/somedir/somefile/ instead of http://mysite.com/somedir/somefile/?foo=bar&loo=goo | This is possible, but you'll have to build it manually from the location object: location.protocol + '//' + location.host + location.pathname | How to get the URL without any parameters in JavaScript? If I use: alert(window.location.href); I get everything including query strings. Is there a way to just get the main url part, for example: http://mysite.com/somedir/somefile/ instead of http://mysite.com/somedir/somefile/?foo=bar&loo=goo | TITLE:
How to get the URL without any parameters in JavaScript?
QUESTION:
If I use: alert(window.location.href); I get everything including query strings. Is there a way to just get the main url part, for example: http://mysite.com/somedir/somefile/ instead of http://mysite.com/somedir/somefile/?foo=bar&loo=goo
ANSWE... | [
"javascript"
] | 278 | 411 | 260,639 | 11 | 0 | 2011-06-06T20:10:22.410000 | 2011-06-06T20:12:13.030000 |
6,257,468 | 6,257,518 | How do I redirect to root - public/index.html? | I wish to do a redirection to index.html in my application/public folder. def get_current_user @current_user = current_user if @current_user.nil? redirect_to root_path end end How do I achieve this? I haven't modified the root in my routes.rb ( Its still commented ) # root:to => "welcome#index" I get an error saying ro... | What you want to do is not Rails compatible. Rails is MVC, C for controller, V for view. So its internals need both. Ok, public/index.html is displayed by default but it's just because process is bypassed. So, you could create a static controller with an index action and it's corresponding view (just copy/paste the con... | How do I redirect to root - public/index.html? I wish to do a redirection to index.html in my application/public folder. def get_current_user @current_user = current_user if @current_user.nil? redirect_to root_path end end How do I achieve this? I haven't modified the root in my routes.rb ( Its still commented ) # root... | TITLE:
How do I redirect to root - public/index.html?
QUESTION:
I wish to do a redirection to index.html in my application/public folder. def get_current_user @current_user = current_user if @current_user.nil? redirect_to root_path end end How do I achieve this? I haven't modified the root in my routes.rb ( Its still ... | [
"ruby-on-rails",
"path",
"redirect",
"root"
] | 31 | 1 | 83,551 | 5 | 0 | 2011-06-06T20:10:53.003000 | 2011-06-06T20:17:27.150000 |
6,257,470 | 6,257,911 | Are there any use to limit yourself to HTTP1.0? | I've been put in charge of building some tools to help end-user test why their browser might not work with a website. Among the reason I was given to why it might not work there was this "require HTTP1.1" line. I've looked through most browser options and only IE (version 6 and up, even 9 ) allow you to disable HTTP1.1... | Generally speaking, no, you don't ever want the client to only offer HTTP/1.0, as this will slow things down. Some servers will intentionally use HTTP/1.0 with a Keep-Alive header on some responses because certain browsers (e.g. IE6/IE7) will allow more parallel connections for HTTP/1.0 (four) vs. HTTP/1.1 (two). | Are there any use to limit yourself to HTTP1.0? I've been put in charge of building some tools to help end-user test why their browser might not work with a website. Among the reason I was given to why it might not work there was this "require HTTP1.1" line. I've looked through most browser options and only IE (version... | TITLE:
Are there any use to limit yourself to HTTP1.0?
QUESTION:
I've been put in charge of building some tools to help end-user test why their browser might not work with a website. Among the reason I was given to why it might not work there was this "require HTTP1.1" line. I've looked through most browser options an... | [
"http",
"explorer"
] | 2 | 3 | 1,649 | 1 | 0 | 2011-06-06T20:10:57.243000 | 2011-06-06T20:53:38.327000 |
6,257,487 | 6,258,235 | phpstorm and xdebug breakpoints | I use phpstorm to develop websites, but for some reason breakpoints aren't synchronized. Here is my situation: I have a folder in which I keep all my projects. On the same pc, I have also xampp running as a testing server. In phpstorm I have the xampp testing server configured as a mounted folder server. But when I app... | Looks like you need to set path mappings. There are some information about that - http://blogs.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/ | phpstorm and xdebug breakpoints I use phpstorm to develop websites, but for some reason breakpoints aren't synchronized. Here is my situation: I have a folder in which I keep all my projects. On the same pc, I have also xampp running as a testing server. In phpstorm I have the xampp testing server configured as a mount... | TITLE:
phpstorm and xdebug breakpoints
QUESTION:
I use phpstorm to develop websites, but for some reason breakpoints aren't synchronized. Here is my situation: I have a folder in which I keep all my projects. On the same pc, I have also xampp running as a testing server. In phpstorm I have the xampp testing server con... | [
"breakpoints",
"xdebug",
"phpstorm"
] | 4 | 8 | 8,073 | 4 | 0 | 2011-06-06T20:13:07.010000 | 2011-06-06T21:28:22.500000 |
6,257,489 | 6,262,207 | How can I create PhraseQuery for multiple fields with custom Analyzer? | I would like to parse user request "Hello world!" by my custom analyzer and search throw "title", "description" fields by using PhraseQuery I found crazy solution of my problem but it looks not optimized | Try MultiFieldQueryParser. You can specify list of fields for which the query is to be created. | How can I create PhraseQuery for multiple fields with custom Analyzer? I would like to parse user request "Hello world!" by my custom analyzer and search throw "title", "description" fields by using PhraseQuery I found crazy solution of my problem but it looks not optimized | TITLE:
How can I create PhraseQuery for multiple fields with custom Analyzer?
QUESTION:
I would like to parse user request "Hello world!" by my custom analyzer and search throw "title", "description" fields by using PhraseQuery I found crazy solution of my problem but it looks not optimized
ANSWER:
Try MultiFieldQuer... | [
"java",
"lucene"
] | 2 | 0 | 249 | 2 | 0 | 2011-06-06T20:13:17.230000 | 2011-06-07T07:56:10.783000 |
6,257,503 | 6,257,526 | MinGW/Cygwin deploy to other computers? | Quick question: If I write a program in c++ and compile using cygwin/mingw, how can I get the binary to work on computers that does not have cygwin? In other words how can I deploy to PC without cygwin? I tried to simply compile with cygwin but when run on other computers, a bunch dll are missing. | You need to ship the DLLs, obviously. However, depending on what you are doing you may not need Cygwin at all. So the question is, what are the DLLs that are missing, and what are you doing. | MinGW/Cygwin deploy to other computers? Quick question: If I write a program in c++ and compile using cygwin/mingw, how can I get the binary to work on computers that does not have cygwin? In other words how can I deploy to PC without cygwin? I tried to simply compile with cygwin but when run on other computers, a bunc... | TITLE:
MinGW/Cygwin deploy to other computers?
QUESTION:
Quick question: If I write a program in c++ and compile using cygwin/mingw, how can I get the binary to work on computers that does not have cygwin? In other words how can I deploy to PC without cygwin? I tried to simply compile with cygwin but when run on other... | [
"deployment",
"cygwin",
"mingw"
] | 2 | 2 | 791 | 1 | 0 | 2011-06-06T20:15:08.673000 | 2011-06-06T20:17:58.017000 |
6,257,522 | 6,257,586 | how to import java source into eclipse? | Sorry for probably too novice question I have folder on file system that contains java sources, like that: C:\project\src\com\sun\blahblah...\Main.java Main class is in the package com.sun.blahblah... and contain public static void main method, i.e. everything is well-formed:) I want to import entire folder C:\project\... | Create a new Java project in Eclipse Select c:\project as the root folder of the project (create a project from existing source) | how to import java source into eclipse? Sorry for probably too novice question I have folder on file system that contains java sources, like that: C:\project\src\com\sun\blahblah...\Main.java Main class is in the package com.sun.blahblah... and contain public static void main method, i.e. everything is well-formed:) I ... | TITLE:
how to import java source into eclipse?
QUESTION:
Sorry for probably too novice question I have folder on file system that contains java sources, like that: C:\project\src\com\sun\blahblah...\Main.java Main class is in the package com.sun.blahblah... and contain public static void main method, i.e. everything i... | [
"eclipse"
] | 10 | 11 | 38,198 | 2 | 0 | 2011-06-06T20:17:37.023000 | 2011-06-06T20:23:38.053000 |
6,257,524 | 6,257,572 | Compiling a library with external dependencies | Two libraries I use in my application both use zlib, which causes a conflict when linking my project. I want to compile these libraries without zlib; I want to statically link the zlib library in my own project and have this libraries use that instead. How can I do that? | If both libraries are statically linked to the executable and zlib is also statically linked to the executable, then you just build the two libraries without linking them against zlib and add zlib to the linker dependencies when building the executable. If both libraries are DLLs then you need to check why you're expor... | Compiling a library with external dependencies Two libraries I use in my application both use zlib, which causes a conflict when linking my project. I want to compile these libraries without zlib; I want to statically link the zlib library in my own project and have this libraries use that instead. How can I do that? | TITLE:
Compiling a library with external dependencies
QUESTION:
Two libraries I use in my application both use zlib, which causes a conflict when linking my project. I want to compile these libraries without zlib; I want to statically link the zlib library in my own project and have this libraries use that instead. Ho... | [
"visual-studio-2010"
] | 1 | 1 | 903 | 1 | 0 | 2011-06-06T20:17:52.733000 | 2011-06-06T20:22:45.320000 |
6,257,532 | 6,263,629 | GWT JSNI BOOLEAN | Here's my code: package com.eggproject_hu.WPECommerceAdminSales.client;
import java.lang.Boolean;
import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Window;
public class AblakVillogo { public static Boolean focusedWindow = true; private static Boolean init = false;
public static void setFocuse... | Either follow Daniel's advice, but then you have to change your method to take a boolean argument (i.e. use boolean all the way through), or you can explicitly cast/box your boolean in a java.lang.Boolean in your JSNI method: @com.eggproject_hu.WPECommerceAdminSales.client.AblakVillogo::setFocused(Ljava/lang/Boolean;)(... | GWT JSNI BOOLEAN Here's my code: package com.eggproject_hu.WPECommerceAdminSales.client;
import java.lang.Boolean;
import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Window;
public class AblakVillogo { public static Boolean focusedWindow = true; private static Boolean init = false;
public stat... | TITLE:
GWT JSNI BOOLEAN
QUESTION:
Here's my code: package com.eggproject_hu.WPECommerceAdminSales.client;
import java.lang.Boolean;
import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Window;
public class AblakVillogo { public static Boolean focusedWindow = true; private static Boolean init = f... | [
"gwt",
"jsni"
] | 2 | 4 | 5,919 | 2 | 0 | 2011-06-06T20:18:21.473000 | 2011-06-07T10:02:04.723000 |
6,257,539 | 6,257,598 | Do a Git pull to overwrite local changes | There has certainly been posts around for this, but I actually did a commit because I thought it was the right thing to do. So, I have two repositories, one development and one production. I had to edit something in the production because it was an urgent bugfix, and now I have three files that are newer in the product... | If you want to entirely replace your local branch foo with the contents of the remote branch origin/foo: git fetch origin git checkout foo git reset --hard origin/foo If you want to do something else, please reword your question. However, I might add the production Git repository as a remote and then merge the live cha... | Do a Git pull to overwrite local changes There has certainly been posts around for this, but I actually did a commit because I thought it was the right thing to do. So, I have two repositories, one development and one production. I had to edit something in the production because it was an urgent bugfix, and now I have ... | TITLE:
Do a Git pull to overwrite local changes
QUESTION:
There has certainly been posts around for this, but I actually did a commit because I thought it was the right thing to do. So, I have two repositories, one development and one production. I had to edit something in the production because it was an urgent bugfi... | [
"git",
"versioning",
"commit",
"pull",
"git-pull"
] | 9 | 23 | 25,140 | 2 | 0 | 2011-06-06T20:18:52.547000 | 2011-06-06T20:25:09.747000 |
6,257,547 | 6,257,603 | Pylint recursively for a given filename | I have a Django project and I'm working on Pylinting my way through it. I have a couple situations where I'd like to be able to recursively find all files with a given name and pylint them differently (using different options). For example, I'd like to set different options for pylinting urls.py and admin.py The follow... | Depending on your operating system, you could use: find project_name -name urls.py | xargs pylint | Pylint recursively for a given filename I have a Django project and I'm working on Pylinting my way through it. I have a couple situations where I'd like to be able to recursively find all files with a given name and pylint them differently (using different options). For example, I'd like to set different options for p... | TITLE:
Pylint recursively for a given filename
QUESTION:
I have a Django project and I'm working on Pylinting my way through it. I have a couple situations where I'd like to be able to recursively find all files with a given name and pylint them differently (using different options). For example, I'd like to set diffe... | [
"python",
"django",
"pylint"
] | 13 | 15 | 6,413 | 3 | 0 | 2011-06-06T20:19:33.700000 | 2011-06-06T20:25:25.830000 |
6,257,549 | 6,257,579 | How to control font size in an eBay listing | I am trying to control font size in an eBay listing such that it will look the same (more or less) on Firefox and Internet Explorer 8. To simplify things I just specify a single font size for the entire body text:... Yet, while locally (on my PC) the font looks as I want it to look like: Firefox 3.6: Internet Explorer ... | Might be a dirty trick, but have you tried overwriting the CSS using the!important declaration? Like so: foo: bar!important; I would suggest you open up Firebug on Firefox (or Chrome's inspector on Google Chrome) and see what styles are overwriting the ones you added. Another thing to try is adding those styles (the wh... | How to control font size in an eBay listing I am trying to control font size in an eBay listing such that it will look the same (more or less) on Firefox and Internet Explorer 8. To simplify things I just specify a single font size for the entire body text:... Yet, while locally (on my PC) the font looks as I want it t... | TITLE:
How to control font size in an eBay listing
QUESTION:
I am trying to control font size in an eBay listing such that it will look the same (more or less) on Firefox and Internet Explorer 8. To simplify things I just specify a single font size for the entire body text:... Yet, while locally (on my PC) the font lo... | [
"html",
"css"
] | 3 | 6 | 3,507 | 2 | 0 | 2011-06-06T20:19:53.960000 | 2011-06-06T20:22:59.537000 |
6,257,553 | 6,258,638 | NSInvalidArgumentException Error When Using UITabBarController | I got the following error and I can't seem to figure out what happened. Please help me. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x57405a0' | If you're using: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [array count]; } – Try: NSLog(@"%i", [array count]); And see what returns. Maybe the array is not been properly allocated. | NSInvalidArgumentException Error When Using UITabBarController I got the following error and I can't seem to figure out what happened. Please help me. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to inst... | TITLE:
NSInvalidArgumentException Error When Using UITabBarController
QUESTION:
I got the following error and I can't seem to figure out what happened. Please help me. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController tableView:numberOfRowsInSection:]: unrecognized sel... | [
"iphone",
"xcode",
"uitabbarcontroller"
] | 0 | 1 | 214 | 3 | 0 | 2011-06-06T20:20:07.353000 | 2011-06-06T22:13:14.770000 |
6,257,554 | 6,258,353 | use LWP::Simple to get ftp site content in Perl | I am having some issue here using LWP::Simple to get ftp site content in Perl. It would work fine if the site used http, but not ftp, for example ftp://ftp.di.uminho.pt/pub/ctan/fonts/. But in my firefox browser, I can view the content as html. So how to get the html of the site in this case? | LWP returns a document of the type text/ftp-dir-listing for a FTP directory. Use File::Listing to parse it. $ GET -USe ftp://ftp.di.uminho.pt/pub/ctan/fonts/ GET ftp://ftp.di.uminho.pt/pub/ctan/fonts/ User-Agent: lwp-request/6.00 libwww-perl/6.02
200 OK Server: --------- Welcome to Pure-FTPd [privsep] ---------- Conte... | use LWP::Simple to get ftp site content in Perl I am having some issue here using LWP::Simple to get ftp site content in Perl. It would work fine if the site used http, but not ftp, for example ftp://ftp.di.uminho.pt/pub/ctan/fonts/. But in my firefox browser, I can view the content as html. So how to get the html of t... | TITLE:
use LWP::Simple to get ftp site content in Perl
QUESTION:
I am having some issue here using LWP::Simple to get ftp site content in Perl. It would work fine if the site used http, but not ftp, for example ftp://ftp.di.uminho.pt/pub/ctan/fonts/. But in my firefox browser, I can view the content as html. So how to... | [
"perl"
] | 0 | 3 | 1,772 | 3 | 0 | 2011-06-06T20:20:10.113000 | 2011-06-06T21:40:29.967000 |
6,257,570 | 6,257,641 | Changing double to character array in Android | I need to change a double into a character array. In other words I have a variable that is a double and I would like to represent it as a character array. I want to do this because I am using the USB port on my Nexus One as a serial port and the only way I can get it to work is to send characters and I have GPS data th... | char[] characters = String.valueOf(myDoubleVariable).toCharArray(); | Changing double to character array in Android I need to change a double into a character array. In other words I have a variable that is a double and I would like to represent it as a character array. I want to do this because I am using the USB port on my Nexus One as a serial port and the only way I can get it to wor... | TITLE:
Changing double to character array in Android
QUESTION:
I need to change a double into a character array. In other words I have a variable that is a double and I would like to represent it as a character array. I want to do this because I am using the USB port on my Nexus One as a serial port and the only way I... | [
"android"
] | 0 | 1 | 268 | 1 | 0 | 2011-06-06T20:22:34.070000 | 2011-06-06T20:28:06.003000 |
6,257,580 | 6,257,611 | Count all duplicates of each value | I would like a SQL query for MS Jet 4.0 (MSSql?) to get a count of all the duplicates of each number in a database. The fields are: id (autonum), number (text) I have a database with a lot of numbers. Each number should be returned in numerical order, without duplicates, with a count of all duplicates. Number-fields co... | SELECT col, COUNT(dupe_col) AS dupe_cnt FROM TABLE GROUP BY col HAVING COUNT(dupe_col) > 1 ORDER BY COUNT(dupe_col) DESC | Count all duplicates of each value I would like a SQL query for MS Jet 4.0 (MSSql?) to get a count of all the duplicates of each number in a database. The fields are: id (autonum), number (text) I have a database with a lot of numbers. Each number should be returned in numerical order, without duplicates, with a count ... | TITLE:
Count all duplicates of each value
QUESTION:
I would like a SQL query for MS Jet 4.0 (MSSql?) to get a count of all the duplicates of each number in a database. The fields are: id (autonum), number (text) I have a database with a lot of numbers. Each number should be returned in numerical order, without duplica... | [
"sql",
"sql-server"
] | 28 | 44 | 130,415 | 5 | 0 | 2011-06-06T20:23:05.883000 | 2011-06-06T20:25:52.483000 |
6,257,582 | 6,257,629 | Django - saving two records at the same time with a foreign key relation | I want to be able to save two records in two database tables at the same time with one of the tables having foreign key relation to the other table. models.py class Model1(models.Model): Modlel1Filed1 = models.CharField()
class Model2 (models.Model): Model2Filed1 = models.ForeignKey(Model1) Modle2Field2 = models.CharF... | The error message is pretty clear: "Model2.Model2Filed1" must be a "Model1" instance: f = Model2.objects.create(Model2Filed1=p, Modle2Field2=some_data) changed Model2Filed1=p.id to Model2Filed1=p | Django - saving two records at the same time with a foreign key relation I want to be able to save two records in two database tables at the same time with one of the tables having foreign key relation to the other table. models.py class Model1(models.Model): Modlel1Filed1 = models.CharField()
class Model2 (models.Mod... | TITLE:
Django - saving two records at the same time with a foreign key relation
QUESTION:
I want to be able to save two records in two database tables at the same time with one of the tables having foreign key relation to the other table. models.py class Model1(models.Model): Modlel1Filed1 = models.CharField()
class ... | [
"django",
"django-models",
"django-views"
] | 2 | 3 | 3,235 | 1 | 0 | 2011-06-06T20:23:20.223000 | 2011-06-06T20:26:46.417000 |
6,257,584 | 6,257,707 | Intentionally cause a segfault under Ruby 1.8.7 | What's the easiest way to cause a segfault intentionally in MRI Ruby 1.8.7? | You might check out segfault4r (it was last updated in 2007). You have to download and install the gem manually, as it's not available through RubyGems. | Intentionally cause a segfault under Ruby 1.8.7 What's the easiest way to cause a segfault intentionally in MRI Ruby 1.8.7? | TITLE:
Intentionally cause a segfault under Ruby 1.8.7
QUESTION:
What's the easiest way to cause a segfault intentionally in MRI Ruby 1.8.7?
ANSWER:
You might check out segfault4r (it was last updated in 2007). You have to download and install the gem manually, as it's not available through RubyGems. | [
"ruby",
"segmentation-fault"
] | 1 | 3 | 537 | 4 | 0 | 2011-06-06T20:23:34.827000 | 2011-06-06T20:32:32.387000 |
6,257,587 | 6,257,637 | Does reflection require that literal strings are written among the bytecode? | When Java (or any language capable of reflection) outputs a program, does it keep the names of the methods as strings within the bytecode? I'm wondering how, for example, the following is possible without this being the case: Class c = Class.forName("foo"); Method m[] = c.getDeclaredMethods(); Will the bytecode then co... | First, Method, fields and class names are stored as clear text in.class file. Second, additionally to reflection there are java decompilers that can restore the almost-readable code from byte code. Third if you want to protect your code use obfuscation. There are several popular java obfuscatotors available. | Does reflection require that literal strings are written among the bytecode? When Java (or any language capable of reflection) outputs a program, does it keep the names of the methods as strings within the bytecode? I'm wondering how, for example, the following is possible without this being the case: Class c = Class.f... | TITLE:
Does reflection require that literal strings are written among the bytecode?
QUESTION:
When Java (or any language capable of reflection) outputs a program, does it keep the names of the methods as strings within the bytecode? I'm wondering how, for example, the following is possible without this being the case:... | [
"java",
"reflection"
] | 4 | 4 | 160 | 3 | 0 | 2011-06-06T20:23:41 | 2011-06-06T20:27:47.077000 |
6,257,590 | 6,257,653 | Is it possible to have optional DataMembers in WCF? | If I have the following class: [DataContract] public class GetColorsRS { [DataMember(Name = "Colors", Order = 0, IsRequired=true)] public List Colors { get; set; }
[DataMember(Name = "Errors", Order = 1, IsRequired=false)] public List Errors { get; set; } } If no errors are found in the request, I want to send back a ... | I have determined that EmitDefaultValue should be set to false if I don't want to serialize the default value of the DataMember. [DataMember(Name = "Errors", Order = 1, IsRequired=false,EmitDefaultValue=false)] public List Errors { get; set; } | Is it possible to have optional DataMembers in WCF? If I have the following class: [DataContract] public class GetColorsRS { [DataMember(Name = "Colors", Order = 0, IsRequired=true)] public List Colors { get; set; }
[DataMember(Name = "Errors", Order = 1, IsRequired=false)] public List Errors { get; set; } } If no err... | TITLE:
Is it possible to have optional DataMembers in WCF?
QUESTION:
If I have the following class: [DataContract] public class GetColorsRS { [DataMember(Name = "Colors", Order = 0, IsRequired=true)] public List Colors { get; set; }
[DataMember(Name = "Errors", Order = 1, IsRequired=false)] public List Errors { get; ... | [
"wcf"
] | 9 | 17 | 16,686 | 1 | 0 | 2011-06-06T20:23:56.040000 | 2011-06-06T20:29:18.363000 |
6,257,593 | 6,257,889 | how to make changes permanently to css elements with -moz-transform? | var transform = ['scale(' + scale + ')']; $.merge(transform, ['rotate(' + rotate + 'deg)']); $(this).css(-moz-transform, transform.join(' ')); this block of code executes when an event is generated, the new scaling and rotation is added to css element,but whenever the same event is generated again the css element reset... | There's nothing wrong with this code, but keep in mind you're setting scale and rotate in absolute terms, not relative to its 'initial' state. So each time this code executes, the -moz-transform property of your element is being overwritten. If you want to rotate and scale it based on it's current state, you'll have to... | how to make changes permanently to css elements with -moz-transform? var transform = ['scale(' + scale + ')']; $.merge(transform, ['rotate(' + rotate + 'deg)']); $(this).css(-moz-transform, transform.join(' ')); this block of code executes when an event is generated, the new scaling and rotation is added to css element... | TITLE:
how to make changes permanently to css elements with -moz-transform?
QUESTION:
var transform = ['scale(' + scale + ')']; $.merge(transform, ['rotate(' + rotate + 'deg)']); $(this).css(-moz-transform, transform.join(' ')); this block of code executes when an event is generated, the new scaling and rotation is ad... | [
"javascript",
"jquery",
"css"
] | 0 | 0 | 1,015 | 1 | 0 | 2011-06-06T20:24:35.670000 | 2011-06-06T20:50:54.540000 |
6,257,594 | 6,257,711 | How can you do a mass unload of Assemblies from GAC by PublicKeyToken? | Is there anyway to unload all assemblies from the GAC that have a specific PublicKeyToken? I am okay with the solution being command-line (gacutil.exe, etc) or via C#. EDIT: FYI, I can do this via Windows Explorer and going to the assembly folder and sort by public key and they select all the ones in question and right... | With the commandline and a little C# it's easy: GacUtil /l Lists all assemblies on CSV lines. Filter this on the keytoken and feed the names to a removelist.txt for GacUtil /ul removelist.txt | How can you do a mass unload of Assemblies from GAC by PublicKeyToken? Is there anyway to unload all assemblies from the GAC that have a specific PublicKeyToken? I am okay with the solution being command-line (gacutil.exe, etc) or via C#. EDIT: FYI, I can do this via Windows Explorer and going to the assembly folder an... | TITLE:
How can you do a mass unload of Assemblies from GAC by PublicKeyToken?
QUESTION:
Is there anyway to unload all assemblies from the GAC that have a specific PublicKeyToken? I am okay with the solution being command-line (gacutil.exe, etc) or via C#. EDIT: FYI, I can do this via Windows Explorer and going to the ... | [
"c#",
"assemblies",
"gac",
"gacutil"
] | 2 | 3 | 642 | 3 | 0 | 2011-06-06T20:24:43.450000 | 2011-06-06T20:32:38.507000 |
6,257,599 | 6,257,643 | Contains functionality in Linq to XML Where Clause | I'm having unexpected behavior with the.Contains() function of the where clause in Linq to XML. It seems to be functioning like "==" not Contains() in the string function. Example: var q = from sr in SearchResults.Descendants("Result") where _filters.Contains((string)sr.Element("itemtype")) orderby (string)sr.Element("... | Try this: _filters.Any(s => ((string)sr.Element("itemtype")?? "").Contains(s)) This way you're checking that the element's value contains any of the strings in _filters. The use of the null coalescing operator ensures a NullReferenceException isn't thrown when the itemtype node doesn't exist since it is replaced with a... | Contains functionality in Linq to XML Where Clause I'm having unexpected behavior with the.Contains() function of the where clause in Linq to XML. It seems to be functioning like "==" not Contains() in the string function. Example: var q = from sr in SearchResults.Descendants("Result") where _filters.Contains((string)s... | TITLE:
Contains functionality in Linq to XML Where Clause
QUESTION:
I'm having unexpected behavior with the.Contains() function of the where clause in Linq to XML. It seems to be functioning like "==" not Contains() in the string function. Example: var q = from sr in SearchResults.Descendants("Result") where _filters.... | [
"c#",
".net",
"linq-to-xml"
] | 2 | 2 | 3,150 | 3 | 0 | 2011-06-06T20:25:12.527000 | 2011-06-06T20:28:22.277000 |
6,257,604 | 6,273,445 | Drupal Taxonomy associate to content | I have some content I need to start categorizing. We've built the system a while ago, the content is growing a lot so now we're finding a few years later we should start categorizing this stuff. How can I enable taxonomy for this content? Thanks Jeff | You can absolutely enable taxonomy on already existing content types and nodes. There will be no effect of course until people actually edit the content to add terms. In order to categorize the content I would recommend http://drupal.org/project/views_bulk_operations It's awesome and saved my in the past during migrati... | Drupal Taxonomy associate to content I have some content I need to start categorizing. We've built the system a while ago, the content is growing a lot so now we're finding a few years later we should start categorizing this stuff. How can I enable taxonomy for this content? Thanks Jeff | TITLE:
Drupal Taxonomy associate to content
QUESTION:
I have some content I need to start categorizing. We've built the system a while ago, the content is growing a lot so now we're finding a few years later we should start categorizing this stuff. How can I enable taxonomy for this content? Thanks Jeff
ANSWER:
You c... | [
"drupal"
] | 0 | 0 | 523 | 3 | 0 | 2011-06-06T20:25:29.410000 | 2011-06-08T01:59:11.497000 |
6,257,609 | 6,258,228 | MaxArrayLength Exception in WPF | I am working on a project that is a website, a mobile app, and a desktop WPF app that all depend on a service. The mobile app works fine, but the desktop and website was having a problem with getting images from the database because of a MaxArrayLength property. We were able to change the web.config file's maxArrayLeng... | Is there any way to do this without adding a service reference and just being able to keep the direct reference to the service? Why would you want to do that? If you are referencing the WCF project directly, only hitting some included business logic, your solution might need some project refactoring. Ie., you should ha... | MaxArrayLength Exception in WPF I am working on a project that is a website, a mobile app, and a desktop WPF app that all depend on a service. The mobile app works fine, but the desktop and website was having a problem with getting images from the database because of a MaxArrayLength property. We were able to change th... | TITLE:
MaxArrayLength Exception in WPF
QUESTION:
I am working on a project that is a website, a mobile app, and a desktop WPF app that all depend on a service. The mobile app works fine, but the desktop and website was having a problem with getting images from the database because of a MaxArrayLength property. We were... | [
"c#",
"wpf",
"wcf",
"app-config"
] | 1 | 1 | 304 | 1 | 0 | 2011-06-06T20:25:50.110000 | 2011-06-06T21:27:54.247000 |
6,257,610 | 6,257,965 | Jquery plug in - Ajax pop up | I found this excellent plugin for ajax pop up for MVC called SimleModal, but am not able to get it to work. http://www.ericmmartin.com/projects/simplemodal/ is the website. I want to use this plugin to pop up a view (in MVC) when a link is clicked on. Can any one show me the right direction here.. thank you..sample pse... | Why not just use the built in jQuery-ui? Simply call $('#someDiv').Dialog(...) to make it work. Then you can use the jQuery theme roller site as well to customize your look - and you are dealing with 'base line' jQuery code. To keep the same example syntax like Darrin added above for ease of comparison see below. Confi... | Jquery plug in - Ajax pop up I found this excellent plugin for ajax pop up for MVC called SimleModal, but am not able to get it to work. http://www.ericmmartin.com/projects/simplemodal/ is the website. I want to use this plugin to pop up a view (in MVC) when a link is clicked on. Can any one show me the right direction... | TITLE:
Jquery plug in - Ajax pop up
QUESTION:
I found this excellent plugin for ajax pop up for MVC called SimleModal, but am not able to get it to work. http://www.ericmmartin.com/projects/simplemodal/ is the website. I want to use this plugin to pop up a view (in MVC) when a link is clicked on. Can any one show me t... | [
"javascript",
"jquery-ui",
"asp.net-mvc-3",
"jquery-plugins"
] | 0 | 2 | 2,140 | 2 | 0 | 2011-06-06T20:25:51.273000 | 2011-06-06T20:59:36.077000 |
6,257,616 | 6,257,650 | Comparison with unicode string in if-condition (python) | Possible Duplicate: Python '==' vs 'is' comparing strings, 'is' fails sometimes, why? I am going to skip the part where i tell you how i tested my code and jump straight to the problem. Python seems to be having some problem matching split of a unicode string to another inline unicode string in an if statement. >>>zone... | It's because strings are objects in Python --- when you slice a string, you create a new one. It's slightly more complicated than that, but that's the gist of it. Solution: use == and!= instead of is and is not. | Comparison with unicode string in if-condition (python) Possible Duplicate: Python '==' vs 'is' comparing strings, 'is' fails sometimes, why? I am going to skip the part where i tell you how i tested my code and jump straight to the problem. Python seems to be having some problem matching split of a unicode string to a... | TITLE:
Comparison with unicode string in if-condition (python)
QUESTION:
Possible Duplicate: Python '==' vs 'is' comparing strings, 'is' fails sometimes, why? I am going to skip the part where i tell you how i tested my code and jump straight to the problem. Python seems to be having some problem matching split of a u... | [
"python",
"if-statement",
"unicode-string"
] | 1 | 2 | 2,891 | 1 | 0 | 2011-06-06T20:26:08.500000 | 2011-06-06T20:28:53.867000 |
6,257,619 | 6,257,642 | How get an apostrophe in a string in javascript | I'm doing some stuff with javascript and I'm wondering, how do I put an apostrophe in a string in javascript? theAnchorText = 'I apostrophe M home'; | You can use double quotes instead of single quotes: theAnchorText = "I'm home"; Alternatively, escape the apostrophe: theAnchorText = 'I\'m home'; The backslash tells JavaScript (this has nothing to do with jQuery, by the way) that the next character should be interpreted as "special". In this case, an apostrophe after... | How get an apostrophe in a string in javascript I'm doing some stuff with javascript and I'm wondering, how do I put an apostrophe in a string in javascript? theAnchorText = 'I apostrophe M home'; | TITLE:
How get an apostrophe in a string in javascript
QUESTION:
I'm doing some stuff with javascript and I'm wondering, how do I put an apostrophe in a string in javascript? theAnchorText = 'I apostrophe M home';
ANSWER:
You can use double quotes instead of single quotes: theAnchorText = "I'm home"; Alternatively, e... | [
"javascript"
] | 41 | 78 | 157,182 | 4 | 0 | 2011-06-06T20:26:15.410000 | 2011-06-06T20:28:09.153000 |
6,257,623 | 6,257,652 | Rails: rewrite a find_all_by() with a .where method | I'm using a gem that doesnt work on the arrays from the find_all_by() method, but does with the.where(); however, I don't know how to write it in a way that produces the same result. For instance, how could I rewrite: Post.find_all_by_poster(@user.id,:conditions => ['title IS NOT NULL OR name!=?', 'Bob' ]) My attempt: ... | You still need to use IS NOT NULL instead of passing in NULL as a separate parameter: Post.where("poster =? and (title is not null or name!=?)", @user.id, 'Bob') | Rails: rewrite a find_all_by() with a .where method I'm using a gem that doesnt work on the arrays from the find_all_by() method, but does with the.where(); however, I don't know how to write it in a way that produces the same result. For instance, how could I rewrite: Post.find_all_by_poster(@user.id,:conditions => ['... | TITLE:
Rails: rewrite a find_all_by() with a .where method
QUESTION:
I'm using a gem that doesnt work on the arrays from the find_all_by() method, but does with the.where(); however, I don't know how to write it in a way that produces the same result. For instance, how could I rewrite: Post.find_all_by_poster(@user.id... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3"
] | 0 | 3 | 737 | 1 | 0 | 2011-06-06T20:26:35.940000 | 2011-06-06T20:29:13.243000 |
6,257,625 | 6,257,673 | Rounding decimals in PHP | I want to display a number as a winning percentage, similar to what you would see on ESPN baseball standings. If the user has no losses, I would like the percentage to read 1.000. If the user has no wins, I would like it to read.000. If the user has a mix of wins and losses, I would like to display.xyz, even if y or y ... | $wpct = ltrim(number_format($wins / ($wins + $losses), 3), '0'); This formats the number the three digit after the decimal point and removes any leading zeroes. See number_format and ltrim for further reference. | Rounding decimals in PHP I want to display a number as a winning percentage, similar to what you would see on ESPN baseball standings. If the user has no losses, I would like the percentage to read 1.000. If the user has no wins, I would like it to read.000. If the user has a mix of wins and losses, I would like to dis... | TITLE:
Rounding decimals in PHP
QUESTION:
I want to display a number as a winning percentage, similar to what you would see on ESPN baseball standings. If the user has no losses, I would like the percentage to read 1.000. If the user has no wins, I would like it to read.000. If the user has a mix of wins and losses, I... | [
"php",
"numbers",
"rounding"
] | 1 | 2 | 1,094 | 7 | 0 | 2011-06-06T20:26:37.857000 | 2011-06-06T20:30:09.853000 |
6,257,628 | 6,257,719 | How do I call a Lua script from an HTML5 script/file/page | I want to create web pages with dynamic content. I have an HTML page, and I want to call a lua script from it How do I invoke the lua script? and have any hope that xx will be 123 when the script exits? Replace the current web page with the content generated by the lua script. | On the WWW scripts can run in two places. In the web browser On the web server If you want it to run in the browser, then you need support for the language built into the browser (or provided by an extension). For all practical purposes, if you are writing webpages for the WWW, then the only language you can use in an ... | How do I call a Lua script from an HTML5 script/file/page I want to create web pages with dynamic content. I have an HTML page, and I want to call a lua script from it How do I invoke the lua script? and have any hope that xx will be 123 when the script exits? Replace the current web page with the content generated by ... | TITLE:
How do I call a Lua script from an HTML5 script/file/page
QUESTION:
I want to create web pages with dynamic content. I have an HTML page, and I want to call a lua script from it How do I invoke the lua script? and have any hope that xx will be 123 when the script exits? Replace the current web page with the con... | [
"html",
"browser",
"lua"
] | 7 | 9 | 22,089 | 6 | 0 | 2011-06-06T20:26:46.483000 | 2011-06-06T20:33:10.153000 |
6,257,634 | 6,263,148 | Reverse-engineering Google SVG code | I'm looking at some Google charts to get a feel for how to write SVG code. There's something curious about the dots on the scatter plots (these are just coloured dots superimposed on a grid). Every dot is drawn twice, once as a large (r=12) zero-stroke white circle, and once again as a small (r=3.5) circle in the requi... | I think it's there to trigger events for the tool-tip. You only need to move your mouse near to (within 12 pixels) a point on the scatter plot for it to display that point's information. | Reverse-engineering Google SVG code I'm looking at some Google charts to get a feel for how to write SVG code. There's something curious about the dots on the scatter plots (these are just coloured dots superimposed on a grid). Every dot is drawn twice, once as a large (r=12) zero-stroke white circle, and once again as... | TITLE:
Reverse-engineering Google SVG code
QUESTION:
I'm looking at some Google charts to get a feel for how to write SVG code. There's something curious about the dots on the scatter plots (these are just coloured dots superimposed on a grid). Every dot is drawn twice, once as a large (r=12) zero-stroke white circle,... | [
"svg",
"google-visualization"
] | 0 | 1 | 343 | 1 | 0 | 2011-06-06T20:27:16.293000 | 2011-06-07T09:22:09.303000 |
6,257,647 | 6,257,716 | Convert hash.digest() to unicode | import hashlib string1 = u'test' hashstring = hashlib.md5() hashstring.update(string1) string2 = hashstring.digest()
unicode(string2)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8f in position 1: ordinal not in range(128) The string HAS to be unicode for it to be any use to me, can this be done? Using pytho... | The result of.digest() is a bytestring¹, so converting it to Unicode is pointless. Use.hexdigest() if you want a readable representation. ¹ Some bytestrings can be converted to Unicode, but the bytestrings returned by.digest() do not contain textual data. They can contain any byte including the null byte: they're usual... | Convert hash.digest() to unicode import hashlib string1 = u'test' hashstring = hashlib.md5() hashstring.update(string1) string2 = hashstring.digest()
unicode(string2)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8f in position 1: ordinal not in range(128) The string HAS to be unicode for it to be any use to ... | TITLE:
Convert hash.digest() to unicode
QUESTION:
import hashlib string1 = u'test' hashstring = hashlib.md5() hashstring.update(string1) string2 = hashstring.digest()
unicode(string2)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8f in position 1: ordinal not in range(128) The string HAS to be unicode for it... | [
"python",
"unicode",
"unicode-string"
] | 14 | 13 | 42,559 | 2 | 0 | 2011-06-06T20:28:51.977000 | 2011-06-06T20:33:00.247000 |
6,257,648 | 6,257,751 | Using Django's ifchanged template tag with forloop.counter | Django's template tags include an {% ifchanged %} test for use within loops to check if a value has changed. I'm using it to output a new tag every time a variable changes. I want every 4th to have a specific class, but Django's forloop.counter variable isn't helpful here as it increments every time the loop runs, even... | You can simply use the divisibleby filter: {% if forloop.counter|divisibleby:"4" %}.... {% endif %} Update: You have to use a counter+ divisibleby filter in your template. Look at this template tag: Counter, it can help you. Or Filter out duplicate items (if possible) in the view before passing them to the template and... | Using Django's ifchanged template tag with forloop.counter Django's template tags include an {% ifchanged %} test for use within loops to check if a value has changed. I'm using it to output a new tag every time a variable changes. I want every 4th to have a specific class, but Django's forloop.counter variable isn't h... | TITLE:
Using Django's ifchanged template tag with forloop.counter
QUESTION:
Django's template tags include an {% ifchanged %} test for use within loops to check if a value has changed. I'm using it to output a new tag every time a variable changes. I want every 4th to have a specific class, but Django's forloop.counte... | [
"django"
] | 1 | 3 | 1,769 | 1 | 0 | 2011-06-06T20:28:53.023000 | 2011-06-06T20:36:19.943000 |
6,257,656 | 6,263,198 | GWT KeyPress filter | How do you go about creating KeyPress filter that would enforce only digits as input in text field. Something like this here: http://www.smartclient.com/smartgwt/showcase/#form_keypress_filter As added anoyence is there a way of doing this in uiBinder xml file? | The code to do that is described here. In your uiBinder file, define your TextBox item. In your class, you can either add the KeyPressHandler directly, like: textBox.addKeyPressHandler(new KeyPressHandler() {
@Override public void onKeyPress(KeyPressEvent event) { if (!"0123456789".contains(String.valueOf(event.getCha... | GWT KeyPress filter How do you go about creating KeyPress filter that would enforce only digits as input in text field. Something like this here: http://www.smartclient.com/smartgwt/showcase/#form_keypress_filter As added anoyence is there a way of doing this in uiBinder xml file? | TITLE:
GWT KeyPress filter
QUESTION:
How do you go about creating KeyPress filter that would enforce only digits as input in text field. Something like this here: http://www.smartclient.com/smartgwt/showcase/#form_keypress_filter As added anoyence is there a way of doing this in uiBinder xml file?
ANSWER:
The code to... | [
"java",
"gwt",
"filter",
"keypress"
] | 0 | 5 | 2,958 | 1 | 0 | 2011-06-06T20:29:31.177000 | 2011-06-07T09:26:15.353000 |
6,257,657 | 6,260,029 | wicket sessions: how to prevent "jsessionid" from showing up in googlebot crawl results? | When google crawls our site the resulting URLs all have the jsessionid appended to them. Is this happening because the app server is detecting a lack of cookie support in Googlebot, forcing the session to be maintained via URL-rewriting? Is there anything I can do about it? Is the solution simply to never call Componen... | Found the solution in SEO - Search Engine Optimization - Apache Wicket Wiki. In a nutshell: override WebApplication.newWebResponse() have it return a BufferedWebResponse that checks to see if the user-agent is a crawler (i.e. googlebot) or not if it's a crawler, don't re-write the URL | wicket sessions: how to prevent "jsessionid" from showing up in googlebot crawl results? When google crawls our site the resulting URLs all have the jsessionid appended to them. Is this happening because the app server is detecting a lack of cookie support in Googlebot, forcing the session to be maintained via URL-rewr... | TITLE:
wicket sessions: how to prevent "jsessionid" from showing up in googlebot crawl results?
QUESTION:
When google crawls our site the resulting URLs all have the jsessionid appended to them. Is this happening because the app server is detecting a lack of cookie support in Googlebot, forcing the session to be maint... | [
"wicket",
"session-state",
"jsessionid"
] | 2 | 1 | 2,206 | 1 | 0 | 2011-06-06T20:29:33.633000 | 2011-06-07T02:18:26.073000 |
6,257,659 | 6,257,752 | JS Busy loading indicator ignore middle click | My busy loading indicator basically works by detecting clicks. However, I just noted that when I middle click an item, it opens a link in a new tab and then the loading indicator shows up forever. How can I tell JS to ignore the middle mouse button? window.onload = setupFunc;
function setupFunc() { document.getElement... | You can try to, but it won't work very well with all browsers. This page describes what browsers support disabling the middle mouse button via JS. Firefox is not one of them... | JS Busy loading indicator ignore middle click My busy loading indicator basically works by detecting clicks. However, I just noted that when I middle click an item, it opens a link in a new tab and then the loading indicator shows up forever. How can I tell JS to ignore the middle mouse button? window.onload = setupFun... | TITLE:
JS Busy loading indicator ignore middle click
QUESTION:
My busy loading indicator basically works by detecting clicks. However, I just noted that when I middle click an item, it opens a link in a new tab and then the loading indicator shows up forever. How can I tell JS to ignore the middle mouse button? window... | [
"javascript",
"button",
"mouse"
] | 1 | 1 | 584 | 2 | 0 | 2011-06-06T20:29:36.917000 | 2011-06-06T20:36:27.070000 |
6,257,686 | 6,257,733 | GMail like try-again behaviour for my website | Disclaimer: I am living at some place where my net connection gets cut off at least ten times a day. I am not sure if my question makes much sense to guys with stable connection. Question: Suppose that I am checking GMail when the connection gets cut off. Then, if I unknowingly press my Inbox link, instead of a browser... | This happens because Gmail uses AJAX requests instead of hyperlinks to new pages. When you make an AJAX request, you can add an error handler that does whatever you want. It is impossible to add error handling to normal page navigation. | GMail like try-again behaviour for my website Disclaimer: I am living at some place where my net connection gets cut off at least ten times a day. I am not sure if my question makes much sense to guys with stable connection. Question: Suppose that I am checking GMail when the connection gets cut off. Then, if I unknowi... | TITLE:
GMail like try-again behaviour for my website
QUESTION:
Disclaimer: I am living at some place where my net connection gets cut off at least ten times a day. I am not sure if my question makes much sense to guys with stable connection. Question: Suppose that I am checking GMail when the connection gets cut off. ... | [
"javascript",
"ajax",
"language-agnostic"
] | 2 | 4 | 237 | 2 | 0 | 2011-06-06T20:30:42.797000 | 2011-06-06T20:34:17.517000 |
6,257,689 | 6,257,762 | How to form a C++ string from concatenations of string literals? | I would like concatenate string literals and ints, like this: string message("That value should be between " + MIN_VALUE + " and " + MAX_VALUE); But that gives me this error: error: invalid operands of types ‘const char*’ and ‘const char [6]’ to binary ‘operator+’| What is the correct way to do that? I could split that... | You should probably use stringstream for this. #include std::stringstream s; s << "This value shoud be between " << MIN_VALUE << " and " << MAX_VALUE; message = s.str(); | How to form a C++ string from concatenations of string literals? I would like concatenate string literals and ints, like this: string message("That value should be between " + MIN_VALUE + " and " + MAX_VALUE); But that gives me this error: error: invalid operands of types ‘const char*’ and ‘const char [6]’ to binary ‘o... | TITLE:
How to form a C++ string from concatenations of string literals?
QUESTION:
I would like concatenate string literals and ints, like this: string message("That value should be between " + MIN_VALUE + " and " + MAX_VALUE); But that gives me this error: error: invalid operands of types ‘const char*’ and ‘const char... | [
"c++",
"string",
"concatenation",
"literals",
"string-concatenation"
] | 2 | 6 | 1,616 | 5 | 0 | 2011-06-06T20:30:50.090000 | 2011-06-06T20:38:21.153000 |
6,257,692 | 6,258,569 | RDBMS vs file system for file storage | Are there any advantages of storing entire files in an RDBMS over storing the files in the file system with references to the file path in the RDBMS? Which approach shall be faster? When do I choose one over the other? Does it matter which file system is in use? (say ext3) I do not expect the files to change at all. Th... | Given that the files are not expected to change, there is limited value in keeping the files in the DBMS. The primary advantage of keeping files in the DBMS is that the DBMS knows how to manage transactions, but if the files won't change, then that advantage becomes minuscule. Another advantage of storing files in the ... | RDBMS vs file system for file storage Are there any advantages of storing entire files in an RDBMS over storing the files in the file system with references to the file path in the RDBMS? Which approach shall be faster? When do I choose one over the other? Does it matter which file system is in use? (say ext3) I do not... | TITLE:
RDBMS vs file system for file storage
QUESTION:
Are there any advantages of storing entire files in an RDBMS over storing the files in the file system with references to the file path in the RDBMS? Which approach shall be faster? When do I choose one over the other? Does it matter which file system is in use? (... | [
"filesystems",
"rdbms",
"data-storage"
] | 1 | 2 | 3,712 | 3 | 0 | 2011-06-06T20:31:22.723000 | 2011-06-06T22:05:20.333000 |
6,257,693 | 6,257,848 | Make an image invisible to Search Engines and Facebook? | When I try to add a link of Facebook, it reads every image as a thumbnail and I do not want that. Is there anyway I can remove that feature of the image, because if it reads it via Facebook, then Search Engines will be able to index the image. Any idea without having to make a specific class in the css that uses the ba... | You can also use.htaccess to do that. RewriteEngine on RewriteCond %{HTTP_REFERER}!^$ RewriteCond %{HTTP_REFERER}!^http://(www\.)?yourdomain\.com [NC] RewriteRule \.jpg$ http://some-image-location [NC,L] #RewriteRule \.jpg$ - [NC,L] # this will result in failed request if you put this in the root folder, then all *.jpg... | Make an image invisible to Search Engines and Facebook? When I try to add a link of Facebook, it reads every image as a thumbnail and I do not want that. Is there anyway I can remove that feature of the image, because if it reads it via Facebook, then Search Engines will be able to index the image. Any idea without hav... | TITLE:
Make an image invisible to Search Engines and Facebook?
QUESTION:
When I try to add a link of Facebook, it reads every image as a thumbnail and I do not want that. Is there anyway I can remove that feature of the image, because if it reads it via Facebook, then Search Engines will be able to index the image. An... | [
"css",
"image",
"facebook",
"xhtml",
"search-engine"
] | 0 | 2 | 438 | 3 | 0 | 2011-06-06T20:31:29.570000 | 2011-06-06T20:46:42.520000 |
6,257,697 | 6,258,375 | GWT telephone number masking | Does anyone know how to go about creating field that would perform telephone number format masking, like here (___) ___-____: http://www.smartclient.com/smartgwt/showcase/#form_masking | A better approach would be to let the user type whatever they want: "789-555-1234" or "(789) 555-1234" or "7895551234" and then when the field loses focus decide if what they typed can be a phone number. If so you can reformat it as "(789) 555-1234". There are several related questions about how to do that sort of thin... | GWT telephone number masking Does anyone know how to go about creating field that would perform telephone number format masking, like here (___) ___-____: http://www.smartclient.com/smartgwt/showcase/#form_masking | TITLE:
GWT telephone number masking
QUESTION:
Does anyone know how to go about creating field that would perform telephone number format masking, like here (___) ___-____: http://www.smartclient.com/smartgwt/showcase/#form_masking
ANSWER:
A better approach would be to let the user type whatever they want: "789-555-12... | [
"java",
"gwt",
"phone-number"
] | 4 | 9 | 6,492 | 2 | 0 | 2011-06-06T20:31:46.853000 | 2011-06-06T21:42:41.463000 |
6,257,703 | 6,258,318 | Problems serializing types for a .NET WCF Service: Service WSDL defines empty types in XSD | I am writing a web service using WCF. I created data contracts. I created my service contract (interface). I defined methods (whose parameters are typed as for the data contracts). I implemented the service contract creating a service class. I hosted my service using a svc file and IIS. I tried my service, looked for h... | You defined the class BrowseResponse as a [MessageContract], in addition to [DataContract]. Based on what you're saying, it seems like [MessageContract] takes precedence (which makes sense - [MC] defines the SOAP envelope for the message, which can contain members, and those members can be data contracts. Members of me... | Problems serializing types for a .NET WCF Service: Service WSDL defines empty types in XSD I am writing a web service using WCF. I created data contracts. I created my service contract (interface). I defined methods (whose parameters are typed as for the data contracts). I implemented the service contract creating a se... | TITLE:
Problems serializing types for a .NET WCF Service: Service WSDL defines empty types in XSD
QUESTION:
I am writing a web service using WCF. I created data contracts. I created my service contract (interface). I defined methods (whose parameters are typed as for the data contracts). I implemented the service cont... | [
"c#",
".net",
"wcf",
"web-services",
"serialization"
] | 5 | 4 | 3,308 | 2 | 0 | 2011-06-06T20:32:23.640000 | 2011-06-06T21:37:23.490000 |
6,257,735 | 6,257,991 | iPhone multi-touch coordinates | I am making an iphone app that uses two fingers to place and scale a platform. I need to find the x & y coordinates of BOTH of these touches. How would I go about this. thanks you | You should go through Gesture Recognizers. Gesture Recognizers are a better approach to touchesBegan: and its siblings if you are developing for iOS 3.2 and later. For the purpose of scaling, you can look at UIPinchGestureRecognizer. Also, remember to enable multitouch by setting the view's multipleTouchEnabled to YES. | iPhone multi-touch coordinates I am making an iphone app that uses two fingers to place and scale a platform. I need to find the x & y coordinates of BOTH of these touches. How would I go about this. thanks you | TITLE:
iPhone multi-touch coordinates
QUESTION:
I am making an iphone app that uses two fingers to place and scale a platform. I need to find the x & y coordinates of BOTH of these touches. How would I go about this. thanks you
ANSWER:
You should go through Gesture Recognizers. Gesture Recognizers are a better approa... | [
"iphone",
"multi-touch"
] | 0 | 1 | 242 | 2 | 0 | 2011-06-06T20:34:18.023000 | 2011-06-06T21:02:58.463000 |
6,257,736 | 6,257,790 | Codeigniter passing data from controller to view | As per here I've got the following controller: class User extends CI_Controller { public function Login() { //$data->RedirectUrl = $this->input->get_post('ReturnTo'); $data = array( 'title' => 'My Title', 'heading' => 'My Heading', 'message' => 'My Message' ); $this->load->view('User_Login', $data); }
//More... } and ... | Ah, the $data array's keys are converted into variables: try var_dump($title); for example. EDIT: this is done using extract. | Codeigniter passing data from controller to view As per here I've got the following controller: class User extends CI_Controller { public function Login() { //$data->RedirectUrl = $this->input->get_post('ReturnTo'); $data = array( 'title' => 'My Title', 'heading' => 'My Heading', 'message' => 'My Message' ); $this->loa... | TITLE:
Codeigniter passing data from controller to view
QUESTION:
As per here I've got the following controller: class User extends CI_Controller { public function Login() { //$data->RedirectUrl = $this->input->get_post('ReturnTo'); $data = array( 'title' => 'My Title', 'heading' => 'My Heading', 'message' => 'My Mess... | [
"php",
"codeigniter",
"view"
] | 9 | 10 | 35,986 | 7 | 0 | 2011-06-06T20:34:34.760000 | 2011-06-06T20:41:13.583000 |
6,257,738 | 6,258,003 | I need help with this regex pattern | Hi I have a problem with my regex pattern: preg_match_all('/!!\d{3}/', '!!333!!333!!333 test', $result); I want this to match!!333 but not!!333!333. How can I modify this regex to match only a max length of 5 characters - two! and three numbers. | I find the easiest and most descriptive way to do this is with negative lookaheads and lookbehinds. See: preg_match_all('/(? This says: match anything of the form!![0-9][0-9][0-9] which doesn't have anything other than a space in front or behind it. Note that these lookaheads/lookbehinds aren't matched themselves, they... | I need help with this regex pattern Hi I have a problem with my regex pattern: preg_match_all('/!!\d{3}/', '!!333!!333!!333 test', $result); I want this to match!!333 but not!!333!333. How can I modify this regex to match only a max length of 5 characters - two! and three numbers. | TITLE:
I need help with this regex pattern
QUESTION:
Hi I have a problem with my regex pattern: preg_match_all('/!!\d{3}/', '!!333!!333!!333 test', $result); I want this to match!!333 but not!!333!333. How can I modify this regex to match only a max length of 5 characters - two! and three numbers.
ANSWER:
I find the ... | [
"php",
"regex",
"string"
] | 1 | 0 | 89 | 3 | 0 | 2011-06-06T20:34:49.723000 | 2011-06-06T21:03:53.480000 |
6,257,741 | 6,264,692 | How can I make Plone display events during DST with the correct time? | I'm writing a Plone product that takes iCalendar, pulls it in, and creates Plone Event types. I've got it all working perfectly, except that, for half of the year's dates, the timestamps are off by an hour. My iCalendar feed is passing these as UTC timestamps: DTSTART;VALUE=DATE:20110812T130000Z should be 9am in the Am... | Try Time Zone Converter. You are experimenting daylight saving time. This arises when you change the date. Check one of the supposedly wrong dates: DTSTART;VALUE=DATE:20111225T175525Z should be 1:55pm, but it's showing as 12:55pm and read the legend: Daylight Saving Time is not in effect on this date/time in GMT Daylig... | How can I make Plone display events during DST with the correct time? I'm writing a Plone product that takes iCalendar, pulls it in, and creates Plone Event types. I've got it all working perfectly, except that, for half of the year's dates, the timestamps are off by an hour. My iCalendar feed is passing these as UTC t... | TITLE:
How can I make Plone display events during DST with the correct time?
QUESTION:
I'm writing a Plone product that takes iCalendar, pulls it in, and creates Plone Event types. I've got it all working perfectly, except that, for half of the year's dates, the timestamps are off by an hour. My iCalendar feed is pass... | [
"python",
"plone",
"icalendar",
"zope",
"dst"
] | 2 | 2 | 281 | 1 | 0 | 2011-06-06T20:35:04.797000 | 2011-06-07T11:46:02.107000 |
6,257,749 | 6,258,416 | How to pull data from sub-array, and combine | I do a database call to list all the "categories" that belong to a user. This returns to me an array, with sub-arrays with specific data on each category. How do I pick out the category IDs from these, and combine them to form a new query that grabs all the posts in these categories? Tables: "assignments" and "classes"... | You don't really have to do that (get the classids in PHP and then send another query). You could simply use the query you have with something like: SELECT assignments.assignmentid, assignments.classid, assignments.otherfield FROM assignments WHERE assignments.classid IN ( SELECT classid, classinfo FROM classes WHERE u... | How to pull data from sub-array, and combine I do a database call to list all the "categories" that belong to a user. This returns to me an array, with sub-arrays with specific data on each category. How do I pick out the category IDs from these, and combine them to form a new query that grabs all the posts in these ca... | TITLE:
How to pull data from sub-array, and combine
QUESTION:
I do a database call to list all the "categories" that belong to a user. This returns to me an array, with sub-arrays with specific data on each category. How do I pick out the category IDs from these, and combine them to form a new query that grabs all the... | [
"php",
"mysql"
] | 0 | 1 | 666 | 2 | 0 | 2011-06-06T20:36:14.787000 | 2011-06-06T21:47:42.167000 |
6,257,754 | 6,257,904 | How can I search for a value in an array and delete just one of those values if 2 or more is found? | I have an array var aos = ["a","a","a","b","b","c","d","d"]; I want to know if I can remove just 1 item if it finds 2 or more of the same value in the array. So for instance if it finds "a", "a" it will remove one of those "a" This is my current code: var intDennis = 1; for (var i = 0; i < aos.length; i++) { while (aos... | Edited after better understanding of OP use-case. Updated solution and fiddle test to incorporate suggestion from pst in comments. (Not for nothing, but this method does not require the original array be sorted.) Try this... var elements = []; var temp = {}; for (i=0; i Fiddle Test | How can I search for a value in an array and delete just one of those values if 2 or more is found? I have an array var aos = ["a","a","a","b","b","c","d","d"]; I want to know if I can remove just 1 item if it finds 2 or more of the same value in the array. So for instance if it finds "a", "a" it will remove one of tho... | TITLE:
How can I search for a value in an array and delete just one of those values if 2 or more is found?
QUESTION:
I have an array var aos = ["a","a","a","b","b","c","d","d"]; I want to know if I can remove just 1 item if it finds 2 or more of the same value in the array. So for instance if it finds "a", "a" it will... | [
"javascript",
"arrays",
"sorting"
] | 2 | 2 | 108 | 6 | 0 | 2011-06-06T20:36:36.683000 | 2011-06-06T20:52:24.417000 |
6,257,759 | 6,257,840 | Online music application design question on php and mysql | I was thinking of using mvc pattern while designing this app. How can I use mvc here? The model will be stored in mysql but what will be the controller and what will be the view here? | Firstly: model won't be stored in MySQL database - the data will, and model!= database [sometimes it is very related, but it is not equal overall]. Your controllers will probably handle such things like: login logout register select album select song The view would be HTML page, but probably also some external app or e... | Online music application design question on php and mysql I was thinking of using mvc pattern while designing this app. How can I use mvc here? The model will be stored in mysql but what will be the controller and what will be the view here? | TITLE:
Online music application design question on php and mysql
QUESTION:
I was thinking of using mvc pattern while designing this app. How can I use mvc here? The model will be stored in mysql but what will be the controller and what will be the view here?
ANSWER:
Firstly: model won't be stored in MySQL database - ... | [
"php",
"mysql"
] | 1 | 1 | 227 | 4 | 0 | 2011-06-06T20:37:12.470000 | 2011-06-06T20:45:56.747000 |
6,257,768 | 6,257,842 | Ajax patterns - assume success or wait for response | Typically an ajax interaction would involve sending the request, providing feedback to the user that the request is in process, then once the response arrives handle it. Waiting for the response is obviously unavoidable when the next action requires the data sent from the server but what if the interaction is an update... | You probably want to take a look at the command pattern http://en.wikipedia.org/wiki/Command_pattern. It looks like you want to modify some data and assume that the server gets modified as well. If the AJAX handler fails than you can rollback the command (and notify the user). | Ajax patterns - assume success or wait for response Typically an ajax interaction would involve sending the request, providing feedback to the user that the request is in process, then once the response arrives handle it. Waiting for the response is obviously unavoidable when the next action requires the data sent from... | TITLE:
Ajax patterns - assume success or wait for response
QUESTION:
Typically an ajax interaction would involve sending the request, providing feedback to the user that the request is in process, then once the response arrives handle it. Waiting for the response is obviously unavoidable when the next action requires ... | [
"javascript",
"ajax"
] | 1 | 1 | 368 | 2 | 0 | 2011-06-06T20:38:53.880000 | 2011-06-06T20:46:18.727000 |
6,257,770 | 6,257,961 | Android: OOP | Using functions in other files | I'm pretty new to Android but I have some experience (and a bit rusty with) Java and OOP. Basically what my app does is when you press a button, led's or "images" will flash. I'm trying to divide up my project into multiple files where I can just import a java file to use the class's functions but I'm unsure on how to ... | You can do the following from your HelloFormStuff class. led_functions led = new led_functions(); led.led_circleBusy(); Then get rid of the @Override from above the led_circleBusy() method. You shouldn't really be calling other Activity's methods like that though. Is led_functions really an Activity/UI class? If not, r... | Android: OOP | Using functions in other files I'm pretty new to Android but I have some experience (and a bit rusty with) Java and OOP. Basically what my app does is when you press a button, led's or "images" will flash. I'm trying to divide up my project into multiple files where I can just import a java file to use t... | TITLE:
Android: OOP | Using functions in other files
QUESTION:
I'm pretty new to Android but I have some experience (and a bit rusty with) Java and OOP. Basically what my app does is when you press a button, led's or "images" will flash. I'm trying to divide up my project into multiple files where I can just import a ... | [
"java",
"android",
"oop"
] | 1 | 1 | 1,383 | 5 | 0 | 2011-06-06T20:39:02.063000 | 2011-06-06T20:59:12.513000 |
6,257,774 | 6,257,833 | Getting the results of a method to be placed into another .m file | This may sound easy, but please, I am a newbie. I have a simple program that I need help resolving this issue. I would like to get the results in a method and place it into another.m file. Here is what I have: CheckRecognizer.m.... -(int)good {
if (fieldGoal == NO && fieldGoalPosition == 0) { return 0; }
else if (fie... | You've declared your method as an instance method, but called it as a class method. You need to instantiate an instance: CheckRecognizer *recognizer = [CheckRecognizer alloc] init]; And then use it: int result = [recognizer good]; You should also come up with a better method name than "good." | Getting the results of a method to be placed into another .m file This may sound easy, but please, I am a newbie. I have a simple program that I need help resolving this issue. I would like to get the results in a method and place it into another.m file. Here is what I have: CheckRecognizer.m.... -(int)good {
if (fiel... | TITLE:
Getting the results of a method to be placed into another .m file
QUESTION:
This may sound easy, but please, I am a newbie. I have a simple program that I need help resolving this issue. I would like to get the results in a method and place it into another.m file. Here is what I have: CheckRecognizer.m.... -(in... | [
"objective-c",
"methods",
"int"
] | 0 | 0 | 56 | 3 | 0 | 2011-06-06T20:39:27.623000 | 2011-06-06T20:45:13.927000 |
6,257,784 | 6,257,861 | Java Font Size vs HTML Font Size | I am writing text on an image. I am using DrawString(x,y,string) method and I set font size as below Font font = new Font(fontName, fontWeight, fontSize); As you can see left side text written on image with 12pt size. Right side you can see 12pt size in HTML. Is there any way to map this so that I get same size in outp... | I found this link. Maybe useful. Try it out. Basically it says that Java assumes 72 dpi screen resolution Windows uses 96 dpi or 120 dpi depending on your font size setting in the display properties. The site suggests instead of using getNormalizingTransform() you have to use getScreenResolution() From the website agai... | Java Font Size vs HTML Font Size I am writing text on an image. I am using DrawString(x,y,string) method and I set font size as below Font font = new Font(fontName, fontWeight, fontSize); As you can see left side text written on image with 12pt size. Right side you can see 12pt size in HTML. Is there any way to map thi... | TITLE:
Java Font Size vs HTML Font Size
QUESTION:
I am writing text on an image. I am using DrawString(x,y,string) method and I set font size as below Font font = new Font(fontName, fontWeight, fontSize); As you can see left side text written on image with 12pt size. Right side you can see 12pt size in HTML. Is there ... | [
"java",
"graphics"
] | 8 | 6 | 3,079 | 2 | 0 | 2011-06-06T20:40:53.483000 | 2011-06-06T20:47:58.310000 |
6,257,800 | 6,258,024 | incremental output with subprocess.PIPE | I am using subprocess module for running commands from another app I know that you are able to do the following import subprocess
app = subprocess(args, stdout=subprocess.PIPE) out, err = app.communicate() print out I would like the output to be displayed as it happening as supposed to one big blob at the end. Ideas? | The problem may be that the command you are running in the subprocess buffers its output: in which case, in Blender's answer, the process.stdout.read(1) would not return until the output buffer of the subprocess filled up, causing it to be flushed, and thus seen by the parent process. See this answer and this one for m... | incremental output with subprocess.PIPE I am using subprocess module for running commands from another app I know that you are able to do the following import subprocess
app = subprocess(args, stdout=subprocess.PIPE) out, err = app.communicate() print out I would like the output to be displayed as it happening as supp... | TITLE:
incremental output with subprocess.PIPE
QUESTION:
I am using subprocess module for running commands from another app I know that you are able to do the following import subprocess
app = subprocess(args, stdout=subprocess.PIPE) out, err = app.communicate() print out I would like the output to be displayed as it... | [
"python",
"subprocess",
"stdout"
] | 2 | 7 | 2,580 | 2 | 0 | 2011-06-06T20:42:21.127000 | 2011-06-06T21:05:13.720000 |
6,257,807 | 6,259,317 | What's happening in the background of a unsigned char to integer type cast? | I was getting some odd behaviour out of a switch block today, specifically I was reading a byte from a file and comparing it against certain hex values (text file encoding issue, no big deal). The code looked something like: char BOM[3] = {0}; b_error = ReadFile (iNCfile, BOM, 3, &lpNumberOfBytesRead, NULL);
switch ( ... | "Can someone briefly explain what was going on in the char -> int promotion that produced 0xffffffef instead of 0x000000ef?" Contrary to the four answers so far, it didn't. Rather, you had a negative char value, which as a switch condition was promoted to the same negative int value as required by C++98 §6.4.2/2 Integr... | What's happening in the background of a unsigned char to integer type cast? I was getting some odd behaviour out of a switch block today, specifically I was reading a byte from a file and comparing it against certain hex values (text file encoding issue, no big deal). The code looked something like: char BOM[3] = {0}; ... | TITLE:
What's happening in the background of a unsigned char to integer type cast?
QUESTION:
I was getting some odd behaviour out of a switch block today, specifically I was reading a byte from a file and comparing it against certain hex values (text file encoding issue, no big deal). The code looked something like: c... | [
"c++",
"binary",
"casting",
"implicit-conversion"
] | 2 | 1 | 449 | 5 | 0 | 2011-06-06T20:43:01.280000 | 2011-06-06T23:51:57.213000 |
6,257,809 | 6,257,854 | UIActivityIndicatorView always crashes | My UIActivityIndicatorView always crashes my app. When I press my download button, the indicator shows and starts spinning. But when I stop it, I just have to touch the screen somewhere and my app crashes..h @interface DownloadViewController: UIViewController < FinishedParsing, NSFetchedResultsControllerDelegate > { UI... | Instead or autoreleasing it, take control of it and release it manually by calling self.indicated = nil after you're done with it and release it in dealloc. That way, you're sure it won't vanish without warnings... | UIActivityIndicatorView always crashes My UIActivityIndicatorView always crashes my app. When I press my download button, the indicator shows and starts spinning. But when I stop it, I just have to touch the screen somewhere and my app crashes..h @interface DownloadViewController: UIViewController < FinishedParsing, NS... | TITLE:
UIActivityIndicatorView always crashes
QUESTION:
My UIActivityIndicatorView always crashes my app. When I press my download button, the indicator shows and starts spinning. But when I stop it, I just have to touch the screen somewhere and my app crashes..h @interface DownloadViewController: UIViewController < F... | [
"iphone",
"xcode",
"uiactivityindicatorview"
] | 0 | 3 | 1,803 | 2 | 0 | 2011-06-06T20:43:10.690000 | 2011-06-06T20:47:15.530000 |
6,257,812 | 6,257,907 | How to parse <media:content> in RSS using AS3? | Am trying to parse the RSS feed from www.ted.com/talks/rss, I can access all normal tags using E4X but I have no idea how one parses the tags! For example the This is my code and I can traverse easily but I want to pull the media:content tags. private function init(e:Event = null):void { removeEventListener(Event.ADDED... | Sounds like your using MRSS specifications. You want to look into QName to access qualifying namespaces http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/QName.html | How to parse <media:content> in RSS using AS3? Am trying to parse the RSS feed from www.ted.com/talks/rss, I can access all normal tags using E4X but I have no idea how one parses the tags! For example the This is my code and I can traverse easily but I want to pull the media:content tags. private function init(e:Event... | TITLE:
How to parse <media:content> in RSS using AS3?
QUESTION:
Am trying to parse the RSS feed from www.ted.com/talks/rss, I can access all normal tags using E4X but I have no idea how one parses the tags! For example the This is my code and I can traverse easily but I want to pull the media:content tags. private fun... | [
"actionscript-3"
] | 0 | 1 | 611 | 1 | 0 | 2011-06-06T20:43:28.123000 | 2011-06-06T20:53:03.253000 |
6,257,818 | 6,257,852 | Using PHP's substr() with special characters at the end results in question marks | When I use the substr() function in PHP, I get an question mark (a square with a question mark - depending on the browser) at the end of the string when this last character was a special one, like ë or ö, etc... $introtext = html_entity_decode($item->description, ENT_QUOTES, "UTF-8"); $introtext = substr($introtext, 0,... | If your string has multibyte encoding (like UTF-8) does, you should use mb_substr to avoid problems like this: $introtext=mb_substr($introtext,0,200); | Using PHP's substr() with special characters at the end results in question marks When I use the substr() function in PHP, I get an question mark (a square with a question mark - depending on the browser) at the end of the string when this last character was a special one, like ë or ö, etc... $introtext = html_entity_d... | TITLE:
Using PHP's substr() with special characters at the end results in question marks
QUESTION:
When I use the substr() function in PHP, I get an question mark (a square with a question mark - depending on the browser) at the end of the string when this last character was a special one, like ë or ö, etc... $introte... | [
"php",
"substr"
] | 29 | 73 | 17,909 | 7 | 0 | 2011-06-06T20:43:48.207000 | 2011-06-06T20:47:00.203000 |
6,257,825 | 6,257,960 | Background image in linear layout is not well sized | I made a linear layout with a background image, a png... I don't know how to show it into the layout ( and centered ) keeping proportions... here is the code Obviously image has the same height and width of the display... Any help?? Thanks in advance =.4.S.= | Try this related question/answer: Android: Scale a Drawable or background image? I haven't tried it, but it sounds similar to what you're talking about. | Background image in linear layout is not well sized I made a linear layout with a background image, a png... I don't know how to show it into the layout ( and centered ) keeping proportions... here is the code Obviously image has the same height and width of the display... Any help?? Thanks in advance =.4.S.= | TITLE:
Background image in linear layout is not well sized
QUESTION:
I made a linear layout with a background image, a png... I don't know how to show it into the layout ( and centered ) keeping proportions... here is the code Obviously image has the same height and width of the display... Any help?? Thanks in advance... | [
"android",
"android-layout"
] | 4 | 0 | 10,184 | 3 | 0 | 2011-06-06T20:44:17.630000 | 2011-06-06T20:58:46.647000 |
6,257,826 | 6,258,061 | Reading CSV file into Dataset WITHOUT headers | I have a small problem with the following code. The code works fine if I don't include HDR=NO. The CSV that will be used for this WEB app will not have any header info. How can I read it into a dataset and create static column names? I get this error when running the code below: Could not find installable ISAM. Here is... | Try Extended Properties=Text; HDR=NO; change to Extended Properties=""text;HDR=No"" or Extended Properties=\"text;HDR=No\". This error is generated when the syntax of the connection string is incorrect. This commonly occurs when using multiple Extended Properties parameters. | Reading CSV file into Dataset WITHOUT headers I have a small problem with the following code. The code works fine if I don't include HDR=NO. The CSV that will be used for this WEB app will not have any header info. How can I read it into a dataset and create static column names? I get this error when running the code b... | TITLE:
Reading CSV file into Dataset WITHOUT headers
QUESTION:
I have a small problem with the following code. The code works fine if I don't include HDR=NO. The CSV that will be used for this WEB app will not have any header info. How can I read it into a dataset and create static column names? I get this error when ... | [
"c#",
"asp.net",
"csv"
] | 3 | 2 | 4,237 | 1 | 0 | 2011-06-06T20:44:23.590000 | 2011-06-06T21:10:12.440000 |
6,257,829 | 6,258,086 | AJAX, Join Table and Complex Query | I have two MySQL tables named 'nodes' and 'joinTable' like shown below. I need to make an AJAX/jQuery?/MySQL call based on one node ID (in first table) that returns the following and pushes or places data into two JavaScript arrays and some variables: returns 'type' and 'text' from Node table. These will be placed in a... | You'll need to start off by choosing a server-side language like PHP to query your database and send back a JSON response to the client. On the other end, use a javascript framework like jQuery to make an ajax call to said PHP script on the server from your javascript code: // Get your nodeId from the user var id = 2;
... | AJAX, Join Table and Complex Query I have two MySQL tables named 'nodes' and 'joinTable' like shown below. I need to make an AJAX/jQuery?/MySQL call based on one node ID (in first table) that returns the following and pushes or places data into two JavaScript arrays and some variables: returns 'type' and 'text' from No... | TITLE:
AJAX, Join Table and Complex Query
QUESTION:
I have two MySQL tables named 'nodes' and 'joinTable' like shown below. I need to make an AJAX/jQuery?/MySQL call based on one node ID (in first table) that returns the following and pushes or places data into two JavaScript arrays and some variables: returns 'type' ... | [
"jquery",
"mysql",
"ajax"
] | 1 | 1 | 2,153 | 1 | 0 | 2011-06-06T20:45:00.597000 | 2011-06-06T21:13:20.487000 |
6,257,831 | 6,258,365 | calling a PageMethod with params object[] args from jQuery | Is there a way to call a Page Method in jQuery when the page method has a "params" argument type (in C#)? I can call Page Methods all day long using jQuery if I specify the arguments one at a time, but if I put them as "params object[] args" it throws an error about not finding the "args" parameter. I am trying to call... | Just double-check your JavaScript. It's more likely the culprit than a problem with your C#, as the significance of the params reserved word is non-existant. The argument is still ultimately an array of strings, which is nothing special to JSON. I've just built a quick test page which resulted in absolutely no problems... | calling a PageMethod with params object[] args from jQuery Is there a way to call a Page Method in jQuery when the page method has a "params" argument type (in C#)? I can call Page Methods all day long using jQuery if I specify the arguments one at a time, but if I put them as "params object[] args" it throws an error ... | TITLE:
calling a PageMethod with params object[] args from jQuery
QUESTION:
Is there a way to call a Page Method in jQuery when the page method has a "params" argument type (in C#)? I can call Page Methods all day long using jQuery if I specify the arguments one at a time, but if I put them as "params object[] args" i... | [
"c#",
"jquery",
"ajax",
"pagemethods"
] | 2 | 3 | 1,516 | 1 | 0 | 2011-06-06T20:45:08.763000 | 2011-06-06T21:41:28.750000 |
6,257,837 | 6,257,909 | Converting AJAX return data to JSON | I am trying to retrieve data in a JSON object (which I have validated is correctly formatted) and output the data into the firebug console. I validated the JSON using JSONLint (http://jsonlint.com/) and know the data is not returning in JSON object because when I log it, it is logging as text rather than an object. Whe... | Explicitly instruct jQuery to treat the response as text: $.ajax({ //... dataType: "text", //... }); You will then be able to get the JSON string. However, if you plan to convert it to a JS value thereafter, let me stop you: jQuery can do that for you automatically. If you specify the dataType to "json", or just let jQ... | Converting AJAX return data to JSON I am trying to retrieve data in a JSON object (which I have validated is correctly formatted) and output the data into the firebug console. I validated the JSON using JSONLint (http://jsonlint.com/) and know the data is not returning in JSON object because when I log it, it is loggin... | TITLE:
Converting AJAX return data to JSON
QUESTION:
I am trying to retrieve data in a JSON object (which I have validated is correctly formatted) and output the data into the firebug console. I validated the JSON using JSONLint (http://jsonlint.com/) and know the data is not returning in JSON object because when I lo... | [
"jquery",
"ajax",
"json",
"uncaught-exception"
] | 3 | 2 | 37,535 | 2 | 0 | 2011-06-06T20:45:26.787000 | 2011-06-06T20:53:28.987000 |
6,257,839 | 6,258,059 | Need to make a TextView appear next to an EditBox in the same row of a TableLayout | I have scoured the forums and Google trying to figure out what I am doing wrong here. I want a TextView to appear before an EditText on the same row. I tried doing this with a TableLayout, but the result is the EditText gets pushed off the screen in portrait orientation and you can barely see it in landscape orientatio... | If the text in your TextView is too wide, it will push the EditText off the screen. You can force the TextView and the EditText to split the available width equally using layout_weight, like this: You can probably get better control using a RelativeLayout. | Need to make a TextView appear next to an EditBox in the same row of a TableLayout I have scoured the forums and Google trying to figure out what I am doing wrong here. I want a TextView to appear before an EditText on the same row. I tried doing this with a TableLayout, but the result is the EditText gets pushed off t... | TITLE:
Need to make a TextView appear next to an EditBox in the same row of a TableLayout
QUESTION:
I have scoured the forums and Google trying to figure out what I am doing wrong here. I want a TextView to appear before an EditText on the same row. I tried doing this with a TableLayout, but the result is the EditText... | [
"android",
"textview",
"android-edittext",
"tablelayout"
] | 0 | 0 | 283 | 2 | 0 | 2011-06-06T20:45:51.973000 | 2011-06-06T21:09:38.467000 |
6,257,850 | 6,257,899 | C++ codebase rewrite from MFC to *nix | I'm interning in a company for the summer and I've to look at different ways of looking at the current codebase (C++,MFC, around 100K lines) and using state machines to model the current program. I've been reading a couple papers and CPP2XMi looks like it may be some use to try to build sequence diagrams as a start. Th... | The first thing I would look at is where do I use mfc and other non portable stuff. If the only place there is mfc is in the interface layer for example you then can isolate the work. If there is no such separation I would look at the fesablity of creating some sections of the code that are isolated and portable. Once ... | C++ codebase rewrite from MFC to *nix I'm interning in a company for the summer and I've to look at different ways of looking at the current codebase (C++,MFC, around 100K lines) and using state machines to model the current program. I've been reading a couple papers and CPP2XMi looks like it may be some use to try to ... | TITLE:
C++ codebase rewrite from MFC to *nix
QUESTION:
I'm interning in a company for the summer and I've to look at different ways of looking at the current codebase (C++,MFC, around 100K lines) and using state machines to model the current program. I've been reading a couple papers and CPP2XMi looks like it may be s... | [
"c++",
"linux",
"mfc"
] | 3 | 1 | 296 | 4 | 0 | 2011-06-06T20:46:54.587000 | 2011-06-06T20:52:09.420000 |
6,257,862 | 6,257,880 | what is front end recursion? | I have seen the term as opposed to tail end recursion and I was wondering what the difference between the two was. So basically What is Front End Recursion? | Front end recursion is when you make the recursive call first in the method, while tail end recursion is when you make the recursive call last in the method. Example of front end recursion: void Show(int num) { if (num > 0) { Show(num - 1); } Console.WriteLine(num); } Result of Show(3);: 0 1 2 3 Example of tail end rec... | what is front end recursion? I have seen the term as opposed to tail end recursion and I was wondering what the difference between the two was. So basically What is Front End Recursion? | TITLE:
what is front end recursion?
QUESTION:
I have seen the term as opposed to tail end recursion and I was wondering what the difference between the two was. So basically What is Front End Recursion?
ANSWER:
Front end recursion is when you make the recursive call first in the method, while tail end recursion is wh... | [
"recursion",
"tail-recursion"
] | 1 | 3 | 635 | 1 | 0 | 2011-06-06T20:48:01.207000 | 2011-06-06T20:49:56.120000 |
6,257,864 | 6,257,902 | Customize Expander to expand on mouse enter | I am using Expander in WPF to display my data. The default style for the Expander control contains a toggle button which shows/hides my content when I click on it. How can I modify the style so that it expands when I hovers the mouse over the header and collapse when I move away? | Barebone setup should be this: ( Applies to the whole expander, not just the header. That would probably require messing with the template. ) | Customize Expander to expand on mouse enter I am using Expander in WPF to display my data. The default style for the Expander control contains a toggle button which shows/hides my content when I click on it. How can I modify the style so that it expands when I hovers the mouse over the header and collapse when I move a... | TITLE:
Customize Expander to expand on mouse enter
QUESTION:
I am using Expander in WPF to display my data. The default style for the Expander control contains a toggle button which shows/hides my content when I click on it. How can I modify the style so that it expands when I hovers the mouse over the header and coll... | [
"wpf",
"mouse",
"expander",
"enter"
] | 3 | 7 | 3,726 | 2 | 0 | 2011-06-06T20:48:22.153000 | 2011-06-06T20:52:14.917000 |
6,257,867 | 6,265,688 | Delete a variable in boo | I know that the similarities between boo and Python are only superficial, but still, how can I do an equivalent of the following Python code in boo? a = 'a' del a a = 1 I've tried a = 'a' a = null System.GC.Collect() System.GC.WaitForPendingFinalizers() a = 1 But booish tells me it cannot convert 'int' to 'string'. The... | This is not possible in Boo. Boo uses implicit static-typing. Thus, all variables are strongly typed based on their first assignment within their scope. Once assigned, the type of the variable cannot change. Garbage collecting will ensure that objects on the heap which are no longer referenced will be removed from the ... | Delete a variable in boo I know that the similarities between boo and Python are only superficial, but still, how can I do an equivalent of the following Python code in boo? a = 'a' del a a = 1 I've tried a = 'a' a = null System.GC.Collect() System.GC.WaitForPendingFinalizers() a = 1 But booish tells me it cannot conve... | TITLE:
Delete a variable in boo
QUESTION:
I know that the similarities between boo and Python are only superficial, but still, how can I do an equivalent of the following Python code in boo? a = 'a' del a a = 1 I've tried a = 'a' a = null System.GC.Collect() System.GC.WaitForPendingFinalizers() a = 1 But booish tells ... | [
".net",
"python",
"garbage-collection",
"boo"
] | 4 | 3 | 269 | 2 | 0 | 2011-06-06T20:48:43.313000 | 2011-06-07T13:11:00.403000 |
6,257,868 | 6,268,406 | boost::interprocess::shared_memory_object::remove fails | I made some test and I was able to create and remove boost::interprocess::shared_memory_object in a C++/CLI executable without problems. In a C++/CLI dll plugin I'm only able to create the boost::interprocess::shared_memory_object but the removal fails. I verified that the file exists at the time of removal - it is pre... | During debugging I noticed that the file path that is to be removed inside boost::interprocess::shared_memory_object::remove is different from the file created by boost::interprocess::shared_memory_object constructor - the path to be removed points at the root of "boost_interprocess" folder while the actually created f... | boost::interprocess::shared_memory_object::remove fails I made some test and I was able to create and remove boost::interprocess::shared_memory_object in a C++/CLI executable without problems. In a C++/CLI dll plugin I'm only able to create the boost::interprocess::shared_memory_object but the removal fails. I verified... | TITLE:
boost::interprocess::shared_memory_object::remove fails
QUESTION:
I made some test and I was able to create and remove boost::interprocess::shared_memory_object in a C++/CLI executable without problems. In a C++/CLI dll plugin I'm only able to create the boost::interprocess::shared_memory_object but the removal... | [
"dll",
"boost",
"shared-memory",
"boost-interprocess"
] | 0 | 0 | 968 | 1 | 0 | 2011-06-06T20:48:48.450000 | 2011-06-07T16:19:53.657000 |
6,257,872 | 6,258,189 | RichFaces commandbutton onclick methods | I'm using a RichFaces commandbutton and I need it to execute two functions on click, one after the other. Right now, I have the code like so: If you look at the onclick portion, I need the Bean.setDesc to run first and then this.disabled=false. How would I go about doing this chronologically? Thanks | Here's a code stub to get you started. You'll want to use a4j:jsFunction if you are looking to grab values directly from the client and pass them to a server method with javascript. and the managed bean: @ManagedBean(name = "exampleBean") @SessionScoped public class ExampleBean implements Serializable {
private static... | RichFaces commandbutton onclick methods I'm using a RichFaces commandbutton and I need it to execute two functions on click, one after the other. Right now, I have the code like so: If you look at the onclick portion, I need the Bean.setDesc to run first and then this.disabled=false. How would I go about doing this chr... | TITLE:
RichFaces commandbutton onclick methods
QUESTION:
I'm using a RichFaces commandbutton and I need it to execute two functions on click, one after the other. Right now, I have the code like so: If you look at the onclick portion, I need the Bean.setDesc to run first and then this.disabled=false. How would I go ab... | [
"javascript",
"jsf",
"richfaces",
"ajax4jsf"
] | 1 | 2 | 7,899 | 1 | 0 | 2011-06-06T20:49:14.183000 | 2011-06-06T21:24:02.947000 |
6,257,876 | 6,258,630 | MPI Error: Out of Memory - What are some solution options | I am trying to resolve Fatal Error in MPI_Irecv: Aborting Job and received mixed (useful, however incomplete) responses to that query. The error message is the following: aborting job: > Fatal error in MPI_Irecv: Other MPI > error, error stack: MPI_Irecv(143): > MPI_Irecv(buf=0x8294a60, count=48, > MPI_DOUBLE, src=2, t... | You have a memory leak in your program; this: MPI_Isend(A, Rows, MPI_DOUBLE, my_rank+1, 0, MPI_COMM_WORLD, &request[1]); MPI_Irecv(AA, Rows, MPI_DOUBLE, my_rank+1, MPI_ANY_TAG, MPI_COMM_WORLD, &request[3]); MPI_Wait(&request[3], &status[3]) leaks resources associated with the MPI_Isend request. You call this Rows*Colum... | MPI Error: Out of Memory - What are some solution options I am trying to resolve Fatal Error in MPI_Irecv: Aborting Job and received mixed (useful, however incomplete) responses to that query. The error message is the following: aborting job: > Fatal error in MPI_Irecv: Other MPI > error, error stack: MPI_Irecv(143): >... | TITLE:
MPI Error: Out of Memory - What are some solution options
QUESTION:
I am trying to resolve Fatal Error in MPI_Irecv: Aborting Job and received mixed (useful, however incomplete) responses to that query. The error message is the following: aborting job: > Fatal error in MPI_Irecv: Other MPI > error, error stack:... | [
"c++",
"multicore",
"mpi",
"parallel-processing",
"shared-memory"
] | 2 | 6 | 4,719 | 2 | 0 | 2011-06-06T20:49:42.600000 | 2011-06-06T22:12:05.643000 |
6,257,879 | 6,257,903 | IF statement not working | sorry if i'm doing something monumentally stupid, but I can't get this IF statement working... What it does is that it checks certain values from a cookie, setting combo box defaults. Through debugging I can see that all the cookie variables are correct, however the IF statement does not seem to read the value? The fir... | All the if are same. the latter two are never reached.... else if(textCol == cookie1 && backCol == cookie2) element.value = "black,yellow,black,black,black"; else if(textCol == cookie1 && backCol == cookie2) element.value = "black,#87CEFA,black,black,black";... | IF statement not working sorry if i'm doing something monumentally stupid, but I can't get this IF statement working... What it does is that it checks certain values from a cookie, setting combo box defaults. Through debugging I can see that all the cookie variables are correct, however the IF statement does not seem t... | TITLE:
IF statement not working
QUESTION:
sorry if i'm doing something monumentally stupid, but I can't get this IF statement working... What it does is that it checks certain values from a cookie, setting combo box defaults. Through debugging I can see that all the cookie variables are correct, however the IF stateme... | [
"javascript",
"html"
] | 1 | 4 | 513 | 1 | 0 | 2011-06-06T20:49:54.863000 | 2011-06-06T20:52:22.087000 |
6,257,881 | 6,258,327 | CMS permalink and templating system how to? | I want to understand how to use templating system and permalinks on php websites:D!.. let me describe my self more, 1.currently i have 20 files each have its own php logic (index.php,wizard.php,search.php etc) ALL use same class's and includes.(install.php include all the required for all class's in my project abd u re... | If you are unsure whether you want to write your own, or use an existing one. It is going to be a quite possibly very rewarding experience but a very time consuming one to write your own. If you have a task at hand that you need to be solved, use an existing one. That being said there are plenty of templating systems, ... | CMS permalink and templating system how to? I want to understand how to use templating system and permalinks on php websites:D!.. let me describe my self more, 1.currently i have 20 files each have its own php logic (index.php,wizard.php,search.php etc) ALL use same class's and includes.(install.php include all the req... | TITLE:
CMS permalink and templating system how to?
QUESTION:
I want to understand how to use templating system and permalinks on php websites:D!.. let me describe my self more, 1.currently i have 20 files each have its own php logic (index.php,wizard.php,search.php etc) ALL use same class's and includes.(install.php i... | [
"php",
"mysql",
"content-management-system",
"templating"
] | 2 | 2 | 504 | 2 | 0 | 2011-06-06T20:50:13.777000 | 2011-06-06T21:38:03.040000 |
6,257,887 | 6,258,532 | OPENMP F90/95 Nested DO loops - problems getting improvement over serial implementation | I've done some searching but couldn't find anything that appeared to be related to my question (sorry if my question is redundant!). Anyway, as the title states, I'm having trouble getting any improvement over the serial implementation of my code. The code snippet that I need to parallelize is as follows (this is Fortr... | The obvious place to put the omp pragma is at the very outside loop. For every (l,m,n), you're calculating a convolution between your perturbed variables and an exponential smoother. Each (l,m,n) calculation is completely independant from the others, so you can put it on the outermost loop. So for instance the simplest... | OPENMP F90/95 Nested DO loops - problems getting improvement over serial implementation I've done some searching but couldn't find anything that appeared to be related to my question (sorry if my question is redundant!). Anyway, as the title states, I'm having trouble getting any improvement over the serial implementat... | TITLE:
OPENMP F90/95 Nested DO loops - problems getting improvement over serial implementation
QUESTION:
I've done some searching but couldn't find anything that appeared to be related to my question (sorry if my question is redundant!). Anyway, as the title states, I'm having trouble getting any improvement over the ... | [
"loops",
"fortran",
"openmp"
] | 3 | 3 | 4,796 | 2 | 0 | 2011-06-06T20:50:37.680000 | 2011-06-06T22:01:17.547000 |
6,257,888 | 6,260,296 | Image popup on mouseover of li without hyperlink? | I have a list and would like to have additional info (a graphic) pop up when someone mouses over the individual list items. I thought I'd found the answer online, but this method works only on hyperlinks within tags...and the problem is that I don't want to click through to the link...just have an image popup. No link.... | You can add a href (or some other named) attribute to your LI tags, then access the image's url like this (example using href attribute): $("li.preview").hover(function(e){ this.t = this.title; this.title = ""; var c = (this.t!= "")? " " + this.t: ""; var $li = $(this); $("body").append(" "+ c +" "); $("#preview").css(... | Image popup on mouseover of li without hyperlink? I have a list and would like to have additional info (a graphic) pop up when someone mouses over the individual list items. I thought I'd found the answer online, but this method works only on hyperlinks within tags...and the problem is that I don't want to click throug... | TITLE:
Image popup on mouseover of li without hyperlink?
QUESTION:
I have a list and would like to have additional info (a graphic) pop up when someone mouses over the individual list items. I thought I'd found the answer online, but this method works only on hyperlinks within tags...and the problem is that I don't wa... | [
"javascript",
"mouseover"
] | 0 | 0 | 1,167 | 1 | 0 | 2011-06-06T20:50:42.173000 | 2011-06-07T03:20:42.943000 |
6,257,897 | 6,257,947 | How to make tags randomly switch places? | I have several tags under one id, such as: A B C I would like them to randomly switch places on rollover. I thought perhaps with the Sortable jQuery effect? but not sure... any help would be appreciated. Thanks. | randomly? $('#myID').bind('mouseover', function(){ $('#myID li').sort(function(){ return Math.random() -.5; }).each( function(){ $('#myID').append(this); } ); }); | How to make tags randomly switch places? I have several tags under one id, such as: A B C I would like them to randomly switch places on rollover. I thought perhaps with the Sortable jQuery effect? but not sure... any help would be appreciated. Thanks. | TITLE:
How to make tags randomly switch places?
QUESTION:
I have several tags under one id, such as: A B C I would like them to randomly switch places on rollover. I thought perhaps with the Sortable jQuery effect? but not sure... any help would be appreciated. Thanks.
ANSWER:
randomly? $('#myID').bind('mouseover', f... | [
"jquery",
"random",
"jquery-ui-sortable"
] | 3 | 2 | 443 | 3 | 0 | 2011-06-06T20:51:42.750000 | 2011-06-06T20:56:17.643000 |
6,257,900 | 6,258,029 | Little help with XLinq | I have this XML: toto tata How I can get the nodes "element"?. I see on the web I can get them with: var elements = from element in xmlDoc.Descendants("element") select element; But "elements" is empty! EDIT 1: I'm loading the XDocument with this exact XML: toto tata | Ok well there's your problem, your names have to be qualified with the appropriate XML namespace. XNamespace ns = "http://schemas.microsoft.com/ado/2007/08/dataservices"; var elements = xmlDoc.Descendants(ns + "element"); | Little help with XLinq I have this XML: toto tata How I can get the nodes "element"?. I see on the web I can get them with: var elements = from element in xmlDoc.Descendants("element") select element; But "elements" is empty! EDIT 1: I'm loading the XDocument with this exact XML: toto tata | TITLE:
Little help with XLinq
QUESTION:
I have this XML: toto tata How I can get the nodes "element"?. I see on the web I can get them with: var elements = from element in xmlDoc.Descendants("element") select element; But "elements" is empty! EDIT 1: I'm loading the XDocument with this exact XML: toto tata
ANSWER:
Ok... | [
"c#",
"xml",
"linq",
"linq-to-xml"
] | 1 | 2 | 82 | 2 | 0 | 2011-06-06T20:52:09.693000 | 2011-06-06T21:05:38.410000 |
6,257,906 | 6,258,474 | What to use for logging errors in a Quartz scheduled Job? | I have an asp.net mvc 3 application. In this application I have a reminder system that uses quartz to grab messages from the database and send them out. I am wondering what is the best way to log if something happens(say the database times out - I want to know about this). I use in my mvc application ELMAH for my loggi... | You can try NLog. It's very simple to implement and effective. You can send email, trace pretty much everything. I normally tend to keep everything in a separate config file (NLog.Config) As you can see you can activate or deactivate the different levels. I've used it on in my quartz.net jobs as well as a debugging/tra... | What to use for logging errors in a Quartz scheduled Job? I have an asp.net mvc 3 application. In this application I have a reminder system that uses quartz to grab messages from the database and send them out. I am wondering what is the best way to log if something happens(say the database times out - I want to know a... | TITLE:
What to use for logging errors in a Quartz scheduled Job?
QUESTION:
I have an asp.net mvc 3 application. In this application I have a reminder system that uses quartz to grab messages from the database and send them out. I am wondering what is the best way to log if something happens(say the database times out ... | [
"error-handling",
"quartz-scheduler",
"elmah",
"quartz.net",
"error-logging"
] | 1 | 0 | 2,557 | 1 | 0 | 2011-06-06T20:52:56.427000 | 2011-06-06T21:53:31.230000 |
6,257,908 | 6,257,925 | what does native="true" stand for in a Qt designer form | I am doing a diff between 2 project versions and noticed that some of the ui files have extra attributes in the xml that I have not put there myself: where would native="true" come from? what would make it get added to the ui? | Qt GUIs can be displayed in many themes. native="true" forces the application to use the operating system's theme (on Linux, some QT apps look terrible because they don't look like the rest of the native apps). | what does native="true" stand for in a Qt designer form I am doing a diff between 2 project versions and noticed that some of the ui files have extra attributes in the xml that I have not put there myself: where would native="true" come from? what would make it get added to the ui? | TITLE:
what does native="true" stand for in a Qt designer form
QUESTION:
I am doing a diff between 2 project versions and noticed that some of the ui files have extra attributes in the xml that I have not put there myself: where would native="true" come from? what would make it get added to the ui?
ANSWER:
Qt GUIs ca... | [
"qt",
"qt4"
] | 13 | 5 | 1,805 | 1 | 0 | 2011-06-06T20:53:06.587000 | 2011-06-06T20:54:51.513000 |
6,257,923 | 6,257,997 | Modify query sql | I have a query to aggregate (compress) data from 1 min to any other time frame, and it works perfectly. Use StockDataFromSella; DECLARE @D1 DateTime DECLARE @D2 DateTime DECLARE @Interval FLOAT
SET @D1 = '2008-09-21T09:00:00.000' SET @D2 = '2010-10-20T17:30:00.000' SET @Interval = 15;WITH L0 AS (SELECT 1 AS c UNION AL... | The easiest way to get these values would be to use CONVERT. SQL Server has some built-in date formatting when you convert a Date. CONVERT(VARCHAR, MAX(CASE WHEN RN_ASC=1 THEN [DataOra] END), 103) AS DataOraDate, CONVERT(VARCHAR, MAX(CASE WHEN RN_ASC=1 THEN [DataOra] END), 114) AS DataOraTime, The two codes (103 and 11... | Modify query sql I have a query to aggregate (compress) data from 1 min to any other time frame, and it works perfectly. Use StockDataFromSella; DECLARE @D1 DateTime DECLARE @D2 DateTime DECLARE @Interval FLOAT
SET @D1 = '2008-09-21T09:00:00.000' SET @D2 = '2010-10-20T17:30:00.000' SET @Interval = 15;WITH L0 AS (SELEC... | TITLE:
Modify query sql
QUESTION:
I have a query to aggregate (compress) data from 1 min to any other time frame, and it works perfectly. Use StockDataFromSella; DECLARE @D1 DateTime DECLARE @D2 DateTime DECLARE @Interval FLOAT
SET @D1 = '2008-09-21T09:00:00.000' SET @D2 = '2010-10-20T17:30:00.000' SET @Interval = 15... | [
"sql-server-express",
"sql-server-2005-express"
] | 0 | 2 | 97 | 2 | 0 | 2011-06-06T20:54:41.010000 | 2011-06-06T21:03:20.930000 |
6,257,929 | 6,259,349 | Xcode incorrectly reporting missing files | I had some files that I removed from my project. They don't show up anywhere when I grep the directory for files or the text inside of the files in my source but when I build my project it reports missing files as warnings. Cleaning and restarting the Xcode does not help. Any ideas on where to look? | it seems like the issue was related to the files being added but not committed to my svn repository. when i removed them from being added the warning went away. | Xcode incorrectly reporting missing files I had some files that I removed from my project. They don't show up anywhere when I grep the directory for files or the text inside of the files in my source but when I build my project it reports missing files as warnings. Cleaning and restarting the Xcode does not help. Any i... | TITLE:
Xcode incorrectly reporting missing files
QUESTION:
I had some files that I removed from my project. They don't show up anywhere when I grep the directory for files or the text inside of the files in my source but when I build my project it reports missing files as warnings. Cleaning and restarting the Xcode do... | [
"xcode4"
] | 26 | 53 | 28,838 | 4 | 0 | 2011-06-06T20:55:03.397000 | 2011-06-06T23:56:29.453000 |
6,257,938 | 6,258,056 | Logout Button doesn't work (session invalidate) | Hy! I have a jsp site called konto (engl. account) At the end i have a button that should invalidate the current session by clicking and redirect back to the loginpage but that doesn't work. Code: <%@page contentType="text/html" pageEncoding="UTF-8"%> <% if (session.getAttribute("user")== null) { %> <% } if (request.ge... | You need to put the button in a in order to get it to work. That said, mingling model, view and controller in a single JSP (view) isn't the best practice. | Logout Button doesn't work (session invalidate) Hy! I have a jsp site called konto (engl. account) At the end i have a button that should invalidate the current session by clicking and redirect back to the loginpage but that doesn't work. Code: <%@page contentType="text/html" pageEncoding="UTF-8"%> <% if (session.getAt... | TITLE:
Logout Button doesn't work (session invalidate)
QUESTION:
Hy! I have a jsp site called konto (engl. account) At the end i have a button that should invalidate the current session by clicking and redirect back to the loginpage but that doesn't work. Code: <%@page contentType="text/html" pageEncoding="UTF-8"%> <%... | [
"java",
"jsp",
"session"
] | 0 | 5 | 2,181 | 1 | 0 | 2011-06-06T20:55:40.617000 | 2011-06-06T21:08:48.493000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.