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,200,710 | 6,201,043 | Oracle two query in a script? Is it possible? | For example i want to run this on oracle is it possible? ACCEPT num PROMPT 'enter num: ' SELECT a.tbl1 FROM tbl1 a, tbl2 b WHERE a.id = b.id AND a.num = '#'; If there is result, proceed with second query DELETE FROM tbl1 WHERE num = '#'; Is it possible to run 2 query in a script? Sorry i am new in Oracle. Looking to do... | The SQL as presented can easily be compressed into a single DELETE statement. This is because a DELETE statement won't hurl an exception when doesn't find any rows to delete. Given this test data: SQL> select * from tbl1 2 /
ID NUM ---------- ---------- 10 999 20 999 10 888
SQL> select * from tbl2 2 /
ID ---------- ... | Oracle two query in a script? Is it possible? For example i want to run this on oracle is it possible? ACCEPT num PROMPT 'enter num: ' SELECT a.tbl1 FROM tbl1 a, tbl2 b WHERE a.id = b.id AND a.num = '#'; If there is result, proceed with second query DELETE FROM tbl1 WHERE num = '#'; Is it possible to run 2 query in a s... | TITLE:
Oracle two query in a script? Is it possible?
QUESTION:
For example i want to run this on oracle is it possible? ACCEPT num PROMPT 'enter num: ' SELECT a.tbl1 FROM tbl1 a, tbl2 b WHERE a.id = b.id AND a.num = '#'; If there is result, proceed with second query DELETE FROM tbl1 WHERE num = '#'; Is it possible to ... | [
"oracle"
] | 1 | 2 | 92 | 1 | 0 | 2011-06-01T11:55:11.147000 | 2011-06-01T12:21:33.100000 |
6,200,721 | 6,201,407 | android listview semitransparent selection color of a row | I need to implement a semi-transparent selection of a row in a listview, and for 'pressed' state also. If I apply solid color, then everything is working as expected. But if I apply semi-transparent color (#44444444) then I see default selection color (orange on my 2.3 android) and on top of it there is my color (it di... | You have to set android:listSelector="@drawable/listcolor" in ListView Your ListView will be Have a look on the below URl How to set Selection Color to ListView Thanks Deepak | android listview semitransparent selection color of a row I need to implement a semi-transparent selection of a row in a listview, and for 'pressed' state also. If I apply solid color, then everything is working as expected. But if I apply semi-transparent color (#44444444) then I see default selection color (orange on... | TITLE:
android listview semitransparent selection color of a row
QUESTION:
I need to implement a semi-transparent selection of a row in a listview, and for 'pressed' state also. If I apply solid color, then everything is working as expected. But if I apply semi-transparent color (#44444444) then I see default selectio... | [
"android",
"listview",
"android-listview"
] | 5 | 7 | 6,861 | 3 | 0 | 2011-06-01T11:55:45.207000 | 2011-06-01T12:50:18.550000 |
6,200,722 | 6,201,933 | spring or servlet request scope problem | I use java, spring-ws and have a web service. Every time I run make a new request to my web service I want that everything resets and all variables are fresh and null. So I added "scope=request" to my web service's application-context.xml but I still have the variable values(even not static vars) kept from my previous ... | I think you might have gone wrong somewhere else because your config looks fine. Can you add some code into the constructor of com.ws.im.InfService: java.util.logging.Logger.getAnonymousLogger().info( "Instantiated, identity [" + System.identityHashCode(this) +"]"); This should print a different identity string for eac... | spring or servlet request scope problem I use java, spring-ws and have a web service. Every time I run make a new request to my web service I want that everything resets and all variables are fresh and null. So I added "scope=request" to my web service's application-context.xml but I still have the variable values(even... | TITLE:
spring or servlet request scope problem
QUESTION:
I use java, spring-ws and have a web service. Every time I run make a new request to my web service I want that everything resets and all variables are fresh and null. So I added "scope=request" to my web service's application-context.xml but I still have the va... | [
"java",
"web-services",
"spring",
"servlets",
"scope"
] | 2 | 3 | 1,878 | 1 | 0 | 2011-06-01T11:55:54.937000 | 2011-06-01T13:28:57.760000 |
6,200,729 | 6,200,798 | Split string with specified separator without omitting empty elements | Right now I am using StringUtils.split(String str, char separatorChar) to split input string with specified separator (, ). Example input data: a,f,h Output String[] { "a", "f", "h" } But with following input: a,,h It returns just String[] { "a", "h" } What I need is just empty string object: String[] { "a", "", "h" } ... | You can just use the String.split(..) method, no need for StringUtils: "a,,h".split(","); // gives ["a", "", "h"] | Split string with specified separator without omitting empty elements Right now I am using StringUtils.split(String str, char separatorChar) to split input string with specified separator (, ). Example input data: a,f,h Output String[] { "a", "f", "h" } But with following input: a,,h It returns just String[] { "a", "h"... | TITLE:
Split string with specified separator without omitting empty elements
QUESTION:
Right now I am using StringUtils.split(String str, char separatorChar) to split input string with specified separator (, ). Example input data: a,f,h Output String[] { "a", "f", "h" } But with following input: a,,h It returns just S... | [
"java",
"string",
"split"
] | 8 | 8 | 10,874 | 5 | 0 | 2011-06-01T11:56:36.150000 | 2011-06-01T12:01:40.933000 |
6,200,732 | 6,205,125 | Releasing underlying Stream returned by Application.GetResourceStream on WP7 | When accessing a resource using Application.GetResourceStream it returns an instance of the class StreamResourceInfo, this class does not implement IDisposable. Should I close\dispose the underlying stream exposed by StreamResourceInfo when I've finished processing the stream on a WP7 device - I don't want to know abou... | The code example provided here does not make use of using, Close() or Dispose(). Since the documentation for StreamResourceInfo doesn't mention Close() or Dispose() (and StreamResourceInfo does not actually inherit from Stream or anything else that might implement these methods), I think it's safe to just let the objec... | Releasing underlying Stream returned by Application.GetResourceStream on WP7 When accessing a resource using Application.GetResourceStream it returns an instance of the class StreamResourceInfo, this class does not implement IDisposable. Should I close\dispose the underlying stream exposed by StreamResourceInfo when I'... | TITLE:
Releasing underlying Stream returned by Application.GetResourceStream on WP7
QUESTION:
When accessing a resource using Application.GetResourceStream it returns an instance of the class StreamResourceInfo, this class does not implement IDisposable. Should I close\dispose the underlying stream exposed by StreamRe... | [
"c#",
"silverlight",
"windows-phone-7"
] | 5 | 3 | 910 | 3 | 0 | 2011-06-01T11:57:03.250000 | 2011-06-01T17:15:22.537000 |
6,200,737 | 6,201,173 | Randomizing .click and .dblclick | I'm trying to get jquery to randomize if a single click or a doubleclick is needed to function something but somehow, I'm getting stuck in every way I've tried it. I know this shouldn't be done but I'm doing a study on distractions.:D This is my code atm: var rnd=Math.floor(Math.random()*2) if(rnd!= 0) { $('.energie di... | //No more code redundancy - use a function:) function handler() { $('#maincontent').css('height', '100%'); $('.energie div.article').hide(); $(this).next('div.detail').show(); $('#numbersenergie div').removeClass();
//"reroll" the handler bind(); }
//bind your event handler here, "50/50 probability" function bind() {... | Randomizing .click and .dblclick I'm trying to get jquery to randomize if a single click or a doubleclick is needed to function something but somehow, I'm getting stuck in every way I've tried it. I know this shouldn't be done but I'm doing a study on distractions.:D This is my code atm: var rnd=Math.floor(Math.random(... | TITLE:
Randomizing .click and .dblclick
QUESTION:
I'm trying to get jquery to randomize if a single click or a doubleclick is needed to function something but somehow, I'm getting stuck in every way I've tried it. I know this shouldn't be done but I'm doing a study on distractions.:D This is my code atm: var rnd=Math.... | [
"jquery",
"random",
"click",
"double-click"
] | 2 | 0 | 162 | 3 | 0 | 2011-06-01T11:57:36.170000 | 2011-06-01T12:31:03.250000 |
6,200,746 | 6,210,226 | Show play timing, remaining time of play | I use the following code to play the recorded audio file, it works fine. I have a seekbar which shows the progress of the play. I have two static text called start and end. I need to show the duration of the play (00.00 to max duration) in the start text and decrement the time from max duration to 00.00. I need to show... | you cann't update the UI in the thread.you can post them to Runnable. in the run method() put the following code. mHandler.post(updateUI); then use handler to update the ui private final Runnable updateUI= new Runnable() { public void run() { try { //update ur ui here start.setText((mPlayer.getCurrentPosition()/mPlayer... | Show play timing, remaining time of play I use the following code to play the recorded audio file, it works fine. I have a seekbar which shows the progress of the play. I have two static text called start and end. I need to show the duration of the play (00.00 to max duration) in the start text and decrement the time f... | TITLE:
Show play timing, remaining time of play
QUESTION:
I use the following code to play the recorded audio file, it works fine. I have a seekbar which shows the progress of the play. I have two static text called start and end. I need to show the duration of the play (00.00 to max duration) in the start text and de... | [
"android",
"seekbar"
] | 3 | 4 | 9,638 | 2 | 0 | 2011-06-01T11:58:15.077000 | 2011-06-02T04:03:25.803000 |
6,200,752 | 6,200,799 | C++ header-only template library | Looking at this project (http://www.savarese.com/software/libssrckdtree/) I found the definition "C++ header-only template library". At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project | It means all the definitions of template (function template or class template) are in the headers only. There is no.cpp file. There are only.h files (or some other extensions such as.hpp or no extension at all like, string> etc) C++ compilers require the definitions of templates to be present in the same file in which ... | C++ header-only template library Looking at this project (http://www.savarese.com/software/libssrckdtree/) I found the definition "C++ header-only template library". At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project | TITLE:
C++ header-only template library
QUESTION:
Looking at this project (http://www.savarese.com/software/libssrckdtree/) I found the definition "C++ header-only template library". At the moment I have basic C++ knowledge but would like to know what this exactly means and why this people use it on this project
ANSW... | [
"c++",
"templates",
"header-only"
] | 13 | 16 | 6,406 | 9 | 0 | 2011-06-01T11:58:41.893000 | 2011-06-01T12:01:47.667000 |
6,200,756 | 6,200,831 | run Mac Chrome with command line arguments as a background process | I have 2 aliases on my.bash_profile file containing: alias chrome="/Applications/Google\\ \\Chrome.app/Contents/MacOS/Google\\ \\Chrome" alias chromex="chrome --disable-web-security" but when running, it opens up Chrome but keeps holding the terminal window...once I close the terminal window it also closes chrome. Is t... | Put an ampersand on the end of the commandline. alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome &" If you also don't want to see any of the debugging chrome outputs, redirect stdout and stderr to /dev/null alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome 2>&1 > &... | run Mac Chrome with command line arguments as a background process I have 2 aliases on my.bash_profile file containing: alias chrome="/Applications/Google\\ \\Chrome.app/Contents/MacOS/Google\\ \\Chrome" alias chromex="chrome --disable-web-security" but when running, it opens up Chrome but keeps holding the terminal wi... | TITLE:
run Mac Chrome with command line arguments as a background process
QUESTION:
I have 2 aliases on my.bash_profile file containing: alias chrome="/Applications/Google\\ \\Chrome.app/Contents/MacOS/Google\\ \\Chrome" alias chromex="chrome --disable-web-security" but when running, it opens up Chrome but keeps holdi... | [
"google-chrome",
"daemon",
"arguments",
"background-process"
] | 30 | 54 | 45,802 | 2 | 0 | 2011-06-01T11:59:01.443000 | 2011-06-01T12:04:19.017000 |
6,200,772 | 6,202,197 | Jquery TypeError | In jquery - what does (d||"").split do? I've got a jqtouch webapp which throws up the following error from the jquery file: TypeError: Result of expression '(d||"").split' [undefined] is not a function. I've tried different versions of jquery but no joy. Is it something important or can I ignore it? edit: This is the p... | Try this code out: var d = "matter"; (d||"").split("a"); //array: ["m","tter"]
var a = false; (a||"").split("a"); //empty string
var c = true; (c||"").split("a"); //type error the || expression is a boolean check. If the left value is true (casted to boolean) then always return with the left, but if false then return... | Jquery TypeError In jquery - what does (d||"").split do? I've got a jqtouch webapp which throws up the following error from the jquery file: TypeError: Result of expression '(d||"").split' [undefined] is not a function. I've tried different versions of jquery but no joy. Is it something important or can I ignore it? ed... | TITLE:
Jquery TypeError
QUESTION:
In jquery - what does (d||"").split do? I've got a jqtouch webapp which throws up the following error from the jquery file: TypeError: Result of expression '(d||"").split' [undefined] is not a function. I've tried different versions of jquery but no joy. Is it something important or c... | [
"jquery",
"web-applications",
"jqtouch",
"typeerror"
] | 1 | 2 | 2,620 | 2 | 0 | 2011-06-01T12:00:03.133000 | 2011-06-01T13:46:30.620000 |
6,200,777 | 6,200,811 | SQL: extract multiple rows from one record | I have got a table "Photo_users" like this: ID Name Surname Title1 Title2 where Title1 and Title 2 are the titles of two photos uploaded by the user "Name Surname". I would like to export a list of photo titles with respective author (every author has max 2 photos of course): Name Surname Title1 Name Surname Title2....... | select name, surname, title1 from photo_users union all select name, surname, title2 from photo_users If needed, add additional NULL checks or change UNION ALL into UNION to avoid duplicates | SQL: extract multiple rows from one record I have got a table "Photo_users" like this: ID Name Surname Title1 Title2 where Title1 and Title 2 are the titles of two photos uploaded by the user "Name Surname". I would like to export a list of photo titles with respective author (every author has max 2 photos of course): ... | TITLE:
SQL: extract multiple rows from one record
QUESTION:
I have got a table "Photo_users" like this: ID Name Surname Title1 Title2 where Title1 and Title 2 are the titles of two photos uploaded by the user "Name Surname". I would like to export a list of photo titles with respective author (every author has max 2 p... | [
"mysql",
"sql"
] | 0 | 3 | 1,830 | 4 | 0 | 2011-06-01T12:00:27.963000 | 2011-06-01T12:02:18.867000 |
6,200,779 | 6,206,344 | create new multidimensional array and fill it with values from other arrays | i have let's say the following arrays.. int[] array_1 = new int[1] { 2 }; int[] array_2 = new int[2] { 3, 4 }; int[] array_3 = new int[3] { 7,5, 6 }; int combinations; combinations = array_1.Length * array_2.Length * array_3.Length; what i want to do is to create a new array where each column will contain elements from... | static int[,] Combine(params int[][] arrays) { int[][] combined = CombineRecursive(arrays).Select(x=>x.ToArray()).ToArray(); return JaggedToRectangular(combined); }
static IEnumerable > CombineRecursive(IEnumerable > arrays) { if (arrays.Count() > 1) return from a in arrays.First() from b in CombineRecursive(arrays.Sk... | create new multidimensional array and fill it with values from other arrays i have let's say the following arrays.. int[] array_1 = new int[1] { 2 }; int[] array_2 = new int[2] { 3, 4 }; int[] array_3 = new int[3] { 7,5, 6 }; int combinations; combinations = array_1.Length * array_2.Length * array_3.Length; what i want... | TITLE:
create new multidimensional array and fill it with values from other arrays
QUESTION:
i have let's say the following arrays.. int[] array_1 = new int[1] { 2 }; int[] array_2 = new int[2] { 3, 4 }; int[] array_3 = new int[3] { 7,5, 6 }; int combinations; combinations = array_1.Length * array_2.Length * array_3.L... | [
"c#",
"arrays",
"multidimensional-array",
"permutation"
] | 3 | 1 | 3,109 | 4 | 0 | 2011-06-01T12:00:39.737000 | 2011-06-01T19:04:54.863000 |
6,200,782 | 6,200,861 | Geocoding reverts to US | When using google geocoding api v3 I have a some full and valid addresses that contain US state names as either part of the house name or street name. Google interprets this as being in the US, even though the full address including country is included. eg (it is a ficticious address, as I cannot publish real customer ... | You can use " region biasing " or " viewport biasing " - both should give you results that are more relevant to the specified area. You probably want region biasing - they even give this example: You can set the Geocoding API to return results biased to a particular region using the region parameter. This parameter tak... | Geocoding reverts to US When using google geocoding api v3 I have a some full and valid addresses that contain US state names as either part of the house name or street name. Google interprets this as being in the US, even though the full address including country is included. eg (it is a ficticious address, as I canno... | TITLE:
Geocoding reverts to US
QUESTION:
When using google geocoding api v3 I have a some full and valid addresses that contain US state names as either part of the house name or street name. Google interprets this as being in the US, even though the full address including country is included. eg (it is a ficticious a... | [
"google-maps",
"google-maps-api-3",
"geocoding",
"google-geocoder"
] | 2 | 1 | 565 | 1 | 0 | 2011-06-01T12:00:41.303000 | 2011-06-01T12:06:35.967000 |
6,200,783 | 6,200,880 | Nesting string tokenizer in php | I hava a construct like this: This code is not working as expected as the string tokenizer is being updated by the inner tokenizers and the outer tokenizer is running only once. What is the work around for this?? | The documentation on strtok says quite clearly that "To start over, or to tokenize a new string you simply call strtok with the string argument again to initialize it", and does not mention a way to have multiple parses going at once. I would use explode for at least one of your parses, getting the tokens into an array... | Nesting string tokenizer in php I hava a construct like this: This code is not working as expected as the string tokenizer is being updated by the inner tokenizers and the outer tokenizer is running only once. What is the work around for this?? | TITLE:
Nesting string tokenizer in php
QUESTION:
I hava a construct like this: This code is not working as expected as the string tokenizer is being updated by the inner tokenizers and the outer tokenizer is running only once. What is the work around for this??
ANSWER:
The documentation on strtok says quite clearly t... | [
"php"
] | 2 | 1 | 961 | 1 | 0 | 2011-06-01T12:00:47.870000 | 2011-06-01T12:07:57.533000 |
6,200,794 | 6,204,410 | How to build an "editor" in Cocoa | I am looking for some very general advice on how to implement editing in Cocoa. Not for text, but shapes, pictures, etc. Basically I want to implement objects on a drawing board that the user can e.g. drag around, assign new content, resize,... Similar to almost any graphical editor like Keynote, Pages, Drawing program... | Take a look at the Sketch sample code, which is installed in /Developer/Examples/. | How to build an "editor" in Cocoa I am looking for some very general advice on how to implement editing in Cocoa. Not for text, but shapes, pictures, etc. Basically I want to implement objects on a drawing board that the user can e.g. drag around, assign new content, resize,... Similar to almost any graphical editor li... | TITLE:
How to build an "editor" in Cocoa
QUESTION:
I am looking for some very general advice on how to implement editing in Cocoa. Not for text, but shapes, pictures, etc. Basically I want to implement objects on a drawing board that the user can e.g. drag around, assign new content, resize,... Similar to almost any g... | [
"objective-c",
"cocoa",
"user-interface"
] | 2 | 5 | 236 | 1 | 0 | 2011-06-01T12:01:25.557000 | 2011-06-01T16:18:07.993000 |
6,200,805 | 6,200,888 | jquery tablesorter not sorting | hello i am stuck with jquery tablesorter: http://tablesorter.com/docs/index.html#Examples and would be grateful if some jquery guru could check my code to see where i am going wrong. instead of displaying 10 records per page it is displaying all records and also when i try to sort it does nothing. in addition to that, ... | You need to remove the fom your results loop and place it around your while loop. echo " "; while($row = mysql_fetch_array($result)) { echo " "; echo " ". $row['ip_log']. " "; echo " ". date('d/m/Y H:i:s',strtotime($row['datein_log'])). " "; echo " ". date('d/m/Y H:i:s',strtotime($row['dateout_log'])). " "; echo " "; }... | jquery tablesorter not sorting hello i am stuck with jquery tablesorter: http://tablesorter.com/docs/index.html#Examples and would be grateful if some jquery guru could check my code to see where i am going wrong. instead of displaying 10 records per page it is displaying all records and also when i try to sort it does... | TITLE:
jquery tablesorter not sorting
QUESTION:
hello i am stuck with jquery tablesorter: http://tablesorter.com/docs/index.html#Examples and would be grateful if some jquery guru could check my code to see where i am going wrong. instead of displaying 10 records per page it is displaying all records and also when i t... | [
"php",
"javascript",
"jquery",
"tablesorter"
] | 1 | 1 | 1,581 | 2 | 0 | 2011-06-01T12:02:01.030000 | 2011-06-01T12:09:01.480000 |
6,200,824 | 6,201,029 | How to create a Dynamic Intent in Android? | I would like to know how can I create a 'dynamic intent' in android. In sum, what I want to accomplish is to show a list of items of data that are being fecthed from a webservice and when an item is clicked to launch a new activity with some parameters set. Note that all the items would be an instance of the same class... | You can send any custom or 'dynamic' content through the extras on the intent. These are available to the activity that is launched by the intent. so you would do something like: myIntent.putExtra("myCutsomDataTag","myCustomData"); on the intent that you launch. In your receiving activity you would do something like: I... | How to create a Dynamic Intent in Android? I would like to know how can I create a 'dynamic intent' in android. In sum, what I want to accomplish is to show a list of items of data that are being fecthed from a webservice and when an item is clicked to launch a new activity with some parameters set. Note that all the i... | TITLE:
How to create a Dynamic Intent in Android?
QUESTION:
I would like to know how can I create a 'dynamic intent' in android. In sum, what I want to accomplish is to show a list of items of data that are being fecthed from a webservice and when an item is clicked to launch a new activity with some parameters set. N... | [
"android"
] | 4 | 2 | 2,125 | 2 | 0 | 2011-06-01T12:03:22.760000 | 2011-06-01T12:20:35.593000 |
6,200,827 | 6,200,899 | how to ensure only after service(started in alarmreceiver) finish its job the alarm should be called again | I have a alarm receiver start a service for every 5 mins. In the service Iam synching my database with a server. if the server splits the packets and send. I need to send the request again with a session id. The problem is when i do that i want the alarmreciever to wait until the service finish its work. ie only when i... | Don't set your alarm repeating. Consider two options: 1) the service itself, after its job could ask the alarm manager to set a new alarm at fixed time 2) use handler.postDelayed to do that instead of alarm manager. I find more flexible. Regards, Stéphane | how to ensure only after service(started in alarmreceiver) finish its job the alarm should be called again I have a alarm receiver start a service for every 5 mins. In the service Iam synching my database with a server. if the server splits the packets and send. I need to send the request again with a session id. The p... | TITLE:
how to ensure only after service(started in alarmreceiver) finish its job the alarm should be called again
QUESTION:
I have a alarm receiver start a service for every 5 mins. In the service Iam synching my database with a server. if the server splits the packets and send. I need to send the request again with a... | [
"android"
] | 0 | 2 | 277 | 1 | 0 | 2011-06-01T12:03:34.753000 | 2011-06-01T12:10:12.803000 |
6,200,828 | 6,240,686 | Issues with Codeigniter and Cron Bootstrapper | I am trying to create a cron job while taking advantage of my current CI setup and the use of Controllers and Models. I am using Cron Bootstrapper (http://codeigniter.com/wiki/Cron_job_bootstrapper/) because it gives me easy access to test the process locally on-demand or be available as a traditional cron process on a... | Set $db['default']['db_debug'] = TRUE; in your database config file to enable more verbose error reporting. You need to heed the timezone warning and set a default in your php.ini file. This is a new requirement as of PHP 5.3. If you are running on a shared server and do not have access to php.ini, you can either reque... | Issues with Codeigniter and Cron Bootstrapper I am trying to create a cron job while taking advantage of my current CI setup and the use of Controllers and Models. I am using Cron Bootstrapper (http://codeigniter.com/wiki/Cron_job_bootstrapper/) because it gives me easy access to test the process locally on-demand or b... | TITLE:
Issues with Codeigniter and Cron Bootstrapper
QUESTION:
I am trying to create a cron job while taking advantage of my current CI setup and the use of Controllers and Models. I am using Cron Bootstrapper (http://codeigniter.com/wiki/Cron_job_bootstrapper/) because it gives me easy access to test the process loca... | [
"codeigniter",
"cron"
] | 1 | 2 | 1,203 | 1 | 0 | 2011-06-01T12:03:36.987000 | 2011-06-05T02:40:38.030000 |
6,200,833 | 6,201,563 | Checking database connectivity in JSP | How can I check the database connectivity in JSP. I want to print an error message if there is any problem occurs with the database connectivity. I m using the following code: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String connectionUrl = "jdbc:sqlserver://localhost;databaseName=dbname;user=usern... | The JSP is the wrong place for this. You need to create a standalone class which does the JDBC job and let each of the methods throw an exception whenever the SQL stuff fails. Here's an example of a "DAO" class which does all the JDBC stuff on the User table: public class UserDAO {
public User find(String username, St... | Checking database connectivity in JSP How can I check the database connectivity in JSP. I want to print an error message if there is any problem occurs with the database connectivity. I m using the following code: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String connectionUrl = "jdbc:sqlserver://lo... | TITLE:
Checking database connectivity in JSP
QUESTION:
How can I check the database connectivity in JSP. I want to print an error message if there is any problem occurs with the database connectivity. I m using the following code: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String connectionUrl = "j... | [
"java",
"jsp",
"jdbc",
"database-connectivity"
] | 0 | 3 | 11,155 | 5 | 0 | 2011-06-01T12:04:20.117000 | 2011-06-01T13:01:36.527000 |
6,200,835 | 6,200,866 | Remove Same Element from Array in C# | How can I remove the same element from Array in C#? e.g. array{0,2,2,8,4,6,1,0,4} and output will be array{0,2,8,4,6,1} | using System.Linq;... var output = array.Distinct().ToArray(); Without LINQ: int[] array = new[] { 0, 2, 2, 8, 4, 6, 1, 0, 4 };
List result = new List (); foreach (int element in array) { if (!result.Contains(element)) result.Add(element); } int[] resultArray = result.ToArray(); | Remove Same Element from Array in C# How can I remove the same element from Array in C#? e.g. array{0,2,2,8,4,6,1,0,4} and output will be array{0,2,8,4,6,1} | TITLE:
Remove Same Element from Array in C#
QUESTION:
How can I remove the same element from Array in C#? e.g. array{0,2,2,8,4,6,1,0,4} and output will be array{0,2,8,4,6,1}
ANSWER:
using System.Linq;... var output = array.Distinct().ToArray(); Without LINQ: int[] array = new[] { 0, 2, 2, 8, 4, 6, 1, 0, 4 };
List re... | [
"c#"
] | 3 | 3 | 1,106 | 4 | 0 | 2011-06-01T12:04:38.697000 | 2011-06-01T12:07:03.843000 |
6,200,843 | 6,200,964 | how to get a form id unique in a foreach | Here is my code: messageSent.php?id= " class="charcoal_link" style="line-height: 20px;" onclick="showMessageArea(this); return false;" > then i have: | There are two options: 1) add id=" " to your tags, OR 2) better pass the id as javascript function parameter: and then your javascript function should look like this function showMessageArea(link, id) { document.getElementById('message_id').value = id; var message_area = document.getElementById('message_area_'+id);....... | how to get a form id unique in a foreach Here is my code: messageSent.php?id= " class="charcoal_link" style="line-height: 20px;" onclick="showMessageArea(this); return false;" > then i have: | TITLE:
how to get a form id unique in a foreach
QUESTION:
Here is my code: messageSent.php?id= " class="charcoal_link" style="line-height: 20px;" onclick="showMessageArea(this); return false;" > then i have:
ANSWER:
There are two options: 1) add id=" " to your tags, OR 2) better pass the id as javascript function par... | [
"php",
"javascript",
"html"
] | 0 | 1 | 1,328 | 2 | 0 | 2011-06-01T12:05:00.357000 | 2011-06-01T12:16:18.043000 |
6,200,850 | 6,200,891 | NetworkInterface, Wifi or Lan? | How do i find out if a NetworkInterface is a Wifi or Lan Card in C#? And is there a safe way of determining this? | You can use the NetworkInterfaceType property of the NetworkInterface class. It will be equal to NetworkInterfaceType.Wireless80211 if the interface represents a WiFi adapter. | NetworkInterface, Wifi or Lan? How do i find out if a NetworkInterface is a Wifi or Lan Card in C#? And is there a safe way of determining this? | TITLE:
NetworkInterface, Wifi or Lan?
QUESTION:
How do i find out if a NetworkInterface is a Wifi or Lan Card in C#? And is there a safe way of determining this?
ANSWER:
You can use the NetworkInterfaceType property of the NetworkInterface class. It will be equal to NetworkInterfaceType.Wireless80211 if the interface... | [
"c#"
] | 5 | 9 | 3,812 | 1 | 0 | 2011-06-01T12:05:59.820000 | 2011-06-01T12:09:10.990000 |
6,200,871 | 6,203,804 | Update , SET option in Hive | I know there is no update of file in Hadoop but in Hive it is possible with syntactic sugar to merge the new values with the old data in the table and then to rewrite the table with the merged output but if I have the new values in another table then I can achieve the same effect by using a left outer join. The problem... | INSERT OVERWRITE TABLE _tableName_ PARTITION (_partitionColumn_= _partitionValue_) SELECT [other Things], CASE WHEN id=206 THEN 'florida' ELSE location END AS location, [other Other Things] FROM _tableName_ WHERE [_whereClause_]; You can have multiple partitions listed by separating them by commas.... PARTITION (_parti... | Update , SET option in Hive I know there is no update of file in Hadoop but in Hive it is possible with syntactic sugar to merge the new values with the old data in the table and then to rewrite the table with the merged output but if I have the new values in another table then I can achieve the same effect by using a ... | TITLE:
Update , SET option in Hive
QUESTION:
I know there is no update of file in Hadoop but in Hive it is possible with syntactic sugar to merge the new values with the old data in the table and then to rewrite the table with the merged output but if I have the new values in another table then I can achieve the same ... | [
"hive"
] | 16 | 12 | 47,291 | 2 | 0 | 2011-06-01T12:07:44.157000 | 2011-06-01T15:34:51.073000 |
6,200,878 | 6,201,099 | Problem in displaying the image in Textiew Using the Html.ImageGetter | I want to display image in TextView with text, I had used Html.ImageGetter but image was not displayed this is my code, please tell me what is wrong in this code public class MyTest extends Activity {
TextView t=null;
/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanc... | ImageGetter is used for tag parsing. So you have to have an tag in your HTML code. For example, t.setText(Html.fromHtml("Hi ", imgGetter, null)); But you'd better make the ImageGetter subclass return an image depending on the source argument. | Problem in displaying the image in Textiew Using the Html.ImageGetter I want to display image in TextView with text, I had used Html.ImageGetter but image was not displayed this is my code, please tell me what is wrong in this code public class MyTest extends Activity {
TextView t=null;
/** Called when the activity i... | TITLE:
Problem in displaying the image in Textiew Using the Html.ImageGetter
QUESTION:
I want to display image in TextView with text, I had used Html.ImageGetter but image was not displayed this is my code, please tell me what is wrong in this code public class MyTest extends Activity {
TextView t=null;
/** Called w... | [
"android"
] | 0 | 0 | 1,720 | 2 | 0 | 2011-06-01T12:07:53.510000 | 2011-06-01T12:25:27.977000 |
6,200,898 | 6,201,310 | UIPopover problem | I have a view controller which contains a tableview.This tableview is displayed in the UIPopover controller in a parent view.I want the text from the selected cell in the popover controller to get set in a UITextField in the parent view and i want to dismiss the popover after selection.I am not able to achieve this. Co... | I believe it is not called because you haven't set your delegate property. You should check this part of code. Or if it is ok add it to your post. | UIPopover problem I have a view controller which contains a tableview.This tableview is displayed in the UIPopover controller in a parent view.I want the text from the selected cell in the popover controller to get set in a UITextField in the parent view and i want to dismiss the popover after selection.I am not able t... | TITLE:
UIPopover problem
QUESTION:
I have a view controller which contains a tableview.This tableview is displayed in the UIPopover controller in a parent view.I want the text from the selected cell in the popover controller to get set in a UITextField in the parent view and i want to dismiss the popover after selecti... | [
"ipad",
"uipopovercontroller",
"uipopover"
] | 0 | 3 | 856 | 2 | 0 | 2011-06-01T12:10:09.777000 | 2011-06-01T12:41:59.357000 |
6,200,901 | 6,201,136 | Updating only part of a model | I'm using ASP.NET MVC 3 and Entity Framework Code First. I have a page (using Razor View Engine) which allows a user to update parts of a model (Product): @Html.LabelFor(model => model.Overview) @Html.TextAreaFor(model => model.Overview) @Html.LabelFor(model => model.Description) @Html.TextAreaFor(model => model.Descri... | When it comes to editing, try selecting an existing record from the database first (the one you want to edit), then update it with the values collected from your form (i.e. the model passed into your controller action), then save it. E.g. [HttpPost] public ActionResult Update(Product productPassedInFromView) { Product ... | Updating only part of a model I'm using ASP.NET MVC 3 and Entity Framework Code First. I have a page (using Razor View Engine) which allows a user to update parts of a model (Product): @Html.LabelFor(model => model.Overview) @Html.TextAreaFor(model => model.Overview) @Html.LabelFor(model => model.Description) @Html.Tex... | TITLE:
Updating only part of a model
QUESTION:
I'm using ASP.NET MVC 3 and Entity Framework Code First. I have a page (using Razor View Engine) which allows a user to update parts of a model (Product): @Html.LabelFor(model => model.Overview) @Html.TextAreaFor(model => model.Overview) @Html.LabelFor(model => model.Desc... | [
"c#",
"asp.net",
"asp.net-mvc",
"asp.net-mvc-3"
] | 2 | 5 | 1,994 | 2 | 0 | 2011-06-01T12:10:18.967000 | 2011-06-01T12:28:20.393000 |
6,200,908 | 6,201,038 | Enum parsing. String to Anchor | I have a string variable with the value "Top;Left". Is it possible to easily parse this to Control.Anchor (without using if 's)? Enum.Parse doesn't work because Anchor can take a value, for example, Top;Left;, but the AnchorEnum can only take Top, or Left, or Right, or Bottom, or None. | It's easy to parse this without iterating over each option. var s = "Top;Left"; s = s.Replace(";", ", "); var e = Enum.Parse(typeof(AnchorStyles), s); The only gotcha is it has to be comma separated, not semicolon. | Enum parsing. String to Anchor I have a string variable with the value "Top;Left". Is it possible to easily parse this to Control.Anchor (without using if 's)? Enum.Parse doesn't work because Anchor can take a value, for example, Top;Left;, but the AnchorEnum can only take Top, or Left, or Right, or Bottom, or None. | TITLE:
Enum parsing. String to Anchor
QUESTION:
I have a string variable with the value "Top;Left". Is it possible to easily parse this to Control.Anchor (without using if 's)? Enum.Parse doesn't work because Anchor can take a value, for example, Top;Left;, but the AnchorEnum can only take Top, or Left, or Right, or B... | [
"c#",
"winforms",
"controls"
] | 2 | 0 | 329 | 4 | 0 | 2011-06-01T12:10:49.403000 | 2011-06-01T12:21:08.350000 |
6,200,910 | 6,201,054 | Relationship between SciPy and NumPy | SciPy appears to provide most (but not all [1]) of NumPy's functions in its own namespace. In other words, if there's a function named numpy.foo, there's almost certainly a scipy.foo. Most of the time, the two appear to be exactly the same, oftentimes even pointing to the same function object. Sometimes, they're differ... | Last time I checked it, the scipy __init__ method executes a from numpy import * so that the whole numpy namespace is included into scipy when the scipy module is imported. The log10 behavior you are describing is interesting, because both versions are coming from numpy. One is a ufunc, the other is a numpy.lib functio... | Relationship between SciPy and NumPy SciPy appears to provide most (but not all [1]) of NumPy's functions in its own namespace. In other words, if there's a function named numpy.foo, there's almost certainly a scipy.foo. Most of the time, the two appear to be exactly the same, oftentimes even pointing to the same funct... | TITLE:
Relationship between SciPy and NumPy
QUESTION:
SciPy appears to provide most (but not all [1]) of NumPy's functions in its own namespace. In other words, if there's a function named numpy.foo, there's almost certainly a scipy.foo. Most of the time, the two appear to be exactly the same, oftentimes even pointing... | [
"python",
"numpy",
"scipy"
] | 282 | 155 | 59,344 | 8 | 0 | 2011-06-01T12:11:19.633000 | 2011-06-01T12:22:06.917000 |
6,200,915 | 6,201,080 | MYSQL query optimise: build seperate tables with ORDER BY done so don't need indexes for SELECT ORDER BY | I am wondering if my theory is right here so looking for some advice from MySQL gurus. I have a table I have redesigned to just include various elements user SELECT queries can search against. There are many permutations on the WHERE clause and then a few permutations they could want ORDER BY. Creating multi indexes fo... | this does not work this way. Order is not guaranteed in a selected list unless ORDER BY is used. I think a bigger problem for you to contemplate is why does the user need 1 million rows of returned data, what good does that do them? perhaps figuring a way to summarize to something useful would allow you to optimize a b... | MYSQL query optimise: build seperate tables with ORDER BY done so don't need indexes for SELECT ORDER BY I am wondering if my theory is right here so looking for some advice from MySQL gurus. I have a table I have redesigned to just include various elements user SELECT queries can search against. There are many permuta... | TITLE:
MYSQL query optimise: build seperate tables with ORDER BY done so don't need indexes for SELECT ORDER BY
QUESTION:
I am wondering if my theory is right here so looking for some advice from MySQL gurus. I have a table I have redesigned to just include various elements user SELECT queries can search against. Ther... | [
"mysql",
"performance",
"indexing",
"sql-order-by"
] | 1 | 1 | 127 | 2 | 0 | 2011-06-01T12:11:44.070000 | 2011-06-01T12:24:09.257000 |
6,200,924 | 6,200,986 | Jquery Animation Not Working | I have made a feedback form.i put some jquery code to make it animate but it's not working... feedback_label is the button.when i click the buttom it should move to left by 150px.But it's not moving. HTML Name *: Email Id *: Website *: Feedback *: CSS: Any Idea. | use margin-left instead of left. or you could put your whole form inside another div and then animate the div element you just added. | Jquery Animation Not Working I have made a feedback form.i put some jquery code to make it animate but it's not working... feedback_label is the button.when i click the buttom it should move to left by 150px.But it's not moving. HTML Name *: Email Id *: Website *: Feedback *: CSS: Any Idea. | TITLE:
Jquery Animation Not Working
QUESTION:
I have made a feedback form.i put some jquery code to make it animate but it's not working... feedback_label is the button.when i click the buttom it should move to left by 150px.But it's not moving. HTML Name *: Email Id *: Website *: Feedback *: CSS: Any Idea.
ANSWER:
u... | [
"javascript",
"animation",
"jquery-animate"
] | 0 | 1 | 414 | 3 | 0 | 2011-06-01T12:12:43.757000 | 2011-06-01T12:17:42.207000 |
6,200,927 | 6,205,217 | Problem with richfaces a4j:jsFunction | Above is a list of check-boxes with select all option, if select all is selected all check-boxes are selected. On the basis of selected values I have to populate another check-box list, whose logic is in action method. I am facing few issues. If I remove process attribute of tag "a4j:jsFunction", action method is calle... | I would start with placing a4j:jsFunction outside h:selectManyCheckbox, it shouldn't be nested inside. | Problem with richfaces a4j:jsFunction Above is a list of check-boxes with select all option, if select all is selected all check-boxes are selected. On the basis of selected values I have to populate another check-box list, whose logic is in action method. I am facing few issues. If I remove process attribute of tag "a... | TITLE:
Problem with richfaces a4j:jsFunction
QUESTION:
Above is a list of check-boxes with select all option, if select all is selected all check-boxes are selected. On the basis of selected values I have to populate another check-box list, whose logic is in action method. I am facing few issues. If I remove process a... | [
"ajax",
"jsf",
"richfaces",
"ajax4jsf"
] | 0 | 1 | 2,917 | 1 | 0 | 2011-06-01T12:13:26.043000 | 2011-06-01T17:23:17.017000 |
6,200,931 | 6,203,763 | Passenger misses development gem in production environment | I've got a strange behaviour on my production server: I deploy my Rails 3 application via Capistrano to the production server. The Capistrano script restarts passenger at the end of deployment. When I open the application I see a passenger error message: Could not find autotest-fsevent-0.2.4 in any of the sources (Bund... | Are you using the bundler capistrano recipes? Make sure this is in your config/deploy.rb require 'bundler/capistrano' Basically it will invoke bundle with the --without development test option, which should only install the production gems. If you are just doing a regular bundle, it will install try to install the gems... | Passenger misses development gem in production environment I've got a strange behaviour on my production server: I deploy my Rails 3 application via Capistrano to the production server. The Capistrano script restarts passenger at the end of deployment. When I open the application I see a passenger error message: Could ... | TITLE:
Passenger misses development gem in production environment
QUESTION:
I've got a strange behaviour on my production server: I deploy my Rails 3 application via Capistrano to the production server. The Capistrano script restarts passenger at the end of deployment. When I open the application I see a passenger err... | [
"ruby-on-rails",
"rubygems",
"passenger",
"bundler",
"environment"
] | 2 | 4 | 890 | 2 | 0 | 2011-06-01T12:13:38.103000 | 2011-06-01T15:31:17.023000 |
6,200,935 | 6,200,975 | what is wrong with this code.. regarding strncat | sorry i modified the code now: #include #include #include void main() { int i=0; char** f=NULL; char* ff=NULL;
ff="abcd";
f=( char**)malloc ((i + 1) * sizeof (char *)+5); f[0]=ff; // strcpy(f[0],ff); (this again giving same error) strncat(f[0],"efg",3); printf("f: %s",f[0]); } I am getting some unhandled exception, A... | you are setting f<-ff ff points to the start of a constant char[] ("abcd") and then you change the value of *f (which is exactly *ff) thus - access violation. | what is wrong with this code.. regarding strncat sorry i modified the code now: #include #include #include void main() { int i=0; char** f=NULL; char* ff=NULL;
ff="abcd";
f=( char**)malloc ((i + 1) * sizeof (char *)+5); f[0]=ff; // strcpy(f[0],ff); (this again giving same error) strncat(f[0],"efg",3); printf("f: %s",... | TITLE:
what is wrong with this code.. regarding strncat
QUESTION:
sorry i modified the code now: #include #include #include void main() { int i=0; char** f=NULL; char* ff=NULL;
ff="abcd";
f=( char**)malloc ((i + 1) * sizeof (char *)+5); f[0]=ff; // strcpy(f[0],ff); (this again giving same error) strncat(f[0],"efg",3... | [
"c++",
"c",
"visual-c++"
] | 1 | 5 | 324 | 7 | 0 | 2011-06-01T12:13:50.537000 | 2011-06-01T12:17:03.023000 |
6,200,941 | 6,201,032 | how convert keyboard type in iphone | I'm trying When the user click on a UiTextfield i need to change the keyboard view to the alpha view automatically, is this possible? when user enter in the textfield then he or she should not be alb to enter numeric value in text field in iphone how can i do this please help me friend | UITextField 's protocol UITextInputTraits has the property to change the keyboard type. @property(nonatomic) UIKeyboardType keyboardType
myTextField.keyboardType = UIKeyboardTypeASCIICapable; Try with the possible values of UIKeyboardType. I'm not sure about whether you could bring the alpha effect on the existing key... | how convert keyboard type in iphone I'm trying When the user click on a UiTextfield i need to change the keyboard view to the alpha view automatically, is this possible? when user enter in the textfield then he or she should not be alb to enter numeric value in text field in iphone how can i do this please help me frie... | TITLE:
how convert keyboard type in iphone
QUESTION:
I'm trying When the user click on a UiTextfield i need to change the keyboard view to the alpha view automatically, is this possible? when user enter in the textfield then he or she should not be alb to enter numeric value in text field in iphone how can i do this p... | [
"iphone",
"objective-c"
] | 1 | 4 | 2,259 | 2 | 0 | 2011-06-01T12:14:13.147000 | 2011-06-01T12:20:52.650000 |
6,200,942 | 6,257,617 | Is this possible in SQL? | I have a table containing some data which needs to be displayed in a certain format on screen. The table structures are as follows: CREATE TABLE [dbo].[JobSheet]( [JobSheetID] [bigint] IDENTITY(1,1) NOT NULL, [SheetNumber] [bigint] NULL, [JobSheetDate] [datetime] NULL, [ContractID] [bigint] NULL, [ContractCode] [varcha... | As suggested in my comment to the original question, I belive normalization is a good long-term solution. | Is this possible in SQL? I have a table containing some data which needs to be displayed in a certain format on screen. The table structures are as follows: CREATE TABLE [dbo].[JobSheet]( [JobSheetID] [bigint] IDENTITY(1,1) NOT NULL, [SheetNumber] [bigint] NULL, [JobSheetDate] [datetime] NULL, [ContractID] [bigint] NUL... | TITLE:
Is this possible in SQL?
QUESTION:
I have a table containing some data which needs to be displayed in a certain format on screen. The table structures are as follows: CREATE TABLE [dbo].[JobSheet]( [JobSheetID] [bigint] IDENTITY(1,1) NOT NULL, [SheetNumber] [bigint] NULL, [JobSheetDate] [datetime] NULL, [Contra... | [
"asp.net",
"sql",
"sql-server"
] | 0 | 1 | 205 | 2 | 0 | 2011-06-01T12:14:25.700000 | 2011-06-06T20:26:08.413000 |
6,200,951 | 6,200,971 | Need to unbind local folder from SVN | I am using TortoiseSVN I imported some file to the server. Then I deleted all imported files from server. But my folder in windows explorer is diplayed with SVN icon. How can I removed it? | You can right click the folder -> choose TortoiseSVN -> Export and choose the same location as the folder currently is in (i.e. export the folder to itself) This will 'un-version' the whole folder. | Need to unbind local folder from SVN I am using TortoiseSVN I imported some file to the server. Then I deleted all imported files from server. But my folder in windows explorer is diplayed with SVN icon. How can I removed it? | TITLE:
Need to unbind local folder from SVN
QUESTION:
I am using TortoiseSVN I imported some file to the server. Then I deleted all imported files from server. But my folder in windows explorer is diplayed with SVN icon. How can I removed it?
ANSWER:
You can right click the folder -> choose TortoiseSVN -> Export and ... | [
"svn",
"tortoisesvn"
] | 12 | 23 | 4,770 | 2 | 0 | 2011-06-01T12:14:54.490000 | 2011-06-01T12:16:47.557000 |
6,200,963 | 6,204,260 | Calculation of element widths when floated in Opera 11.* | I'm dealing with an issue in the Opera 11.5 beta (I am presuming this is relevant to all Opera 11 releases) whereby a floated, block-level element (an un-ordered list) is being given an arbitrary fixed width and causing the child elements to wrap - in the same way to IE6 does. The element is floated right and currently... | I don't know why yet (will look later) but Opera is not liking the replace class not having a width on it.replace { display:block; overflow:hidden; text-indent:-9999px; background: no-repeat 0 0; width: 10px; } I presume that class(by it's name) is to house a replacement background image, so it should be OK to put a wi... | Calculation of element widths when floated in Opera 11.* I'm dealing with an issue in the Opera 11.5 beta (I am presuming this is relevant to all Opera 11 releases) whereby a floated, block-level element (an un-ordered list) is being given an arbitrary fixed width and causing the child elements to wrap - in the same wa... | TITLE:
Calculation of element widths when floated in Opera 11.*
QUESTION:
I'm dealing with an issue in the Opera 11.5 beta (I am presuming this is relevant to all Opera 11 releases) whereby a floated, block-level element (an un-ordered list) is being given an arbitrary fixed width and causing the child elements to wra... | [
"css",
"layout",
"opera",
"css-float"
] | 0 | 1 | 279 | 2 | 0 | 2011-06-01T12:16:03.110000 | 2011-06-01T16:08:06.900000 |
6,200,965 | 6,211,352 | How to manage repeater with non fixed column number | I am using repeater to bind all table data. And My table fields are Name,Option1,Option2... Option12. All total 13 columns. values for Option columns are dynamic. some time it contains two values for Option1 and 2 and some times figure can be change between 1 to 12. Now i want to show only those option columns that con... | Try this it's helpful for you, ID
Name
Orders <%# DataBinder.Eval(Container.DataItem, "ID") %> <%# DataBinder.Eval(Container.DataItem,"Name") %> <%# DataBinder.Eval(Container.DataItem, "OrderID") %> - <%# DataBinder.Eval(Container.DataItem, "OrderName") %> - <%# DataBinder.Eval(Container.DataItem, "OrderCost")%> The ... | How to manage repeater with non fixed column number I am using repeater to bind all table data. And My table fields are Name,Option1,Option2... Option12. All total 13 columns. values for Option columns are dynamic. some time it contains two values for Option1 and 2 and some times figure can be change between 1 to 12. N... | TITLE:
How to manage repeater with non fixed column number
QUESTION:
I am using repeater to bind all table data. And My table fields are Name,Option1,Option2... Option12. All total 13 columns. values for Option columns are dynamic. some time it contains two values for Option1 and 2 and some times figure can be change ... | [
"asp.net",
"repeater"
] | 5 | 3 | 1,241 | 3 | 0 | 2011-06-01T12:16:18.980000 | 2011-06-02T06:48:22.923000 |
6,200,967 | 6,201,083 | Count number of element in List<List<T>> | I have a List >. How can I count all the elements in this as if it was a single List in the fastest way? So far I have used List result = listOfLists.SelectMany(list => list).Distinct().ToList().Count; but this actually creates a list and then counts the element which is not a very good idea. | I would recommend a simple, nested loop with a HashSet if you need to eliminate duplicates between lists. It combines the SelectMany and Distinct operations into the set insertion logic and should be faster since the HashSet has O(1) lookup time. Internally Distinct() may actually use something similar, but this omits ... | Count number of element in List<List<T>> I have a List >. How can I count all the elements in this as if it was a single List in the fastest way? So far I have used List result = listOfLists.SelectMany(list => list).Distinct().ToList().Count; but this actually creates a list and then counts the element which is not a v... | TITLE:
Count number of element in List<List<T>>
QUESTION:
I have a List >. How can I count all the elements in this as if it was a single List in the fastest way? So far I have used List result = listOfLists.SelectMany(list => list).Distinct().ToList().Count; but this actually creates a list and then counts the elemen... | [
"c#",
"linq"
] | 28 | 16 | 54,894 | 4 | 0 | 2011-06-01T12:16:31.160000 | 2011-06-01T12:24:16.810000 |
6,200,979 | 6,201,053 | Problem with filling an Hashmap java | Hello I want to fill an hashmap with value => key:idissue value:arraylist (list of assignee) The problem that my function return the same liste of assignee for all my issues: My map{10700=[x,y,z], 10500=[x,y,z],10600=[x,y,z]....... Or the result should be like this: My map{10700=[x,y,z], 10500=[w,v,q,v,t,z],10600=[m,r,... | Every time you iterate trough listassignee = new ArrayList () | Problem with filling an Hashmap java Hello I want to fill an hashmap with value => key:idissue value:arraylist (list of assignee) The problem that my function return the same liste of assignee for all my issues: My map{10700=[x,y,z], 10500=[x,y,z],10600=[x,y,z]....... Or the result should be like this: My map{10700=[x,... | TITLE:
Problem with filling an Hashmap java
QUESTION:
Hello I want to fill an hashmap with value => key:idissue value:arraylist (list of assignee) The problem that my function return the same liste of assignee for all my issues: My map{10700=[x,y,z], 10500=[x,y,z],10600=[x,y,z]....... Or the result should be like this... | [
"java",
"hashmap"
] | 1 | 2 | 516 | 3 | 0 | 2011-06-01T12:17:11.333000 | 2011-06-01T12:22:05.980000 |
6,200,985 | 6,223,042 | Can I use google analytics to show users visits on content they have added? | I have a website where users can post their articles. I would like to show them full stats on their content visits, referrers, countries and all the cool stuff that modern counters can offer. Is there a way to implement it using google analytics? Or is there some special system for this? I know that livejournal.com do ... | Google has announced this one, link http://analytics.blogspot.com/2008/10/more-enterprise-class-features-added-to.html But i am not sure how it works, i think this will help you. Once I tried doing this for one of the client, it was not allowing. that time i realised that we need to export the values from google analyt... | Can I use google analytics to show users visits on content they have added? I have a website where users can post their articles. I would like to show them full stats on their content visits, referrers, countries and all the cool stuff that modern counters can offer. Is there a way to implement it using google analytic... | TITLE:
Can I use google analytics to show users visits on content they have added?
QUESTION:
I have a website where users can post their articles. I would like to show them full stats on their content visits, referrers, countries and all the cool stuff that modern counters can offer. Is there a way to implement it usi... | [
"php",
"google-analytics"
] | 0 | 0 | 125 | 1 | 0 | 2011-06-01T12:17:26.470000 | 2011-06-03T04:45:26.753000 |
6,200,988 | 6,231,989 | shouldAutorotateToInterfaceOrientation: fails to get called after a while | I have a project where the rotation events stop firing after removing/adding a lot of view/viewControllers. It works for a while and then at random the new view added to the window never gets shouldAutorotateToInterfaceOrientation: called. The status bar fails to rotate as well but the view/view controller functions no... | It looks like the root of the problem was that removing the viewController that the window was sending the rotation event during the transition caused the window to sometimes not register the new viewcontroller as the new root. I just have one UIView (with its own UIViewController) added to the Window. During the anima... | shouldAutorotateToInterfaceOrientation: fails to get called after a while I have a project where the rotation events stop firing after removing/adding a lot of view/viewControllers. It works for a while and then at random the new view added to the window never gets shouldAutorotateToInterfaceOrientation: called. The st... | TITLE:
shouldAutorotateToInterfaceOrientation: fails to get called after a while
QUESTION:
I have a project where the rotation events stop firing after removing/adding a lot of view/viewControllers. It works for a while and then at random the new view added to the window never gets shouldAutorotateToInterfaceOrientati... | [
"iphone",
"objective-c",
"uiviewcontroller"
] | 0 | 0 | 948 | 1 | 0 | 2011-06-01T12:17:44.607000 | 2011-06-03T19:54:46.837000 |
6,200,991 | 6,201,142 | Extracting some text from HTML using PHP regular expressions | Possible Duplicate: find and edit comment element of html with php Hello. Regular expressions in general are way over my head. The answer to my question should be fairly simple, but after digging around for a while I'm still at loss for one. How can I extract "Orange County, CA" using preg_match() in PHP from this HTML... | One regex you can use would be this: $matches = array(); preg_match('/ /', $html, $matches);
echo $matches[1]; If there are multiple such comments in the HTML, use preg_match_all(). | Extracting some text from HTML using PHP regular expressions Possible Duplicate: find and edit comment element of html with php Hello. Regular expressions in general are way over my head. The answer to my question should be fairly simple, but after digging around for a while I'm still at loss for one. How can I extract... | TITLE:
Extracting some text from HTML using PHP regular expressions
QUESTION:
Possible Duplicate: find and edit comment element of html with php Hello. Regular expressions in general are way over my head. The answer to my question should be fairly simple, but after digging around for a while I'm still at loss for one.... | [
"php",
"html",
"regex",
"preg-match"
] | 0 | 3 | 298 | 2 | 0 | 2011-06-01T12:17:58.543000 | 2011-06-01T12:28:46.540000 |
6,200,994 | 6,201,025 | How to enable php extension using `phpize`? | I tried these steps on different extensions but I don't know why that doesn't work. Shouldn't I see a change in phpinfo() output after that? The steps: Decompress the php source code and change directory to ext/ext_name phpize configure make move manually the "ext_name.so" file from "../.lib" directory to "extension_di... | If the.so is properly compiled etc, and it's in your extension dir, then you need to add the following line also: extension=NAME.so This will force the loading. At this point, provided there is actually something to display, it will show in phpinfo(). | How to enable php extension using `phpize`? I tried these steps on different extensions but I don't know why that doesn't work. Shouldn't I see a change in phpinfo() output after that? The steps: Decompress the php source code and change directory to ext/ext_name phpize configure make move manually the "ext_name.so" fi... | TITLE:
How to enable php extension using `phpize`?
QUESTION:
I tried these steps on different extensions but I don't know why that doesn't work. Shouldn't I see a change in phpinfo() output after that? The steps: Decompress the php source code and change directory to ext/ext_name phpize configure make move manually th... | [
"php",
"php-extension"
] | 4 | 6 | 6,155 | 1 | 0 | 2011-06-01T12:18:21.643000 | 2011-06-01T12:20:19.370000 |
6,200,995 | 6,201,632 | Creating XML from a DOM fragment on IE 7/8 | Any pointers on creating XML from the DOM in Javascript on IE 7/8? I use document.createDocumentFragment() and XMLSerializer().serializeToString() on FF/Chrome/Safari, but on IE8 document.createDocumentFragment() creates a DispHTMLDocument object, which doesn't seem to be of any use. Is there something in IE that I hav... | xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); fragm = xmlDoc.createDocumentFragment(); | Creating XML from a DOM fragment on IE 7/8 Any pointers on creating XML from the DOM in Javascript on IE 7/8? I use document.createDocumentFragment() and XMLSerializer().serializeToString() on FF/Chrome/Safari, but on IE8 document.createDocumentFragment() creates a DispHTMLDocument object, which doesn't seem to be of a... | TITLE:
Creating XML from a DOM fragment on IE 7/8
QUESTION:
Any pointers on creating XML from the DOM in Javascript on IE 7/8? I use document.createDocumentFragment() and XMLSerializer().serializeToString() on FF/Chrome/Safari, but on IE8 document.createDocumentFragment() creates a DispHTMLDocument object, which doesn... | [
"javascript",
"xml",
"internet-explorer",
"dom"
] | 0 | 1 | 611 | 1 | 0 | 2011-06-01T12:18:26.657000 | 2011-06-01T13:07:03.930000 |
6,200,996 | 6,210,522 | Creating and saving Visio 2010 stencils using C# | We need to create a Visio 2010 stencil in code, using the.NET Freamework and C#. The idea is like this: We have our app, that is used by the app user, and then we have the workflow designer, which user Visio which is installed on another machine. So we have two different people and two different machines. Lets say that... | If you want to create a Visio stencil on a machine where you can't use the Visio API (i.e. where Visio is not installed or in a server scenario) you can create a Visio XML file. If you use the file extension VSX then Visio will treat it as a stencil. Creating shapes in a Visio XML file may be much more complicated than... | Creating and saving Visio 2010 stencils using C# We need to create a Visio 2010 stencil in code, using the.NET Freamework and C#. The idea is like this: We have our app, that is used by the app user, and then we have the workflow designer, which user Visio which is installed on another machine. So we have two different... | TITLE:
Creating and saving Visio 2010 stencils using C#
QUESTION:
We need to create a Visio 2010 stencil in code, using the.NET Freamework and C#. The idea is like this: We have our app, that is used by the app user, and then we have the workflow designer, which user Visio which is installed on another machine. So we ... | [
"visio"
] | 1 | 0 | 1,689 | 1 | 0 | 2011-06-01T12:18:28.617000 | 2011-06-02T04:48:20.767000 |
6,201,003 | 6,201,213 | How to redirect users to a custom form using short URLs? | I have a project where users would navigate to a provided shortURL, which would redirect everyone to a similar looking form with different business names. Currently I have a MySQL database that looks as follows: tbl_Codes - shortURL (string of 5 alphanumeric characters) - businessID (ID of business which matches the ID... | That link you posted is.... alright.... ish. There are better ways to do that though. However, in your case, I don't think this is what you need? Without looking at your code in-depth, don't use regex. Use your htaccess file and do a mod_rewrite to pass the "short url" in as a query parameter. Access this via the PHP s... | How to redirect users to a custom form using short URLs? I have a project where users would navigate to a provided shortURL, which would redirect everyone to a similar looking form with different business names. Currently I have a MySQL database that looks as follows: tbl_Codes - shortURL (string of 5 alphanumeric char... | TITLE:
How to redirect users to a custom form using short URLs?
QUESTION:
I have a project where users would navigate to a provided shortURL, which would redirect everyone to a similar looking form with different business names. Currently I have a MySQL database that looks as follows: tbl_Codes - shortURL (string of 5... | [
"php",
"mysql",
"redirect",
"url-rewriting",
"short-url"
] | 1 | 3 | 725 | 2 | 0 | 2011-06-01T12:18:54.703000 | 2011-06-01T12:33:52.153000 |
6,201,018 | 6,201,086 | how to remove visual studio PIN TAB icon (on tabs, obviously) | is there a way to REMOVE COMPLETELY the pin tab option in visual studio 2010 (how?), i keep clicking it by accident:( i want it GONE. i never use it and always click it by accident. thnx p.s. right clicking on the PIN icon does bring up some customize dialog, but was unable to remove it - couldn't recognize the option. | Scroll to the bottom of the Document Tab Well -> General page, click Advanced options..., then uncheck Show pin button in unpinned tabs | how to remove visual studio PIN TAB icon (on tabs, obviously) is there a way to REMOVE COMPLETELY the pin tab option in visual studio 2010 (how?), i keep clicking it by accident:( i want it GONE. i never use it and always click it by accident. thnx p.s. right clicking on the PIN icon does bring up some customize dialog... | TITLE:
how to remove visual studio PIN TAB icon (on tabs, obviously)
QUESTION:
is there a way to REMOVE COMPLETELY the pin tab option in visual studio 2010 (how?), i keep clicking it by accident:( i want it GONE. i never use it and always click it by accident. thnx p.s. right clicking on the PIN icon does bring up som... | [
"visual-studio",
"visual-studio-2010",
"user-interface",
"productivity-power-tools"
] | 30 | 18 | 6,590 | 3 | 0 | 2011-06-01T12:19:44.890000 | 2011-06-01T12:24:35.363000 |
6,201,024 | 6,201,229 | Visual studio vb.net intellisence auto create function () | In visual studio programming in Vb.Net you get a special autocomplete around functions. If you add a name in front of a statement the rest of the line is treated like function parameters. strInEditBy dsInfo.Tables(0).Rows(0).Item("plandesc").ToString()
strInEditBy ( dsInfo.Tables(0).Rows(0).Item("plandesc").ToString()... | You could turn off the Pretty Listing (reformatting) of code. MSDN: VB Specific, Basic, Text Editor, Options Dialog Box | Visual studio vb.net intellisence auto create function () In visual studio programming in Vb.Net you get a special autocomplete around functions. If you add a name in front of a statement the rest of the line is treated like function parameters. strInEditBy dsInfo.Tables(0).Rows(0).Item("plandesc").ToString()
strInEdi... | TITLE:
Visual studio vb.net intellisence auto create function ()
QUESTION:
In visual studio programming in Vb.Net you get a special autocomplete around functions. If you add a name in front of a statement the rest of the line is treated like function parameters. strInEditBy dsInfo.Tables(0).Rows(0).Item("plandesc").To... | [
"vb.net",
"autocomplete",
"intellisense"
] | 1 | 1 | 677 | 1 | 0 | 2011-06-01T12:20:09.447000 | 2011-06-01T12:34:53.233000 |
6,201,031 | 6,201,061 | How to terminate outer loop in nested loops? | What is the best way to terminate all nested loops in the example below. Once the if statement is true, I want to terminate the outer for statement (with I). In the other words I need the whole loop to stop. Is there better way than setting I to 10? for (int I = 0; I < 10; I++) { for (int A = 0; A < 10; A++) { for (int... | I would refactor this to a method, and just call return whenever I need to. You could also use goto, and I have used goto for this, but it gets frowned upon. Which is dumb; this scenario is why it exists in the language. void DoSomeStuff() { for (int I = 0; I < 10; I++) { for (int A = 0; A < 10; A++) { for (int B = 0; ... | How to terminate outer loop in nested loops? What is the best way to terminate all nested loops in the example below. Once the if statement is true, I want to terminate the outer for statement (with I). In the other words I need the whole loop to stop. Is there better way than setting I to 10? for (int I = 0; I < 10; I... | TITLE:
How to terminate outer loop in nested loops?
QUESTION:
What is the best way to terminate all nested loops in the example below. Once the if statement is true, I want to terminate the outer for statement (with I). In the other words I need the whole loop to stop. Is there better way than setting I to 10? for (in... | [
"c#",
"loops",
"nested-loops"
] | 14 | 32 | 2,841 | 14 | 0 | 2011-06-01T12:20:51.783000 | 2011-06-01T12:22:31.010000 |
6,201,050 | 6,201,096 | SQL Query help Join | I have a table called team I need to select a coach who also might be a player on the team.... The attributes for the table are (teamID, playerID, role) I'm able to select all coaches or all players but not sure how to select one which is both..... select * from isPlaying h where h.role= 'Coach'; Thanks | select playerID from isPlaying coach join isPlaying player on coach.playerID = player.playerID where coach.role = 'Coach' and player.role = 'Player' | SQL Query help Join I have a table called team I need to select a coach who also might be a player on the team.... The attributes for the table are (teamID, playerID, role) I'm able to select all coaches or all players but not sure how to select one which is both..... select * from isPlaying h where h.role= 'Coach'; Th... | TITLE:
SQL Query help Join
QUESTION:
I have a table called team I need to select a coach who also might be a player on the team.... The attributes for the table are (teamID, playerID, role) I'm able to select all coaches or all players but not sure how to select one which is both..... select * from isPlaying h where h... | [
"sql",
"join"
] | 0 | 1 | 85 | 4 | 0 | 2011-06-01T12:22:00.777000 | 2011-06-01T12:25:13.717000 |
6,201,075 | 6,201,240 | Comparing two images problem | I want to compare two images byte by byte. Both of them are 8-bit BMP images and are exactly 40000 bytes in size. The first image is generated in memory as an array of bytes, the second is read from a file into an Image object. I use MemoryStream instances for the comparison: byte[] generatedImage = new byte[40000]; //... | http://en.wikipedia.org/wiki/BMP_file_format#Bitmap_file_header Read 4 bytes at offset 10 to obtain the offset of the pixel data. Read 4 bytes at offset 2 to get the size of the entire thing including header. Subtract the former from the latter to get the size of the pixel data. | Comparing two images problem I want to compare two images byte by byte. Both of them are 8-bit BMP images and are exactly 40000 bytes in size. The first image is generated in memory as an array of bytes, the second is read from a file into an Image object. I use MemoryStream instances for the comparison: byte[] generat... | TITLE:
Comparing two images problem
QUESTION:
I want to compare two images byte by byte. Both of them are 8-bit BMP images and are exactly 40000 bytes in size. The first image is generated in memory as an array of bytes, the second is read from a file into an Image object. I use MemoryStream instances for the comparis... | [
"c#",
".net",
"image",
"image-processing"
] | 3 | 2 | 1,702 | 4 | 0 | 2011-06-01T12:23:52.173000 | 2011-06-01T12:35:39.987000 |
6,201,082 | 6,209,324 | Case insensitive filter query with Objectify + google appengine | Is there an easy way to do a case insensitive filter query with Objectify + google appengine (Java)? Essentially this is what I am trying to do except that I need the filter on email to be case insensitive. Objectify objectifyService = ObjectifyService.begin(); objectifyService.query(AppUser.class).filter("email", emai... | You need to store your email address in a normalized (lowercase or uppercase, for instance) form in the datastore, and query on that. If you also need the original unmodified email address, you should store both separately. | Case insensitive filter query with Objectify + google appengine Is there an easy way to do a case insensitive filter query with Objectify + google appengine (Java)? Essentially this is what I am trying to do except that I need the filter on email to be case insensitive. Objectify objectifyService = ObjectifyService.beg... | TITLE:
Case insensitive filter query with Objectify + google appengine
QUESTION:
Is there an easy way to do a case insensitive filter query with Objectify + google appengine (Java)? Essentially this is what I am trying to do except that I need the filter on email to be case insensitive. Objectify objectifyService = Ob... | [
"java",
"google-app-engine",
"case-insensitive",
"objectify"
] | 4 | 7 | 2,272 | 2 | 0 | 2011-06-01T12:24:14.280000 | 2011-06-02T00:50:05.077000 |
6,201,085 | 6,209,317 | Suggestions for implementing "inverse document frequency" on GAE? | I need to implement "inverse document frequency" in Google app engine. I'm looking for suggestions to improve efficiency. Now I take the basic routine as, when parsing a webpage I save each pair to datastore, like, for(String phrase: phrase_collection){ dataStore.put(phrase, domain); } when computing the IDF later I fe... | You're doing an individual get (and put) for each phrase. This is naturally going to be very slow, as you're doing a great many roundtrips to the datastore. Instead, you should use the variants of put and get that accept an iterable of entities or keys, and execute them all in a single transaction. You should also do t... | Suggestions for implementing "inverse document frequency" on GAE? I need to implement "inverse document frequency" in Google app engine. I'm looking for suggestions to improve efficiency. Now I take the basic routine as, when parsing a webpage I save each pair to datastore, like, for(String phrase: phrase_collection){ ... | TITLE:
Suggestions for implementing "inverse document frequency" on GAE?
QUESTION:
I need to implement "inverse document frequency" in Google app engine. I'm looking for suggestions to improve efficiency. Now I take the basic routine as, when parsing a webpage I save each pair to datastore, like, for(String phrase: ph... | [
"java",
"google-app-engine",
"tf-idf"
] | 0 | 1 | 508 | 2 | 0 | 2011-06-01T12:24:18.663000 | 2011-06-02T00:47:47.947000 |
6,201,094 | 6,201,479 | Exception Type: EXC_BAD_ACCESS (SIGBUS) | The Imagepair object is a member variable of some other class.. I want its members to be changed, every time I call the getImageURLs-function (requests a web page and parses its elements). The first time it works fine, but if I call the function a 2nd time on the same object, the application crashes and leaves me with ... | In requestImage: you initialize an UIImage but never release it. Either change return image to return [image autorelease] or rename the method to newRequestImage: so that it is clear that it returns a retained image. | Exception Type: EXC_BAD_ACCESS (SIGBUS) The Imagepair object is a member variable of some other class.. I want its members to be changed, every time I call the getImageURLs-function (requests a web page and parses its elements). The first time it works fine, but if I call the function a 2nd time on the same object, the... | TITLE:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
QUESTION:
The Imagepair object is a member variable of some other class.. I want its members to be changed, every time I call the getImageURLs-function (requests a web page and parses its elements). The first time it works fine, but if I call the function a 2nd time on th... | [
"iphone",
"objective-c",
"memory-management",
"exc-bad-access"
] | 0 | 3 | 1,290 | 1 | 0 | 2011-06-01T12:25:06.277000 | 2011-06-01T12:55:59.253000 |
6,201,107 | 6,201,145 | Run some DDL sql stored in couple of files | I have some files with some sql inside (mostly DDL) and I need just run them and see if there were any errors. What would be the best way to do this? I'm using oracle 11. | start sqlplus and run @ / You could also use something like sql developer, just open the files in that, select the server you want to run it on and hit F5 or press the "run script" button | Run some DDL sql stored in couple of files I have some files with some sql inside (mostly DDL) and I need just run them and see if there were any errors. What would be the best way to do this? I'm using oracle 11. | TITLE:
Run some DDL sql stored in couple of files
QUESTION:
I have some files with some sql inside (mostly DDL) and I need just run them and see if there were any errors. What would be the best way to do this? I'm using oracle 11.
ANSWER:
start sqlplus and run @ / You could also use something like sql developer, just... | [
"oracle"
] | 1 | 4 | 1,799 | 2 | 0 | 2011-06-01T12:26:04.013000 | 2011-06-01T12:29:01.890000 |
6,201,121 | 6,201,420 | Is it a bad idea to write the Dispose/Close method to be asynchronous? | Instead of doing the cleanup on the same thread (or launching a background thread and blocking till it completes) start the cleanup on a "background" (IsBackground = false, so it doesn't get terminated prematurely) thread and return immediately. When is this a bad idea and how bad? Is this ever a good idea? | Replacing the Dispose() from the IDisposable with an asynchronous cleanup violates the Liskov Subsitution Principle as one would expect the resources to be available again immediately after the call. I suppose this is some optimization needed because of frequent allocation/deallocation, which would mean that in the end... | Is it a bad idea to write the Dispose/Close method to be asynchronous? Instead of doing the cleanup on the same thread (or launching a background thread and blocking till it completes) start the cleanup on a "background" (IsBackground = false, so it doesn't get terminated prematurely) thread and return immediately. Whe... | TITLE:
Is it a bad idea to write the Dispose/Close method to be asynchronous?
QUESTION:
Instead of doing the cleanup on the same thread (or launching a background thread and blocking till it completes) start the cleanup on a "background" (IsBackground = false, so it doesn't get terminated prematurely) thread and retur... | [
".net",
"asynchronous",
"dispose"
] | 10 | 4 | 198 | 4 | 0 | 2011-06-01T12:27:19.193000 | 2011-06-01T12:51:32.893000 |
6,201,122 | 6,203,449 | 'telling' a specific application by a specific full path using Applescript | I am looking to tell application "xyz", but by specifying a full path to the application. This is because there may be various versions of the app on the system in different places, but with the same name. If this possible? | Have you tried it? It works with either a posix style path or mac style path, so what's the issue? It couldn't be easier. set posixCalculatorPath to "/Applications/Calculator.app" set macCalculatorPath to (path to applications folder as text) & "Calculator.app"
tell application posixCalculatorPath to activate
delay 2... | 'telling' a specific application by a specific full path using Applescript I am looking to tell application "xyz", but by specifying a full path to the application. This is because there may be various versions of the app on the system in different places, but with the same name. If this possible? | TITLE:
'telling' a specific application by a specific full path using Applescript
QUESTION:
I am looking to tell application "xyz", but by specifying a full path to the application. This is because there may be various versions of the app on the system in different places, but with the same name. If this possible?
AN... | [
"applescript",
"tell"
] | 18 | 19 | 9,827 | 2 | 0 | 2011-06-01T12:27:21.113000 | 2011-06-01T15:12:44.327000 |
6,201,125 | 6,201,290 | How to get an open generic type from a string | I have a Type[] array and I want to get the Func type where T1, T2 etc... correspond to the types in the array. The array is not fixed in size but assume a type is available in the runtime (16 in.NET 4, 4 in.NET 3.5). In.NET 4, I can do this and it works: Type GetFuncType(Type typeRet, Type[] types) { return Type.GetTy... | The preferred way of doing this is to use Expression.GetFuncType(Type[]) and Expression.GetActionType(Type[]). In the case of func, the last Type is the return, so: Array.Resize(ref types, (types == null? 0: types.Length) + 1); types[types.Length - 1] = typeRet; return Expression.GetFuncType(types); | How to get an open generic type from a string I have a Type[] array and I want to get the Func type where T1, T2 etc... correspond to the types in the array. The array is not fixed in size but assume a type is available in the runtime (16 in.NET 4, 4 in.NET 3.5). In.NET 4, I can do this and it works: Type GetFuncType(T... | TITLE:
How to get an open generic type from a string
QUESTION:
I have a Type[] array and I want to get the Func type where T1, T2 etc... correspond to the types in the array. The array is not fixed in size but assume a type is available in the runtime (16 in.NET 4, 4 in.NET 3.5). In.NET 4, I can do this and it works: ... | [
"c#",
"generics",
"reflection"
] | 3 | 4 | 435 | 2 | 0 | 2011-06-01T12:27:36.373000 | 2011-06-01T12:40:29.903000 |
6,201,133 | 6,201,214 | Convert int value in Currency in Word Format in asp.net using C#? | if user can enter value 1234 then output will be One thousand two hundred thirty four how can i do this? | this might help you http://www.codeproject.com/KB/miscctrl/NumToWord.aspx | Convert int value in Currency in Word Format in asp.net using C#? if user can enter value 1234 then output will be One thousand two hundred thirty four how can i do this? | TITLE:
Convert int value in Currency in Word Format in asp.net using C#?
QUESTION:
if user can enter value 1234 then output will be One thousand two hundred thirty four how can i do this?
ANSWER:
this might help you http://www.codeproject.com/KB/miscctrl/NumToWord.aspx | [
"c#",
"asp.net"
] | 5 | 1 | 1,347 | 1 | 0 | 2011-06-01T12:28:11.393000 | 2011-06-01T12:33:55.980000 |
6,201,134 | 6,201,177 | callback function return return($var & 1)? | I have read the PHP Manuel about array_filter 1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); $array2 = array(6, 7, 8, 9, 10, 11, 12);
echo "Odd:\n"; print_r(array_filter($array1, "odd")); echo "Even:\n"; print_r(array_filter($array2, "even"));?> Even I see the result here: Odd: Array ( [a] => 1 [c] => 3 [e] => 5 ) Even: Array ( ... | $var & 1 - is bitwise AND it checks if $var is ODD value 0 & 0 = 0, 0 & 1 = 0, 1 & 0 = 0, 1 & 1 = 1 so, first callback function returns TRUE only if $var is ODD, and second - vise versa (! - is logical NOT). | callback function return return($var & 1)? I have read the PHP Manuel about array_filter 1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); $array2 = array(6, 7, 8, 9, 10, 11, 12);
echo "Odd:\n"; print_r(array_filter($array1, "odd")); echo "Even:\n"; print_r(array_filter($array2, "even"));?> Even I see the result here: Odd: Array ( ... | TITLE:
callback function return return($var & 1)?
QUESTION:
I have read the PHP Manuel about array_filter 1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); $array2 = array(6, 7, 8, 9, 10, 11, 12);
echo "Odd:\n"; print_r(array_filter($array1, "odd")); echo "Even:\n"; print_r(array_filter($array2, "even"));?> Even I see the result h... | [
"php",
"bitwise-operators"
] | 3 | 3 | 3,095 | 8 | 0 | 2011-06-01T12:28:12.500000 | 2011-06-01T12:31:22.007000 |
6,201,151 | 6,201,196 | Is there any way to reuse/compact CSS to make it smaller and cleaner? | I have the following styles in an external CSS file..callButton { width: 100px; height: 25px; float: right; /* other styles here */ background-img: url('images/callButton.png'); }.otherButton { width: 100px; height: 25px; float: right; /* same styles from callButton here */ background-img: url('images/otherButton.png')... | You're going to want something like this, methinks:.button { width: 100px; height: 25px; float: right; }.callButton { background-img: url('images/callButton.png'); }.otherButton { background-img: url('images/otherButton.png'); } Then, change your HTML to be: | Is there any way to reuse/compact CSS to make it smaller and cleaner? I have the following styles in an external CSS file..callButton { width: 100px; height: 25px; float: right; /* other styles here */ background-img: url('images/callButton.png'); }.otherButton { width: 100px; height: 25px; float: right; /* same styles... | TITLE:
Is there any way to reuse/compact CSS to make it smaller and cleaner?
QUESTION:
I have the following styles in an external CSS file..callButton { width: 100px; height: 25px; float: right; /* other styles here */ background-img: url('images/callButton.png'); }.otherButton { width: 100px; height: 25px; float: rig... | [
"css",
"optimization",
"css-selectors"
] | 2 | 6 | 154 | 5 | 0 | 2011-06-01T12:29:35.027000 | 2011-06-01T12:32:55.353000 |
6,201,157 | 6,201,244 | Textfile search from GUI | Ok so i have made a search function using scanner in console, but i would now like to create a search function from my GUI. When text is entered into a JTextField and JButton is clicked i would like a method which would search my text file line by line until it finds the the searched for criteria and prints it into a J... | You already have the search method, so add an action listener to your button, that will call your method, something like: myButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { String whatToSearch = myTextField.getText(); String result = yourSearchMethod(whatToSearch); // use th... | Textfile search from GUI Ok so i have made a search function using scanner in console, but i would now like to create a search function from my GUI. When text is entered into a JTextField and JButton is clicked i would like a method which would search my text file line by line until it finds the the searched for criter... | TITLE:
Textfile search from GUI
QUESTION:
Ok so i have made a search function using scanner in console, but i would now like to create a search function from my GUI. When text is entered into a JTextField and JButton is clicked i would like a method which would search my text file line by line until it finds the the s... | [
"java",
"swing",
"search",
"text-files"
] | 2 | 5 | 5,575 | 2 | 0 | 2011-06-01T12:29:54.673000 | 2011-06-01T12:35:48.517000 |
6,201,174 | 6,204,314 | htaccess internal server error | When I goto http://example.com/not-here I get an internal server error instead of an 404, here is my htaccess file (it removes the extension so abc.php can be accessed as example.com/abc instead of example.com/abc.php): Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}!-f RewriteCon... | I should have in the.htaccess the following: Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING}!rewrited RewriteCond %{REQUEST_FILENAME}!-f RewriteCond %{REQUEST_FILENAME}!-d RewriteRule ^(.+)$ /$1.php?rewrited=1 [L,QSA]
DirectoryIndex login.php index.php
ErrorDocument 403 /error.php?t... | htaccess internal server error When I goto http://example.com/not-here I get an internal server error instead of an 404, here is my htaccess file (it removes the extension so abc.php can be accessed as example.com/abc instead of example.com/abc.php): Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{... | TITLE:
htaccess internal server error
QUESTION:
When I goto http://example.com/not-here I get an internal server error instead of an 404, here is my htaccess file (it removes the extension so abc.php can be accessed as example.com/abc instead of example.com/abc.php): Options +FollowSymlinks RewriteEngine On RewriteBas... | [
".htaccess",
"mod-rewrite",
"internal-server-error"
] | 2 | 3 | 4,194 | 3 | 0 | 2011-06-01T12:31:05.790000 | 2011-06-01T16:12:42.253000 |
6,201,190 | 6,204,271 | Play Framework await() causes UnexpectedException | I upgraded to Play 1.2.1 this morning so I could make use of their new asynchronous programming with HTTP features. When I use the example below, from the Play documentation ( * I am using a different method name * ), I receive an UnexpectedException error. public static void loopWithoutBlocking() { for(int i=0; i<=10;... | Just in case anybody encounters this same issue (it seems to have been reported by others as well) I thought I had best summarise how I resolved this issue (although it might not be viewed as an 'answer'): As pointed out by @Codemwnci and Julien Tournay @ Play-framework google group. The code included within the questi... | Play Framework await() causes UnexpectedException I upgraded to Play 1.2.1 this morning so I could make use of their new asynchronous programming with HTTP features. When I use the example below, from the Play documentation ( * I am using a different method name * ), I receive an UnexpectedException error. public stati... | TITLE:
Play Framework await() causes UnexpectedException
QUESTION:
I upgraded to Play 1.2.1 this morning so I could make use of their new asynchronous programming with HTTP features. When I use the example below, from the Play documentation ( * I am using a different method name * ), I receive an UnexpectedException e... | [
"java",
"playframework"
] | 4 | 2 | 1,595 | 3 | 0 | 2011-06-01T12:32:32.927000 | 2011-06-01T16:09:00.003000 |
6,201,191 | 6,201,411 | how to call a method from another class method which consists of IBAction method | Actually i am testing a sample application in iPhone...where in user interface if i press a button "hello" message should display on text field...such a way that when button pressed it should call a method present in another class i.e, from class2 and display a message on UI so Please help me.... the following code is ... | Hi are you aware of writing this class1ViewController *class = [[class1ViewController alloc]init]; I think it should be:- -(IBAction)sayhello:(id)sender
{ class2 *class = [[class2 alloc]init]; NSString *string= [class sayhello]; [class release]; label.text=string; } dont forget to import class2 in class1 in class2 sim... | how to call a method from another class method which consists of IBAction method Actually i am testing a sample application in iPhone...where in user interface if i press a button "hello" message should display on text field...such a way that when button pressed it should call a method present in another class i.e, fro... | TITLE:
how to call a method from another class method which consists of IBAction method
QUESTION:
Actually i am testing a sample application in iPhone...where in user interface if i press a button "hello" message should display on text field...such a way that when button pressed it should call a method present in anot... | [
"iphone",
"objective-c",
"xcode"
] | 3 | 2 | 3,207 | 4 | 0 | 2011-06-01T12:32:38.427000 | 2011-06-01T12:50:42.583000 |
6,201,197 | 6,201,233 | run a Java program in specific time | i need help to run my Java program on the server at a specific time like 2 pm (to index the new files). Someone told me that Java has some thing called jobs but I don't know how to work with that. I tried this: boolean cond=true; while(cond){ @SuppressWarnings("deprecation") int heur = new Date().getHours(); @SuppressW... | Theres a API called Quartz, It's where your program can schedule "Jobs" and it will run it at that time. Until I can give an example, try this link. Edit: First you have to create a class that implements org.quartz.Job. When you implement that you will have to implement the method execute(JobExecutionContext jobExecuti... | run a Java program in specific time i need help to run my Java program on the server at a specific time like 2 pm (to index the new files). Someone told me that Java has some thing called jobs but I don't know how to work with that. I tried this: boolean cond=true; while(cond){ @SuppressWarnings("deprecation") int heur... | TITLE:
run a Java program in specific time
QUESTION:
i need help to run my Java program on the server at a specific time like 2 pm (to index the new files). Someone told me that Java has some thing called jobs but I don't know how to work with that. I tried this: boolean cond=true; while(cond){ @SuppressWarnings("depr... | [
"java",
"time",
"runtime",
"timer-jobs"
] | 0 | 3 | 12,047 | 2 | 0 | 2011-06-01T12:32:57.083000 | 2011-06-01T12:35:14.227000 |
6,201,199 | 6,201,616 | Forgiving JavaScript validation for US phone numbers and allowing extensions (jquery allowed) | Possible Duplicate: A comprehensive regex for phone number validation Perhaps a forgiving JavaScript solution would only make sure that only valid characters are allowed. (digits, dashes, periods, letters for extension. Although loop seems best, is there a simple regular expression that checks for valid characters? | A regular expression is just javascript, not jQuery. What is the format you seek? How many letters are allowed in the extension? I could look it up, but it would help greatly if you would do that. It seems numbers from 7 to 11 digits are allowed. It is nice to allow users to enter phone numbers in block of 3 or 4 chara... | Forgiving JavaScript validation for US phone numbers and allowing extensions (jquery allowed) Possible Duplicate: A comprehensive regex for phone number validation Perhaps a forgiving JavaScript solution would only make sure that only valid characters are allowed. (digits, dashes, periods, letters for extension. Althou... | TITLE:
Forgiving JavaScript validation for US phone numbers and allowing extensions (jquery allowed)
QUESTION:
Possible Duplicate: A comprehensive regex for phone number validation Perhaps a forgiving JavaScript solution would only make sure that only valid characters are allowed. (digits, dashes, periods, letters for... | [
"javascript",
"jquery",
"regex"
] | 0 | 0 | 1,192 | 2 | 0 | 2011-06-01T12:33:09.223000 | 2011-06-01T13:06:10.717000 |
6,201,222 | 6,204,494 | when to use Gen_Fsm and when to use Gen_Server? | After checking out Gen_Fsm and Gen_Server documents, I found that, more or less, they act as similar behavior. In my opinion, if there is one loop function for sending broadcast or listening tcp sock, it is better to use Gen_Fsm, or else to use gen_server. i want to know whether it is right? | You have seen right that gen_server and gen_fsm are very similar in functionality. However in most programs there is much more gen_server than gen_fsm usage. In my opinion gen_fsm is only useful when the usage 100% fits the gen_fsm model. So there has to be a simple and clear finite state machine that fits to your prob... | when to use Gen_Fsm and when to use Gen_Server? After checking out Gen_Fsm and Gen_Server documents, I found that, more or less, they act as similar behavior. In my opinion, if there is one loop function for sending broadcast or listening tcp sock, it is better to use Gen_Fsm, or else to use gen_server. i want to know ... | TITLE:
when to use Gen_Fsm and when to use Gen_Server?
QUESTION:
After checking out Gen_Fsm and Gen_Server documents, I found that, more or less, they act as similar behavior. In my opinion, if there is one loop function for sending broadcast or listening tcp sock, it is better to use Gen_Fsm, or else to use gen_serve... | [
"erlang",
"gen-server",
"gen-fsm"
] | 10 | 9 | 2,738 | 1 | 0 | 2011-06-01T12:34:39.317000 | 2011-06-01T16:24:28.487000 |
6,201,227 | 6,201,367 | queries in entity framework | in the above query it is giving error i want to fetch top record and store in some string variable of columns of query like string s=zipcd.zipcode var zipcd = (from u in db.ZipCodes1 where u.CityName == temparray[0].Trim() && u.StateAbbr == temparray[1].Trim() && u.CityType == "D" select new Viewsearch { Zipcode = u.ZI... | var city = temparray[0].Trim(); var stat = temparray[1].Trim(); var zipcd = db.ZipCodes1.Where(u => u.CityName == city && u.StateAbbr == stat && u.CityType == "D").Select(new Viewsearch { Zipcode = u.ZIPCode, u.CityName, stateabbr = u.StateAbbr }).First(); locationarray = zipcd.Zipcode + " " + zipcd.CityName + ", " + z... | queries in entity framework in the above query it is giving error i want to fetch top record and store in some string variable of columns of query like string s=zipcd.zipcode var zipcd = (from u in db.ZipCodes1 where u.CityName == temparray[0].Trim() && u.StateAbbr == temparray[1].Trim() && u.CityType == "D" select new... | TITLE:
queries in entity framework
QUESTION:
in the above query it is giving error i want to fetch top record and store in some string variable of columns of query like string s=zipcd.zipcode var zipcd = (from u in db.ZipCodes1 where u.CityName == temparray[0].Trim() && u.StateAbbr == temparray[1].Trim() && u.CityType... | [
"entity-framework"
] | 0 | 0 | 66 | 1 | 0 | 2011-06-01T12:34:46.663000 | 2011-06-01T12:47:11.320000 |
6,201,228 | 6,201,898 | Calling ServiceLocator.SetLocatorProvider for a new Castle Windsor container causes IServiceProvider conflict in a VSIX package | I have a basic vsix package project in VS 2010 and have a simple ServiceLocator deriving from Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase that I am registering in the Initialize override of the class deriving from Package: private WindsorContainer container;
protected override void Initialize() { contai... | What a great find! Just as you guessed VSCommands uses ServiceLocator and as you discovered doing so may cause some problems for you and me since other packages might use it just as well. There is one simple workaround I can think of and I'll probably use it in the next version of VSCommands to avoid such conflicts. Si... | Calling ServiceLocator.SetLocatorProvider for a new Castle Windsor container causes IServiceProvider conflict in a VSIX package I have a basic vsix package project in VS 2010 and have a simple ServiceLocator deriving from Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase that I am registering in the Initialize... | TITLE:
Calling ServiceLocator.SetLocatorProvider for a new Castle Windsor container causes IServiceProvider conflict in a VSIX package
QUESTION:
I have a basic vsix package project in VS 2010 and have a simple ServiceLocator deriving from Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase that I am registering... | [
"visual-studio-2010",
"castle-windsor",
"enterprise-library",
"vsix"
] | 2 | 0 | 2,563 | 1 | 0 | 2011-06-01T12:34:52.743000 | 2011-06-01T13:26:21.627000 |
6,201,230 | 6,201,317 | Workaround for validation and checking if the form has been actually posted | Here is my typical form $errors = array();
if ($this->request->post('submit')) { // <----- I don't like this line $post = Validation::factory($this->request->post()) ->rule('email', 'not_empty') ->rule('email', 'email') ->rule('password', 'not_empty');
if ($post->check()) { // ok, do something }
$errors = $post->err... | This is how I'd do it, except for the condition: if (Request::POST === $this->request->method()) would be more suitable. There is no way to "skip" the POST check without having consequences (like the errors in your case). We had a discussion on this topic, 5.3 will probably add more features. Something like: $this->pos... | Workaround for validation and checking if the form has been actually posted Here is my typical form $errors = array();
if ($this->request->post('submit')) { // <----- I don't like this line $post = Validation::factory($this->request->post()) ->rule('email', 'not_empty') ->rule('email', 'email') ->rule('password', 'not... | TITLE:
Workaround for validation and checking if the form has been actually posted
QUESTION:
Here is my typical form $errors = array();
if ($this->request->post('submit')) { // <----- I don't like this line $post = Validation::factory($this->request->post()) ->rule('email', 'not_empty') ->rule('email', 'email') ->rul... | [
"php",
"kohana"
] | 0 | 3 | 279 | 2 | 0 | 2011-06-01T12:34:58.747000 | 2011-06-01T12:42:50.970000 |
6,201,231 | 6,202,936 | QTP click on winbutton with failure | I'm working on QTP with web-adding. There are some buttons in type "Winbutton" on the page. The "click" action on most of the buttons works very well except one. In fact this winbutton is a checkbox. But I don't know why it is recognized as Winbutton. But when click on it, it just gets focused but not really clicked. T... | You don't usually get WinButton in web pages. Is the QTP hierarchy Browser.Page.WinButton? If so the control is probably really a.NET or ActiveX control. Make sure that you have the.NET and ActiveX addins loaded when you launch QTP. Do you have a public site that you can point to in order to see this problem? Edit: As ... | QTP click on winbutton with failure I'm working on QTP with web-adding. There are some buttons in type "Winbutton" on the page. The "click" action on most of the buttons works very well except one. In fact this winbutton is a checkbox. But I don't know why it is recognized as Winbutton. But when click on it, it just ge... | TITLE:
QTP click on winbutton with failure
QUESTION:
I'm working on QTP with web-adding. There are some buttons in type "Winbutton" on the page. The "click" action on most of the buttons works very well except one. In fact this winbutton is a checkbox. But I don't know why it is recognized as Winbutton. But when click... | [
"click",
"qtp"
] | 1 | 2 | 923 | 1 | 0 | 2011-06-01T12:35:05.103000 | 2011-06-01T14:36:55.313000 |
6,201,242 | 6,201,266 | is there a way to force event to fire only once on given element (per element, not whole document) when using live()? | $('div.myclass').live('click',function() { alert('i should respond only once'); }); I know that there is a one() function with jquery but i can't figure how to integrate this with the code above. | $('div.myclass').live('click',function() { if($(this).attr('clicked')!= 'yes') { alert('i should respond only once'); $(this).attr('clicked', 'yes'); }
}); | is there a way to force event to fire only once on given element (per element, not whole document) when using live()? $('div.myclass').live('click',function() { alert('i should respond only once'); }); I know that there is a one() function with jquery but i can't figure how to integrate this with the code above. | TITLE:
is there a way to force event to fire only once on given element (per element, not whole document) when using live()?
QUESTION:
$('div.myclass').live('click',function() { alert('i should respond only once'); }); I know that there is a one() function with jquery but i can't figure how to integrate this with the ... | [
"javascript",
"jquery"
] | 0 | 5 | 251 | 2 | 0 | 2011-06-01T12:35:45.663000 | 2011-06-01T12:38:11.967000 |
6,201,249 | 6,201,320 | WCF: How add me custom ServiceBehavior into WCF configuration | Hi I have my own ServiceBehavior: public class StructureMapServiceBehavior: IServiceBehavior { public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { foreach (ChannelDispatcherBase cdb in serviceHostBase.ChannelDispatchers) { ChannelDispatcher cd = cdb as ChannelDisp... | Create a class that inherit from BehaviorExtensionElement: public class StructureMapServiceBehaviorElement: BehaviorExtensionElement { public override Type BehaviorType { get { return typeof(StructureMapServiceBehavior ); } }
protected override object CreateBehavior() { return new StructureMapServiceBehavior (); } } T... | WCF: How add me custom ServiceBehavior into WCF configuration Hi I have my own ServiceBehavior: public class StructureMapServiceBehavior: IServiceBehavior { public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { foreach (ChannelDispatcherBase cdb in serviceHostBase.C... | TITLE:
WCF: How add me custom ServiceBehavior into WCF configuration
QUESTION:
Hi I have my own ServiceBehavior: public class StructureMapServiceBehavior: IServiceBehavior { public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { foreach (ChannelDispatcherBase cdb in... | [
"wcf",
"app-config"
] | 2 | 3 | 5,292 | 2 | 0 | 2011-06-01T12:36:31.580000 | 2011-06-01T12:43:34.527000 |
6,201,253 | 6,201,322 | How to get the last record per group in SQL | I am facing a rather interesting problem. I have a table with the following structure: CREATE TABLE [dbo].[Event] ( Id int IDENTITY(1,1) NOT NULL, ApplicationId nvarchar(32) NOT NULL, Name nvarchar(128) NOT NULL, Description nvarchar(256) NULL, Date nvarchar(16) NOT NULL, Time nvarchar(16) NOT NULL, EventType nvarchar(... | You can use a ranking function and a common table expression. WITH e AS ( SELECT *, ROW_NUMBER() OVER ( PARTITION BY ApplicationId ORDER BY CONVERT(datetime, [Date], 101) DESC, [Time] DESC ) AS Recency FROM [Event] ) SELECT * FROM e WHERE Recency = 1 | How to get the last record per group in SQL I am facing a rather interesting problem. I have a table with the following structure: CREATE TABLE [dbo].[Event] ( Id int IDENTITY(1,1) NOT NULL, ApplicationId nvarchar(32) NOT NULL, Name nvarchar(128) NOT NULL, Description nvarchar(256) NULL, Date nvarchar(16) NOT NULL, Tim... | TITLE:
How to get the last record per group in SQL
QUESTION:
I am facing a rather interesting problem. I have a table with the following structure: CREATE TABLE [dbo].[Event] ( Id int IDENTITY(1,1) NOT NULL, ApplicationId nvarchar(32) NOT NULL, Name nvarchar(128) NOT NULL, Description nvarchar(256) NULL, Date nvarchar... | [
"sql-server-2008",
"t-sql",
"sql-server-2005",
"greatest-n-per-group"
] | 33 | 52 | 59,455 | 10 | 0 | 2011-06-01T12:36:55.780000 | 2011-06-01T12:43:52.820000 |
6,201,256 | 6,201,372 | why would an application use an image servlet | I have seen some applications that use a servlet to serve the images. What would be the purpose of this? | Could be because of following reasons URL processing required to fetch the image. e.x, fetching the image based on username The image is stored in database Some image processing is required like rotate, zoom etc | why would an application use an image servlet I have seen some applications that use a servlet to serve the images. What would be the purpose of this? | TITLE:
why would an application use an image servlet
QUESTION:
I have seen some applications that use a servlet to serve the images. What would be the purpose of this?
ANSWER:
Could be because of following reasons URL processing required to fetch the image. e.x, fetching the image based on username The image is store... | [
"java",
"image",
"servlets"
] | 0 | 3 | 231 | 4 | 0 | 2011-06-01T12:37:07.793000 | 2011-06-01T12:47:47.273000 |
6,201,257 | 6,201,510 | Making method in another class call an event in calling class when it's done? | I need to start a download of some html so I call void GetHTML in another class. When it's done I want to pass along what Event it should raise in the calling class. How could I do this? So it would look something like this: public class Stuff { public void GetHTML(string url, event to raise here) { //Do stuff then rai... | Event Subscription and Notification public class Stuff { // Public Event to allow other classes to subscribe to. public event EventHandler GetHtmlDone = delegate { };
public void GetHTML(string url) { //Do stuff
// Raise Event, which triggers all method subscribed to it! this.GetHtmlDone(this, new EventArgs()); } }
... | Making method in another class call an event in calling class when it's done? I need to start a download of some html so I call void GetHTML in another class. When it's done I want to pass along what Event it should raise in the calling class. How could I do this? So it would look something like this: public class Stuf... | TITLE:
Making method in another class call an event in calling class when it's done?
QUESTION:
I need to start a download of some html so I call void GetHTML in another class. When it's done I want to pass along what Event it should raise in the calling class. How could I do this? So it would look something like this:... | [
"c#",
"events",
"windows-phone-7",
"delegates"
] | 2 | 12 | 17,125 | 5 | 0 | 2011-06-01T12:37:21.973000 | 2011-06-01T12:58:18.103000 |
6,201,272 | 6,201,394 | How to avoid MATLAB crash when opening too many figures? | Sometimes I start a MATLAB script and realize too late that it is going to output way too many figures. Eventually I get an Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space which can easily be reproduced on my machine using for i=1:inf figure; end I get to around ~90 figures before it ... | In general, I'd suggest setting maximum Java Heap Memory to about 25% of the available RAM, which allows you to open lots of figures (but not infinite numbers). If you cannot do this in the preferences (e.g. b/c you have a Mac like mine), this solution will help - it overrides the preference settings. The linked soluti... | How to avoid MATLAB crash when opening too many figures? Sometimes I start a MATLAB script and realize too late that it is going to output way too many figures. Eventually I get an Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space which can easily be reproduced on my machine using for i... | TITLE:
How to avoid MATLAB crash when opening too many figures?
QUESTION:
Sometimes I start a MATLAB script and realize too late that it is going to output way too many figures. Eventually I get an Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space which can easily be reproduced on my m... | [
"java",
"matlab",
"heap-memory",
"jvm-crash"
] | 15 | 6 | 9,614 | 3 | 0 | 2011-06-01T12:38:46.883000 | 2011-06-01T12:49:03.863000 |
6,201,273 | 6,201,478 | How to get date from calendar:datePicker and make an ajax call? | I've added plugin calendar http://www.grails.org/plugin/calendar to my web app. I don't know how to handle change value event, get date and call ajax request to refresh some other part of the page that depends on this date. Where should I call controller/action? | Attach an onchange listener to the element(s) that the calendar plugin stores the date/time in. You can use the remoteFunction tag to generate the JavaScript function that makes the AJAX call. For example, if the time is stored in an element with id foo, the following will invoke the myAction action of FooController wi... | How to get date from calendar:datePicker and make an ajax call? I've added plugin calendar http://www.grails.org/plugin/calendar to my web app. I don't know how to handle change value event, get date and call ajax request to refresh some other part of the page that depends on this date. Where should I call controller/a... | TITLE:
How to get date from calendar:datePicker and make an ajax call?
QUESTION:
I've added plugin calendar http://www.grails.org/plugin/calendar to my web app. I don't know how to handle change value event, get date and call ajax request to refresh some other part of the page that depends on this date. Where should I... | [
"grails",
"calendar"
] | 0 | 2 | 1,119 | 1 | 0 | 2011-06-01T12:38:54.700000 | 2011-06-01T12:55:58.380000 |
6,201,278 | 6,201,757 | how to select all text in textarea on focus (in safari) | I can't work out why I can't get the the content of a textarea to be selected when the textarea receives focus. Please visit a live example here: http://jsfiddle.net/mikkelbreum/aSvst/1 Using jQuery, this is my code. (IN SAFARI) It makes the text selected in case of the click event, but not the focus event: $('textarea... | The simplest thing to do is to combine your existing code with a timer, since the focus event is generally too early in WebKit: jsFiddle example: http://jsfiddle.net/NWaav/2/ Code: $('textarea.automarkup').focus(function() { var $this = $(this);
$this.select();
window.setTimeout(function() { $this.select(); }, 1);
/... | how to select all text in textarea on focus (in safari) I can't work out why I can't get the the content of a textarea to be selected when the textarea receives focus. Please visit a live example here: http://jsfiddle.net/mikkelbreum/aSvst/1 Using jQuery, this is my code. (IN SAFARI) It makes the text selected in case ... | TITLE:
how to select all text in textarea on focus (in safari)
QUESTION:
I can't work out why I can't get the the content of a textarea to be selected when the textarea receives focus. Please visit a live example here: http://jsfiddle.net/mikkelbreum/aSvst/1 Using jQuery, this is my code. (IN SAFARI) It makes the text... | [
"javascript",
"jquery",
"select",
"focus"
] | 15 | 36 | 21,090 | 6 | 0 | 2011-06-01T12:39:04.260000 | 2011-06-01T13:17:45.523000 |
6,201,281 | 6,201,304 | How to add a safe guarded to release the resource that should have been released explicitly by the client code | The user is supposed to call Player.close() to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called as ... | Make the internal threads hold only weak references to these things. Perhaps consider learning about phantom references. | How to add a safe guarded to release the resource that should have been released explicitly by the client code The user is supposed to call Player.close() to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call i... | TITLE:
How to add a safe guarded to release the resource that should have been released explicitly by the client code
QUESTION:
The user is supposed to call Player.close() to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the use... | [
"java",
"garbage-collection",
"finalizer"
] | 0 | 2 | 70 | 2 | 0 | 2011-06-01T12:39:28.880000 | 2011-06-01T12:41:39.300000 |
6,201,282 | 6,201,423 | jquery find and replace | Here is my string. here is my text {{ and some more }} I want to replace all {{ with < pre > tags and }} with < /pre > tags. so the string would output like this. here is my text and some more i need to do this using jquery. i have got so far. var textarea=$('#content').text(); $(".addesc1").text(textarea).html().repla... | You could do some thing simple like: var textarea=$('#content'); textarea.html(textarea.html().replace("{{"," ")).html(textarea.html().replace("}}"," ")); as illustrated here: http://jsfiddle.net/MarkSchultheiss/psSwE/ This says "Take my jQuery object "textarea" and replace the "{{" and then take that result set and re... | jquery find and replace Here is my string. here is my text {{ and some more }} I want to replace all {{ with < pre > tags and }} with < /pre > tags. so the string would output like this. here is my text and some more i need to do this using jquery. i have got so far. var textarea=$('#content').text(); $(".addesc1").tex... | TITLE:
jquery find and replace
QUESTION:
Here is my string. here is my text {{ and some more }} I want to replace all {{ with < pre > tags and }} with < /pre > tags. so the string would output like this. here is my text and some more i need to do this using jquery. i have got so far. var textarea=$('#content').text();... | [
"jquery",
"replace",
"preg-replace"
] | 0 | 2 | 1,337 | 3 | 0 | 2011-06-01T12:39:36.150000 | 2011-06-01T12:51:51.970000 |
6,201,289 | 6,201,379 | Can WM_HOTKEY be used to simulate hotkey events? | In my program(C++, WinAPI), I wanted to simulate pressing some existing hotkeys set in other running programs. I know there is a SendInput function which simulates the keyboard input, but it seemed too much work as it needs to create a lot of structures for the keys. I was trying use SendMessage or PostMessage with HWN... | SendInput is the best answer, honestly. This is because in the message loop your calls to the traslateaccellerator will look at the message, and in that message theres a bit flag on LPARAM, indicating what other keys are pressed with that key. You dont want to have to fill out that bit flag yourself, but..... just in c... | Can WM_HOTKEY be used to simulate hotkey events? In my program(C++, WinAPI), I wanted to simulate pressing some existing hotkeys set in other running programs. I know there is a SendInput function which simulates the keyboard input, but it seemed too much work as it needs to create a lot of structures for the keys. I w... | TITLE:
Can WM_HOTKEY be used to simulate hotkey events?
QUESTION:
In my program(C++, WinAPI), I wanted to simulate pressing some existing hotkeys set in other running programs. I know there is a SendInput function which simulates the keyboard input, but it seemed too much work as it needs to create a lot of structures... | [
"c++",
"winapi"
] | 1 | 1 | 2,568 | 2 | 0 | 2011-06-01T12:40:23.070000 | 2011-06-01T12:48:13.827000 |
6,201,302 | 6,201,693 | How to have automated headers for python files | A proper header format in python is described here. Using either VIM or a shell script, I would like to have the usual metadata (like __author__, __authors__, __contact__, __copyright__, __license__, __deprecated__, __date__ and __version__ ) added to the file header. SVN keywords would also be nice. Adding it to new f... | I highly recommend the snipMate plugin. You can easily add new snips per file type, and they're triggered by just typing a keyword and hitting tab, so for example you could just hit header and all the fields would be added, and you can easily tab through any that require being filled out on a per-file basis. There is e... | How to have automated headers for python files A proper header format in python is described here. Using either VIM or a shell script, I would like to have the usual metadata (like __author__, __authors__, __contact__, __copyright__, __license__, __deprecated__, __date__ and __version__ ) added to the file header. SVN ... | TITLE:
How to have automated headers for python files
QUESTION:
A proper header format in python is described here. Using either VIM or a shell script, I would like to have the usual metadata (like __author__, __authors__, __contact__, __copyright__, __license__, __deprecated__, __date__ and __version__ ) added to the... | [
"python",
"vim"
] | 5 | 6 | 4,215 | 3 | 0 | 2011-06-01T12:41:36.780000 | 2011-06-01T13:11:57.440000 |
6,201,303 | 6,201,350 | How to pass string args to method in obj-c | My method is look like this + (NSString *)textByPrefLang:(NSString*)Col:(NSString*)prefLang:(NSString*)tag { return something; } How do I call that from another class? | in.h file: + (NSString *)textByPrefLang:(NSString*)Col withPrefLang:(NSString*)prefLang withTag:(NSString*)tag; In Implementation.m Class + (NSString *)textByPrefLang:(NSString*)Col withPrefLang:(NSString*)prefLang withTag:(NSString*)tag { return something; } When you call. NSString* message = [MyClass textByPrefLang:@... | How to pass string args to method in obj-c My method is look like this + (NSString *)textByPrefLang:(NSString*)Col:(NSString*)prefLang:(NSString*)tag { return something; } How do I call that from another class? | TITLE:
How to pass string args to method in obj-c
QUESTION:
My method is look like this + (NSString *)textByPrefLang:(NSString*)Col:(NSString*)prefLang:(NSString*)tag { return something; } How do I call that from another class?
ANSWER:
in.h file: + (NSString *)textByPrefLang:(NSString*)Col withPrefLang:(NSString*)pre... | [
"objective-c",
"xcode"
] | 1 | 3 | 295 | 2 | 0 | 2011-06-01T12:41:37.227000 | 2011-06-01T12:46:02.600000 |
6,201,305 | 6,201,319 | How to override default style for button JQuery | Hi I am building a button on my page like that Create new user The button is diplayed using standard JQuery style. How can I provide my own style for that button. What is the best way? The firebug says class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" | You can apply different themes with jQuery UI: http://jqueryui.com/themeroller/. | How to override default style for button JQuery Hi I am building a button on my page like that Create new user The button is diplayed using standard JQuery style. How can I provide my own style for that button. What is the best way? The firebug says class="ui-button ui-widget ui-state-default ui-corner-all ui-button-te... | TITLE:
How to override default style for button JQuery
QUESTION:
Hi I am building a button on my page like that Create new user The button is diplayed using standard JQuery style. How can I provide my own style for that button. What is the best way? The firebug says class="ui-button ui-widget ui-state-default ui-corne... | [
"javascript",
"jquery",
"css",
"jquery-ui"
] | 3 | 4 | 17,567 | 5 | 0 | 2011-06-01T12:41:39.260000 | 2011-06-01T12:43:27.017000 |
6,201,307 | 6,208,290 | Does Smaato provides sdk of Symbian^3? | Currently, we are working on 3-D Game on Symbian^3 platform. Now I need to implement ads in my Game(preferably via Smaato). I have also checked out Smaato's website for SDK, but there I found SDKs for Symbian S60, WRT and Qt. There is no SDK specially for Symbian^3 on Smaato's website. I am a bit confused now. Moreover... | The Smaato website says about their Symbian support: Key Facts Easy integration Compatible with Qt 4.6 and Qt 4.7 Allows ad display in QWidget and Qt Quick based applications Multi platform: runs on Symbian S60 3rd & 5th edition Symbian ^3 and Maemo Targeting: gender, age, keywords, search queries, carrier and location... | Does Smaato provides sdk of Symbian^3? Currently, we are working on 3-D Game on Symbian^3 platform. Now I need to implement ads in my Game(preferably via Smaato). I have also checked out Smaato's website for SDK, but there I found SDKs for Symbian S60, WRT and Qt. There is no SDK specially for Symbian^3 on Smaato's web... | TITLE:
Does Smaato provides sdk of Symbian^3?
QUESTION:
Currently, we are working on 3-D Game on Symbian^3 platform. Now I need to implement ads in my Game(preferably via Smaato). I have also checked out Smaato's website for SDK, but there I found SDKs for Symbian S60, WRT and Qt. There is no SDK specially for Symbian... | [
"3d",
"symbian",
"nokia-wrt"
] | 0 | 1 | 141 | 2 | 0 | 2011-06-01T12:41:43.577000 | 2011-06-01T22:03:57.280000 |
6,201,327 | 6,208,072 | GCC warning: non-pic addressing form not suitible for pic code | The following code compiles fine in MSVC, but GCC gives a warning, which really bugs me: non-pic addressing form not suitible for pic code. Can you please tell me the cause of this warning and how to fix it if it really is a potential problem? I am using -fasm-blocks compiler option to enable intel style assembly, addi... | GCC is trying to tell you that [dataMask + ecx * 2] isn't a valid addressing mode. This is due to the PIC's nature: it is a RISC, and you're writing RISC code with CISC syntax, not a good idea IMO. Basically, the x86 has a way more complete (and complicated) instruction set, while the PIC's one isn't so extended. I'm q... | GCC warning: non-pic addressing form not suitible for pic code The following code compiles fine in MSVC, but GCC gives a warning, which really bugs me: non-pic addressing form not suitible for pic code. Can you please tell me the cause of this warning and how to fix it if it really is a potential problem? I am using -f... | TITLE:
GCC warning: non-pic addressing form not suitible for pic code
QUESTION:
The following code compiles fine in MSVC, but GCC gives a warning, which really bugs me: non-pic addressing form not suitible for pic code. Can you please tell me the cause of this warning and how to fix it if it really is a potential prob... | [
"visual-c++",
"gcc",
"assembly",
"inline-assembly"
] | 0 | 0 | 192 | 1 | 0 | 2011-06-01T12:44:23.687000 | 2011-06-01T21:41:10.270000 |
6,201,338 | 6,201,404 | jQuery: Unique Each() var append | I'm appending some buttons from an XML-file, into some divs. Each div has one or two buttons in them. In each Each(), append the buttons through a var. But after each button insert, the Each() overwrites the var. How can I make a unique var, for each append?? It's the "buttonMarkup" I would like to have, as unique vars... | just a + to the equal and it will concatenate the string $(this).find('button', this).each(function(index) { var type = $(this).attr("type"); var label = $(">label", this).text(); var wunLink = $(">link", this).text(); buttonMarkup += " " + label + " "; }); so then you will have one long string in buttonMarkup that you... | jQuery: Unique Each() var append I'm appending some buttons from an XML-file, into some divs. Each div has one or two buttons in them. In each Each(), append the buttons through a var. But after each button insert, the Each() overwrites the var. How can I make a unique var, for each append?? It's the "buttonMarkup" I w... | TITLE:
jQuery: Unique Each() var append
QUESTION:
I'm appending some buttons from an XML-file, into some divs. Each div has one or two buttons in them. In each Each(), append the buttons through a var. But after each button insert, the Each() overwrites the var. How can I make a unique var, for each append?? It's the ... | [
"jquery",
"append",
"each",
"var"
] | 1 | 2 | 1,482 | 3 | 0 | 2011-06-01T12:45:18.357000 | 2011-06-01T12:50:08.287000 |
6,201,339 | 6,204,552 | A clean system for github pages with local plugins | Since github doesn't execute (the safe option for jekyll) plugins, I am trying to develop a small and clean way to deploy the compiled files to the branch master. The usual source is in the branch boilerplate, from there I run jekyll and generate the code, everything works. In the master branch I only have the followin... | As I told on IRC I'd go with a git hook ( git help hooks ) I hacked this script real quick. Place it under $GIT_DIR/.git/hooks/. I tested it as a post-commit hook commiting from $_origbranch and checked the results on the other branch ( $_destbranch ). It should kind-of do what you want. Worked fine, so I hope it fits ... | A clean system for github pages with local plugins Since github doesn't execute (the safe option for jekyll) plugins, I am trying to develop a small and clean way to deploy the compiled files to the branch master. The usual source is in the branch boilerplate, from there I run jekyll and generate the code, everything w... | TITLE:
A clean system for github pages with local plugins
QUESTION:
Since github doesn't execute (the safe option for jekyll) plugins, I am trying to develop a small and clean way to deploy the compiled files to the branch master. The usual source is in the branch boilerplate, from there I run jekyll and generate the ... | [
"git",
"github"
] | 3 | 15 | 806 | 1 | 0 | 2011-06-01T12:45:22.833000 | 2011-06-01T16:28:37.230000 |
6,201,343 | 6,201,591 | WPF: Custom UserControl that includes a control versus inherits a control | I'm creating a UserControl that's a specialized ListBox/View (type not relevant). Now I'm faced with the option to either keep the type as UserControl or Inherit the List control. 1) If I keep it as a UserControl I have a List control inside it and then I have to create a DP for ItemsSource and so on. 2) Let it inherit... | There is no single right answer I'm afraid. The relative merits are: #1 Hosting a List within a UserControl PROs It is easier to design this control, i.e. VisualStudio supports UserControls quite nicely You can restrict the interface of the control you are 'extending' for example, if you want to suppress some functiona... | WPF: Custom UserControl that includes a control versus inherits a control I'm creating a UserControl that's a specialized ListBox/View (type not relevant). Now I'm faced with the option to either keep the type as UserControl or Inherit the List control. 1) If I keep it as a UserControl I have a List control inside it a... | TITLE:
WPF: Custom UserControl that includes a control versus inherits a control
QUESTION:
I'm creating a UserControl that's a specialized ListBox/View (type not relevant). Now I'm faced with the option to either keep the type as UserControl or Inherit the List control. 1) If I keep it as a UserControl I have a List c... | [
"wpf",
"inheritance",
"user-controls"
] | 3 | 4 | 614 | 1 | 0 | 2011-06-01T12:45:33.117000 | 2011-06-01T13:04:16.793000 |
6,201,353 | 6,201,574 | Does using a 'SortExpression' in a BoundField in a DetailsView make any sense? | I'm studying for a M$ certificate. I use the 'self-paced' Training Kit (book). I bumped into something which confuses me a bit. After finding some code samples online doing the same, I decided to ask the community. This is the text: The DetailsView control does not directly support sorting, whereas the GridView control... | The GridView and DetailsView uses the BoundField, CommandField, etc. so this is useful for the GridView, but not for the DetailsView. DetailsView is singular in form as it only shows one record at a time so sorting wouldn't be beneficial to expose. HTH. | Does using a 'SortExpression' in a BoundField in a DetailsView make any sense? I'm studying for a M$ certificate. I use the 'self-paced' Training Kit (book). I bumped into something which confuses me a bit. After finding some code samples online doing the same, I decided to ask the community. This is the text: The Deta... | TITLE:
Does using a 'SortExpression' in a BoundField in a DetailsView make any sense?
QUESTION:
I'm studying for a M$ certificate. I use the 'self-paced' Training Kit (book). I bumped into something which confuses me a bit. After finding some code samples online doing the same, I decided to ask the community. This is ... | [
"asp.net",
"webforms",
"detailsview"
] | 2 | 3 | 2,225 | 1 | 0 | 2011-06-01T12:46:08.433000 | 2011-06-01T13:02:49.550000 |
6,201,358 | 6,201,419 | Using an unknown generic interface in a static field returning a Func | I have the following static field in my class private static Func Make = reader => new Project { Name = reader["ProjectName"].AsId(), StartDate = reader["StartDate"].AsDateTime(), EndDate = reader["EndDate"].AsDateTime() }; I'm trying to do the same using a generic interface, but can't work out how to define the generi... | You can't have a generic field; you can, however, push this into a generic static type: static class Foo { internal static readonly Func > Make = reader => new Definition { Name = reader["DefinitionName"].AsId() }; } and use Foo.Make You might want to tidy that up, though (the internal field, etc) | Using an unknown generic interface in a static field returning a Func I have the following static field in my class private static Func Make = reader => new Project { Name = reader["ProjectName"].AsId(), StartDate = reader["StartDate"].AsDateTime(), EndDate = reader["EndDate"].AsDateTime() }; I'm trying to do the same ... | TITLE:
Using an unknown generic interface in a static field returning a Func
QUESTION:
I have the following static field in my class private static Func Make = reader => new Project { Name = reader["ProjectName"].AsId(), StartDate = reader["StartDate"].AsDateTime(), EndDate = reader["EndDate"].AsDateTime() }; I'm tryi... | [
"c#",
"generics",
"lambda"
] | 1 | 1 | 219 | 2 | 0 | 2011-06-01T12:46:26.733000 | 2011-06-01T12:51:28.573000 |
6,201,370 | 6,201,537 | Need a help Local.name(.) xquery function | can any one tell me how Local.name(.) xquery function works. regarding sql construction problem i post a question in a forum and they give me answer. where Local.name(.) xquery function is used but syntax is not clear to me very well.;with cte as ( select x.i.value('local-name(.)','nvarchar(MAX)') as colname,x.i.value(... | local-name(.) will give you the node name of the current node. If you used local-name(..) you would get the node name of the parent node. x.i.value('.','nvarchar(max)') will give you the content of the the current node. @x.nodes('/Record/DELETED/*') gives you all nodes in /Record/Deleted. So your query will give you a ... | Need a help Local.name(.) xquery function can any one tell me how Local.name(.) xquery function works. regarding sql construction problem i post a question in a forum and they give me answer. where Local.name(.) xquery function is used but syntax is not clear to me very well.;with cte as ( select x.i.value('local-name(... | TITLE:
Need a help Local.name(.) xquery function
QUESTION:
can any one tell me how Local.name(.) xquery function works. regarding sql construction problem i post a question in a forum and they give me answer. where Local.name(.) xquery function is used but syntax is not clear to me very well.;with cte as ( select x.i.... | [
"sql-server",
"t-sql",
"xquery-sql"
] | 3 | 7 | 2,590 | 1 | 0 | 2011-06-01T12:47:26.320000 | 2011-06-01T12:59:40.657000 |
6,201,375 | 6,201,426 | Mysql inner join and rounding with null precision | I am attempting to perform an inner join on two tables so that I can round a value by the precision associated with that value's pid in the other table. However, it is returning NULL for pid 3. I believe it has to do with the NULL precision for pid 2, because when I set it's precision to a non-NULL value, I get the cor... | Try this query: SELECT pid_values.pid, pid_values.value, round(value, IF(pids.precision IS NULL, 0, pids.precision)) FROM pid_values INNER JOIN pids ON pid_values.pid = pids.pid; | Mysql inner join and rounding with null precision I am attempting to perform an inner join on two tables so that I can round a value by the precision associated with that value's pid in the other table. However, it is returning NULL for pid 3. I believe it has to do with the NULL precision for pid 2, because when I set... | TITLE:
Mysql inner join and rounding with null precision
QUESTION:
I am attempting to perform an inner join on two tables so that I can round a value by the precision associated with that value's pid in the other table. However, it is returning NULL for pid 3. I believe it has to do with the NULL precision for pid 2, ... | [
"mysql",
"rounding"
] | 1 | 2 | 291 | 2 | 0 | 2011-06-01T12:48:03.963000 | 2011-06-01T12:52:10.320000 |
6,201,397 | 6,201,438 | asp.net - upload file to a different server | I have a web application in a farm with a web server and a file server. One of the primary features of our web app is the storage of files. I need to find a way to have a user connect to the website, select the file(s) to upload to the server, and the files are uploaded directly to the file server, not the web server. ... | This may help you. Uploading files to file server using webclient class | asp.net - upload file to a different server I have a web application in a farm with a web server and a file server. One of the primary features of our web app is the storage of files. I need to find a way to have a user connect to the website, select the file(s) to upload to the server, and the files are uploaded direc... | TITLE:
asp.net - upload file to a different server
QUESTION:
I have a web application in a farm with a web server and a file server. One of the primary features of our web app is the storage of files. I need to find a way to have a user connect to the website, select the file(s) to upload to the server, and the files ... | [
"asp.net",
"iis",
"file-upload"
] | 4 | 2 | 12,388 | 2 | 0 | 2011-06-01T12:49:08.480000 | 2011-06-01T12:52:55.997000 |
6,201,402 | 6,202,133 | Activity not working on 2.2? | I have used three images in layout where two are set in layout and one load from drawable at runtime. In 2.1, 2.3, 3.0, 3.1 it works fine but I am getting an error with 2.2 and 2.3.3. Here is my XML file. And here is my Java file. public class Aura extends Activity { protected static final String TAG = "TAG";
TextView... | It looks like one of the images in your layout is causing an OutOfMemory exception, possibly @drawable/outeraura. I would check the amount of RAM that you have assigned to the emulator, and also look at the size of your drawable images. If they are large then you will get speed and memory improvements by scaling them d... | Activity not working on 2.2? I have used three images in layout where two are set in layout and one load from drawable at runtime. In 2.1, 2.3, 3.0, 3.1 it works fine but I am getting an error with 2.2 and 2.3.3. Here is my XML file. And here is my Java file. public class Aura extends Activity { protected static final ... | TITLE:
Activity not working on 2.2?
QUESTION:
I have used three images in layout where two are set in layout and one load from drawable at runtime. In 2.1, 2.3, 3.0, 3.1 it works fine but I am getting an error with 2.2 and 2.3.3. Here is my XML file. And here is my Java file. public class Aura extends Activity { prote... | [
"android",
"drawable"
] | 0 | 0 | 373 | 2 | 0 | 2011-06-01T12:49:51.460000 | 2011-06-01T13:41:30.937000 |
6,201,409 | 6,201,450 | how to remove index.php from codeigniter URL | Possible Duplicate: how to remove index.php from url in codeigniter? I want to remove index.php from the codeigniter url. I have created.htaccess file and placed the following code on it (as found on the CodeIgniter website. But i can not access anything on the localhost. I get the error "Not Found", if i place the cod... | Options +FollowSymLinks RewriteEngine on RewriteRule (.*)$ index.php | how to remove index.php from codeigniter URL Possible Duplicate: how to remove index.php from url in codeigniter? I want to remove index.php from the codeigniter url. I have created.htaccess file and placed the following code on it (as found on the CodeIgniter website. But i can not access anything on the localhost. I ... | TITLE:
how to remove index.php from codeigniter URL
QUESTION:
Possible Duplicate: how to remove index.php from url in codeigniter? I want to remove index.php from the codeigniter url. I have created.htaccess file and placed the following code on it (as found on the CodeIgniter website. But i can not access anything on... | [
"codeigniter"
] | 0 | 0 | 839 | 3 | 0 | 2011-06-01T12:50:26.030000 | 2011-06-01T12:54:00.330000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.