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,241,256 | 6,241,283 | What is the proper way to test a Bash function's return value? | I would like to test a Bash function's return value in an if statement like this: if [[ func arg ]]; then … But I get error messages like: conditional binary operator expected. What is the right way to do this? Is it the following? if [[ $(func arg) ]]; then... | If it was the exit code and not the result, you could just use if func arg; then... If you cannot make the function return a proper exit code (with return N ), and you have to use string results, use Alex Gitelman's answer. $ help if: if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]… [ else COMMANDS; ]... | What is the proper way to test a Bash function's return value? I would like to test a Bash function's return value in an if statement like this: if [[ func arg ]]; then … But I get error messages like: conditional binary operator expected. What is the right way to do this? Is it the following? if [[ $(func arg) ]]; the... | TITLE:
What is the proper way to test a Bash function's return value?
QUESTION:
I would like to test a Bash function's return value in an if statement like this: if [[ func arg ]]; then … But I get error messages like: conditional binary operator expected. What is the right way to do this? Is it the following? if [[ $... | [
"bash",
"function",
"syntax"
] | 96 | 102 | 147,420 | 5 | 0 | 2011-06-05T05:53:35.827000 | 2011-06-05T06:02:36.603000 |
6,241,260 | 6,241,288 | Python code hangs while trying to open a named pipe for reading | I am trying to setup two way communication between a daemon and a client using named pipes. The code hangs while trying to open the named pipe used for input Why? class comm(threading.Thread):
def __init__(self): self.srvoutf = './tmp/serverout' self.srvinf = './tmp/serverin' if os.path.exists(self.srvoutf): self.pipe... | From the specification for open(): When opening a FIFO with O_RDONLY or O_WRONLY set: If O_NONBLOCK is set, an open() for reading-only shall return without delay. An open() for writing-only shall return an error if no process currently has the file open for reading. If O_NONBLOCK is clear, an open() for reading-only sh... | Python code hangs while trying to open a named pipe for reading I am trying to setup two way communication between a daemon and a client using named pipes. The code hangs while trying to open the named pipe used for input Why? class comm(threading.Thread):
def __init__(self): self.srvoutf = './tmp/serverout' self.srvi... | TITLE:
Python code hangs while trying to open a named pipe for reading
QUESTION:
I am trying to setup two way communication between a daemon and a client using named pipes. The code hangs while trying to open the named pipe used for input Why? class comm(threading.Thread):
def __init__(self): self.srvoutf = './tmp/se... | [
"python",
"file-io",
"named-pipes",
"nonblocking",
"fifo"
] | 12 | 14 | 9,501 | 1 | 0 | 2011-06-05T05:53:55.730000 | 2011-06-05T06:03:39.073000 |
6,241,266 | 6,241,308 | Making PHP Pages dependent on GET parameters search engine friendly | Say there is an article on a site about sports "Kobe Bryant is the best" 1) Does it make a difference to the google crawler, and for purposes of attaining a high search relevance whether that article is on this page: a) www.sitename.com/sports.php?typeid=1&tid=3 OR on this one: b) www.sitename.com/sports.php?type=baske... | You will need to create a.htaccess file... The code will have to be something like: Options +FollowSymLinks RewriteEngine On
RewriteCond %{SCRIPT_FILENAME}!-d RewriteCond %{SCRIPT_FILENAME}!-f
RewriteRule ^sports/([-a-z]+)*/([a-z-A-Z]+)*/$./sports.php?type=$1&topic=$2 This will rewrite the url so that is accessed by:... | Making PHP Pages dependent on GET parameters search engine friendly Say there is an article on a site about sports "Kobe Bryant is the best" 1) Does it make a difference to the google crawler, and for purposes of attaining a high search relevance whether that article is on this page: a) www.sitename.com/sports.php?type... | TITLE:
Making PHP Pages dependent on GET parameters search engine friendly
QUESTION:
Say there is an article on a site about sports "Kobe Bryant is the best" 1) Does it make a difference to the google crawler, and for purposes of attaining a high search relevance whether that article is on this page: a) www.sitename.c... | [
"php",
"web-crawler",
"pagerank",
"googlebot"
] | 0 | 1 | 249 | 3 | 0 | 2011-06-05T05:57:08.297000 | 2011-06-05T06:09:16.583000 |
6,241,268 | 6,241,449 | jquery toggle dropdown menu problem (css) | i am trying to implement jquery's toggle method to make a dropdown menu, it actually works just fine, the only problem is that the dropdown menu pushed its parent container and it seems like it add some height to it, it kinda hard for me to say this but let me show some of my html and css Html: This is Header Welcome b... | Try to delete overflow:auto. If you have undesired scroll, the problem must be here. | jquery toggle dropdown menu problem (css) i am trying to implement jquery's toggle method to make a dropdown menu, it actually works just fine, the only problem is that the dropdown menu pushed its parent container and it seems like it add some height to it, it kinda hard for me to say this but let me show some of my h... | TITLE:
jquery toggle dropdown menu problem (css)
QUESTION:
i am trying to implement jquery's toggle method to make a dropdown menu, it actually works just fine, the only problem is that the dropdown menu pushed its parent container and it seems like it add some height to it, it kinda hard for me to say this but let me... | [
"jquery",
"css"
] | 1 | 1 | 970 | 2 | 0 | 2011-06-05T05:57:34.500000 | 2011-06-05T06:56:12.640000 |
6,241,270 | 6,241,370 | A file server and its associated clients | I am extremely new to socket programming and I am implementaing a file server that receives request like open(), read(), write(), close() from clients. The file server will process the requests and send the clients the return value of each system call. I don't know what type of socket I need to define(i.e. stream socke... | It depends in part upon your file server design. If you're going for a stateless server, then datagram or stream would be fine. Datagram is relatively nice because your servers and clients don't need to handle partial requests -- the entire contents of the request are contained in the datagram. If you're going for a st... | A file server and its associated clients I am extremely new to socket programming and I am implementaing a file server that receives request like open(), read(), write(), close() from clients. The file server will process the requests and send the clients the return value of each system call. I don't know what type of ... | TITLE:
A file server and its associated clients
QUESTION:
I am extremely new to socket programming and I am implementaing a file server that receives request like open(), read(), write(), close() from clients. The file server will process the requests and send the clients the return value of each system call. I don't ... | [
"c",
"linux",
"sockets",
"fileserver"
] | 0 | 1 | 89 | 2 | 0 | 2011-06-05T05:58:01.707000 | 2011-06-05T06:29:43.533000 |
6,241,271 | 6,241,321 | Parallel Sum for Vectors | Could someone please provide some suggestions on how I can decrease the following for loop's runtime through multithreading? Suppose I also have two vectors called 'a' and 'b'. for (int j = 0; j < 8000; j++){ // Perform an operation and store in the vector 'a' // Add 'a' to 'b' coefficient wise } This for loop is execu... | omp creates threads for your program whereever you insert pragma tag, so it's createing threads for inner tags but the problem is 16 threads are created, each one does 1 operation and then all of them are destroyed using your method. creating and destroying threads take a lot of time so the method you used increases th... | Parallel Sum for Vectors Could someone please provide some suggestions on how I can decrease the following for loop's runtime through multithreading? Suppose I also have two vectors called 'a' and 'b'. for (int j = 0; j < 8000; j++){ // Perform an operation and store in the vector 'a' // Add 'a' to 'b' coefficient wise... | TITLE:
Parallel Sum for Vectors
QUESTION:
Could someone please provide some suggestions on how I can decrease the following for loop's runtime through multithreading? Suppose I also have two vectors called 'a' and 'b'. for (int j = 0; j < 8000; j++){ // Perform an operation and store in the vector 'a' // Add 'a' to 'b... | [
"c++",
"multithreading",
"parallel-processing",
"openmp"
] | 6 | 5 | 3,287 | 3 | 0 | 2011-06-05T05:58:07.370000 | 2011-06-05T06:13:09.760000 |
6,241,273 | 6,241,507 | Reset ObjectOutPutStream to update new object state? | I want to reset ObjectOutPutStream to update the new object state. But why it doesn't effect. The below code outputs "BEFORE" instead of "AFTER"? What's wrong with my code? package test;
import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; impor... | You are writing two copies of an object but only reading one. If you read two objects you will see BEFORE and AFTER. | Reset ObjectOutPutStream to update new object state? I want to reset ObjectOutPutStream to update the new object state. But why it doesn't effect. The below code outputs "BEFORE" instead of "AFTER"? What's wrong with my code? package test;
import java.io.FileInputStream; import java.io.FileOutputStream; import java.io... | TITLE:
Reset ObjectOutPutStream to update new object state?
QUESTION:
I want to reset ObjectOutPutStream to update the new object state. But why it doesn't effect. The below code outputs "BEFORE" instead of "AFTER"? What's wrong with my code? package test;
import java.io.FileInputStream; import java.io.FileOutputStre... | [
"java",
"reset",
"objectoutputstream"
] | 0 | 2 | 2,058 | 1 | 0 | 2011-06-05T05:59:05.703000 | 2011-06-05T07:16:29.220000 |
6,241,275 | 6,241,281 | Move a large instance method to shared, and create an instance stub -- good idea? | Quick question: If I have a very large function/sub in a class that is an instance method (i.e., not Shared ), do I gain or lose anything by moving that to a shared method and then declaring a small stub method for the instance use? I.e., I go from this: Public Sub MyBigMethod(ByVal Foobar As String) If String.IsNullOr... | My thinking is I save on memory size per each instance of the object. This is incorrect, because each instance does not store the method in memory. Instance methods are only stored in memory once. Function instructions are different than class members (which are stored per instance). Furthermore, you gain a bit of a pe... | Move a large instance method to shared, and create an instance stub -- good idea? Quick question: If I have a very large function/sub in a class that is an instance method (i.e., not Shared ), do I gain or lose anything by moving that to a shared method and then declaring a small stub method for the instance use? I.e.,... | TITLE:
Move a large instance method to shared, and create an instance stub -- good idea?
QUESTION:
Quick question: If I have a very large function/sub in a class that is an instance method (i.e., not Shared ), do I gain or lose anything by moving that to a shared method and then declaring a small stub method for the i... | [
"vb.net"
] | 1 | 2 | 277 | 1 | 0 | 2011-06-05T05:59:58.433000 | 2011-06-05T06:01:50.100000 |
6,241,291 | 6,241,424 | Check for recurring numbers in a int[] Java | I want to be able to tell if a any number in an int[] appears 3 or more times? How can I do this? Would be awesome to have method boolean hasTriples(int[] numbers) {
//some code
} | Here is a way to do it without using any extra classes such as the Map class. It might be slower but hopefully is easier to understand. public boolean hasTriples(int[] list) { for (int i = 0; i < list.length; i++){ int duplicates = 0;
for (int j = i+1; j < list.length; j++){ if (list[i] == list[j]) { duplicates++; if ... | Check for recurring numbers in a int[] Java I want to be able to tell if a any number in an int[] appears 3 or more times? How can I do this? Would be awesome to have method boolean hasTriples(int[] numbers) {
//some code
} | TITLE:
Check for recurring numbers in a int[] Java
QUESTION:
I want to be able to tell if a any number in an int[] appears 3 or more times? How can I do this? Would be awesome to have method boolean hasTriples(int[] numbers) {
//some code
}
ANSWER:
Here is a way to do it without using any extra classes such as the ... | [
"java",
"sorting"
] | 0 | 2 | 2,626 | 3 | 0 | 2011-06-05T06:04:27.390000 | 2011-06-05T06:46:31.317000 |
6,241,301 | 6,241,405 | Restrict access to views to debug only | I have a webpage I am working on using asp.net mvc3. I am deploying it via appharbor which is amazing. The entire page is public, so I don't need user authentication or anything like that, but there are administrative pages that only I should be able to access. Rather than have any kind of authentication page with a pa... | A crude way would be to use #if DEBUG... some code here #else... some other code here #end if as: http://haacked.com/archive/2007/09/16/conditional-compilation-constants-and-asp.net.aspx#51205 and Is there an #IF DEBUG for Asp.net markup? | Restrict access to views to debug only I have a webpage I am working on using asp.net mvc3. I am deploying it via appharbor which is amazing. The entire page is public, so I don't need user authentication or anything like that, but there are administrative pages that only I should be able to access. Rather than have an... | TITLE:
Restrict access to views to debug only
QUESTION:
I have a webpage I am working on using asp.net mvc3. I am deploying it via appharbor which is amazing. The entire page is public, so I don't need user authentication or anything like that, but there are administrative pages that only I should be able to access. R... | [
"asp.net-mvc-3",
"access-control",
"appharbor"
] | 2 | 2 | 361 | 2 | 0 | 2011-06-05T06:06:59.497000 | 2011-06-05T06:41:06.980000 |
6,241,318 | 6,241,542 | WPF .NET: OpenSubkey() don't find value in registry | I've created some values in Windows Registry and try to access them from.NET but there is an error. Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("ZvezdnyShop") is null, however there is an such key in Registry REGEDIT http://astzvezdny.newsujet.com/REGEDIT.jpg ERROR IN VS http://astzvezdny.newsujet.com/VS.jp... | The ZvezdnyShop key in your screenshot resides in the 64-bit portion of the registry, so it will only be visible to 64-bit applications. Therefore, if your project targets the x86 platform, the 32-bit application it produces won't see that key. To fix that problem, you can create the key in the 32-bit portion of the re... | WPF .NET: OpenSubkey() don't find value in registry I've created some values in Windows Registry and try to access them from.NET but there is an error. Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("ZvezdnyShop") is null, however there is an such key in Registry REGEDIT http://astzvezdny.newsujet.com/REGEDIT.... | TITLE:
WPF .NET: OpenSubkey() don't find value in registry
QUESTION:
I've created some values in Windows Registry and try to access them from.NET but there is an error. Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("ZvezdnyShop") is null, however there is an such key in Registry REGEDIT http://astzvezdny.new... | [
"c#",
".net",
"wpf",
"registry"
] | 1 | 4 | 1,361 | 1 | 0 | 2011-06-05T06:12:14.663000 | 2011-06-05T07:27:48.890000 |
6,241,319 | 6,241,327 | tfs: delete files on the repository server and leave them locally | I have accidentally checked in some files that I meant keeping locally on my machine. How do I delete them from the repository but leave a local copy of them in my solution? Thanks a bunch | There's the obvious brute-force solution of copying the files to a temporary location, fixing source control, then adding them back in to your project. | tfs: delete files on the repository server and leave them locally I have accidentally checked in some files that I meant keeping locally on my machine. How do I delete them from the repository but leave a local copy of them in my solution? Thanks a bunch | TITLE:
tfs: delete files on the repository server and leave them locally
QUESTION:
I have accidentally checked in some files that I meant keeping locally on my machine. How do I delete them from the repository but leave a local copy of them in my solution? Thanks a bunch
ANSWER:
There's the obvious brute-force soluti... | [
"tfs"
] | 1 | 1 | 589 | 1 | 0 | 2011-06-05T06:12:22.567000 | 2011-06-05T06:15:03.453000 |
6,241,323 | 6,242,602 | QNetworkProxy: unset proxy | How to unset the proxy settings in python set by QNetworkProxy.setApplicationProxy? Sultan. | To go back to the application defaults, use QNetworkProxy.setApplicationProxy(QNetworkProxy(QNetworkProxy.DefaultProxy)) if you want to explicitly disable any proxy you can use QNetworkProxy.NoProxy instead. | QNetworkProxy: unset proxy How to unset the proxy settings in python set by QNetworkProxy.setApplicationProxy? Sultan. | TITLE:
QNetworkProxy: unset proxy
QUESTION:
How to unset the proxy settings in python set by QNetworkProxy.setApplicationProxy? Sultan.
ANSWER:
To go back to the application defaults, use QNetworkProxy.setApplicationProxy(QNetworkProxy(QNetworkProxy.DefaultProxy)) if you want to explicitly disable any proxy you can u... | [
"python",
"proxy",
"pyqt",
"qnetworkaccessmanager"
] | 0 | 2 | 709 | 1 | 0 | 2011-06-05T06:13:21.243000 | 2011-06-05T11:25:57.607000 |
6,241,324 | 6,241,331 | Java Importing Packages/.JAR | So, I was just wondering if there was anyway to import the entire Java Framework all at once without having to include the entire list at the header of my file. Or if there's a file I can write which compiles it all together. Unless, this is "java.lang", perhaps? I doubt that's the universal though. I also would like t... | You can use a shortcut of * for package imports. For instance: import java.util.*; IDEs such as Eclipse make it easy to manage imports, however. In Eclipse, for instance, you can press ctrl+shift+O and it will search for any imports for you. (Or command+shift+O on the Mac.) Let the tools do the annoying work. | Java Importing Packages/.JAR So, I was just wondering if there was anyway to import the entire Java Framework all at once without having to include the entire list at the header of my file. Or if there's a file I can write which compiles it all together. Unless, this is "java.lang", perhaps? I doubt that's the universa... | TITLE:
Java Importing Packages/.JAR
QUESTION:
So, I was just wondering if there was anyway to import the entire Java Framework all at once without having to include the entire list at the header of my file. Or if there's a file I can write which compiles it all together. Unless, this is "java.lang", perhaps? I doubt t... | [
"java",
"eclipse",
"import",
"classpath"
] | 0 | 1 | 460 | 2 | 0 | 2011-06-05T06:13:38.843000 | 2011-06-05T06:16:14.860000 |
6,241,326 | 6,241,360 | c# deployment: install additional file in the installation directory | how to install additional file such as some excel or webpage shortcut in the installation directory so that my executable should be able to access that file? please help | In the solution explorer, right click on the file and go to properties. Set "Copy to output directory" to "Copy if newer". You may also need to set "Build action" to "Embedded resource" if it is not already. | c# deployment: install additional file in the installation directory how to install additional file such as some excel or webpage shortcut in the installation directory so that my executable should be able to access that file? please help | TITLE:
c# deployment: install additional file in the installation directory
QUESTION:
how to install additional file such as some excel or webpage shortcut in the installation directory so that my executable should be able to access that file? please help
ANSWER:
In the solution explorer, right click on the file and ... | [
"c#",
"visual-studio-2010",
"deployment",
"clickonce"
] | 3 | 1 | 2,463 | 2 | 0 | 2011-06-05T06:14:39.717000 | 2011-06-05T06:25:17.187000 |
6,241,334 | 6,241,406 | How to have a default value on a jTextField that is being validated? | I want to validate the input of a jTextField and also have a default value set. From what I understand, this code should work, but the default value never appears. If I remove the validation code, the default value appears as it should. Is there a way that I can have my input validation AND have a default value also? m... | Maybe reason is that setText("127.0.0.1") makes insertString be called with a str parameter of "127.0.0.1", which does not match that regexp you are using. So I think you might replace it with "[0-9\.]+" which will match that. | How to have a default value on a jTextField that is being validated? I want to validate the input of a jTextField and also have a default value set. From what I understand, this code should work, but the default value never appears. If I remove the validation code, the default value appears as it should. Is there a way... | TITLE:
How to have a default value on a jTextField that is being validated?
QUESTION:
I want to validate the input of a jTextField and also have a default value set. From what I understand, this code should work, but the default value never appears. If I remove the validation code, the default value appears as it shou... | [
"java",
"swing",
"jtextfield"
] | 2 | 1 | 8,433 | 1 | 0 | 2011-06-05T06:16:44.020000 | 2011-06-05T06:41:20.187000 |
6,241,340 | 6,241,573 | Static SharedPreferences | I have two methods in an activity private void save(String tag, final boolean isChecked) { SharedPreferences sharedPreferences = getPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(tag, isChecked); editor.commit(); }
private boolean load(String tag) { Sh... | You could save and load from Application -wide shared preferences instead of prefs private to the Activity: private static boolean load(String tag) { SharedPreferences sharedPreferences = Context.getApplicationContext().getSharedPreferences("namespace", Context.MODE_PRIVATE); return sharedPreferences.getBoolean(tag, fa... | Static SharedPreferences I have two methods in an activity private void save(String tag, final boolean isChecked) { SharedPreferences sharedPreferences = getPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(tag, isChecked); editor.commit(); }
private bool... | TITLE:
Static SharedPreferences
QUESTION:
I have two methods in an activity private void save(String tag, final boolean isChecked) { SharedPreferences sharedPreferences = getPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(tag, isChecked); editor.commit(... | [
"android",
"static",
"sharedpreferences"
] | 3 | 5 | 7,090 | 1 | 0 | 2011-06-05T06:17:32.757000 | 2011-06-05T07:35:58.947000 |
6,241,344 | 6,241,354 | Set HTML Page background image using jQuery | I want to set page backgroudImage using jQuery. I wrote this code but it is not work. What is the problem? Image is exist var Page = $(this); $(function () { SetBackgroundImage(); });
function SetBackgroundImage() { //Todo read ImagePath from server
var ImageUrl; ImageUrl ="../Images/BackgroudImage.jpg";
try {
Page... | The variable Page currently holds a reference to a jQuery object which is wrappend around the window element. You'll want the jQuery object to wrap around the body tag. To retrieve the body element you'll have to adjust your code a bit, like so: $(function() { $('body').css('background-image', 'url(' + ImageUrl + ')');... | Set HTML Page background image using jQuery I want to set page backgroudImage using jQuery. I wrote this code but it is not work. What is the problem? Image is exist var Page = $(this); $(function () { SetBackgroundImage(); });
function SetBackgroundImage() { //Todo read ImagePath from server
var ImageUrl; ImageUrl =... | TITLE:
Set HTML Page background image using jQuery
QUESTION:
I want to set page backgroudImage using jQuery. I wrote this code but it is not work. What is the problem? Image is exist var Page = $(this); $(function () { SetBackgroundImage(); });
function SetBackgroundImage() { //Todo read ImagePath from server
var Im... | [
"jquery"
] | 0 | 1 | 323 | 1 | 0 | 2011-06-05T06:20:06.313000 | 2011-06-05T06:23:46.797000 |
6,241,350 | 6,243,951 | Still having race condition with boost::mutex | I am trying an example, which causes race condition to apply the mutex. However, even with the mutex, it still happens. What's wrong? Here is my code: #include #include #include using namespace std; class Soldier { private: boost::thread m_Thread; public: static int count, moneySpent; static boost::mutex soldierMutex; ... | Based on this and your previous post (were it does not seem you have read all the answers yet). What you are looking for is some form of synchronization point to prevent the main() thread from exiting the application (because when the main thread exits the application all the children thread die). This is why you call ... | Still having race condition with boost::mutex I am trying an example, which causes race condition to apply the mutex. However, even with the mutex, it still happens. What's wrong? Here is my code: #include #include #include using namespace std; class Soldier { private: boost::thread m_Thread; public: static int count, ... | TITLE:
Still having race condition with boost::mutex
QUESTION:
I am trying an example, which causes race condition to apply the mutex. However, even with the mutex, it still happens. What's wrong? Here is my code: #include #include #include using namespace std; class Soldier { private: boost::thread m_Thread; public: ... | [
"c++",
"boost",
"mutex",
"boost-thread"
] | 2 | 1 | 899 | 2 | 0 | 2011-06-05T06:22:08.683000 | 2011-06-05T15:45:22.280000 |
6,241,357 | 6,241,363 | What data gets sent to the server when I submit from a form? | I would like to issue a submit from my form and have data sent back to the server. Is the only data sent to the server that which appears within the form ( xxx fields etc.) or will the data such as that in the input fields yyy also be sent to the server? xxx yyy | Only the fields within the form will be submitted, in this case only xxx sent back to the server | What data gets sent to the server when I submit from a form? I would like to issue a submit from my form and have data sent back to the server. Is the only data sent to the server that which appears within the form ( xxx fields etc.) or will the data such as that in the input fields yyy also be sent to the server? xxx ... | TITLE:
What data gets sent to the server when I submit from a form?
QUESTION:
I would like to issue a submit from my form and have data sent back to the server. Is the only data sent to the server that which appears within the form ( xxx fields etc.) or will the data such as that in the input fields yyy also be sent t... | [
"html",
"css"
] | 1 | 1 | 135 | 1 | 0 | 2011-06-05T06:24:32.833000 | 2011-06-05T06:27:56.247000 |
6,241,367 | 6,241,442 | Simultaneous video uploads | How does a large video site like YouTube or DailyMotion handle a large amount of simultaneous video uploads. For example, to be able to handle the bandwidth from 1000s of users, what special considerations need to be made in web servers, hardware, etc.? Thank you. | This is what is known as the c10k problem -- how do you handle 10,000 clients simultaneously. The web server software must be well-written, so each server can talk with hundreds or thousands of clients at once. The storage backend must be well-designed, so each server has relatively uncontested write ability to the sto... | Simultaneous video uploads How does a large video site like YouTube or DailyMotion handle a large amount of simultaneous video uploads. For example, to be able to handle the bandwidth from 1000s of users, what special considerations need to be made in web servers, hardware, etc.? Thank you. | TITLE:
Simultaneous video uploads
QUESTION:
How does a large video site like YouTube or DailyMotion handle a large amount of simultaneous video uploads. For example, to be able to handle the bandwidth from 1000s of users, what special considerations need to be made in web servers, hardware, etc.? Thank you.
ANSWER:
T... | [
"video",
"video-streaming"
] | 1 | 2 | 193 | 1 | 0 | 2011-06-05T06:28:32.613000 | 2011-06-05T06:54:45.030000 |
6,241,369 | 6,241,896 | jQuery noconflict() not working | The first script is not working, the second is. The first script is for a collapsible tree and the second for a chart.. when executed separately the output is fine but when i try to implement both in one page, the tree is not produced properly but the chart is ok. | Take a look at this: jQuery(function() {
$.jqplot('chartDiv', [pageHits, rssHits], CreateLineChartOptions()); /*......*/ }); If you like to use the dollar-sign to access jQuery inside the function when using jQuery.noConflict(), you'll need to pass the $ as argument to the function: jQuery(function($) {
$.jqplot('cha... | jQuery noconflict() not working The first script is not working, the second is. The first script is for a collapsible tree and the second for a chart.. when executed separately the output is fine but when i try to implement both in one page, the tree is not produced properly but the chart is ok. | TITLE:
jQuery noconflict() not working
QUESTION:
The first script is not working, the second is. The first script is for a collapsible tree and the second for a chart.. when executed separately the output is fine but when i try to implement both in one page, the tree is not produced properly but the chart is ok.
ANSW... | [
"jquery"
] | 1 | 2 | 2,196 | 1 | 0 | 2011-06-05T06:29:37.433000 | 2011-06-05T08:56:23.940000 |
6,241,371 | 6,241,433 | Use addTarget:action:forControlEvents: method to change a UIImage? | I am intending to add a "blank" star icon on my page which will be changed to a "solid" star when a user clicks on it. I tried to set the UIImage as shown below: UIImage *hotIcon = [UIImage imageNamed:@"blank_star.png"]; Can anyone advise me how I can use the addTarget:action:forControlEvents: method? Can I even use th... | "addTarget: action:" and "removeTarget: action:" is for all UIControls (like UIButton). There is no way you can use it for UIImages directly. There are multiple ways to achieve your requirement. (declare a custom UIControl and implement the way you want). But simplest approach is to use UIButton with required images (a... | Use addTarget:action:forControlEvents: method to change a UIImage? I am intending to add a "blank" star icon on my page which will be changed to a "solid" star when a user clicks on it. I tried to set the UIImage as shown below: UIImage *hotIcon = [UIImage imageNamed:@"blank_star.png"]; Can anyone advise me how I can u... | TITLE:
Use addTarget:action:forControlEvents: method to change a UIImage?
QUESTION:
I am intending to add a "blank" star icon on my page which will be changed to a "solid" star when a user clicks on it. I tried to set the UIImage as shown below: UIImage *hotIcon = [UIImage imageNamed:@"blank_star.png"]; Can anyone adv... | [
"objective-c",
"cocoa-touch",
"ios",
"uiimage",
"uicontrol"
] | 0 | 1 | 994 | 2 | 0 | 2011-06-05T06:29:44.187000 | 2011-06-05T06:49:24.490000 |
6,241,376 | 6,260,069 | How to configure p3p policy on Azure | Our app is hosted in Facebook. As you know, Facebook hosts third party app in an IFrame. You may also know that if a web site in an Iframe, and parent website is on a different domain, then 3rd party (cross domain) cookies that do not have a compact policy will be blocked in IE for Medium privacy settings. So one needs... | On another site (social.msdn.microsoft.com) someone made the following post: Instead of configuring IIS in startup task, we can write the setting in the web.config file in our web role. The setting I used to resolve p3p issue is: The p3p header value is quoted from http://adamyoung.net/IE-Blocking-iFrame-Cookies. Pleas... | How to configure p3p policy on Azure Our app is hosted in Facebook. As you know, Facebook hosts third party app in an IFrame. You may also know that if a web site in an Iframe, and parent website is on a different domain, then 3rd party (cross domain) cookies that do not have a compact policy will be blocked in IE for ... | TITLE:
How to configure p3p policy on Azure
QUESTION:
Our app is hosted in Facebook. As you know, Facebook hosts third party app in an IFrame. You may also know that if a web site in an Iframe, and parent website is on a different domain, then 3rd party (cross domain) cookies that do not have a compact policy will be ... | [
"azure",
"p3p",
"compact-policy"
] | 0 | 7 | 1,674 | 1 | 0 | 2011-06-05T06:30:53.970000 | 2011-06-07T02:25:39.773000 |
6,241,383 | 6,241,729 | Python A* algorithm not searching appropriately | So I'm trying to write a Python implementation of the A* algorithm. My algorithm finds the path to the target without trouble, but when I get the program to visualize the closed and open lists, I notice that the closed list, whenever the obstacles are a little complicated, will balloon into a large, perfect diamond sha... | My theory: it's because Manhattan distance is not admissible in this case, because you can move diagonal as well. Try this: def distance(self, tile1, tile2): self.xDist = abs(tile1.col * TILE_SIZE - tile2.col * TILE_SIZE) self.yDist = abs(tile1.row * TILE_SIZE - tile2.row * TILE_SIZE) self.totalDist = self.diagCost * m... | Python A* algorithm not searching appropriately So I'm trying to write a Python implementation of the A* algorithm. My algorithm finds the path to the target without trouble, but when I get the program to visualize the closed and open lists, I notice that the closed list, whenever the obstacles are a little complicated... | TITLE:
Python A* algorithm not searching appropriately
QUESTION:
So I'm trying to write a Python implementation of the A* algorithm. My algorithm finds the path to the target without trouble, but when I get the program to visualize the closed and open lists, I notice that the closed list, whenever the obstacles are a ... | [
"python",
"pygame",
"a-star"
] | 2 | 1 | 648 | 1 | 0 | 2011-06-05T06:34:36.467000 | 2011-06-05T08:19:36.990000 |
6,241,384 | 6,241,479 | How do I manage ruby threads so they finish all their work? | I have a computation that can be divided into independent units and the way I'm dealing with it now is by creating a fixed number of threads and then handing off chunks of work to be done in each thread. So in pseudo code here's what it looks like # main thread work_units.take(10).each {|work_unit| spawn_thread_for wor... | If you modify spawn_thread_for to save a reference to your created Thread, then you can call Thread#join on the thread to wait for completion: x = Thread.new { sleep 0.1; print "x"; print "y"; print "z" } a = Thread.new { print "a"; print "b"; sleep 0.2; print "c" } x.join # Let the threads finish before a.join # main ... | How do I manage ruby threads so they finish all their work? I have a computation that can be divided into independent units and the way I'm dealing with it now is by creating a fixed number of threads and then handing off chunks of work to be done in each thread. So in pseudo code here's what it looks like # main threa... | TITLE:
How do I manage ruby threads so they finish all their work?
QUESTION:
I have a computation that can be divided into independent units and the way I'm dealing with it now is by creating a fixed number of threads and then handing off chunks of work to be done in each thread. So in pseudo code here's what it looks... | [
"ruby",
"multithreading",
"threadpool"
] | 32 | 23 | 33,008 | 5 | 0 | 2011-06-05T06:34:43.110000 | 2011-06-05T07:06:54.233000 |
6,241,386 | 6,241,413 | How can I reuse a HBITMAP handle? | I have to draw a bitmap multiple times. It's loaded from file. I can reload it every time I have to use it in SelectObject the following way: void drawBitmap(HWND hWnd, int xPos, int yPos) { HBITMAP hBmp = (HBITMAP) LoadImage(NULL, "image.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); HDC hDC = GetDC(hWnd); HDC hdcMem = C... | You are not deleting the memory DC when you are done with it. That means the DC is leaked, and the bitmap is still selected in that leaked DC. And according to the SelectObject documentation: "An application cannot select a single bitmap into more than one DC at a time." So the second SelectObject fails because the bit... | How can I reuse a HBITMAP handle? I have to draw a bitmap multiple times. It's loaded from file. I can reload it every time I have to use it in SelectObject the following way: void drawBitmap(HWND hWnd, int xPos, int yPos) { HBITMAP hBmp = (HBITMAP) LoadImage(NULL, "image.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); HDC... | TITLE:
How can I reuse a HBITMAP handle?
QUESTION:
I have to draw a bitmap multiple times. It's loaded from file. I can reload it every time I have to use it in SelectObject the following way: void drawBitmap(HWND hWnd, int xPos, int yPos) { HBITMAP hBmp = (HBITMAP) LoadImage(NULL, "image.bmp", IMAGE_BITMAP, 0, 0, LR_... | [
"c",
"winapi"
] | 1 | 6 | 1,354 | 1 | 0 | 2011-06-05T06:36:00.597000 | 2011-06-05T06:43:20.657000 |
6,241,389 | 6,241,634 | SyncHashtable this[Object key] does not use locking | I went through the implementation of SyncHashtable in defined in.Net framework BCL. This class provides synchronized access to multiple readers and writers. One of the methods is implemented as public override Object this[Object key] { get { return _table[key]; } set { lock(_table.SyncRoot) { _table[key] = value; } } }... | Locking the Hashtable for reading is not necessary because that is already thread safe under these circumstances. The documentation for Hashtable states: Hashtable is thread safe for use by multiple reader threads and a single writing thread. By locking the write access, there is in effect only a single writer, and it ... | SyncHashtable this[Object key] does not use locking I went through the implementation of SyncHashtable in defined in.Net framework BCL. This class provides synchronized access to multiple readers and writers. One of the methods is implemented as public override Object this[Object key] { get { return _table[key]; } set ... | TITLE:
SyncHashtable this[Object key] does not use locking
QUESTION:
I went through the implementation of SyncHashtable in defined in.Net framework BCL. This class provides synchronized access to multiple readers and writers. One of the methods is implemented as public override Object this[Object key] { get { return _... | [
"c#-3.0",
"clr",
"base-class-library"
] | 2 | 2 | 186 | 2 | 0 | 2011-06-05T06:36:46.107000 | 2011-06-05T07:52:02.397000 |
6,241,396 | 6,241,496 | Problems with AsyncTask and updating UI with ProgressUpdate and Listeners | I am getting a "CalledFromWrongThreadException" error when I try to update a TextView (via a listener) from an AsyncTask onProgressUpdate. If I try to update the same TextView from onPostExecute everything works. I have been testing using code based on https://github.com/commonsguy/cw-android/tree/master/Service/Weathe... | Are you calling onProgressUpdate() from your code? You shouldn't do it. Use publishProgress() method. | Problems with AsyncTask and updating UI with ProgressUpdate and Listeners I am getting a "CalledFromWrongThreadException" error when I try to update a TextView (via a listener) from an AsyncTask onProgressUpdate. If I try to update the same TextView from onPostExecute everything works. I have been testing using code ba... | TITLE:
Problems with AsyncTask and updating UI with ProgressUpdate and Listeners
QUESTION:
I am getting a "CalledFromWrongThreadException" error when I try to update a TextView (via a listener) from an AsyncTask onProgressUpdate. If I try to update the same TextView from onPostExecute everything works. I have been tes... | [
"android",
"listener",
"android-asynctask"
] | 2 | 4 | 1,804 | 2 | 0 | 2011-06-05T06:37:56.717000 | 2011-06-05T07:12:48.877000 |
6,241,404 | 6,242,451 | How to add resource for module in Zend? | I have a test module. I have a class in myproject/application/modules/test/lists/Profiles.php class Test_List_Profiles { // class members } Now when I access this class in myproject/application/modules/test/controllers/ProfileController.php public function indexAction() { $profilesList = new Test_List_Profiles(); } It ... | You should be able to add your list resource in the test module bootstrap class (myproject/application/modules/test/Bootstrap.php) this way: class Test_Bootstrap extends Zend_Application_Module_Bootstrap {
protected function _initAutoload(){
$autoloader = $this->getResourceLoader();
$autoloader->addResourceType('lis... | How to add resource for module in Zend? I have a test module. I have a class in myproject/application/modules/test/lists/Profiles.php class Test_List_Profiles { // class members } Now when I access this class in myproject/application/modules/test/controllers/ProfileController.php public function indexAction() { $profil... | TITLE:
How to add resource for module in Zend?
QUESTION:
I have a test module. I have a class in myproject/application/modules/test/lists/Profiles.php class Test_List_Profiles { // class members } Now when I access this class in myproject/application/modules/test/controllers/ProfileController.php public function index... | [
"php",
"zend-framework",
"module",
"bootstrapping"
] | 1 | 4 | 1,572 | 2 | 0 | 2011-06-05T06:40:04.963000 | 2011-06-05T10:51:28.493000 |
6,241,408 | 6,241,418 | hide extension .php in url mod_rewrite | I have a website in PHP, and I'm trying to hide the extension. I've found a couple of things via Google, but they all seem to be too complicated, or they redirect index to index.php: like if you write name.com/contact it goes to name.com/contact.php. I don't want that, I just want: www.name.com/es/index.php to be www.n... | The htacces file should look like this: RewriteEngine on RewriteCond %{REQUEST_FILENAME}!-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php You redirect any php file in the url with the same name withouth the "php". Then in your php files, you can check to see if the url contains the extension (http:/... | hide extension .php in url mod_rewrite I have a website in PHP, and I'm trying to hide the extension. I've found a couple of things via Google, but they all seem to be too complicated, or they redirect index to index.php: like if you write name.com/contact it goes to name.com/contact.php. I don't want that, I just want... | TITLE:
hide extension .php in url mod_rewrite
QUESTION:
I have a website in PHP, and I'm trying to hide the extension. I've found a couple of things via Google, but they all seem to be too complicated, or they redirect index to index.php: like if you write name.com/contact it goes to name.com/contact.php. I don't want... | [
"php",
"url",
"mod-rewrite"
] | 2 | 8 | 10,830 | 3 | 0 | 2011-06-05T06:41:44.447000 | 2011-06-05T06:44:36.223000 |
6,241,410 | 6,241,737 | how to write insertinto command in hibernate criteria | I want to write the below InsertInto query in Hibernate Criteria. Any Suggestions.. thanks for help sql = "insert into selectedresumes values('" + companyId + "','" + resumeId + "','" + resumeStatusId + "','" + jobId + "')"; | Unfortunately, You can't do it. According to Hibernate documentation http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#batch-direct Only the INSERT INTO... SELECT... form is supported; not the INSERT INTO... VALUES... form. So you just need to create Object and save it using Hibernate and it should ... | how to write insertinto command in hibernate criteria I want to write the below InsertInto query in Hibernate Criteria. Any Suggestions.. thanks for help sql = "insert into selectedresumes values('" + companyId + "','" + resumeId + "','" + resumeStatusId + "','" + jobId + "')"; | TITLE:
how to write insertinto command in hibernate criteria
QUESTION:
I want to write the below InsertInto query in Hibernate Criteria. Any Suggestions.. thanks for help sql = "insert into selectedresumes values('" + companyId + "','" + resumeId + "','" + resumeStatusId + "','" + jobId + "')";
ANSWER:
Unfortunately,... | [
"hibernate",
"criteria"
] | 6 | 2 | 14,498 | 2 | 0 | 2011-06-05T06:42:06.257000 | 2011-06-05T08:20:57.643000 |
6,241,425 | 6,241,592 | script/runner in rails 3 | I have 2 jobs I would like to run and they are dependant on Models in my rails application. I added the ruby files in a separate folder called Jobs, that I have appended to the rail project. Whenever I try to run them via ruby command I get the following error: uninitialized constant Feedback (NameError). Feedback here... | Use rails runner $ rails -h Usage: rails COMMAND [ARGS]... runner Run a piece of code in the application environment
All commands can be run with -h for more information. | script/runner in rails 3 I have 2 jobs I would like to run and they are dependant on Models in my rails application. I added the ruby files in a separate folder called Jobs, that I have appended to the rail project. Whenever I try to run them via ruby command I get the following error: uninitialized constant Feedback (... | TITLE:
script/runner in rails 3
QUESTION:
I have 2 jobs I would like to run and they are dependant on Models in my rails application. I added the ruby files in a separate folder called Jobs, that I have appended to the rail project. Whenever I try to run them via ruby command I get the following error: uninitialized c... | [
"ruby-on-rails",
"ruby",
"daemon"
] | 14 | 24 | 12,554 | 2 | 0 | 2011-06-05T06:46:55.943000 | 2011-06-05T07:42:01.310000 |
6,241,426 | 6,241,495 | VBA: Create Function Programmatically From VSTO Add-In? | Is it possible to create VBA function programmatically from a VSTO add-in? | This link explains the process for doing what you want via VBA: http://www.cpearson.com/excel/vbe.aspx I don't have any experience with VSTO, but the process might map over. Edit: example here... http://mrvsto.com/2010/04/use-vsto-to-add-vba-code/ | VBA: Create Function Programmatically From VSTO Add-In? Is it possible to create VBA function programmatically from a VSTO add-in? | TITLE:
VBA: Create Function Programmatically From VSTO Add-In?
QUESTION:
Is it possible to create VBA function programmatically from a VSTO add-in?
ANSWER:
This link explains the process for doing what you want via VBA: http://www.cpearson.com/excel/vbe.aspx I don't have any experience with VSTO, but the process migh... | [
"excel",
"vba",
"vsto",
"ms-office",
"porting"
] | 1 | 1 | 858 | 1 | 0 | 2011-06-05T06:47:00.343000 | 2011-06-05T07:11:42.743000 |
6,241,430 | 6,241,434 | Reusable code to retrieve data | i have found an very good method for retrieving any result set from the database just by specifying the stored procedure name.i think the code is very much reusable.code is as follows using System.Data; using System.Data.SqlClient;
private DataSet GetFreshData(string sprocName) { using ( SqlConnection conn = new SqlCo... | Easy!:) take a SqlParameter[] as the second argument to the function. Then make sure da.SelectCommand.Parameters is filled with the list of SqlParameter objects in the SqlParameter[] | Reusable code to retrieve data i have found an very good method for retrieving any result set from the database just by specifying the stored procedure name.i think the code is very much reusable.code is as follows using System.Data; using System.Data.SqlClient;
private DataSet GetFreshData(string sprocName) { using (... | TITLE:
Reusable code to retrieve data
QUESTION:
i have found an very good method for retrieving any result set from the database just by specifying the stored procedure name.i think the code is very much reusable.code is as follows using System.Data; using System.Data.SqlClient;
private DataSet GetFreshData(string sp... | [
"asp.net",
"database",
"code-reuse"
] | 0 | 3 | 203 | 1 | 0 | 2011-06-05T06:47:56.867000 | 2011-06-05T06:49:36.207000 |
6,241,431 | 6,241,438 | Server showing php script as it is without executing | I have made a subdomain and uploaded php script on that. but php code is shown there included file are also not shown on page. In description, i have made a sub domain jobs.example.com. All project done in php on locally when is uploaded it to the srever (in the root flder of jobs.example.com). only html css and jquery... | My guess is: may be you might need to set up your subdomain folder to run php files. You might need to setup mime type for.php # Add this line inside the conditional brace AddType application/x-httpd-php.php Referenced from: http://www.php.net/manual/en/install.windows.apache1.php | Server showing php script as it is without executing I have made a subdomain and uploaded php script on that. but php code is shown there included file are also not shown on page. In description, i have made a sub domain jobs.example.com. All project done in php on locally when is uploaded it to the srever (in the root... | TITLE:
Server showing php script as it is without executing
QUESTION:
I have made a subdomain and uploaded php script on that. but php code is shown there included file are also not shown on page. In description, i have made a sub domain jobs.example.com. All project done in php on locally when is uploaded it to the s... | [
"php",
"apache"
] | 1 | 6 | 795 | 1 | 0 | 2011-06-05T06:47:57.180000 | 2011-06-05T06:51:12.853000 |
6,241,437 | 6,241,534 | Conditions on belongs_to | I have this model called Request, which belongs_to a User. class Request < ActiveRecord::Base belongs_to:user,:conditions => "can_make_requests = t" end The User model has a boolean field in its schema named can_make_requests, but for some reason, when I try aUser.requests.create when aUser has can_make_requests as f, ... | You're using the User#requests association, which has no clue about your conditions on Request#user. aUser.requests.create builds and saves a Request object based on any conditions given on the requests association and adds it to the list of associated requests. Sure, Request happens to have a user association, but tha... | Conditions on belongs_to I have this model called Request, which belongs_to a User. class Request < ActiveRecord::Base belongs_to:user,:conditions => "can_make_requests = t" end The User model has a boolean field in its schema named can_make_requests, but for some reason, when I try aUser.requests.create when aUser has... | TITLE:
Conditions on belongs_to
QUESTION:
I have this model called Request, which belongs_to a User. class Request < ActiveRecord::Base belongs_to:user,:conditions => "can_make_requests = t" end The User model has a boolean field in its schema named can_make_requests, but for some reason, when I try aUser.requests.cre... | [
"ruby",
"ruby-on-rails-3",
"model",
"associations"
] | 0 | 1 | 550 | 2 | 0 | 2011-06-05T06:51:09.500000 | 2011-06-05T07:25:34.963000 |
6,241,440 | 6,241,456 | jquery - calculate percentage for each value | I have a function that need to sum up from each input but at the same time every input must show the percentage. I have found the way to sum the value but I am having problem to show the percentage. Below is the HTML code: Price 1: Percentage 1: Price 2: Percentage 2: Price 3: Percentage 3: Price 4: Percentage 4: Total... | I don't know the sytax of javascript so my answer might not be too helpful but all you should need to do is after you calculate the total/sum, do each value divided by the total which wil give you the percent and put that value in the appropriate span. Hope that helps even without any actual code. | jquery - calculate percentage for each value I have a function that need to sum up from each input but at the same time every input must show the percentage. I have found the way to sum the value but I am having problem to show the percentage. Below is the HTML code: Price 1: Percentage 1: Price 2: Percentage 2: Price ... | TITLE:
jquery - calculate percentage for each value
QUESTION:
I have a function that need to sum up from each input but at the same time every input must show the percentage. I have found the way to sum the value but I am having problem to show the percentage. Below is the HTML code: Price 1: Percentage 1: Price 2: Pe... | [
"jquery"
] | 0 | 0 | 4,151 | 2 | 0 | 2011-06-05T06:53:55.200000 | 2011-06-05T06:58:11.300000 |
6,241,441 | 6,244,249 | Why does the Scala library only defines tuples up to Tuple22? | I'm curious if anyone knows why the Scala library stops at 22 with its tuple type Tuple22? Does the mysterious number 22 have a special hidden meaning? Is this an internal joke of some kind? | This question is not new, see http://scala-programming-language.1934581.n4.nabble.com/Why-tuples-only-to-22-td1945314.html or why FunctionN(0-22) ProductN(1-22) TupleN(1-22)? AFAIK there is no "technical" explanation for it, they simply had to stop somewhere. | Why does the Scala library only defines tuples up to Tuple22? I'm curious if anyone knows why the Scala library stops at 22 with its tuple type Tuple22? Does the mysterious number 22 have a special hidden meaning? Is this an internal joke of some kind? | TITLE:
Why does the Scala library only defines tuples up to Tuple22?
QUESTION:
I'm curious if anyone knows why the Scala library stops at 22 with its tuple type Tuple22? Does the mysterious number 22 have a special hidden meaning? Is this an internal joke of some kind?
ANSWER:
This question is not new, see http://sca... | [
"scala"
] | 22 | 11 | 5,534 | 4 | 0 | 2011-06-05T06:54:33.593000 | 2011-06-05T16:34:20.653000 |
6,241,448 | 6,241,505 | What's the most elegant way of keeping track of the last time a python object is accessed? | I have a list of objects in python that I would regularly check and destroy some of them - those which haven't been accessed lately (i.e. no method was called). I can maintain the last time accessed and update it in every method, but is there any more elegant way to achieve this? | Use a decorator for the methods you want wrapped with the timestamp functionality, as @Marcelo Cantos pointed out. Consider this example: from datetime import datetime import time import functools
def t_access(method): @functools.wraps(method) def wrapper(self): self.timestamp = datetime.now() method(self) return wrap... | What's the most elegant way of keeping track of the last time a python object is accessed? I have a list of objects in python that I would regularly check and destroy some of them - those which haven't been accessed lately (i.e. no method was called). I can maintain the last time accessed and update it in every method,... | TITLE:
What's the most elegant way of keeping track of the last time a python object is accessed?
QUESTION:
I have a list of objects in python that I would regularly check and destroy some of them - those which haven't been accessed lately (i.e. no method was called). I can maintain the last time accessed and update i... | [
"python",
"class",
"object",
"tracking"
] | 6 | 6 | 850 | 5 | 0 | 2011-06-05T06:55:39.777000 | 2011-06-05T07:15:17.663000 |
6,241,451 | 6,241,459 | Access to a private method in C# | Hi People I'm newbie in the C# world and I'm having a problem. I have done an array in the Form_Load method of my program, but I need to access the array in a picture_box method like this: private void Form2_Load(object sender, EventArgs e) { //In this method we get a random array to set the images
int[] imgArray = ne... | You need to define int[] imgArray at the class level (outside of Form2_Load) rather than inside it. Otherwise the "scope" of that variable is limited to that function. You will need to knock off the first "int[]" part in Form2_Load to prevent you from just declaring a new variable. For example: public class MyClass { p... | Access to a private method in C# Hi People I'm newbie in the C# world and I'm having a problem. I have done an array in the Form_Load method of my program, but I need to access the array in a picture_box method like this: private void Form2_Load(object sender, EventArgs e) { //In this method we get a random array to se... | TITLE:
Access to a private method in C#
QUESTION:
Hi People I'm newbie in the C# world and I'm having a problem. I have done an array in the Form_Load method of my program, but I need to access the array in a picture_box method like this: private void Form2_Load(object sender, EventArgs e) { //In this method we get a ... | [
"c#",
"arrays",
"private-methods"
] | 1 | 5 | 597 | 2 | 0 | 2011-06-05T06:57:06.267000 | 2011-06-05T06:59:47.540000 |
6,241,452 | 6,241,762 | Haskell Repa --- select function is a bit confusing | I'm a bit confused with select function in repa package: select (\i -> True) (\i -> i) 10 gives the result [0,1,2,3,4,5,6,7,8] I thought i to be between 0 and 10 or 0 and 9. Why is it between 0 and 8? repa 2.0.2.1 | Looks like it produces an array of length len - 1, which is 9 in your case. Which gives you indices in the [0-8] range. I agree that the documentation could be more clear. If you look at the source, select is implemented in terms of selectChunkedP: -- | Select indices matching a predicate, in parallel. -- The array is ... | Haskell Repa --- select function is a bit confusing I'm a bit confused with select function in repa package: select (\i -> True) (\i -> i) 10 gives the result [0,1,2,3,4,5,6,7,8] I thought i to be between 0 and 10 or 0 and 9. Why is it between 0 and 8? repa 2.0.2.1 | TITLE:
Haskell Repa --- select function is a bit confusing
QUESTION:
I'm a bit confused with select function in repa package: select (\i -> True) (\i -> i) 10 gives the result [0,1,2,3,4,5,6,7,8] I thought i to be between 0 and 10 or 0 and 9. Why is it between 0 and 8? repa 2.0.2.1
ANSWER:
Looks like it produces an a... | [
"arrays",
"haskell",
"repa"
] | 4 | 5 | 366 | 1 | 0 | 2011-06-05T06:57:11.233000 | 2011-06-05T08:24:53.727000 |
6,241,455 | 6,244,760 | Using Cakephp 1.3 CLI on Hostgator | I'm using Hostgator.com and I'm trying to bake apps via ssh console. I have connected successfully to via SSH. I have the cakephp folder located at http://www.domainname.com/cakephp the initial cakephp installation is working fine. Connected to database etc. This is a list of paths from Hostgator: List here is my.bash_... | You need to set the executable flag on the cake script. www chmod +x cakephp/cake/console/cake | Using Cakephp 1.3 CLI on Hostgator I'm using Hostgator.com and I'm trying to bake apps via ssh console. I have connected successfully to via SSH. I have the cakephp folder located at http://www.domainname.com/cakephp the initial cakephp installation is working fine. Connected to database etc. This is a list of paths fr... | TITLE:
Using Cakephp 1.3 CLI on Hostgator
QUESTION:
I'm using Hostgator.com and I'm trying to bake apps via ssh console. I have connected successfully to via SSH. I have the cakephp folder located at http://www.domainname.com/cakephp the initial cakephp installation is working fine. Connected to database etc. This is ... | [
"cakephp",
"cakephp-1.3",
"command-line-interface",
"host"
] | 0 | 1 | 606 | 1 | 0 | 2011-06-05T06:57:56.760000 | 2011-06-05T17:59:49.190000 |
6,241,464 | 6,241,476 | Why are the indexes of Scala tuples 1-based? | " Programming In Scala " explains that tuples' _N numbers are one-based, instead of zero-based, because starting with 1 is a tradition set by other languages with statically typed tuples such as Haskell and ML but this can hardly be called an explanation. Why were tuples defined as 1-based in Haskell and ML in the firs... | I guess _1, _2 etc it is short for "first", "second", and so on. ( fst and snd for instance have historically been used for accessing the left and right part of a tuple). The index in an array on the other hand is an offset and the first element is usually at offset 0. Are there any mathematical/programming benefits in... | Why are the indexes of Scala tuples 1-based? " Programming In Scala " explains that tuples' _N numbers are one-based, instead of zero-based, because starting with 1 is a tradition set by other languages with statically typed tuples such as Haskell and ML but this can hardly be called an explanation. Why were tuples def... | TITLE:
Why are the indexes of Scala tuples 1-based?
QUESTION:
" Programming In Scala " explains that tuples' _N numbers are one-based, instead of zero-based, because starting with 1 is a tradition set by other languages with statically typed tuples such as Haskell and ML but this can hardly be called an explanation. W... | [
"scala"
] | 40 | 25 | 7,152 | 5 | 0 | 2011-06-05T07:00:25.140000 | 2011-06-05T07:06:08.333000 |
6,241,466 | 6,242,140 | How to encrypt password for drupal 7 | I want add new user from another script and I need create password for Drupal7 users, I can't find exact function which is doing it on Drupal, what function is that? | With drupal 7, password are no more encrypted through md5. There are several way to get/set a password in drupal7. Using drush (for your information, not used in your case): drush upwd admin --password="newpassword" Without drush, if you have a cli access to the server: (for your information, not used in your case) cd ... | How to encrypt password for drupal 7 I want add new user from another script and I need create password for Drupal7 users, I can't find exact function which is doing it on Drupal, what function is that? | TITLE:
How to encrypt password for drupal 7
QUESTION:
I want add new user from another script and I need create password for Drupal7 users, I can't find exact function which is doing it on Drupal, what function is that?
ANSWER:
With drupal 7, password are no more encrypted through md5. There are several way to get/se... | [
"drupal",
"passwords"
] | 1 | 12 | 12,477 | 1 | 0 | 2011-06-05T07:01:36.587000 | 2011-06-05T09:51:39.393000 |
6,241,482 | 6,241,851 | why applicationName is primary key instead of application-Id in asp.net applications table? | I have a question about aspnet_applications table I have created asp.net membership using.net framework 4.0 it created some tables but I don't understand why Microsoft generate aspnet_applications table like this: ApplicationName -> Primary key LoweredApplicationName ApplicationId -> unique index Description I think ab... | It makes no difference. A primary key constraint and a unique constraint on non-nullable columns means exactly the same thing and they work just the same way. In principle, all keys are equal and which one you designate to be the "primary" one is mostly a matter of style and readability. | why applicationName is primary key instead of application-Id in asp.net applications table? I have a question about aspnet_applications table I have created asp.net membership using.net framework 4.0 it created some tables but I don't understand why Microsoft generate aspnet_applications table like this: ApplicationNam... | TITLE:
why applicationName is primary key instead of application-Id in asp.net applications table?
QUESTION:
I have a question about aspnet_applications table I have created asp.net membership using.net framework 4.0 it created some tables but I don't understand why Microsoft generate aspnet_applications table like th... | [
"asp.net",
".net-4.0",
"asp.net-membership",
"relational-database",
"asp.net-4.0"
] | 2 | 1 | 361 | 1 | 0 | 2011-06-05T07:08:10.427000 | 2011-06-05T08:45:39.043000 |
6,241,486 | 6,244,482 | how to get drupal var from the module in the external php? | I don't know how to get access to the drupal variable in the external.php file. In the module i assign the variable in order to use it in the template: $variables['teams'] = $output; In the template file i can access it by: But I'd like to access this variable from another external php file. How can i do it? | You should give us some more information about where you are planning on using that variable. If you are planning on using the variable in a template file, $variables should be fine, otherwise you could store it somewhere or set is as a global. If you want to use it from another module, you should make sure that the ho... | how to get drupal var from the module in the external php? I don't know how to get access to the drupal variable in the external.php file. In the module i assign the variable in order to use it in the template: $variables['teams'] = $output; In the template file i can access it by: But I'd like to access this variable ... | TITLE:
how to get drupal var from the module in the external php?
QUESTION:
I don't know how to get access to the drupal variable in the external.php file. In the module i assign the variable in order to use it in the template: $variables['teams'] = $output; In the template file i can access it by: But I'd like to acc... | [
"php",
"drupal",
"variables",
"external"
] | 1 | 0 | 391 | 2 | 0 | 2011-06-05T07:09:45.943000 | 2011-06-05T17:13:20.363000 |
6,241,491 | 6,242,008 | Rails form works for creation, not updating | I have a city form that works for the initial creation of the city, but when I try to update the city, I get a routing error. My routes.rb: map.resources:states do |state| state.resources:cities end The form: <% simple_form_for @city,:url => state_cities_path do |f| %> <%= f.input:name %> <%= f.input:active %> <%= f.su... | the problem is arround this line simple_form_for @city,:url => state_cities_path you are not letting the form builder create the proper route you are forcing it. Form builder creates a proper route for the instance you pass by detecting if is a new record,it then sets the proper path in the action attribute of the html... | Rails form works for creation, not updating I have a city form that works for the initial creation of the city, but when I try to update the city, I get a routing error. My routes.rb: map.resources:states do |state| state.resources:cities end The form: <% simple_form_for @city,:url => state_cities_path do |f| %> <%= f.... | TITLE:
Rails form works for creation, not updating
QUESTION:
I have a city form that works for the initial creation of the city, but when I try to update the city, I get a routing error. My routes.rb: map.resources:states do |state| state.resources:cities end The form: <% simple_form_for @city,:url => state_cities_pat... | [
"ruby-on-rails",
"forms",
"routes",
"nested"
] | 0 | 0 | 385 | 1 | 0 | 2011-06-05T07:10:30.160000 | 2011-06-05T09:18:22.903000 |
6,241,503 | 6,251,332 | How to fix this project in order to pause at breakpoints in Xcode4? | I am trying to run this Xcode project sample: http://developer.apple.com/library/mac/#samplecode/HID_Explorer/Introduction/Intro.html My OS version is 10.6.7 so, I changed the "Base SDK" parameter in the "Build Settings" panel from "10.5" to "Latest Mac OS X (10.6)". If I press Cmd+R the application runs correctly. How... | I think I found how to fix my problem. I also changed the "Architectures" setting in "Build settings" from "Standard (32/64 bit-Intel)" to "32-bit Intel" and it works now. Actually some Carbon functions seem not to be available to 64-bit application: http://developer.apple.com/library/mac/#documentation/Carbon/Conceptu... | How to fix this project in order to pause at breakpoints in Xcode4? I am trying to run this Xcode project sample: http://developer.apple.com/library/mac/#samplecode/HID_Explorer/Introduction/Intro.html My OS version is 10.6.7 so, I changed the "Base SDK" parameter in the "Build Settings" panel from "10.5" to "Latest Ma... | TITLE:
How to fix this project in order to pause at breakpoints in Xcode4?
QUESTION:
I am trying to run this Xcode project sample: http://developer.apple.com/library/mac/#samplecode/HID_Explorer/Introduction/Intro.html My OS version is 10.6.7 so, I changed the "Base SDK" parameter in the "Build Settings" panel from "1... | [
"xcode4",
"debugging"
] | 0 | 2 | 922 | 2 | 0 | 2011-06-05T07:14:04.680000 | 2011-06-06T11:27:12.283000 |
6,241,513 | 6,241,530 | How to create instance of a class with the parameters in the constructor using reflection? | for example: public class Test {
public static void main(String[] args) throws Exception { Car c= (Car) Class.forName("Car").newInstance(); System.out.println(c.getName()); } }
class Car { String name = "Default Car"; String getName(){return this.name;} } clear code. But, if I add constructor with params, some like t... | You need to say which constructor you want to use a pass it arguments. Car c = Car.class.getConstructor(String.class).newInstance("Lightning McQueen"); | How to create instance of a class with the parameters in the constructor using reflection? for example: public class Test {
public static void main(String[] args) throws Exception { Car c= (Car) Class.forName("Car").newInstance(); System.out.println(c.getName()); } }
class Car { String name = "Default Car"; String ge... | TITLE:
How to create instance of a class with the parameters in the constructor using reflection?
QUESTION:
for example: public class Test {
public static void main(String[] args) throws Exception { Car c= (Car) Class.forName("Car").newInstance(); System.out.println(c.getName()); } }
class Car { String name = "Defau... | [
"java",
"class",
"reflection"
] | 49 | 96 | 66,205 | 2 | 0 | 2011-06-05T07:19:30.857000 | 2011-06-05T07:24:48.407000 |
6,241,518 | 6,241,553 | Expanding table row using javascript or CSS | I'm creating a webapp asp.net and C# that will display list of users in a table but one of this fields contains lots of information and it will make a row larger. So I'm thinking that I want to create a link, then when I click this link the information will expand, then when I click again the link the information will ... | Krakat, Try using this: place the table tr class as "headerRow" to expand on click of the link. | Expanding table row using javascript or CSS I'm creating a webapp asp.net and C# that will display list of users in a table but one of this fields contains lots of information and it will make a row larger. So I'm thinking that I want to create a link, then when I click this link the information will expand, then when ... | TITLE:
Expanding table row using javascript or CSS
QUESTION:
I'm creating a webapp asp.net and C# that will display list of users in a table but one of this fields contains lots of information and it will make a row larger. So I'm thinking that I want to create a link, then when I click this link the information will ... | [
"javascript",
"css"
] | 0 | 1 | 1,326 | 1 | 0 | 2011-06-05T07:20:36.503000 | 2011-06-05T07:30:42.243000 |
6,241,520 | 6,243,649 | How to get burried "nodeContent" in an array | HI all, I have spent a couple hours on SO trying to get this solved. Long story short I am trying to get the value from a nodeContent in an array. When I have a breakpoint and "print description" of an array this is what its spits out. My question is, how do I get the content of the burried "nodeContent" listed below? ... | You can modify TFHppleElement to return the children objects. in TFHppleElement.h: @interface TFHppleElement: NSObject [..]
- (NSArray*)children @end in TFHppleElement.m: NSString * const TFHppleNodeChildArrayKey = @"nodeChildArray";
@implementation TFHppleElement [..] - (NSArray*)children { [node objectForKey:TFHppl... | How to get burried "nodeContent" in an array HI all, I have spent a couple hours on SO trying to get this solved. Long story short I am trying to get the value from a nodeContent in an array. When I have a breakpoint and "print description" of an array this is what its spits out. My question is, how do I get the conten... | TITLE:
How to get burried "nodeContent" in an array
QUESTION:
HI all, I have spent a couple hours on SO trying to get this solved. Long story short I am trying to get the value from a nodeContent in an array. When I have a breakpoint and "print description" of an array this is what its spits out. My question is, how d... | [
"iphone",
"ios4",
"iphone-sdk-3.0"
] | 3 | 1 | 1,489 | 1 | 0 | 2011-06-05T07:21:15.270000 | 2011-06-05T14:55:05.453000 |
6,241,533 | 6,261,177 | simple regular expression question | How to match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab where number of a's should be min of 10? I mean i know this way: [a][a][a][a][a][a][a][a][a][a][a][a][a]a*b But there must be a better elegant method where is if my min number of a's become say 100.. What is it? I am trying to match (a^n)b sort of thing where n can be any... | If your lex is flex, you can use a{10,}. If not so, according to 3. Lex Regular Expressions, you can use a{10}a* instead. | simple regular expression question How to match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab where number of a's should be min of 10? I mean i know this way: [a][a][a][a][a][a][a][a][a][a][a][a][a]a*b But there must be a better elegant method where is if my min number of a's become say 100.. What is it? I am trying to match (a^n... | TITLE:
simple regular expression question
QUESTION:
How to match aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab where number of a's should be min of 10? I mean i know this way: [a][a][a][a][a][a][a][a][a][a][a][a][a]a*b But there must be a better elegant method where is if my min number of a's become say 100.. What is it? I am tr... | [
"regex",
"unix",
"yacc",
"lex"
] | 0 | 2 | 138 | 4 | 0 | 2011-06-05T07:25:31.573000 | 2011-06-07T06:05:51.287000 |
6,241,537 | 6,241,560 | Search nsarray of nsdictionary | I have an NSArray filled with NSDictionaries. One of the keys the dicts have in common is "name". I have another array, filled with names. I want to search the first array, if it finds a name it is supposed to add the dictionary to a third mutable array. The third array then contains all dictionary which names are in t... | Use "fast enumeration", commonly also known as for-in loop: for (NSDictionary* dict in myArray) { Also, to compare NSString's, use -isEqualToString:. if ([[dict objectForKey: myKey] isEqualToString:myString]) {
} | Search nsarray of nsdictionary I have an NSArray filled with NSDictionaries. One of the keys the dicts have in common is "name". I have another array, filled with names. I want to search the first array, if it finds a name it is supposed to add the dictionary to a third mutable array. The third array then contains all ... | TITLE:
Search nsarray of nsdictionary
QUESTION:
I have an NSArray filled with NSDictionaries. One of the keys the dicts have in common is "name". I have another array, filled with names. I want to search the first array, if it finds a name it is supposed to add the dictionary to a third mutable array. The third array ... | [
"cocoa-touch",
"cocoa",
"search",
"nsarray",
"nsdictionary"
] | 1 | 4 | 1,004 | 1 | 0 | 2011-06-05T07:27:00.963000 | 2011-06-05T07:32:02.057000 |
6,241,541 | 6,241,579 | high availability websites | what's the best way to achieve high availability for a dynamic website? If I create a second copy on another server and do not wish to use a load balancer since it will mess up user sessions, what are the best alternatives? | You can store session data in a database instead, which gets around that problem, then you can round-robin the requests to the application servers. (Good) Load Balancers can be configured to be "sticky" which means they send requests from the same IP to the same server each time. | high availability websites what's the best way to achieve high availability for a dynamic website? If I create a second copy on another server and do not wish to use a load balancer since it will mess up user sessions, what are the best alternatives? | TITLE:
high availability websites
QUESTION:
what's the best way to achieve high availability for a dynamic website? If I create a second copy on another server and do not wish to use a load balancer since it will mess up user sessions, what are the best alternatives?
ANSWER:
You can store session data in a database i... | [
"apache",
"web",
"load-balancing",
"high-availability"
] | 1 | 2 | 912 | 3 | 0 | 2011-06-05T07:27:36.237000 | 2011-06-05T07:37:31.810000 |
6,241,548 | 6,241,570 | Usercontrols that inherit from abstract class | I've got a usercontrol that inherits from an abstract class. Basically looks like this. class SimpleSlideView: View {
}
public abstract class View: UserControl {
} The project compiles and runs fine. I can take the usercontrol (from the toolbox) and drag it into a form and it is displayed in the designer correctly. ... | You can find possible solution here: How can I get Visual Studio 2008 Windows Forms designer to render a Form that implements an abstract base class? | Usercontrols that inherit from abstract class I've got a usercontrol that inherits from an abstract class. Basically looks like this. class SimpleSlideView: View {
}
public abstract class View: UserControl {
} The project compiles and runs fine. I can take the usercontrol (from the toolbox) and drag it into a form a... | TITLE:
Usercontrols that inherit from abstract class
QUESTION:
I've got a usercontrol that inherits from an abstract class. Basically looks like this. class SimpleSlideView: View {
}
public abstract class View: UserControl {
} The project compiles and runs fine. I can take the usercontrol (from the toolbox) and dra... | [
"c#",
"abstract-class",
"designer",
"windows-forms-designer"
] | 6 | 3 | 9,897 | 1 | 0 | 2011-06-05T07:28:18.083000 | 2011-06-05T07:35:36.490000 |
6,241,549 | 6,241,561 | Searching for recomended UI architecture source | I get too often faced with UI architecture dilemmas. For example: Do I have to show message box in that point? where should I locate the refresh button.. etc. Is there a recommended book,blog, article about it? | You are not really asking about architecture, it seems, but about UI design. The best book I know on this subject is Alan Cooper's About Face 2.0, which is very readable and also thought-provoking. | Searching for recomended UI architecture source I get too often faced with UI architecture dilemmas. For example: Do I have to show message box in that point? where should I locate the refresh button.. etc. Is there a recommended book,blog, article about it? | TITLE:
Searching for recomended UI architecture source
QUESTION:
I get too often faced with UI architecture dilemmas. For example: Do I have to show message box in that point? where should I locate the refresh button.. etc. Is there a recommended book,blog, article about it?
ANSWER:
You are not really asking about ar... | [
"architecture",
"user-interface"
] | 0 | 0 | 99 | 1 | 0 | 2011-06-05T07:28:37.627000 | 2011-06-05T07:32:15.397000 |
6,241,558 | 6,241,638 | Is it possible to virtually test Android application on different hardware? | I am looking for a way (maybe impossible) to test my PhoneGap Android application on different phones / hardware. As I am able to obviously test it only on my phone, but some people are reporting that my app doesn't work / crashes / explodes on their phone. Is there any way how can I test my app on different phones wit... | There is a company called DeviceAnywhere: http://www.deviceanywhere.com/ that seems to be doing that. But it may cost you. If you don't want to buy all those devices, somebody else will have to. Plus they have to build the infrastructure to support remote access. Does not sound like something you would get for free. | Is it possible to virtually test Android application on different hardware? I am looking for a way (maybe impossible) to test my PhoneGap Android application on different phones / hardware. As I am able to obviously test it only on my phone, but some people are reporting that my app doesn't work / crashes / explodes on... | TITLE:
Is it possible to virtually test Android application on different hardware?
QUESTION:
I am looking for a way (maybe impossible) to test my PhoneGap Android application on different phones / hardware. As I am able to obviously test it only on my phone, but some people are reporting that my app doesn't work / cra... | [
"android",
"cordova",
"android-emulator"
] | 2 | 7 | 2,255 | 3 | 0 | 2011-06-05T07:31:23.867000 | 2011-06-05T07:53:12.090000 |
6,241,559 | 6,241,569 | Is there a performance hit on development-enabled iOS devices? | Here's my situation: I've got a personal iPhone 4 that I use day-to-day, and I was thinking of using it for development. If I do enable my iPhone for development, will there be any noticeable difference with regards to the performance of the device? Thanks | Not significantly. If there's any diagnostic information that needs to be collected, it's crash logs, which are already generated on a regular basis by all devices from day 1. When you enable your device for development, Xcode just collects information about it once, presumably to know how to decide how to work with it... | Is there a performance hit on development-enabled iOS devices? Here's my situation: I've got a personal iPhone 4 that I use day-to-day, and I was thinking of using it for development. If I do enable my iPhone for development, will there be any noticeable difference with regards to the performance of the device? Thanks | TITLE:
Is there a performance hit on development-enabled iOS devices?
QUESTION:
Here's my situation: I've got a personal iPhone 4 that I use day-to-day, and I was thinking of using it for development. If I do enable my iPhone for development, will there be any noticeable difference with regards to the performance of t... | [
"iphone",
"ios"
] | 2 | 2 | 261 | 2 | 0 | 2011-06-05T07:31:43.503000 | 2011-06-05T07:35:32.177000 |
6,241,571 | 6,241,947 | Signing algorithm that works with Android, Java, iPhone, Windows Mobile | Does anyone know of a signing algorithm that will work with all these platforms. The Server will generate an RSA public and private key through a Java Program. The client application (a mobile phone) will then need to decode a message from the server that is signed using the private key (the public key is stored on the... | One of the points of standardised cryptographic algorithms is that they are interoperable, no matter what code was used to implement them. Thus for example RSA-encrypted message can be created by a server written in Java and decrypted by a.Net client (think about how webservers communicate with browsers using HTTPS - t... | Signing algorithm that works with Android, Java, iPhone, Windows Mobile Does anyone know of a signing algorithm that will work with all these platforms. The Server will generate an RSA public and private key through a Java Program. The client application (a mobile phone) will then need to decode a message from the serv... | TITLE:
Signing algorithm that works with Android, Java, iPhone, Windows Mobile
QUESTION:
Does anyone know of a signing algorithm that will work with all these platforms. The Server will generate an RSA public and private key through a Java Program. The client application (a mobile phone) will then need to decode a mes... | [
"java",
"iphone",
"android",
"security",
"windows-mobile"
] | 2 | 1 | 606 | 2 | 0 | 2011-06-05T07:35:40.083000 | 2011-06-05T09:06:22.160000 |
6,241,574 | 6,241,604 | WPF Styles - Please help me understand why this works the way it does | Why does the button actually get an orange background, if the setter is specified as Window.Background? This does not give the TextBlock an orange background: Thanks | Neither Button nor Window actually define the Background property, they both inherit it from Control. So even though you wrote Window.Background, the setter is actually bound to the property by using the Control.BackgroundProperty field which also applied to Button. | WPF Styles - Please help me understand why this works the way it does Why does the button actually get an orange background, if the setter is specified as Window.Background? This does not give the TextBlock an orange background: Thanks | TITLE:
WPF Styles - Please help me understand why this works the way it does
QUESTION:
Why does the button actually get an orange background, if the setter is specified as Window.Background? This does not give the TextBlock an orange background: Thanks
ANSWER:
Neither Button nor Window actually define the Background ... | [
"wpf",
"xaml",
"styles"
] | 5 | 5 | 71 | 2 | 0 | 2011-06-05T07:36:03.137000 | 2011-06-05T07:44:54.567000 |
6,241,588 | 6,242,439 | Can I place an email in iOS's outbox (preferably with MonoTouch)? | I would like to place an email in the iPhones email outbox, without showing the compose window to the user, so that he can not mess with the data that I want to send. Is this possible? Thanks, Timo | No - if you want to send an email using the user's email account you must allow them to modify the message contents: that's part of Apple's message framework. To be honest, it's a fairly sensible feature...I don't think many people would want an app that could just send things out without alerting the user or allowing ... | Can I place an email in iOS's outbox (preferably with MonoTouch)? I would like to place an email in the iPhones email outbox, without showing the compose window to the user, so that he can not mess with the data that I want to send. Is this possible? Thanks, Timo | TITLE:
Can I place an email in iOS's outbox (preferably with MonoTouch)?
QUESTION:
I would like to place an email in the iPhones email outbox, without showing the compose window to the user, so that he can not mess with the data that I want to send. Is this possible? Thanks, Timo
ANSWER:
No - if you want to send an e... | [
"ios",
"xamarin.ios"
] | 0 | 3 | 152 | 2 | 0 | 2011-06-05T07:40:48.443000 | 2011-06-05T10:49:51.260000 |
6,241,594 | 6,241,854 | Unable to make ActionLink or RouteLink generate the correct URL | I'm new to ASP.NET MVC (working with version 3) and cannot get ActionLink or RouteLink to work as I'm expecting. In this app, an event can have many activities and I wish to route to them using: /Event/1/Activity /Event/1/Activity/Index (same as previous) /Event/1/Activity/Details/5 The HTML generated by these two help... | The reason that the routing system generates /Event/1 instead of /Event/1/Activity/Index for the route routes.MapRoute( "ActivityIndex", "Event/{eventId}/{controller}/{action}/{id}", new { controller = "Activity", action = "Index", id = UrlParameter.Optional }, new { eventId = @"\d+", id = @"\d*" } ); is because when g... | Unable to make ActionLink or RouteLink generate the correct URL I'm new to ASP.NET MVC (working with version 3) and cannot get ActionLink or RouteLink to work as I'm expecting. In this app, an event can have many activities and I wish to route to them using: /Event/1/Activity /Event/1/Activity/Index (same as previous) ... | TITLE:
Unable to make ActionLink or RouteLink generate the correct URL
QUESTION:
I'm new to ASP.NET MVC (working with version 3) and cannot get ActionLink or RouteLink to work as I'm expecting. In this app, an event can have many activities and I wish to route to them using: /Event/1/Activity /Event/1/Activity/Index (... | [
"c#",
".net",
"asp.net-mvc",
"asp.net-mvc-3",
"asp.net-routing"
] | 2 | 5 | 2,156 | 4 | 0 | 2011-06-05T07:42:08.720000 | 2011-06-05T08:46:54.340000 |
6,241,598 | 6,241,666 | How do I implement a dynamically changing grid on a web page? | On a web page that I am creating, I want to fill a rectangular area (let us say, the top half of the web page visible in a typical browser window) with about a hundred small rectangles: Each rectangle (let us call this a cell) has its own colour, some text written inside it, and a border which distinguishes it from its... | If this is a simple matter of drawing pre-calculated rectangles, I suggest using the HTML 5 Canvas. Here is an example that shows drawing rectangles I believe this is a good solution, because you can emit the HTML and javascript with whatever programming tool you are most comfortable with -- and you don't have to ventu... | How do I implement a dynamically changing grid on a web page? On a web page that I am creating, I want to fill a rectangular area (let us say, the top half of the web page visible in a typical browser window) with about a hundred small rectangles: Each rectangle (let us call this a cell) has its own colour, some text w... | TITLE:
How do I implement a dynamically changing grid on a web page?
QUESTION:
On a web page that I am creating, I want to fill a rectangular area (let us say, the top half of the web page visible in a typical browser window) with about a hundred small rectangles: Each rectangle (let us call this a cell) has its own c... | [
"javascript",
"jquery",
"html"
] | 2 | 2 | 763 | 4 | 0 | 2011-06-05T04:59:21.027000 | 2011-06-05T08:02:40.663000 |
6,241,602 | 6,241,654 | Reducing git repo size resulting from now-deleted files | During the history of my git repo, there were lots of media binary files added to it. Now those media files have been deleted. However, I suspect that the repo is storing information of those media files in the repo's archive, as my repo size is 400MB. I've read about clean-up commands such as git-gc --aggressive but I... | If they're part of any of your branches' history then git needs to store those files' contents, otherwise you would have an incomplete history. The only way to completely remove them would be to rewrite those branches' history and remove them from the commits where they were added and onwards until they were removed. M... | Reducing git repo size resulting from now-deleted files During the history of my git repo, there were lots of media binary files added to it. Now those media files have been deleted. However, I suspect that the repo is storing information of those media files in the repo's archive, as my repo size is 400MB. I've read a... | TITLE:
Reducing git repo size resulting from now-deleted files
QUESTION:
During the history of my git repo, there were lots of media binary files added to it. Now those media files have been deleted. However, I suspect that the repo is storing information of those media files in the repo's archive, as my repo size is ... | [
"git"
] | 2 | 2 | 838 | 1 | 0 | 2011-06-05T07:44:41.843000 | 2011-06-05T07:58:12.820000 |
6,241,607 | 6,247,082 | Distance to the object using stereo camera | Is there a way to calculate the distance to specific object using stereo camera? Is there an equation or something to get distance using disparity or angle? | NOTE: Everything described here can be found in the Learning OpenCV book in the chapters on camera calibration and stereo vision. You should read these chapters to get a better understanding of the steps below. One approach that do not require you to measure all the camera intrinsics and extrinsics yourself is to use o... | Distance to the object using stereo camera Is there a way to calculate the distance to specific object using stereo camera? Is there an equation or something to get distance using disparity or angle? | TITLE:
Distance to the object using stereo camera
QUESTION:
Is there a way to calculate the distance to specific object using stereo camera? Is there an equation or something to get distance using disparity or angle?
ANSWER:
NOTE: Everything described here can be found in the Learning OpenCV book in the chapters on c... | [
"opencv",
"camera",
"distance",
"stereo-3d",
"stereoscopy"
] | 16 | 36 | 31,245 | 3 | 0 | 2011-06-05T07:45:11.887000 | 2011-06-06T01:28:18.213000 |
6,241,613 | 6,241,662 | Your application has stopped working, even when hooking to UnhandledExceptionHandler | I have added a global error handler at the AppDomain level to my C# application, by hooking into the UnhandledExceptionHandler event. My problem is, that even though i am handling this exception, i still get the popup saying "App has stopped working". Is this normal behaviour? Can it be turned off? or maybe it is good ... | I don't think is possible to recover the existing instance of an app when you get at that point. MSDN has no information about it and is suggested " If sufficient information about the state of the application is available, other actions may be undertaken — such as saving program data for later recovery." ( link ) It k... | Your application has stopped working, even when hooking to UnhandledExceptionHandler I have added a global error handler at the AppDomain level to my C# application, by hooking into the UnhandledExceptionHandler event. My problem is, that even though i am handling this exception, i still get the popup saying "App has s... | TITLE:
Your application has stopped working, even when hooking to UnhandledExceptionHandler
QUESTION:
I have added a global error handler at the AppDomain level to my C# application, by hooking into the UnhandledExceptionHandler event. My problem is, that even though i am handling this exception, i still get the popup... | [
"c#",
"unhandled-exception"
] | 2 | 2 | 1,352 | 2 | 0 | 2011-06-05T07:46:31.543000 | 2011-06-05T08:01:09.433000 |
6,241,623 | 6,242,064 | iOS Bonjour Over the Internet | I know that iOS's Bonjour implementation (NSNetService, NSNetServiceBrowser) work out of the box on local networks. The documentation says it is possible to set up a Bonjour DNS server to allow connecting users over the internet, so my questions are: What is the Bonjour DNS server interface? is there a sample I can sta... | Bonjour local service discoveryis based on "multicast DNS". whenever some client wants to find out anything about the network or services on the network it uses the multicast address 224.0.0.251, meaning only clients within that multicast group can use bonjour together. the 244.0.0/24 IP-Address space is defined as "Lo... | iOS Bonjour Over the Internet I know that iOS's Bonjour implementation (NSNetService, NSNetServiceBrowser) work out of the box on local networks. The documentation says it is possible to set up a Bonjour DNS server to allow connecting users over the internet, so my questions are: What is the Bonjour DNS server interfac... | TITLE:
iOS Bonjour Over the Internet
QUESTION:
I know that iOS's Bonjour implementation (NSNetService, NSNetServiceBrowser) work out of the box on local networks. The documentation says it is possible to set up a Bonjour DNS server to allow connecting users over the internet, so my questions are: What is the Bonjour D... | [
"ios",
"networking",
"bonjour"
] | 6 | 4 | 5,229 | 1 | 0 | 2011-06-05T07:49:11.603000 | 2011-06-05T09:29:46.150000 |
6,241,627 | 6,241,746 | How do system calls work? | I understand that a user can own a process and each process has an address space (which contains valid memory locations, this process can reference). I know that a process can call a system call and pass parameters to it, just like any other library function. This seems to suggest that all system calls are in a process... | Your understanding is pretty close; the trick is that most compilers will never write system calls, because the functions that programs call (e.g. getpid(2), chdir(2), etc.) are actually provided by the standard C library. The standard C library contains the code for the system call, whether it is called via INT 0x80 o... | How do system calls work? I understand that a user can own a process and each process has an address space (which contains valid memory locations, this process can reference). I know that a process can call a system call and pass parameters to it, just like any other library function. This seems to suggest that all sys... | TITLE:
How do system calls work?
QUESTION:
I understand that a user can own a process and each process has an address space (which contains valid memory locations, this process can reference). I know that a process can call a system call and pass parameters to it, just like any other library function. This seems to su... | [
"compiler-construction",
"process",
"operating-system",
"interrupt",
"system-calls"
] | 44 | 17 | 21,268 | 6 | 0 | 2011-06-05T07:51:09.733000 | 2011-06-05T08:22:16.473000 |
6,241,632 | 6,241,776 | (iphone) force scrollViewDidEndDecelerating to be called after programmatically scrolling a view? | I animate the scroll with scrollRectToVisible:animated: But scrollViewDidEndDecelerating is not getting called. Is there a way to force the function to be called? | scrollViewDidEndDecelerating won't be called for scrollRectToVisible or setContentOffset (i.e, scrolling programmatically). If you notice the declaration of this method in the header file it clearly mentions that it's "called on finger up as we are moving". Now, to address your issue, scrollViewDidEndScrollingAnimation... | (iphone) force scrollViewDidEndDecelerating to be called after programmatically scrolling a view? I animate the scroll with scrollRectToVisible:animated: But scrollViewDidEndDecelerating is not getting called. Is there a way to force the function to be called? | TITLE:
(iphone) force scrollViewDidEndDecelerating to be called after programmatically scrolling a view?
QUESTION:
I animate the scroll with scrollRectToVisible:animated: But scrollViewDidEndDecelerating is not getting called. Is there a way to force the function to be called?
ANSWER:
scrollViewDidEndDecelerating won... | [
"iphone",
"animation",
"uiscrollview"
] | 21 | 59 | 10,528 | 5 | 0 | 2011-06-05T07:51:30.033000 | 2011-06-05T08:27:18.513000 |
6,241,660 | 6,241,750 | Qt, widget refresh, and ui interactability | I'm sparkling brand new to Qt, and am finding it very rewarding to learn. I'm trying to merge some existing C++ code with a new Qt GUI. Basically, the idea is to have images that are extracted from an.avi file be processed in the backend and then displayed in a QLabel on-screen. I have managed to get the following bit ... | You should really have a look at the Qt Phonon multimedia framework. Might not get you the level of control you have with OpenCV over the media files, but it's worth a good looking into. For your original question: you have to do the processing in a different thread. This gets tricky because you can only call GUI funct... | Qt, widget refresh, and ui interactability I'm sparkling brand new to Qt, and am finding it very rewarding to learn. I'm trying to merge some existing C++ code with a new Qt GUI. Basically, the idea is to have images that are extracted from an.avi file be processed in the backend and then displayed in a QLabel on-scree... | TITLE:
Qt, widget refresh, and ui interactability
QUESTION:
I'm sparkling brand new to Qt, and am finding it very rewarding to learn. I'm trying to merge some existing C++ code with a new Qt GUI. Basically, the idea is to have images that are extracted from an.avi file be processed in the backend and then displayed in... | [
"c++",
"qt",
"user-interface",
"opencv"
] | 1 | 1 | 4,600 | 4 | 0 | 2011-06-05T08:00:33.243000 | 2011-06-05T08:22:49.970000 |
6,241,661 | 6,241,888 | When should I go for Silverlight and when XNA? | I don't have much knowledge about Windows Phone 7 development. I know there exist two paths for an app development. Silverlight or XNA. Before I start I would like to know for what scenarios Silverlight is the best choice and for what kind of apps it makes more sense to use XNA? | Silverlight is designed around building applications. As such, it includes a retained graphics model (re-drawing is handled for you) and wide range of user interface elements including both interactive controls and controls that perform layout logic. XNA is designed around building games. As such, it includes an immedi... | When should I go for Silverlight and when XNA? I don't have much knowledge about Windows Phone 7 development. I know there exist two paths for an app development. Silverlight or XNA. Before I start I would like to know for what scenarios Silverlight is the best choice and for what kind of apps it makes more sense to us... | TITLE:
When should I go for Silverlight and when XNA?
QUESTION:
I don't have much knowledge about Windows Phone 7 development. I know there exist two paths for an app development. Silverlight or XNA. Before I start I would like to know for what scenarios Silverlight is the best choice and for what kind of apps it make... | [
"silverlight",
"windows-phone-7",
"xna"
] | 6 | 6 | 1,148 | 3 | 0 | 2011-06-05T08:00:46.960000 | 2011-06-05T08:54:05.297000 |
6,241,669 | 6,241,789 | Handling CSS load failure | I've been spending some thinking time recently on how to best handle resource failure for a page. Of course with JavaScript files there isn't much 'clever' stuff that you can do. If you're loading from a CDN we can do something like this (taken from the HTML5 Boilerplate project): However I haven't seen much documented... | Your rule may not take due to user stylesheets or other browser settings overriding the rule you're testing on. line-height seems especially vulnerable to this, plus also any rule that takes a length value runs the risk of returning a computedStyle in a different unit to the one you expected, making the string comparis... | Handling CSS load failure I've been spending some thinking time recently on how to best handle resource failure for a page. Of course with JavaScript files there isn't much 'clever' stuff that you can do. If you're loading from a CDN we can do something like this (taken from the HTML5 Boilerplate project): However I ha... | TITLE:
Handling CSS load failure
QUESTION:
I've been spending some thinking time recently on how to best handle resource failure for a page. Of course with JavaScript files there isn't much 'clever' stuff that you can do. If you're loading from a CDN we can do something like this (taken from the HTML5 Boilerplate proj... | [
"javascript",
"html",
"css"
] | 0 | 2 | 734 | 1 | 0 | 2011-06-05T08:03:27.147000 | 2011-06-05T08:29:19.247000 |
6,241,671 | 6,241,764 | Ruby: How to screen-scrape the result of an Ajax request | I have written a ruby script to screen scrape something using the 'open-uri' and 'hpricot' gems - everything works great so far. But now I have to screen scrape something which is returned after a form is submitted via a javascript function (called by an 'onchange' event handler from a drop-down menu): function submit_... | I think you definitely should use Mechanize. It provides a nifty interface to interact with remote pages, forms on them, and so forth ( see this example ). | Ruby: How to screen-scrape the result of an Ajax request I have written a ruby script to screen scrape something using the 'open-uri' and 'hpricot' gems - everything works great so far. But now I have to screen scrape something which is returned after a form is submitted via a javascript function (called by an 'onchang... | TITLE:
Ruby: How to screen-scrape the result of an Ajax request
QUESTION:
I have written a ruby script to screen scrape something using the 'open-uri' and 'hpricot' gems - everything works great so far. But now I have to screen scrape something which is returned after a form is submitted via a javascript function (cal... | [
"ruby",
"ajax",
"screen-scraping",
"open-uri"
] | 1 | 2 | 895 | 2 | 0 | 2011-06-05T08:04:28.683000 | 2011-06-05T08:25:09.513000 |
6,241,672 | 6,241,700 | Multiple if statements in C++ | I'm doing the first project euler problem and I just did this #include using namespace std;
int main(){
int threes =0; int fives = 0; int both = 0; for (int i = 0; i < 10; i++){
if(i%3==0){ threes += i; }
if(i%5==0){ fives += i; }
if ( i % 5 == 0 && i % 3 == 0){ both += i; }
}
cout << "threes = " << threes << en... | The else branch in an if-else statement is only executed if the if branch is false. If you just have two if statements in a row, they'll both be executed, which can be a waste. In the below code, the else prevents the second computation from running if the first is satisfied. if (expensive_computation1()) {... } else i... | Multiple if statements in C++ I'm doing the first project euler problem and I just did this #include using namespace std;
int main(){
int threes =0; int fives = 0; int both = 0; for (int i = 0; i < 10; i++){
if(i%3==0){ threes += i; }
if(i%5==0){ fives += i; }
if ( i % 5 == 0 && i % 3 == 0){ both += i; }
}
cout ... | TITLE:
Multiple if statements in C++
QUESTION:
I'm doing the first project euler problem and I just did this #include using namespace std;
int main(){
int threes =0; int fives = 0; int both = 0; for (int i = 0; i < 10; i++){
if(i%3==0){ threes += i; }
if(i%5==0){ fives += i; }
if ( i % 5 == 0 && i % 3 == 0){ both... | [
"c++",
"if-statement"
] | 4 | 3 | 80,526 | 5 | 0 | 2011-06-05T08:05:03.620000 | 2011-06-05T08:11:07.817000 |
6,241,677 | 6,241,754 | Mocking Objects for Unit Tests | Possible Duplicate: Hard-Coded Mock Objects vs Mocking Framework I think I'm finally beginning to understand what unit tests are intended to solve, but am still having trouble implementing all of the details. I've come to the conclusion that I may require a "mock" (and I use this term lightly since I'm not sure I need ... | I'd go as far as to say that software testing, is like The Matrix. No one can be told what software testing is, you have to see it for yourself. Most non-believers haven't given testing a fair chance and never tried doing some testing. Welcome to the club! The tricky thing about testing though is that it's quite hard t... | Mocking Objects for Unit Tests Possible Duplicate: Hard-Coded Mock Objects vs Mocking Framework I think I'm finally beginning to understand what unit tests are intended to solve, but am still having trouble implementing all of the details. I've come to the conclusion that I may require a "mock" (and I use this term lig... | TITLE:
Mocking Objects for Unit Tests
QUESTION:
Possible Duplicate: Hard-Coded Mock Objects vs Mocking Framework I think I'm finally beginning to understand what unit tests are intended to solve, but am still having trouble implementing all of the details. I've come to the conclusion that I may require a "mock" (and I... | [
"c#",
"unit-testing",
"mocking"
] | 3 | 1 | 3,989 | 1 | 0 | 2011-06-05T08:06:35.397000 | 2011-06-05T08:23:24.767000 |
6,241,684 | 6,241,694 | Reset primary key auto_increment | Possible Duplicate: Reset primary key in mysql? Is there any solution to when I delete from t1; and then insert entities force the id to begin from id=1 again? insert into t1 values(...); | [...] then insert entities force the id to begin from id=1 again? You can ALTER TABLE like this: ALTER TABLE t1 AUTO_INCREMENT = 1; Documentation here: MySQL ALTER TABLE Syntax | Reset primary key auto_increment Possible Duplicate: Reset primary key in mysql? Is there any solution to when I delete from t1; and then insert entities force the id to begin from id=1 again? insert into t1 values(...); | TITLE:
Reset primary key auto_increment
QUESTION:
Possible Duplicate: Reset primary key in mysql? Is there any solution to when I delete from t1; and then insert entities force the id to begin from id=1 again? insert into t1 values(...);
ANSWER:
[...] then insert entities force the id to begin from id=1 again? You ca... | [
"mysql"
] | 8 | 13 | 10,000 | 2 | 0 | 2011-06-05T08:08:41.167000 | 2011-06-05T08:09:51.540000 |
6,241,685 | 6,241,709 | How can I change one or more line breaks to something in ruby? | How can I change one or more line breaks to something in ruby? article.content.gsub(/\n/, " ") above code will change every 1 line break to tag, however, I want to change one or more \n to tag. In that way, continuous line breaks with empty lines will be substitued into a single tag. How can I do that? | Are you looking for this? article.content.gsub(/\n+/, " ") Note the plus sign after the \n. That will change any sequence of one or more newlines to a single. | How can I change one or more line breaks to something in ruby? How can I change one or more line breaks to something in ruby? article.content.gsub(/\n/, " ") above code will change every 1 line break to tag, however, I want to change one or more \n to tag. In that way, continuous line breaks with empty lines will be su... | TITLE:
How can I change one or more line breaks to something in ruby?
QUESTION:
How can I change one or more line breaks to something in ruby? article.content.gsub(/\n/, " ") above code will change every 1 line break to tag, however, I want to change one or more \n to tag. In that way, continuous line breaks with empt... | [
"ruby",
"regex"
] | 0 | 2 | 616 | 2 | 0 | 2011-06-05T08:08:50.493000 | 2011-06-05T08:12:25.740000 |
6,241,686 | 6,241,865 | C# Transparent Panels Refresh Problems | I'm currently working on a project that requires animation on a transparent panel. I have been able to create a transparent panel and draw on it, but when I refresh the panel, where I have drawn with the pen tool is not being redrawn as transparent. This is leaves the last position of what I drew previously stained on ... | You shouldn't use CreateGraphics for your task. Subscribe to the Paint event of your panel and do all your drawing in the event handler using PaintEventArgs.Graphics as a Graphics object instead. private void transparentPanel1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawRectangle(new Pen(Color.Red,2), 4,4,6... | C# Transparent Panels Refresh Problems I'm currently working on a project that requires animation on a transparent panel. I have been able to create a transparent panel and draw on it, but when I refresh the panel, where I have drawn with the pen tool is not being redrawn as transparent. This is leaves the last positio... | TITLE:
C# Transparent Panels Refresh Problems
QUESTION:
I'm currently working on a project that requires animation on a transparent panel. I have been able to create a transparent panel and draw on it, but when I refresh the panel, where I have drawn with the pen tool is not being redrawn as transparent. This is leave... | [
"c#",
"animation",
"transparency",
"picturebox",
"panels"
] | 0 | 0 | 3,491 | 1 | 0 | 2011-06-05T08:09:03.347000 | 2011-06-05T08:49:17.033000 |
6,241,689 | 6,241,715 | curious exception in Visual C++ 10 at runtime | Today I got really strange exception at runtime. I tried to debug step by step, but the exception occurs before main() is called. So I removed every include and the whole code (commented it), and added an empty main() function. And again, after compiling it occurs. Maybe a project configuration bug? BTW: after the exce... | The problem is most likely part of the initialization of a global or static object which then calls strlen with a null pointer. Do you have any globals in any.cpp? Or any statics in some classes? Note that, even if you remove everything from the main.cpp, the other.cpp files will still be compiled and cause the error. | curious exception in Visual C++ 10 at runtime Today I got really strange exception at runtime. I tried to debug step by step, but the exception occurs before main() is called. So I removed every include and the whole code (commented it), and added an empty main() function. And again, after compiling it occurs. Maybe a ... | TITLE:
curious exception in Visual C++ 10 at runtime
QUESTION:
Today I got really strange exception at runtime. I tried to debug step by step, but the exception occurs before main() is called. So I removed every include and the whole code (commented it), and added an empty main() function. And again, after compiling i... | [
"c++",
"visual-studio-2010",
"exception",
"runtime-error"
] | 2 | 5 | 177 | 2 | 0 | 2011-06-05T08:09:43.470000 | 2011-06-05T08:15:13.250000 |
6,241,706 | 6,241,763 | Question regarding Java generics in AsyncTask | The Android documentation has an example for using AsyncTask, in this example the DownloadFilesTask class extends AsyncTask in a rather odd way (for a beginners perspective at least): private class DownloadFilesTask extends AsyncTask { Shouldn't AsyncTask be accepting type variables instead of primitive types? And what... | Those generic typs only define what kind of input types you have for meaning that all the params to execute() are of type Param, those for onProgressUpdate are of Progress and that doInBackground() will return something of type Result. The generics only define the type of stuff that is expected later. If you have a dec... | Question regarding Java generics in AsyncTask The Android documentation has an example for using AsyncTask, in this example the DownloadFilesTask class extends AsyncTask in a rather odd way (for a beginners perspective at least): private class DownloadFilesTask extends AsyncTask { Shouldn't AsyncTask be accepting type ... | TITLE:
Question regarding Java generics in AsyncTask
QUESTION:
The Android documentation has an example for using AsyncTask, in this example the DownloadFilesTask class extends AsyncTask in a rather odd way (for a beginners perspective at least): private class DownloadFilesTask extends AsyncTask { Shouldn't AsyncTask ... | [
"java",
"android",
"generics"
] | 0 | 3 | 546 | 4 | 0 | 2011-06-05T08:12:10.550000 | 2011-06-05T08:24:58.423000 |
6,241,716 | 6,241,897 | Is there a difference between `new Image()` and `document.createElement('img')`? | In javascript, I can do: img1 = new Image(); img2 = document.createElement('img'); my question is, is there a difference between the two approach? I've read somewhere that Image, Form, and Element is called host objects, is this true? If it is, what are host objects? Which approach is preferable? | I couldn't find any detailed reference but based on the comment in the MDC - HTMLImageElement example, it seems that Image is part of DOM level 0 whereas document.createElement is part of DOM level 2. DOM level 0 was invented by Netscape and provided a way to access the certain elements of the website. Basically all br... | Is there a difference between `new Image()` and `document.createElement('img')`? In javascript, I can do: img1 = new Image(); img2 = document.createElement('img'); my question is, is there a difference between the two approach? I've read somewhere that Image, Form, and Element is called host objects, is this true? If i... | TITLE:
Is there a difference between `new Image()` and `document.createElement('img')`?
QUESTION:
In javascript, I can do: img1 = new Image(); img2 = document.createElement('img'); my question is, is there a difference between the two approach? I've read somewhere that Image, Form, and Element is called host objects, ... | [
"javascript",
"dom"
] | 79 | 62 | 19,460 | 6 | 0 | 2011-06-05T08:15:40.327000 | 2011-06-05T08:56:36.890000 |
6,241,722 | 6,241,779 | How to release an locally created object, while it using as return object | In my pgm, i am getting a leak warning in this segment. -(NSMutableArray *)filterArrayForBank:(NSMutableArray *)originalArray withKey:(NSString *)key{ NSMutableArray *mutableArray=[[NSMutableArray alloc]init]; for (int i=0; i<[originalArray count]>0; i++) { if([[[originalArray objectAtIndex:i]objectForKey:@"transType"]... | If you return an autoreleased array you need to make sure you retain it in the caller method. However, if you are not retaining it in the caller method, try renaming the method to: -(NSMutableArray *)newFilterArrayForBank:(NSMutableArray *)originalArray withKey:(NSString *)key This will notify the compiler that you are... | How to release an locally created object, while it using as return object In my pgm, i am getting a leak warning in this segment. -(NSMutableArray *)filterArrayForBank:(NSMutableArray *)originalArray withKey:(NSString *)key{ NSMutableArray *mutableArray=[[NSMutableArray alloc]init]; for (int i=0; i<[originalArray count... | TITLE:
How to release an locally created object, while it using as return object
QUESTION:
In my pgm, i am getting a leak warning in this segment. -(NSMutableArray *)filterArrayForBank:(NSMutableArray *)originalArray withKey:(NSString *)key{ NSMutableArray *mutableArray=[[NSMutableArray alloc]init]; for (int i=0; i<[o... | [
"objective-c",
"ios",
"memory-management",
"memory-leaks"
] | 0 | 1 | 137 | 1 | 0 | 2011-06-05T08:17:11.120000 | 2011-06-05T08:28:16.827000 |
6,241,738 | 6,241,801 | What exactly is join() in Boost::thread? (C++) | In Java, I would do something like: Thread t = new MyThread(); t.start(); I start thread by calling start() method. So later I can do something like: for (int i = 0; i < limit; ++i) { Thread t = new MyThread(); t.start(); } To create a group of threads and execute the code in run() method. However, in C++, there's no s... | join doesn't start the thread, it blocks you until the thread you're joining finishes. You use it when you need to wait for the thread you started to finish its run (for example - if it computes something and you need the result). What starts the thread is boost::thread, which creates the thread and calls the thread fu... | What exactly is join() in Boost::thread? (C++) In Java, I would do something like: Thread t = new MyThread(); t.start(); I start thread by calling start() method. So later I can do something like: for (int i = 0; i < limit; ++i) { Thread t = new MyThread(); t.start(); } To create a group of threads and execute the code... | TITLE:
What exactly is join() in Boost::thread? (C++)
QUESTION:
In Java, I would do something like: Thread t = new MyThread(); t.start(); I start thread by calling start() method. So later I can do something like: for (int i = 0; i < limit; ++i) { Thread t = new MyThread(); t.start(); } To create a group of threads an... | [
"c++",
"multithreading",
"boost"
] | 11 | 15 | 15,941 | 2 | 0 | 2011-06-05T08:21:08.830000 | 2011-06-05T08:32:45.863000 |
6,241,739 | 6,241,839 | insert in database from each line of textarea field by php | How i can insert in database from textarea field that each line is a table in database means I want insert in database from each line of textarea field by php my information like this: Name | FullName | Age and database table: id (auto insert), name, fullname, age thanks | i would suggest using a delimiter at the end of the line and then convert it into an array using explode(), here is what you could do. //Make sure your text have (,) comma at the end of every line $text = 'My Name, My Full Name, 24'; //Convert it into an array $text = explode(',', $text); //fetch the value and assign i... | insert in database from each line of textarea field by php How i can insert in database from textarea field that each line is a table in database means I want insert in database from each line of textarea field by php my information like this: Name | FullName | Age and database table: id (auto insert), name, fullname, ... | TITLE:
insert in database from each line of textarea field by php
QUESTION:
How i can insert in database from textarea field that each line is a table in database means I want insert in database from each line of textarea field by php my information like this: Name | FullName | Age and database table: id (auto insert)... | [
"php",
"mysql",
"database",
"insert",
"textarea"
] | 1 | 1 | 4,557 | 4 | 0 | 2011-06-05T08:21:30.243000 | 2011-06-05T08:42:21.893000 |
6,241,740 | 6,242,459 | Getting new position of a line after rotation | I need to find out new coordinates of line after rotation using RotateTransform method on a line. For example, after this line: line.RenderTransform = new RotateTransform(25, 0, 0); line.X1 and the three other properties don't change. I have found some solution for shapes like rectangular, but it doesn't work for line.... | You can transform points on their own: var transform = new RotateTransform(25, 0, 0); var newP1 = transform.Transform(new Point(line.X1,line.Y1)); //... If you want a permanent transformation you can transform the start and end points and assign the new values to the respective properties. | Getting new position of a line after rotation I need to find out new coordinates of line after rotation using RotateTransform method on a line. For example, after this line: line.RenderTransform = new RotateTransform(25, 0, 0); line.X1 and the three other properties don't change. I have found some solution for shapes l... | TITLE:
Getting new position of a line after rotation
QUESTION:
I need to find out new coordinates of line after rotation using RotateTransform method on a line. For example, after this line: line.RenderTransform = new RotateTransform(25, 0, 0); line.X1 and the three other properties don't change. I have found some sol... | [
"wpf",
"rotation",
"line",
"coordinates",
"transform"
] | 5 | 6 | 4,331 | 1 | 0 | 2011-06-05T08:21:31.637000 | 2011-06-05T10:53:49.187000 |
6,241,745 | 6,241,871 | Sliding door menu for jQuery | I'm looking for a sliding effect like this: http://www.piccante.co/sliding-doors/index.htm But it's for MooTools and I need a jquery version which has a very nice and smooth motion. Could you suggest such a plugin? | AFAIK these are called horizontal accordions. This is a pretty good library for jQuery: Download Demos - the designs are not that pretty, but in the examples in the lower sections you can see that you can put any content you want on the handles too. Or take a look at a more polished looking one And finally to make it t... | Sliding door menu for jQuery I'm looking for a sliding effect like this: http://www.piccante.co/sliding-doors/index.htm But it's for MooTools and I need a jquery version which has a very nice and smooth motion. Could you suggest such a plugin? | TITLE:
Sliding door menu for jQuery
QUESTION:
I'm looking for a sliding effect like this: http://www.piccante.co/sliding-doors/index.htm But it's for MooTools and I need a jquery version which has a very nice and smooth motion. Could you suggest such a plugin?
ANSWER:
AFAIK these are called horizontal accordions. Thi... | [
"jquery",
"jquery-plugins",
"sliding-doors"
] | 3 | 5 | 1,030 | 1 | 0 | 2011-06-05T08:22:10.920000 | 2011-06-05T08:50:44.033000 |
6,241,751 | 6,242,870 | How to use jquery to animate a back flip out of a button? | I would like to recreate this effect (using jquery) because I think its the coolest thing ever. http://m.madebycanvas.com/things/backflip.html (its by Matthew Farag)...but I have no idea where to start. Does anyone know how or have any ideas? The author uses scripty2 and the prototype framework and scriptaculous, I bel... | It is using Webkit animation. I have made a demo page extracting the essential code from the page you posted: http://jsfiddle.net/42rT4/2/. I hope that's helpful. Please note though, the author specifically asks you not to copy the code, so you should just learn from it and roll your own. | How to use jquery to animate a back flip out of a button? I would like to recreate this effect (using jquery) because I think its the coolest thing ever. http://m.madebycanvas.com/things/backflip.html (its by Matthew Farag)...but I have no idea where to start. Does anyone know how or have any ideas? The author uses scr... | TITLE:
How to use jquery to animate a back flip out of a button?
QUESTION:
I would like to recreate this effect (using jquery) because I think its the coolest thing ever. http://m.madebycanvas.com/things/backflip.html (its by Matthew Farag)...but I have no idea where to start. Does anyone know how or have any ideas? T... | [
"jquery",
"jquery-ui",
"flip",
"jquery-effects"
] | 4 | 2 | 1,789 | 2 | 0 | 2011-06-05T08:22:50.873000 | 2011-06-05T12:21:17.873000 |
6,241,752 | 6,241,773 | Passing more than one parameter from jQuery to ASHX | How can I pass more than one parameter from jQuery to an ASHX file. I want to send three values with POST, not GET. | $.ajax({ 'type': 'POST', 'url': '/my_great_ashx_file.ashx', 'data': { 'first_field': 'foo', 'second_field': 'bar', 'third_field': 'buz' }, 'success': function () { alert('This was a triumph.'); } }) | Passing more than one parameter from jQuery to ASHX How can I pass more than one parameter from jQuery to an ASHX file. I want to send three values with POST, not GET. | TITLE:
Passing more than one parameter from jQuery to ASHX
QUESTION:
How can I pass more than one parameter from jQuery to an ASHX file. I want to send three values with POST, not GET.
ANSWER:
$.ajax({ 'type': 'POST', 'url': '/my_great_ashx_file.ashx', 'data': { 'first_field': 'foo', 'second_field': 'bar', 'third_fie... | [
"jquery",
"ashx"
] | 1 | 3 | 1,990 | 2 | 0 | 2011-06-05T08:22:53.557000 | 2011-06-05T08:26:31.817000 |
6,241,753 | 6,242,295 | Mysql auto_increment proceed with lowest value | My problem is: I have a table with an auto_increment column. When I insert some values, all is right. Insert first row: ID 1 Insert second row: ID 2 Now I want to insert a row at ID 10. My problem is, that after this there are only rows inserted after ID 10 (which is the normal behaviour ). But I want that the database... | You could have another integer column for URL IDs. Your process then might look like this: If a default name is generated for a link, then you simply insert a new row, fill the URL ID column with the auto-increment value, then convert the result to the corresponding name. If a custom name is specified for a URL, then, ... | Mysql auto_increment proceed with lowest value My problem is: I have a table with an auto_increment column. When I insert some values, all is right. Insert first row: ID 1 Insert second row: ID 2 Now I want to insert a row at ID 10. My problem is, that after this there are only rows inserted after ID 10 (which is the n... | TITLE:
Mysql auto_increment proceed with lowest value
QUESTION:
My problem is: I have a table with an auto_increment column. When I insert some values, all is right. Insert first row: ID 1 Insert second row: ID 2 Now I want to insert a row at ID 10. My problem is, that after this there are only rows inserted after ID ... | [
"mysql",
"sql",
"auto-increment"
] | 1 | 0 | 1,860 | 5 | 0 | 2011-06-05T08:23:18.297000 | 2011-06-05T10:18:09.820000 |
6,241,756 | 6,241,767 | Efficient collection for inserts and removals at the beginning | What collection would you recommend for a code that frequently inserts and removes objects at the beginning of the collection only. Here is some code to illustrate my requirements while (collection.Count!= 0) { object obj = collection[0]; collection.RemoveAt(0);...
if (somethingWith(obj)) collection.Insert(0, anotherO... | It seems you only want to implement a LIFO container, so you can use a Stack: while (stack.Count > 0) { object obj = stack.Pop(); //... if (SomethingWith(obj)) { stack.Push(anotherObj); } } | Efficient collection for inserts and removals at the beginning What collection would you recommend for a code that frequently inserts and removes objects at the beginning of the collection only. Here is some code to illustrate my requirements while (collection.Count!= 0) { object obj = collection[0]; collection.RemoveA... | TITLE:
Efficient collection for inserts and removals at the beginning
QUESTION:
What collection would you recommend for a code that frequently inserts and removes objects at the beginning of the collection only. Here is some code to illustrate my requirements while (collection.Count!= 0) { object obj = collection[0]; ... | [
"c#",
"collections"
] | 3 | 8 | 127 | 1 | 0 | 2011-06-05T08:23:35.690000 | 2011-06-05T08:25:55.127000 |
6,241,757 | 6,242,184 | Is it appropriate to use OSGI framework on small java app? | I have a plan to reimplement one of my small but usefull applications with OSGI framework. I never used it, so I ask is it appropriate to use OSGI on small app and is it a big difference in speed or/and memory footprint when using such framework. Also if it is a good option I would ask what implementation is best for s... | For modern computer systems, speed and memory footprint of OSGi are of no concern at all: remember that OSGi was developed for resource-constrained devices. The memory footprint is in the hundreds of kBs, and once the service resolution is done, the framework has no impact on the speed of your application (for instance... | Is it appropriate to use OSGI framework on small java app? I have a plan to reimplement one of my small but usefull applications with OSGI framework. I never used it, so I ask is it appropriate to use OSGI on small app and is it a big difference in speed or/and memory footprint when using such framework. Also if it is ... | TITLE:
Is it appropriate to use OSGI framework on small java app?
QUESTION:
I have a plan to reimplement one of my small but usefull applications with OSGI framework. I never used it, so I ask is it appropriate to use OSGI on small app and is it a big difference in speed or/and memory footprint when using such framewo... | [
"java",
"osgi"
] | 4 | 5 | 1,147 | 4 | 0 | 2011-06-05T08:23:44.430000 | 2011-06-05T09:59:38.457000 |
6,241,765 | 6,241,844 | Initi and write array in objective-c | In my h file I declare a var that later should be an array: @interface myClass: CCNode { CGPoint *mVertices; }
@end In my init method: mVertices = malloc(size * size * sizeof(CGPoint));
mVertices[0][0] = ccp(0,0); At this last line I get an error Subscripted value is neither array nor pointer. Why do I get this error... | Your array is not two dimensional. It's just a list of vertices. If you want to allocate space for a dynamic two dimensional array in C you could do: CGPoint** mVertices; NSInteger nrows = 10; NSInteger ncolumns = 5; mVertices = calloc(sizeof(CGPoint*), nrows); if(mVertices == NULL){NSLog(@"Not enough memory to allocat... | Initi and write array in objective-c In my h file I declare a var that later should be an array: @interface myClass: CCNode { CGPoint *mVertices; }
@end In my init method: mVertices = malloc(size * size * sizeof(CGPoint));
mVertices[0][0] = ccp(0,0); At this last line I get an error Subscripted value is neither array... | TITLE:
Initi and write array in objective-c
QUESTION:
In my h file I declare a var that later should be an array: @interface myClass: CCNode { CGPoint *mVertices; }
@end In my init method: mVertices = malloc(size * size * sizeof(CGPoint));
mVertices[0][0] = ccp(0,0); At this last line I get an error Subscripted valu... | [
"objective-c",
"multidimensional-array"
] | 3 | 2 | 230 | 2 | 0 | 2011-06-05T08:25:35.600000 | 2011-06-05T08:43:53.453000 |
6,241,784 | 6,247,533 | Generating random numbers with normal distribution in Excel | I want to produce 100 random numbers with normal distribution (with µ=10, σ=7) and then draw a quantity diagram for these numbers. How can I produce random numbers with a specific distribution in Excel 2010? One more question: When I produce, for example, 20 random numbers with RANDBETWEEN(Bottom,Top), the numbers chan... | Use the NORMINV function together with RAND(): =NORMINV(RAND(),10,7) To keep your set of random values from changing, select all the values, copy them, and then paste (special) the values back into the same range. Sample output (column A), 500 numbers generated with this formula: | Generating random numbers with normal distribution in Excel I want to produce 100 random numbers with normal distribution (with µ=10, σ=7) and then draw a quantity diagram for these numbers. How can I produce random numbers with a specific distribution in Excel 2010? One more question: When I produce, for example, 20 r... | TITLE:
Generating random numbers with normal distribution in Excel
QUESTION:
I want to produce 100 random numbers with normal distribution (with µ=10, σ=7) and then draw a quantity diagram for these numbers. How can I produce random numbers with a specific distribution in Excel 2010? One more question: When I produce,... | [
"excel",
"random",
"normal-distribution"
] | 67 | 114 | 218,810 | 8 | 0 | 2011-06-05T08:28:51.213000 | 2011-06-06T03:28:53.067000 |
6,241,786 | 6,243,400 | Help on Tab Layout example | New bee to Android, I need help on creating tabs. I am following the example stated in http://developer.android.com/resources/tutorials/views/hello-tabwidget.html When I run the application, I am not seeing any tabs but only Songs tab. I am not able to figure out how to resolve this. Below code is added under AndriodMa... | Make it look something like this: This part: is for the entry part of your app. | Help on Tab Layout example New bee to Android, I need help on creating tabs. I am following the example stated in http://developer.android.com/resources/tutorials/views/hello-tabwidget.html When I run the application, I am not seeing any tabs but only Songs tab. I am not able to figure out how to resolve this. Below co... | TITLE:
Help on Tab Layout example
QUESTION:
New bee to Android, I need help on creating tabs. I am following the example stated in http://developer.android.com/resources/tutorials/views/hello-tabwidget.html When I run the application, I am not seeing any tabs but only Songs tab. I am not able to figure out how to reso... | [
"android",
"eclipse"
] | 0 | 1 | 822 | 2 | 0 | 2011-06-05T08:29:02.290000 | 2011-06-05T14:06:11.720000 |
6,241,795 | 6,245,808 | Rewriting /foo to /foo.php doesn't work | I want users to be able to go to /foo and have /foo.php displayed. A quick search on Google came up with this: RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php For some reason, however, this doesn't work. I keep getting a 404 error, even though I know the.php file exists. I searched and searched for an... | I found the answer! Apparently this is a problem with 1and1's server configuration. This article explains the problem: http://tips.webdesign10.com/web-hosting/why-you-should-never-use-1and1-com-hosting The first comment also happens to be the solution. Here's the rule that works: Options -MultiViews RewriteEngine On Re... | Rewriting /foo to /foo.php doesn't work I want users to be able to go to /foo and have /foo.php displayed. A quick search on Google came up with this: RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php For some reason, however, this doesn't work. I keep getting a 404 error, even though I know the.php fil... | TITLE:
Rewriting /foo to /foo.php doesn't work
QUESTION:
I want users to be able to go to /foo and have /foo.php displayed. A quick search on Google came up with this: RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php For some reason, however, this doesn't work. I keep getting a 404 error, even though ... | [
"php",
".htaccess",
"mod-rewrite",
"url-rewriting"
] | 0 | 1 | 373 | 6 | 0 | 2011-06-05T08:30:08.777000 | 2011-06-05T20:57:05.077000 |
6,241,804 | 6,241,821 | How to confirm that a string is valid base36 of an integer? | I had code like this: $alias = 'myalias'; echo " "; echo " ALIAS: $alias ROUND: ", intval($alias, 36), "\n", "AGAIN: ", base_convert(intval($alias, 36), 10, 36);
echo " ";
$alias = '27xk3q'; echo " "; echo " ALIAS: $alias ROUND: ", intval($alias, 36), "\n", "AGAIN: ", base_convert(intval($alias, 36), 10, 36); This us... | As you see, the "myalias" string just prints as itself in the Linux version of PHP. And it is correct behaviour. You get another results on your mac - because it is 32bit and your number is truncated to 2147483647 ( 2^32 - 1 ) if (preg_match('~^[a-z\d]+$~', $string)) { // valid base36 } | How to confirm that a string is valid base36 of an integer? I had code like this: $alias = 'myalias'; echo " "; echo " ALIAS: $alias ROUND: ", intval($alias, 36), "\n", "AGAIN: ", base_convert(intval($alias, 36), 10, 36);
echo " ";
$alias = '27xk3q'; echo " "; echo " ALIAS: $alias ROUND: ", intval($alias, 36), "\n", ... | TITLE:
How to confirm that a string is valid base36 of an integer?
QUESTION:
I had code like this: $alias = 'myalias'; echo " "; echo " ALIAS: $alias ROUND: ", intval($alias, 36), "\n", "AGAIN: ", base_convert(intval($alias, 36), 10, 36);
echo " ";
$alias = '27xk3q'; echo " "; echo " ALIAS: $alias ROUND: ", intval($... | [
"php",
"base36"
] | 1 | 2 | 1,003 | 2 | 0 | 2011-06-05T08:33:25.767000 | 2011-06-05T08:37:42.880000 |
6,241,806 | 6,241,813 | C# Generics: What does IComparable<Nullable<T>> mean? | In the following chunk of code: public struct Nullable: IFormattable, IComparable, INullable, IComparable > { //... } I understand that this struct is implementing these interfaces but I do not get the IComparable > part. What it means? | It means that you can compare any Nullable with another instance of Nullable (for the same T ) in a strongly typed way. It will have a method like this: public int CompareTo(Nullable other) Note that the normal Nullable struct doesn't have any of these interfaces. Personally I think it would be somewhat confusing to ha... | C# Generics: What does IComparable<Nullable<T>> mean? In the following chunk of code: public struct Nullable: IFormattable, IComparable, INullable, IComparable > { //... } I understand that this struct is implementing these interfaces but I do not get the IComparable > part. What it means? | TITLE:
C# Generics: What does IComparable<Nullable<T>> mean?
QUESTION:
In the following chunk of code: public struct Nullable: IFormattable, IComparable, INullable, IComparable > { //... } I understand that this struct is implementing these interfaces but I do not get the IComparable > part. What it means?
ANSWER:
It... | [
"c#",
".net",
"generics"
] | 1 | 4 | 687 | 1 | 0 | 2011-06-05T08:33:28.903000 | 2011-06-05T08:34:19.060000 |
6,241,810 | 6,242,238 | Rails facebook Iframe app error: InvalidAuthenticityToken | I get this error when I acccess my facebook iframe app: The change you wanted was rejected.
Maybe you tried to change something you didn't have access to. Heroku logs: 2011-06-05T08:30:41+00:00 app[web.1]: Started POST "/facebook/" for xxxx 03 at 2011-06-05 10:30:41 +0200 2011-06-05T08:30:41+00:00 heroku[router]: POST... | By default, Rails requires a token to be included as a hidden field with every POST. This protects your app from Cross-Site Request Forgery. See the Rails Request Forgery Protection documentation. skip_before_filter:verify_authenticity_token may be useful for further debugging. | Rails facebook Iframe app error: InvalidAuthenticityToken I get this error when I acccess my facebook iframe app: The change you wanted was rejected.
Maybe you tried to change something you didn't have access to. Heroku logs: 2011-06-05T08:30:41+00:00 app[web.1]: Started POST "/facebook/" for xxxx 03 at 2011-06-05 10:... | TITLE:
Rails facebook Iframe app error: InvalidAuthenticityToken
QUESTION:
I get this error when I acccess my facebook iframe app: The change you wanted was rejected.
Maybe you tried to change something you didn't have access to. Heroku logs: 2011-06-05T08:30:41+00:00 app[web.1]: Started POST "/facebook/" for xxxx 03... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3",
"facebook",
"heroku"
] | 1 | 1 | 1,139 | 1 | 0 | 2011-06-05T08:34:07.933000 | 2011-06-05T10:07:48.023000 |
6,241,814 | 6,241,866 | Change div background using AJAX | I have a web page with HTML as below: stringname I have set a loader GIF as its default background. I have a PHP file, ajax.php which return a number (or name) with respect to a $_POST["filename"]. What I want is, the page send text inside the div (here stringname ) and the AJAX will return a name or number. When the s... | and don't forget adding the jQuery script tag to the bottom of your -body- tag (but still inside it): | Change div background using AJAX I have a web page with HTML as below: stringname I have set a loader GIF as its default background. I have a PHP file, ajax.php which return a number (or name) with respect to a $_POST["filename"]. What I want is, the page send text inside the div (here stringname ) and the AJAX will re... | TITLE:
Change div background using AJAX
QUESTION:
I have a web page with HTML as below: stringname I have set a loader GIF as its default background. I have a PHP file, ajax.php which return a number (or name) with respect to a $_POST["filename"]. What I want is, the page send text inside the div (here stringname ) an... | [
"php",
"jquery"
] | 0 | 1 | 3,473 | 3 | 0 | 2011-06-05T08:34:30.197000 | 2011-06-05T08:49:35.043000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.