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,197,295 | 6,223,311 | Adding Calendar and events in Android 2.2 | What I want: I want to add calendar events in Android 2.2. What I Have: I have added an event using the below code Uri calendars = Uri.parse("content://com.android.calendar/events"); Cursor managedCursor = managedQuery(calendars, null, null, null, null);
startManagingCursor(managedCursor); managedCursor.moveToFirst();... | Most of the code is fine, you just need to know a little bit of concepts regarding calendar. Actually there is more than one calendar types in Android. To Traverse all the calendars, Use following Uri for 2.2: Uri calendars = Uri.parse("content://com.android.calendar"+ "/calendars"); And get the values of 'id' and 'nam... | Adding Calendar and events in Android 2.2 What I want: I want to add calendar events in Android 2.2. What I Have: I have added an event using the below code Uri calendars = Uri.parse("content://com.android.calendar/events"); Cursor managedCursor = managedQuery(calendars, null, null, null, null);
startManagingCursor(ma... | TITLE:
Adding Calendar and events in Android 2.2
QUESTION:
What I want: I want to add calendar events in Android 2.2. What I Have: I have added an event using the below code Uri calendars = Uri.parse("content://com.android.calendar/events"); Cursor managedCursor = managedQuery(calendars, null, null, null, null);
star... | [
"android",
"calendar",
"uri"
] | 7 | 4 | 6,669 | 1 | 0 | 2011-06-01T06:48:15.370000 | 2011-06-03T05:27:50.027000 |
6,197,305 | 6,197,549 | Move TRichEdit Caretpos | is there a way to change the caret position in pixel? i would like to move the care pos everytime i move the mouse mouse. like: Onmousemove: MoveCaretPos(X, Y); | No, you cannot set the position of the caret in a specific point, instead you must set the caret in a character position. To do this you must use the EM_CHARFROMPOS message to retrieve the closest character to a specified point and then set the value returned to the SelStart property. Check this sample procedure TForm1... | Move TRichEdit Caretpos is there a way to change the caret position in pixel? i would like to move the care pos everytime i move the mouse mouse. like: Onmousemove: MoveCaretPos(X, Y); | TITLE:
Move TRichEdit Caretpos
QUESTION:
is there a way to change the caret position in pixel? i would like to move the care pos everytime i move the mouse mouse. like: Onmousemove: MoveCaretPos(X, Y);
ANSWER:
No, you cannot set the position of the caret in a specific point, instead you must set the caret in a charac... | [
"delphi",
"richedit"
] | 3 | 7 | 2,530 | 1 | 0 | 2011-06-01T06:48:54.490000 | 2011-06-01T07:14:42.710000 |
6,197,306 | 6,197,315 | Difference between system.gc() and runtime.gc() | What is the difference between System.gc() and Runtime.gc()? | Both are same. System.gc() is effectively equivalent to Runtime.gc(). System.gc() internally calls Runtime.gc(). The only difference is System.gc() is a class method where as Runtime.gc() is an instance method. So, System.gc() is more convenient. | Difference between system.gc() and runtime.gc() What is the difference between System.gc() and Runtime.gc()? | TITLE:
Difference between system.gc() and runtime.gc()
QUESTION:
What is the difference between System.gc() and Runtime.gc()?
ANSWER:
Both are same. System.gc() is effectively equivalent to Runtime.gc(). System.gc() internally calls Runtime.gc(). The only difference is System.gc() is a class method where as Runtime.g... | [
"java",
"android",
"garbage-collection"
] | 60 | 68 | 41,618 | 7 | 0 | 2011-06-01T06:49:03.510000 | 2011-06-01T06:50:36.807000 |
6,197,308 | 6,197,452 | How to get the array content when value is object? | I have an array, which contains different data types. Those are int and object. The array is as follows. Array ( [isHR] => 1 [1] => Array ( [0] => MyQuota Object ( [year:private] => 2011 [leaveId:private] => L001 [employeeId:private] => [NoOfDays:private] => 7.00 [leaveName:private] => Casual Leave [Message:private] =>... | Add getters and setters: class MyQuota { private $year; private $leaveId; private $employeeId; private $NoOfDays; private $leaveMessage; private $Message;
/* more code */
public function getNoOfDays() { return $this->NoOfDays; }
public function setNoOfDays($noOfDays) { $this->NoOfDays = $noOfDays; }
/* more getters... | How to get the array content when value is object? I have an array, which contains different data types. Those are int and object. The array is as follows. Array ( [isHR] => 1 [1] => Array ( [0] => MyQuota Object ( [year:private] => 2011 [leaveId:private] => L001 [employeeId:private] => [NoOfDays:private] => 7.00 [leav... | TITLE:
How to get the array content when value is object?
QUESTION:
I have an array, which contains different data types. Those are int and object. The array is as follows. Array ( [isHR] => 1 [1] => Array ( [0] => MyQuota Object ( [year:private] => 2011 [leaveId:private] => L001 [employeeId:private] => [NoOfDays:priv... | [
"php",
"arrays"
] | 0 | 1 | 547 | 3 | 0 | 2011-06-01T06:49:10.737000 | 2011-06-01T07:04:56.710000 |
6,197,339 | 6,197,538 | Creating undirected graphs in Python | I need to create a program that analyzes the traveling salesman problem using Python. Does anyone know of a good resource that will help me learn how to create and use undirected graphs in Python? Any info that may help me with the TSP would be greatly appreciated as well. | About Python library for directed and undirected graphs, you can take a look at igraph or NetworkX. As for the TSP, a little googling indicates that some Python code and discussion is available here, and some background is given in these slides, A Short History of the Traveling Salesman Problem, and on this page, Trave... | Creating undirected graphs in Python I need to create a program that analyzes the traveling salesman problem using Python. Does anyone know of a good resource that will help me learn how to create and use undirected graphs in Python? Any info that may help me with the TSP would be greatly appreciated as well. | TITLE:
Creating undirected graphs in Python
QUESTION:
I need to create a program that analyzes the traveling salesman problem using Python. Does anyone know of a good resource that will help me learn how to create and use undirected graphs in Python? Any info that may help me with the TSP would be greatly appreciated ... | [
"python",
"graph"
] | 2 | 2 | 8,329 | 1 | 0 | 2011-06-01T06:53:10.060000 | 2011-06-01T07:13:32.530000 |
6,197,344 | 6,198,877 | How to get facebook recommendations count in php | Can any one help how to get facebook recommended count in php. I search for facebook api but i dint found any. Thanks in advance. | A Recommendation is a Like. You can see it in the reference of the like button: action - the verb to display on the button. Options: 'like', 'recommend' To get the counts for a URL (here http://stackoverflow.com ), you can make an FQL call: SELECT url, share_count, like_count, comment_count, total_count FROM link_stat ... | How to get facebook recommendations count in php Can any one help how to get facebook recommended count in php. I search for facebook api but i dint found any. Thanks in advance. | TITLE:
How to get facebook recommendations count in php
QUESTION:
Can any one help how to get facebook recommended count in php. I search for facebook api but i dint found any. Thanks in advance.
ANSWER:
A Recommendation is a Like. You can see it in the reference of the like button: action - the verb to display on th... | [
"php",
"facebook"
] | 3 | 7 | 2,862 | 3 | 0 | 2011-06-01T06:53:45.040000 | 2011-06-01T09:20:01.277000 |
6,197,347 | 6,205,885 | How can I backup MonoTouch? | I want to upgrade my MonoTouch installation from 3.2.6 to the latest 4.0.3 installation, but I'm tentative about it so I want to be able to safely go back to 3.2.6 in case things don't work out in 4.0.3. What's the best way to do this? If I backup my /Developer/MonoTouch folder, install 4.0.3, and then restore my old /... | Just keep your previous installer for 3.2.6 around. If you want to go back to 3.2.6, you just install it again. OS X is kind of dumb, there is no concept of uninstalling things. You just install again over top of it. PS - I would not even mess with it. There were so many bugs in 4.0.3, I found it unusable. You might al... | How can I backup MonoTouch? I want to upgrade my MonoTouch installation from 3.2.6 to the latest 4.0.3 installation, but I'm tentative about it so I want to be able to safely go back to 3.2.6 in case things don't work out in 4.0.3. What's the best way to do this? If I backup my /Developer/MonoTouch folder, install 4.0.... | TITLE:
How can I backup MonoTouch?
QUESTION:
I want to upgrade my MonoTouch installation from 3.2.6 to the latest 4.0.3 installation, but I'm tentative about it so I want to be able to safely go back to 3.2.6 in case things don't work out in 4.0.3. What's the best way to do this? If I backup my /Developer/MonoTouch fo... | [
"xamarin.ios"
] | 1 | 0 | 114 | 1 | 0 | 2011-06-01T06:53:54.350000 | 2011-06-01T18:22:57.330000 |
6,197,349 | 6,197,616 | TFS: execute console application after get latest version | if someone does a 'get latest version' in visual studio (team explorer) of a project in Team Foundation Server - is it possible to execute a console application automatically after this operation? The goal is that the local database is updated with new scripts every time a developer gets the latest version of the sourc... | I'd be more inclined to go the other way - have the console application that updates the database do the get itself, and change process so that all you do is run the console application. This will ensure the correct sequencing of steps. To have the console application do the get, you can either look into the various wa... | TFS: execute console application after get latest version if someone does a 'get latest version' in visual studio (team explorer) of a project in Team Foundation Server - is it possible to execute a console application automatically after this operation? The goal is that the local database is updated with new scripts e... | TITLE:
TFS: execute console application after get latest version
QUESTION:
if someone does a 'get latest version' in visual studio (team explorer) of a project in Team Foundation Server - is it possible to execute a console application automatically after this operation? The goal is that the local database is updated ... | [
"c#",
"tfs"
] | 1 | 2 | 687 | 1 | 0 | 2011-06-01T06:54:07.630000 | 2011-06-01T07:22:40.527000 |
6,197,357 | 6,197,402 | Looping through dictionary to insert value to an object | Consider I have the following dictionary: dic={} dic["var1"]=val1 dic["var2"]=val2 Now I have another object which contains two properties: var1 and var2. I would like to run a loop within the object's method such as (pseudo code): for key, value in dic self.key=value so that self.var1=val2 and self.var2=val2 How can I... | >>> class Obj(object):... pass... >>> obj = Obj() >>> for key, value in {'var1':5, 'var2':6}.iteritems():... setattr(obj, key, value)... >>> obj.var1 5 >>> obj.var2 6 Here I am obligated to say something like "why not just use a dict?" | Looping through dictionary to insert value to an object Consider I have the following dictionary: dic={} dic["var1"]=val1 dic["var2"]=val2 Now I have another object which contains two properties: var1 and var2. I would like to run a loop within the object's method such as (pseudo code): for key, value in dic self.key=v... | TITLE:
Looping through dictionary to insert value to an object
QUESTION:
Consider I have the following dictionary: dic={} dic["var1"]=val1 dic["var2"]=val2 Now I have another object which contains two properties: var1 and var2. I would like to run a loop within the object's method such as (pseudo code): for key, value... | [
"python"
] | 4 | 3 | 243 | 3 | 0 | 2011-06-01T06:55:16.563000 | 2011-06-01T06:59:47.677000 |
6,197,358 | 6,216,700 | Embedding word 2010 editor in a wpf application | How do I use the word editor in a WPF application? Is it possible using windows forms hosting in WPF only? Is there another way to accomplish that? I found AvalonEdit but it does not have features that I need. So using this way, my problem may not be solved. Also there is some stuffs out there to host a windows forms c... | Well, Word proper isn't technically designed to be hosted by another app, whether it's WPF, WINFORMS or anything else. You CAN use api tricks (like SetParent) to move the Main Word window into a WPF hosted window. I've done it before, but it's pretty tricky business and it's very easy to miss things that cause GPFs (bo... | Embedding word 2010 editor in a wpf application How do I use the word editor in a WPF application? Is it possible using windows forms hosting in WPF only? Is there another way to accomplish that? I found AvalonEdit but it does not have features that I need. So using this way, my problem may not be solved. Also there is... | TITLE:
Embedding word 2010 editor in a wpf application
QUESTION:
How do I use the word editor in a WPF application? Is it possible using windows forms hosting in WPF only? Is there another way to accomplish that? I found AvalonEdit but it does not have features that I need. So using this way, my problem may not be sol... | [
"wpf",
"editor",
"ms-word",
"ms-office",
"avalonedit"
] | 19 | 2 | 15,703 | 2 | 0 | 2011-06-01T06:55:22.340000 | 2011-06-02T15:30:09.063000 |
6,197,359 | 6,197,414 | How to know if I have trial version of visual studio 2010? | My university has several programs available for download. About 6 months ago I downloaded visual studio 2010 ultimate edition. I am not sure if it is the trial version. I don't think so because I've been using it for about 6 months and I have not had to extend any trial. Moreover, I don't get the splash screen that sa... | In Help > About Microsoft Visual Studio you can see licensing information. Mine says that it is licensed to me (yay!) and yours should say something similar. I am not sure about volume licensing, because ours has been bought through an Open Value contract and we have MSDN accounts for every developer, so you have to do... | How to know if I have trial version of visual studio 2010? My university has several programs available for download. About 6 months ago I downloaded visual studio 2010 ultimate edition. I am not sure if it is the trial version. I don't think so because I've been using it for about 6 months and I have not had to extend... | TITLE:
How to know if I have trial version of visual studio 2010?
QUESTION:
My university has several programs available for download. About 6 months ago I downloaded visual studio 2010 ultimate edition. I am not sure if it is the trial version. I don't think so because I've been using it for about 6 months and I have... | [
"visual-studio-2010"
] | 3 | 7 | 6,297 | 3 | 0 | 2011-06-01T06:55:27.360000 | 2011-06-01T07:00:47.240000 |
6,197,363 | 6,197,453 | Python: how to save a Binary Tree? | I was wondering how to save a Binary Tree that I have previously created. Does anyone know how to do it? Thank you so much. PD: Here there is a link about how to implement a binary tree, I am using this pice od code: http://code.activestate.com/recipes/286239-binary-ordered-tree/ | One easy solution: - extend the current class to have a load and save method - add a unique id to each node - implement to do a top down parsing and save each node to a xml with a structure like that... childuniqueId You're done (if data is easily serialized at least), first node is your tree root. don't forget fertili... | Python: how to save a Binary Tree? I was wondering how to save a Binary Tree that I have previously created. Does anyone know how to do it? Thank you so much. PD: Here there is a link about how to implement a binary tree, I am using this pice od code: http://code.activestate.com/recipes/286239-binary-ordered-tree/ | TITLE:
Python: how to save a Binary Tree?
QUESTION:
I was wondering how to save a Binary Tree that I have previously created. Does anyone know how to do it? Thank you so much. PD: Here there is a link about how to implement a binary tree, I am using this pice od code: http://code.activestate.com/recipes/286239-binary-... | [
"python",
"persistence",
"binary-tree"
] | 7 | 6 | 5,811 | 4 | 0 | 2011-06-01T06:56:09.480000 | 2011-06-01T07:05:05.820000 |
6,197,370 | 6,197,432 | Should unit tests be written for getter and setters? | Are we supposed to write tests for our getters and setters or is it overkill? | I would say no. @Will said you should aim for 100% code coverage, but in my opinion that's a dangerous distraction. You can write unit tests that have 100% coverage, and yet test absolutely nothing. Unit tests are there to test the behaviour of your code, in an expressive and meaningful way, and getters/setters are onl... | Should unit tests be written for getter and setters? Are we supposed to write tests for our getters and setters or is it overkill? | TITLE:
Should unit tests be written for getter and setters?
QUESTION:
Are we supposed to write tests for our getters and setters or is it overkill?
ANSWER:
I would say no. @Will said you should aim for 100% code coverage, but in my opinion that's a dangerous distraction. You can write unit tests that have 100% covera... | [
"unit-testing"
] | 182 | 234 | 119,485 | 13 | 0 | 2011-06-01T06:57:13.600000 | 2011-06-01T07:03:11.630000 |
6,197,375 | 6,197,647 | Data not display UITableView? | In my application I parsed the data through NSXMLParser and made separate class to store that data from which i usually display the data. Everything works fine in simulator except the the title which is display in table cell with image. Images appears properly but the title not appear properly. This is my code:- - (UIT... | Just increase the height of your label and give a try. If the height is too less to hold 2 lines, the label will truncate the contents to 1 line and end with the ellipsis. | Data not display UITableView? In my application I parsed the data through NSXMLParser and made separate class to store that data from which i usually display the data. Everything works fine in simulator except the the title which is display in table cell with image. Images appears properly but the title not appear prop... | TITLE:
Data not display UITableView?
QUESTION:
In my application I parsed the data through NSXMLParser and made separate class to store that data from which i usually display the data. Everything works fine in simulator except the the title which is display in table cell with image. Images appears properly but the tit... | [
"iphone",
"objective-c",
"xcode4"
] | 0 | 0 | 249 | 2 | 0 | 2011-06-01T06:57:32.110000 | 2011-06-01T07:25:42.740000 |
6,197,377 | 6,197,508 | How to set the value for Radio Buttons When edit? | I have a Gender Row with radio buttons male & female. when i register as first time the values of radio button will store in database. Now my question is if i edit that row again it want to come(that means checked) with that value as male/female. how to make it? Note: Doing with php. HTML Script: Gender Male Female | When you populate your fields, you can check for the value: size="17">Male size="17">Female Assuming that the value you return from your database is in the variable $sex The checked property will preselect the value that match | How to set the value for Radio Buttons When edit? I have a Gender Row with radio buttons male & female. when i register as first time the values of radio button will store in database. Now my question is if i edit that row again it want to come(that means checked) with that value as male/female. how to make it? Note: D... | TITLE:
How to set the value for Radio Buttons When edit?
QUESTION:
I have a Gender Row with radio buttons male & female. when i register as first time the values of radio button will store in database. Now my question is if i edit that row again it want to come(that means checked) with that value as male/female. how t... | [
"php",
"html",
"radio-button"
] | 19 | 49 | 116,441 | 7 | 0 | 2011-06-01T06:57:38.223000 | 2011-06-01T07:10:38.597000 |
6,197,378 | 6,197,620 | How to convert hexadecimal byte to Unicode in Java | I want to convert hexadecimal byte to Unicode. I have hex 0x80 in Windows-1250 and I want to convert to '\u0402'. Is it possible with standard methods without switch. | \u0402 is named CYRILLIC CAPITAL LETTER DJE. I guess, you have some text in a different CP1251 character encoding, an encoding where 0x80 maps to the same cyrillic letter. Try to identify the encoding of your current text (your bytes) and use String s = new String(myBytes, "Cp1251"); to read the bytes into a string. Af... | How to convert hexadecimal byte to Unicode in Java I want to convert hexadecimal byte to Unicode. I have hex 0x80 in Windows-1250 and I want to convert to '\u0402'. Is it possible with standard methods without switch. | TITLE:
How to convert hexadecimal byte to Unicode in Java
QUESTION:
I want to convert hexadecimal byte to Unicode. I have hex 0x80 in Windows-1250 and I want to convert to '\u0402'. Is it possible with standard methods without switch.
ANSWER:
\u0402 is named CYRILLIC CAPITAL LETTER DJE. I guess, you have some text in... | [
"java",
"unicode",
"hex"
] | 1 | 1 | 11,321 | 2 | 0 | 2011-06-01T06:57:40.127000 | 2011-06-01T07:23:11.087000 |
6,197,392 | 6,198,220 | text over figure in latex | I am trying to add a simple figure into my latex code.I have this code: \begin{figure}[H] \resizebox{40pt}{!}{ \centering \includegraphics{FigureStereo.jpg}} \caption{Epipolar Geometry} \label{fig:cclogo} \end{figure} with this however the text comes on top of the image and also image is not centered.What am I doing wr... | You can use a center environment for centering, wrapping it around both the image box and the caption: \begin{figure}[h!] \begin{center} \resizebox{40pt}{!}{\includegraphics{FigureStereo.jpg}} \caption{Epipolar Geometry} \label{fig:cclogo} \end{center} \end{figure} Note, though, that LaTeX can sometimes be pretty stubb... | text over figure in latex I am trying to add a simple figure into my latex code.I have this code: \begin{figure}[H] \resizebox{40pt}{!}{ \centering \includegraphics{FigureStereo.jpg}} \caption{Epipolar Geometry} \label{fig:cclogo} \end{figure} with this however the text comes on top of the image and also image is not c... | TITLE:
text over figure in latex
QUESTION:
I am trying to add a simple figure into my latex code.I have this code: \begin{figure}[H] \resizebox{40pt}{!}{ \centering \includegraphics{FigureStereo.jpg}} \caption{Epipolar Geometry} \label{fig:cclogo} \end{figure} with this however the text comes on top of the image and a... | [
"latex",
"pdflatex"
] | 1 | 2 | 21,620 | 2 | 0 | 2011-06-01T06:59:08.490000 | 2011-06-01T08:21:11.617000 |
6,197,404 | 6,197,755 | Modal Window flicker effect | In a typical windows app, when a modal dialog appears and we click outside its boundaries it flickers thus indiacting that anything outside these boundaries is forbidden for now. Is there any event that fires when this happens? I really need this effect so that I can mock this behavior for my WPF pseudo-modal window. T... | See this SO question and the answer: Prevent WebBrowser control from stealing focus? It explains what FlashWindow does in the background. I quote what's interesting for you: Microsoft doesn't explain in so many words what FlashWindow does. Unfortunately, it doesn't send a specific message (say WM_FLASH or similar), whi... | Modal Window flicker effect In a typical windows app, when a modal dialog appears and we click outside its boundaries it flickers thus indiacting that anything outside these boundaries is forbidden for now. Is there any event that fires when this happens? I really need this effect so that I can mock this behavior for m... | TITLE:
Modal Window flicker effect
QUESTION:
In a typical windows app, when a modal dialog appears and we click outside its boundaries it flickers thus indiacting that anything outside these boundaries is forbidden for now. Is there any event that fires when this happens? I really need this effect so that I can mock t... | [
".net",
"window",
"click",
"modal-dialog"
] | 2 | 1 | 643 | 1 | 0 | 2011-06-01T06:59:53.100000 | 2011-06-01T07:36:01.957000 |
6,197,408 | 6,200,386 | how to add a newly created node to linklist? | here is my code, i can only add the node to the head of the linklist, but how to append to the tail to the linklist? thanks struct recordNode { char name[256]; char event[128]; / float time; struct recordNode* next; };
struct recordNode* temp; struct recordNode* aRecordPointer = NULL;
struct recordNode* createRecord(... | Assuming that aRecordPointer is your pointer to the head (first) element of list, you need to iterate the list from head to tail (last). struct recordNode* createRecord(char* name, char* event, float time){ temp = (struct recordNode*)malloc(sizeof(struct recordNode)); strcpy(temp->name, name); strcpy(temp->event, event... | how to add a newly created node to linklist? here is my code, i can only add the node to the head of the linklist, but how to append to the tail to the linklist? thanks struct recordNode { char name[256]; char event[128]; / float time; struct recordNode* next; };
struct recordNode* temp; struct recordNode* aRecordPoin... | TITLE:
how to add a newly created node to linklist?
QUESTION:
here is my code, i can only add the node to the head of the linklist, but how to append to the tail to the linklist? thanks struct recordNode { char name[256]; char event[128]; / float time; struct recordNode* next; };
struct recordNode* temp; struct recor... | [
"c",
"linked-list"
] | 0 | 1 | 231 | 3 | 0 | 2011-06-01T07:00:12.130000 | 2011-06-01T11:26:47.240000 |
6,197,409 | 6,197,522 | Ordered Sets Python 2.7 | I have a list that I'm attempting to remove duplicate items from. I'm using python 2.7.1 so I can simply use the set() function. However, this reorders my list. Which for my particular case is unacceptable. Below is a function I wrote; which does this. However I'm wondering if there's a better/faster way. Also any comm... | Use an OrderedDict: from collections import OrderedDict
l = ['a', 'a', 'a', 'b', 'b', 'c', 'd'] d = OrderedDict()
for x in l: d[x] = True
# prints a b c d for x in d: print x, print | Ordered Sets Python 2.7 I have a list that I'm attempting to remove duplicate items from. I'm using python 2.7.1 so I can simply use the set() function. However, this reorders my list. Which for my particular case is unacceptable. Below is a function I wrote; which does this. However I'm wondering if there's a better/f... | TITLE:
Ordered Sets Python 2.7
QUESTION:
I have a list that I'm attempting to remove duplicate items from. I'm using python 2.7.1 so I can simply use the set() function. However, this reorders my list. Which for my particular case is unacceptable. Below is a function I wrote; which does this. However I'm wondering if ... | [
"python",
"list",
"set",
"python-2.7"
] | 12 | 9 | 22,972 | 8 | 0 | 2011-06-01T07:00:14.580000 | 2011-06-01T07:11:41.747000 |
6,197,411 | 6,197,426 | Converting from BitSet to Byte array | I have picked up this example which converts BitSet to Byte array. public static byte[] toByteArray(BitSet bits) { byte[] bytes = new byte[bits.length()/8+1]; for (int i=0; i But in the discussion forums I have seen that by this method we wont get all the bits as we will be loosing one bit per calculation. Is this true... | No, that's fine. The comment on the post was relating to the other piece of code in the post, converting from a byte array to a BitSet. I'd use rather more whitespace, admittedly. Also this can end up with an array which is longer than it needs to be. The array creation expression could be: byte[] bytes = new byte[(bit... | Converting from BitSet to Byte array I have picked up this example which converts BitSet to Byte array. public static byte[] toByteArray(BitSet bits) { byte[] bytes = new byte[bits.length()/8+1]; for (int i=0; i But in the discussion forums I have seen that by this method we wont get all the bits as we will be loosing ... | TITLE:
Converting from BitSet to Byte array
QUESTION:
I have picked up this example which converts BitSet to Byte array. public static byte[] toByteArray(BitSet bits) { byte[] bytes = new byte[bits.length()/8+1]; for (int i=0; i But in the discussion forums I have seen that by this method we wont get all the bits as w... | [
"java",
"bitset"
] | 15 | 15 | 18,783 | 4 | 0 | 2011-06-01T07:00:32.793000 | 2011-06-01T07:02:40.870000 |
6,197,423 | 6,197,619 | How to use DOM XML to pass html and find a span | I have some html input from the user, I want to find all occurences of This is what I have so far: $d = new DOMDocument(); $d->loadHTML($html); I don't know which function to use next. Any help would be great. Thanks Jason | After that try... $xpath = new DOMXpath($d); $elements = $xpath->query("//div[class='widget-tag']"); This will return a DOMNodeList of the matching elements. | How to use DOM XML to pass html and find a span I have some html input from the user, I want to find all occurences of This is what I have so far: $d = new DOMDocument(); $d->loadHTML($html); I don't know which function to use next. Any help would be great. Thanks Jason | TITLE:
How to use DOM XML to pass html and find a span
QUESTION:
I have some html input from the user, I want to find all occurences of This is what I have so far: $d = new DOMDocument(); $d->loadHTML($html); I don't know which function to use next. Any help would be great. Thanks Jason
ANSWER:
After that try... $xpa... | [
"php",
"html",
"xml",
"dom"
] | 0 | 2 | 158 | 1 | 0 | 2011-06-01T07:02:02.793000 | 2011-06-01T07:23:02.480000 |
6,197,428 | 6,197,911 | how to do an operation when the .scroll i stopped | I have put a scroll handler to my page: $(window).scroll(function() {... }); and I'd like to do some operation when i stop to scroll the bar, not when I'am scrolling it. How can I do it? | Timers are usually a gross hack but I can't think of anything better in this case. Maybe something like this will work for you: var DELAY = 250; // Or whatever makes sense for you. var timer = null;
function scrolling_has_stopped() { timer = null; // Make sure everything is always in a sane state.
// Do whatever you ... | how to do an operation when the .scroll i stopped I have put a scroll handler to my page: $(window).scroll(function() {... }); and I'd like to do some operation when i stop to scroll the bar, not when I'am scrolling it. How can I do it? | TITLE:
how to do an operation when the .scroll i stopped
QUESTION:
I have put a scroll handler to my page: $(window).scroll(function() {... }); and I'd like to do some operation when i stop to scroll the bar, not when I'am scrolling it. How can I do it?
ANSWER:
Timers are usually a gross hack but I can't think of any... | [
"javascript",
"jquery"
] | 2 | 1 | 53 | 1 | 0 | 2011-06-01T07:02:50.033000 | 2011-06-01T07:52:00.030000 |
6,197,431 | 6,197,686 | Rotating a UIView with alpha = 0 | I have a UIView that I rotate with this code: helpView.transform = CGAffineTransformMakeRotation(degreesToRadians( rotationAngle )); Where degreeToRadians just is a macro to convert from degrees to radians. This works fine as long as the view is visible, eg alpha = 1. When I hide it (alpha = 0, which I animate) it does... | You are resetting the transform every time you use CGAffineTransformMake*. If you do this, you will get either a rotated transform or a scaled one. I am assuming the scaled one is after the rotated one and hence you aren't able to see the view rotated. If you need both the effects to remain, you will have to use CGAffi... | Rotating a UIView with alpha = 0 I have a UIView that I rotate with this code: helpView.transform = CGAffineTransformMakeRotation(degreesToRadians( rotationAngle )); Where degreeToRadians just is a macro to convert from degrees to radians. This works fine as long as the view is visible, eg alpha = 1. When I hide it (al... | TITLE:
Rotating a UIView with alpha = 0
QUESTION:
I have a UIView that I rotate with this code: helpView.transform = CGAffineTransformMakeRotation(degreesToRadians( rotationAngle )); Where degreeToRadians just is a macro to convert from degrees to radians. This works fine as long as the view is visible, eg alpha = 1. ... | [
"iphone",
"xcode",
"uiview",
"alpha",
"cgaffinetransform"
] | 1 | 1 | 341 | 1 | 0 | 2011-06-01T07:03:11.257000 | 2011-06-01T07:30:09.767000 |
6,197,433 | 6,197,470 | Mapview in tab based android | Hai, I am new android developer. I want to create a Tab host application. There will be 3 different tab items.Each item is attached with map view. I want to change the zoom label of each map when tab each item. How can i do it... | In each tab item, set programatically the following line with MapView: mapView.setBuiltInZoomControls(true); mapView.getController().setZoom(13); //set zoom level according to need for each tab item Hope this will solve your issue. | Mapview in tab based android Hai, I am new android developer. I want to create a Tab host application. There will be 3 different tab items.Each item is attached with map view. I want to change the zoom label of each map when tab each item. How can i do it... | TITLE:
Mapview in tab based android
QUESTION:
Hai, I am new android developer. I want to create a Tab host application. There will be 3 different tab items.Each item is attached with map view. I want to change the zoom label of each map when tab each item. How can i do it...
ANSWER:
In each tab item, set programatica... | [
"android",
"android-mapview"
] | 0 | 0 | 476 | 2 | 0 | 2011-06-01T07:03:15.020000 | 2011-06-01T07:07:18.553000 |
6,197,434 | 6,197,509 | how to find out a browser supports web fonts or not using javascript? | I just want a piece of code to check whether a browser supports CSS3 web-fonts or not. for example I have a font which by the size of 12px looks too small so I have to set it on 16px but if the page is viewed with a browser without webfonts support the text looks too big. | You could use Modernizr for this: @font-face detection docs. | how to find out a browser supports web fonts or not using javascript? I just want a piece of code to check whether a browser supports CSS3 web-fonts or not. for example I have a font which by the size of 12px looks too small so I have to set it on 16px but if the page is viewed with a browser without webfonts support t... | TITLE:
how to find out a browser supports web fonts or not using javascript?
QUESTION:
I just want a piece of code to check whether a browser supports CSS3 web-fonts or not. for example I have a font which by the size of 12px looks too small so I have to set it on 16px but if the page is viewed with a browser without ... | [
"javascript",
"webfonts"
] | 0 | 1 | 758 | 2 | 0 | 2011-06-01T07:03:19.580000 | 2011-06-01T07:10:40.470000 |
6,197,440 | 6,204,043 | iPhone: How to manage Core Data relationships by foreign keys | I have an app working with databases on both server side and iOS client side. And I use a HTTP services to sync between SQL Server on server side and Core Data on iPhone. I have some Core Data objects like this: ProductGroup Attributes: id Relationships: products
Product Attributes: id productGroupId Releationships: p... | You lose the relationship when you delete the ProductGroup objects because Core Data isn't SQL. In the case of relationships, Core Data cares nothing about the attributes of the object on the other side of the relationship, it just targets a specific object. You can have an arbitrary number of objects with the exact sa... | iPhone: How to manage Core Data relationships by foreign keys I have an app working with databases on both server side and iOS client side. And I use a HTTP services to sync between SQL Server on server side and Core Data on iPhone. I have some Core Data objects like this: ProductGroup Attributes: id Relationships: pro... | TITLE:
iPhone: How to manage Core Data relationships by foreign keys
QUESTION:
I have an app working with databases on both server side and iOS client side. And I use a HTTP services to sync between SQL Server on server side and Core Data on iPhone. I have some Core Data objects like this: ProductGroup Attributes: id ... | [
"iphone",
"core-data",
"foreign-keys"
] | 1 | 1 | 3,038 | 1 | 0 | 2011-06-01T07:03:47.407000 | 2011-06-01T15:54:21.593000 |
6,197,460 | 6,199,126 | Trouble with Lisp macros | I'm trying to write a macro in Lisp that re-implements let using itself. This is a trivial exercise which has no practical purpose; however after giving a response to a related question, I realized I should probably learn more about macros. They're touted as one of the great things about Lisp, but I rarely use them. An... | Your macro expands to: (LET ((A 5) (B 2)) (DOLIST (X ((PRINT (+ A B)))) X)) which is invalid because ((PRINT (+ A B))) is not a valid expression. There is also an issue that using an interned symbol in macro expansion can lead to variable capture, but that is not directly relevant (read more in PCL ). Using DOLIST here... | Trouble with Lisp macros I'm trying to write a macro in Lisp that re-implements let using itself. This is a trivial exercise which has no practical purpose; however after giving a response to a related question, I realized I should probably learn more about macros. They're touted as one of the great things about Lisp, ... | TITLE:
Trouble with Lisp macros
QUESTION:
I'm trying to write a macro in Lisp that re-implements let using itself. This is a trivial exercise which has no practical purpose; however after giving a response to a related question, I realized I should probably learn more about macros. They're touted as one of the great t... | [
"macros",
"lisp",
"common-lisp",
"mcl"
] | 2 | 4 | 384 | 1 | 0 | 2011-06-01T07:05:55.183000 | 2011-06-01T09:37:30.840000 |
6,197,466 | 6,200,789 | calling a javascript function everytime a facelets component is loaded | I have created a custom facelets component and I need to set some value to the component everytime it loads based on the value it gets from the bean. I used window.onload function in the component and it works correctly when there is only one of this component in the page. But when I use to or more of this component in... | First of all, why don't you just use the component's value attribute for this? Do if necessary the manipulation just straight in the bean or with help of a fullworthy Converter. As to your concrete problem, everytime you declare a window.onload = function() {} the previously declared one will be overridden. The window ... | calling a javascript function everytime a facelets component is loaded I have created a custom facelets component and I need to set some value to the component everytime it loads based on the value it gets from the bean. I used window.onload function in the component and it works correctly when there is only one of thi... | TITLE:
calling a javascript function everytime a facelets component is loaded
QUESTION:
I have created a custom facelets component and I need to set some value to the component everytime it loads based on the value it gets from the bean. I used window.onload function in the component and it works correctly when there ... | [
"java",
"javascript",
"jsf",
"richfaces",
"facelets"
] | 1 | 2 | 1,357 | 1 | 0 | 2011-06-01T07:06:57.913000 | 2011-06-01T12:01:05.633000 |
6,197,472 | 6,197,500 | What's the purpose of daemonize like this? | ngx_int_t ngx_daemon(ngx_log_t *log) { int fd;
switch (fork()) { case -1: ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "fork() failed"); return NGX_ERROR;
case 0: break;
default: exit(0); } It seems pointless to me,as it only changes the pid,nothing else. What's the benifit? | The process becomes detached from the terminal so that when the user that started it quits his session, the process remains running. Daemonizing is not only about the fork, it involves calling setsid(2) in the child process that detaches the process from the controlling terminal. If you run ps you can see such processe... | What's the purpose of daemonize like this? ngx_int_t ngx_daemon(ngx_log_t *log) { int fd;
switch (fork()) { case -1: ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "fork() failed"); return NGX_ERROR;
case 0: break;
default: exit(0); } It seems pointless to me,as it only changes the pid,nothing else. What's the benifit... | TITLE:
What's the purpose of daemonize like this?
QUESTION:
ngx_int_t ngx_daemon(ngx_log_t *log) { int fd;
switch (fork()) { case -1: ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "fork() failed"); return NGX_ERROR;
case 0: break;
default: exit(0); } It seems pointless to me,as it only changes the pid,nothing else. ... | [
"c",
"daemon"
] | 1 | 3 | 295 | 3 | 0 | 2011-06-01T07:07:30.517000 | 2011-06-01T07:10:07.983000 |
6,197,492 | 6,197,545 | MVC Razor syntax | How would I write this in Razor? <%: Model[0].AddressLatitude %> The following does not work: @Model[0].AddressLatitude | I think you might need to declare your model is enumerable to let the view know it's an array: @Model IEnumerable //@Model[0].AddressLatitude <-- there appears to be no indexer when using IEnumerable @foreach (var item in @Model) { @item.AddressLatitude break; } | MVC Razor syntax How would I write this in Razor? <%: Model[0].AddressLatitude %> The following does not work: @Model[0].AddressLatitude | TITLE:
MVC Razor syntax
QUESTION:
How would I write this in Razor? <%: Model[0].AddressLatitude %> The following does not work: @Model[0].AddressLatitude
ANSWER:
I think you might need to declare your model is enumerable to let the view know it's an array: @Model IEnumerable //@Model[0].AddressLatitude <-- there appe... | [
"c#",
"asp.net-mvc",
"razor"
] | 4 | 2 | 262 | 1 | 0 | 2011-06-01T07:09:17.660000 | 2011-06-01T07:14:18.433000 |
6,197,496 | 6,197,544 | How to find commit by tag name | I am just trying to find the way to show tags in the output of git log Is it possible? | git log --decorate This decorates commits with tag and branch names. | How to find commit by tag name I am just trying to find the way to show tags in the output of git log Is it possible? | TITLE:
How to find commit by tag name
QUESTION:
I am just trying to find the way to show tags in the output of git log Is it possible?
ANSWER:
git log --decorate This decorates commits with tag and branch names. | [
"git"
] | 1 | 2 | 118 | 1 | 0 | 2011-06-01T07:09:34.790000 | 2011-06-01T07:14:11.047000 |
6,197,503 | 6,197,589 | Removing duplication for this MYSQL union query | I have a query with duplicate expressions in it. Could it be written more compact? select id from `vacature_saved_searches` where `saved_search_interval` = 1 and DAYOFWEEK(CURDATE()) BETWEEN 2 AND 6 and `last_processing_started_datetime` < CURDATE() - INTERVAL 1 HOUR UNION select id from `vacature_saved_searches` where... | You can use a combination of DISTINCT and rephrasing the query to use OR clauses rather than unions: select DISTINCT id from `vacature_saved_searches` where ((`saved_search_interval` = 1 and DAYOFWEEK(CURDATE()) BETWEEN 2 AND 6) OR (`saved_search_interval` = 2 and DAYOFWEEK(CURDATE()) IN (2, 4, 6)) OR (`saved_search_in... | Removing duplication for this MYSQL union query I have a query with duplicate expressions in it. Could it be written more compact? select id from `vacature_saved_searches` where `saved_search_interval` = 1 and DAYOFWEEK(CURDATE()) BETWEEN 2 AND 6 and `last_processing_started_datetime` < CURDATE() - INTERVAL 1 HOUR UNIO... | TITLE:
Removing duplication for this MYSQL union query
QUESTION:
I have a query with duplicate expressions in it. Could it be written more compact? select id from `vacature_saved_searches` where `saved_search_interval` = 1 and DAYOFWEEK(CURDATE()) BETWEEN 2 AND 6 and `last_processing_started_datetime` < CURDATE() - IN... | [
"mysql",
"union"
] | 2 | 1 | 109 | 3 | 0 | 2011-06-01T07:10:19.253000 | 2011-06-01T07:20:09.917000 |
6,197,514 | 6,244,124 | Using Android's System Cache | I would like to use Android's system cache when downloading images as per these previous instructions: android system cache. I was able to get the following code working but the log statements are telling me that the images are never being read from the cache. try { //url = new URL("http://some.url.com/retrieve_image.p... | I found a better way to do it. If anyone else is having trouble after following the link android system cache, use this Google developer's blog post instead. The source code in that blog post is designed for a ListView but I am using it for all image retrievals. It downloads the image in an AsyncTask, puts a temporary ... | Using Android's System Cache I would like to use Android's system cache when downloading images as per these previous instructions: android system cache. I was able to get the following code working but the log statements are telling me that the images are never being read from the cache. try { //url = new URL("http://... | TITLE:
Using Android's System Cache
QUESTION:
I would like to use Android's system cache when downloading images as per these previous instructions: android system cache. I was able to get the following code working but the log statements are telling me that the images are never being read from the cache. try { //url ... | [
"android",
"image",
"caching",
"download",
"system"
] | 2 | 4 | 5,002 | 1 | 0 | 2011-06-01T07:11:11.540000 | 2011-06-05T16:12:59.947000 |
6,197,529 | 6,197,786 | How to get a progress bar on button click? | I am developing an android application in which I have passed a string from one activity to another activity, after getting it from a edit text box by clicking on "OK" button.The string is a url which gives a rss feed.So it takes a little bit time to load it.I want to show a progress bar to keep the interface interacti... | You can show the ProgressDialog in the NewActivity if it takes some time in getting rss feeds: take help from the following code: dialog = ProgressDialog.show(mParent,"","Loading,Please wait...", true);
final Thread t=new Thread(new Runnable() {
public void run() {
//get your rss feeds here } }); t.start();
Thread ... | How to get a progress bar on button click? I am developing an android application in which I have passed a string from one activity to another activity, after getting it from a edit text box by clicking on "OK" button.The string is a url which gives a rss feed.So it takes a little bit time to load it.I want to show a p... | TITLE:
How to get a progress bar on button click?
QUESTION:
I am developing an android application in which I have passed a string from one activity to another activity, after getting it from a edit text box by clicking on "OK" button.The string is a url which gives a rss feed.So it takes a little bit time to load it.... | [
"android",
"button",
"progress-bar"
] | 0 | 2 | 2,221 | 1 | 0 | 2011-06-01T07:12:45.833000 | 2011-06-01T07:40:26.183000 |
6,197,530 | 6,197,552 | Submit an <input type="file" /> using jQuery $.post | I have a tag which contains a file upload tag. I want to post the contents of the input tag to a php page using $.ajax() or $.post() but how do I grab the contents of the input tag having its type as "file"? so I can submit it using the jQuery ajax functions? Note: My code doesn't have a tag yet. I am not sure if its m... | A byte stream can't be part of an asynchronous request. In other words, you can't send data using AJAX approaches. | Submit an <input type="file" /> using jQuery $.post I have a tag which contains a file upload tag. I want to post the contents of the input tag to a php page using $.ajax() or $.post() but how do I grab the contents of the input tag having its type as "file"? so I can submit it using the jQuery ajax functions? Note: My... | TITLE:
Submit an <input type="file" /> using jQuery $.post
QUESTION:
I have a tag which contains a file upload tag. I want to post the contents of the input tag to a php page using $.ajax() or $.post() but how do I grab the contents of the input tag having its type as "file"? so I can submit it using the jQuery ajax f... | [
"php",
"jquery",
"file-upload"
] | 3 | 2 | 10,218 | 2 | 0 | 2011-06-01T07:12:51.387000 | 2011-06-01T07:15:23.717000 |
6,197,536 | 6,197,576 | How do sets differentiate between objects? | How does a set differentiate between objects in both Java and C++? Or do sets not differentiate them at all? Take these for example: C++ std::set aset; A a(1, 2); // Assume A has only two elements, and this constructor sets them both aset.insert(a); A a2(1, 2); // This would initialise a `A' object to the same values a... | In C++ the set depends on operator<() being defined for the class A, or that you supply a comparison object providing strict weak ordering to the set. | How do sets differentiate between objects? How does a set differentiate between objects in both Java and C++? Or do sets not differentiate them at all? Take these for example: C++ std::set aset; A a(1, 2); // Assume A has only two elements, and this constructor sets them both aset.insert(a); A a2(1, 2); // This would i... | TITLE:
How do sets differentiate between objects?
QUESTION:
How does a set differentiate between objects in both Java and C++? Or do sets not differentiate them at all? Take these for example: C++ std::set aset; A a(1, 2); // Assume A has only two elements, and this constructor sets them both aset.insert(a); A a2(1, 2... | [
"java",
"c++",
"set"
] | 1 | 7 | 622 | 6 | 0 | 2011-06-01T07:13:23.790000 | 2011-06-01T07:18:31.467000 |
6,197,542 | 6,198,388 | Sharepoint. Show list item version history dialog | I have custom page and id of list item. How can i show sharepoint version history dialog from my page? | The url format for the version histoy page is: http:// / /_layouts/versions.aspx?list= &ID= &FileName Use the SharePoint client API to open the page in a dialog: var options = SP.UI.$create_DialogOptions(); options.width = 500; options.height = 250; options.url =;
SP.UI.ModalDialog.showModalDialog(options); For a more... | Sharepoint. Show list item version history dialog I have custom page and id of list item. How can i show sharepoint version history dialog from my page? | TITLE:
Sharepoint. Show list item version history dialog
QUESTION:
I have custom page and id of list item. How can i show sharepoint version history dialog from my page?
ANSWER:
The url format for the version histoy page is: http:// / /_layouts/versions.aspx?list= &ID= &FileName Use the SharePoint client API to open ... | [
"javascript",
".net",
"sharepoint-2010",
"sharepoint-api"
] | 3 | 5 | 4,363 | 1 | 0 | 2011-06-01T07:13:53.010000 | 2011-06-01T08:37:44.727000 |
6,197,553 | 6,197,705 | How to remove comma from a div | I have a div with anchor tag separated with commas. I am checking if the count of anchor is more than six, if yes, I am hiding all the anchor tags, but the commas with space are remaining. How to remove commas along with the space? | One trick you could do is not adding those separators (commas) directly into the markup, but using CSS:after pseudo-selector and content property. This way the commas become attached to the links. HTML: link 1 link 2 link 3 link 4 CSS: a:after { content: ','; } a:last-child:after { content: ''; } Please check out my js... | How to remove comma from a div I have a div with anchor tag separated with commas. I am checking if the count of anchor is more than six, if yes, I am hiding all the anchor tags, but the commas with space are remaining. How to remove commas along with the space? | TITLE:
How to remove comma from a div
QUESTION:
I have a div with anchor tag separated with commas. I am checking if the count of anchor is more than six, if yes, I am hiding all the anchor tags, but the commas with space are remaining. How to remove commas along with the space?
ANSWER:
One trick you could do is not ... | [
"jquery",
"html",
"string"
] | 1 | 4 | 3,161 | 1 | 0 | 2011-06-01T07:15:33.660000 | 2011-06-01T07:31:49.150000 |
6,197,561 | 6,290,282 | hyperlink to open different web page with specific element in focus AND active | This problem refers to the main (header) nav menu on THIS PAGE. When any of the items in the "Services" drop-down submenu is clicked, I want the "Services" page to open (in the existing browser window) AND for a specific anchor tag element on the "Services" page to be in focus. I've achieved this OK. BUT, when the targ... | I'm not sure your use of "in focus" is quite what I expect... Having a fragment in the url doesn't necessarily give focus to that element, it just moves the display down to it. I assume the reason it works for tabbing is that tabbing does focus on elements and I assume it starts at the element that has been scrolled to... | hyperlink to open different web page with specific element in focus AND active This problem refers to the main (header) nav menu on THIS PAGE. When any of the items in the "Services" drop-down submenu is clicked, I want the "Services" page to open (in the existing browser window) AND for a specific anchor tag element o... | TITLE:
hyperlink to open different web page with specific element in focus AND active
QUESTION:
This problem refers to the main (header) nav menu on THIS PAGE. When any of the items in the "Services" drop-down submenu is clicked, I want the "Services" page to open (in the existing browser window) AND for a specific an... | [
"html",
"focus"
] | 0 | 0 | 1,907 | 1 | 0 | 2011-06-01T07:16:23.790000 | 2011-06-09T08:51:25.487000 |
6,197,562 | 6,199,506 | How to allow access to static content when having default servlet | I map all requests to /* to a specific servlet. My static content is hidden by this configuration. How can i allow access to specific files (such as crossdomain.xml)? | When you map /* to a specific servlet, all requests will be forwarded to that servlet, unless you provide a more explicit mapping to another servlet. That is, if you have /* mapped to ServletA, and /static/* mapped to ServletB, then following Servlets will get called. http://localhost:8080/abc.jpg -> ServletA http://lo... | How to allow access to static content when having default servlet I map all requests to /* to a specific servlet. My static content is hidden by this configuration. How can i allow access to specific files (such as crossdomain.xml)? | TITLE:
How to allow access to static content when having default servlet
QUESTION:
I map all requests to /* to a specific servlet. My static content is hidden by this configuration. How can i allow access to specific files (such as crossdomain.xml)?
ANSWER:
When you map /* to a specific servlet, all requests will be ... | [
"java",
"servlets"
] | 3 | 2 | 699 | 4 | 0 | 2011-06-01T07:16:25.370000 | 2011-06-01T10:09:23.563000 |
6,197,566 | 6,203,004 | Adding a new message field in comment form using form_alter, want to know if it's correctly done | I want to know if it is done correctly and want suggestions of improvement. I've just now added this warning in the comment form: →Comment Writing Instructions: Comments written in incorrect English, improper grammar, using short forms, using Hindi words etc - those comments will be deleted. Please scroll down in this ... | It is the correct way to alter form. However, it will be more user-friendly if text is shown just before or after comment textarea. You should hide "input format" fieldset as well. In your code, you should surround all written sentences in t() as long as you can translate your sentence. Example of rewritting of your co... | Adding a new message field in comment form using form_alter, want to know if it's correctly done I want to know if it is done correctly and want suggestions of improvement. I've just now added this warning in the comment form: →Comment Writing Instructions: Comments written in incorrect English, improper grammar, using... | TITLE:
Adding a new message field in comment form using form_alter, want to know if it's correctly done
QUESTION:
I want to know if it is done correctly and want suggestions of improvement. I've just now added this warning in the comment form: →Comment Writing Instructions: Comments written in incorrect English, impro... | [
"drupal",
"drupal-6"
] | 0 | 0 | 313 | 1 | 0 | 2011-06-01T07:16:53.933000 | 2011-06-01T14:41:45.137000 |
6,197,572 | 6,198,349 | Change statusbar onmouseover in a DIV | I've a DIV as a button using onclick and want to change the statusbar information shown using onmouseover. But it doesn't work: Is there any special I've missed? | Unless there is something else going on that you are not telling us about, you are mimicking the behavior of a normal link. You should just use a link instead of a div. It's easy to style a link to look like a button with a little CSS. The reason you don't see the changes you are trying to make to the status bar is bec... | Change statusbar onmouseover in a DIV I've a DIV as a button using onclick and want to change the statusbar information shown using onmouseover. But it doesn't work: Is there any special I've missed? | TITLE:
Change statusbar onmouseover in a DIV
QUESTION:
I've a DIV as a button using onclick and want to change the statusbar information shown using onmouseover. But it doesn't work: Is there any special I've missed?
ANSWER:
Unless there is something else going on that you are not telling us about, you are mimicking ... | [
"javascript",
"html",
"onclick",
"onmouseover"
] | 0 | 3 | 1,499 | 1 | 0 | 2011-06-01T07:17:49.610000 | 2011-06-01T08:33:18.140000 |
6,197,578 | 6,198,571 | Ruby - Module :: NoMethodError | I have a module like this: module Prober def probe_invoke(type, data = {}) p = Probe.new({:probe_type => type.to_s,:data => data.to_json,:probe_status => 0,:retries => 0}) p.save end end And I am trying to access this from my main program like this: require 'prober' Prober.probe_invoke("send_sms", sms_text) But it gene... | Apart from the answers that give you the option of defining the function as self., you have another option of including the module and calling it without the module reference like this: module Prober def probe_invoke(type, data = {}) p = Probe.new({:probe_type => type.to_s,:data => data.to_json,:probe_status => 0,:retr... | Ruby - Module :: NoMethodError I have a module like this: module Prober def probe_invoke(type, data = {}) p = Probe.new({:probe_type => type.to_s,:data => data.to_json,:probe_status => 0,:retries => 0}) p.save end end And I am trying to access this from my main program like this: require 'prober' Prober.probe_invoke("s... | TITLE:
Ruby - Module :: NoMethodError
QUESTION:
I have a module like this: module Prober def probe_invoke(type, data = {}) p = Probe.new({:probe_type => type.to_s,:data => data.to_json,:probe_status => 0,:retries => 0}) p.save end end And I am trying to access this from my main program like this: require 'prober' Prob... | [
"ruby",
"module",
"nomethoderror"
] | 33 | 25 | 24,369 | 4 | 0 | 2011-06-01T07:18:44.183000 | 2011-06-01T08:54:16.537000 |
6,197,594 | 6,197,930 | Android: How NOT to save instance state? | My app has login, once the access is granted, it creates a new html file to the sdcard, the output or the appearance of that html file depends on the account of the logger. After writing, the app goes to the next activity Intent nextActivity = new Intent(MyMainAct.this, AppView.class); startActivity(nextActivity); the ... | Make sure that when user chooses the "login as different user" option, activity showing the HTML is finish ed (i.e. call the finish method on it). If you then ignore the savedInstanceState parameter in its onCreate event (which you likely do, I presume), the next time this activity is started it will be totally new ins... | Android: How NOT to save instance state? My app has login, once the access is granted, it creates a new html file to the sdcard, the output or the appearance of that html file depends on the account of the logger. After writing, the app goes to the next activity Intent nextActivity = new Intent(MyMainAct.this, AppView.... | TITLE:
Android: How NOT to save instance state?
QUESTION:
My app has login, once the access is granted, it creates a new html file to the sdcard, the output or the appearance of that html file depends on the account of the logger. After writing, the app goes to the next activity Intent nextActivity = new Intent(MyMain... | [
"java",
"android",
"webview",
"instance",
"bundle"
] | 2 | 0 | 3,714 | 2 | 0 | 2011-06-01T07:20:50.883000 | 2011-06-01T07:53:16.313000 |
6,197,597 | 6,287,881 | plink process doesn't end if calling user isn't logged in | I'm calling plink from C# code which is running as a certain Windows user. I call plink like plink.exe user@hostname -pw password commands Usually the plink process ends immediately after the commands have been run, but when the user which the code runs under is not logged into Windows, the plink process doesn't end. A... | This could be because the first time you connect to a new server PuTTY registers a host key in the registry, under the currently logged in user (under HKEY_CURRENT_USER). With that user not being logged in, that portion of the registry may be inaccessible. Try moving the key to HKEY_LOCAL_SYSTEM. That process is descri... | plink process doesn't end if calling user isn't logged in I'm calling plink from C# code which is running as a certain Windows user. I call plink like plink.exe user@hostname -pw password commands Usually the plink process ends immediately after the commands have been run, but when the user which the code runs under is... | TITLE:
plink process doesn't end if calling user isn't logged in
QUESTION:
I'm calling plink from C# code which is running as a certain Windows user. I call plink like plink.exe user@hostname -pw password commands Usually the plink process ends immediately after the commands have been run, but when the user which the ... | [
"c#",
"windows-server-2008-r2",
"plink"
] | 1 | 2 | 842 | 1 | 0 | 2011-06-01T07:21:05.103000 | 2011-06-09T03:48:29.080000 |
6,197,599 | 6,277,846 | CSS is conflicting with ASP.NET table control | I have some radio buttons on which I have applied css to align them. Here is the image: These are all placed in a table and third column of table contains one listbox or dropdown list against each pair of radio button and when I click the second radio button, hidden listbox or dropdown appears in the third column. As I... | This is happening because you have created float based layout on the various block elements. Floating elements break out of the normal flow of the page. You don't think you need to apply float on the td 's. You can make use of the text-align: left; for aligning the element in the td. | CSS is conflicting with ASP.NET table control I have some radio buttons on which I have applied css to align them. Here is the image: These are all placed in a table and third column of table contains one listbox or dropdown list against each pair of radio button and when I click the second radio button, hidden listbox... | TITLE:
CSS is conflicting with ASP.NET table control
QUESTION:
I have some radio buttons on which I have applied css to align them. Here is the image: These are all placed in a table and third column of table contains one listbox or dropdown list against each pair of radio button and when I click the second radio butt... | [
"css",
"asp.net",
"html-table"
] | 2 | 1 | 1,168 | 1 | 0 | 2011-06-01T07:21:20.790000 | 2011-06-08T11:12:51.377000 |
6,197,600 | 6,213,805 | jQuery form Submit not working in JSF? | I have a JSf form, I am tryin' to use jQuery Ui dialog plugin to submit the form. here's the code snippet. function confirmSubmit() { $('#dialog').dialog('open'); return false; }
$('#dialog').dialog({ autoOpen: false, width: 400, modal: true, resizable: false, buttons: { "Submit Form": function() { document.myForm.sub... | It's done, some JSF parameters were missing. which jsf adds during form submissiom, I added them using jQuery: $("a[id$='search']").click(function() { var input = $(" ").attr("type", "hidden").attr("name", "myForm:search").val("myForm:search"); $('#myForm').append($(input)); $("p#dialog-email").html(titleVar); $('#dial... | jQuery form Submit not working in JSF? I have a JSf form, I am tryin' to use jQuery Ui dialog plugin to submit the form. here's the code snippet. function confirmSubmit() { $('#dialog').dialog('open'); return false; }
$('#dialog').dialog({ autoOpen: false, width: 400, modal: true, resizable: false, buttons: { "Submit ... | TITLE:
jQuery form Submit not working in JSF?
QUESTION:
I have a JSf form, I am tryin' to use jQuery Ui dialog plugin to submit the form. here's the code snippet. function confirmSubmit() { $('#dialog').dialog('open'); return false; }
$('#dialog').dialog({ autoOpen: false, width: 400, modal: true, resizable: false, b... | [
"java",
"jquery",
"jquery-ui",
"jsf"
] | 2 | 0 | 3,486 | 2 | 0 | 2011-06-01T07:21:21.250000 | 2011-06-02T11:17:01.967000 |
6,197,602 | 6,197,723 | do draw() and measure() methods in android clash? | i was just looking up how the views are drawn in android and i was reading the documentation that in provided on the developer site. i understood most of it, except for the following question: setting context for the question when a view is drawing itself, it will first call measure on itself and all its children.. whe... | The draw method is not considering the needs. OnMeasure is the one that does it. In the onMeasure you return your desired size. This is the place where the component and their parents 'negotiate' the size. Of course, you can always end up with insufficient space. But this holds true for all other components - giva a Te... | do draw() and measure() methods in android clash? i was just looking up how the views are drawn in android and i was reading the documentation that in provided on the developer site. i understood most of it, except for the following question: setting context for the question when a view is drawing itself, it will first... | TITLE:
do draw() and measure() methods in android clash?
QUESTION:
i was just looking up how the views are drawn in android and i was reading the documentation that in provided on the developer site. i understood most of it, except for the following question: setting context for the question when a view is drawing its... | [
"android"
] | 0 | 0 | 592 | 1 | 0 | 2011-06-01T07:21:36.347000 | 2011-06-01T07:33:34.907000 |
6,197,608 | 6,197,791 | Is it possible to use just one Qt module, just like a 3rd party dll? | I'd been looking for a DB access library for C++ which will run under Windows. I tried SOCI: does not compile SQLAPI++: not free Next option was to use Qt's DB access module, QtSql. Is it possible only to use QtSql without importing or linking any other Qt stuff? | Yes you can compile against only a part of the Qt Dlls. But I guess in all cases you have to build against QtCore too. So your.pro file should have qt += core sql | Is it possible to use just one Qt module, just like a 3rd party dll? I'd been looking for a DB access library for C++ which will run under Windows. I tried SOCI: does not compile SQLAPI++: not free Next option was to use Qt's DB access module, QtSql. Is it possible only to use QtSql without importing or linking any oth... | TITLE:
Is it possible to use just one Qt module, just like a 3rd party dll?
QUESTION:
I'd been looking for a DB access library for C++ which will run under Windows. I tried SOCI: does not compile SQLAPI++: not free Next option was to use Qt's DB access module, QtSql. Is it possible only to use QtSql without importing ... | [
"database",
"qt",
"qtsql"
] | 3 | 3 | 191 | 1 | 0 | 2011-06-01T07:22:06.847000 | 2011-06-01T07:40:53.843000 |
6,197,609 | 6,197,734 | Getting the data for a pie chart | Say, I have a model that defines a Car and one of its field is 'manufacturer'. For example: class Car(models.Model): manufacturer = models.CharField(max_length=50) color = models.CharField(max_length=50) licence_plate = models.CharField(max_length=50)... To draw a pie chart showing the totals for the various manufactur... | Not sure this is quite correct, but you need something like: from django.db.models import Count, Sum
num_taken = 5 # modify this if you want more/less than 5 query = Car.objects.values('manufacturer').annotate(num_cars=Count('manufacturer')).order_by('-num_cars') top_cars = query[:num_taken] others = query[num_taken:]... | Getting the data for a pie chart Say, I have a model that defines a Car and one of its field is 'manufacturer'. For example: class Car(models.Model): manufacturer = models.CharField(max_length=50) color = models.CharField(max_length=50) licence_plate = models.CharField(max_length=50)... To draw a pie chart showing the ... | TITLE:
Getting the data for a pie chart
QUESTION:
Say, I have a model that defines a Car and one of its field is 'manufacturer'. For example: class Car(models.Model): manufacturer = models.CharField(max_length=50) color = models.CharField(max_length=50) licence_plate = models.CharField(max_length=50)... To draw a pie ... | [
"python",
"django"
] | 0 | 0 | 200 | 2 | 0 | 2011-06-01T07:22:07.347000 | 2011-06-01T07:34:11.693000 |
6,197,628 | 6,197,751 | Equivalent for $.trim in Javascript? | $.trim(value); The above jquery code would trim the text. I need to trim the string using Javascript. I tried: link_content = " check "; trim_check = link_content.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,''); How to use trim in javascript? Equivalent of $.trim() of jQuery? | JavaScript 1.8.1 includes the trim method on String objects. This code will add support for the trim method in browsers that do not have a native implementation: (function () { if (!String.prototype.trim) { /** * Trim whitespace from each end of a String * @returns {String} the original String with whitespace removed f... | Equivalent for $.trim in Javascript? $.trim(value); The above jquery code would trim the text. I need to trim the string using Javascript. I tried: link_content = " check "; trim_check = link_content.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,''); How to use trim in javascript? Equivalent of $.trim() of ... | TITLE:
Equivalent for $.trim in Javascript?
QUESTION:
$.trim(value); The above jquery code would trim the text. I need to trim the string using Javascript. I tried: link_content = " check "; trim_check = link_content.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,''); How to use trim in javascript? Equivale... | [
"javascript",
"jquery"
] | 4 | 10 | 3,060 | 3 | 0 | 2011-06-01T07:24:03.940000 | 2011-06-01T07:35:35.397000 |
6,197,634 | 6,197,663 | Ternary operator with Linq-to-SQL causing problems? | I have the following Linq-to-SQL statement: return db.Photos.SingleOrDefault(p => p.PhotoID == id && includePending? true: p.Live); For includePending I am passing false. In the database, "Live" is true for all but 2 photos. However instead of returning one photo as expected, it returns ALL photos in the database excep... | I don't remember the full precedence rules by heart, but your condition is equivalent to: p => (p.PhotoID == id && includePending)? true: p.Live whereas you want: p => p.PhotoID == id && (includePending? true: p.Live) Just use the latter form to make it explicit, or even change it to not use the conditional: p => p.Pho... | Ternary operator with Linq-to-SQL causing problems? I have the following Linq-to-SQL statement: return db.Photos.SingleOrDefault(p => p.PhotoID == id && includePending? true: p.Live); For includePending I am passing false. In the database, "Live" is true for all but 2 photos. However instead of returning one photo as e... | TITLE:
Ternary operator with Linq-to-SQL causing problems?
QUESTION:
I have the following Linq-to-SQL statement: return db.Photos.SingleOrDefault(p => p.PhotoID == id && includePending? true: p.Live); For includePending I am passing false. In the database, "Live" is true for all but 2 photos. However instead of return... | [
"c#",
"linq-to-sql"
] | 2 | 13 | 3,552 | 1 | 0 | 2011-06-01T07:24:45.907000 | 2011-06-01T07:27:16.483000 |
6,197,638 | 6,211,547 | picture gallery with small thumbnails, medium size image and full size lightbox view | Is there any javascript, css, ajax product gallery (even paid) that would have image (e.g. 400x300) with 5-6 thumbnails (e.g. 80x60) and lightbox (800x600) when the 400x300 image is clicked? I need a gallery script like this: http://www.neosport.pl/product-pol-942-Buty-Nike-315343-101.html | I've found an answer on my own. The simplest solution is to use css gallery from: http://www.sohtanaka.com/web-design/css-multiple-image-viewer-thumbnails/ and then for big picture use any lightbox-like script (I used shadowbox with jQuery adapter from http://www.shadowbox-js.com/index.html ) | picture gallery with small thumbnails, medium size image and full size lightbox view Is there any javascript, css, ajax product gallery (even paid) that would have image (e.g. 400x300) with 5-6 thumbnails (e.g. 80x60) and lightbox (800x600) when the 400x300 image is clicked? I need a gallery script like this: http://ww... | TITLE:
picture gallery with small thumbnails, medium size image and full size lightbox view
QUESTION:
Is there any javascript, css, ajax product gallery (even paid) that would have image (e.g. 400x300) with 5-6 thumbnails (e.g. 80x60) and lightbox (800x600) when the 400x300 image is clicked? I need a gallery script li... | [
"javascript",
"css",
"ajax",
"gallery"
] | 0 | 0 | 1,240 | 1 | 0 | 2011-06-01T07:25:04.443000 | 2011-06-02T07:11:36.897000 |
6,197,639 | 6,199,626 | Memory usage and garbage collection of Objects in AS3 | I want to know about the Object type specifically when it comes to garbage collection in Flash. I know that items will be ready for garbage collection in situations like this: // create var ar:Array = [];
var mc:MovieClip = new MovieClip(); mc.addEventLisntener(blah, blah);
ar.push(mc); addChild(mc);
// kill & gc ar... | To see what happen with the GC you can use a Dictionary with a weak reference set to true and using the object you want to cheeck as a key: var d:Dictionary = new Dictionary(true) d[myObject] = whatever when the object will not be longer available it will be delete from the dictionary. here a complete sample based on y... | Memory usage and garbage collection of Objects in AS3 I want to know about the Object type specifically when it comes to garbage collection in Flash. I know that items will be ready for garbage collection in situations like this: // create var ar:Array = [];
var mc:MovieClip = new MovieClip(); mc.addEventLisntener(bla... | TITLE:
Memory usage and garbage collection of Objects in AS3
QUESTION:
I want to know about the Object type specifically when it comes to garbage collection in Flash. I know that items will be ready for garbage collection in situations like this: // create var ar:Array = [];
var mc:MovieClip = new MovieClip(); mc.add... | [
"flash",
"actionscript-3",
"garbage-collection"
] | 5 | 3 | 1,071 | 2 | 0 | 2011-06-01T07:25:06.267000 | 2011-06-01T10:20:29.883000 |
6,197,641 | 6,197,721 | 24hr & uiDatePicker | I need the time from my uiDatePicker to be in 24hr format, I understand you can't force this mode if the device is set to display AM/PM? If thats the case, how can I detect the device is in 24hr mode (or not) so I can add 12 to my PM times? Many thanks for any help... | Wel you can, you need to set the local: NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"]; NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"NL"]; NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"]; [formatter setTimeZone:timeZone]; [f... | 24hr & uiDatePicker I need the time from my uiDatePicker to be in 24hr format, I understand you can't force this mode if the device is set to display AM/PM? If thats the case, how can I detect the device is in 24hr mode (or not) so I can add 12 to my PM times? Many thanks for any help... | TITLE:
24hr & uiDatePicker
QUESTION:
I need the time from my uiDatePicker to be in 24hr format, I understand you can't force this mode if the device is set to display AM/PM? If thats the case, how can I detect the device is in 24hr mode (or not) so I can add 12 to my PM times? Many thanks for any help...
ANSWER:
Wel ... | [
"iphone",
"nsdate",
"uidatepicker"
] | 1 | 2 | 3,190 | 1 | 0 | 2011-06-01T07:25:08.950000 | 2011-06-01T07:33:32.517000 |
6,197,642 | 6,208,481 | DataTables add column dynamically to table | I'm using DataTables ( datatables.net ) to display data from an Ajax source and having trouble customizing it. One thing I would like to do is add a column so I can have for example an 'edit' button for each row. The closest thing to that in the examples is here but I can't get that to work with an ajax source. Current... | Why don't you use fnRenderFunction in the aoColumns? As an example: aoColumns: [ { "bVisible": false}, null, null, null, null, { "sName": "ID", "bSearchable": false, "bSortable": false, "fnRender": function (oObj) { return " Edit "; } } ] You can use it to format the value from the server side. See similar example on t... | DataTables add column dynamically to table I'm using DataTables ( datatables.net ) to display data from an Ajax source and having trouble customizing it. One thing I would like to do is add a column so I can have for example an 'edit' button for each row. The closest thing to that in the examples is here but I can't ge... | TITLE:
DataTables add column dynamically to table
QUESTION:
I'm using DataTables ( datatables.net ) to display data from an Ajax source and having trouble customizing it. One thing I would like to do is add a column so I can have for example an 'edit' button for each row. The closest thing to that in the examples is h... | [
"javascript",
"jquery",
"gridview",
"datatables"
] | 8 | 11 | 29,933 | 4 | 0 | 2011-06-01T07:25:24.710000 | 2011-06-01T22:27:51.890000 |
6,197,646 | 6,198,187 | Understanding Uniform Grid control | I was just trying uniform grid, how it works. Code: I found that both buttons are placed adjacent to each other, however there exist a column between them. Why is it so? (as in uniform grid, each cell has similar size there should be one cell between them) Understood why it is so (by answer) but still curious to konw w... | UniformGrid contains two properties, Rows and Columns, for setting the number of rows and columns. Controls are added to the grid in the order that they are declared. So there will not be any column in between them. In your example you have declared Columns=3 and you have added only two controls. But if you add another... | Understanding Uniform Grid control I was just trying uniform grid, how it works. Code: I found that both buttons are placed adjacent to each other, however there exist a column between them. Why is it so? (as in uniform grid, each cell has similar size there should be one cell between them) Understood why it is so (by ... | TITLE:
Understanding Uniform Grid control
QUESTION:
I was just trying uniform grid, how it works. Code: I found that both buttons are placed adjacent to each other, however there exist a column between them. Why is it so? (as in uniform grid, each cell has similar size there should be one cell between them) Understood... | [
"wpf",
"wpf-controls",
"uniformgrid"
] | 33 | 57 | 69,771 | 3 | 0 | 2011-06-01T07:25:42.510000 | 2011-06-01T08:17:53.843000 |
6,197,648 | 6,197,724 | create EAR file in Jdeveloper | I have created a SOA project in JDeveloper. not I want to create a EAR file for deploying the project in Developement. I tried by creating deployment profile, but ear option always disable for this. and when i create simple j2ee project, then I can create ear for project. please tell me how can I generate ear file from... | Assuming that you meant a SOA project to be a SOA Composite project, you'll need to be aware of the fact that SOA Composites are not deployed in the form of EAR files. Instead, SAR (SOA archives) files are created and provided for deployment. Details on how to create and deploy SAR files from JDeveloper can be found in... | create EAR file in Jdeveloper I have created a SOA project in JDeveloper. not I want to create a EAR file for deploying the project in Developement. I tried by creating deployment profile, but ear option always disable for this. and when i create simple j2ee project, then I can create ear for project. please tell me ho... | TITLE:
create EAR file in Jdeveloper
QUESTION:
I have created a SOA project in JDeveloper. not I want to create a EAR file for deploying the project in Developement. I tried by creating deployment profile, but ear option always disable for this. and when i create simple j2ee project, then I can create ear for project.... | [
"java",
"soa",
"jdeveloper",
"bpel"
] | 0 | 1 | 2,071 | 1 | 0 | 2011-06-01T07:25:43.213000 | 2011-06-01T07:33:35.483000 |
6,197,661 | 6,217,020 | Apache HttpClient - Retry-After header | Any idea how apache http client handles Retry-After header? Apache has given default retry handler implementation, but I am not able to see any retry header based logic there. if it does not handles the retry header, whats the proper way to implement it. (date parsing and sleep logic) | I found following link where we can see sample implementation for handling retry header https://issues.apache.org/jira/browse/SHINDIG-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel | Apache HttpClient - Retry-After header Any idea how apache http client handles Retry-After header? Apache has given default retry handler implementation, but I am not able to see any retry header based logic there. if it does not handles the retry header, whats the proper way to implement it. (date parsing and sleep lo... | TITLE:
Apache HttpClient - Retry-After header
QUESTION:
Any idea how apache http client handles Retry-After header? Apache has given default retry handler implementation, but I am not able to see any retry header based logic there. if it does not handles the retry header, whats the proper way to implement it. (date pa... | [
"java",
"http-headers",
"apache-commons-httpclient"
] | 1 | 1 | 2,124 | 1 | 0 | 2011-06-01T07:27:03.820000 | 2011-06-02T15:59:33.073000 |
6,197,664 | 6,199,027 | set value to jquery autocomplete combobox | I am using jquery autocomplete combobox and everything is ok. But I also want to set specific value through JavaScript like $("#value").val("somevalue") and it set to select element, but no changes in input element with autocomplete. Of course, I can select this input and set value directly, but is it some other ways t... | Is this demo what you are looking for? The link sets the value of the jQuery UI autocomplete to Java. The focus is left on the input so that the normal keyboard events can be used to navigate the options. Edit: How about adding another function to the combobox like this: autocomplete: function(value) { this.element.val... | set value to jquery autocomplete combobox I am using jquery autocomplete combobox and everything is ok. But I also want to set specific value through JavaScript like $("#value").val("somevalue") and it set to select element, but no changes in input element with autocomplete. Of course, I can select this input and set v... | TITLE:
set value to jquery autocomplete combobox
QUESTION:
I am using jquery autocomplete combobox and everything is ok. But I also want to set specific value through JavaScript like $("#value").val("somevalue") and it set to select element, but no changes in input element with autocomplete. Of course, I can select th... | [
"javascript",
"jquery",
"jquery-ui",
"jquery-ui-autocomplete"
] | 10 | 28 | 62,628 | 5 | 0 | 2011-06-01T07:27:33.207000 | 2011-06-01T09:29:20.630000 |
6,197,671 | 6,197,753 | which datatype to use to store a mobile number | Which datatype shall I use to store mobile numbers of 10 digits (Ex.:9932234242). Shall I go for varchar(10) or for the big one- the "bigint". If the number is of type- '0021-23141231', then which datatype to use? | varchar/char long enough for all expected (eg UK numbers are 11 long) check constraint to allow only digits (expression = NOT LIKE '%[^0-9]%' ) format in the client per locale (UK = 07123 456 789, Switzerland = 071 234 56 78 ) | which datatype to use to store a mobile number Which datatype shall I use to store mobile numbers of 10 digits (Ex.:9932234242). Shall I go for varchar(10) or for the big one- the "bigint". If the number is of type- '0021-23141231', then which datatype to use? | TITLE:
which datatype to use to store a mobile number
QUESTION:
Which datatype shall I use to store mobile numbers of 10 digits (Ex.:9932234242). Shall I go for varchar(10) or for the big one- the "bigint". If the number is of type- '0021-23141231', then which datatype to use?
ANSWER:
varchar/char long enough for all... | [
"sql-server-2005",
"sql-server-2008",
"sql-server-express",
"sqldatatypes"
] | 12 | 14 | 107,563 | 4 | 0 | 2011-06-01T07:28:36.473000 | 2011-06-01T07:35:51.293000 |
6,197,674 | 6,197,822 | SeekBar with decimal values | Do I create a create SeekBar that uses decimal values? For example, it would display 0.0, 0.1, 0.2, 0.3,..., 5.5, 5.6, 5.7,..., 9.9, 10.0 | A SeekBar defaults to a value between 0 and 100. When the onProgressChanged function is called from the SeekBar's change listener, the progress number is passed in the progress parameter. If you wanted to convert this progress into a decimal from 0.0 -> 10.0 to display or process, all you would need to do is divide the... | SeekBar with decimal values Do I create a create SeekBar that uses decimal values? For example, it would display 0.0, 0.1, 0.2, 0.3,..., 5.5, 5.6, 5.7,..., 9.9, 10.0 | TITLE:
SeekBar with decimal values
QUESTION:
Do I create a create SeekBar that uses decimal values? For example, it would display 0.0, 0.1, 0.2, 0.3,..., 5.5, 5.6, 5.7,..., 9.9, 10.0
ANSWER:
A SeekBar defaults to a value between 0 and 100. When the onProgressChanged function is called from the SeekBar's change listen... | [
"android",
"seekbar"
] | 9 | 15 | 15,974 | 2 | 0 | 2011-06-01T07:28:51.360000 | 2011-06-01T07:44:13.603000 |
6,197,676 | 6,198,980 | How do I update part of a texture? | It seems as though glTexSubImage2D requires a pointer to the full texture buffer. How does one make partial updates to a texture by only providing a pointer to the update region rather than the whole buffer? For example if I want to overlay a second image onto an existing texture, rather than copy the image data onto m... | Where do you get the notion that glTexSubImage2D requires a pointer to the full texture buffer? From the documentation linked above, it seems to me that the last parameter is a pointer to the buffer containing your new data only. The other parameters are what you use to specify which texture object to update (just an O... | How do I update part of a texture? It seems as though glTexSubImage2D requires a pointer to the full texture buffer. How does one make partial updates to a texture by only providing a pointer to the update region rather than the whole buffer? For example if I want to overlay a second image onto an existing texture, rat... | TITLE:
How do I update part of a texture?
QUESTION:
It seems as though glTexSubImage2D requires a pointer to the full texture buffer. How does one make partial updates to a texture by only providing a pointer to the update region rather than the whole buffer? For example if I want to overlay a second image onto an exi... | [
"opengl"
] | 5 | 8 | 5,356 | 1 | 0 | 2011-06-01T07:29:11.453000 | 2011-06-01T09:26:17.750000 |
6,197,683 | 6,197,711 | Exclude multiple values in if clause | I have 30 sites and I need to echo something on 24 of them. How can I exclude the others? This code doesn't work cause i think it's logic is faux:) $currentsite = get_bloginfo('wpurl'); // Here i get the curent site. If the current site matches any of the 6 below, the if clause should not run. if ( $currentsite!= 'site... | You can put your url-s in an array of strings: $linksArray = array(); $linksArray[] = 'site1'; $linksArray[] = 'site2'; $linksArray[] = 'site3'; $linksArray[] = 'site4'; $linksArray[] = 'site5'; $linksArray[] = 'site6'; and after that you can use the in_array() function like this: if (!in_array($currentsite, $linksArra... | Exclude multiple values in if clause I have 30 sites and I need to echo something on 24 of them. How can I exclude the others? This code doesn't work cause i think it's logic is faux:) $currentsite = get_bloginfo('wpurl'); // Here i get the curent site. If the current site matches any of the 6 below, the if clause shou... | TITLE:
Exclude multiple values in if clause
QUESTION:
I have 30 sites and I need to echo something on 24 of them. How can I exclude the others? This code doesn't work cause i think it's logic is faux:) $currentsite = get_bloginfo('wpurl'); // Here i get the curent site. If the current site matches any of the 6 below, ... | [
"php",
"if-statement"
] | 2 | 4 | 1,666 | 2 | 0 | 2011-06-01T07:30:02.247000 | 2011-06-01T07:32:30.990000 |
6,197,684 | 6,198,214 | Have Entity Framework ignore derived types | in my current project I'm using code first approach. I have a type called Task which is part of the model. I also have BackgroundTask derived from Task and UserAccountTask derived from BackgroundTask. When I simply try to create an object of type Task and add it to my task repository, I get a DbUpdateException as soon ... | Try to use this in your derived context: protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Ignore (); modelBuilder.Ignore (); } | Have Entity Framework ignore derived types in my current project I'm using code first approach. I have a type called Task which is part of the model. I also have BackgroundTask derived from Task and UserAccountTask derived from BackgroundTask. When I simply try to create an object of type Task and add it to my task rep... | TITLE:
Have Entity Framework ignore derived types
QUESTION:
in my current project I'm using code first approach. I have a type called Task which is part of the model. I also have BackgroundTask derived from Task and UserAccountTask derived from BackgroundTask. When I simply try to create an object of type Task and add... | [
"inheritance",
"entity-framework-4.1",
"code-first"
] | 7 | 18 | 3,810 | 1 | 0 | 2011-06-01T07:30:04.600000 | 2011-06-01T08:20:44.473000 |
6,197,691 | 6,204,964 | Is it ideal to call 3 times to the webservice to get data in RESTful model or once and get all it together - IN MOBILE APPLICATION? | We are developing a mobile application(iPhone, Android, WM) which mainly connects with the server using RESTful services. We are in the process of developing the webservices which are RESTful. The question here is.. we have a details window for the customer where he sees his basic info, comments by others, his comments... | Since RESTful applications depend on caching for performance, you have to strike a balance: larger messages can mean fewer requests due to cache misses, while smaller messages can mean less bandwidth overall. Smaller messages may also be required to maintain proper cache invalidation boundaries. I previously gave a sim... | Is it ideal to call 3 times to the webservice to get data in RESTful model or once and get all it together - IN MOBILE APPLICATION? We are developing a mobile application(iPhone, Android, WM) which mainly connects with the server using RESTful services. We are in the process of developing the webservices which are REST... | TITLE:
Is it ideal to call 3 times to the webservice to get data in RESTful model or once and get all it together - IN MOBILE APPLICATION?
QUESTION:
We are developing a mobile application(iPhone, Android, WM) which mainly connects with the server using RESTful services. We are in the process of developing the webservi... | [
"web-services",
"rest",
"mobile"
] | 1 | 1 | 104 | 1 | 0 | 2011-06-01T07:30:20.500000 | 2011-06-01T17:02:47.160000 |
6,197,700 | 6,198,321 | How to display a set number of rows in UITableView? | How do i display set number of rows in a UITableView? i.e if my data source has only 4 objects then i want the table to display on those 4 rows without any blank rows. any ideas? thanks! EDIT: i wasn't too clear about the question so.. So this is my table: https://i.stack.imgur.com/glkWZ.png.. i want to display only th... | You have to change your table appearance, I think. Once you correctly set the numberOfSectionsInTableView: and tableView:numberOfRowsInSection: methods, you should change your viewDidLoad method adding this line: [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; This way you will remove all lines fr... | How to display a set number of rows in UITableView? How do i display set number of rows in a UITableView? i.e if my data source has only 4 objects then i want the table to display on those 4 rows without any blank rows. any ideas? thanks! EDIT: i wasn't too clear about the question so.. So this is my table: https://i.s... | TITLE:
How to display a set number of rows in UITableView?
QUESTION:
How do i display set number of rows in a UITableView? i.e if my data source has only 4 objects then i want the table to display on those 4 rows without any blank rows. any ideas? thanks! EDIT: i wasn't too clear about the question so.. So this is my ... | [
"iphone",
"objective-c",
"uitableview"
] | 4 | 3 | 8,842 | 6 | 0 | 2011-06-01T07:31:05.507000 | 2011-06-01T08:30:39.497000 |
6,197,701 | 6,200,420 | How to construct a database driven Jquery dropdown menu in asp.net | I am trying to build a fancy jquery dropdown menu,while making the menu items dynamic by bringing the values of menu items from database. I am using asp.net and sql server 2005 as my database,Is their any simple article to work this? | http://encosia.com/using-jquery-to-directly-call-aspnet-ajax-page-methods/ Create a page method that your jquery ajax can call and get results from. Populate the dropdown on click, just remember to do something to let the user know that the values are coming since the database might not respond instantly. | How to construct a database driven Jquery dropdown menu in asp.net I am trying to build a fancy jquery dropdown menu,while making the menu items dynamic by bringing the values of menu items from database. I am using asp.net and sql server 2005 as my database,Is their any simple article to work this? | TITLE:
How to construct a database driven Jquery dropdown menu in asp.net
QUESTION:
I am trying to build a fancy jquery dropdown menu,while making the menu items dynamic by bringing the values of menu items from database. I am using asp.net and sql server 2005 as my database,Is their any simple article to work this?
... | [
"jquery",
"asp.net",
"sql-server",
"asp.net-mvc",
"drop-down-menu"
] | 1 | 3 | 2,449 | 2 | 0 | 2011-06-01T07:31:42.357000 | 2011-06-01T11:30:06.817000 |
6,197,703 | 6,224,843 | WPF LifeCyle in an Add-in | I've created an add-in, which call via Reflection, a WPF Class Library. Since this is a class library, I had to instanciate manually a new System.Windows.Application(). Then, the class constructor (the one called via reflection) create a window, and Show() (with Dispatcher.Run() to avoid the window to close immediately... | Finally, I solved the problem using an infinite loop to stay the thread in running state, with AutoResetEvent / ManualResetEvent to start/stop the thread... As the thread never finish (and call a method which load the WPF UI dll when he receive the start event), we never stop the thread (until we stop the Add-in), and ... | WPF LifeCyle in an Add-in I've created an add-in, which call via Reflection, a WPF Class Library. Since this is a class library, I had to instanciate manually a new System.Windows.Application(). Then, the class constructor (the one called via reflection) create a window, and Show() (with Dispatcher.Run() to avoid the w... | TITLE:
WPF LifeCyle in an Add-in
QUESTION:
I've created an add-in, which call via Reflection, a WPF Class Library. Since this is a class library, I had to instanciate manually a new System.Windows.Application(). Then, the class constructor (the one called via reflection) create a window, and Show() (with Dispatcher.Ru... | [
"wpf",
"vsto",
"state",
"dispatcher",
"class-library"
] | 3 | 1 | 1,025 | 2 | 0 | 2011-06-01T07:31:46.867000 | 2011-06-03T08:40:53.253000 |
6,197,704 | 6,199,905 | Can GWT's RemoteServiceServlet write a file stream in HttpServletResponse? | I have a class that extends RemoteServiceServlet. This class has several methods, in one method, I use getThreadLocalResponse() to get the HttpServletResponse for the current call, and then write a File in the response. Here is the code: File aFile = new File("c://test.txt"); int iBufferSize = 1000; int iLength = 0;
H... | Are you putting this code inside of a GWT-RPC method in your RemoteServiceServlet? If yes, then you are trying to mix GWT-RPC with some of your own content, which you are not allowed to do. You can't just write arbitrary data to http response as this will clearly mess up the RPC protocol. OTOH, if your just putting som... | Can GWT's RemoteServiceServlet write a file stream in HttpServletResponse? I have a class that extends RemoteServiceServlet. This class has several methods, in one method, I use getThreadLocalResponse() to get the HttpServletResponse for the current call, and then write a File in the response. Here is the code: File aF... | TITLE:
Can GWT's RemoteServiceServlet write a file stream in HttpServletResponse?
QUESTION:
I have a class that extends RemoteServiceServlet. This class has several methods, in one method, I use getThreadLocalResponse() to get the HttpServletResponse for the current call, and then write a File in the response. Here is... | [
"gwt",
"servlets"
] | 1 | 2 | 2,563 | 1 | 0 | 2011-06-01T07:31:47.987000 | 2011-06-01T10:44:55.263000 |
6,197,741 | 6,212,001 | UIView display order issue? | The problem When drawing a custom movie player controller on-screen (iOS 4), I use an AVPlayerLayer to display. I wish to composite some overlays on top of the player (ad banners, player controls, etc). At the moment, this works absolutely fine with the following hierarchy: UIView(self.view)\ | UIView(controlsView)\ * ... | Note that I am now using 0.001f instead of 0.0f and there are no display issues. I'm still keen to figure out why it does this though. | UIView display order issue? The problem When drawing a custom movie player controller on-screen (iOS 4), I use an AVPlayerLayer to display. I wish to composite some overlays on top of the player (ad banners, player controls, etc). At the moment, this works absolutely fine with the following hierarchy: UIView(self.view)... | TITLE:
UIView display order issue?
QUESTION:
The problem When drawing a custom movie player controller on-screen (iOS 4), I use an AVPlayerLayer to display. I wish to composite some overlays on top of the player (ad banners, player controls, etc). At the moment, this works absolutely fine with the following hierarchy:... | [
"ios",
"objective-c",
"cocoa-touch",
"uiimageview",
"uiviewanimation"
] | 2 | 0 | 1,313 | 1 | 0 | 2011-06-01T07:34:34.157000 | 2011-06-02T08:08:14.953000 |
6,197,757 | 6,198,475 | Android Json Deserialization using Gson fails on inner "data" tag | I am using Gson library in Android to parse JSON. ResponseList.java package com.hussain.classes;
import java.util.Date; import java.util.List;
@SuppressWarnings("unused") public class ResponseList {
private List server_list;
public List getResponse() { return server_list; }
public void setTrends(List response) { t... | A simple solution would be that you create another class: public class Whatever { private String sessionId; private String responseCode; private List data;... } If the deserialization fails the first time, just try it again with the new class. | Android Json Deserialization using Gson fails on inner "data" tag I am using Gson library in Android to parse JSON. ResponseList.java package com.hussain.classes;
import java.util.Date; import java.util.List;
@SuppressWarnings("unused") public class ResponseList {
private List server_list;
public List getResponse()... | TITLE:
Android Json Deserialization using Gson fails on inner "data" tag
QUESTION:
I am using Gson library in Android to parse JSON. ResponseList.java package com.hussain.classes;
import java.util.Date; import java.util.List;
@SuppressWarnings("unused") public class ResponseList {
private List server_list;
public ... | [
"android"
] | 1 | 0 | 403 | 1 | 0 | 2011-06-01T07:36:13.410000 | 2011-06-01T08:44:50.680000 |
6,197,762 | 6,197,778 | How do I have just the date and not the time displayed along with it in a mySQL table? | I have a table containing records of the date and time each product was purchased. I need to export only the 'date' leaving out the time into another column. How do I do this? | Does not select name, address, DATE(dateofbirth) from myfriends not work? eg, just put Date() work? | How do I have just the date and not the time displayed along with it in a mySQL table? I have a table containing records of the date and time each product was purchased. I need to export only the 'date' leaving out the time into another column. How do I do this? | TITLE:
How do I have just the date and not the time displayed along with it in a mySQL table?
QUESTION:
I have a table containing records of the date and time each product was purchased. I need to export only the 'date' leaving out the time into another column. How do I do this?
ANSWER:
Does not select name, address,... | [
"mysql"
] | 1 | 0 | 289 | 3 | 0 | 2011-06-01T07:37:08.510000 | 2011-06-01T07:39:04.273000 |
6,197,763 | 6,198,380 | Facebook API: Post to wall with multiline message | I'm posting to a User's wall using the Post API. I want the message which gets posted to have line breaks and links. Eg - screenshot http://dl.dropbox.com/u/5154158/shot.png Line 1 (Sid is...) is Post#title. Line 2 (Venmo is.. ) is Post#description Line 3 and 4 (See more and If you) look to be Post#message. Its a link ... | You can at least do something "similar" this ways: 1) Pass your link target as "link" parameter and "see more" as caption. 2) pass an actions parameter like this: {"name": "see more", "link": "http://mylinktarget.foo"} | Facebook API: Post to wall with multiline message I'm posting to a User's wall using the Post API. I want the message which gets posted to have line breaks and links. Eg - screenshot http://dl.dropbox.com/u/5154158/shot.png Line 1 (Sid is...) is Post#title. Line 2 (Venmo is.. ) is Post#description Line 3 and 4 (See mor... | TITLE:
Facebook API: Post to wall with multiline message
QUESTION:
I'm posting to a User's wall using the Post API. I want the message which gets posted to have line breaks and links. Eg - screenshot http://dl.dropbox.com/u/5154158/shot.png Line 1 (Sid is...) is Post#title. Line 2 (Venmo is.. ) is Post#description Lin... | [
"facebook",
"facebook-graph-api",
"fbjs"
] | 1 | 0 | 2,108 | 4 | 0 | 2011-06-01T07:37:13.323000 | 2011-06-01T08:36:30.057000 |
6,197,766 | 6,197,776 | Page.FindControl comes back null for DIV | I have a page where I create div controls dynamiclly and number them automaticlly. subCell = new TableCell(); subCell.Controls.Add(new LiteralControl( " Text ")); subRow.Cells.Add(subCell); subTb.Rows.Add(subRow); Later in the code I want to get the background-color value like so: HtmlGenericControl div;
div = (HtmlGe... | Page.FindControl only works for server controls. You are assigning an id to text within the literal control which happens to be a div, but not the control itself. If you set the id of the control you should be able to find it, but I don't know if that's what you're intending. In response to your comment, check your HTM... | Page.FindControl comes back null for DIV I have a page where I create div controls dynamiclly and number them automaticlly. subCell = new TableCell(); subCell.Controls.Add(new LiteralControl( " Text ")); subRow.Cells.Add(subCell); subTb.Rows.Add(subRow); Later in the code I want to get the background-color value like s... | TITLE:
Page.FindControl comes back null for DIV
QUESTION:
I have a page where I create div controls dynamiclly and number them automaticlly. subCell = new TableCell(); subCell.Controls.Add(new LiteralControl( " Text ")); subRow.Cells.Add(subCell); subTb.Rows.Add(subRow); Later in the code I want to get the background-... | [
"c#",
"asp.net",
"html"
] | 3 | 4 | 10,654 | 4 | 0 | 2011-06-01T07:37:36.847000 | 2011-06-01T07:38:55.493000 |
6,197,771 | 6,199,205 | How flexible is Titanium? Can I add custom controls | I am looking Appcelerator Titanium as a potential technology for targeting Android, BlackBerry and iPhone. However, I am finding it hard to cut through the hype on the website! The application I have in mind is farely simple, suing common UI controls, so Titanium would likely be a good fit, however, what if I want to a... | Titanium is javascript so you could build your own or find a javascript chart maker. Personally I would just use a webview to show something like jqPlot. | How flexible is Titanium? Can I add custom controls I am looking Appcelerator Titanium as a potential technology for targeting Android, BlackBerry and iPhone. However, I am finding it hard to cut through the hype on the website! The application I have in mind is farely simple, suing common UI controls, so Titanium woul... | TITLE:
How flexible is Titanium? Can I add custom controls
QUESTION:
I am looking Appcelerator Titanium as a potential technology for targeting Android, BlackBerry and iPhone. However, I am finding it hard to cut through the hype on the website! The application I have in mind is farely simple, suing common UI controls... | [
"android",
"mobile",
"titanium"
] | 0 | 0 | 594 | 1 | 0 | 2011-06-01T07:37:56.160000 | 2011-06-01T09:44:10.150000 |
6,197,781 | 6,197,815 | implementing ASP.NET-ajax download - which way is better? | I want to implement an ASP.NET-ajax downloader, and got across two alternatives for doing so. http://encosia.com/ajax-file-downloads-and-iframes/ with the use of IFRAMEs and http://archive.msdn.microsoft.com/AjaxFileDownload with the use of MS-Ajax Library. My question is, which of the two ways is better, and why? What... | Use the iframe approach and avoid Microsoft AJAX JavaScript library because it's considered obsolete in favor of jQuery. Do so with jQuery and AJAX, and the so-called iframe. | implementing ASP.NET-ajax download - which way is better? I want to implement an ASP.NET-ajax downloader, and got across two alternatives for doing so. http://encosia.com/ajax-file-downloads-and-iframes/ with the use of IFRAMEs and http://archive.msdn.microsoft.com/AjaxFileDownload with the use of MS-Ajax Library. My q... | TITLE:
implementing ASP.NET-ajax download - which way is better?
QUESTION:
I want to implement an ASP.NET-ajax downloader, and got across two alternatives for doing so. http://encosia.com/ajax-file-downloads-and-iframes/ with the use of IFRAMEs and http://archive.msdn.microsoft.com/AjaxFileDownload with the use of MS-... | [
"asp.net-ajax",
"download"
] | 0 | 2 | 146 | 1 | 0 | 2011-06-01T07:39:25.880000 | 2011-06-01T07:43:38.830000 |
6,197,784 | 6,198,010 | add new row to textarea input while editing | I wonder how to add new row/line to textarea while editing that is when the number of letters exceeds number of cols of the textarea add new line automatically. | Some basic code to achieve this, tested in this jsfiddle ( http://jsfiddle.net/NZbZn/ ). It will need work, obviously, but shows the basic concept. jQuery(document).ready(function(){
//after typing occurs jQuery('textarea#expander').keyup(function(){
//figure out how many chars var length = jQuery(this).val().length;... | add new row to textarea input while editing I wonder how to add new row/line to textarea while editing that is when the number of letters exceeds number of cols of the textarea add new line automatically. | TITLE:
add new row to textarea input while editing
QUESTION:
I wonder how to add new row/line to textarea while editing that is when the number of letters exceeds number of cols of the textarea add new line automatically.
ANSWER:
Some basic code to achieve this, tested in this jsfiddle ( http://jsfiddle.net/NZbZn/ ).... | [
"javascript",
"jquery",
"html"
] | 2 | 2 | 8,676 | 6 | 0 | 2011-06-01T07:40:04.723000 | 2011-06-01T08:00:27.260000 |
6,197,794 | 6,197,863 | How to get IE version info in Winform? | I am developing an winform application in.NET framework 3.5, using C#. In the application I need to display the IE version number, installed on the machine on which it runs. How can I do that, can anybody tell me? | You can read the version from the registry: var ieVersion = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Internet Explorer").GetValue("Version"); | How to get IE version info in Winform? I am developing an winform application in.NET framework 3.5, using C#. In the application I need to display the IE version number, installed on the machine on which it runs. How can I do that, can anybody tell me? | TITLE:
How to get IE version info in Winform?
QUESTION:
I am developing an winform application in.NET framework 3.5, using C#. In the application I need to display the IE version number, installed on the machine on which it runs. How can I do that, can anybody tell me?
ANSWER:
You can read the version from the regist... | [
"c#",
".net",
"winforms",
".net-3.5",
"c#-3.0"
] | 9 | 18 | 10,916 | 4 | 0 | 2011-06-01T07:41:17.753000 | 2011-06-01T07:47:06.800000 |
6,197,802 | 6,198,090 | Typesafe forName class loading | How do I call Class.forName() when the result is a generic type? Usually I can use asSubclass(), but here the only way I see to do it is a cast, which kindof sticks out & bugs me when everything else is nicely typed with generics. The scenario goes something like this: There is a.jar with one entry point main class tha... | First you probably want a full generic Class Class > classCI =...; Then the java type system has no problem with Class > clazz = Class.forName(options.valueOf(className)).asSubclass(classCI); How can we get classCI? We can cheat by unchecked cast Class > classCI = (Class >)Callable.class; This is inherently unsafe. The... | Typesafe forName class loading How do I call Class.forName() when the result is a generic type? Usually I can use asSubclass(), but here the only way I see to do it is a cast, which kindof sticks out & bugs me when everything else is nicely typed with generics. The scenario goes something like this: There is a.jar with... | TITLE:
Typesafe forName class loading
QUESTION:
How do I call Class.forName() when the result is a generic type? Usually I can use asSubclass(), but here the only way I see to do it is a cast, which kindof sticks out & bugs me when everything else is nicely typed with generics. The scenario goes something like this: T... | [
"java",
"generics"
] | 8 | 11 | 3,759 | 1 | 0 | 2011-06-01T07:42:08.493000 | 2011-06-01T08:08:14.577000 |
6,197,808 | 6,197,847 | Have one controller function call a different controller function in CakePHP 1.2 | How do I get my Search controller with doSearch() function internally to call getTitles() function in my Titles controller? | The short answer is, you shouldn't do this. You should be moving that to your Title model or maybe put it in a component or helper for reuse. If you're sure you want to call the controller directly, Cake does provide a method for this http://book.cakephp.org/2.0/en/controllers.html#Controller::requestAction | Have one controller function call a different controller function in CakePHP 1.2 How do I get my Search controller with doSearch() function internally to call getTitles() function in my Titles controller? | TITLE:
Have one controller function call a different controller function in CakePHP 1.2
QUESTION:
How do I get my Search controller with doSearch() function internally to call getTitles() function in my Titles controller?
ANSWER:
The short answer is, you shouldn't do this. You should be moving that to your Title mode... | [
"cakephp",
"controller",
"cakephp-1.2"
] | 2 | 8 | 9,786 | 4 | 0 | 2011-06-01T07:43:03.087000 | 2011-06-01T07:46:19.797000 |
6,197,810 | 6,197,980 | text block how to do 1. text trimming 2. vertical alignment for windows phone | text block how to do: text trimming for a given height vertical alignment Can we use mytextBlock.TextTriming to trim the text? I have tried to trim text with specifying height but its not working same with the vertical alignment. I tried TextAlignment = center but its aligning text horizontally. | Text trimming is not supported in the current version of the framework. However, Robby Ingebretsen's TextTrimming TextBlock for Silverlight works if you recompile it for WP7. | text block how to do 1. text trimming 2. vertical alignment for windows phone text block how to do: text trimming for a given height vertical alignment Can we use mytextBlock.TextTriming to trim the text? I have tried to trim text with specifying height but its not working same with the vertical alignment. I tried Text... | TITLE:
text block how to do 1. text trimming 2. vertical alignment for windows phone
QUESTION:
text block how to do: text trimming for a given height vertical alignment Can we use mytextBlock.TextTriming to trim the text? I have tried to trim text with specifying height but its not working same with the vertical align... | [
"windows-phone-7"
] | 1 | 1 | 1,012 | 3 | 0 | 2011-06-01T07:43:11.830000 | 2011-06-01T07:57:50.057000 |
6,197,813 | 6,198,223 | Find System.gc() in compiled libraries | I see explicit gc invocations in our gc-log (see below). I am able to remove invocations with -XX:+DisableExplicitGC but I really want to know which code/library is calling System.gc()? Any hints on how to track it down? 2011-05-30T12:21:48.230+0200: 1.672: [Full GC (System) 1.672: [CMS: 0K->2227K(2868864K), 0.0862299 ... | I created a custom version of the System class which writes to a file a stack trace whenever System.gc() is called. This will allow you to trace all the places it is called. This will find calls anywhere in the system including the JDK. One place you get calls to System.gc() is in the RMI module to help find discarded ... | Find System.gc() in compiled libraries I see explicit gc invocations in our gc-log (see below). I am able to remove invocations with -XX:+DisableExplicitGC but I really want to know which code/library is calling System.gc()? Any hints on how to track it down? 2011-05-30T12:21:48.230+0200: 1.672: [Full GC (System) 1.672... | TITLE:
Find System.gc() in compiled libraries
QUESTION:
I see explicit gc invocations in our gc-log (see below). I am able to remove invocations with -XX:+DisableExplicitGC but I really want to know which code/library is calling System.gc()? Any hints on how to track it down? 2011-05-30T12:21:48.230+0200: 1.672: [Full... | [
"java",
"garbage-collection"
] | 2 | 2 | 823 | 3 | 0 | 2011-06-01T07:43:32.010000 | 2011-06-01T08:21:14.100000 |
6,197,816 | 6,197,882 | OOP Best Practices (specifically PHP) | I've been developing in PHP for a while now but only recently made the switch over to an OOP approach. One question that keeps cropping up for me is 'how far' to go with the OOP stuff, specifically in terms of execution speed and memory resources etc. For example, let's say I have 2 objects, User and Listing Listings a... | I definitely prefer option 1. Option 2 does not follow the idea behind OOP because user information is not part of your listing, so keep it in a separate object. Keep the following rules in mind: Load an object without its relationships at once. If you need a related object load it at the time you need it according to ... | OOP Best Practices (specifically PHP) I've been developing in PHP for a while now but only recently made the switch over to an OOP approach. One question that keeps cropping up for me is 'how far' to go with the OOP stuff, specifically in terms of execution speed and memory resources etc. For example, let's say I have ... | TITLE:
OOP Best Practices (specifically PHP)
QUESTION:
I've been developing in PHP for a while now but only recently made the switch over to an OOP approach. One question that keeps cropping up for me is 'how far' to go with the OOP stuff, specifically in terms of execution speed and memory resources etc. For example,... | [
"php",
"oop"
] | 15 | 2 | 3,851 | 4 | 0 | 2011-06-01T07:43:40.003000 | 2011-06-01T07:49:07.863000 |
6,197,818 | 6,197,846 | Turn off MS SQL Server logging | I know that it is impossible to turn off the transaction logging in Microsoft SQL Server But my boss wants an official evidence about this And I cannot find that Please help me to find official information (preferably on MSDN) about impossibility of turning off the transaction logging in Microsoft SQL Server Thanks | MS KB 873235 End of first paragraph under "More information about transaction log files" states: Because the transactional integrity is considered a fundamental and intrinsic characteristic of SQL Server, logging the details of the transactions cannot be turned off in SQL Server. I'd consider your position if your boss... | Turn off MS SQL Server logging I know that it is impossible to turn off the transaction logging in Microsoft SQL Server But my boss wants an official evidence about this And I cannot find that Please help me to find official information (preferably on MSDN) about impossibility of turning off the transaction logging in ... | TITLE:
Turn off MS SQL Server logging
QUESTION:
I know that it is impossible to turn off the transaction logging in Microsoft SQL Server But my boss wants an official evidence about this And I cannot find that Please help me to find official information (preferably on MSDN) about impossibility of turning off the trans... | [
"sql-server",
"sql-server-2005",
"sql-server-2008"
] | 1 | 8 | 7,726 | 2 | 0 | 2011-06-01T07:43:55.833000 | 2011-06-01T07:46:15.333000 |
6,197,828 | 6,197,950 | How to sanitize ODBC database input? | I currently use MySql, but would prefer an ODBC solution to make it future proof. How do I sanitize user input before passing it to an ODBC database? And, while I'm at it, I wrap my string in double quotes, e.g. "INSERT INTO VALUES(description) ""` - but what if the text itself contains a double quote? | Try using a parametrized SQL sentence like this. INSERT INTO MyTable (Field1,Field2) VALUES (:Param1,:Param2) check this article from embarcadero for more info about how use parameters Using Parameters in Queries. | How to sanitize ODBC database input? I currently use MySql, but would prefer an ODBC solution to make it future proof. How do I sanitize user input before passing it to an ODBC database? And, while I'm at it, I wrap my string in double quotes, e.g. "INSERT INTO VALUES(description) ""` - but what if the text itself cont... | TITLE:
How to sanitize ODBC database input?
QUESTION:
I currently use MySql, but would prefer an ODBC solution to make it future proof. How do I sanitize user input before passing it to an ODBC database? And, while I'm at it, I wrap my string in double quotes, e.g. "INSERT INTO VALUES(description) ""` - but what if th... | [
"mysql",
"delphi",
"odbc",
"sanitization"
] | 5 | 8 | 1,000 | 3 | 0 | 2011-06-01T07:44:46.030000 | 2011-06-01T07:55:04.797000 |
6,197,833 | 6,218,448 | Can the Apple Id be used by non Apple applications? | Both Google and Facebook can act as Identity Providers in a security federation setup like Ping Identity or Microsoft ACS. Does anyone know if it is possible to add Apple Id as an identity provider? | After investigating sources over at apple.com and google, I must conclude that this is not possible now. Hopefully, Apple will become and OpenID provider soon. | Can the Apple Id be used by non Apple applications? Both Google and Facebook can act as Identity Providers in a security federation setup like Ping Identity or Microsoft ACS. Does anyone know if it is possible to add Apple Id as an identity provider? | TITLE:
Can the Apple Id be used by non Apple applications?
QUESTION:
Both Google and Facebook can act as Identity Providers in a security federation setup like Ping Identity or Microsoft ACS. Does anyone know if it is possible to add Apple Id as an identity provider?
ANSWER:
After investigating sources over at apple.... | [
"acs",
"federated-identity",
"federation",
"apple-id"
] | 10 | 6 | 1,891 | 4 | 0 | 2011-06-01T07:45:24.587000 | 2011-06-02T18:07:50.380000 |
6,197,836 | 6,198,158 | Can a downloaded zip file be opened, without saving it as a file first? | I am downloading a zip file using the zend httpClient, and getting the contents of the file assigned to a variable as such: $body = $response->getBody(); $body has the contents of a zip file, can it be opened without saving it as a file first, using http://php.net/manual/en/class.ziparchive.php or some other 5.2 native... | I have very little knowledge of the Zend Framework, and absolutely nothing of Zend_Http_Client, but maybe you could use compression stream wrappers when initializing the Zend_Http_Client like this: $client = new Zend_Http_Client('zip://http://example.org/compressed_file.zip'); | Can a downloaded zip file be opened, without saving it as a file first? I am downloading a zip file using the zend httpClient, and getting the contents of the file assigned to a variable as such: $body = $response->getBody(); $body has the contents of a zip file, can it be opened without saving it as a file first, usin... | TITLE:
Can a downloaded zip file be opened, without saving it as a file first?
QUESTION:
I am downloading a zip file using the zend httpClient, and getting the contents of the file assigned to a variable as such: $body = $response->getBody(); $body has the contents of a zip file, can it be opened without saving it as ... | [
"php",
"zend-framework",
"zip"
] | 1 | 1 | 996 | 2 | 0 | 2011-06-01T07:45:39.267000 | 2011-06-01T08:15:05.113000 |
6,197,840 | 6,232,805 | Snooze local Notification | I am working on an alarm application and I am using local notification for that. Now I want to add snooze functionality to my alarm. I searched on Google and found that iPhone doesn't support such functionality. But is there another way to do this? | AFAIK you can't add a custom behaviour when the notification windows pops up. BUT... You can try it like this: after the user has clicked "View" and the app is launched by an UILocalNotification, you could open a modal view with a huge button "Snooze" and another (smaller) one "Open". And if the user taps "Snooze" you ... | Snooze local Notification I am working on an alarm application and I am using local notification for that. Now I want to add snooze functionality to my alarm. I searched on Google and found that iPhone doesn't support such functionality. But is there another way to do this? | TITLE:
Snooze local Notification
QUESTION:
I am working on an alarm application and I am using local notification for that. Now I want to add snooze functionality to my alarm. I searched on Google and found that iPhone doesn't support such functionality. But is there another way to do this?
ANSWER:
AFAIK you can't ad... | [
"iphone",
"ios4",
"notifications",
"alarm",
"uilocalnotification"
] | 7 | 5 | 5,218 | 2 | 0 | 2011-06-01T07:45:58.600000 | 2011-06-03T21:19:43.620000 |
6,197,843 | 6,197,991 | Id not being set when calling EntityManager.merge() | I have a simple OneToMany association between 2 object Parent & Child as shown below. Parent Entity @Entity public class Parent { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @Version private Long version;
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch = ... | EntityManager.merge(..) gets an instance and returns an instance that is managed. And in case of transient instances it returns a new instance (does not modify the original) So your mergeEntity(..) method should return em.merge(entity) | Id not being set when calling EntityManager.merge() I have a simple OneToMany association between 2 object Parent & Child as shown below. Parent Entity @Entity public class Parent { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @Version private Long version;
@OneToMany(casca... | TITLE:
Id not being set when calling EntityManager.merge()
QUESTION:
I have a simple OneToMany association between 2 object Parent & Child as shown below. Parent Entity @Entity public class Parent { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @Version private Long version;... | [
"java",
"hibernate",
"jpa"
] | 9 | 14 | 7,101 | 2 | 0 | 2011-06-01T07:46:12.883000 | 2011-06-01T07:58:39.920000 |
6,197,844 | 6,199,477 | inserting/updating data on table from a stored procedure result set | I've a stored procedure called proc_item that fetches data from different tables (using join). I want the result set from the stored procedure to be either inserted (if the data is new) or updated (if the data already exists) on another table called Item. Can anybody give me some idea as to how i can do this? I'm new t... | Take a look at @srutzky 's solution which is more appropriate to this problem The first thing you could do is write everything into a table. To do so, you need to define a table, which has the same columns as they are returned by your stored procedure: DECLARE @myTempTableName TABLE( dataRow1 DATATYPE, dataRow2 DATATYP... | inserting/updating data on table from a stored procedure result set I've a stored procedure called proc_item that fetches data from different tables (using join). I want the result set from the stored procedure to be either inserted (if the data is new) or updated (if the data already exists) on another table called It... | TITLE:
inserting/updating data on table from a stored procedure result set
QUESTION:
I've a stored procedure called proc_item that fetches data from different tables (using join). I want the result set from the stored procedure to be either inserted (if the data is new) or updated (if the data already exists) on anoth... | [
"sql",
"sql-server-2008",
"stored-procedures",
"loops"
] | 6 | 2 | 47,791 | 3 | 0 | 2011-06-01T07:46:14.953000 | 2011-06-01T10:06:58.743000 |
6,197,845 | 6,197,889 | How should I, or should I use php functions considered "dangerous"? | Several days ago I attended a seminar and they were talking about "dangerous" PHP functions. They did not say however that should we use them. They named eval(), preg_match(), exec() and a lot more. Though I don't use them, or don't use them often sometimes I have to. Is it considered bad practice to use those function... | All of those methods basically allow injected code to be run on your system if you don't protect against it. There's a chance of you shooting yourself in the foot if you do use them without knowing what the dangers are. If you're fully aware of what you're doing, and you have no alternative but to use this method, then... | How should I, or should I use php functions considered "dangerous"? Several days ago I attended a seminar and they were talking about "dangerous" PHP functions. They did not say however that should we use them. They named eval(), preg_match(), exec() and a lot more. Though I don't use them, or don't use them often some... | TITLE:
How should I, or should I use php functions considered "dangerous"?
QUESTION:
Several days ago I attended a seminar and they were talking about "dangerous" PHP functions. They did not say however that should we use them. They named eval(), preg_match(), exec() and a lot more. Though I don't use them, or don't u... | [
"php"
] | 3 | 11 | 1,668 | 6 | 0 | 2011-06-01T07:46:15.467000 | 2011-06-01T07:49:50.653000 |
6,197,850 | 6,198,100 | How do I deal with namespaces in XSLT? | I am new to XSL and would like to transform a NewML G2 format XML into another XML. For example I have: tag:123.com,0000:newsml_N19279043:609406403 3 ABX 2011-05-20T05:00:27.000Z 3 My Headline ABC Paragraph A * Paragraph A I would like my result XML to be something like: tag:123.com,0000:newsml_N19279043:609406403 My H... | A couple of problems here: First, much of your source document is in the Namespace named "http://iptc.org/std/nar/2006-10-01/", and you need to take this into account when referencing that content in your XSLT. In the stylesheet below I have done that by binding this Namespace to the prefix "itpc", and then using that ... | How do I deal with namespaces in XSLT? I am new to XSL and would like to transform a NewML G2 format XML into another XML. For example I have: tag:123.com,0000:newsml_N19279043:609406403 3 ABX 2011-05-20T05:00:27.000Z 3 My Headline ABC Paragraph A * Paragraph A I would like my result XML to be something like: tag:123.c... | TITLE:
How do I deal with namespaces in XSLT?
QUESTION:
I am new to XSL and would like to transform a NewML G2 format XML into another XML. For example I have: tag:123.com,0000:newsml_N19279043:609406403 3 ABX 2011-05-20T05:00:27.000Z 3 My Headline ABC Paragraph A * Paragraph A I would like my result XML to be somethi... | [
"xml",
"xslt",
"xml-namespaces"
] | 1 | 4 | 2,542 | 3 | 0 | 2011-06-01T07:46:29.840000 | 2011-06-01T08:08:50.317000 |
6,197,856 | 6,197,987 | Change tab background color and remove divider line between tabs | I want to show tabs in my application but by default in android between tabs there is divider line like this Tab1 | Tab2 | Tab3 | But i want to show tabs like this Tab1 Tab2 Tab3 So i want to remove the divider line in between two tabs and also by default the tabs background color is gray color. so i want to change thi... | Use this method and Layout to use your own layout for the tab. To remove the divider simply replace the background 9patch graphic with your own. public static View prepareTabView(Context context, String text, Drawable background) { View view = LayoutInflater.from(context).inflate(R.layout.fake_native_tab, null); TextVi... | Change tab background color and remove divider line between tabs I want to show tabs in my application but by default in android between tabs there is divider line like this Tab1 | Tab2 | Tab3 | But i want to show tabs like this Tab1 Tab2 Tab3 So i want to remove the divider line in between two tabs and also by default... | TITLE:
Change tab background color and remove divider line between tabs
QUESTION:
I want to show tabs in my application but by default in android between tabs there is divider line like this Tab1 | Tab2 | Tab3 | But i want to show tabs like this Tab1 Tab2 Tab3 So i want to remove the divider line in between two tabs a... | [
"android",
"tabs"
] | 13 | 10 | 26,227 | 3 | 0 | 2011-06-01T07:46:51.140000 | 2011-06-01T07:58:16.050000 |
6,197,866 | 6,197,931 | java ZipOutputStream problem | I am trying to write a java ZIP util class as below: package fdbank.util;
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;
/** * 解压缩工具类 * @author ggfan@amarsoft * */ public class ZIPUt... | You're always writing to a file called "dest" and ignore the String parameter called dest (with the value c:\ziptest.zip ). Replace "dest" with dest on the first line of your first zip() method. Also: you must not ignore the return value of fis.read(): If read() doesn't fill the buffer buf, then you must tell that to t... | java ZipOutputStream problem I am trying to write a java ZIP util class as below: package fdbank.util;
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;
/** * 解压缩工具类 * @author ggfan@ama... | TITLE:
java ZipOutputStream problem
QUESTION:
I am trying to write a java ZIP util class as below: package fdbank.util;
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;
/** * 解压缩工具类 *... | [
"java",
"zip"
] | 1 | 4 | 3,291 | 1 | 0 | 2011-06-01T07:47:25.087000 | 2011-06-01T07:53:20.583000 |
6,197,878 | 6,264,417 | Oracle Service Bus - Unix authorization over telnet | I'm completely new to Oracle's Service Bus. The problem I'm facing is that OSB 11g is to be used in a rather specific environment meaning - OSB needs to send CSV formatted messages over telnet to a Legacy System. Before that the connection must be authorized with a Unix login and password. As login/pass authorization i... | Alright, after some testing and browsing I came to two conclusions. Development of a custom transport is worthwile whenever the service you're accessing is to be widely used. On the other hand you can use Java Callout that does custom handshake (this case login/password/accesskey in unix over telnet using apache common... | Oracle Service Bus - Unix authorization over telnet I'm completely new to Oracle's Service Bus. The problem I'm facing is that OSB 11g is to be used in a rather specific environment meaning - OSB needs to send CSV formatted messages over telnet to a Legacy System. Before that the connection must be authorized with a Un... | TITLE:
Oracle Service Bus - Unix authorization over telnet
QUESTION:
I'm completely new to Oracle's Service Bus. The problem I'm facing is that OSB 11g is to be used in a rather specific environment meaning - OSB needs to send CSV formatted messages over telnet to a Legacy System. Before that the connection must be au... | [
"oracle",
"soa",
"telnet",
"osb",
"oracle-service-bus"
] | 0 | 1 | 731 | 2 | 0 | 2011-06-01T07:48:28.593000 | 2011-06-07T11:19:28.733000 |
6,197,886 | 6,198,042 | Save file locally from asp.net without "save as.."? Is ActiveX the only solution? | I'm in the process of building a web application in ASP.NET MVC C# (including ajax/jquery) and have to save a file locally to the client's hard drive. I have another application that polls a directory for new files, so it's essential the files from the website ends up at that location so therefore showing a "save as.."... | I'll vote for Silverlight solution. But instead of developing your site entirely with Silverlight, just write a small and hidden Silverlight component that would receive a remote file location and stores it in user's local file system. Check this other answer in Stackoverflow: Does Silverlight 3 have access to local fi... | Save file locally from asp.net without "save as.."? Is ActiveX the only solution? I'm in the process of building a web application in ASP.NET MVC C# (including ajax/jquery) and have to save a file locally to the client's hard drive. I have another application that polls a directory for new files, so it's essential the ... | TITLE:
Save file locally from asp.net without "save as.."? Is ActiveX the only solution?
QUESTION:
I'm in the process of building a web application in ASP.NET MVC C# (including ajax/jquery) and have to save a file locally to the client's hard drive. I have another application that polls a directory for new files, so i... | [
"c#",
"asp.net-mvc",
"silverlight",
"activex"
] | 3 | 2 | 1,456 | 2 | 0 | 2011-06-01T07:49:42.853000 | 2011-06-01T08:02:42.067000 |
6,197,894 | 6,197,910 | Use google search in my site | I want to use Google search.But the search results are only from my site, not from any other site. The searched word or phrase should be highlighted. Pls help me... | The link you are looking for is Google Site Search remember, always do a quick Google before asking a question on SO. When you type the title of your question into Google Search, Site Search is the #2 result. | Use google search in my site I want to use Google search.But the search results are only from my site, not from any other site. The searched word or phrase should be highlighted. Pls help me... | TITLE:
Use google search in my site
QUESTION:
I want to use Google search.But the search results are only from my site, not from any other site. The searched word or phrase should be highlighted. Pls help me...
ANSWER:
The link you are looking for is Google Site Search remember, always do a quick Google before asking... | [
"php"
] | 0 | 6 | 257 | 2 | 0 | 2011-06-01T07:50:16.690000 | 2011-06-01T07:51:58.687000 |
6,197,895 | 6,197,926 | How should I declare a variable argument parameter | public void foo(Integer... ids) { Integer... fIds = bar(ids); }
public void bar(Integer... ids) { // I would like to eliminate few ids and return a subset. How should I declare the return argument } How should I declare the return type for bar? | You can refer to vararg parameters as an array. public Integer[] bar(Integer... ids) {.. } See varargs docs It is still true that multiple arguments must be passed in an array, but the varargs feature automates and hides the process To the jvm this is actually an array, and the compiler has hidden the creation of the a... | How should I declare a variable argument parameter public void foo(Integer... ids) { Integer... fIds = bar(ids); }
public void bar(Integer... ids) { // I would like to eliminate few ids and return a subset. How should I declare the return argument } How should I declare the return type for bar? | TITLE:
How should I declare a variable argument parameter
QUESTION:
public void foo(Integer... ids) { Integer... fIds = bar(ids); }
public void bar(Integer... ids) { // I would like to eliminate few ids and return a subset. How should I declare the return argument } How should I declare the return type for bar?
ANSW... | [
"java",
"variadic-functions"
] | 0 | 3 | 1,199 | 4 | 0 | 2011-06-01T07:50:31.777000 | 2011-06-01T07:53:00.403000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.