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,246,475 | 6,246,567 | Could not load file or assembly > 'System.Windows, Version=2.0.5.0 | On first load of my Silverlight application I keep getting this error: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified but by just refreshing the page, it'll be solved! it seems that... | Well actually 'System.Windows' assembly is copied to the output directory solved the problem form me. Just make sure that it is copied to whereever you're going to be executing your app, not just the Debug folder. Also there is a very good alternative that doesn't have similar problems: SilverUnit | Could not load file or assembly > 'System.Windows, Version=2.0.5.0 On first load of my Silverlight application I keep getting this error: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specif... | TITLE:
Could not load file or assembly > 'System.Windows, Version=2.0.5.0
QUESTION:
On first load of my Silverlight application I keep getting this error: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot fi... | [
"c#",
"silverlight-4.0"
] | 5 | 7 | 22,586 | 4 | 0 | 2011-06-05T22:59:08.897000 | 2011-06-05T23:15:36.433000 |
6,246,485 | 6,246,501 | Custom Authentication Helper class. Need help | I have helper method which is only checking if User is Authenticated but its generating error Helper method public static bool IsLoggedIn(this HtmlHelper helper) { return helper.ViewContext.HttpContext.Request.IsAuthenticated; } View @if (GH.IsLoggedIn) //Error is on this line { Signed In As @GH.IdentityName } Error Co... | Why woudn't you call it like this @if (Html.IsLoggedIn()) {.. }... You may want to make this method render appropriate HTML instead of doing @if (...) check in your view. public static MvcHtmlString SignInText(this HtmlHelper htmlHelper) { // you code here } Then insert it into your view this way: @Html.SignInText() | Custom Authentication Helper class. Need help I have helper method which is only checking if User is Authenticated but its generating error Helper method public static bool IsLoggedIn(this HtmlHelper helper) { return helper.ViewContext.HttpContext.Request.IsAuthenticated; } View @if (GH.IsLoggedIn) //Error is on this l... | TITLE:
Custom Authentication Helper class. Need help
QUESTION:
I have helper method which is only checking if User is Authenticated but its generating error Helper method public static bool IsLoggedIn(this HtmlHelper helper) { return helper.ViewContext.HttpContext.Request.IsAuthenticated; } View @if (GH.IsLoggedIn) //... | [
"asp.net-mvc-3"
] | 0 | 2 | 707 | 1 | 0 | 2011-06-05T23:00:40.527000 | 2011-06-05T23:03:43.630000 |
6,246,493 | 6,246,847 | Remove Everything Between Two Characters As Long As They Aren't Inside Some Other Characters | Basically, my goal is to remove everything inside ()'s except for strings that are inside "". I was following the code here: Remove text in-between delimiters in a string (using a regex?) And that works great; but I have the additional requirement of not removing ()s if they are in "". Is that something that can be don... | .NET regexes are even more powerful than the usual and you can surely do what you want. Take a look at this, which looks for balanced parentheses, which is essentially the same problem as yours but with parentheses and not quotes. http://blogs.msdn.com/bclteam/archive/2005/03/15/396452.aspx | Remove Everything Between Two Characters As Long As They Aren't Inside Some Other Characters Basically, my goal is to remove everything inside ()'s except for strings that are inside "". I was following the code here: Remove text in-between delimiters in a string (using a regex?) And that works great; but I have the ad... | TITLE:
Remove Everything Between Two Characters As Long As They Aren't Inside Some Other Characters
QUESTION:
Basically, my goal is to remove everything inside ()'s except for strings that are inside "". I was following the code here: Remove text in-between delimiters in a string (using a regex?) And that works great;... | [
"c#",
".net",
"regex"
] | 5 | 3 | 1,569 | 3 | 0 | 2011-06-05T23:02:34.623000 | 2011-06-06T00:21:49.607000 |
6,246,497 | 6,250,419 | Wordpress display related articles on page | I currently have a custom page in Wordpress (with the PHP Execution plugin). On this page I'm displaying dynamic content, and I would like to be able to show, at the bottom of this page, a dynamic list of related Wordpress articles. I'm currently using Similar Posts, but since my page doesn't have any tags (I assume th... | It is easy to show pages with the same tag. First of all, you should get current post tags using wp_get_post_tags When you have it, select pages with the same tags using WP_Query. Don't forget to exclude current page. In order to select random related pages set orderby to rand at WP_Query. | Wordpress display related articles on page I currently have a custom page in Wordpress (with the PHP Execution plugin). On this page I'm displaying dynamic content, and I would like to be able to show, at the bottom of this page, a dynamic list of related Wordpress articles. I'm currently using Similar Posts, but since... | TITLE:
Wordpress display related articles on page
QUESTION:
I currently have a custom page in Wordpress (with the PHP Execution plugin). On this page I'm displaying dynamic content, and I would like to be able to show, at the bottom of this page, a dynamic list of related Wordpress articles. I'm currently using Simila... | [
"wordpress"
] | 0 | 1 | 529 | 1 | 0 | 2011-06-05T23:03:16.057000 | 2011-06-06T10:02:56.953000 |
6,246,498 | 6,246,530 | How do I use a socket proxy in C# webbrowser? | How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET. Please help in Visual C#.NET. | The WebBrowser control is just a wrapper around IE. So to set proxy settings, you could change the registry key entries. Something like this: string serverName = ""; // your proxy server name string port = ""; // your proxy port
var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Inte... | How do I use a socket proxy in C# webbrowser? How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET. Please help in Visual C#.NET. | TITLE:
How do I use a socket proxy in C# webbrowser?
QUESTION:
How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET. Please help in Visual C#.NET.
ANSWER:
The WebBrowser control is just a wrapper around IE. So to set proxy settings,... | [
"c#",
"sockets",
"browser",
"proxy"
] | 3 | 4 | 3,335 | 2 | 0 | 2011-06-05T23:03:18.173000 | 2011-06-05T23:08:45.530000 |
6,246,504 | 6,246,857 | HTTP Digest with hashed stored password | i m using HTTP Digest to connect to my Spring application, using the Spring DigestAuthenticationFilter. The application is using Tomcat 7. It works fine with plaintext password (in the database) My problem is: i want to store the hashed passwords (with a salt if possible), and not in plaintext. But if i understood well... | i want to store the hashed passwords (with a salt if possible), and not in plaintext. But if i understood well, HTTP Digest requires the password to be in plaintext. Is there a way to change this in Spring Security? No, this is not changeable, atleast at the time of writing this. The Spring Security documentation on Di... | HTTP Digest with hashed stored password i m using HTTP Digest to connect to my Spring application, using the Spring DigestAuthenticationFilter. The application is using Tomcat 7. It works fine with plaintext password (in the database) My problem is: i want to store the hashed passwords (with a salt if possible), and no... | TITLE:
HTTP Digest with hashed stored password
QUESTION:
i m using HTTP Digest to connect to my Spring application, using the Spring DigestAuthenticationFilter. The application is using Tomcat 7. It works fine with plaintext password (in the database) My problem is: i want to store the hashed passwords (with a salt if... | [
"security",
"http",
"tomcat",
"spring-security"
] | 9 | 8 | 1,751 | 1 | 0 | 2011-06-05T23:04:03.680000 | 2011-06-06T00:23:56.567000 |
6,246,506 | 6,246,982 | Copy a row or column of a matrix and insert it in the next row/column | I was wondering if there is an easy way in MATLAB to do the following operation: I'd like to copy a row or column of a matrix and insert it in the next row/column. For example: given a 3x3 matrix 1 2 3 4 5 6 7 8 9 I'd like to copy the first row and insert it as a second row: 1 2 3 1 2 3 4 5 6 7 8 9 Can someone advise h... | You can simply repeat the indices of the rows you'd like to repeat A = A([1 1 2 3],:) | Copy a row or column of a matrix and insert it in the next row/column I was wondering if there is an easy way in MATLAB to do the following operation: I'd like to copy a row or column of a matrix and insert it in the next row/column. For example: given a 3x3 matrix 1 2 3 4 5 6 7 8 9 I'd like to copy the first row and i... | TITLE:
Copy a row or column of a matrix and insert it in the next row/column
QUESTION:
I was wondering if there is an easy way in MATLAB to do the following operation: I'd like to copy a row or column of a matrix and insert it in the next row/column. For example: given a 3x3 matrix 1 2 3 4 5 6 7 8 9 I'd like to copy t... | [
"matlab",
"matrix",
"copy"
] | 8 | 16 | 28,931 | 4 | 0 | 2011-06-05T23:04:23.507000 | 2011-06-06T01:03:12.500000 |
6,246,509 | 6,246,526 | How is *p1->p2 and *p1.a interpreted in c? | This seems ambiguous to me: *p1->p2 *(p1->p2) or (*p1)->p2
*p1.a *(p1.a) or (*p1).a How does the compiler interpret such expressions? | It's all down to operator precedence. Both -> and. have higher precedence than * (in this context), so the two expressions are equivalent to: *(p1->p2) *(p1.a) | How is *p1->p2 and *p1.a interpreted in c? This seems ambiguous to me: *p1->p2 *(p1->p2) or (*p1)->p2
*p1.a *(p1.a) or (*p1).a How does the compiler interpret such expressions? | TITLE:
How is *p1->p2 and *p1.a interpreted in c?
QUESTION:
This seems ambiguous to me: *p1->p2 *(p1->p2) or (*p1)->p2
*p1.a *(p1.a) or (*p1).a How does the compiler interpret such expressions?
ANSWER:
It's all down to operator precedence. Both -> and. have higher precedence than * (in this context), so the two expr... | [
"c",
"syntax"
] | 2 | 12 | 167 | 3 | 0 | 2011-06-05T23:05:05.433000 | 2011-06-05T23:07:47.867000 |
6,246,520 | 6,247,519 | xcode 4 have library resources automatically appear in the main project? | I have a static library. Let's call it MyLibrary. I am using it in 5 different Xcode projects. It has a lot of resource files. New resources are added reasonably often. And changes to existing resources are common. Obviously, I want to set things up so that changes to the library resources are reflected in all 5 projec... | One way to accomplish that is to create a resource bundle / bundles for your static library. In your dependent projects, point to the bundle from the library (including a bundle entails a single reference in the project file). It is easy to update resources from your bundle - simply add / change / remove the resource f... | xcode 4 have library resources automatically appear in the main project? I have a static library. Let's call it MyLibrary. I am using it in 5 different Xcode projects. It has a lot of resource files. New resources are added reasonably often. And changes to existing resources are common. Obviously, I want to set things ... | TITLE:
xcode 4 have library resources automatically appear in the main project?
QUESTION:
I have a static library. Let's call it MyLibrary. I am using it in 5 different Xcode projects. It has a lot of resource files. New resources are added reasonably often. And changes to existing resources are common. Obviously, I w... | [
"iphone",
"xcode",
"ios",
"resources"
] | 0 | 1 | 292 | 1 | 0 | 2011-06-05T23:07:23.880000 | 2011-06-06T03:25:02.213000 |
6,246,521 | 6,246,542 | why write type declarations in Haskell? | I am new to Haskell and I am trying to understand why one needs to write type declarations. Since Haskell has type inference, when do I need the first line at all? GHCI seems to generate correct output with I use ':t' The only example I found so far that seems to need a declaration is the following. maximum':: (Ord a) ... | Consider read "5". How can Haskell know the type of read "5"? It can't, because theres no way to resolve the result of the operation, since read is defined as (Read a) => String -> a. a is not dependent on the string, so it must use context. However usually context is something like Ord or Num so its impossible to dete... | why write type declarations in Haskell? I am new to Haskell and I am trying to understand why one needs to write type declarations. Since Haskell has type inference, when do I need the first line at all? GHCI seems to generate correct output with I use ':t' The only example I found so far that seems to need a declarati... | TITLE:
why write type declarations in Haskell?
QUESTION:
I am new to Haskell and I am trying to understand why one needs to write type declarations. Since Haskell has type inference, when do I need the first line at all? GHCI seems to generate correct output with I use ':t' The only example I found so far that seems t... | [
"types",
"type-inference",
"haskell"
] | 26 | 16 | 2,332 | 5 | 0 | 2011-06-05T23:07:28.460000 | 2011-06-05T23:10:41.927000 |
6,246,523 | 6,246,601 | google maps api key not working in facebook iframe application | i have a google map api key which is working in my website but the same api key is not working in my facebook iframe based application showing the error that the api key is not valid and please generate another api key while the api key is same in both places in website and in facebook iframe application.. what problem... | This article in GMaps' FAQ may be relevant: Note that a key for http://www.mygooglemapssite.com/ will only be accepted when the site is accessed using this address. From similar experiences, I'm guessing that your FB app runs under a different domain name, and thus will need a different API key; or, you may need to gen... | google maps api key not working in facebook iframe application i have a google map api key which is working in my website but the same api key is not working in my facebook iframe based application showing the error that the api key is not valid and please generate another api key while the api key is same in both plac... | TITLE:
google maps api key not working in facebook iframe application
QUESTION:
i have a google map api key which is working in my website but the same api key is not working in my facebook iframe based application showing the error that the api key is not valid and please generate another api key while the api key is... | [
"php",
"google-maps-api-2"
] | 0 | 1 | 1,033 | 1 | 0 | 2011-06-05T23:07:37.170000 | 2011-06-05T23:25:08.123000 |
6,246,528 | 6,249,465 | GWT RPC - Enum or boolean | Hey, I need to send an object over an RPC, and I need to include an enum with 2 types or a boolean. The enum is far more readable, and understandable, but the boolean might send less data. I'd like to go for efficiency. Also, I'm a bit unfamiliar with all that is passed over an RPC call. If I were to use the enum, Woul... | I wouldn't worry about the efficiency of the request. The http header if much larger than the gwt request even if you send a few enum's. This is a (slightly anonymized) rpc call in our project (the enum is bold): 7|0|6|http://localhost:8080/project/webapp/|71407A43DECFAED2BC6095696471246F|com.ourCompanyName.common.serv... | GWT RPC - Enum or boolean Hey, I need to send an object over an RPC, and I need to include an enum with 2 types or a boolean. The enum is far more readable, and understandable, but the boolean might send less data. I'd like to go for efficiency. Also, I'm a bit unfamiliar with all that is passed over an RPC call. If I ... | TITLE:
GWT RPC - Enum or boolean
QUESTION:
Hey, I need to send an object over an RPC, and I need to include an enum with 2 types or a boolean. The enum is far more readable, and understandable, but the boolean might send less data. I'd like to go for efficiency. Also, I'm a bit unfamiliar with all that is passed over ... | [
"gwt",
"gwt-rpc"
] | 0 | 3 | 563 | 1 | 0 | 2011-06-05T23:08:00.363000 | 2011-06-06T08:35:29.260000 |
6,246,534 | 6,246,553 | Jquery function not executing inside of a 'tap' function event | Here is the function I have written $('#move').bind('tap', function () { $('.page').addClass('slideLeftOut', function () { $('#wrapper').css("height","300"); }); }); My problem is, I need the #wrapper's height to change to 300 AFTER the addClass.. I thought that this was the correct syntax for this, but it does not cha... | The normal jQuery addClass method does not take a callback function. It does not return until the operation is complete, so you can safely put the code on the following line: $('#move').bind('tap', function () { $('.page').addClass('slideLeftOut'); $('#wrapper').css("height","300"); }); Since you are using jQuery UI, h... | Jquery function not executing inside of a 'tap' function event Here is the function I have written $('#move').bind('tap', function () { $('.page').addClass('slideLeftOut', function () { $('#wrapper').css("height","300"); }); }); My problem is, I need the #wrapper's height to change to 300 AFTER the addClass.. I thought... | TITLE:
Jquery function not executing inside of a 'tap' function event
QUESTION:
Here is the function I have written $('#move').bind('tap', function () { $('.page').addClass('slideLeftOut', function () { $('#wrapper').css("height","300"); }); }); My problem is, I need the #wrapper's height to change to 300 AFTER the ad... | [
"jquery",
"jquery-ui",
"jquery-selectors"
] | 2 | 2 | 339 | 2 | 0 | 2011-06-05T23:10:02.073000 | 2011-06-05T23:13:09.513000 |
6,246,538 | 6,247,739 | Base64 in SQLite? | Is there something like SELECT * FROM foo WHERE base64(bar) LIKE '%bararar%' in SQLite? If not, are there other compareable functions in other SQL-style databases? (MySQL, MSSQL and so on) I really need to know this because I have a huge database where some base64-encodings of strings contain a specific character which... | System.Data.SQLite supports custom functions in.NET. If you're using a different wrapper that doesn't do this, then change the wrapper. The latest version is here: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki It used to be here, but is now a part of the main SQLite project: http://sqlite.phxsof... | Base64 in SQLite? Is there something like SELECT * FROM foo WHERE base64(bar) LIKE '%bararar%' in SQLite? If not, are there other compareable functions in other SQL-style databases? (MySQL, MSSQL and so on) I really need to know this because I have a huge database where some base64-encodings of strings contain a specif... | TITLE:
Base64 in SQLite?
QUESTION:
Is there something like SELECT * FROM foo WHERE base64(bar) LIKE '%bararar%' in SQLite? If not, are there other compareable functions in other SQL-style databases? (MySQL, MSSQL and so on) I really need to know this because I have a huge database where some base64-encodings of string... | [
"database",
"sqlite",
"filter",
"base64"
] | 11 | 4 | 16,346 | 2 | 0 | 2011-06-05T23:10:28.993000 | 2011-06-06T04:24:24.843000 |
6,246,540 | 6,246,943 | Hide folder on Plone 4.0.5 | I'm using "Explore" in the left menu to show the content of a "Doc" folder. This folder originates from the top menu. Is it possible to hide the "Doc" folder from the top menu? I was thinking of moving it to admin, but I do not like that solution. Thanks. Nikolaj G. | If it's a plone question, then you can hide any folder from the top menu by editing the folder, and setting "Exclude from navigation" in the metadata (Settings tab). | Hide folder on Plone 4.0.5 I'm using "Explore" in the left menu to show the content of a "Doc" folder. This folder originates from the top menu. Is it possible to hide the "Doc" folder from the top menu? I was thinking of moving it to admin, but I do not like that solution. Thanks. Nikolaj G. | TITLE:
Hide folder on Plone 4.0.5
QUESTION:
I'm using "Explore" in the left menu to show the content of a "Doc" folder. This folder originates from the top menu. Is it possible to hide the "Doc" folder from the top menu? I was thinking of moving it to admin, but I do not like that solution. Thanks. Nikolaj G.
ANSWER:... | [
"hide",
"directory",
"plone"
] | 1 | 5 | 365 | 1 | 0 | 2011-06-05T23:10:31.923000 | 2011-06-06T00:49:09.863000 |
6,246,541 | 6,246,562 | Get feedback why android app purchase has been cancelled? | I have published my first android app and its quite different from iPhone. On some android app purchases I got cancellation of the order. When I check the orders I get a reason saying: Cancellation requested from phone. In the upper left corner of the screen there is an email contact of the purchaser - so I sent emails... | In android, a customer can cancel a purchase so long as they do it before 30? mins have elapsed. It's been my experience that a fair number of app sales end up being canceled by customers. I believe this is because the customers are trying the app and finding that it's not something they actually want to pay for. As fa... | Get feedback why android app purchase has been cancelled? I have published my first android app and its quite different from iPhone. On some android app purchases I got cancellation of the order. When I check the orders I get a reason saying: Cancellation requested from phone. In the upper left corner of the screen the... | TITLE:
Get feedback why android app purchase has been cancelled?
QUESTION:
I have published my first android app and its quite different from iPhone. On some android app purchases I got cancellation of the order. When I check the orders I get a reason saying: Cancellation requested from phone. In the upper left corner... | [
"android",
"cancellation",
"purchase-order"
] | 0 | 2 | 883 | 2 | 0 | 2011-06-05T23:10:38.650000 | 2011-06-05T23:14:55.370000 |
6,246,543 | 6,246,554 | Are there tools, for analyzing python code? | I am looking for a tool to analyze my python script. For example which part of the code takes the most time which part of the code consumes too much memory and so on... Is there something like that? | Take a look at cProfile. Here's a usage example: me@mine:~ $ cat foo.py def double(i): return i * 2
def halve(i): return i / 2.0
for i in range(10000): double(i) halve(i) me@mine:~ $ python -m cProfile foo.py 20005 function calls in 0.009 CPU seconds
Ordered by: standard name
ncalls tottime percall cumtime percall ... | Are there tools, for analyzing python code? I am looking for a tool to analyze my python script. For example which part of the code takes the most time which part of the code consumes too much memory and so on... Is there something like that? | TITLE:
Are there tools, for analyzing python code?
QUESTION:
I am looking for a tool to analyze my python script. For example which part of the code takes the most time which part of the code consumes too much memory and so on... Is there something like that?
ANSWER:
Take a look at cProfile. Here's a usage example: m... | [
"python",
"code-analysis"
] | 2 | 3 | 243 | 3 | 0 | 2011-06-05T23:10:57.460000 | 2011-06-05T23:13:13.203000 |
6,246,548 | 6,246,775 | How to secure a Python distributed computing layer | These modules are designed to facilitate a layer of computational capacity across multiple computers. What one or more proven methods are available which will secure against spoofed packets? How can I best make a deep copy of any not included objects referenced by the transmitted callable? Is a function object the best... | I've taken a closer look at your code now, and I've got some comments: This code looks like it can easily protect against accidental modification of the pickled objects while they are in flight. sha224 is an excellent hashing algorithm, and will easily notice packets that have been accidentally modified that might stil... | How to secure a Python distributed computing layer These modules are designed to facilitate a layer of computational capacity across multiple computers. What one or more proven methods are available which will secure against spoofed packets? How can I best make a deep copy of any not included objects referenced by the ... | TITLE:
How to secure a Python distributed computing layer
QUESTION:
These modules are designed to facilitate a layer of computational capacity across multiple computers. What one or more proven methods are available which will secure against spoofed packets? How can I best make a deep copy of any not included objects ... | [
"python",
"hash",
"distributed-computing"
] | 4 | 6 | 270 | 1 | 0 | 2011-06-05T23:12:15.027000 | 2011-06-06T00:02:49.407000 |
6,246,549 | 6,246,594 | Create nested div from json result | I recieve from an AJAX call data which has an architecture like data [0] => "date" => "blah" "location" => "blah"... [1] => "date" => "moreblah"................... I would like to create nested divs for each of the elements in data like this
blah blah...
moreblah........ I have: for(var i in data){ $(" ").appendTo("#... | Try something like this: also, make sure use always create complete html tags. You're adding dom elements, not printing something to the document, Thus: do's: $(' );. Dont's: $(' '). for(var i in data){
var event = $(" "); //make div class "date" with event.date inside $(" " + data[i].date + " ").appendTo(event); //ma... | Create nested div from json result I recieve from an AJAX call data which has an architecture like data [0] => "date" => "blah" "location" => "blah"... [1] => "date" => "moreblah"................... I would like to create nested divs for each of the elements in data like this
blah blah...
moreblah........ I have: for... | TITLE:
Create nested div from json result
QUESTION:
I recieve from an AJAX call data which has an architecture like data [0] => "date" => "blah" "location" => "blah"... [1] => "date" => "moreblah"................... I would like to create nested divs for each of the elements in data like this
blah blah...
moreblah..... | [
"php",
"javascript",
"jquery",
"json",
"html"
] | 0 | 1 | 628 | 2 | 0 | 2011-06-05T23:12:45.200000 | 2011-06-05T23:22:40.423000 |
6,246,557 | 6,246,565 | echo o/p from crontab | If my crontab had the entry # m h dom mon dow command 12 16 5 6 7 echo "echo from cron" where would the output of echo go? I don't see it on my shell's stout. | It gets sent to the local mailbox of the user the script runs under. | echo o/p from crontab If my crontab had the entry # m h dom mon dow command 12 16 5 6 7 echo "echo from cron" where would the output of echo go? I don't see it on my shell's stout. | TITLE:
echo o/p from crontab
QUESTION:
If my crontab had the entry # m h dom mon dow command 12 16 5 6 7 echo "echo from cron" where would the output of echo go? I don't see it on my shell's stout.
ANSWER:
It gets sent to the local mailbox of the user the script runs under. | [
"linux",
"bash"
] | 2 | 5 | 181 | 4 | 0 | 2011-06-05T23:13:56.213000 | 2011-06-05T23:15:26.200000 |
6,246,574 | 6,246,899 | Searching for indices of consecutive elements in an array | So I have an array my @a = (a,b,c,d,e,f) And another array my @b = (c,d,e) I want to find if there are three consecutive elements in @a that match those in @b. Then, if there are, I want to get the indices those elements live in. So in the case above I want to get an array such as (2,3,4). Another example: my @a = (1,2... | Here is a general solution. This uses the 'all' function, from List::MoreUtils to reduce the comparison to a true/false result, which simplifies the logic a little. I put it into the form of a sub to which you pass a reference to any two arrays. The first array ref passed to the function should be the superset, and the... | Searching for indices of consecutive elements in an array So I have an array my @a = (a,b,c,d,e,f) And another array my @b = (c,d,e) I want to find if there are three consecutive elements in @a that match those in @b. Then, if there are, I want to get the indices those elements live in. So in the case above I want to g... | TITLE:
Searching for indices of consecutive elements in an array
QUESTION:
So I have an array my @a = (a,b,c,d,e,f) And another array my @b = (c,d,e) I want to find if there are three consecutive elements in @a that match those in @b. Then, if there are, I want to get the indices those elements live in. So in the case... | [
"arrays",
"perl",
"search",
"element"
] | 2 | 2 | 741 | 2 | 0 | 2011-06-05T23:16:39.153000 | 2011-06-06T00:35:40.043000 |
6,246,595 | 6,246,621 | How do I group similary items in an Android ListView? | I'm building an app that lists items in a ListView. There are a lot of items, and I'd like to present the user with a tree-like view that groups similar items (e.g. produce) under a parent category and expands to show the user the specific items (e.g. lettuce, tomato) after the user clicks on the category (e.g. produce... | You want to use an ExpandableListView. Here is an example on the Android Developer website. | How do I group similary items in an Android ListView? I'm building an app that lists items in a ListView. There are a lot of items, and I'd like to present the user with a tree-like view that groups similar items (e.g. produce) under a parent category and expands to show the user the specific items (e.g. lettuce, tomat... | TITLE:
How do I group similary items in an Android ListView?
QUESTION:
I'm building an app that lists items in a ListView. There are a lot of items, and I'd like to present the user with a tree-like view that groups similar items (e.g. produce) under a parent category and expands to show the user the specific items (e... | [
"android",
"android-layout",
"android-listview"
] | 0 | 3 | 1,340 | 1 | 0 | 2011-06-05T23:23:10.580000 | 2011-06-05T23:30:18.903000 |
6,246,600 | 6,246,620 | why doesn't the onload event binds the `this` variable as expected? | does anyone knows why doesn't the onload event binds the this variable as expected? Like in this test script, onkeydown gives us true ( this is working fine) but onload gives us false ( this now points to window.. wth?): | See the documentation: HTMLBodyElement.onload Exposes the window.onload event handler to call when the window gains focus. Note that this handler is triggered when the event reaches the window, not the body element. Use addEventListener() to attach an event listener to the body element. The important part is this handl... | why doesn't the onload event binds the `this` variable as expected? does anyone knows why doesn't the onload event binds the this variable as expected? Like in this test script, onkeydown gives us true ( this is working fine) but onload gives us false ( this now points to window.. wth?): | TITLE:
why doesn't the onload event binds the `this` variable as expected?
QUESTION:
does anyone knows why doesn't the onload event binds the this variable as expected? Like in this test script, onkeydown gives us true ( this is working fine) but onload gives us false ( this now points to window.. wth?):
ANSWER:
See ... | [
"javascript",
"web-services",
"web-applications"
] | 2 | 4 | 134 | 1 | 0 | 2011-06-05T23:24:33.470000 | 2011-06-05T23:29:50.690000 |
6,246,612 | 6,246,661 | How to make seekbar thumb draggable | I am using a seekbar which had maximum of 2. However whenever i tap the other marked points thumb moves and even when I try to drag the thumb it directly comes up the other position. Please tell if there is any kind of animation by which i can show seekbar thumb dragging along with the touch. | No there is no animation for that. But you could just raise the maximum to 200 and then programmatically divide the progress by 100, round it to 1 or 2 and then set create a timer/handler which sets the progress like an animation until it reaches the rounded value. | How to make seekbar thumb draggable I am using a seekbar which had maximum of 2. However whenever i tap the other marked points thumb moves and even when I try to drag the thumb it directly comes up the other position. Please tell if there is any kind of animation by which i can show seekbar thumb dragging along with t... | TITLE:
How to make seekbar thumb draggable
QUESTION:
I am using a seekbar which had maximum of 2. However whenever i tap the other marked points thumb moves and even when I try to drag the thumb it directly comes up the other position. Please tell if there is any kind of animation by which i can show seekbar thumb dra... | [
"android",
"seekbar"
] | 0 | 0 | 1,329 | 1 | 0 | 2011-06-05T23:28:18.707000 | 2011-06-05T23:38:49.673000 |
6,246,619 | 6,246,646 | a fast algorithm to compute matrix multiplication | In the middle of a c++ code, eclipse, I need to compute the multiply of matrices A and B, with the size of 2400*3600 (so the dimensions are not the same). The matrices are stored in float two dimensional arrays.They are not sparse, no limitations. Each multiply takes so long (several minutes), and I seriously need to r... | I wouldn't fool around trying to write my own: Google for LAPACK or BLAS, two time-tested packages for numerical computing, both optimized to the Nth degree. Both have C APIs you can use. | a fast algorithm to compute matrix multiplication In the middle of a c++ code, eclipse, I need to compute the multiply of matrices A and B, with the size of 2400*3600 (so the dimensions are not the same). The matrices are stored in float two dimensional arrays.They are not sparse, no limitations. Each multiply takes so... | TITLE:
a fast algorithm to compute matrix multiplication
QUESTION:
In the middle of a c++ code, eclipse, I need to compute the multiply of matrices A and B, with the size of 2400*3600 (so the dimensions are not the same). The matrices are stored in float two dimensional arrays.They are not sparse, no limitations. Each... | [
"c++",
"arrays",
"matrix",
"multiplication"
] | 7 | 13 | 7,489 | 4 | 0 | 2011-06-05T23:29:24.440000 | 2011-06-05T23:36:07.133000 |
6,246,624 | 6,246,678 | How do i use the internet privileges/access of a remote server using SSH | I have access to a jump off server via ssh (i don't have root privileges), from the jump off server i can access the services that i need to use using curl, so i know that access from the server is ok. I want to access these services locally, im using xcode for an iOS app and through the simulator i need these services... | You can tunnel non-privileged ports via SSH even if you dont have root access. # ssh user@host -L:: For example, if you wanted to connect to google.com on port 80 via your proxy. # ssh user@host -L8080:google.com:80 Then navigate in your browser to "http://localhost:8080/" which gets tunneled to "google.com:80". You ca... | How do i use the internet privileges/access of a remote server using SSH I have access to a jump off server via ssh (i don't have root privileges), from the jump off server i can access the services that i need to use using curl, so i know that access from the server is ok. I want to access these services locally, im u... | TITLE:
How do i use the internet privileges/access of a remote server using SSH
QUESTION:
I have access to a jump off server via ssh (i don't have root privileges), from the jump off server i can access the services that i need to use using curl, so i know that access from the server is ok. I want to access these serv... | [
"iphone",
"macos",
"proxy",
"ssh",
"terminal"
] | 1 | 2 | 309 | 1 | 0 | 2011-06-05T23:30:39.887000 | 2011-06-05T23:42:15.190000 |
6,246,626 | 6,247,916 | Jumping to a topic in a CHM help file without opening another window | I'm including a cut-down CHM help with an installer and I want the help button on each page of the installer wizard to call up a different help page. If I open the help window from one installer wizard page by executing the command hh.exe -mapid 1234 MyAppCutDownHelp.chm it works fine, but if I do the same thing later ... | You can use the HtmlHelpA or HtmlHelpW function in hhctrl.ocx This is documented in MSDN.; -- Example1.iss --; Demonstrates copying 3 files and creating an icon.; SEE THE DOCUMENTATION FOR DETAILS ON CREATING.ISS SCRIPT FILES!
[Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}\My Program DefaultGroupName=My... | Jumping to a topic in a CHM help file without opening another window I'm including a cut-down CHM help with an installer and I want the help button on each page of the installer wizard to call up a different help page. If I open the help window from one installer wizard page by executing the command hh.exe -mapid 1234 ... | TITLE:
Jumping to a topic in a CHM help file without opening another window
QUESTION:
I'm including a cut-down CHM help with an installer and I want the help button on each page of the installer wizard to call up a different help page. If I open the help window from one installer wizard page by executing the command h... | [
"inno-setup",
"chm",
"shellexecute",
"html-help"
] | 1 | 3 | 1,643 | 2 | 0 | 2011-06-05T23:30:49.273000 | 2011-06-06T04:58:54.737000 |
6,246,632 | 6,246,652 | how to compile to reduce memory /STACK doesn't seem to change anything? | I create a lot of simple programs, which don't need any memory, but they always show around 1MB-1.6MB memory in the private memory column in task manager. I read that the default stack size is 1MB for linking with link.exe, i tried playing with /STACK like this: /STACK:65536 (64kb) /STACK:16777216 (16mb) when i run the... | You can reduce your foot print if you don't include stdlib and make sure not to link in an libraries you don't use. All linked dlls get there own private data segment and I believe that is included in your private set. After removing all STD libs using Yes (/NODEFAULTLIB) setting my optimizations to O1 and setting my e... | how to compile to reduce memory /STACK doesn't seem to change anything? I create a lot of simple programs, which don't need any memory, but they always show around 1MB-1.6MB memory in the private memory column in task manager. I read that the default stack size is 1MB for linking with link.exe, i tried playing with /ST... | TITLE:
how to compile to reduce memory /STACK doesn't seem to change anything?
QUESTION:
I create a lot of simple programs, which don't need any memory, but they always show around 1MB-1.6MB memory in the private memory column in task manager. I read that the default stack size is 1MB for linking with link.exe, i trie... | [
"c++",
"c",
"compilation"
] | 4 | 3 | 212 | 2 | 0 | 2011-06-05T23:31:50.790000 | 2011-06-05T23:36:37.720000 |
6,246,633 | 6,246,641 | running utf8 encoded php script with fastcgi | I have installed Nginx and I used fastcgi to run php script. When I run php script encoded as "utf8" I have got an error about "header": FastCGI sent in stderr: "PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/myScript.php:1) in /xxx/myScript.php on line 29.... If I encod... | Configure your editor to store UTF-8 files without BOM. Open your file in an hexeditor to see the BOM to confirm, as in normal editors you won't see it. | running utf8 encoded php script with fastcgi I have installed Nginx and I used fastcgi to run php script. When I run php script encoded as "utf8" I have got an error about "header": FastCGI sent in stderr: "PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx/myScript.php:1) i... | TITLE:
running utf8 encoded php script with fastcgi
QUESTION:
I have installed Nginx and I used fastcgi to run php script. When I run php script encoded as "utf8" I have got an error about "header": FastCGI sent in stderr: "PHP Warning: Cannot modify header information - headers already sent by (output started at /xxx... | [
"php",
"cgi",
"fastcgi"
] | 1 | 1 | 804 | 1 | 0 | 2011-06-05T23:32:16.837000 | 2011-06-05T23:34:54.167000 |
6,246,634 | 6,246,917 | ASP.NET Design question - Web Services | Creating a web interface so our helpdesk can create users and setup some of the applications that are used in our environment, the web interface is written in ASP.NET but I'm seeking advice on the best way to implement the backend. I was planning to use a web service to do the creation of accounts. My main concern is s... | You propose a reasonable solution but I can think of an alternative. Dealing with threads can be a pain in ASP.NET applications. Not impossible but a pain. Are you spawning a thread so that your task can run under a separate identity, or is it because the task can be long running, or both? Another thing to consider is ... | ASP.NET Design question - Web Services Creating a web interface so our helpdesk can create users and setup some of the applications that are used in our environment, the web interface is written in ASP.NET but I'm seeking advice on the best way to implement the backend. I was planning to use a web service to do the cre... | TITLE:
ASP.NET Design question - Web Services
QUESTION:
Creating a web interface so our helpdesk can create users and setup some of the applications that are used in our environment, the web interface is written in ASP.NET but I'm seeking advice on the best way to implement the backend. I was planning to use a web ser... | [
"c#",
"asp.net",
"web-services"
] | 2 | 1 | 349 | 1 | 0 | 2011-06-05T23:32:27 | 2011-06-06T00:41:06.347000 |
6,246,636 | 6,249,772 | Selecting and hiding elements with Prototype or Javascript | Anyone up for a Prototype challenge? I am new to Prototype and I am trying to do the following. Would do this in jQuery but the only js library installed is Prototype. Perhaps someone has a javascript solution that would work? Strip any whitespace out of the form value (before and after) If the input form length is 3 o... | I assume you mean "If the input form value length is 3 or less" since the default input value is not a number. function updateCheckPrice(event) { // $F() returns a string // String.strip() trims whitespace and returns a new string // String.length is a native property var length = $F(this).strip().length;
// If length... | Selecting and hiding elements with Prototype or Javascript Anyone up for a Prototype challenge? I am new to Prototype and I am trying to do the following. Would do this in jQuery but the only js library installed is Prototype. Perhaps someone has a javascript solution that would work? Strip any whitespace out of the fo... | TITLE:
Selecting and hiding elements with Prototype or Javascript
QUESTION:
Anyone up for a Prototype challenge? I am new to Prototype and I am trying to do the following. Would do this in jQuery but the only js library installed is Prototype. Perhaps someone has a javascript solution that would work? Strip any whites... | [
"javascript",
"prototypejs"
] | 1 | 2 | 940 | 2 | 0 | 2011-06-05T23:32:37.757000 | 2011-06-06T09:06:29.457000 |
6,246,637 | 6,246,679 | Turn Off the Folder/Namespace Convention | I see people talking about the annoyance of Visual Studio automatically creating a namespace to correspond with project folders. Is there a way to turn this off in VS 2010, without resorting to modifying class templates? | If you use Resharper, there is an attribute on the folder 'Namespace Provider'. Even if you set it to false, Visual Studio will still add folder name as a namespace. However, Resharper fixes it with one click on the namespace. | Turn Off the Folder/Namespace Convention I see people talking about the annoyance of Visual Studio automatically creating a namespace to correspond with project folders. Is there a way to turn this off in VS 2010, without resorting to modifying class templates? | TITLE:
Turn Off the Folder/Namespace Convention
QUESTION:
I see people talking about the annoyance of Visual Studio automatically creating a namespace to correspond with project folders. Is there a way to turn this off in VS 2010, without resorting to modifying class templates?
ANSWER:
If you use Resharper, there is ... | [
"c#",
".net",
"visual-studio-2010",
"namespaces",
"directory"
] | 9 | 11 | 5,380 | 2 | 0 | 2011-06-05T23:33:37.363000 | 2011-06-05T23:42:24.887000 |
6,246,647 | 6,247,039 | Getting a Resultset from a SQL Server Stored Proc in Access | I've been 'lucky' enough to inherit an Access database that needs cleaned up tremendously. We're actually going to move off of Access and convert it into.NET/SQL Server. For now however we're retaining the Access database's UI and moving all the queries into SQL Server. Unfortunately I've never really worked with Acces... | There are a few ways to accomplish this. Here are two possibilities. The first is the simplest: ' String specifying SQL. SQL = "My_StorProc parm1, parm2, parm3"... ' For a stored procedure that doesn't return records. MyDb.Execute SQL, dbSQLPassThrough i = MyDb.RowsAffected... 'For a stored procedure that returns recor... | Getting a Resultset from a SQL Server Stored Proc in Access I've been 'lucky' enough to inherit an Access database that needs cleaned up tremendously. We're actually going to move off of Access and convert it into.NET/SQL Server. For now however we're retaining the Access database's UI and moving all the queries into S... | TITLE:
Getting a Resultset from a SQL Server Stored Proc in Access
QUESTION:
I've been 'lucky' enough to inherit an Access database that needs cleaned up tremendously. We're actually going to move off of Access and convert it into.NET/SQL Server. For now however we're retaining the Access database's UI and moving all ... | [
"ms-access",
"vba"
] | 2 | 5 | 7,154 | 2 | 0 | 2011-06-05T23:36:09.877000 | 2011-06-06T01:16:55.457000 |
6,246,653 | 6,246,994 | amazon simpledb get count | in c#, how do I get the value of count from this response from amazon simpledb (using amazon.net sdk): Domain Count 0 0ef874ad-2298-b6a9-101d-f96a1e188879 0.0000228538 i am interested in line: 0 for some reason whatever I do I can not get just the value: 0. probably am missing something. can't even share what I tried s... | answer (got it:): response.SelectResult.Item[0].Attribute[0].Value | amazon simpledb get count in c#, how do I get the value of count from this response from amazon simpledb (using amazon.net sdk): Domain Count 0 0ef874ad-2298-b6a9-101d-f96a1e188879 0.0000228538 i am interested in line: 0 for some reason whatever I do I can not get just the value: 0. probably am missing something. can't... | TITLE:
amazon simpledb get count
QUESTION:
in c#, how do I get the value of count from this response from amazon simpledb (using amazon.net sdk): Domain Count 0 0ef874ad-2298-b6a9-101d-f96a1e188879 0.0000228538 i am interested in line: 0 for some reason whatever I do I can not get just the value: 0. probably am missin... | [
"c#",
"amazon-web-services",
"amazon-simpledb"
] | 1 | 1 | 397 | 1 | 0 | 2011-06-05T23:37:00.377000 | 2011-06-06T01:05:40.290000 |
6,246,659 | 6,246,680 | Easiest Way to send Checkbox form over PHP | So I have a lot of checkboxes that need to be passed to a PHP script, and then for every checkbox that is checked, a value is written to a file. For example, if 7:30 - 8:30 is checked, then the PHP fwrites to a file named times. That much I can handle. The part where I am having the trouble is passing the checkboxes to... | Yes there is: 8:30 PM - 9:00 PM... if (isset($_POST['timeframes'])) { foreach ($_POST['timeframes'] as $timeframe) {... } } | Easiest Way to send Checkbox form over PHP So I have a lot of checkboxes that need to be passed to a PHP script, and then for every checkbox that is checked, a value is written to a file. For example, if 7:30 - 8:30 is checked, then the PHP fwrites to a file named times. That much I can handle. The part where I am havi... | TITLE:
Easiest Way to send Checkbox form over PHP
QUESTION:
So I have a lot of checkboxes that need to be passed to a PHP script, and then for every checkbox that is checked, a value is written to a file. For example, if 7:30 - 8:30 is checked, then the PHP fwrites to a file named times. That much I can handle. The pa... | [
"php",
"html",
"post"
] | 0 | 2 | 537 | 5 | 0 | 2011-06-05T23:38:30.900000 | 2011-06-05T23:42:38.340000 |
6,246,670 | 6,246,707 | .wrap not being wrapped | I wrote this: This is a paragraph. This is another paragraph. Wow And the #centerColumn doesn't get wrapped only the #rightColumn get's wrapped, why? | This is a paragraph. This is another paragraph. Wow See also:.wrap() at jQuery API.wrapAll() at jQuery API Selectors at jQuery Docs | .wrap not being wrapped I wrote this: This is a paragraph. This is another paragraph. Wow And the #centerColumn doesn't get wrapped only the #rightColumn get's wrapped, why? | TITLE:
.wrap not being wrapped
QUESTION:
I wrote this: This is a paragraph. This is another paragraph. Wow And the #centerColumn doesn't get wrapped only the #rightColumn get's wrapped, why?
ANSWER:
This is a paragraph. This is another paragraph. Wow See also:.wrap() at jQuery API.wrapAll() at jQuery API Selectors at... | [
"jquery"
] | 0 | 0 | 61 | 3 | 0 | 2011-06-05T23:40:31.727000 | 2011-06-05T23:47:52.113000 |
6,246,676 | 6,246,767 | Developing android apps without android device | Is it enough developing android apps without android device (without testing it on a real device not just an emulator)?. | It depends what different type of sensors you are willing to use. Emulator is just Android OS however it uses your computer's processor so the results you are getting with your computer's processor will be much more powerful than android device. If you are willing to monetize your application, it is preferable that you... | Developing android apps without android device Is it enough developing android apps without android device (without testing it on a real device not just an emulator)?. | TITLE:
Developing android apps without android device
QUESTION:
Is it enough developing android apps without android device (without testing it on a real device not just an emulator)?.
ANSWER:
It depends what different type of sensors you are willing to use. Emulator is just Android OS however it uses your computer's... | [
"android",
"android-emulator"
] | 6 | 6 | 3,243 | 2 | 0 | 2011-06-05T23:41:49.270000 | 2011-06-05T23:59:58.800000 |
6,246,683 | 6,246,687 | Combining a class selector and an attribute selector with jQuery | Is it possible to combine both a class selector and an attribute selector with jQuery? For example, given the following HTML: Row 1 Row 2 Row 3 Row 4 What would be the selector I can use to select rows 1 and 3 only? I have tried: $(".myclass [reference=12345]") // returns nothing
$(".myclass, [reference=12345]") // re... | Combine them. Literally combine them; attach them together without any punctuation. $('.myclass[reference="12345"]') Your first selector looks for elements with the attribute value, contained in elements with the class. The space is being interpreted as the descendant selector. Your second selector, like you said, look... | Combining a class selector and an attribute selector with jQuery Is it possible to combine both a class selector and an attribute selector with jQuery? For example, given the following HTML: Row 1 Row 2 Row 3 Row 4 What would be the selector I can use to select rows 1 and 3 only? I have tried: $(".myclass [reference=12... | TITLE:
Combining a class selector and an attribute selector with jQuery
QUESTION:
Is it possible to combine both a class selector and an attribute selector with jQuery? For example, given the following HTML: Row 1 Row 2 Row 3 Row 4 What would be the selector I can use to select rows 1 and 3 only? I have tried: $(".myc... | [
"javascript",
"jquery",
"jquery-selectors"
] | 192 | 356 | 172,748 | 4 | 0 | 2011-06-05T23:43:00.863000 | 2011-06-05T23:44:31.210000 |
6,246,690 | 6,246,706 | jQuery new line \n | Possible Duplicate: What's the cleanest way to write a multiline string in JavaScript? How does one go onto a new line in writing jQuery code not the actual output of the code, for example: $('#foo').append(' '+\n+' '); Something like that. | $('#foo').append(' \ '); The slash (\) escapes the newline, allowing the string to span multiple lines | jQuery new line \n Possible Duplicate: What's the cleanest way to write a multiline string in JavaScript? How does one go onto a new line in writing jQuery code not the actual output of the code, for example: $('#foo').append(' '+\n+' '); Something like that. | TITLE:
jQuery new line \n
QUESTION:
Possible Duplicate: What's the cleanest way to write a multiline string in JavaScript? How does one go onto a new line in writing jQuery code not the actual output of the code, for example: $('#foo').append(' '+\n+' '); Something like that.
ANSWER:
$('#foo').append(' \ '); The slas... | [
"javascript",
"jquery",
"newline",
"line"
] | 6 | 17 | 18,430 | 1 | 0 | 2011-06-05T23:44:49.517000 | 2011-06-05T23:47:48.910000 |
6,246,692 | 6,254,507 | Rails heroku logs not working | When I run heroku logs nothing happens. The command line get just rendered. No log is given. My git console: Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master) $ heroku logs
Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master) $ | Heroku had an issue with logging that unfortunately went undetected for a while. It should be back to normal now. Please file a support ticket if you're still seeing issues. http://status.heroku.com/incident/162 https://support.heroku.com/ | Rails heroku logs not working When I run heroku logs nothing happens. The command line get just rendered. No log is given. My git console: Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master) $ heroku logs
Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master) $ | TITLE:
Rails heroku logs not working
QUESTION:
When I run heroku logs nothing happens. The command line get just rendered. No log is given. My git console: Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master) $ heroku logs
Iceberg@ICEBERG-PC /c/rails/konkurranceportalen (master) $
ANSWER:
Heroku had an issue wit... | [
"ruby-on-rails",
"ruby-on-rails-3",
"heroku"
] | 2 | 1 | 1,259 | 2 | 0 | 2011-06-05T23:45:04.703000 | 2011-06-06T15:42:05.787000 |
6,246,708 | 6,246,720 | Why do I get a weird result for this sum using Android's Java? | So I'm doing something very simple. I have two instance variables, newX and newY. These are both doubles initialized to 0.0. During an update loop I perform this calculation: long now = System.currentTimeMillis(); double elapsed = (now - mNextTime)/1000.0; // convert to seconds Log.i("nx", newX + " + " + elapsed + " = ... | Notice the E9. You are looking at very large numbers. 1E9 = 1,000,000,000 so 1.3073173811609962E9 + 0.058 = 1,307,317,381.21899623 | Why do I get a weird result for this sum using Android's Java? So I'm doing something very simple. I have two instance variables, newX and newY. These are both doubles initialized to 0.0. During an update loop I perform this calculation: long now = System.currentTimeMillis(); double elapsed = (now - mNextTime)/1000.0; ... | TITLE:
Why do I get a weird result for this sum using Android's Java?
QUESTION:
So I'm doing something very simple. I have two instance variables, newX and newY. These are both doubles initialized to 0.0. During an update loop I perform this calculation: long now = System.currentTimeMillis(); double elapsed = (now - m... | [
"java",
"android",
"double"
] | 0 | 7 | 75 | 1 | 0 | 2011-06-05T23:48:06.787000 | 2011-06-05T23:51:05.883000 |
6,246,710 | 6,246,933 | JS aren't objects saved in the DOM? | I have this script working with jquery and uploadify $('#uploader').uploadify({ 'uploader': '/admin/includes/uploadify/uploadify.swf', 'script': '/admin/includes/uploadify/uploadify_storage.php', 'scriptData': {'sessionId': sessionId}, 'cancelImg': '/admin/includes/uploadify/cancel.png', 'buttonImg': '/site_images/add_... | In the onComplete function that you've posted, you're logging ul_sub and not sub_ul as you seem to want to. Unless in set_path() you set the value for a global variable named path, I don't see how you would get the same value in those two different functions - the variable path within the click handler is scoped to tha... | JS aren't objects saved in the DOM? I have this script working with jquery and uploadify $('#uploader').uploadify({ 'uploader': '/admin/includes/uploadify/uploadify.swf', 'script': '/admin/includes/uploadify/uploadify_storage.php', 'scriptData': {'sessionId': sessionId}, 'cancelImg': '/admin/includes/uploadify/cancel.p... | TITLE:
JS aren't objects saved in the DOM?
QUESTION:
I have this script working with jquery and uploadify $('#uploader').uploadify({ 'uploader': '/admin/includes/uploadify/uploadify.swf', 'script': '/admin/includes/uploadify/uploadify_storage.php', 'scriptData': {'sessionId': sessionId}, 'cancelImg': '/admin/includes/... | [
"javascript",
"jquery",
"dom"
] | 0 | 2 | 98 | 1 | 0 | 2011-06-05T23:48:27.037000 | 2011-06-06T00:45:59.717000 |
6,246,722 | 6,246,787 | why doesn't this applet work/display the image? | I am new to Applets, and am trying to get comfortable with some basics - like how to display a jpg image in one. I've read what I think are the relevant parts of the Java Tutorials on Applets, and I don't understand why this doesn't work, all I get is a blank applet area. "/cards/as.jpg" - that file exists in subdirect... | I think it's your layouts. Normally a contentPane uses BorderLayout by default, but when you use your own JPanel as contentPane, you're using the JPanel default layout which is FlowLayout, and components added to a container using FlowLayout won't expand to fill the container as they would with BorderLayout. Check to s... | why doesn't this applet work/display the image? I am new to Applets, and am trying to get comfortable with some basics - like how to display a jpg image in one. I've read what I think are the relevant parts of the Java Tutorials on Applets, and I don't understand why this doesn't work, all I get is a blank applet area.... | TITLE:
why doesn't this applet work/display the image?
QUESTION:
I am new to Applets, and am trying to get comfortable with some basics - like how to display a jpg image in one. I've read what I think are the relevant parts of the Java Tutorials on Applets, and I don't understand why this doesn't work, all I get is a ... | [
"java",
"swing",
"applet"
] | 1 | 2 | 996 | 2 | 0 | 2011-06-05T23:51:25.837000 | 2011-06-06T00:05:15.430000 |
6,246,724 | 6,246,811 | Calculate number of days between two given dates | Can anyone correct the error in my script to calculate the number of days between 2 dates. The dates have been input through a form, the variable info is as followed: [departon] => Array ( [0] => 1 [1] => June [2] => 2011 ) [returnon] => Array ( [0] => 31 [1] => June [2] => 2011 ) I have written the code to calculate t... | Here's an easy way: $depart = strtotime(implode(' ', $_POST['departon'])); $return = strtotime(implode(' ', $_POST['returnon']));
$diff = floor(($return - $depart) / (60 * 60 * 24)); Note: there's only 30 days in June. | Calculate number of days between two given dates Can anyone correct the error in my script to calculate the number of days between 2 dates. The dates have been input through a form, the variable info is as followed: [departon] => Array ( [0] => 1 [1] => June [2] => 2011 ) [returnon] => Array ( [0] => 31 [1] => June [2]... | TITLE:
Calculate number of days between two given dates
QUESTION:
Can anyone correct the error in my script to calculate the number of days between 2 dates. The dates have been input through a form, the variable info is as followed: [departon] => Array ( [0] => 1 [1] => June [2] => 2011 ) [returnon] => Array ( [0] => ... | [
"php",
"date"
] | 1 | 2 | 1,854 | 3 | 0 | 2011-06-05T23:51:33.907000 | 2011-06-06T00:12:06.410000 |
6,246,731 | 6,246,749 | Trouble with an auto-submitting form | I'm working on an intermediary form that will gather some data from the user submitted form, and then re-build the form and send it to our authorizer in the appropriate format. Everything is working fine except that I cannot get it to submit this secondary form automatically. I have read several other posts on SO regar... | You will need to add this in a document.ready clause, like this | Trouble with an auto-submitting form I'm working on an intermediary form that will gather some data from the user submitted form, and then re-build the form and send it to our authorizer in the appropriate format. Everything is working fine except that I cannot get it to submit this secondary form automatically. I have... | TITLE:
Trouble with an auto-submitting form
QUESTION:
I'm working on an intermediary form that will gather some data from the user submitted form, and then re-build the form and send it to our authorizer in the appropriate format. Everything is working fine except that I cannot get it to submit this secondary form aut... | [
"jquery",
"forms",
"submit",
"beanstream"
] | 0 | 2 | 270 | 1 | 0 | 2011-06-05T23:52:47.320000 | 2011-06-05T23:56:15.087000 |
6,246,735 | 6,247,360 | HIBERNATE - JPA2 - H2 - Querying @ElementCollections HashMap by key | I'm using hibernate-entitymanager 3.6.4.Final and h2 database 1.3.155 I'm using the H2Dialect. I'm having trouble filtering records by elements in an @ElementCollection. Here is my entity @Entity public class Item { @Id @GeneratedValue(strategy = GenerationType.AUTO) @MapKeyColumn(name="name", length=50) @Column(name="... | I have exactly the same problem. After hours of dealing with the issue, and after debugging the Hibernate source code, and after checking over and over again the examples in books and in the JPA 2.0 Specification, I decided to give it a try in EclipseLink. So, I created a very simple example: an employee with a map of ... | HIBERNATE - JPA2 - H2 - Querying @ElementCollections HashMap by key I'm using hibernate-entitymanager 3.6.4.Final and h2 database 1.3.155 I'm using the H2Dialect. I'm having trouble filtering records by elements in an @ElementCollection. Here is my entity @Entity public class Item { @Id @GeneratedValue(strategy = Gener... | TITLE:
HIBERNATE - JPA2 - H2 - Querying @ElementCollections HashMap by key
QUESTION:
I'm using hibernate-entitymanager 3.6.4.Final and h2 database 1.3.155 I'm using the H2Dialect. I'm having trouble filtering records by elements in an @ElementCollection. Here is my entity @Entity public class Item { @Id @GeneratedValu... | [
"hibernate",
"hashmap",
"filtering",
"jpa-2.0",
"h2"
] | 3 | 7 | 9,251 | 1 | 0 | 2011-06-05T23:53:25.897000 | 2011-06-06T02:39:25.790000 |
6,246,739 | 6,246,805 | Security Flaw in my Python Program | I am working on a small program that requires the user to insert a USB Flash Drive (pre configured) to login to the system. The way it works right now is you log in to the windows OS, like usual. Then the script checks for the USB key, and if found, closes. But, if the key isn't found, the a dialog appears for the user... | From your comments, you're logging the user into a Windows session. You won't be able to secure the system with the scheme you've set up - you've discovered the first of what will be many easily-exploited vulnerabilities. Look into credential providers (and GINA for editions of Windows older than Vista) - they're reall... | Security Flaw in my Python Program I am working on a small program that requires the user to insert a USB Flash Drive (pre configured) to login to the system. The way it works right now is you log in to the windows OS, like usual. Then the script checks for the USB key, and if found, closes. But, if the key isn't found... | TITLE:
Security Flaw in my Python Program
QUESTION:
I am working on a small program that requires the user to insert a USB Flash Drive (pre configured) to login to the system. The way it works right now is you log in to the windows OS, like usual. Then the script checks for the USB key, and if found, closes. But, if t... | [
"python",
"windows",
"security",
"usb"
] | 1 | 4 | 201 | 1 | 0 | 2011-06-05T23:54:18.757000 | 2011-06-06T00:10:41.963000 |
6,246,741 | 6,246,751 | How do I import a base.sql file | I got a base.sql file from a Google Code repository but I don`t know how to set it up on my MAMP so I can use the database. How do I import a base.sql file into a self-hosted mysql directory? | Use the mysql command: mysql -u user -ppassword -h hostname database < base.sql | How do I import a base.sql file I got a base.sql file from a Google Code repository but I don`t know how to set it up on my MAMP so I can use the database. How do I import a base.sql file into a self-hosted mysql directory? | TITLE:
How do I import a base.sql file
QUESTION:
I got a base.sql file from a Google Code repository but I don`t know how to set it up on my MAMP so I can use the database. How do I import a base.sql file into a self-hosted mysql directory?
ANSWER:
Use the mysql command: mysql -u user -ppassword -h hostname database ... | [
"mysql"
] | 0 | 4 | 69 | 1 | 0 | 2011-06-05T23:54:36.247000 | 2011-06-05T23:56:19.830000 |
6,246,746 | 6,246,932 | Create Class from another class | I want to make a class that creates an element with a few properties added on to it. So far this is what my code looks like: function CreateItem(n,u) { this=document.createElement('li'); this.classList.add('ui-state-default'); this.setAttribute('value',u); this.innerHTML=n; } It doesn't work. I keep getting an error: R... | I want to make a class that creates an element with a few properties added on to it. So far this is what my code looks like: Javascript doesn't have classes, what you are attempting to write is a function. > function CreateItem(n,u) { By convention, function names starting with a capital letter are constructors and sho... | Create Class from another class I want to make a class that creates an element with a few properties added on to it. So far this is what my code looks like: function CreateItem(n,u) { this=document.createElement('li'); this.classList.add('ui-state-default'); this.setAttribute('value',u); this.innerHTML=n; } It doesn't ... | TITLE:
Create Class from another class
QUESTION:
I want to make a class that creates an element with a few properties added on to it. So far this is what my code looks like: function CreateItem(n,u) { this=document.createElement('li'); this.classList.add('ui-state-default'); this.setAttribute('value',u); this.innerHTM... | [
"javascript",
"class"
] | 0 | 2 | 233 | 3 | 0 | 2011-06-05T23:56:02.233000 | 2011-06-06T00:45:50.200000 |
6,246,773 | 6,252,567 | Where do the Locator methods go when using a ServiceLocator? | If I use separate service classes with a ServiceLocator, do I still need to define the Locator methods somewhere?: T create(Class clazz) I getId(T domainObject) T find(Class clazz, I id) Object getVersion(T domainObject) Do they go on the service class? | In general, these two types serve orthogonal purposes: A ServiceLocator finds code; a Locator finds entities. Using a ServiceLocator does not change where the entity support methods are declared. The entity support methods are still searched for in the domain types. | Where do the Locator methods go when using a ServiceLocator? If I use separate service classes with a ServiceLocator, do I still need to define the Locator methods somewhere?: T create(Class clazz) I getId(T domainObject) T find(Class clazz, I id) Object getVersion(T domainObject) Do they go on the service class? | TITLE:
Where do the Locator methods go when using a ServiceLocator?
QUESTION:
If I use separate service classes with a ServiceLocator, do I still need to define the Locator methods somewhere?: T create(Class clazz) I getId(T domainObject) T find(Class clazz, I id) Object getVersion(T domainObject) Do they go on the se... | [
"gwt",
"requestfactory",
"service-locator"
] | 1 | 1 | 447 | 1 | 0 | 2011-06-06T00:02:16.590000 | 2011-06-06T13:16:28.857000 |
6,246,774 | 6,246,895 | MySQL not decrementing values | I can't get the values in the table Accounts to decrement when I try to delete a post. The values I would like to decrement are "PostCount", "Likes Count" and "CommentsCount". Currently only the "PostCount" works. Please can you tell me what I am doing wrong: $arg = mysql_query("SELECT `numberOfLikes` FROM Posts WHERE ... | I re-coded my if statement containing the code I posted and it is now working perfectly: mysql_query("UPDATE Accounts SET `PostCount` = (`PostCount` - 1) WHERE `id` = '$accountID'"); $query = mysql_query("SELECT * FROM Likes WHERE `postID` = '$postID'") or die(mysql_error()); while($row = mysql_fetch_assoc($query)) { $... | MySQL not decrementing values I can't get the values in the table Accounts to decrement when I try to delete a post. The values I would like to decrement are "PostCount", "Likes Count" and "CommentsCount". Currently only the "PostCount" works. Please can you tell me what I am doing wrong: $arg = mysql_query("SELECT `nu... | TITLE:
MySQL not decrementing values
QUESTION:
I can't get the values in the table Accounts to decrement when I try to delete a post. The values I would like to decrement are "PostCount", "Likes Count" and "CommentsCount". Currently only the "PostCount" works. Please can you tell me what I am doing wrong: $arg = mysql... | [
"php",
"mysql",
"decrement"
] | 0 | 0 | 696 | 2 | 0 | 2011-06-06T00:02:38.567000 | 2011-06-06T00:34:59.783000 |
6,246,778 | 6,246,873 | Problems with Rake after switching to rvm and rails 3 | So the crux of the problem, is I get the following error when running rake -T
WARNING: Global access to Rake DSL methods is deprecated. Please Include... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method SeenicServer::Application#task called at /home/grantismo/.rvm/gems/ruby-1.9.2-... | You need to make sure your Gemfile has a gem 'ParseTree' line in it, otherwise Rails won't load it (even if the system has it installed). After adding the line, do a bundle install. | Problems with Rake after switching to rvm and rails 3 So the crux of the problem, is I get the following error when running rake -T
WARNING: Global access to Rake DSL methods is deprecated. Please Include... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method SeenicServer::Applicatio... | TITLE:
Problems with Rake after switching to rvm and rails 3
QUESTION:
So the crux of the problem, is I get the following error when running rake -T
WARNING: Global access to Rake DSL methods is deprecated. Please Include... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method Seenic... | [
"ruby-on-rails",
"rake",
"rvm"
] | 1 | 3 | 1,426 | 1 | 0 | 2011-06-06T00:03:08.393000 | 2011-06-06T00:29:27.680000 |
6,246,780 | 6,250,602 | CodeIgniter: loading multiple models in the same controller | I searched the whole Internet and either there is no one mentioning my problem, or I'm stupid, or maybe it's just a bad day for coding. What's the situation: controller "source" model "source" model "login" The "login" model is loaded from autoload.php, then in each controller's constructor I have $this->login->check()... | Conventionally, the classname of Models should end with _model, so it not collides with controllers with the same name, so try changing class Login extends CI_Model { to class Login_model extends CI_Model { | CodeIgniter: loading multiple models in the same controller I searched the whole Internet and either there is no one mentioning my problem, or I'm stupid, or maybe it's just a bad day for coding. What's the situation: controller "source" model "source" model "login" The "login" model is loaded from autoload.php, then i... | TITLE:
CodeIgniter: loading multiple models in the same controller
QUESTION:
I searched the whole Internet and either there is no one mentioning my problem, or I'm stupid, or maybe it's just a bad day for coding. What's the situation: controller "source" model "source" model "login" The "login" model is loaded from au... | [
"codeigniter"
] | 4 | 6 | 8,762 | 2 | 0 | 2011-06-06T00:03:31.560000 | 2011-06-06T10:19:08.450000 |
6,246,781 | 6,248,054 | Benchmark application for Qt? | I would like to do some profiling and benchmarking of Qt. The purpose of the profiling and benchmarking is to get the better understanding of Qt, and see what functions take most of the time, where are typical bottlenecks, is it rendering or some event processing, etc. Can anybody suggest me what application to use for... | The SDK comes with a bunch of examples and demo programs. The demo programs cover all the major aspects of Qt. You could use that to benchmark each of them pretty simply. Going with larger apps (like KDE, or QtCreator itself maybe) is going to be much harder because of the complexity of the code and amount of non-Qt st... | Benchmark application for Qt? I would like to do some profiling and benchmarking of Qt. The purpose of the profiling and benchmarking is to get the better understanding of Qt, and see what functions take most of the time, where are typical bottlenecks, is it rendering or some event processing, etc. Can anybody suggest ... | TITLE:
Benchmark application for Qt?
QUESTION:
I would like to do some profiling and benchmarking of Qt. The purpose of the profiling and benchmarking is to get the better understanding of Qt, and see what functions take most of the time, where are typical bottlenecks, is it rendering or some event processing, etc. Ca... | [
"qt",
"profiling",
"benchmarking",
"qtgui"
] | 1 | 2 | 1,094 | 2 | 0 | 2011-06-06T00:04:02.743000 | 2011-06-06T05:19:48.930000 |
6,246,783 | 6,247,327 | Android app uses static method to transfer and plot data | I've been asking questions regarding my Android project that continually plots Bluetooth data in real-time. Basically what I've already done is create a first version of my app by cobbling together some open source code Blueterm and OrientationSensorExample It's been suggested that I add a thread, a handler, a Service,... | This might be a question much better suited for Code Review, rather than here. Perhaps you can reformulate to post it there, or trim it a lot to repost it here. Furthermore, to answer: "It's been suggested that I add a thread, a handler, a Service, or use Async Task, or AIDL, etc. But I don't know how to use any of the... | Android app uses static method to transfer and plot data I've been asking questions regarding my Android project that continually plots Bluetooth data in real-time. Basically what I've already done is create a first version of my app by cobbling together some open source code Blueterm and OrientationSensorExample It's ... | TITLE:
Android app uses static method to transfer and plot data
QUESTION:
I've been asking questions regarding my Android project that continually plots Bluetooth data in real-time. Basically what I've already done is create a first version of my app by cobbling together some open source code Blueterm and OrientationS... | [
"android",
"multithreading",
"static",
"thread-safety"
] | 0 | 2 | 944 | 1 | 0 | 2011-06-06T00:04:07.350000 | 2011-06-06T02:29:56.883000 |
6,246,786 | 6,246,791 | C# SqlCeDataReader rdata FieldCount | I am trying to see if an ID exists in a database in this case it's vetID. To see if the result of the SQL query is successfull I am trying to use rdata.FieldCount FieldCount always seems to return 11 even if the input ID (variable i) is = -400 (an id number that cannot exist in the database). I have also tried with oth... | If you are using a datareader you can't get a rowcount using fieldcount. But if you wanted to leave the query the same you'd do: var mySQLCommand = new SqlCeCommand("SELECT * FROM vets WHERE vetID = @ID", dbCon); mySQLCommand.Parameters.AddWithValue("ID", i); SqlCeDataReader rdata = mySQLCommand.ExecuteReader(); if (rd... | C# SqlCeDataReader rdata FieldCount I am trying to see if an ID exists in a database in this case it's vetID. To see if the result of the SQL query is successfull I am trying to use rdata.FieldCount FieldCount always seems to return 11 even if the input ID (variable i) is = -400 (an id number that cannot exist in the d... | TITLE:
C# SqlCeDataReader rdata FieldCount
QUESTION:
I am trying to see if an ID exists in a database in this case it's vetID. To see if the result of the SQL query is successfull I am trying to use rdata.FieldCount FieldCount always seems to return 11 even if the input ID (variable i) is = -400 (an id number that can... | [
"c#",
"sql",
"database",
"sql-server-ce"
] | 2 | 2 | 3,599 | 4 | 0 | 2011-06-06T00:05:12.623000 | 2011-06-06T00:07:28.890000 |
6,246,795 | 6,246,871 | 2-D Collision crash course | Can anyone give me a reference to sites, blogs, articles, or post themselves a crash course or easy help guide in 2-D collision detection for Android? I looked at collision code from an online tutorial but they didn't explain the collision part of the code - just the part of implementing sprites. I am not using OpenGL,... | colliding rectangles is easiest (actually circles are but with sprites your not using those) for 2 rectangles to collide/overlap some space needs to be shared public class Sprite{ private int left,right;//bounding box left bottom private int top,bottom;
public final boolean collidesWith(Sprite other){ if(this.left>oth... | 2-D Collision crash course Can anyone give me a reference to sites, blogs, articles, or post themselves a crash course or easy help guide in 2-D collision detection for Android? I looked at collision code from an online tutorial but they didn't explain the collision part of the code - just the part of implementing spri... | TITLE:
2-D Collision crash course
QUESTION:
Can anyone give me a reference to sites, blogs, articles, or post themselves a crash course or easy help guide in 2-D collision detection for Android? I looked at collision code from an online tutorial but they didn't explain the collision part of the code - just the part of... | [
"java",
"android",
"collision-detection"
] | 2 | 0 | 296 | 2 | 0 | 2011-06-06T00:08:17.707000 | 2011-06-06T00:28:27.347000 |
6,246,807 | 6,247,214 | CAKEPHP Retrieve post from a Db table skipping the first 2 results | I would like to retrieve data from a specific table in the Db, but skip the first 2 results. Supposed I have the following: An Articles controller with an Index action I would like to use $articles = $this->Articles->find('all'... What code should I use to place those results into the $articles variable. Thanks in adva... | You need to change the offset / limit of your query. http://book.cakephp.org/view/1018/find $articles = $this->Articles->find('all', array('offset' => 2)); | CAKEPHP Retrieve post from a Db table skipping the first 2 results I would like to retrieve data from a specific table in the Db, but skip the first 2 results. Supposed I have the following: An Articles controller with an Index action I would like to use $articles = $this->Articles->find('all'... What code should I use... | TITLE:
CAKEPHP Retrieve post from a Db table skipping the first 2 results
QUESTION:
I would like to retrieve data from a specific table in the Db, but skip the first 2 results. Supposed I have the following: An Articles controller with an Index action I would like to use $articles = $this->Articles->find('all'... What... | [
"cakephp"
] | 1 | 3 | 140 | 1 | 0 | 2011-06-06T00:11:15.803000 | 2011-06-06T02:01:18.513000 |
6,246,810 | 6,246,856 | File name extension to MIME type | Using only JavaScript and framework like dojo/jQuery... Is there a way to find the Content-Type for a particular file name extension? Say if I type in the string "something.pdf", I want to show an alert that says "application/pdf" or "something.html" show "text/html"? | I think you will need to maintain the mappings yourself (you could XHR a physical file and get it, but I doubt you want to do that)... (function() {
var extToMimes = { 'img': 'image/jpeg', 'png': 'image/png',... }
window.getMimeByExt = function(ext) { if (extToMimes.hasOwnProperty(ext)) { return extToMimes[ext]; } re... | File name extension to MIME type Using only JavaScript and framework like dojo/jQuery... Is there a way to find the Content-Type for a particular file name extension? Say if I type in the string "something.pdf", I want to show an alert that says "application/pdf" or "something.html" show "text/html"? | TITLE:
File name extension to MIME type
QUESTION:
Using only JavaScript and framework like dojo/jQuery... Is there a way to find the Content-Type for a particular file name extension? Say if I type in the string "something.pdf", I want to show an alert that says "application/pdf" or "something.html" show "text/html"?
... | [
"javascript",
"jquery",
"dojo",
"mime-types"
] | 13 | 8 | 33,927 | 3 | 0 | 2011-06-06T00:11:56.227000 | 2011-06-06T00:23:46.557000 |
6,246,819 | 6,246,827 | How can I implement AND and OR operations in C++ | I have an assignment that I'm supposed to implement the MIPS processor in C++ and one of the MIPS instructions is "AND" and "OR" the MIPS instruction is represented as and $s1,$s2,$s3 which means that $s1=$s2(and)$s3 the $s2 and $s3 registers are represented into bits,,, how can I perform the "AND" and "OR" operations ... | There are both binary and logical and and or operators in C++. int a, b = 1;
int x = a | b; // binary OR int x = a & b; // binary AND bool x = a || b; // boolean OR bool x = a && b; // boolean AND | How can I implement AND and OR operations in C++ I have an assignment that I'm supposed to implement the MIPS processor in C++ and one of the MIPS instructions is "AND" and "OR" the MIPS instruction is represented as and $s1,$s2,$s3 which means that $s1=$s2(and)$s3 the $s2 and $s3 registers are represented into bits,,,... | TITLE:
How can I implement AND and OR operations in C++
QUESTION:
I have an assignment that I'm supposed to implement the MIPS processor in C++ and one of the MIPS instructions is "AND" and "OR" the MIPS instruction is represented as and $s1,$s2,$s3 which means that $s1=$s2(and)$s3 the $s2 and $s3 registers are repres... | [
"c++",
"mips",
"instructions"
] | 1 | 6 | 448 | 2 | 0 | 2011-06-06T00:15:07.777000 | 2011-06-06T00:17:23.697000 |
6,246,822 | 6,247,593 | Find prime numbers in c# | before I start asking, I will tell what I did. there was a problem, problem 3, you can go to that link and see what it requires. To solve it, i just wrote a function to find if that number is prime or not. Simple. But, problem 10 requires sum of all prime number under 2 million(2000000), I solve this by simply checking... | A slightly modified version of Ben Voigt: public static void FirstPrime(int limit) { Stopwatch sw = new Stopwatch(); sw.Start(); bool[] composite = new bool[limit]; long sum = 0; int count = 0;
for (int i = 3; i < limit; i++) { if (i % 2 == 1) { if (!composite[i]) { ++count; sum += i; for (int j = i; j < limit; j += 2... | Find prime numbers in c# before I start asking, I will tell what I did. there was a problem, problem 3, you can go to that link and see what it requires. To solve it, i just wrote a function to find if that number is prime or not. Simple. But, problem 10 requires sum of all prime number under 2 million(2000000), I solv... | TITLE:
Find prime numbers in c#
QUESTION:
before I start asking, I will tell what I did. there was a problem, problem 3, you can go to that link and see what it requires. To solve it, i just wrote a function to find if that number is prime or not. Simple. But, problem 10 requires sum of all prime number under 2 millio... | [
"c#",
".net"
] | 2 | 2 | 966 | 3 | 0 | 2011-06-06T00:16:03.863000 | 2011-06-06T03:50:37.530000 |
6,246,825 | 6,251,268 | Convert a prefix expression tree vector to a ORF/Karva notation expression tree vector | Ok, this is a bit of a tricky one. I have a bunch of code that takes expression trees such that: ((a + b)/(c + d) + sqrt(e)) is stored in a vector (I'm using C++ but I just need the algorithm) in the prefix form: +(/(+(a,b),+(c,d)),sqrt(e)) //Brackets are just to help you read it. Each operator and terminal is an eleme... | Just build a tree T. Each node is a tuple (terminal,) or (unary_operator, operand) or (binary_operator, first_operand, second_operand). The operands themselves indexes of nodes in the tree. For instance, the expression a + (b / c), would have the tree T[0] = (+, 1, 2), T[1] = (a,), T[2] = (/, 3, 4), T[3] = (b,), T[4] =... | Convert a prefix expression tree vector to a ORF/Karva notation expression tree vector Ok, this is a bit of a tricky one. I have a bunch of code that takes expression trees such that: ((a + b)/(c + d) + sqrt(e)) is stored in a vector (I'm using C++ but I just need the algorithm) in the prefix form: +(/(+(a,b),+(c,d)),s... | TITLE:
Convert a prefix expression tree vector to a ORF/Karva notation expression tree vector
QUESTION:
Ok, this is a bit of a tricky one. I have a bunch of code that takes expression trees such that: ((a + b)/(c + d) + sqrt(e)) is stored in a vector (I'm using C++ but I just need the algorithm) in the prefix form: +(... | [
"c++",
"algorithm",
"expression-trees",
"prefix-tree"
] | 1 | 0 | 1,178 | 2 | 0 | 2011-06-06T00:16:32.940000 | 2011-06-06T11:21:31.777000 |
6,246,826 | 6,247,548 | How do I avoid multiple queries with :include in Rails? | If I do this post = Post.find_by_id(post_id,:include =>:comments) two queries are performed (one for post data and and another for the post's comments). Then when I do post.comments, another query is not performed because data is already cached. Is there a way to do just one query and still access the comments via post... | No, there is not. This is the intended behavior of:include, since the JOIN approach ultimately comes out to be inefficient. For example, consider the following scenario: the Post model has 3 fields that you need to select, 2 fields for Comment, and this particular post has 100 comments. Rails could run a single JOIN qu... | How do I avoid multiple queries with :include in Rails? If I do this post = Post.find_by_id(post_id,:include =>:comments) two queries are performed (one for post data and and another for the post's comments). Then when I do post.comments, another query is not performed because data is already cached. Is there a way to ... | TITLE:
How do I avoid multiple queries with :include in Rails?
QUESTION:
If I do this post = Post.find_by_id(post_id,:include =>:comments) two queries are performed (one for post data and and another for the post's comments). Then when I do post.comments, another query is not performed because data is already cached. ... | [
"ruby-on-rails",
"activerecord"
] | 14 | 37 | 12,092 | 2 | 0 | 2011-06-06T00:17:12.447000 | 2011-06-06T03:34:54.537000 |
6,246,837 | 6,246,925 | JQuery mobile form loses formatting after first view | I have a page in JQuery mobile, which contains a form. The form has both static elements (defined in the html) and dynamic elements (created through script at runtime). The first time I go to my page, it renders correctly, with the JQuery mobile formatting. If I go back, then open the form again, all formatting of dyna... | Not sure what's going wrong. But I do feel that perhaps deleting and adding new dom elements is not really nescesairy. Also you may place everything in the document.ready wrapper to prevent errors. Somehow there's a problem with #elementContainer being emptied. A workaround is do dynamically create it and afterwards de... | JQuery mobile form loses formatting after first view I have a page in JQuery mobile, which contains a form. The form has both static elements (defined in the html) and dynamic elements (created through script at runtime). The first time I go to my page, it renders correctly, with the JQuery mobile formatting. If I go b... | TITLE:
JQuery mobile form loses formatting after first view
QUESTION:
I have a page in JQuery mobile, which contains a form. The form has both static elements (defined in the html) and dynamic elements (created through script at runtime). The first time I go to my page, it renders correctly, with the JQuery mobile for... | [
"javascript",
"jquery",
"jquery-mobile"
] | 2 | 1 | 1,900 | 1 | 0 | 2011-06-06T00:19:13.497000 | 2011-06-06T00:43:54.863000 |
6,246,842 | 6,246,869 | removeData causing the value to revert to the value of | According to the documentation,.removeData() will cause the value of the property being removed to revert to the value of the data attribute of the same name in the DOM. Q: What does that mean? | Given this (initial) HTML source code: Consider this code: div.data('x'); // returns 1
div.data('x', 2);
div.data('x'); // returns 2
div.removeData('x');
div.data('x'); // returns 1 (where div refers to the DIV object in the DOM.) Live demo: http://jsfiddle.net/DyGBB/ So, data('x') will initially return the value o... | removeData causing the value to revert to the value of According to the documentation,.removeData() will cause the value of the property being removed to revert to the value of the data attribute of the same name in the DOM. Q: What does that mean? | TITLE:
removeData causing the value to revert to the value of
QUESTION:
According to the documentation,.removeData() will cause the value of the property being removed to revert to the value of the data attribute of the same name in the DOM. Q: What does that mean?
ANSWER:
Given this (initial) HTML source code: Consi... | [
"jquery"
] | 0 | 2 | 79 | 2 | 0 | 2011-06-06T00:20:40.247000 | 2011-06-06T00:27:40.567000 |
6,246,852 | 6,246,879 | Detect undisposed instances of a class in a running process? | I have an IIS Application, that runs in w3wp.exe. I'm not 100% sure if one of my classes is disposed and increases memory footprint over time (just looking at Memory usage in Task Manager isn't that reliable). Is there a simple way to take a memory dump (that's easy in Win2008, through Task Manager), load it into WinDb... | Is there a simple way to take a memory dump (that's easy in Win2008, through Task Manager), load it into WinDbg or Visual Studio and just ask "How many instances of Foo.Bar are in this memory dump? You can use Proc Dump to get the memory dump. In WinDbg!dumpheap –stat will give you the allocation by type If you use!dum... | Detect undisposed instances of a class in a running process? I have an IIS Application, that runs in w3wp.exe. I'm not 100% sure if one of my classes is disposed and increases memory footprint over time (just looking at Memory usage in Task Manager isn't that reliable). Is there a simple way to take a memory dump (that... | TITLE:
Detect undisposed instances of a class in a running process?
QUESTION:
I have an IIS Application, that runs in w3wp.exe. I'm not 100% sure if one of my classes is disposed and increases memory footprint over time (just looking at Memory usage in Task Manager isn't that reliable). Is there a simple way to take a... | [
".net",
"debugging",
"windbg"
] | 4 | 4 | 390 | 2 | 0 | 2011-06-06T00:23:12.077000 | 2011-06-06T00:31:20.793000 |
6,246,861 | 6,246,876 | what would be a good hash function for an integer tuple? | I have this class... public class StartStopTouple {
public int iStart; public int iStop; public int iHashCode;
public StartStopTouple(String start, String stop) { this.iStart = Integer.parseInt(start); this.iStop = Integer.parseInt(stop); }
@Override public boolean equals(Object theObject) {
// check if 'theObject'... | I'd be tempted to use this, particularly since you're going to memoize it: Long.valueOf((((long) iStart) << 32) | istop)).hashcode(); | what would be a good hash function for an integer tuple? I have this class... public class StartStopTouple {
public int iStart; public int iStop; public int iHashCode;
public StartStopTouple(String start, String stop) { this.iStart = Integer.parseInt(start); this.iStop = Integer.parseInt(stop); }
@Override public bo... | TITLE:
what would be a good hash function for an integer tuple?
QUESTION:
I have this class... public class StartStopTouple {
public int iStart; public int iStop; public int iHashCode;
public StartStopTouple(String start, String stop) { this.iStart = Integer.parseInt(start); this.iStop = Integer.parseInt(stop); }
@... | [
"java",
"hashcode",
"integer-hashing"
] | 1 | 2 | 2,948 | 3 | 0 | 2011-06-06T00:25:19.013000 | 2011-06-06T00:30:05.020000 |
6,246,865 | 6,246,883 | mySQL > help for a Complex ORDER by query | I am not an expert on SQL, so I am asking here some help about the following case: I have 2 tables; 1 table "task" (ID,TITLE,CREATEDAT) and 1 table "activity" (ID,TASK_ID,TITLE,CREATEDAT) where CREATEDAT are a DATETIME column. I would like to list the tasks ordering by last CREATEDAT column, in task and activity! I mea... | To order tasks by most recent activity or creation date if there is no activity on the task: SELECT t.id, t.title FROM task AS t LEFT JOIN activity AS a ON t.id=a.task_id GROUP BY t.id ORDER BY COALESCE(MAX(a.createdat), t.createdat) DESC | mySQL > help for a Complex ORDER by query I am not an expert on SQL, so I am asking here some help about the following case: I have 2 tables; 1 table "task" (ID,TITLE,CREATEDAT) and 1 table "activity" (ID,TASK_ID,TITLE,CREATEDAT) where CREATEDAT are a DATETIME column. I would like to list the tasks ordering by last CRE... | TITLE:
mySQL > help for a Complex ORDER by query
QUESTION:
I am not an expert on SQL, so I am asking here some help about the following case: I have 2 tables; 1 table "task" (ID,TITLE,CREATEDAT) and 1 table "activity" (ID,TASK_ID,TITLE,CREATEDAT) where CREATEDAT are a DATETIME column. I would like to list the tasks or... | [
"mysql",
"sql",
"sql-order-by",
"left-join"
] | 2 | 2 | 537 | 3 | 0 | 2011-06-06T00:26:18.533000 | 2011-06-06T00:32:27.410000 |
6,246,867 | 6,246,892 | What's this? [field:SecurityCritical] | Looking at System.Windows.Threading.Dispatcher (as decompiled by Reflector) I came across; [field: SecurityCritical] public event DispatcherUnhandledExceptionFilterEventHandler UnhandledExceptionFilter; I don't recognize the 'field' part of the attribute declaration, what is it? Edit: This is how it appears in the refe... | field: is called an attribute target. It lets you specify the target (assembly, return, etc.) for the attribute. See http://msdn.microsoft.com/en-us/library/b3787ac0.aspx for more details. | What's this? [field:SecurityCritical] Looking at System.Windows.Threading.Dispatcher (as decompiled by Reflector) I came across; [field: SecurityCritical] public event DispatcherUnhandledExceptionFilterEventHandler UnhandledExceptionFilter; I don't recognize the 'field' part of the attribute declaration, what is it? Ed... | TITLE:
What's this? [field:SecurityCritical]
QUESTION:
Looking at System.Windows.Threading.Dispatcher (as decompiled by Reflector) I came across; [field: SecurityCritical] public event DispatcherUnhandledExceptionFilterEventHandler UnhandledExceptionFilter; I don't recognize the 'field' part of the attribute declarati... | [
"c#"
] | 6 | 3 | 2,286 | 4 | 0 | 2011-06-06T00:26:52.703000 | 2011-06-06T00:34:02.497000 |
6,246,870 | 6,247,518 | Swipe through UITableView results | What I do now: I have a UITableView that displays results from a search query, when I touch a result in the TableView it loads a subview that displays details of that result. I can swipe across that subview to switch between results like next and previous. All it does is change out the displayed data but it uses the sa... | Instead of instantiating a new view for each result, you could have an array with a few views (3 for example), and reuse them, kinda like the UITableView. When you swipe, you retrieve from your array a view that is not visible on the screen, replace its content, and display it. I guess at the end of your animation, one... | Swipe through UITableView results What I do now: I have a UITableView that displays results from a search query, when I touch a result in the TableView it loads a subview that displays details of that result. I can swipe across that subview to switch between results like next and previous. All it does is change out the... | TITLE:
Swipe through UITableView results
QUESTION:
What I do now: I have a UITableView that displays results from a search query, when I touch a result in the TableView it loads a subview that displays details of that result. I can swipe across that subview to switch between results like next and previous. All it does... | [
"iphone",
"objective-c",
"cocoa-touch"
] | 1 | 1 | 208 | 1 | 0 | 2011-06-06T00:28:23.947000 | 2011-06-06T03:24:53.087000 |
6,246,877 | 6,246,916 | Unspecified template argument | I'm trying to use templates with multiple to pass data onto a function, but using only the first template argument as a filter. Something like this: template class Component {
};
template class Context { public: void add(Component comp) { } }
typedef struct Foo { int x; } Foo; typedef struct Bar { int y; } Bar; Cont... | I think what you probably need to do is change the signature of the 'add' method: template class Context { public: template void add(Component comp) { } }; However, I don't know the details of your problem so this is a mere guess. | Unspecified template argument I'm trying to use templates with multiple to pass data onto a function, but using only the first template argument as a filter. Something like this: template class Component {
};
template class Context { public: void add(Component comp) { } }
typedef struct Foo { int x; } Foo; typedef s... | TITLE:
Unspecified template argument
QUESTION:
I'm trying to use templates with multiple to pass data onto a function, but using only the first template argument as a filter. Something like this: template class Component {
};
template class Context { public: void add(Component comp) { } }
typedef struct Foo { int x... | [
"c++",
"templates"
] | 2 | 1 | 853 | 3 | 0 | 2011-06-06T00:30:35.037000 | 2011-06-06T00:40:26.697000 |
6,246,887 | 6,246,924 | JAVA Linked List Confused on why I can't check a variable against an node in the Linked List? | public static void check(){ String name; System.out.println("Enter Customer Name to CHECK RESERVATION ticket for this Flight: "); Scanner input = new Scanner(System.in); name = input.nextLine(); if (list.contains(name)) { //WHY IS THIS ASKING FOR SEPARATE METHOD? System.out.println(name +" has a Reservation on this FLi... | It seems as if you are creating a own class LinkedList in the top package here: import java.util.*; public class LinkedList { Since your method check() belongs in the airline class in the same package (and without any import of java.util.LinkedList) it will instead use the class you have created and that class doesn't ... | JAVA Linked List Confused on why I can't check a variable against an node in the Linked List? public static void check(){ String name; System.out.println("Enter Customer Name to CHECK RESERVATION ticket for this Flight: "); Scanner input = new Scanner(System.in); name = input.nextLine(); if (list.contains(name)) { //WH... | TITLE:
JAVA Linked List Confused on why I can't check a variable against an node in the Linked List?
QUESTION:
public static void check(){ String name; System.out.println("Enter Customer Name to CHECK RESERVATION ticket for this Flight: "); Scanner input = new Scanner(System.in); name = input.nextLine(); if (list.cont... | [
"java",
"linked-list"
] | 2 | 3 | 1,302 | 2 | 0 | 2011-06-06T00:33:18.313000 | 2011-06-06T00:43:08.740000 |
6,246,893 | 6,259,616 | What is the difference between the CommaIO and Comma7IO classes? | There is no documentation in the help file as to the purpose of the Comma7IO class, just that it extends the CommaIO class. What is the difference? | To support read and write of different formats of external files, MorphX features a range of different Io classes; CommaIo for comma separated files, Comma7Io for comma separated 7 bit files, BinaryIo for binary files and AsciiIo for plain text files. From this link: RE: [Axapta-Knowledge-Village] Somthing cool - IO | What is the difference between the CommaIO and Comma7IO classes? There is no documentation in the help file as to the purpose of the Comma7IO class, just that it extends the CommaIO class. What is the difference? | TITLE:
What is the difference between the CommaIO and Comma7IO classes?
QUESTION:
There is no documentation in the help file as to the purpose of the Comma7IO class, just that it extends the CommaIO class. What is the difference?
ANSWER:
To support read and write of different formats of external files, MorphX feature... | [
"axapta"
] | 3 | 2 | 2,104 | 2 | 0 | 2011-06-06T00:34:47.563000 | 2011-06-07T00:47:46.550000 |
6,246,904 | 6,253,587 | Drawing Multiple rectangles without calling invalidate() | I'm trying to draw multiple rectangles. I want to be able to draw each rectangle by hand though. I can draw one but then once I call invalidate(), of course, the canvas gets cleared. Is there another way to call the onDraw() so that the canvas doesn't get cleared? Here's what I have: I simply have a class which extends... | You could add each rectangle to a list and iterate it onDraw like this: import android.graphics.Rect;
private ArrayList rectangles = new ArrayList ();
@Override public boolean onTouchEvent (MotionEvent event) { //... case MotionEvent.ACTION_UP: rectangles.add(new Rect(xCoor, yCoor, rectW, rectH)); break; //... }
@Ov... | Drawing Multiple rectangles without calling invalidate() I'm trying to draw multiple rectangles. I want to be able to draw each rectangle by hand though. I can draw one but then once I call invalidate(), of course, the canvas gets cleared. Is there another way to call the onDraw() so that the canvas doesn't get cleared... | TITLE:
Drawing Multiple rectangles without calling invalidate()
QUESTION:
I'm trying to draw multiple rectangles. I want to be able to draw each rectangle by hand though. I can draw one but then once I call invalidate(), of course, the canvas gets cleared. Is there another way to call the onDraw() so that the canvas d... | [
"android",
"android-canvas",
"draw",
"invalidation"
] | 2 | 1 | 3,260 | 1 | 0 | 2011-06-06T00:36:53.993000 | 2011-06-06T14:32:50.717000 |
6,246,907 | 6,246,975 | Can deleted .git be restored? | This happened when working with git on Ruby on Rails. several commits and branches were done and created. git version 1.7.3.4 I accidentally deleted the.git folder using git -rf.git but I have all the files and updates done on online git-hub repository. I want the.git folder restored. Questions? Am I totally screwed up... | The only way you can restore a deleted.git folder is by: Cloning it again from somewhere Checking your recycling bin or backup (if no remote repository exists) Since your files are from the online github repository, then its simple. Just clone it again from the directory where you deleted the.git folder: git init git r... | Can deleted .git be restored? This happened when working with git on Ruby on Rails. several commits and branches were done and created. git version 1.7.3.4 I accidentally deleted the.git folder using git -rf.git but I have all the files and updates done on online git-hub repository. I want the.git folder restored. Ques... | TITLE:
Can deleted .git be restored?
QUESTION:
This happened when working with git on Ruby on Rails. several commits and branches were done and created. git version 1.7.3.4 I accidentally deleted the.git folder using git -rf.git but I have all the files and updates done on online git-hub repository. I want the.git fol... | [
"git",
"github"
] | 65 | 85 | 57,355 | 5 | 0 | 2011-06-06T00:37:31.557000 | 2011-06-06T01:01:47.297000 |
6,246,920 | 6,246,946 | Multiple foreign keys per record in sql? | I'm creating an application (using PHP / Codeigniter / MYSQL) for tracking volunteers at events. I'd like multiple volunteers to be able to sign on to each event. I plan on doing this using a table called signup which looks something like this: TABLE SIGNUP ============
VolunteerId EventId ----------- ------- 12 223 1... | Honestly, I don't see a problem with the way you've set it up. Tables like this are commonly used to establish one-to-many relationships between different objects. I'm doing something similar in a table that references counties and cities in a given state. (Some cities span multiple counties.) Database design best prac... | Multiple foreign keys per record in sql? I'm creating an application (using PHP / Codeigniter / MYSQL) for tracking volunteers at events. I'd like multiple volunteers to be able to sign on to each event. I plan on doing this using a table called signup which looks something like this: TABLE SIGNUP ============
Volunte... | TITLE:
Multiple foreign keys per record in sql?
QUESTION:
I'm creating an application (using PHP / Codeigniter / MYSQL) for tracking volunteers at events. I'd like multiple volunteers to be able to sign on to each event. I plan on doing this using a table called signup which looks something like this: TABLE SIGNUP ===... | [
"mysql",
"sql",
"foreign-keys"
] | 0 | 2 | 495 | 4 | 0 | 2011-06-06T00:42:01.383000 | 2011-06-06T00:51:01.043000 |
6,246,921 | 6,246,952 | Button Disappearing on Resize | In a WPF application I'm developing, I intend to have a number of buttons on the left in a separate grid, however, when I resize the application (making it smaller) the button shrinks and eventually disappears. I know there's obviously something I'm overlooking, but I can't find out what it is. Here's the XAML for that... | Your button has a ridiculous margin: Margin="26,44,30,533" This means the button has to be over 500px from the bottom, clippling occurs if the available space is smaller than the top margin + height + bottom margin. ( MSDN article on the layout system & Alignment, Margins & Padding ) | Button Disappearing on Resize In a WPF application I'm developing, I intend to have a number of buttons on the left in a separate grid, however, when I resize the application (making it smaller) the button shrinks and eventually disappears. I know there's obviously something I'm overlooking, but I can't find out what i... | TITLE:
Button Disappearing on Resize
QUESTION:
In a WPF application I'm developing, I intend to have a number of buttons on the left in a separate grid, however, when I resize the application (making it smaller) the button shrinks and eventually disappears. I know there's obviously something I'm overlooking, but I can... | [
"c#",
"wpf",
"layout",
"button",
"resize"
] | 5 | 8 | 3,133 | 1 | 0 | 2011-06-06T00:42:02.897000 | 2011-06-06T00:54:48.813000 |
6,246,922 | 6,247,715 | Play framework Secure module | I haven't really used it yet, but I was reading the tutorial here and from what I understand of it, once you annotate to it inside your controller, it completely blocks the user off, and only shows the form. What I wonder is how you would do to simply hide certain parts of the website. Like show a login form on top whe... | The Play secure module authenticate() stores the 'username' in session upon successful login/authentication. You can make use of this session property in the view to check if user logged in and then change the track accordingly. #{if session.username } #{/if} #{else} #{/else} | Play framework Secure module I haven't really used it yet, but I was reading the tutorial here and from what I understand of it, once you annotate to it inside your controller, it completely blocks the user off, and only shows the form. What I wonder is how you would do to simply hide certain parts of the website. Like... | TITLE:
Play framework Secure module
QUESTION:
I haven't really used it yet, but I was reading the tutorial here and from what I understand of it, once you annotate to it inside your controller, it completely blocks the user off, and only shows the form. What I wonder is how you would do to simply hide certain parts of... | [
"java",
"security",
"authentication",
"playframework"
] | 1 | 3 | 4,602 | 1 | 0 | 2011-06-06T00:42:04.240000 | 2011-06-06T04:18:49.970000 |
6,246,938 | 6,247,003 | Why doesn't http://localhost/ load anything with WAMP? | I recently tried installing WAMP but found that none of the pages will load. It also has an orange W logo, if that means anything. It does say (Tray Icon) that the WAMPserver is online though. I also did some research and found that Skype may cause problems and I removed the Use port 80 and 443 as alternatives for inco... | The orange logo indicates that at least one service failed to start. You might try the following to troubleshoot the underlying reason: Check that the Apache service is running. Left-click the WAMP tray icon and check that under Apache > Service, the option to start the service is disabled/grayed out. If not, your Apac... | Why doesn't http://localhost/ load anything with WAMP? I recently tried installing WAMP but found that none of the pages will load. It also has an orange W logo, if that means anything. It does say (Tray Icon) that the WAMPserver is online though. I also did some research and found that Skype may cause problems and I r... | TITLE:
Why doesn't http://localhost/ load anything with WAMP?
QUESTION:
I recently tried installing WAMP but found that none of the pages will load. It also has an orange W logo, if that means anything. It does say (Tray Icon) that the WAMPserver is online though. I also did some research and found that Skype may caus... | [
"php",
"localhost",
"wamp"
] | 5 | 15 | 34,564 | 3 | 0 | 2011-06-06T00:48:39.480000 | 2011-06-06T01:07:36.050000 |
6,246,944 | 6,258,811 | Port array of strings to array of dictionaries each containing a string | I'm trying to port the strings in an array into an array of dictionaries where each dictionary contains one of the strings and a boolean. Hopefully this makes sense, but I'll try and make a diagram: At the moment I have: - -... But I want: - -- -- - - -- -- -... I've tried creating a loop to cycle through the array of ... | As Daniel pointed out (and I shortly realised through some tests), the fact that the array from NSUserDefaults was nil stopped it from working. | Port array of strings to array of dictionaries each containing a string I'm trying to port the strings in an array into an array of dictionaries where each dictionary contains one of the strings and a boolean. Hopefully this makes sense, but I'll try and make a diagram: At the moment I have: - -... But I want: - -- -- ... | TITLE:
Port array of strings to array of dictionaries each containing a string
QUESTION:
I'm trying to port the strings in an array into an array of dictionaries where each dictionary contains one of the strings and a boolean. Hopefully this makes sense, but I'll try and make a diagram: At the moment I have: - -... Bu... | [
"iphone"
] | 0 | 0 | 90 | 2 | 0 | 2011-06-06T00:49:28.723000 | 2011-06-06T22:38:17.790000 |
6,246,957 | 6,247,108 | Should i avoid using STATIC vaiables | I am designing a java API(not an API exactly) in my office which will contain 4000+ constants. So all the teams can use them directly. Initially i thought to create their classes according to their type and create their static objects into a separate class. So anybody any use them directly. But after reading need of st... | You want to create a location where some 4000+ constants will live. there's the possibility that users of this class may add constants (possibly at runtime)?. T Concern about the memory issues of statics is misplaced. If you need 4000 values, they're going to have to live somewhere, right? If people will be adding valu... | Should i avoid using STATIC vaiables I am designing a java API(not an API exactly) in my office which will contain 4000+ constants. So all the teams can use them directly. Initially i thought to create their classes according to their type and create their static objects into a separate class. So anybody any use them d... | TITLE:
Should i avoid using STATIC vaiables
QUESTION:
I am designing a java API(not an API exactly) in my office which will contain 4000+ constants. So all the teams can use them directly. Initially i thought to create their classes according to their type and create their static objects into a separate class. So anyb... | [
"java",
"performance",
"static"
] | 4 | 4 | 893 | 4 | 0 | 2011-06-06T00:56:12.057000 | 2011-06-06T01:35:00.790000 |
6,246,960 | 6,247,454 | .live not working after ajax $.post | I am trying to use.live to ensure that my elements respond to click events even after an ajax call (in my case i use $.post) so for example after my ajax call i do this: $('.link').live({ click: function() { alert('testing'); } }); it doesn't working. Only if i switch it to using a normal click event like this: $('.lin... | I solved the problem using event bubbling instead. What i did was instead of using.live(), i did this: $('.linkParent').click(function(event) {
$tgt = $(event.target);
if ($tgt.attr('class')=='link') { alert('works now!'); }
}); Such that $('.link') is always inside $('.linkParent') and the ajax call is always only ... | .live not working after ajax $.post I am trying to use.live to ensure that my elements respond to click events even after an ajax call (in my case i use $.post) so for example after my ajax call i do this: $('.link').live({ click: function() { alert('testing'); } }); it doesn't working. Only if i switch it to using a n... | TITLE:
.live not working after ajax $.post
QUESTION:
I am trying to use.live to ensure that my elements respond to click events even after an ajax call (in my case i use $.post) so for example after my ajax call i do this: $('.link').live({ click: function() { alert('testing'); } }); it doesn't working. Only if i swit... | [
"jquery"
] | 1 | 0 | 819 | 3 | 0 | 2011-06-06T00:56:33.003000 | 2011-06-06T03:08:53.143000 |
6,246,963 | 6,261,026 | Django query phone numbers excluding brackets | I am trying to build a django query that filters phone numbers ( CharField ) but excludes brackets eg. if I search for 0123456789 it would find (01) 234 567 89 Thanks | I never like to answer my own questions, but this solution might be helpful to others doing a similar thing: I defined a function on the model using the @property decorator. class MyModel(models.model):.... phoneNumber = CharField...
@property def raw_phone_number(self): # function strips those characters and returns ... | Django query phone numbers excluding brackets I am trying to build a django query that filters phone numbers ( CharField ) but excludes brackets eg. if I search for 0123456789 it would find (01) 234 567 89 Thanks | TITLE:
Django query phone numbers excluding brackets
QUESTION:
I am trying to build a django query that filters phone numbers ( CharField ) but excludes brackets eg. if I search for 0123456789 it would find (01) 234 567 89 Thanks
ANSWER:
I never like to answer my own questions, but this solution might be helpful to o... | [
"python",
"django"
] | 4 | 0 | 545 | 3 | 0 | 2011-06-06T00:56:58.920000 | 2011-06-07T05:41:55.753000 |
6,246,966 | 6,247,094 | Clearing the screen of all sprites for a reset | I can not seem to get the reset to work properly. I tried numerous things and finally the most recent thing I tried was dual for loops to go through and search the screen for a sprite and remove it. This is causing a force close though. If anyone has a better easier method to make it reset the screen of all sprites (ju... | Null pointer Eception: I would suggest adding a if(zom1!= null && zom1.isCollision(W,H)){ if(normZombie!= null && normZombie.remove(zom1) (sorry not sure which is line 269 in Game.java Regarding you removing problem I'm nt sure what your trying to accomplish with the code above if normZombie is a List why not do normZo... | Clearing the screen of all sprites for a reset I can not seem to get the reset to work properly. I tried numerous things and finally the most recent thing I tried was dual for loops to go through and search the screen for a sprite and remove it. This is causing a force close though. If anyone has a better easier method... | TITLE:
Clearing the screen of all sprites for a reset
QUESTION:
I can not seem to get the reset to work properly. I tried numerous things and finally the most recent thing I tried was dual for loops to go through and search the screen for a sprite and remove it. This is causing a force close though. If anyone has a be... | [
"java",
"android"
] | 1 | 1 | 317 | 1 | 0 | 2011-06-06T00:57:46.850000 | 2011-06-06T01:31:48.230000 |
6,246,970 | 6,247,743 | django-social-auth incorrect authentication service | I was trying to use django-social-auth today, but turned out I got an error everytime I tried to login using it. I was using the example found in its git master branch, put in my facebook keys, but when I click to login using facebook, the error "Incorrect authentication service" appears. That also occurs in twitter an... | Well, without seeing your configuration this will simply be a shot in the dark. But the django-social-auth code has this: def complete_process(request, backend): """Authentication complete process""" backend = get_backend(backend, request, request.path) if not backend: return HttpResponseServerError('Incorrect authenti... | django-social-auth incorrect authentication service I was trying to use django-social-auth today, but turned out I got an error everytime I tried to login using it. I was using the example found in its git master branch, put in my facebook keys, but when I click to login using facebook, the error "Incorrect authenticat... | TITLE:
django-social-auth incorrect authentication service
QUESTION:
I was trying to use django-social-auth today, but turned out I got an error everytime I tried to login using it. I was using the example found in its git master branch, put in my facebook keys, but when I click to login using facebook, the error "Inc... | [
"django",
"facebook",
"oauth",
"socialauth"
] | 5 | 1 | 5,599 | 3 | 0 | 2011-06-06T00:59:47.767000 | 2011-06-06T04:25:36.817000 |
6,246,979 | 6,247,819 | How I can create a global exception handler in a DLL? | I am working in a DLL which sometimes raises unhandled exceptions. I am using madExcept to detect and debug the buggy code, but when I finally deploy my DLL I want include my own global exception handler inside the DLL to log the exceptions. So the question is how I can set a global exception handler in my Delphi DLL? | The concept of "a global exception handler" doesn't really exist in DLLs the way it exists in the VCL. To understand why, remember that exceptions propagate by unwinding the stack until they can find a handler. The VCL can install a global exception handler because in a VCL app, everything that happens (excluding start... | How I can create a global exception handler in a DLL? I am working in a DLL which sometimes raises unhandled exceptions. I am using madExcept to detect and debug the buggy code, but when I finally deploy my DLL I want include my own global exception handler inside the DLL to log the exceptions. So the question is how I... | TITLE:
How I can create a global exception handler in a DLL?
QUESTION:
I am working in a DLL which sometimes raises unhandled exceptions. I am using madExcept to detect and debug the buggy code, but when I finally deploy my DLL I want include my own global exception handler inside the DLL to log the exceptions. So the... | [
"delphi",
"delphi-xe"
] | 5 | 10 | 2,183 | 2 | 0 | 2011-06-06T01:02:44.283000 | 2011-06-06T04:39:13.143000 |
6,246,980 | 6,246,993 | Load page with AJAX | If you see Twitter following and followers users pages you can see this thing: there's two tabs called "Following" and "Following" like this: [ Following | Followers ] If you click Following, the page loads the following users page, if you click Followers the page loads the followers users page. When you click Followin... | There are many plugins for jQuery that implement this, and I figure also for other frameworks. See: http://tkyk.github.com/jquery-history-plugin/# | Load page with AJAX If you see Twitter following and followers users pages you can see this thing: there's two tabs called "Following" and "Following" like this: [ Following | Followers ] If you click Following, the page loads the following users page, if you click Followers the page loads the followers users page. Whe... | TITLE:
Load page with AJAX
QUESTION:
If you see Twitter following and followers users pages you can see this thing: there's two tabs called "Following" and "Following" like this: [ Following | Followers ] If you click Following, the page loads the following users page, if you click Followers the page loads the followe... | [
"jquery",
"ajax"
] | 1 | 1 | 137 | 1 | 0 | 2011-06-06T01:02:48.643000 | 2011-06-06T01:05:28.253000 |
6,246,983 | 6,247,423 | Detect the size of an image in HTML, using python | I'm trying to implement a similar functionality to Facebook's thumbnail preview. The idea is, a user enters the URL of a product, and selects the best image of that product. In order to filter out images that obviously aren't a product, I want to filter them based on height and width > 150px. I'm using python and Beaut... | GD is a library that's been around for quite some time and it has a pretty easy interface to work with...Here's a link to GD See the "size" method to get width and height. EDIT Ah, how about this? Parse the HTML content and retrieve URLs to the CSS file(s) and inline styles Download the CSS file(s) and parse CSS files,... | Detect the size of an image in HTML, using python I'm trying to implement a similar functionality to Facebook's thumbnail preview. The idea is, a user enters the URL of a product, and selects the best image of that product. In order to filter out images that obviously aren't a product, I want to filter them based on he... | TITLE:
Detect the size of an image in HTML, using python
QUESTION:
I'm trying to implement a similar functionality to Facebook's thumbnail preview. The idea is, a user enters the URL of a product, and selects the best image of that product. In order to filter out images that obviously aren't a product, I want to filte... | [
"python",
"html",
"css",
"image"
] | 1 | 0 | 529 | 1 | 0 | 2011-06-06T01:03:19.783000 | 2011-06-06T02:57:11.117000 |
6,246,992 | 6,300,702 | How to integrate jquery.bvalidator and jquery.form plugins? | I'm trying to use these plugins to validate ( bValidator ) and submit my form ( Form plugin ), without success: var myvalidator = $('#contForm').bValidator(); if(myvalidator.isValid()) { $('#contForm').ajaxSubmit(function() { alert("Thank you for your message!"); return false; }); } The validation part is ok, however t... | The easiest way to do this is: $('#contForm').bValidator();
$('#contForm').ajaxForm(function() { alert("Thank you for your message!"); });.bValidator() must be called before.ajaxForm() to stop form submit if validation fails. You can also do like this: var myvalidator = $('#contForm').bValidator();
$('#contForm').sub... | How to integrate jquery.bvalidator and jquery.form plugins? I'm trying to use these plugins to validate ( bValidator ) and submit my form ( Form plugin ), without success: var myvalidator = $('#contForm').bValidator(); if(myvalidator.isValid()) { $('#contForm').ajaxSubmit(function() { alert("Thank you for your message!... | TITLE:
How to integrate jquery.bvalidator and jquery.form plugins?
QUESTION:
I'm trying to use these plugins to validate ( bValidator ) and submit my form ( Form plugin ), without success: var myvalidator = $('#contForm').bValidator(); if(myvalidator.isValid()) { $('#contForm').ajaxSubmit(function() { alert("Thank you... | [
"jquery-plugins",
"jquery"
] | 0 | 1 | 1,267 | 2 | 0 | 2011-06-06T01:05:16.993000 | 2011-06-10T00:15:58.800000 |
6,246,995 | 6,247,138 | Protobuf-net v2 Custom List object error | I am trying to serialize/deserialize a List as defined below with protobuf-net v2, and on deserialize I am getting the following exception. Type is not expected, and no contract can be inferred In the example below I am using the WithLengthPrefix calls because this is actually going over a network stream, but the probl... | I believe r403 fixed this bug, as I updated to the latest source as opposed to the v2 beta, and it appears to be fixed. | Protobuf-net v2 Custom List object error I am trying to serialize/deserialize a List as defined below with protobuf-net v2, and on deserialize I am getting the following exception. Type is not expected, and no contract can be inferred In the example below I am using the WithLengthPrefix calls because this is actually g... | TITLE:
Protobuf-net v2 Custom List object error
QUESTION:
I am trying to serialize/deserialize a List as defined below with protobuf-net v2, and on deserialize I am getting the following exception. Type is not expected, and no contract can be inferred In the example below I am using the WithLengthPrefix calls because ... | [
"c#",
"protobuf-net"
] | 1 | 1 | 503 | 1 | 0 | 2011-06-06T01:05:58.877000 | 2011-06-06T01:44:27.360000 |
6,246,997 | 6,247,004 | Java Linked List How to create a node that holds a string and an int? | I have been at this literally all day. I can create linked lists no problem and display/delete the data in them. My problem is though that I am not sure how to create a linked list of flights with each node including a reference to a linked list of passengers? This is an assignment in my advanced Algorithms class. I am... | Create an object that holds a Passenger: public class Passenger { private String name; private int id; } Then give Flight a List of Passengers: public class Flight { private List passengers; } Now you can have a List of Flights: public class Schedule { private List flights; } You needs lots more code in each. Be sure t... | Java Linked List How to create a node that holds a string and an int? I have been at this literally all day. I can create linked lists no problem and display/delete the data in them. My problem is though that I am not sure how to create a linked list of flights with each node including a reference to a linked list of p... | TITLE:
Java Linked List How to create a node that holds a string and an int?
QUESTION:
I have been at this literally all day. I can create linked lists no problem and display/delete the data in them. My problem is though that I am not sure how to create a linked list of flights with each node including a reference to ... | [
"java",
"linked-list"
] | 2 | 4 | 4,513 | 2 | 0 | 2011-06-06T01:06:20.620000 | 2011-06-06T01:08:05.493000 |
6,246,998 | 6,247,140 | POW like server for Lua web development (super simple / no config)? | Is there is simple POW like web development environment for Lua? The idea being, with a single command (no configuration) - you have a self contained web development environment for Lua up and running in seconds. (In case you're not aware, Pow is a Ruby on Rails environment that quickly allows you to begin web developm... | No, there isn't. Pow doesn't serve a language, it makes a connection to a rack-compatible web framework. So if you used a Lua web framework - like, say, Kepler or Orbit, you could write a Rack -compatible loader for it, and then it should Just Work with pow. (The pow devs are already working on figuring out how to do t... | POW like server for Lua web development (super simple / no config)? Is there is simple POW like web development environment for Lua? The idea being, with a single command (no configuration) - you have a self contained web development environment for Lua up and running in seconds. (In case you're not aware, Pow is a Rub... | TITLE:
POW like server for Lua web development (super simple / no config)?
QUESTION:
Is there is simple POW like web development environment for Lua? The idea being, with a single command (no configuration) - you have a self contained web development environment for Lua up and running in seconds. (In case you're not a... | [
"ruby-on-rails",
"lua",
"webserver",
"rack-pow"
] | 2 | 3 | 402 | 2 | 0 | 2011-06-06T01:06:26.467000 | 2011-06-06T01:45:01.300000 |
6,246,999 | 6,247,058 | CSS Content Width/Floating Issue | I have an issue where I am trying to make a content box that in itself will vary in width. Inside this content box there will be 2 other boxes and one of them I will know the exact width and the other one I will not. The issue is that I want to be able to set the width of the content I know and then have the other cont... | You could move.controls ahead of.title in the source and then remove the float from.title. This will keep the controls and title on the same line but cause the title to wrap under controls. To stop the wrapping, you could give.title a right margin equal to the width of.controls. | CSS Content Width/Floating Issue I have an issue where I am trying to make a content box that in itself will vary in width. Inside this content box there will be 2 other boxes and one of them I will know the exact width and the other one I will not. The issue is that I want to be able to set the width of the content I ... | TITLE:
CSS Content Width/Floating Issue
QUESTION:
I have an issue where I am trying to make a content box that in itself will vary in width. Inside this content box there will be 2 other boxes and one of them I will know the exact width and the other one I will not. The issue is that I want to be able to set the width... | [
"html",
"css",
"stylesheet"
] | 0 | 1 | 86 | 2 | 0 | 2011-06-06T01:07:10.743000 | 2011-06-06T01:21:02.723000 |
6,247,016 | 6,276,188 | How to subForm a subForm with ZendX_Jquery TabContainer/TabPane? | I try to get Zend_From working with nested jquery tabs. I know how to do it with plain HTML/jQuery, and i also have a single tab row working with decorators and so on. (see http://i56.tinypic.com/9zt5qf.jpg for an example) Has anyone managed to subForm a subForm with ZendX_Jquery TabContainer/TabPane? As soon as i add ... | Initialize nested tab with a function and call it onLoad, try to call them in a linear way use headjs, i didn't used or managed to use like u but sort of same situation and be sure ZendX_Jquery is using same version as nested tabs do | How to subForm a subForm with ZendX_Jquery TabContainer/TabPane? I try to get Zend_From working with nested jquery tabs. I know how to do it with plain HTML/jQuery, and i also have a single tab row working with decorators and so on. (see http://i56.tinypic.com/9zt5qf.jpg for an example) Has anyone managed to subForm a ... | TITLE:
How to subForm a subForm with ZendX_Jquery TabContainer/TabPane?
QUESTION:
I try to get Zend_From working with nested jquery tabs. I know how to do it with plain HTML/jQuery, and i also have a single tab row working with decorators and so on. (see http://i56.tinypic.com/9zt5qf.jpg for an example) Has anyone man... | [
"php",
"jquery",
"zend-form",
"zendx",
"zend-form-sub-form"
] | 3 | 3 | 1,114 | 2 | 0 | 2011-06-06T01:10:38.137000 | 2011-06-08T08:35:51.347000 |
6,247,017 | 6,247,048 | Unexplained C++ default int values | I've been refactoring some code and I noticed some wonky behavior involving an uninitialized int array: int arr[ARRAY_SIZE]; I set a break-point and it seems all values default to -858993460. Is there something special with this value? Any ideas why they don't default to 0? | -858993460 is, in hex, CCCCCCCC, which Visual Studio puts as default in DEBUG MODE. This is to make it easier for you to notice that you forgot to initialize the variable. In release mode it could be anything. I’m actually unsure why mouseBufferX isn’t an element of 10 items (if this does compile and that isn’t 10 elem... | Unexplained C++ default int values I've been refactoring some code and I noticed some wonky behavior involving an uninitialized int array: int arr[ARRAY_SIZE]; I set a break-point and it seems all values default to -858993460. Is there something special with this value? Any ideas why they don't default to 0? | TITLE:
Unexplained C++ default int values
QUESTION:
I've been refactoring some code and I noticed some wonky behavior involving an uninitialized int array: int arr[ARRAY_SIZE]; I set a break-point and it seems all values default to -858993460. Is there something special with this value? Any ideas why they don't defaul... | [
"c++",
"c",
"visual-studio"
] | 8 | 16 | 15,034 | 6 | 0 | 2011-06-06T01:10:49.250000 | 2011-06-06T01:19:02.150000 |
6,247,018 | 6,247,061 | How do you test code written against AWS API | I'm writing an application in Java that will upload a file up to AWS S3. The file will be given to the application in an argument, not hardcoded. I'd like to write tests to ensure that the file actually gets uploaded to S3. The test will be written before the code for TDD. (I have actually already written the code, but... | The actual uploading and the tests that are doing it are part of your integration testing, not the unit testing. If you wrap the S3 API in a very thin class, you will mock that class for unit testing of your business classes, and you will use the real implementation for integration testing. If you have decided, your bu... | How do you test code written against AWS API I'm writing an application in Java that will upload a file up to AWS S3. The file will be given to the application in an argument, not hardcoded. I'd like to write tests to ensure that the file actually gets uploaded to S3. The test will be written before the code for TDD. (... | TITLE:
How do you test code written against AWS API
QUESTION:
I'm writing an application in Java that will upload a file up to AWS S3. The file will be given to the application in an argument, not hardcoded. I'd like to write tests to ensure that the file actually gets uploaded to S3. The test will be written before t... | [
"java",
"testing",
"junit",
"tdd",
"amazon-web-services"
] | 21 | 29 | 22,921 | 6 | 0 | 2011-06-06T01:11:36.857000 | 2011-06-06T01:22:14.783000 |
6,247,019 | 6,247,051 | PHP array question | This is more of a conceptual question concerning the built in functionality of PHP and arrays. I was wondering if there is any way to do the following: You have an array $a and this array contains 5 elements (0-4) for the purpose of this example. Is there any way to make a new array, which would contain the following: ... | If you just want the five combinations as in your example then: foreach (range(1,5) as $count) { $b[] = implode("/", array_slice($a, 0, $count)); } | PHP array question This is more of a conceptual question concerning the built in functionality of PHP and arrays. I was wondering if there is any way to do the following: You have an array $a and this array contains 5 elements (0-4) for the purpose of this example. Is there any way to make a new array, which would cont... | TITLE:
PHP array question
QUESTION:
This is more of a conceptual question concerning the built in functionality of PHP and arrays. I was wondering if there is any way to do the following: You have an array $a and this array contains 5 elements (0-4) for the purpose of this example. Is there any way to make a new array... | [
"php",
"arrays",
"breadcrumbs"
] | 6 | 4 | 127 | 4 | 0 | 2011-06-06T01:11:38.297000 | 2011-06-06T01:19:58.603000 |
6,247,021 | 6,247,076 | Problem with div element jumping up a few pixels in JQuery animation | I'm using the latest version of JQuery and trying to animate a div to the left of the screen. It's just about fine, except that it jumps up noticeably before actually animating. I've set it up in jsFiddle here http://jsfiddle.net/ns6string/agY2z/ Be sure to click on either 'portfolio' or 'about' to see what I'm dealing... | Firstly: Very odd issue. All you need to do is specify a css value for top: 5% on #menu (should be fine with any value if 5% is not what you want). This will stop the "shake" when you click it. On a side note I noticed that you've specified values for right and left. I would suggest removing the right value. | Problem with div element jumping up a few pixels in JQuery animation I'm using the latest version of JQuery and trying to animate a div to the left of the screen. It's just about fine, except that it jumps up noticeably before actually animating. I've set it up in jsFiddle here http://jsfiddle.net/ns6string/agY2z/ Be s... | TITLE:
Problem with div element jumping up a few pixels in JQuery animation
QUESTION:
I'm using the latest version of JQuery and trying to animate a div to the left of the screen. It's just about fine, except that it jumps up noticeably before actually animating. I've set it up in jsFiddle here http://jsfiddle.net/ns6... | [
"javascript",
"jquery",
"html",
"css"
] | 0 | 2 | 1,320 | 1 | 0 | 2011-06-06T01:12:13.350000 | 2011-06-06T01:26:32.207000 |
6,247,025 | 6,247,257 | What should I use to display game graphics? | I have a system in place for a game yet I don't know what I should use to display it. I am making a vertical shooter game and I have written the methods for all the classes controlling enemies and players, but I have not idea how to efficiently display the game. I was thinking a Canvas, that would repaint every frame, ... | If Swing is acceptable, JPanel is double-buffered by default, and a javax.swing.Timer with a period of 40 ms will give you ~25 Hz updates. This example shows the basic approach, while this example shows a number of images in motion. I need a coordinate plane. It's not unusual to have the the model and view use differen... | What should I use to display game graphics? I have a system in place for a game yet I don't know what I should use to display it. I am making a vertical shooter game and I have written the methods for all the classes controlling enemies and players, but I have not idea how to efficiently display the game. I was thinkin... | TITLE:
What should I use to display game graphics?
QUESTION:
I have a system in place for a game yet I don't know what I should use to display it. I am making a vertical shooter game and I have written the methods for all the classes controlling enemies and players, but I have not idea how to efficiently display the g... | [
"java",
"graphics"
] | 8 | 4 | 17,778 | 4 | 0 | 2011-06-06T01:13:38.050000 | 2011-06-06T02:11:47.040000 |
6,247,036 | 6,247,128 | Form behavior posting nested resource | I am using Ruby on Rails 3 and I would like to change its conventional behavior on posting a form in order to post from a signup action to the create action instead that from the new action. That is, I would like to use the signup action instead of the (conventional) new action in my User controller and trigger the cre... | SOLUTION The problem did seam to be in the routers.rb. The correct code was resources:users do collection do get 'signup' post 'create' end
resource:profile end | Form behavior posting nested resource I am using Ruby on Rails 3 and I would like to change its conventional behavior on posting a form in order to post from a signup action to the create action instead that from the new action. That is, I would like to use the signup action instead of the (conventional) new action in ... | TITLE:
Form behavior posting nested resource
QUESTION:
I am using Ruby on Rails 3 and I would like to change its conventional behavior on posting a form in order to post from a signup action to the create action instead that from the new action. That is, I would like to use the signup action instead of the (convention... | [
"ruby",
"ruby-on-rails-3",
"forms",
"post",
"redirect"
] | 0 | 0 | 101 | 1 | 0 | 2011-06-06T01:16:23.957000 | 2011-06-06T01:40:27.900000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.