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,249,526 | 6,249,579 | How to Access a connectionstring from another project | I got two project in my solution in Visual Studio 2010. Project 1 contains an app.config with a ConnectionString. How can I access that ConnectionString from Project 2? Since they are both using the same ConnectionString, I would prefer to only have one instance in my solution. | You can add the files as a link to the file to one of your projects. Use Add an Existing Item to the project you want to add the file to - the Open button has a small down arrow, if you click that you can select Add as Link. This will add the file as a link from the original location, meaning you only have one physical... | How to Access a connectionstring from another project I got two project in my solution in Visual Studio 2010. Project 1 contains an app.config with a ConnectionString. How can I access that ConnectionString from Project 2? Since they are both using the same ConnectionString, I would prefer to only have one instance in ... | TITLE:
How to Access a connectionstring from another project
QUESTION:
I got two project in my solution in Visual Studio 2010. Project 1 contains an app.config with a ConnectionString. How can I access that ConnectionString from Project 2? Since they are both using the same ConnectionString, I would prefer to only hav... | [
"c#",
".net",
"connection-string"
] | 11 | 5 | 13,959 | 5 | 0 | 2011-06-06T08:42:54.473000 | 2011-06-06T08:47:43.653000 |
6,249,532 | 6,249,637 | Submit the button name by hitting the enter key on IE6 | I have a problem on IE6 only. I have a page with several forms, each contains a textbox and a submit button. As I'm using.NET MVC, I need the name of the submit button to execute the correct Action. When I'm hitting 'Enter' key, I have the same behaviour as a clicked action on Firefox or Chrome (Field and ButtonName is... | I think, you shouldn't rely on the name of submit button, but rather create an with the name you want (like search ). There's really no difference between submit button name and the name of any other input field, except that submit input field is not really a field, so there always could be some artifacts with that. | Submit the button name by hitting the enter key on IE6 I have a problem on IE6 only. I have a page with several forms, each contains a textbox and a submit button. As I'm using.NET MVC, I need the name of the submit button to execute the correct Action. When I'm hitting 'Enter' key, I have the same behaviour as a click... | TITLE:
Submit the button name by hitting the enter key on IE6
QUESTION:
I have a problem on IE6 only. I have a page with several forms, each contains a textbox and a submit button. As I'm using.NET MVC, I need the name of the submit button to execute the correct Action. When I'm hitting 'Enter' key, I have the same be... | [
"javascript",
"html",
"internet-explorer-6"
] | 0 | 1 | 317 | 1 | 0 | 2011-06-06T08:44:01.330000 | 2011-06-06T08:53:41.360000 |
6,249,533 | 6,249,555 | What is the complexity of the below program? | What is the complexity of the below program? I think it must be O(n), since there is a for loop that runs for n times. It is a program to reverse the bits in a given integer. unsigned int reverseBits(unsigned int num) { unsigned int NO_OF_BITS = sizeof(num) * 8; unsigned int reverse_num = 0; int i; for (i = 0; i < NO_O... | If n is the input number, then NO_OF_BITS is O(log n) (think about it: to represent a binary number n, you need about log2(n) bits). EDIT: Let me clarify, in the light of other responses and comments. First, let n be the input number ( num ). It's important to clarify this because if we consider n to be NO_OF_BITS inst... | What is the complexity of the below program? What is the complexity of the below program? I think it must be O(n), since there is a for loop that runs for n times. It is a program to reverse the bits in a given integer. unsigned int reverseBits(unsigned int num) { unsigned int NO_OF_BITS = sizeof(num) * 8; unsigned int... | TITLE:
What is the complexity of the below program?
QUESTION:
What is the complexity of the below program? I think it must be O(n), since there is a for loop that runs for n times. It is a program to reverse the bits in a given integer. unsigned int reverseBits(unsigned int num) { unsigned int NO_OF_BITS = sizeof(num)... | [
"c++",
"c"
] | 1 | 0 | 463 | 5 | 0 | 2011-06-06T08:44:02.237000 | 2011-06-06T08:45:58.583000 |
6,249,535 | 6,252,505 | Multi step form in joomla? | I have to make a multistep registration form in joomla.In first step i will only take personal information from user. IF user input the detail correct then only the yser will go to next step. Please tell me if any plugin or component that provide this kind of functionalty Thanks in advance Pramod | You need to specify which version as the extensions available are different. Assuming you are using 1.5 then you can use Chronoforms. I'm not sure if the 1.6 version can do it, but the 1.5 has multistep form capability and also allows you to enter your own code for processing between forms. http://extensions.joomla.org... | Multi step form in joomla? I have to make a multistep registration form in joomla.In first step i will only take personal information from user. IF user input the detail correct then only the yser will go to next step. Please tell me if any plugin or component that provide this kind of functionalty Thanks in advance Pr... | TITLE:
Multi step form in joomla?
QUESTION:
I have to make a multistep registration form in joomla.In first step i will only take personal information from user. IF user input the detail correct then only the yser will go to next step. Please tell me if any plugin or component that provide this kind of functionalty Th... | [
"forms",
"joomla1.5"
] | 0 | 1 | 1,334 | 2 | 0 | 2011-06-06T08:44:14.270000 | 2011-06-06T13:11:11.877000 |
6,249,537 | 6,250,007 | indexOf in a string array | Is there anyway to get indexOf like you would get in a string. output.add("1 2 3 4 5 6 7 8 9 10); String bigger[] = output.get(i).split(" "); int biggerWher = bigger.indexOf("10"); I wrote this code but its returning an error and not compiling! Any advice? | Use this... output.add("1 2 3 4 5 6 7 8 9 10"); String bigger[] = output.get(i).split(" "); int biggerWher = Arrays.asList(bigger).indexOf("3"); | indexOf in a string array Is there anyway to get indexOf like you would get in a string. output.add("1 2 3 4 5 6 7 8 9 10); String bigger[] = output.get(i).split(" "); int biggerWher = bigger.indexOf("10"); I wrote this code but its returning an error and not compiling! Any advice? | TITLE:
indexOf in a string array
QUESTION:
Is there anyway to get indexOf like you would get in a string. output.add("1 2 3 4 5 6 7 8 9 10); String bigger[] = output.get(i).split(" "); int biggerWher = bigger.indexOf("10"); I wrote this code but its returning an error and not compiling! Any advice?
ANSWER:
Use this..... | [
"java",
"arrays",
"string",
"indexof"
] | 17 | 62 | 68,703 | 6 | 0 | 2011-06-06T08:44:23.843000 | 2011-06-06T09:28:57.380000 |
6,249,542 | 6,249,649 | Value not saving in array | I have an array which have this structure: $queues[n] Array ( [id] => integer [idClient] => integer [name] => string [people] => integer ) Which is populated with: $query = "SELECT clients.idClient AS 'idClient', queues.idQueue AS 'idQueue', queues.name AS 'name' FROM clients, queues WHERE clients.idClient = queues.cli... | My guess is that you're looping through $queues with foreach loop like this: foreach ( $queues as $queue ) { $result = mysql_query($query); if ($result){ $num_people = mysql_fetch_row($result); $queue['people'] = $num_people[0]; } } If so, there's no "link" between $queue and $queues[$n], i.e., by modifying $queue, you... | Value not saving in array I have an array which have this structure: $queues[n] Array ( [id] => integer [idClient] => integer [name] => string [people] => integer ) Which is populated with: $query = "SELECT clients.idClient AS 'idClient', queues.idQueue AS 'idQueue', queues.name AS 'name' FROM clients, queues WHERE cli... | TITLE:
Value not saving in array
QUESTION:
I have an array which have this structure: $queues[n] Array ( [id] => integer [idClient] => integer [name] => string [people] => integer ) Which is populated with: $query = "SELECT clients.idClient AS 'idClient', queues.idQueue AS 'idQueue', queues.name AS 'name' FROM clients... | [
"php",
"mysql",
"arrays"
] | 3 | 5 | 3,120 | 2 | 0 | 2011-06-06T08:44:58.943000 | 2011-06-06T08:55:32.030000 |
6,249,549 | 6,249,982 | how i can got the value who are define n times in the form in ASP.NET MVC? | i have a form where user fill the n time a information using add another textbox and fill them. i put the name them as textbox_1 textbox_2 now how i can got all form values who are start with textbox_1. any idea to do it in asp.net mvc | you can get the value of this text box using javascript and save it in hidden field as comma separated then read the hidden field value from your action method(I am using jquery) var AllTextBoxesInPage = $('input[type=text]'); var AllValues=''; AllTextBoxesInPage.each(function(index){ if(index==0) { AllValues+=','; } A... | how i can got the value who are define n times in the form in ASP.NET MVC? i have a form where user fill the n time a information using add another textbox and fill them. i put the name them as textbox_1 textbox_2 now how i can got all form values who are start with textbox_1. any idea to do it in asp.net mvc | TITLE:
how i can got the value who are define n times in the form in ASP.NET MVC?
QUESTION:
i have a form where user fill the n time a information using add another textbox and fill them. i put the name them as textbox_1 textbox_2 now how i can got all form values who are start with textbox_1. any idea to do it in asp... | [
"c#",
"asp.net-mvc"
] | 0 | 2 | 254 | 2 | 0 | 2011-06-06T08:45:25.590000 | 2011-06-06T09:26:43.807000 |
6,249,577 | 6,249,629 | Interrupting blocked read | My program goes through a loop like this:... while(1){ read(sockfd,buf,sizeof(buf));... } The read function blocks when it is waiting for input, which happens to be from a socket. I want to handle SIGINT and basically tell it to stop the read function if it is reading and then call an arbitrary function. What is the be... | From read(2): EINTR The call was interrupted by a signal before any data was read; see signal(7). If you amend your code to look more like: cont = 1; while (1 && cont) { ret = read(sockfd, buf, sizeof(buf)); if (ret < 0 && errno == EINTR) cont = arbitrary_function(); } This lets arbitrary_function() decide if the read(... | Interrupting blocked read My program goes through a loop like this:... while(1){ read(sockfd,buf,sizeof(buf));... } The read function blocks when it is waiting for input, which happens to be from a socket. I want to handle SIGINT and basically tell it to stop the read function if it is reading and then call an arbitrar... | TITLE:
Interrupting blocked read
QUESTION:
My program goes through a loop like this:... while(1){ read(sockfd,buf,sizeof(buf));... } The read function blocks when it is waiting for input, which happens to be from a socket. I want to handle SIGINT and basically tell it to stop the read function if it is reading and the... | [
"c",
"linux",
"signals",
"interrupt"
] | 18 | 18 | 16,229 | 2 | 0 | 2011-06-06T08:47:36.190000 | 2011-06-06T08:52:51.707000 |
6,249,586 | 6,249,685 | Finding the location of data write using fwrite function in C | I want to write multiple structures to a single file. I used fwrite function and append mode. The writing process is done without any error. How can i read the specific structure. Which means if i want to read the third structure that i wrote to file, how can i do it. I used fseek function and try to find the third pos... | FILE * pFile; pFile = fopen ( "example.txt", "rb" ); fseek ( pFile, sizeof(MyStruct)*2, SEEK_SET ); MyStruct str; fread(&str, sizeof(MyStruct), 1, pFile,) | Finding the location of data write using fwrite function in C I want to write multiple structures to a single file. I used fwrite function and append mode. The writing process is done without any error. How can i read the specific structure. Which means if i want to read the third structure that i wrote to file, how ca... | TITLE:
Finding the location of data write using fwrite function in C
QUESTION:
I want to write multiple structures to a single file. I used fwrite function and append mode. The writing process is done without any error. How can i read the specific structure. Which means if i want to read the third structure that i wro... | [
"c"
] | 0 | 3 | 500 | 2 | 0 | 2011-06-06T08:48:22.407000 | 2011-06-06T08:59:24.417000 |
6,249,596 | 6,249,760 | Unable to instantiate activity in android | when i am running my project it will show the following message on log cat please help me. i have cleaned project many times. and i am using rest Templates. 06-06 14:08:42.251: ERROR/AndroidRuntime(432): FATAL EXCEPTION: main 06-06 14:08:42.251: ERROR/AndroidRuntime(432): java.lang.RuntimeException: Unable to instantia... | make sure that the package of your activity MainActivity is really org.shopzilla.android.common. | Unable to instantiate activity in android when i am running my project it will show the following message on log cat please help me. i have cleaned project many times. and i am using rest Templates. 06-06 14:08:42.251: ERROR/AndroidRuntime(432): FATAL EXCEPTION: main 06-06 14:08:42.251: ERROR/AndroidRuntime(432): java.... | TITLE:
Unable to instantiate activity in android
QUESTION:
when i am running my project it will show the following message on log cat please help me. i have cleaned project many times. and i am using rest Templates. 06-06 14:08:42.251: ERROR/AndroidRuntime(432): FATAL EXCEPTION: main 06-06 14:08:42.251: ERROR/AndroidR... | [
"android"
] | 0 | 6 | 5,822 | 4 | 0 | 2011-06-06T08:49:04.463000 | 2011-06-06T09:05:35.790000 |
6,249,604 | 6,249,680 | How can I get the path of a given dll in java? | I have a.dll for example "example.dll" and I know that this dll is in one of the paths specified in java.library.path, there is a simple way to get the dll's path without executing a cicle on this list of paths? | No. You can't. The DLL's are not a Java's fully supported "type" so I am not sure even about the GAC approach. You have to iterate and find. | How can I get the path of a given dll in java? I have a.dll for example "example.dll" and I know that this dll is in one of the paths specified in java.library.path, there is a simple way to get the dll's path without executing a cicle on this list of paths? | TITLE:
How can I get the path of a given dll in java?
QUESTION:
I have a.dll for example "example.dll" and I know that this dll is in one of the paths specified in java.library.path, there is a simple way to get the dll's path without executing a cicle on this list of paths?
ANSWER:
No. You can't. The DLL's are not a... | [
"java",
"dll"
] | 0 | 0 | 156 | 2 | 0 | 2011-06-06T08:50:11.890000 | 2011-06-06T08:58:54.557000 |
6,249,608 | 6,252,016 | iOS Device communication | I am keen to get some apps built that can communicate with other devices/ web etc. i have played around with FTP and can get so far. But what is the best way to do this? We don't have any Servers with databases etc, but do have a site that we are currently uploading and downloading files to. can anyone suggest a good/ ... | If it's HTTP communication you're wanting to do, the simplest and most powerful tool is ASIHTTPRequest. HTTP is the protocol your web browser uses to talk to web servers. If you have a site you're storing and downloading files at, it's almost certainly HTTP you're talking to it. | iOS Device communication I am keen to get some apps built that can communicate with other devices/ web etc. i have played around with FTP and can get so far. But what is the best way to do this? We don't have any Servers with databases etc, but do have a site that we are currently uploading and downloading files to. ca... | TITLE:
iOS Device communication
QUESTION:
I am keen to get some apps built that can communicate with other devices/ web etc. i have played around with FTP and can get so far. But what is the best way to do this? We don't have any Servers with databases etc, but do have a site that we are currently uploading and downlo... | [
"iphone",
"cocoa-touch",
"ios",
"ftp"
] | 0 | 0 | 937 | 2 | 0 | 2011-06-06T08:50:23.467000 | 2011-06-06T12:30:23.387000 |
6,249,609 | 6,249,658 | Rails 3 bundler updating | I have an application running on thin 1.2.11 behind nginx. I was trying to update my application to the latest version of it's gems using bundle update on a development machine, commiting to git, then running cap deploy. However, thin is giving me the following error: /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.14/... | Please read this: http://yehudakatz.com/2011/05/30/gem-versioning-and-bundler-doing-it-right/ before you tell us what you prefer. Problem is you prefer to run command from gem installed into system to run application which has it's own dependencies (i.e. rack) specified in Gemfile. You can't have two version of same li... | Rails 3 bundler updating I have an application running on thin 1.2.11 behind nginx. I was trying to update my application to the latest version of it's gems using bundle update on a development machine, commiting to git, then running cap deploy. However, thin is giving me the following error: /usr/local/lib/ruby/gems/1... | TITLE:
Rails 3 bundler updating
QUESTION:
I have an application running on thin 1.2.11 behind nginx. I was trying to update my application to the latest version of it's gems using bundle update on a development machine, commiting to git, then running cap deploy. However, thin is giving me the following error: /usr/loc... | [
"ruby-on-rails",
"thin"
] | 0 | 3 | 2,520 | 2 | 0 | 2011-06-06T08:50:28.990000 | 2011-06-06T08:56:19.393000 |
6,249,613 | 6,252,430 | working of wubi? | Please tell me the working if wubi installer.If we install ubuntu inside windows,in boot.ini file there is an entry for ubuntu loader.But how the kernel starts?How the root.disk file mount before loading kernel? | The Windows bootloader is capable of starting operating systems other than just Windows. I can't speak to Wubi specifically as I haven't looked at their code but I developed a similar solution a couple years ago that worked equivalently. Basically, you do the following: Booting Put a copy of the kernel and a custom ini... | working of wubi? Please tell me the working if wubi installer.If we install ubuntu inside windows,in boot.ini file there is an entry for ubuntu loader.But how the kernel starts?How the root.disk file mount before loading kernel? | TITLE:
working of wubi?
QUESTION:
Please tell me the working if wubi installer.If we install ubuntu inside windows,in boot.ini file there is an entry for ubuntu loader.But how the kernel starts?How the root.disk file mount before loading kernel?
ANSWER:
The Windows bootloader is capable of starting operating systems ... | [
"linux",
"ubuntu",
"wubi"
] | 1 | 0 | 279 | 1 | 0 | 2011-06-06T08:51:01.660000 | 2011-06-06T13:04:23.473000 |
6,249,620 | 6,278,483 | How to get ccache to not pass the full path to the compiler to distcc | (This is different to the question ccache and absolute path as I want only the command path to not be expanded on the ccache host machine) When using ccache and distcc together ccache is expanding the compiler to an absolute path, and then distcc cannot use the PATH on the remote machine to choose which compiler to use... | Turns out there's a simple way to do this: just use a wrapper for CCACHE_PREFIX instead of distcc directly, with something like this: File: distcc-wrap.sh #!/bin/sh compiler=$(basename $1) shift exec distcc "$compiler" "$@" export CCACHE_PREFIX=distcc-wrap.sh and then this allows the remote compiler to live at a differ... | How to get ccache to not pass the full path to the compiler to distcc (This is different to the question ccache and absolute path as I want only the command path to not be expanded on the ccache host machine) When using ccache and distcc together ccache is expanding the compiler to an absolute path, and then distcc can... | TITLE:
How to get ccache to not pass the full path to the compiler to distcc
QUESTION:
(This is different to the question ccache and absolute path as I want only the command path to not be expanded on the ccache host machine) When using ccache and distcc together ccache is expanding the compiler to an absolute path, a... | [
"path",
"absolute",
"distcc",
"ccache"
] | 7 | 7 | 3,370 | 2 | 0 | 2011-06-06T08:51:40.877000 | 2011-06-08T12:11:14.580000 |
6,249,624 | 6,249,901 | Search mySQL table for string and return the name of the field it is in | I have a table with 3 columns title | subtitle | body I need to search all the rows in the table and return which columns contain the search term. How can I do this? Ultimately the idea is a basic "find & Replace" system. | Something like: query("SELECT * FROM table WHERE MATCH(title,subtitle,body) AGAINST (?)", $yourSearchTerm); //> assuming PDO
while($row = fetch_assoc($query)) { foreach( $row as $k=>$v ) { if (strpos($v,$yourSearchTerm)!==false) echo 'The search word was found in the column: '.$k.' '; } } If you don't have pdo mysql_q... | Search mySQL table for string and return the name of the field it is in I have a table with 3 columns title | subtitle | body I need to search all the rows in the table and return which columns contain the search term. How can I do this? Ultimately the idea is a basic "find & Replace" system. | TITLE:
Search mySQL table for string and return the name of the field it is in
QUESTION:
I have a table with 3 columns title | subtitle | body I need to search all the rows in the table and return which columns contain the search term. How can I do this? Ultimately the idea is a basic "find & Replace" system.
ANSWER:... | [
"php",
"mysql"
] | 0 | 1 | 130 | 1 | 0 | 2011-06-06T08:52:24.323000 | 2011-06-06T09:19:31.653000 |
6,249,632 | 6,251,013 | Nullable(of Guid) with Generic Delegate causes weird (hidden) error? | Scroll to the bottom, EDIT 19 onwards. See @Chris's comments also for good examples VB: Public Class Class1 Private Delegate Sub AnEventHandler(Of T)(ByVal newValue As T) Private Event OnSomething As AnEventHandler(Of Nullable(Of Guid)) End Class C#: public class Class1 { private delegate void AnEventHandler (T newValu... | It would appear to be a bug in the code generated behind the scenes by the VB.Net compiler. The following compiles fine, and should be functionally equivalent: Public Class Class1 Private Delegate Sub AnEventHandler(Of T)(ByVal newValue As T) Private OnSomethingEvent As AnEventHandler(Of Nullable(Of Guid)) Private Cust... | Nullable(of Guid) with Generic Delegate causes weird (hidden) error? Scroll to the bottom, EDIT 19 onwards. See @Chris's comments also for good examples VB: Public Class Class1 Private Delegate Sub AnEventHandler(Of T)(ByVal newValue As T) Private Event OnSomething As AnEventHandler(Of Nullable(Of Guid)) End Class C#: ... | TITLE:
Nullable(of Guid) with Generic Delegate causes weird (hidden) error?
QUESTION:
Scroll to the bottom, EDIT 19 onwards. See @Chris's comments also for good examples VB: Public Class Class1 Private Delegate Sub AnEventHandler(Of T)(ByVal newValue As T) Private Event OnSomething As AnEventHandler(Of Nullable(Of Gui... | [
"c#",
"vb.net",
"visual-studio-2008",
"visual-studio-2010",
".net-4.0"
] | 1 | 3 | 322 | 3 | 0 | 2011-06-06T08:53:19.070000 | 2011-06-06T10:57:43.533000 |
6,249,635 | 6,252,055 | Rails full-fledged admin control panel | I'm wondering what's Rails approach when it comes to creating a full-fledged admin control panel. And by full-fledged I mean a real control panel that could be used on a professional level, not personal/internal scaffolding. I don't believe its stored in the same folder as the user interface as it's shown in the blog s... | As hinted at by the previous answers namespacing is useful to keep admin functionality neatly separated from other user functionality, for example: # In your routes
namespace:admin do resources:stories resources:editors #etc. end Then you'd put all your admin controllers in an 'admin' subfolder and always require an a... | Rails full-fledged admin control panel I'm wondering what's Rails approach when it comes to creating a full-fledged admin control panel. And by full-fledged I mean a real control panel that could be used on a professional level, not personal/internal scaffolding. I don't believe its stored in the same folder as the use... | TITLE:
Rails full-fledged admin control panel
QUESTION:
I'm wondering what's Rails approach when it comes to creating a full-fledged admin control panel. And by full-fledged I mean a real control panel that could be used on a professional level, not personal/internal scaffolding. I don't believe its stored in the same... | [
"ruby-on-rails",
"ruby",
"ruby-on-rails-3"
] | 1 | 2 | 1,991 | 3 | 0 | 2011-06-06T08:53:27.707000 | 2011-06-06T12:33:05.397000 |
6,249,639 | 6,249,794 | Is there disadvantage in building with -g -O and strip vs. building only with -O | I have a C code executable for Linux. For release, I can have two options: One is build with -g -O3, strip the debug (strip -g) and send the output as release. Second is build the release directly with -O3. The advantage of the first option, if I understand correctly, is that I can use the exe before the stripping for ... | There is no run time performance hit for using -g. The debug info lives in a separate section of the executable, which wont even be loaded if you execute the file. But you can separate debug info and executables if you wish (which still won't make any performance difference). My Gentoo Linux handles it this way, the re... | Is there disadvantage in building with -g -O and strip vs. building only with -O I have a C code executable for Linux. For release, I can have two options: One is build with -g -O3, strip the debug (strip -g) and send the output as release. Second is build the release directly with -O3. The advantage of the first optio... | TITLE:
Is there disadvantage in building with -g -O and strip vs. building only with -O
QUESTION:
I have a C code executable for Linux. For release, I can have two options: One is build with -g -O3, strip the debug (strip -g) and send the output as release. Second is build the release directly with -O3. The advantage ... | [
"c",
"gcc"
] | 8 | 8 | 1,023 | 1 | 0 | 2011-06-06T08:54:19.100000 | 2011-06-06T09:08:46.570000 |
6,249,644 | 6,249,687 | objective-c #import whole framework or only needed file? | When I'm using big frameworks like the Three20 Framework, I always have the choice whether to #import the whole framework or to #import only the single file of it i'd need. I guess there's a difference in compilation-overhead since it has to open all files of the framework, but is there also a run-time difference? like... | There will be a compilation difference, yes: including everything will take longer to compile. But there shouldn't be a run-time difference. Your idea of including the framework in the prefix is a good one for frameworks you're going to be using throughout. However, there is a catch, which is that if you change somethi... | objective-c #import whole framework or only needed file? When I'm using big frameworks like the Three20 Framework, I always have the choice whether to #import the whole framework or to #import only the single file of it i'd need. I guess there's a difference in compilation-overhead since it has to open all files of the... | TITLE:
objective-c #import whole framework or only needed file?
QUESTION:
When I'm using big frameworks like the Three20 Framework, I always have the choice whether to #import the whole framework or to #import only the single file of it i'd need. I guess there's a difference in compilation-overhead since it has to ope... | [
"iphone",
"objective-c",
"import"
] | 0 | 2 | 383 | 3 | 0 | 2011-06-06T08:55:04.387000 | 2011-06-06T08:59:34.093000 |
6,249,660 | 6,249,671 | How to manipulate <script> tag using jQuery? is it possible? | hey masters of jquery, i would like to ask if the script tag of html can be manipulated by jquery. is it possible? scenario: i want to change the text "javascript/sqLite_dbController.js" to "javascript/gGears_dbController.js". can anyone help me pls. | The script has already been loaded when your code runs. So manipulation the script tag is pretty useless. | How to manipulate <script> tag using jQuery? is it possible? hey masters of jquery, i would like to ask if the script tag of html can be manipulated by jquery. is it possible? scenario: i want to change the text "javascript/sqLite_dbController.js" to "javascript/gGears_dbController.js". can anyone help me pls. | TITLE:
How to manipulate <script> tag using jQuery? is it possible?
QUESTION:
hey masters of jquery, i would like to ask if the script tag of html can be manipulated by jquery. is it possible? scenario: i want to change the text "javascript/sqLite_dbController.js" to "javascript/gGears_dbController.js". can anyone hel... | [
"javascript",
"jquery",
"html"
] | 1 | 4 | 327 | 1 | 0 | 2011-06-06T08:56:27.043000 | 2011-06-06T08:57:17.553000 |
6,249,664 | 6,250,418 | Does SVG support embedding of bitmap images? | Is an SVG image purely vectorial or can we combine bitmap images into an SVG image? How about transforms applied on the bitmap images (perspective, mappings, etc.)? Edit: Images may be included in an SVG by link reference. See http://www.w3.org/TR/SVG/struct.html#ImageElement. My question was in fact if bitmap images m... | Yes, you can reference any image from the image element. And you can use data URIs to make the SVG self-contained. An example:...... The svg element attribute xmlns:xlink declares xlink as a namespace prefix and says where the definition is. That then allows the SVG reader to know what xlink:href means. The IMAGE_DATA ... | Does SVG support embedding of bitmap images? Is an SVG image purely vectorial or can we combine bitmap images into an SVG image? How about transforms applied on the bitmap images (perspective, mappings, etc.)? Edit: Images may be included in an SVG by link reference. See http://www.w3.org/TR/SVG/struct.html#ImageElemen... | TITLE:
Does SVG support embedding of bitmap images?
QUESTION:
Is an SVG image purely vectorial or can we combine bitmap images into an SVG image? How about transforms applied on the bitmap images (perspective, mappings, etc.)? Edit: Images may be included in an SVG by link reference. See http://www.w3.org/TR/SVG/struc... | [
"image",
"svg",
"bitmapimage"
] | 184 | 260 | 144,889 | 6 | 0 | 2011-06-06T08:56:48.053000 | 2011-06-06T10:02:53.010000 |
6,249,665 | 6,249,940 | Effective way to check table name when db schema change? | I have think this question few month for my.NET project (winform & webform) or PHP project. I use Visual Studio 2010 Pro for.NET project and PDT for PHP Project. Maybe the best way is convert the project to ORM (L2S,EF, PHP ActiveRecord etc) instead of classic SQL statement, however, SQL still quite worth to use, at le... | Search and Replace is one possibility. Another would be to store the table name in constant values and work thim them, instead of putting the table name as plain text into the SQL file. A third solution, and maybe the best is to use MyBatis (former Ibatis) which stores the SQLs in an external XML file where you can upd... | Effective way to check table name when db schema change? I have think this question few month for my.NET project (winform & webform) or PHP project. I use Visual Studio 2010 Pro for.NET project and PDT for PHP Project. Maybe the best way is convert the project to ORM (L2S,EF, PHP ActiveRecord etc) instead of classic SQ... | TITLE:
Effective way to check table name when db schema change?
QUESTION:
I have think this question few month for my.NET project (winform & webform) or PHP project. I use Visual Studio 2010 Pro for.NET project and PDT for PHP Project. Maybe the best way is convert the project to ORM (L2S,EF, PHP ActiveRecord etc) ins... | [
"php",
".net",
"sql"
] | 3 | 1 | 137 | 2 | 0 | 2011-06-06T08:56:48.923000 | 2011-06-06T09:23:21.843000 |
6,249,668 | 6,249,919 | How do I set the selected item in a QListWidget? | I am adding two items to a listwidget using the code below. Now I want to set "Weekend Plus" as selected item in the listwidget, how do I do that? QStringList items; items << "All" << "Weekend Plus"; ui->listWidgetTimeSet->addItems(items); | You could either do it like this: QStringList items; items << "All" << "Weekend Plus"; listWidgetTimeSet->addItems(items); listWidgetTimeSet->setCurrentRow( 1 ); But that would mean that you know that "Weekend Plus is on second row and you need to remember that, in case you other items. Or you do it like that: QListWid... | How do I set the selected item in a QListWidget? I am adding two items to a listwidget using the code below. Now I want to set "Weekend Plus" as selected item in the listwidget, how do I do that? QStringList items; items << "All" << "Weekend Plus"; ui->listWidgetTimeSet->addItems(items); | TITLE:
How do I set the selected item in a QListWidget?
QUESTION:
I am adding two items to a listwidget using the code below. Now I want to set "Weekend Plus" as selected item in the listwidget, how do I do that? QStringList items; items << "All" << "Weekend Plus"; ui->listWidgetTimeSet->addItems(items);
ANSWER:
You ... | [
"qt",
"qlistwidget"
] | 20 | 29 | 60,943 | 3 | 0 | 2011-06-06T08:57:02.607000 | 2011-06-06T09:21:27.757000 |
6,249,689 | 6,249,823 | Why there are two 'run as maven build' options in Spring tool suite | I am trying my hands on Spring tool suite. I observed that it when you right click on your spring project and select run as then there are many options available out which two are 7 Maven build Alt+Shift+X,M 8 Maven build.. For me it look like one and the same thing. Still I am not able to figure out the difference bet... | The first one lets you pick an existing Maven launch configuration. The one with the... opens a new launch configuration. | Why there are two 'run as maven build' options in Spring tool suite I am trying my hands on Spring tool suite. I observed that it when you right click on your spring project and select run as then there are many options available out which two are 7 Maven build Alt+Shift+X,M 8 Maven build.. For me it look like one and ... | TITLE:
Why there are two 'run as maven build' options in Spring tool suite
QUESTION:
I am trying my hands on Spring tool suite. I observed that it when you right click on your spring project and select run as then there are many options available out which two are 7 Maven build Alt+Shift+X,M 8 Maven build.. For me it ... | [
"eclipse",
"spring"
] | 1 | 7 | 1,692 | 1 | 0 | 2011-06-06T08:59:41.533000 | 2011-06-06T09:11:26.413000 |
6,249,709 | 6,249,897 | replace span text with a string with jquery | in below code if i replace temp in $(this).text(temp); with "something" it works and change span text, but when i use a string.format it doesn't work. jquery code: var x = $("span.resource"); x.each(function () { if ($(this).attr('id') = "l1") { var temp = String.Format("{0}/{1}", variable1,variable2); $(this).text(tem... | If you look at MDC there's no method named Format for the String object. My guess is that you are confusing languages (JavaScript and C#), which is quite common for multi-language developers. However, everything's not lost. You can easily recreate an equivalent method in JavaScript by adding to the prototype of the Str... | replace span text with a string with jquery in below code if i replace temp in $(this).text(temp); with "something" it works and change span text, but when i use a string.format it doesn't work. jquery code: var x = $("span.resource"); x.each(function () { if ($(this).attr('id') = "l1") { var temp = String.Format("{0}/... | TITLE:
replace span text with a string with jquery
QUESTION:
in below code if i replace temp in $(this).text(temp); with "something" it works and change span text, but when i use a string.format it doesn't work. jquery code: var x = $("span.resource"); x.each(function () { if ($(this).attr('id') = "l1") { var temp = S... | [
"jquery"
] | 0 | 1 | 5,515 | 2 | 0 | 2011-06-06T09:01:00.490000 | 2011-06-06T09:19:00.417000 |
6,249,712 | 6,249,755 | How can I work around the Javascript closures? | Consider this small snippet of JavaScript: for(var i in map.maps) { buttons.push($(" ").html(i).click(function() { alert(i); })); } It creates one button for each of the fields in the map.maps object (It's an assoc array). I set the index as the button's text and set it to alert the index as well. Obviously one would e... | Embrace the closures, don't work around them. for(var i in map.maps) { (function(i){ buttons.push($(" ").html(i).click(function() { alert(i); })); })(i); } You need to wrap the code that uses your var i so that it ends up in a separate closure and the value is kept in a local var/param for that closure. Using a separat... | How can I work around the Javascript closures? Consider this small snippet of JavaScript: for(var i in map.maps) { buttons.push($(" ").html(i).click(function() { alert(i); })); } It creates one button for each of the fields in the map.maps object (It's an assoc array). I set the index as the button's text and set it to... | TITLE:
How can I work around the Javascript closures?
QUESTION:
Consider this small snippet of JavaScript: for(var i in map.maps) { buttons.push($(" ").html(i).click(function() { alert(i); })); } It creates one button for each of the fields in the map.maps object (It's an assoc array). I set the index as the button's ... | [
"javascript",
"jquery",
"function",
"closures"
] | 6 | 9 | 877 | 4 | 0 | 2011-06-06T09:01:04.513000 | 2011-06-06T09:04:57.233000 |
6,249,717 | 6,249,742 | how do we set the content type header for a local file? | how do we set the content type header for a page not served from a server? (i.e. a simple local file saved to desktop) Say i have a.xml file that i would like to open as application/xml in google-chrome. how do i specify it? Now i want to open that same file under text/xml with google-chrome is that an option? My file: | No, you can't. HTTP header exists only if it's a HTTP request or response. AFAIK, you can't set more than 1 association to a single file type in your web browser. | how do we set the content type header for a local file? how do we set the content type header for a page not served from a server? (i.e. a simple local file saved to desktop) Say i have a.xml file that i would like to open as application/xml in google-chrome. how do i specify it? Now i want to open that same file under... | TITLE:
how do we set the content type header for a local file?
QUESTION:
how do we set the content type header for a page not served from a server? (i.e. a simple local file saved to desktop) Say i have a.xml file that i would like to open as application/xml in google-chrome. how do i specify it? Now i want to open th... | [
"javascript",
"file",
"local",
"local-files"
] | 6 | 3 | 3,157 | 2 | 0 | 2011-06-06T09:01:33.383000 | 2011-06-06T09:03:50.360000 |
6,249,722 | 6,249,775 | Detect iPad orientation change | How to detect with javascript or jquery when user turns iPad from vertical position to horizontal or from horizontal to vertical? | Try $(window).bind('orientationchange', function(event) { alert('new orientation:' + event.orientation); }); | Detect iPad orientation change How to detect with javascript or jquery when user turns iPad from vertical position to horizontal or from horizontal to vertical? | TITLE:
Detect iPad orientation change
QUESTION:
How to detect with javascript or jquery when user turns iPad from vertical position to horizontal or from horizontal to vertical?
ANSWER:
Try $(window).bind('orientationchange', function(event) { alert('new orientation:' + event.orientation); }); | [
"javascript",
"jquery",
"iphone",
"ipad",
"screen-orientation"
] | 33 | 42 | 43,277 | 4 | 0 | 2011-06-06T09:01:58.087000 | 2011-06-06T09:06:56.820000 |
6,249,724 | 6,249,851 | what is the need for importing libraries multiple times | in most code examples I see people doing this. import javax.swing.*; // for the frame import java.awt.*; // for the checkBox and the label import java.awt.event.*; // for the checkBox listener If I am correct when we say import java.awt.* it imports everything inside it, so there wont be a need to say import java.awt.e... | Forget the term subpackage. Do it quick. It does not exist in java world. java.awt is a package (namespace), java.awt.event is another one and they have nothing in common. Their names share some characters, but the packages are totally unrelated. The import statements imports a class or some classes from exactly one pa... | what is the need for importing libraries multiple times in most code examples I see people doing this. import javax.swing.*; // for the frame import java.awt.*; // for the checkBox and the label import java.awt.event.*; // for the checkBox listener If I am correct when we say import java.awt.* it imports everything ins... | TITLE:
what is the need for importing libraries multiple times
QUESTION:
in most code examples I see people doing this. import javax.swing.*; // for the frame import java.awt.*; // for the checkBox and the label import java.awt.event.*; // for the checkBox listener If I am correct when we say import java.awt.* it impo... | [
"java",
"compiler-construction",
"import",
"package"
] | 3 | 6 | 398 | 4 | 0 | 2011-06-06T09:02:06.883000 | 2011-06-06T09:14:13.557000 |
6,249,725 | 6,249,783 | Detecting System Startup Event | I would like to execute a procedure that should be fired only upon windows system startup, and startup here does not mean program startup. Is there anything that I can do to trigger my procedure. If possible, i would like to avoid messing with the registry. I am using delphi 2010. | There are many options, but all will involve settings that require admin rights. These options include: Put your routine in a service that is set to start automatically. This will start up when the system starts up and before any user has logged on. Add an entry to HKLM\Software\Microsoft\Windows\CurrentVersion\Run. Th... | Detecting System Startup Event I would like to execute a procedure that should be fired only upon windows system startup, and startup here does not mean program startup. Is there anything that I can do to trigger my procedure. If possible, i would like to avoid messing with the registry. I am using delphi 2010. | TITLE:
Detecting System Startup Event
QUESTION:
I would like to execute a procedure that should be fired only upon windows system startup, and startup here does not mean program startup. Is there anything that I can do to trigger my procedure. If possible, i would like to avoid messing with the registry. I am using de... | [
"windows",
"delphi",
"delphi-2010"
] | 3 | 7 | 469 | 1 | 0 | 2011-06-06T09:02:19.817000 | 2011-06-06T09:07:34.993000 |
6,249,729 | 6,251,454 | A good design pattern for implementing different behaviors on a subject | What is the best design for this scenario? I have different Object types: User, Channel, MessageBox, UserGroup, etc. User and Channel can have permission on other objects. For example User has the following enum defined as its permissions for MessageBox: CanRead, CanWrite, CanDelete,... Other enums are defined for User... | Well, this is pretty hard to answer. You could try to create a base interface IPermission; interface IPermission { } Then you implement this interface for the types you want to be able to own a permission. class UserPermission: IPermission { public UserPermission(CustomerPermissionType type) { // Store the type } }
cl... | A good design pattern for implementing different behaviors on a subject What is the best design for this scenario? I have different Object types: User, Channel, MessageBox, UserGroup, etc. User and Channel can have permission on other objects. For example User has the following enum defined as its permissions for Messa... | TITLE:
A good design pattern for implementing different behaviors on a subject
QUESTION:
What is the best design for this scenario? I have different Object types: User, Channel, MessageBox, UserGroup, etc. User and Channel can have permission on other objects. For example User has the following enum defined as its per... | [
"c#",
"design-patterns",
"architecture",
"hierarchy"
] | 9 | 3 | 1,474 | 2 | 0 | 2011-06-06T09:02:47.477000 | 2011-06-06T11:37:13.027000 |
6,249,731 | 6,249,768 | How to list all repositories? | How can I list all available repositories in Mercurial in shell? Thanks. | Mercurial repositories are just directories, so you list them with ls or the favourite directory listing tool of your choice. Or do you mean find all Mercurial repositories within a directory tree? If so find is your friend - look for directories containing.hg subdirectories: find. -name '.hg' -a -type d -prune | How to list all repositories? How can I list all available repositories in Mercurial in shell? Thanks. | TITLE:
How to list all repositories?
QUESTION:
How can I list all available repositories in Mercurial in shell? Thanks.
ANSWER:
Mercurial repositories are just directories, so you list them with ls or the favourite directory listing tool of your choice. Or do you mean find all Mercurial repositories within a director... | [
"version-control",
"mercurial"
] | 3 | 5 | 1,219 | 1 | 0 | 2011-06-06T09:03:00.637000 | 2011-06-06T09:06:19.817000 |
6,249,732 | 6,277,124 | Automatic deployement with Jenkins/jetty | I would like to setup a continuous integration environment whereby after committing the source code, it triggers a build process that checks out the code, runs tests, constructs a war file and deploys the same to jetty server such that the users/testers can access the application on the browser. Is this possible? Am us... | I found a maven plugin named cargo. It has everything that I needed. I added it into my pom so that I could deploy and undeploy using mvn cargo:deploy/mvn cargo:undeploy. I created a new jenkins job and added undeploy, package deploy maven goals as build steps. Everything is working perfectly. | Automatic deployement with Jenkins/jetty I would like to setup a continuous integration environment whereby after committing the source code, it triggers a build process that checks out the code, runs tests, constructs a war file and deploys the same to jetty server such that the users/testers can access the applicatio... | TITLE:
Automatic deployement with Jenkins/jetty
QUESTION:
I would like to setup a continuous integration environment whereby after committing the source code, it triggers a build process that checks out the code, runs tests, constructs a war file and deploys the same to jetty server such that the users/testers can acc... | [
"continuous-integration",
"jenkins"
] | 5 | 5 | 5,443 | 3 | 0 | 2011-06-06T09:03:00.613000 | 2011-06-08T10:05:42.780000 |
6,249,740 | 6,249,950 | what should I do in my app to support sending data between two iphones in wifi? | what should I do in my app to support sending data between two iphones in wifi or bluetooth? for example I want to send text from one device and receive and open the text in the other device? | You could check out what Bump has to offer: The Bump API uses the Bump matching technology to identify another mobile phone and then creates a messaging channel between the two handsets. Your users will be able to establish connections, exchange data, authenticate interactions... Updated: You could also have a look at ... | what should I do in my app to support sending data between two iphones in wifi? what should I do in my app to support sending data between two iphones in wifi or bluetooth? for example I want to send text from one device and receive and open the text in the other device? | TITLE:
what should I do in my app to support sending data between two iphones in wifi?
QUESTION:
what should I do in my app to support sending data between two iphones in wifi or bluetooth? for example I want to send text from one device and receive and open the text in the other device?
ANSWER:
You could check out w... | [
"iphone",
"objective-c"
] | 0 | 1 | 190 | 1 | 0 | 2011-06-06T09:03:49.177000 | 2011-06-06T09:23:52.247000 |
6,249,741 | 6,249,970 | mysql: merge two columns into two rows | I have the following statement SELECT disease.id, disease.name, disease_synonym.name FROM disease JOIN disease_synonym where diseaseId=code the result is a table with an id and two columns with the names. how can i transform this into 2 columns with only an id and the name? (of course, the id will now occur several tim... | Two ways come to mind... Run the query twice (once for name, and once for synonym), then union the results together... SELECT disease.id, disease.name FROM disease
UNION ALL
SELECT disease.id, disease_synonym.name FROM disease JOIN disease_synonym where diseaseId=code Or join on a two row table, and use a CASE statem... | mysql: merge two columns into two rows I have the following statement SELECT disease.id, disease.name, disease_synonym.name FROM disease JOIN disease_synonym where diseaseId=code the result is a table with an id and two columns with the names. how can i transform this into 2 columns with only an id and the name? (of co... | TITLE:
mysql: merge two columns into two rows
QUESTION:
I have the following statement SELECT disease.id, disease.name, disease_synonym.name FROM disease JOIN disease_synonym where diseaseId=code the result is a table with an id and two columns with the names. how can i transform this into 2 columns with only an id an... | [
"mysql",
"sql"
] | 1 | 4 | 2,543 | 2 | 0 | 2011-06-06T09:03:50.097000 | 2011-06-06T09:25:48.980000 |
6,249,749 | 6,250,680 | Countdown timer on Label for 30 seconds using Javascript | I use the following example Redirect to redirect to a page. What i need is inside the image i would like to have a label or some text which should show count down from 30(secs) to 0(secs). I need javascript for this requirement. Any help is appreciated | Hi include this before your existing DIV Write the following Script Adjust your DIV as per your need in the design by setting the position to absolute | Countdown timer on Label for 30 seconds using Javascript I use the following example Redirect to redirect to a page. What i need is inside the image i would like to have a label or some text which should show count down from 30(secs) to 0(secs). I need javascript for this requirement. Any help is appreciated | TITLE:
Countdown timer on Label for 30 seconds using Javascript
QUESTION:
I use the following example Redirect to redirect to a page. What i need is inside the image i would like to have a label or some text which should show count down from 30(secs) to 0(secs). I need javascript for this requirement. Any help is appr... | [
"javascript",
"asp.net",
"ajax"
] | 0 | 2 | 5,664 | 2 | 0 | 2011-06-06T09:04:11.610000 | 2011-06-06T10:27:13.867000 |
6,249,750 | 6,249,803 | why async in node.js in loop giving error | I have this part of code in my application. card.getcard(command, function(toproceed,resultscard) { console.log('entry other cards api result'+sys.inspect(resultscard)); if (resultscard.length==0) { return proceed(false,{errno:'011','queueno': request.queueno, message:'there is no access card for particular gib'}); }
... | The functions you're creating and passing into server.getchannel are closures over the i variable (well, over everything in scope, but it's i we're concerned with). They get an enduring reference to i, not a copy of its value as of when the function was created. That means when the function runs, it uses the current va... | why async in node.js in loop giving error I have this part of code in my application. card.getcard(command, function(toproceed,resultscard) { console.log('entry other cards api result'+sys.inspect(resultscard)); if (resultscard.length==0) { return proceed(false,{errno:'011','queueno': request.queueno, message:'there is... | TITLE:
why async in node.js in loop giving error
QUESTION:
I have this part of code in my application. card.getcard(command, function(toproceed,resultscard) { console.log('entry other cards api result'+sys.inspect(resultscard)); if (resultscard.length==0) { return proceed(false,{errno:'011','queueno': request.queueno,... | [
"javascript",
"asynchronous",
"node.js",
"redis"
] | 1 | 3 | 583 | 2 | 0 | 2011-06-06T09:04:12.047000 | 2011-06-06T09:09:36.163000 |
6,249,753 | 6,250,343 | What happened to Python's rect class? | On a Google Search, I found this article: http://docs.python.org/release/1.4/lib/node201.html Which showed examples of using the rect class, to perform union/intersections/checking if points are inside rect. Importing rect fails in Python 2.7. Is this class in another package? | I assume the question isn't really " what happened to it? ", but " where can I find a class like this that I can use? ". Most GUI libraries have a class like this. For example: wx.Rect, QRect / QRectF, gtk.gdk.Rectangle, PyGame rect. If you want a generic rectangle class without the overhead of a GUI library, I think y... | What happened to Python's rect class? On a Google Search, I found this article: http://docs.python.org/release/1.4/lib/node201.html Which showed examples of using the rect class, to perform union/intersections/checking if points are inside rect. Importing rect fails in Python 2.7. Is this class in another package? | TITLE:
What happened to Python's rect class?
QUESTION:
On a Google Search, I found this article: http://docs.python.org/release/1.4/lib/node201.html Which showed examples of using the rect class, to perform union/intersections/checking if points are inside rect. Importing rect fails in Python 2.7. Is this class in ano... | [
"python",
"rect"
] | 5 | 9 | 3,564 | 4 | 0 | 2011-06-06T09:04:41.253000 | 2011-06-06T09:56:51.557000 |
6,249,756 | 6,249,865 | refresh SQLITE3 (Core Data) on device and app store | I have an app leveraging Core Data SQLITE3 that works perfectly in the simulator. However i do not understand how to update the DB on the device, which i guess is the same as in app-store. I update the DB from.txt files in the app and create the DB, this function is there only for creating the DB and will be removed in... | Have you copied the db file from the bundle directory (which is read only) to a writable one? (like the documents directory of each application?). When trying to save in the device did you get a sqlite error like this? SQLITE_READONLY 8 /* Attempt to write a readonly database */ EDIT: All the files in the main bundle a... | refresh SQLITE3 (Core Data) on device and app store I have an app leveraging Core Data SQLITE3 that works perfectly in the simulator. However i do not understand how to update the DB on the device, which i guess is the same as in app-store. I update the DB from.txt files in the app and create the DB, this function is t... | TITLE:
refresh SQLITE3 (Core Data) on device and app store
QUESTION:
I have an app leveraging Core Data SQLITE3 that works perfectly in the simulator. However i do not understand how to update the DB on the device, which i guess is the same as in app-store. I update the DB from.txt files in the app and create the DB, ... | [
"iphone",
"objective-c",
"core-data",
"sqlite",
"refresh"
] | 2 | 0 | 560 | 2 | 0 | 2011-06-06T09:04:58.193000 | 2011-06-06T09:15:45.383000 |
6,249,765 | 6,252,509 | Is it possible to run TFS 2008 and TFS 2010 on the same server? | We've got a server with TFS2008 that we do all our builds on. I need to get an install of TFS2010 running. Can I run it on the same server (windows 2003) or do I need it on a seperate one? | This is not possible. The exact question was asked before in the MSDN Forum and you can read all the answers here. As Arun said TFS 2010 installer checks if previous version of TFS is installed on the computer and will not let you install TFS 2010 if previous version is detected. There are many reasons why it is not po... | Is it possible to run TFS 2008 and TFS 2010 on the same server? We've got a server with TFS2008 that we do all our builds on. I need to get an install of TFS2010 running. Can I run it on the same server (windows 2003) or do I need it on a seperate one? | TITLE:
Is it possible to run TFS 2008 and TFS 2010 on the same server?
QUESTION:
We've got a server with TFS2008 that we do all our builds on. I need to get an install of TFS2010 running. Can I run it on the same server (windows 2003) or do I need it on a seperate one?
ANSWER:
This is not possible. The exact question... | [
"tfs",
"tfs-2010",
"tfs-2008"
] | 3 | 3 | 313 | 1 | 0 | 2011-06-06T09:06:15.823000 | 2011-06-06T13:11:48.593000 |
6,249,785 | 6,249,820 | iOS: issues with a always null NSString | I have a doubt about initializing string with synthesize keyword. In my Event.h class I have @interface Event: NSObject {
NSString *title; }
@property (nonatomic, retain) NSString *title; and in Event.h I have @synthesize title; However when I want to set the title from my main class and I display the content in the ... | @synthesize creates the setter and getter methods for you, but does not initialize Fastest way to get up to speed with this stuff is to watch "Developing Apps for iOS" by Paul Hegarty / Stanford University, available free on iTunes. | iOS: issues with a always null NSString I have a doubt about initializing string with synthesize keyword. In my Event.h class I have @interface Event: NSObject {
NSString *title; }
@property (nonatomic, retain) NSString *title; and in Event.h I have @synthesize title; However when I want to set the title from my main... | TITLE:
iOS: issues with a always null NSString
QUESTION:
I have a doubt about initializing string with synthesize keyword. In my Event.h class I have @interface Event: NSObject {
NSString *title; }
@property (nonatomic, retain) NSString *title; and in Event.h I have @synthesize title; However when I want to set the ... | [
"objective-c",
"ios"
] | 1 | 0 | 1,394 | 3 | 0 | 2011-06-06T09:07:39.800000 | 2011-06-06T09:11:16.240000 |
6,249,787 | 6,250,027 | asp with javascript | I have an asp.net page, and I want to hide a div on the page when the index of the asp:DropDownList is 0 using javascript. I know how to hide the div but I do need help on how to get the selected index of the asp:DropDownLists using javascript. This is what I have in the javascript: function hideDiv() { var drpCampDock... | I guess your problem is that the (client-side) ID of the rendered select element is not the same as the server-side ID of the asp:DropDownList (have a look at the HTML source code rendered in the browser to confirm this). To get the correct client-side element, you'll have to use the following code: var drpCampType = d... | asp with javascript I have an asp.net page, and I want to hide a div on the page when the index of the asp:DropDownList is 0 using javascript. I know how to hide the div but I do need help on how to get the selected index of the asp:DropDownLists using javascript. This is what I have in the javascript: function hideDiv... | TITLE:
asp with javascript
QUESTION:
I have an asp.net page, and I want to hide a div on the page when the index of the asp:DropDownList is 0 using javascript. I know how to hide the div but I do need help on how to get the selected index of the asp:DropDownLists using javascript. This is what I have in the javascript... | [
"javascript",
"asp.net",
"drop-down-menu"
] | 1 | 3 | 487 | 5 | 0 | 2011-06-06T09:07:48.553000 | 2011-06-06T09:30:18.143000 |
6,249,792 | 6,249,905 | Text to Hex conversion in php is inaccurate | I'm trying to convert a text string to hexadecimal in php (which sounds trivial enough) but all the conversions I have tried output incorrect data. The string I need to convert is; RTP1 •. • A ¥;¥9ÈKJ| %¯: E~WF 3HxI#Y¥ The correct result is; 525450310120209501022e2095204120030503040ba53b03040ba539c84b041f4a7c1120202025... | The input string appears to contain utf-8 encoded characters (I say this based on the output). Try converting these characters back into an ASCII/ISO-8859-1 alike format. $indat = utf8_decode("..."); $hexdata = bin2hex($indat); | Text to Hex conversion in php is inaccurate I'm trying to convert a text string to hexadecimal in php (which sounds trivial enough) but all the conversions I have tried output incorrect data. The string I need to convert is; RTP1 •. • A ¥;¥9ÈKJ| %¯: E~WF 3HxI#Y¥ The correct result is; 525450310120209501022e209520412003... | TITLE:
Text to Hex conversion in php is inaccurate
QUESTION:
I'm trying to convert a text string to hexadecimal in php (which sounds trivial enough) but all the conversions I have tried output incorrect data. The string I need to convert is; RTP1 •. • A ¥;¥9ÈKJ| %¯: E~WF 3HxI#Y¥ The correct result is; 5254503101202095... | [
"php",
"text",
"ascii",
"hex"
] | 2 | 3 | 1,733 | 2 | 0 | 2011-06-06T09:08:24.497000 | 2011-06-06T09:20:01.120000 |
6,249,795 | 6,263,574 | MSMQ & WCF Messages not visible in private queue | There have been a few questions similar to this, and I am VERY new to MSMQ. I have been trying to link a ServiceContract and associated DataContract to MSMQ and have set up endpoints so that the DataContact message ends up in MSMQ. I have verified that the message is being correctly generated by the WCF service and I c... | Well, since no-one seems to have an answer to why the messages are being consumed, I have written a workaround in the service implementation which uses the native System.Messaging classes. This is a shame because according to the documentation, one should be able to send a message to a queue without code (as long as th... | MSMQ & WCF Messages not visible in private queue There have been a few questions similar to this, and I am VERY new to MSMQ. I have been trying to link a ServiceContract and associated DataContract to MSMQ and have set up endpoints so that the DataContact message ends up in MSMQ. I have verified that the message is bei... | TITLE:
MSMQ & WCF Messages not visible in private queue
QUESTION:
There have been a few questions similar to this, and I am VERY new to MSMQ. I have been trying to link a ServiceContract and associated DataContract to MSMQ and have set up endpoints so that the DataContact message ends up in MSMQ. I have verified that ... | [
"wcf",
"msmq"
] | 1 | 2 | 2,324 | 2 | 0 | 2011-06-06T09:09:01.313000 | 2011-06-07T09:58:01.603000 |
6,249,805 | 6,260,033 | Is it possible to combine explicit attributes validation and anyAttribute | Is it possible to define in XML schema that there must be some certain XML attributes, and at the same time I want to allow to extend this list in future? Here, if we have the following hypothetical part of XML declaration: Then the following XML document fragment is valid according to this schema: What I want is to be... | xs:anyattribute can have a processContents value of either strict, lax or skip, with strict being the default. strict: there must be a corresponding global attribute declaration and the attribute will be validated against that declaration lax: if there is a corresponding global attribute declaration, validate the attri... | Is it possible to combine explicit attributes validation and anyAttribute Is it possible to define in XML schema that there must be some certain XML attributes, and at the same time I want to allow to extend this list in future? Here, if we have the following hypothetical part of XML declaration: Then the following XML... | TITLE:
Is it possible to combine explicit attributes validation and anyAttribute
QUESTION:
Is it possible to define in XML schema that there must be some certain XML attributes, and at the same time I want to allow to extend this list in future? Here, if we have the following hypothetical part of XML declaration: Then... | [
"xml",
"xsd",
"xml-attribute"
] | 0 | 3 | 829 | 2 | 0 | 2011-06-06T09:09:49.313000 | 2011-06-07T02:19:07.227000 |
6,249,807 | 6,249,998 | How to get non-flagged users | This gets me all users who are flagged: User.joins(:flags) How would I do the opposite of above? | Try something like: User.find(:all,:joins => 'LEFT JOIN flags ON users.flag_id=flags.id',:group => 'users.id',:having => 'flags.id IS NULL') | How to get non-flagged users This gets me all users who are flagged: User.joins(:flags) How would I do the opposite of above? | TITLE:
How to get non-flagged users
QUESTION:
This gets me all users who are flagged: User.joins(:flags) How would I do the opposite of above?
ANSWER:
Try something like: User.find(:all,:joins => 'LEFT JOIN flags ON users.flag_id=flags.id',:group => 'users.id',:having => 'flags.id IS NULL') | [
"ruby-on-rails-3"
] | 0 | 0 | 21 | 1 | 0 | 2011-06-06T09:09:55.777000 | 2011-06-06T09:27:45.337000 |
6,249,808 | 6,249,876 | Pass href to jquery | I use the following code to open external pages within a div on the current page: $(document).ready(function(){ $("#content").load("content.html"); });
(function($) { $(function() { $('.load_link').click(function() { $("#content").load($(this).attr('href')); var $row = $(this).closest("tr"); $row.removeClass("rownotse... | How about this, using the has selector: $('tr:has(.load_link)') // select tr elements that have.load_link descendants.click(function(e) { e.preventDefault();
var link = $(this).find('a.load_link');
$('#content').load(link.attr('href')); $(this).removeClass('rownotselected').addClass('rowselected').siblings().removeCl... | Pass href to jquery I use the following code to open external pages within a div on the current page: $(document).ready(function(){ $("#content").load("content.html"); });
(function($) { $(function() { $('.load_link').click(function() { $("#content").load($(this).attr('href')); var $row = $(this).closest("tr"); $row.r... | TITLE:
Pass href to jquery
QUESTION:
I use the following code to open external pages within a div on the current page: $(document).ready(function(){ $("#content").load("content.html"); });
(function($) { $(function() { $('.load_link').click(function() { $("#content").load($(this).attr('href')); var $row = $(this).clo... | [
"jquery"
] | 1 | 0 | 923 | 1 | 0 | 2011-06-06T09:10:00.920000 | 2011-06-06T09:16:45.180000 |
6,249,813 | 6,249,892 | AS2: rollover on attached movieclip | The following is the chunk of my code that is attaching a movieclip (from timeline), tracing thisDot works so it is not the variable which is a problem but there is no rollover applied to the attached movieclip. var dot_name:String = new String(Graphs[s]._name+"_dot"+i); var dotObj:Object = new Object(); if (prevX!= un... | Looks to me that this row: eval(thisDot=Graphs[s]+".chart."+dot_name); should be this instead? thisDot=eval(Graphs[s]+".chart."+dot_name); | AS2: rollover on attached movieclip The following is the chunk of my code that is attaching a movieclip (from timeline), tracing thisDot works so it is not the variable which is a problem but there is no rollover applied to the attached movieclip. var dot_name:String = new String(Graphs[s]._name+"_dot"+i); var dotObj:O... | TITLE:
AS2: rollover on attached movieclip
QUESTION:
The following is the chunk of my code that is attaching a movieclip (from timeline), tracing thisDot works so it is not the variable which is a problem but there is no rollover applied to the attached movieclip. var dot_name:String = new String(Graphs[s]._name+"_dot... | [
"actionscript",
"actionscript-2",
"rollover"
] | 0 | 0 | 470 | 1 | 0 | 2011-06-06T09:10:33.567000 | 2011-06-06T09:18:35.353000 |
6,249,816 | 6,249,847 | Is there a way to check, if an argument is passed in single quotes? | Is there a (best) way to check, if $uri was passed in single quotes? #!/usr/local/bin/perl use warnings; use 5.012;
my $uri = shift; # uri_check #... Added this example, to make my problem more clear. #!/usr/local/bin/perl use warnings; use 5.012; use URI; use URI::Escape; use WWW::YouTube::Info::Simple; use Term::Clu... | You can't; bash parses the quotes before the string is passed to the Perl interpreter. | Is there a way to check, if an argument is passed in single quotes? Is there a (best) way to check, if $uri was passed in single quotes? #!/usr/local/bin/perl use warnings; use 5.012;
my $uri = shift; # uri_check #... Added this example, to make my problem more clear. #!/usr/local/bin/perl use warnings; use 5.012; use... | TITLE:
Is there a way to check, if an argument is passed in single quotes?
QUESTION:
Is there a (best) way to check, if $uri was passed in single quotes? #!/usr/local/bin/perl use warnings; use 5.012;
my $uri = shift; # uri_check #... Added this example, to make my problem more clear. #!/usr/local/bin/perl use warnin... | [
"perl",
"bash",
"uri",
"arguments",
"expansion"
] | 4 | 12 | 700 | 2 | 0 | 2011-06-06T09:10:39.067000 | 2011-06-06T09:13:52.420000 |
6,249,817 | 6,250,026 | Internal messages between users of a ROR3 website: ready components? | Developing a new ROR3 website, I need to implement a sort of internal mail system: user1 sends a message to user2 user2 receives a real-world email and can also see the message in his "Inbox" on the website. user1 sees the message in his "Sent mail" folder. Many websites have this feature. Is there a Ruby on Rails modu... | Pretty straight forward to implement on your own. Create a Message model like this Message fromUserId toUserId title body is_read created_at And when a message is created you can just create an email copy that you automatically send to toUserId. | Internal messages between users of a ROR3 website: ready components? Developing a new ROR3 website, I need to implement a sort of internal mail system: user1 sends a message to user2 user2 receives a real-world email and can also see the message in his "Inbox" on the website. user1 sees the message in his "Sent mail" f... | TITLE:
Internal messages between users of a ROR3 website: ready components?
QUESTION:
Developing a new ROR3 website, I need to implement a sort of internal mail system: user1 sends a message to user2 user2 receives a real-world email and can also see the message in his "Inbox" on the website. user1 sees the message in... | [
"ruby-on-rails-3"
] | 0 | 2 | 418 | 1 | 0 | 2011-06-06T09:10:49.190000 | 2011-06-06T09:30:11.857000 |
6,249,826 | 6,249,866 | Convert .Net ref (%) to native (&) | How can I convert a C++/CLI int %tmp to native C++ int &tmp? void test(int %tmp) { // here I need int &tmp2 for another pure C++ function call } | void your_function(int *); void your_function2(int &);
void test(int %tmp) { int tmp2; your_function(&tmp2); your_function2(tmp2); tmp=tmp2; } | Convert .Net ref (%) to native (&) How can I convert a C++/CLI int %tmp to native C++ int &tmp? void test(int %tmp) { // here I need int &tmp2 for another pure C++ function call } | TITLE:
Convert .Net ref (%) to native (&)
QUESTION:
How can I convert a C++/CLI int %tmp to native C++ int &tmp? void test(int %tmp) { // here I need int &tmp2 for another pure C++ function call }
ANSWER:
void your_function(int *); void your_function2(int &);
void test(int %tmp) { int tmp2; your_function(&tmp2); you... | [
"visual-c++",
"reference",
"c++-cli",
"interop",
"mixed-mode"
] | 4 | 0 | 1,466 | 3 | 0 | 2011-06-06T09:11:36.007000 | 2011-06-06T09:15:48.280000 |
6,249,828 | 6,250,677 | Updating multiple embedded docs in mongoDB | I need to update multiple embedded docs in mongo using PHP. My layout looks like this: { _id: id, visits: { visitID: 12 categories: [{ catagory_id: 1, name: somename, count: 11, duration: 122 }, { catagory_id: 1, name: some other name, count: 11, duration: 122 }, { catagory_id: 2, name: yet another name, count: 11, dur... | Mongodb currently not supporting arrays multiple levels deep updating ( jira ) So following code will not work: '$inc' => array( 'visits.categories.$.count' => 1, 'visits.categories.$.duration' => 123, ), So there is some solutions around this: 1.Load document => update => save (possible concurrency issues) 2.Reorganiz... | Updating multiple embedded docs in mongoDB I need to update multiple embedded docs in mongo using PHP. My layout looks like this: { _id: id, visits: { visitID: 12 categories: [{ catagory_id: 1, name: somename, count: 11, duration: 122 }, { catagory_id: 1, name: some other name, count: 11, duration: 122 }, { catagory_id... | TITLE:
Updating multiple embedded docs in mongoDB
QUESTION:
I need to update multiple embedded docs in mongo using PHP. My layout looks like this: { _id: id, visits: { visitID: 12 categories: [{ catagory_id: 1, name: somename, count: 11, duration: 122 }, { catagory_id: 1, name: some other name, count: 11, duration: 12... | [
"php",
"mongodb"
] | 1 | 1 | 1,207 | 1 | 0 | 2011-06-06T09:11:43.530000 | 2011-06-06T10:27:05.790000 |
6,249,829 | 6,258,149 | How do I set up an XUL document to be the front end of a application using Gecko? | How do I set up an XUL document to be the front end of a application using Gecko or XUL Runner?? Or is there no way to do it? Could someone provide an brief example if it is possible? Or link to a website? From what I've read, it can't be a standalone application, and it involves using XPCOM. | Creating XPCOM Components from the Mozilla developers' network seems to be quite a good guide. It walks you through creating a XPCOM component with every step. That guide might be a bit hard to understand though, and Creating a C++ XPCOM Component from iosart.com might be easier Firefox addons developer guide / Using X... | How do I set up an XUL document to be the front end of a application using Gecko? How do I set up an XUL document to be the front end of a application using Gecko or XUL Runner?? Or is there no way to do it? Could someone provide an brief example if it is possible? Or link to a website? From what I've read, it can't be... | TITLE:
How do I set up an XUL document to be the front end of a application using Gecko?
QUESTION:
How do I set up an XUL document to be the front end of a application using Gecko or XUL Runner?? Or is there no way to do it? Could someone provide an brief example if it is possible? Or link to a website? From what I've... | [
"c++",
"user-interface",
"xul",
"xpcom",
"gecko"
] | 0 | 1 | 573 | 1 | 0 | 2011-06-06T09:11:56.697000 | 2011-06-06T21:19:35.057000 |
6,249,834 | 6,249,859 | Codeigniter form_open specify id | How can I write the form ID in the form_open function in CodeIgniter? (I need to use the ID for the CSS). For example, this is simple HTML: I am trying the following code, but it does not work: Thanks. | https://codeigniter.com/user_guide/helpers/form_helper.html $attributes = array('id' => 'myform'); echo form_open('email/send', $attributes); | Codeigniter form_open specify id How can I write the form ID in the form_open function in CodeIgniter? (I need to use the ID for the CSS). For example, this is simple HTML: I am trying the following code, but it does not work: Thanks. | TITLE:
Codeigniter form_open specify id
QUESTION:
How can I write the form ID in the form_open function in CodeIgniter? (I need to use the ID for the CSS). For example, this is simple HTML: I am trying the following code, but it does not work: Thanks.
ANSWER:
https://codeigniter.com/user_guide/helpers/form_helper.htm... | [
"forms",
"codeigniter"
] | 13 | 38 | 40,514 | 4 | 0 | 2011-06-06T09:12:32.973000 | 2011-06-06T09:14:56.527000 |
6,249,837 | 6,250,929 | Entity Framework creates foreign key objects instead of using those that are already available | my current project is based on Entity Framwork code-first. I have three types: Task, TaskType and Module. public class Task { public int ID { get; set; } public Module Module { get; set; } public TaskType Type { get; set; } }
public class TaskType { public int ID { get; set; } public string Name { get; set; } }
publi... | If you don't use the same context instance to load related entities you cannot simply add them to the new entity and expect that existing records in the database will be used. The new context doesn't know that these instances exist in the database - you must to say it to the context. Solutions: Use the same context for... | Entity Framework creates foreign key objects instead of using those that are already available my current project is based on Entity Framwork code-first. I have three types: Task, TaskType and Module. public class Task { public int ID { get; set; } public Module Module { get; set; } public TaskType Type { get; set; } }... | TITLE:
Entity Framework creates foreign key objects instead of using those that are already available
QUESTION:
my current project is based on Entity Framwork code-first. I have three types: Task, TaskType and Module. public class Task { public int ID { get; set; } public Module Module { get; set; } public TaskType Ty... | [
"entity-framework-4.1",
"ef-code-first"
] | 33 | 63 | 11,843 | 2 | 0 | 2011-06-06T09:12:41.283000 | 2011-06-06T10:49:52.333000 |
6,249,840 | 6,277,051 | iPhone core data - fetched managed objects not being released on device (fine on simulator) | I'm currently struggling with a core data issue with my app that defies (my) logic. I'm sure I'm doing something wrong but can't see what. I am doing a basic executeFetchRequest on my core data entity, but the array of managed objects returned never seems to be released ONLY when I run it on the iPhone, under the simul... | Doh! Here's the point where I look dumb! I had 'NSZombieEnabled' set to YES which meant that the fetched data wasn't getting released! It's all working fine without that:-) | iPhone core data - fetched managed objects not being released on device (fine on simulator) I'm currently struggling with a core data issue with my app that defies (my) logic. I'm sure I'm doing something wrong but can't see what. I am doing a basic executeFetchRequest on my core data entity, but the array of managed o... | TITLE:
iPhone core data - fetched managed objects not being released on device (fine on simulator)
QUESTION:
I'm currently struggling with a core data issue with my app that defies (my) logic. I'm sure I'm doing something wrong but can't see what. I am doing a basic executeFetchRequest on my core data entity, but the ... | [
"iphone",
"objective-c",
"core-data",
"fetch",
"autorelease"
] | 3 | 1 | 547 | 2 | 0 | 2011-06-06T09:12:53.167000 | 2011-06-08T09:59:15.450000 |
6,249,842 | 6,250,068 | make dt and dd the same height to apply a background color on dt | I have this markup: Lot Size 324 sq. meters Baths 2 Full Description House & Lot for Sale/Rent, 4BR, 1165sqm. PHP65M/200K/MO. (Pasig) Beautiful house with 4 bedrooms, den/office, entertainment room, covered lanai, swimming pool and manicured garden. using this style: dl.item_tabs_details dt, dl.item_tabs_details dd{ fl... | There isn't an "easy CSS fix" here. In this case, I would probably use a table, because that does look somewhat like tabular data (and it makes solving your problem really easy). http://jsfiddle.net/UvPGG/ Lot Size 324 sq. meters Baths 2 Full Description House & Lot for Sale/Rent, 4BR, 1165sqm. PHP65M/200K/MO. (Pasig) ... | make dt and dd the same height to apply a background color on dt I have this markup: Lot Size 324 sq. meters Baths 2 Full Description House & Lot for Sale/Rent, 4BR, 1165sqm. PHP65M/200K/MO. (Pasig) Beautiful house with 4 bedrooms, den/office, entertainment room, covered lanai, swimming pool and manicured garden. using... | TITLE:
make dt and dd the same height to apply a background color on dt
QUESTION:
I have this markup: Lot Size 324 sq. meters Baths 2 Full Description House & Lot for Sale/Rent, 4BR, 1165sqm. PHP65M/200K/MO. (Pasig) Beautiful house with 4 bedrooms, den/office, entertainment room, covered lanai, swimming pool and manic... | [
"html",
"css"
] | 3 | 4 | 2,780 | 1 | 0 | 2011-06-06T09:13:12.187000 | 2011-06-06T09:33:10.623000 |
6,249,849 | 6,251,037 | Xslt transformation / how to group entity | I want to use XSLT to modify: into: My goals: group every Customer entity with the same CodeModifier into Office entities. If there are some multiple CodeModifier, I will add Office entity. The Code attribute into Office will be modified (concatenation of CodeModifier of Client into the Office) (facultative but trivial... | Here's another approach, using matching templates only. Tested as XSLT 1.0 under MSXSL 4.0 Outputs to: | Xslt transformation / how to group entity I want to use XSLT to modify: into: My goals: group every Customer entity with the same CodeModifier into Office entities. If there are some multiple CodeModifier, I will add Office entity. The Code attribute into Office will be modified (concatenation of CodeModifier of Client... | TITLE:
Xslt transformation / how to group entity
QUESTION:
I want to use XSLT to modify: into: My goals: group every Customer entity with the same CodeModifier into Office entities. If there are some multiple CodeModifier, I will add Office entity. The Code attribute into Office will be modified (concatenation of Code... | [
"xslt"
] | 1 | 1 | 129 | 3 | 0 | 2011-06-06T09:14:12.013000 | 2011-06-06T11:00:34.623000 |
6,249,853 | 6,249,895 | Web application layers help needed | I'm trying to figure out what are the layers that a web application needs in order to have a solid separation of concerns. I'm working with medium to big applications with entities that frequently interact with each other. So far I have the following Entity Layer - Models the business entities and is used in across the... | I would say yes, a service can collaborate with other services. No, this is an unnecessary over-complication. Controller really is a part of View; the two go together. It's possible that a view might call services, especially if you're doing a web UI with AJAX calls. | Web application layers help needed I'm trying to figure out what are the layers that a web application needs in order to have a solid separation of concerns. I'm working with medium to big applications with entities that frequently interact with each other. So far I have the following Entity Layer - Models the business... | TITLE:
Web application layers help needed
QUESTION:
I'm trying to figure out what are the layers that a web application needs in order to have a solid separation of concerns. I'm working with medium to big applications with entities that frequently interact with each other. So far I have the following Entity Layer - M... | [
"architecture"
] | 0 | 1 | 142 | 1 | 0 | 2011-06-06T09:14:29.813000 | 2011-06-06T09:18:50.397000 |
6,249,858 | 6,250,028 | What is the preferred approach with regards to unit testing and dates? | I have a class which calculates a date and I'm wondering how best to test this. I've come up with two approaches and wonder about your thoughts on which is 'better' (and of course, any other ingenious ideas you may have). For example, in my code, if no condition is met then a default date of one year and one month from... | IMHO, Unit tests should have the following attributes: be repeatable test "interesting" cases In terms of dates, using "today" is bad as it is different each day you run the test. "Interesting" cases for dates usually involve weekends, holidays, end-of-month/year, etc. One example that has bitten me in the past: date b... | What is the preferred approach with regards to unit testing and dates? I have a class which calculates a date and I'm wondering how best to test this. I've come up with two approaches and wonder about your thoughts on which is 'better' (and of course, any other ingenious ideas you may have). For example, in my code, if... | TITLE:
What is the preferred approach with regards to unit testing and dates?
QUESTION:
I have a class which calculates a date and I'm wondering how best to test this. I've come up with two approaches and wonder about your thoughts on which is 'better' (and of course, any other ingenious ideas you may have). For examp... | [
"java",
"unit-testing",
"date"
] | 1 | 2 | 898 | 5 | 0 | 2011-06-06T09:14:53.997000 | 2011-06-06T09:30:21.497000 |
6,249,861 | 6,251,095 | What is the aim of FunctionalTest in PlayFramework? | I'm writing tests for my project, and after the Unit Tests, I'm now writing FunctionalTest. But between the aim of Functional vs Selenium test, I'm a bit lost. Is the functional test are just here to test if, whatever I sent to any page (mostly in POST), it should return what I expect (200, 302, 404, 500), or is there ... | To answer your question, it is probably easier to look at all three types of tests alongside each other. Unit Test - To test an individual unit of code. For example, if I had an Item class, which made up part of a eCommerce site, I would have a number of Unit tests to test that the Item class functioned as expected. Th... | What is the aim of FunctionalTest in PlayFramework? I'm writing tests for my project, and after the Unit Tests, I'm now writing FunctionalTest. But between the aim of Functional vs Selenium test, I'm a bit lost. Is the functional test are just here to test if, whatever I sent to any page (mostly in POST), it should ret... | TITLE:
What is the aim of FunctionalTest in PlayFramework?
QUESTION:
I'm writing tests for my project, and after the Unit Tests, I'm now writing FunctionalTest. But between the aim of Functional vs Selenium test, I'm a bit lost. Is the functional test are just here to test if, whatever I sent to any page (mostly in PO... | [
"playframework",
"functional-testing"
] | 2 | 8 | 718 | 1 | 0 | 2011-06-06T09:15:00.953000 | 2011-06-06T11:06:08.417000 |
6,249,868 | 6,249,908 | Chat client for android | I wanna build my own chat client using xmpp on android to chat with my own friends. Is it possible to build such kinda of apps on android which is specific to my own apps. people dont have to share there either gmail or facebook profiles to login to my chat client. I already have my own authentication process. | Yes it is possible. You should try some XMPP API like Smack. Also you may need to provide server for which you can use OpenFire. For example see here. | Chat client for android I wanna build my own chat client using xmpp on android to chat with my own friends. Is it possible to build such kinda of apps on android which is specific to my own apps. people dont have to share there either gmail or facebook profiles to login to my chat client. I already have my own authenti... | TITLE:
Chat client for android
QUESTION:
I wanna build my own chat client using xmpp on android to chat with my own friends. Is it possible to build such kinda of apps on android which is specific to my own apps. people dont have to share there either gmail or facebook profiles to login to my chat client. I already ha... | [
"java",
"android",
"chat",
"xmpp"
] | 2 | 5 | 1,850 | 3 | 0 | 2011-06-06T09:15:50.747000 | 2011-06-06T09:20:27.113000 |
6,249,884 | 6,250,099 | AudioManager.isWiredHeadsetOn() is not working in android | I want to check whether heaset is plugged in or not... I did it like this AudioManager am = (AudioManager)getSystemService(AUDIO_SERVICE); Log.i("am.isWiredHeadsetOn()", am.isWiredHeadsetOn()+""); But i am always getting false value... Why is this happening? | It looks like this is a bug. You will always get false when calling isWiredHeadsetOn unless your add MODIFY_AUDIO_SETTINGS permission to AndroidManifest.xml: | AudioManager.isWiredHeadsetOn() is not working in android I want to check whether heaset is plugged in or not... I did it like this AudioManager am = (AudioManager)getSystemService(AUDIO_SERVICE); Log.i("am.isWiredHeadsetOn()", am.isWiredHeadsetOn()+""); But i am always getting false value... Why is this happening? | TITLE:
AudioManager.isWiredHeadsetOn() is not working in android
QUESTION:
I want to check whether heaset is plugged in or not... I did it like this AudioManager am = (AudioManager)getSystemService(AUDIO_SERVICE); Log.i("am.isWiredHeadsetOn()", am.isWiredHeadsetOn()+""); But i am always getting false value... Why is t... | [
"android",
"audio",
"headset",
"android-audiomanager"
] | 6 | 13 | 5,619 | 1 | 0 | 2011-06-06T09:18:02.983000 | 2011-06-06T09:35:26.493000 |
6,249,888 | 6,249,904 | get the next element with jquery/js | I've got some elements like text special text text text My aim is to check the input-boxes below the 'special text'. Therefore I created a variable findText to find 'special text' var findText = $("#myDiv:contains('special text')"); I'm checking whether 'special text' exists and if so, I want the next input elements to... | nextAll with a find should do it: findText.nextAll("p").find("input").attr("checked",true); That finds the following paragraphs, and their descendant inputs. (Or use children rather than find if the inputs are guaranteed to be immediate children of the paragraphs.)...but I think your selector for findText is incorrect,... | get the next element with jquery/js I've got some elements like text special text text text My aim is to check the input-boxes below the 'special text'. Therefore I created a variable findText to find 'special text' var findText = $("#myDiv:contains('special text')"); I'm checking whether 'special text' exists and if s... | TITLE:
get the next element with jquery/js
QUESTION:
I've got some elements like text special text text text My aim is to check the input-boxes below the 'special text'. Therefore I created a variable findText to find 'special text' var findText = $("#myDiv:contains('special text')"); I'm checking whether 'special tex... | [
"javascript",
"jquery"
] | 4 | 4 | 691 | 2 | 0 | 2011-06-06T09:18:18.190000 | 2011-06-06T09:19:59.767000 |
6,249,889 | 6,250,235 | Calculating subtotals from SQL query | I have a query which returns some rows. Its column names are like: Age, Gender, DOB etc. What I have to do is, to check how many rows are coming from DB of which Age. E.g. see the image: See the age subtotal, it means my query is returning 54 rows of age 0, 1 row of age 1 and so on. This table of subtotal must display ... | Your query is pretty elaborate and the output seems to be for a report, couldn't you just elaborate your sub-total in the report? (SSRS Tutorial for groups and totals) If it is not possible, i think you could modify your stored procedure to use a Table Variable: load the query in the table and then run the various subt... | Calculating subtotals from SQL query I have a query which returns some rows. Its column names are like: Age, Gender, DOB etc. What I have to do is, to check how many rows are coming from DB of which Age. E.g. see the image: See the age subtotal, it means my query is returning 54 rows of age 0, 1 row of age 1 and so on.... | TITLE:
Calculating subtotals from SQL query
QUESTION:
I have a query which returns some rows. Its column names are like: Age, Gender, DOB etc. What I have to do is, to check how many rows are coming from DB of which Age. E.g. see the image: See the age subtotal, it means my query is returning 54 rows of age 0, 1 row o... | [
"sql-server-2008",
"subtotal"
] | 1 | 0 | 4,712 | 3 | 0 | 2011-06-06T09:18:19.497000 | 2011-06-06T09:47:39.217000 |
6,249,894 | 6,249,928 | How to deal with Conflicting coding conventions? | Generally we use various static code analysis tools to analyze our code for validation. But I've seen some conflicting scenarios. As an example if we use class variables, the StyleCop will suggest us to use this.Name = myName instead of, Name = myName But this will pop up a Resharper error, "Redundant qualifier" and wi... | There is no correct convention, you adopt the one you prefer and that is your baseline/reference. if you use both ReSharper and StyleCop you should set them up to work together meaning to accept and validate code in the same way. | How to deal with Conflicting coding conventions? Generally we use various static code analysis tools to analyze our code for validation. But I've seen some conflicting scenarios. As an example if we use class variables, the StyleCop will suggest us to use this.Name = myName instead of, Name = myName But this will pop u... | TITLE:
How to deal with Conflicting coding conventions?
QUESTION:
Generally we use various static code analysis tools to analyze our code for validation. But I've seen some conflicting scenarios. As an example if we use class variables, the StyleCop will suggest us to use this.Name = myName instead of, Name = myName B... | [
"c#",
".net",
"resharper",
"coding-style",
"stylecop"
] | 5 | 9 | 877 | 5 | 0 | 2011-06-06T09:18:47.643000 | 2011-06-06T09:21:59.660000 |
6,249,898 | 6,251,060 | How to integrate a library in my web application built on jsp | I m Trying to integrate a spellchecker library into my application...can anyone suggest me a good tutorial or help me witha few minor and specific details on how to do it....help would be highly appreciated..... | Can you provide more info about the library? Assuming its a java library it should go to the /WEB-INF/lib folder and you should be able to access it directly from your code. | How to integrate a library in my web application built on jsp I m Trying to integrate a spellchecker library into my application...can anyone suggest me a good tutorial or help me witha few minor and specific details on how to do it....help would be highly appreciated..... | TITLE:
How to integrate a library in my web application built on jsp
QUESTION:
I m Trying to integrate a spellchecker library into my application...can anyone suggest me a good tutorial or help me witha few minor and specific details on how to do it....help would be highly appreciated.....
ANSWER:
Can you provide mor... | [
"java",
"javascript",
"html",
"ajax"
] | 1 | 0 | 79 | 1 | 0 | 2011-06-06T09:19:03.137000 | 2011-06-06T11:02:31.707000 |
6,249,899 | 6,253,031 | Not able to retrieve result from MongoDB | private String pageElementUpdateProperty="{'user_id':'4d9fe87d1e327f0858000003','session_token':'84146295a9c0eb344f68510ac3645763','project_id':'4dac27b6156aec840d000007','page_id':'4db90554156aec180a000005','element_id':'4dec8964206b74b0dbe2236a',property:{style:{left:177.5,'top':153.5,'width':600,'height':800}}}";
D... | Is the _id a string or does it use ObjectId? If it is an object id, you need to say: query.put("_id", new ObjectId(pageElementBean.getElement_id())); (same holds true with page_id - if that is an ObjectId) You can check the type in the shell by saying: db.YOUR_COLLECTION_NAME.findOne(); | Not able to retrieve result from MongoDB private String pageElementUpdateProperty="{'user_id':'4d9fe87d1e327f0858000003','session_token':'84146295a9c0eb344f68510ac3645763','project_id':'4dac27b6156aec840d000007','page_id':'4db90554156aec180a000005','element_id':'4dec8964206b74b0dbe2236a',property:{style:{left:177.5,'to... | TITLE:
Not able to retrieve result from MongoDB
QUESTION:
private String pageElementUpdateProperty="{'user_id':'4d9fe87d1e327f0858000003','session_token':'84146295a9c0eb344f68510ac3645763','project_id':'4dac27b6156aec840d000007','page_id':'4db90554156aec180a000005','element_id':'4dec8964206b74b0dbe2236a',property:{sty... | [
"java",
"json",
"mongodb"
] | 0 | 0 | 145 | 1 | 0 | 2011-06-06T09:19:22.420000 | 2011-06-06T13:51:47.003000 |
6,249,909 | 6,250,255 | MouseLeave in silverlight(Windows Phone 7) getting fired event if mouse hasn't moved out | Register for MouseDown and MouseLeave events this.MouseLeftButtonDown += new MouseButtonEventHandler(MainPage_MouseLeftButtonDown); this.MouseLeave += new MouseEventHandler(MainPage_MouseLeave); Click somewhere both events will get fired. shouldn't mouseleave get fired only when i move outside the boundary of the contr... | Because there isn't an actual mouse on a touch based screen then this behaviour is correct. You probably shouldn't use mouseLeave in a mobile app which doesn't use a mouse. There are a few reason why you may need to but they're not related to clicking. | MouseLeave in silverlight(Windows Phone 7) getting fired event if mouse hasn't moved out Register for MouseDown and MouseLeave events this.MouseLeftButtonDown += new MouseButtonEventHandler(MainPage_MouseLeftButtonDown); this.MouseLeave += new MouseEventHandler(MainPage_MouseLeave); Click somewhere both events will get... | TITLE:
MouseLeave in silverlight(Windows Phone 7) getting fired event if mouse hasn't moved out
QUESTION:
Register for MouseDown and MouseLeave events this.MouseLeftButtonDown += new MouseButtonEventHandler(MainPage_MouseLeftButtonDown); this.MouseLeave += new MouseEventHandler(MainPage_MouseLeave); Click somewhere bo... | [
"silverlight",
"events",
"windows-phone-7"
] | 0 | 0 | 413 | 1 | 0 | 2011-06-06T09:20:28.957000 | 2011-06-06T09:49:28.173000 |
6,249,923 | 6,251,317 | asynchronous function not executing sql CLR stored procedure | I have a CLR stored procedure that i want to execute asynchronously from C#. the code is as follow: private delegate void GeneratePayrollDelegate(string payProcessID);
public void GeneratePayroll(string payProcessID) { GeneratePayrollDelegate del = new GeneratePayrollDelegate(GeneratePayrollAsync); del.BeginInvoke(pay... | you are calling cmd.ExecuteNonQuery(); you should call BeginExecuteReader instead to get result as sample code can be like this private void Asynchronous(IAsyncResult asyncResult) { System.Data.SqlClient.SqlDataReader reader; try { System.Data.SqlClient.SqlCommand command = asyncResult.AsyncState as System.Data.SqlClie... | asynchronous function not executing sql CLR stored procedure I have a CLR stored procedure that i want to execute asynchronously from C#. the code is as follow: private delegate void GeneratePayrollDelegate(string payProcessID);
public void GeneratePayroll(string payProcessID) { GeneratePayrollDelegate del = new Gener... | TITLE:
asynchronous function not executing sql CLR stored procedure
QUESTION:
I have a CLR stored procedure that i want to execute asynchronously from C#. the code is as follow: private delegate void GeneratePayrollDelegate(string payProcessID);
public void GeneratePayroll(string payProcessID) { GeneratePayrollDelega... | [
"c#",
".net",
"sql",
"asynchronous",
"sqlclr"
] | 0 | 1 | 1,563 | 1 | 0 | 2011-06-06T09:21:44.477000 | 2011-06-06T11:25:48.930000 |
6,249,927 | 6,250,307 | mysql table structure question (userlogin and userlogin_fb) | i have two tables which form part of my login/register system: these are userlogin and userlogin_fb userlogin deals with incoming website login/registration userlogin_fb deals with incoming facebook connect login/first time registration more details @ http://net.tutsplus.com/tutorials/php/how-to-authenticate-your-users... | Facebook update their user id, you want BIGINT(15), although as stated by Sascha Galley VARCHAR is futureproof. I have 3 tables: site's users, facebook user's and joint facebook-site users. Data is stored independently in the first two tables, i.e. the same e-mail can appear once in the first two tables, it doesn't mat... | mysql table structure question (userlogin and userlogin_fb) i have two tables which form part of my login/register system: these are userlogin and userlogin_fb userlogin deals with incoming website login/registration userlogin_fb deals with incoming facebook connect login/first time registration more details @ http://n... | TITLE:
mysql table structure question (userlogin and userlogin_fb)
QUESTION:
i have two tables which form part of my login/register system: these are userlogin and userlogin_fb userlogin deals with incoming website login/registration userlogin_fb deals with incoming facebook connect login/first time registration more ... | [
"php",
"mysql"
] | 3 | 3 | 2,144 | 2 | 0 | 2011-06-06T09:21:53.893000 | 2011-06-06T09:54:22.243000 |
6,249,938 | 6,253,356 | Increasing width of table view in ipad app | I am using a table view in my app to display a set of results.Now what i want is that,to increase the width of my table view as when search results are less then my table view seems to be so small.How can i increase the width of the table view.Can anyone provide me suitable answers.Any help will be appreciated. Thanks,... | one thing what you could do is that, when u set the frame of the view which contains the table/ or when u set the frame of the table, you can set it according to the amount of data you get... say for example, keep the width as w.. store the data you want in an array.. so in an if statement, write the conditions in such... | Increasing width of table view in ipad app I am using a table view in my app to display a set of results.Now what i want is that,to increase the width of my table view as when search results are less then my table view seems to be so small.How can i increase the width of the table view.Can anyone provide me suitable an... | TITLE:
Increasing width of table view in ipad app
QUESTION:
I am using a table view in my app to display a set of results.Now what i want is that,to increase the width of my table view as when search results are less then my table view seems to be so small.How can i increase the width of the table view.Can anyone prov... | [
"cocoa-touch",
"xcode",
"ipad",
"uitableview"
] | 1 | 0 | 287 | 1 | 0 | 2011-06-06T09:22:54.227000 | 2011-06-06T14:15:16.383000 |
6,249,939 | 6,250,010 | php How to make a right twitter api curl with oauth | I want use php curl with oauth to get the JSON data from twitter. Here is my code. return na error message "error":"Timestamp out of bounds". I want to know, how to make a correct twitter api curl with oauth? what is oauth_consumer_key, oauth_token, oauth_nonce, oauth_signature? am I right? how to solve "error":"Timest... | You're using mktime incorrectly, it doesn't accept a date string. Instead of that however, I'd recommend that you do... $time = time() - 86400; With regards to your other questions, I recommend getting an oauth capable twitter library for PHP. There are plenty out there, and there's no point in reinventing the wheel...... | php How to make a right twitter api curl with oauth I want use php curl with oauth to get the JSON data from twitter. Here is my code. return na error message "error":"Timestamp out of bounds". I want to know, how to make a correct twitter api curl with oauth? what is oauth_consumer_key, oauth_token, oauth_nonce, oauth... | TITLE:
php How to make a right twitter api curl with oauth
QUESTION:
I want use php curl with oauth to get the JSON data from twitter. Here is my code. return na error message "error":"Timestamp out of bounds". I want to know, how to make a correct twitter api curl with oauth? what is oauth_consumer_key, oauth_token, ... | [
"php",
"twitter",
"curl",
"twitter-oauth"
] | 6 | 3 | 5,316 | 2 | 0 | 2011-06-06T09:23:12.623000 | 2011-06-06T09:29:07.760000 |
6,249,941 | 6,250,040 | How do I append a circle into my <canvas> tag using JavaScript? | Can anyone please tell me how to append an image/circle into my tag using this script? | It looks like you have some sort of HTML element that you are using CSS borders to render like a circle, in which case: You can't. A canvas is a bitmap upon which you can draw. It cannot contain elements (except as a fallback for when canvas is not supported and/or a shadow DOM for non-visual interaction with the eleme... | How do I append a circle into my <canvas> tag using JavaScript? Can anyone please tell me how to append an image/circle into my tag using this script? | TITLE:
How do I append a circle into my <canvas> tag using JavaScript?
QUESTION:
Can anyone please tell me how to append an image/circle into my tag using this script?
ANSWER:
It looks like you have some sort of HTML element that you are using CSS borders to render like a circle, in which case: You can't. A canvas is... | [
"jquery",
"html",
"canvas"
] | 0 | 2 | 428 | 1 | 0 | 2011-06-06T09:23:23.467000 | 2011-06-06T09:30:50.703000 |
6,249,951 | 6,250,002 | Strange characters in Ajax response | I'm getting an Ajax response from a web service, and I'm not sure what the characters are. I need to convert them to their ASCII/UTF-8 equivalent but I don't know where to start. An example of some of the characters are: \x3d1 \x26pf \x3dp \x26s \x3dpsy \x26 The raw JSON response is from Google Suggest: {e:"-5vsTZHOF8y... | That looks like URL encoded characters. Normally you don't need to convert anything. For example if you get the following string from an AJAX call: var x = '\x3d1\x26pf\x3dp\x26s\x3dpsy\x26'; if you try to print it: alert(x); it should display the correct value: =1&pf=p&s=psy& | Strange characters in Ajax response I'm getting an Ajax response from a web service, and I'm not sure what the characters are. I need to convert them to their ASCII/UTF-8 equivalent but I don't know where to start. An example of some of the characters are: \x3d1 \x26pf \x3dp \x26s \x3dpsy \x26 The raw JSON response is ... | TITLE:
Strange characters in Ajax response
QUESTION:
I'm getting an Ajax response from a web service, and I'm not sure what the characters are. I need to convert them to their ASCII/UTF-8 equivalent but I don't know where to start. An example of some of the characters are: \x3d1 \x26pf \x3dp \x26s \x3dpsy \x26 The raw... | [
"php",
"javascript"
] | 2 | 0 | 1,051 | 2 | 0 | 2011-06-06T09:24:05.210000 | 2011-06-06T09:28:37.693000 |
6,249,965 | 6,251,222 | Problem Swapping Pairs Between 2 Arrays | I'm working on a mutation algorithm for a homework project and I'm stumped at why I'm getting duplicates in the set. I'm trying to find a solution for the travelling ant problem (find shortest path for food) problem using a genetic mutation heuristic: private static ArrayList mutate(ArrayList mutator) { ArrayList mutan... | What the code does now is rotate the copy by 1. Then at some points, you swap items from the copy and the original at the same index. Then after a swap, you have two equal elements next to each other. For example, a b c d and rotated copy d a b c: abcd ▲ swap here ▼ dabc Gives aacd dbbc Every swap will give a duplicate... | Problem Swapping Pairs Between 2 Arrays I'm working on a mutation algorithm for a homework project and I'm stumped at why I'm getting duplicates in the set. I'm trying to find a solution for the travelling ant problem (find shortest path for food) problem using a genetic mutation heuristic: private static ArrayList mut... | TITLE:
Problem Swapping Pairs Between 2 Arrays
QUESTION:
I'm working on a mutation algorithm for a homework project and I'm stumped at why I'm getting duplicates in the set. I'm trying to find a solution for the travelling ant problem (find shortest path for food) problem using a genetic mutation heuristic: private st... | [
"java",
"genetic-algorithm"
] | 1 | 1 | 346 | 1 | 0 | 2011-06-06T09:25:20.627000 | 2011-06-06T11:17:06.183000 |
6,249,973 | 6,252,907 | Problem: FreeSWITCH does not resend 'Decline' or 'Busy here' | I have 2 UACs connected to FreeSWITCH. Party 1 calls party 2. Party 2 rejects a call (either with 'Decline' or 'Busy here'). But FreeSWITCH does not send 'Decline' to party 1. Instead, it sends OK with SDP, which actually initiates a call. How to fix that? FreeSWITCH to party 2: send 1250 bytes to udp/[192.168.1.48]:50... | I haven't use freeswitch, but most systems have allow for a "next destination" to be set when a call to the initial destination fails. This implies that when you place a call to party 2 (at 1005) the "Busy Here" causes freeswitch to connect the call to whatever the "next destination" is. The 200 OK sent by freeswitch h... | Problem: FreeSWITCH does not resend 'Decline' or 'Busy here' I have 2 UACs connected to FreeSWITCH. Party 1 calls party 2. Party 2 rejects a call (either with 'Decline' or 'Busy here'). But FreeSWITCH does not send 'Decline' to party 1. Instead, it sends OK with SDP, which actually initiates a call. How to fix that? Fr... | TITLE:
Problem: FreeSWITCH does not resend 'Decline' or 'Busy here'
QUESTION:
I have 2 UACs connected to FreeSWITCH. Party 1 calls party 2. Party 2 rejects a call (either with 'Decline' or 'Busy here'). But FreeSWITCH does not send 'Decline' to party 1. Instead, it sends OK with SDP, which actually initiates a call. H... | [
"voip",
"sip",
"freeswitch"
] | 2 | 1 | 1,610 | 2 | 0 | 2011-06-06T09:26:00.733000 | 2011-06-06T13:42:55.047000 |
6,249,978 | 6,249,994 | Javascript error in Firefox 3.6 | I have the following JavaScript code: var xmlHttpReq = getXmlHttpObject(); xmlHttpReq.onreadystatechange=function(){ if (xmlHttpReq.readyState == 4) { var res =xmlHttpReq.response; var result = res.split(','); if (document.getElementById("shoppingCardAjax")!=null){ document.getElementById("shoppingCardAjax").innerHTML ... | xmlHttpReq.response should be xmlHttpReq.responseText PS: Why don't you use a nice lib like jQuery instead of doing all the XHR stuff manually? | Javascript error in Firefox 3.6 I have the following JavaScript code: var xmlHttpReq = getXmlHttpObject(); xmlHttpReq.onreadystatechange=function(){ if (xmlHttpReq.readyState == 4) { var res =xmlHttpReq.response; var result = res.split(','); if (document.getElementById("shoppingCardAjax")!=null){ document.getElementByI... | TITLE:
Javascript error in Firefox 3.6
QUESTION:
I have the following JavaScript code: var xmlHttpReq = getXmlHttpObject(); xmlHttpReq.onreadystatechange=function(){ if (xmlHttpReq.readyState == 4) { var res =xmlHttpReq.response; var result = res.split(','); if (document.getElementById("shoppingCardAjax")!=null){ docu... | [
"javascript",
"firefox",
"xmlhttprequest"
] | 0 | 2 | 153 | 1 | 0 | 2011-06-06T09:26:14.293000 | 2011-06-06T09:27:27.660000 |
6,249,980 | 6,250,265 | Retrieving selected text from a webpage inside iframe using in asp.net c#? | I got a weird task to do. I need to load a webpage inside an iframe. And whatever text I select within the iframe, I need to retrieve that from outside the iframe. I m not allowed to use javascript. Is there any way to do that in asp.net c#? | I agree it's a weird task. I personally would avoid situations like this, however if this is what you have to do this is how I would approach it. I recommend you get a library called Html Agility Pack Add a reference to the HTMLAgilityPack.dll to your asp.net application. If you know the url to the page in the iframe, ... | Retrieving selected text from a webpage inside iframe using in asp.net c#? I got a weird task to do. I need to load a webpage inside an iframe. And whatever text I select within the iframe, I need to retrieve that from outside the iframe. I m not allowed to use javascript. Is there any way to do that in asp.net c#? | TITLE:
Retrieving selected text from a webpage inside iframe using in asp.net c#?
QUESTION:
I got a weird task to do. I need to load a webpage inside an iframe. And whatever text I select within the iframe, I need to retrieve that from outside the iframe. I m not allowed to use javascript. Is there any way to do that ... | [
"asp.net",
"iframe"
] | 3 | 2 | 654 | 1 | 0 | 2011-06-06T09:26:24.883000 | 2011-06-06T09:50:42.447000 |
6,249,988 | 6,250,086 | Migrate HTML Site to ASP.NET MVC 3 | I have just ported an HTML site over to ASP.NET MVC 3. Google appears to have a lot of the old pages indexed, e.g. http://www.foo.com/bar.html and now this will be http://www.foo.com/bar I'd like a way to force users and Google to be permanently redirected to the new URL structure. Some of the redirects aren't as simpl... | I'd set up a catch-all route and a Redirects table in your DB. In a catch-all handle I'd check if there's an entry for a requested URL in the Redirects and redirect to a new URL. | Migrate HTML Site to ASP.NET MVC 3 I have just ported an HTML site over to ASP.NET MVC 3. Google appears to have a lot of the old pages indexed, e.g. http://www.foo.com/bar.html and now this will be http://www.foo.com/bar I'd like a way to force users and Google to be permanently redirected to the new URL structure. So... | TITLE:
Migrate HTML Site to ASP.NET MVC 3
QUESTION:
I have just ported an HTML site over to ASP.NET MVC 3. Google appears to have a lot of the old pages indexed, e.g. http://www.foo.com/bar.html and now this will be http://www.foo.com/bar I'd like a way to force users and Google to be permanently redirected to the new... | [
"asp.net-mvc-3",
"asp.net-mvc-routing",
"iis-7.5",
"windows-server-2008-r2"
] | 0 | 1 | 246 | 2 | 0 | 2011-06-06T09:27:10.577000 | 2011-06-06T09:34:01.777000 |
6,249,996 | 6,250,216 | How to use two SQL requests (mysql) to calculate an average number | I want to calculate average number of re-opened tickets by project,but I couldn't do that with a single SQL request. I have retrieved the total number of tickets: select count(jiraissue.id) as totalTicketByProj from jiraissue,project where jiraissue.project=project.id group by project.pname; Also I have retrived number... | SELECT (nbissueReopenByProject / totalTicketByProj) FROM (SELECT project.pname, COUNT(jiraissue.id) AS totalTicketByProj FROM jiraissue, project WHERE jiraissue.project = project.id GROUP BY project.pname) ttbp, (SELECT project.pname, COUNT(changeitem.id) AS nbissueReopenByProject FROM changeitem, changegroup, jiraissu... | How to use two SQL requests (mysql) to calculate an average number I want to calculate average number of re-opened tickets by project,but I couldn't do that with a single SQL request. I have retrieved the total number of tickets: select count(jiraissue.id) as totalTicketByProj from jiraissue,project where jiraissue.pro... | TITLE:
How to use two SQL requests (mysql) to calculate an average number
QUESTION:
I want to calculate average number of re-opened tickets by project,but I couldn't do that with a single SQL request. I have retrieved the total number of tickets: select count(jiraissue.id) as totalTicketByProj from jiraissue,project w... | [
"mysql",
"sql"
] | 0 | 1 | 216 | 2 | 0 | 2011-06-06T09:27:31.943000 | 2011-06-06T09:45:51.297000 |
6,250,005 | 6,250,282 | How can event driver nginx process high concurrent requests with only 2 worker processes? | As we know nginx is not threaded,only 2 worker processes by default. And we also know that accept() will block until new requests come: s = accept(lc->fd, (struct sockaddr *) sa, &socklen); How can it handle more than 2 requests at the same time,basically 2 processes running more than 2 routines cocurrently? Can someon... | The trick is that it uses non-blocking IO in the second process. For some background on what motivated non-blocking IO servers, I suggest reading the c10k problem website. Superb. Anyway, the second process will register with the kernel its interest in readable events, writable events, and error events with a non-block... | How can event driver nginx process high concurrent requests with only 2 worker processes? As we know nginx is not threaded,only 2 worker processes by default. And we also know that accept() will block until new requests come: s = accept(lc->fd, (struct sockaddr *) sa, &socklen); How can it handle more than 2 requests a... | TITLE:
How can event driver nginx process high concurrent requests with only 2 worker processes?
QUESTION:
As we know nginx is not threaded,only 2 worker processes by default. And we also know that accept() will block until new requests come: s = accept(lc->fd, (struct sockaddr *) sa, &socklen); How can it handle more... | [
"nginx",
"software-design"
] | 2 | 6 | 1,100 | 1 | 0 | 2011-06-06T09:28:47.177000 | 2011-06-06T09:52:05.087000 |
6,250,006 | 6,250,205 | Unittesting problem with session starting/closing | I am having an problem writing unit tests for an simple session wrapper. The class itself has some basic functions set, get, exists etc. All these functions have an check assertSessionStart which does the following: protected static function assertStarted() { if (strlen(session_id()) < 1) { throw new Exception("Some te... | It happens because at this point: session_destroy(); $this->setExpectedException('Exception'); ESL_Session::set('set', 'value'); // HERE <---- session_start(); // This is not called anymore! there is an exception and session_start(); isn't called anymore. My suggestion would be to change to change your tearDown to only... | Unittesting problem with session starting/closing I am having an problem writing unit tests for an simple session wrapper. The class itself has some basic functions set, get, exists etc. All these functions have an check assertSessionStart which does the following: protected static function assertStarted() { if (strlen... | TITLE:
Unittesting problem with session starting/closing
QUESTION:
I am having an problem writing unit tests for an simple session wrapper. The class itself has some basic functions set, get, exists etc. All these functions have an check assertSessionStart which does the following: protected static function assertStar... | [
"php",
"unit-testing",
"phpunit"
] | 4 | 5 | 1,136 | 2 | 0 | 2011-06-06T09:28:48.893000 | 2011-06-06T09:44:49.500000 |
6,250,009 | 6,250,053 | Need help understanding code | hi all i am new in jquery this code in book jQuery in action page 219 why he use.end() method and thanks:) (function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text').attr('readOnly',readonly).css('opacity', readonly? 0.5: 1.0).end(); }; })(jQuery); | A jQuery function should return this to allow chaining. Using.end() he undoes.filter('input:text') so finally he's returning the this jQuery object. | Need help understanding code hi all i am new in jquery this code in book jQuery in action page 219 why he use.end() method and thanks:) (function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text').attr('readOnly',readonly).css('opacity', readonly? 0.5: 1.0).end(); }; })(jQuery); | TITLE:
Need help understanding code
QUESTION:
hi all i am new in jquery this code in book jQuery in action page 219 why he use.end() method and thanks:) (function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text').attr('readOnly',readonly).css('opacity', readonly? 0.5: 1.0).end(); }; })(jQuer... | [
"javascript",
"jquery"
] | 2 | 3 | 78 | 1 | 0 | 2011-06-06T09:29:03.887000 | 2011-06-06T09:32:08.003000 |
6,250,015 | 6,250,762 | Create Page Scope Object in WinCE ASP | I have to create a page scope COM object in ASP for WIN CE device. The Win CE device supports only httpd server. I tried to create the com object with the statement Server.CreateObject to give it page scope. But I am getting the following error Parse error in script Microsoft VBScript runtime error: '800a01b6' Descript... | How can I correct these problems? As I mentioned here, you cannot use Server.CreateObject in asp-WinCE, you should use just CreateObject instead. Only MapPath and URLEncode are supported by the Server object in asp-WinCE. See this page in MSDN for details. From this page: The Server object provides access to methods an... | Create Page Scope Object in WinCE ASP I have to create a page scope COM object in ASP for WIN CE device. The Win CE device supports only httpd server. I tried to create the com object with the statement Server.CreateObject to give it page scope. But I am getting the following error Parse error in script Microsoft VBScr... | TITLE:
Create Page Scope Object in WinCE ASP
QUESTION:
I have to create a page scope COM object in ASP for WIN CE device. The Win CE device supports only httpd server. I tried to create the com object with the statement Server.CreateObject to give it page scope. But I am getting the following error Parse error in scri... | [
"asp-classic",
"vbscript",
"windows-ce"
] | 1 | 2 | 493 | 1 | 0 | 2011-06-06T09:29:25.570000 | 2011-06-06T10:34:01.010000 |
6,250,019 | 6,250,781 | Handling multiple Heroku accounts from one local app | I have recently started work on an application that is already deployed to production. I've done a full checkout from production and have got the app up and running locally. The problem I face now is handling the production repo and my test heroku repo. At the moment, I'd like to be able to checkout the db (using herok... | Heroku is just a remote git repository so git remote will show you the remotes for your project - there's a verbose option git remove -v too that will show the URLs of the remotes. Once you'll pulled the production code you'll then need to push that to the testing heroku app with something like git push myapp-test myte... | Handling multiple Heroku accounts from one local app I have recently started work on an application that is already deployed to production. I've done a full checkout from production and have got the app up and running locally. The problem I face now is handling the production repo and my test heroku repo. At the moment... | TITLE:
Handling multiple Heroku accounts from one local app
QUESTION:
I have recently started work on an application that is already deployed to production. I've done a full checkout from production and have got the app up and running locally. The problem I face now is handling the production repo and my test heroku r... | [
"heroku"
] | 0 | 0 | 456 | 1 | 0 | 2011-06-06T09:29:44.180000 | 2011-06-06T10:36:04.220000 |
6,250,020 | 6,250,116 | Magento - displaying a random review outside of review module | I am using Magento 1.5 and am attempting to include a small box in my sidebar for a random product showing a product image, product name, star rating and part of a review. I have managed to get Magento displaying a random product in the sidebar, unfortunately I cannot seem to find a way to select the random product bas... | The reason you are getting that error is because of the quotes you are using. Use ' instead. In response to your edit, this is how you would go ahead and load 5 random products that have a review: $review = Mage::getModel('review/review'); $collection = $review->getProductCollection(); $collection ->addAttributeToSelec... | Magento - displaying a random review outside of review module I am using Magento 1.5 and am attempting to include a small box in my sidebar for a random product showing a product image, product name, star rating and part of a review. I have managed to get Magento displaying a random product in the sidebar, unfortunatel... | TITLE:
Magento - displaying a random review outside of review module
QUESTION:
I am using Magento 1.5 and am attempting to include a small box in my sidebar for a random product showing a product image, product name, star rating and part of a review. I have managed to get Magento displaying a random product in the sid... | [
"php",
"magento"
] | 3 | 10 | 3,605 | 3 | 0 | 2011-06-06T09:29:45.803000 | 2011-06-06T09:36:30.623000 |
6,250,021 | 6,250,140 | Create new Repositories while still using Dependency Injection with wcf | I have a wcf service that takes in an IRepository IRepository irepo;
public SomeService(IRepository repo) { this.irepo = repo; } The repositories contain methods like Save, Delete, etc and take in a CustomDataContext through a constructor: public class ExampleRepository: IRepository, IDisposible {
public ExampleRepos... | The whole idea of dependency injection is that there's some container which resolves your dependencies for you. Is there a reason your not using a framework for injecting your dependencies, say structuremap or unity for example? If you do have a container you should request a new instance of your type from the containe... | Create new Repositories while still using Dependency Injection with wcf I have a wcf service that takes in an IRepository IRepository irepo;
public SomeService(IRepository repo) { this.irepo = repo; } The repositories contain methods like Save, Delete, etc and take in a CustomDataContext through a constructor: public ... | TITLE:
Create new Repositories while still using Dependency Injection with wcf
QUESTION:
I have a wcf service that takes in an IRepository IRepository irepo;
public SomeService(IRepository repo) { this.irepo = repo; } The repositories contain methods like Save, Delete, etc and take in a CustomDataContext through a co... | [
"c#",
"wcf",
"linq-to-sql",
"dependency-injection"
] | 0 | 1 | 230 | 2 | 0 | 2011-06-06T09:29:47.223000 | 2011-06-06T09:38:49.123000 |
6,250,022 | 6,250,103 | Waiting for jQuery AJAX response(s) | I have a page that, using jQuery.ajax that is called 100 times (async: true), the problem is that, when they they are all being loaded, I need the system to wait for ALL 100 calls to return before continuing. How would I go about this? Thanks in advance!:) Update: These calls are made in a for() loop (there's 100 of th... | The nice way to do this is with $.when. You can use this as follows: $.when( $.ajax({/*settings*/}), $.ajax({/*settings*/}), $.ajax({/*settings*/}), $.ajax({/*settings*/}), ).then(function() { // when all AJAX requests are complete }); Alternatively, if you have all the AJAX calls in an array, you could use apply: $.wh... | Waiting for jQuery AJAX response(s) I have a page that, using jQuery.ajax that is called 100 times (async: true), the problem is that, when they they are all being loaded, I need the system to wait for ALL 100 calls to return before continuing. How would I go about this? Thanks in advance!:) Update: These calls are mad... | TITLE:
Waiting for jQuery AJAX response(s)
QUESTION:
I have a page that, using jQuery.ajax that is called 100 times (async: true), the problem is that, when they they are all being loaded, I need the system to wait for ALL 100 calls to return before continuing. How would I go about this? Thanks in advance!:) Update: T... | [
"ajax",
"jquery",
"jquery-deferred"
] | 18 | 36 | 25,892 | 5 | 0 | 2011-06-06T09:30:02.067000 | 2011-06-06T09:35:41.997000 |
6,250,034 | 6,250,257 | Using Java find installation directory of an application? | How do I find installation directory of OpenOffice using Java Code? I want to run it as a service when a user uses my application. | There is no portable solution to this. On Windows you can search the registry; see read/write to Windows Registry using Java. On Linux / UNIX, you can search the default installation directories, though these may vary from one distribution to the next. | Using Java find installation directory of an application? How do I find installation directory of OpenOffice using Java Code? I want to run it as a service when a user uses my application. | TITLE:
Using Java find installation directory of an application?
QUESTION:
How do I find installation directory of OpenOffice using Java Code? I want to run it as a service when a user uses my application.
ANSWER:
There is no portable solution to this. On Windows you can search the registry; see read/write to Windows... | [
"java",
"openoffice.org"
] | 1 | 2 | 942 | 1 | 0 | 2011-06-06T09:30:35.680000 | 2011-06-06T09:49:52.970000 |
6,250,041 | 6,251,443 | problem with making edittext scrollable | i am using an edittext in my application.this is set as focusable=false.but i want to make it automatically scrollabe when a big value is displaying..plz help me.given below is my code snippett | Remove android:singleLine="true" and you will be able to scroll horizontally. | problem with making edittext scrollable i am using an edittext in my application.this is set as focusable=false.but i want to make it automatically scrollabe when a big value is displaying..plz help me.given below is my code snippett | TITLE:
problem with making edittext scrollable
QUESTION:
i am using an edittext in my application.this is set as focusable=false.but i want to make it automatically scrollabe when a big value is displaying..plz help me.given below is my code snippett
ANSWER:
Remove android:singleLine="true" and you will be able to sc... | [
"android",
"scroll",
"android-edittext"
] | 0 | 0 | 1,010 | 1 | 0 | 2011-06-06T09:30:55.693000 | 2011-06-06T11:36:19.880000 |
6,250,046 | 6,250,083 | How can I remove the fragment identifier from a URL? | I have a string containing a link. The link often has the form: http://www.address.com/something#something Is there a function in python that can remove "#something" from a link? | Just use split() >>> foo = "http://www.address.com/something#something" >>> foo = foo.split('#')[0] >>> foo 'http://www.address.com/something' >>> | How can I remove the fragment identifier from a URL? I have a string containing a link. The link often has the form: http://www.address.com/something#something Is there a function in python that can remove "#something" from a link? | TITLE:
How can I remove the fragment identifier from a URL?
QUESTION:
I have a string containing a link. The link often has the form: http://www.address.com/something#something Is there a function in python that can remove "#something" from a link?
ANSWER:
Just use split() >>> foo = "http://www.address.com/something#... | [
"python",
"string"
] | 13 | 15 | 7,842 | 5 | 0 | 2011-06-06T09:31:13.243000 | 2011-06-06T09:33:52.623000 |
6,250,049 | 6,250,094 | dismissing Progress Dialog | I have a situation where I am loading a bunch of images. During this process, I am trying to show a progress Dialog until the images get loaded fully. I have overrided the onBackPressed() method, such that when the user presses the back button, the activity will be finished. But if I press the back button when the prog... | Use Dialog.setOnCancelListener to cancel your background task | dismissing Progress Dialog I have a situation where I am loading a bunch of images. During this process, I am trying to show a progress Dialog until the images get loaded fully. I have overrided the onBackPressed() method, such that when the user presses the back button, the activity will be finished. But if I press th... | TITLE:
dismissing Progress Dialog
QUESTION:
I have a situation where I am loading a bunch of images. During this process, I am trying to show a progress Dialog until the images get loaded fully. I have overrided the onBackPressed() method, such that when the user presses the back button, the activity will be finished.... | [
"android",
"progressdialog",
"background-process"
] | 9 | 7 | 7,689 | 4 | 0 | 2011-06-06T09:31:33.123000 | 2011-06-06T09:34:57.690000 |
6,250,064 | 6,250,490 | ghostscript BoundingBox values | I'm just asking myself, what are those bbox values printed out by: gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox myfile.pdf
%%BoundingBox: 46 911 1668 4537 %%HiResBoundingBox: 46.080002 911.520035 1667.520064 4536.000173 top-left-X, top-left-Y,....? And what's the measurement of those values (1/72")? Thanks for helping | These values are given in PostScript "points": 72 points == 1 inch so yes, the measurement value is 1/72''... The four values need to be read as two pairs of coordinates describing the lower left and the upper right corner points of a rectangle enclosing the bounding box. The PostScript coordinate system has its origin... | ghostscript BoundingBox values I'm just asking myself, what are those bbox values printed out by: gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox myfile.pdf
%%BoundingBox: 46 911 1668 4537 %%HiResBoundingBox: 46.080002 911.520035 1667.520064 4536.000173 top-left-X, top-left-Y,....? And what's the measurement of those value... | TITLE:
ghostscript BoundingBox values
QUESTION:
I'm just asking myself, what are those bbox values printed out by: gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox myfile.pdf
%%BoundingBox: 46 911 1668 4537 %%HiResBoundingBox: 46.080002 911.520035 1667.520064 4536.000173 top-left-X, top-left-Y,....? And what's the measurem... | [
"ghostscript"
] | 3 | 2 | 5,126 | 1 | 0 | 2011-06-06T09:32:47.930000 | 2011-06-06T10:07:26.033000 |
6,250,067 | 6,250,093 | stop PHP While loops and mySQL querys useing so much memory? | Ive noticed when working repeatedly with large amount of data in php/mysql the browsers memory usage increases very quickly. eg running firefox 4, single tab open with just the app im testing is currently using over 800MB of ram. The testing involved repeatedly loading over 500KB from mySQL via PHP while loops per refr... | Parse less data (and send less HTML), it's the only solution to use less memory Anyway to check the usage of memory you can use memory_get_usage(); Replying to your question title, to stop while loop while($r=mysql_fetch_*($query)) { if (memory_get_usage()>YOUR_LIMIT_BYTE_HERE) { echo 'red alarm here'; break; }
} | stop PHP While loops and mySQL querys useing so much memory? Ive noticed when working repeatedly with large amount of data in php/mysql the browsers memory usage increases very quickly. eg running firefox 4, single tab open with just the app im testing is currently using over 800MB of ram. The testing involved repeated... | TITLE:
stop PHP While loops and mySQL querys useing so much memory?
QUESTION:
Ive noticed when working repeatedly with large amount of data in php/mysql the browsers memory usage increases very quickly. eg running firefox 4, single tab open with just the app im testing is currently using over 800MB of ram. The testing... | [
"php",
"mysql",
"firefox"
] | 2 | 1 | 1,263 | 2 | 0 | 2011-06-06T09:33:09.890000 | 2011-06-06T09:34:55.897000 |
6,250,070 | 6,250,111 | dependency of objects in java | When does one object depend on another? If class A creates or uses object B, then A depends on B - it needs it to work with, to fulfill maybe some task. But B depends also on A, its created or used by it. So is dependency in java circular? | Your definition is circular however Java's references only go one way. Dependencies only go from Object that has a need to Objects which provided that need. You can have circular dependencies. You can't talk about a need to be needed for Objects. I think that only applies to people (and possibly pets).;) | dependency of objects in java When does one object depend on another? If class A creates or uses object B, then A depends on B - it needs it to work with, to fulfill maybe some task. But B depends also on A, its created or used by it. So is dependency in java circular? | TITLE:
dependency of objects in java
QUESTION:
When does one object depend on another? If class A creates or uses object B, then A depends on B - it needs it to work with, to fulfill maybe some task. But B depends also on A, its created or used by it. So is dependency in java circular?
ANSWER:
Your definition is circ... | [
"java",
"object",
"architecture",
"dependencies"
] | 0 | 3 | 486 | 4 | 0 | 2011-06-06T09:33:14.077000 | 2011-06-06T09:36:22.633000 |
6,250,072 | 6,250,076 | How can I create a notification in the android status bar? | Hi just wanted to share my notification builder for android the answer is below. Please share any changes. | minimal usage: NotificatorFacade nb = new NotificatorFacade(context); nb.show(R.drawable.icon, "tickerText", new Date().getTime(), "contentTitle", "contentText", ERROR_NOTIFICATION_ID); source: package my.tools.android.notification;
import android.app.Notification; import android.app.NotificationManager; import androi... | How can I create a notification in the android status bar? Hi just wanted to share my notification builder for android the answer is below. Please share any changes. | TITLE:
How can I create a notification in the android status bar?
QUESTION:
Hi just wanted to share my notification builder for android the answer is below. Please share any changes.
ANSWER:
minimal usage: NotificatorFacade nb = new NotificatorFacade(context); nb.show(R.drawable.icon, "tickerText", new Date().getTime... | [
"android",
"notifications"
] | 5 | 2 | 1,078 | 1 | 0 | 2011-06-06T09:33:20.763000 | 2011-06-06T09:33:35.007000 |
6,250,073 | 6,252,470 | Prevent nodejs from minifying javascript code while developing / debugging | NodeJS will minify the javascript code it sends to the browser. Is there a way to prevent this, so it's easier to debug the code in Firebug / Chrome's Inspector? | asset manager Merge and minify CSS/javascript files Your asset manager minifies it for you. So either turn it off or use the express configurations to set up a development configuration that doesn't use this middleware | Prevent nodejs from minifying javascript code while developing / debugging NodeJS will minify the javascript code it sends to the browser. Is there a way to prevent this, so it's easier to debug the code in Firebug / Chrome's Inspector? | TITLE:
Prevent nodejs from minifying javascript code while developing / debugging
QUESTION:
NodeJS will minify the javascript code it sends to the browser. Is there a way to prevent this, so it's easier to debug the code in Firebug / Chrome's Inspector?
ANSWER:
asset manager Merge and minify CSS/javascript files Your... | [
"javascript",
"debugging",
"node.js"
] | 0 | 5 | 837 | 1 | 0 | 2011-06-06T09:33:22.420000 | 2011-06-06T13:08:30.697000 |
6,250,079 | 6,250,129 | How to display the image which is not in current directory | I am using jquery to display results get by json object, here for image tag i used a hardcoded value. $.getJSON("http://192.168.1.9:8983/solr/db/select/?wt=json&&start=0&rows=100&q=" + q + "&json.wrf=?", function(result) { $.each(result.response.docs, function(i, item) { html += " UID_PK: =" + item.UID_PK; html += " Na... | I think the issue here is that all modern browsers prohibit displaying local ( file:/// ) images embedded in non-local ( http:// ) pages. It should work if you use some other remote path (like 192.168.1.10/images/image.jpg ). | How to display the image which is not in current directory I am using jquery to display results get by json object, here for image tag i used a hardcoded value. $.getJSON("http://192.168.1.9:8983/solr/db/select/?wt=json&&start=0&rows=100&q=" + q + "&json.wrf=?", function(result) { $.each(result.response.docs, function(... | TITLE:
How to display the image which is not in current directory
QUESTION:
I am using jquery to display results get by json object, here for image tag i used a hardcoded value. $.getJSON("http://192.168.1.9:8983/solr/db/select/?wt=json&&start=0&rows=100&q=" + q + "&json.wrf=?", function(result) { $.each(result.respon... | [
"jquery",
"html",
"json"
] | 1 | 2 | 316 | 3 | 0 | 2011-06-06T09:33:40.763000 | 2011-06-06T09:37:04.163000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.