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,213,037 | 6,213,315 | x.ToString() is not supported by the entity framework! | Entity framework doesn't recognize my ToString method that converts the route object to specifix string: public IEnumerable GetRoutes(string prefix, string searchPattern, string code) { return Routes. Where(x => code == null || x.Code == code). Where(x => searchPattern == null || x.ToString().Contains(searchPattern)). ... | You cannot do this on client side ( ToString ). You must create SQL function which will do your evaluation - it can either do only string concatenation of you locations (I believe it is related entity) or you can do the whole test in custom function. Then you can import that function into your entity model (EDMX) and c... | x.ToString() is not supported by the entity framework! Entity framework doesn't recognize my ToString method that converts the route object to specifix string: public IEnumerable GetRoutes(string prefix, string searchPattern, string code) { return Routes. Where(x => code == null || x.Code == code). Where(x => searchPat... | TITLE:
x.ToString() is not supported by the entity framework!
QUESTION:
Entity framework doesn't recognize my ToString method that converts the route object to specifix string: public IEnumerable GetRoutes(string prefix, string searchPattern, string code) { return Routes. Where(x => code == null || x.Code == code). Wh... | [
"c#",
".net",
"entity-framework",
"entity-framework-5"
] | 4 | 2 | 5,614 | 7 | 0 | 2011-06-02T10:02:53.870000 | 2011-06-02T10:28:59.967000 |
6,213,040 | 6,213,085 | Fix/avoid/ignore recursive reference error? | I need two class libraries that reference each other. Why? One is compiled in C# and the other in VB.NET. It would be better if I could somehow merge the assemblies programmatically, without requiring external programs or even the extended framework. | Compile your assemblies via assembly linker tool into multimodule assembly. For example: http://blogs.msdn.com/b/junfeng/archive/2004/07/15/183813.aspx | Fix/avoid/ignore recursive reference error? I need two class libraries that reference each other. Why? One is compiled in C# and the other in VB.NET. It would be better if I could somehow merge the assemblies programmatically, without requiring external programs or even the extended framework. | TITLE:
Fix/avoid/ignore recursive reference error?
QUESTION:
I need two class libraries that reference each other. Why? One is compiled in C# and the other in VB.NET. It would be better if I could somehow merge the assemblies programmatically, without requiring external programs or even the extended framework.
ANSWER... | [
"c#",
".net",
"vb.net",
"ilmerge"
] | 1 | 1 | 184 | 1 | 0 | 2011-06-02T10:03:14.523000 | 2011-06-02T10:07:31.607000 |
6,213,045 | 6,213,232 | CreateThread seems to behave like fork() | I have this function int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: Place code here. MSG msg; HACCEL hAccelTable; int i; DWORD dwThreadIdArray[NUM_THREADS]; //edited after first po... | You are not clearing the stringstream ss in the loop, so the output just accumulates: thread 0 thread 0 1 thread 0 1 2 thread 0 1 2 3 Add a ss.str("") after doing each output. | CreateThread seems to behave like fork() I have this function int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: Place code here. MSG msg; HACCEL hAccelTable; int i; DWORD dwThreadIdAr... | TITLE:
CreateThread seems to behave like fork()
QUESTION:
I have this function int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: Place code here. MSG msg; HACCEL hAccelTable; int i; ... | [
"c++",
"visual-studio-2010",
"fork",
"createthread"
] | 0 | 5 | 472 | 1 | 0 | 2011-06-02T10:03:38.047000 | 2011-06-02T10:21:33.683000 |
6,213,052 | 6,215,554 | Dynamic content inside fancybox via get | I have multiple instances of fancybox working at the same time like this: Group 1 Group 2 Group 3 Showing the following div: //Select that shows the people from the group here depending on the id //of the link with a $_GET['id'] variable (from database) With this call: $("a.grupito").fancybox({ 'titlePosition': 'inside... | If I understand your questions properly I think you may need to rethink your approach. I'm not sure what you are trying to achieve by adding?id=1 to your anchor. Fancybox shows content that is already loaded on the page. Once the HTML page has been rendered and sent to the browser, PHP plays no role in what happens on ... | Dynamic content inside fancybox via get I have multiple instances of fancybox working at the same time like this: Group 1 Group 2 Group 3 Showing the following div: //Select that shows the people from the group here depending on the id //of the link with a $_GET['id'] variable (from database) With this call: $("a.grupi... | TITLE:
Dynamic content inside fancybox via get
QUESTION:
I have multiple instances of fancybox working at the same time like this: Group 1 Group 2 Group 3 Showing the following div: //Select that shows the people from the group here depending on the id //of the link with a $_GET['id'] variable (from database) With thi... | [
"php",
"jquery",
"fancybox"
] | 0 | 1 | 1,334 | 3 | 0 | 2011-06-02T10:04:31.070000 | 2011-06-02T13:57:55.760000 |
6,213,054 | 6,215,282 | Silverstripe - Blog module blog entry via front end but image upload/insert button missing from tinymce | We allow users to create blog entries via front end. but for some reason the tinymce editor doesn't have image upload button. Authors have to drag the image from their desktop to tinymce to insert an image. is there a way to add image button allowing authors to upload images and using them in their blog? Also just real... | You can enable the default TinyMCE image and link insertion buttons using the code below. However, this won't contain the SilverStripe specific functionality such as choosing a page to link to or uploading images - you have to manually enter link and image URLs. HtmlEditorConfig::get()->addButtonsToLine(1, 'link', 'unl... | Silverstripe - Blog module blog entry via front end but image upload/insert button missing from tinymce We allow users to create blog entries via front end. but for some reason the tinymce editor doesn't have image upload button. Authors have to drag the image from their desktop to tinymce to insert an image. is there ... | TITLE:
Silverstripe - Blog module blog entry via front end but image upload/insert button missing from tinymce
QUESTION:
We allow users to create blog entries via front end. but for some reason the tinymce editor doesn't have image upload button. Authors have to drag the image from their desktop to tinymce to insert a... | [
"tinymce",
"blogs",
"silverstripe"
] | 1 | 3 | 702 | 1 | 0 | 2011-06-02T10:04:38.050000 | 2011-06-02T13:36:54.770000 |
6,213,058 | 6,213,108 | Update script not working and no error shows | I am a newbie updating the database (i have skipped some steps so that i do some things quicker) I have this code but the database does not update and i do not get any error. ". $row['surname']. " ". $row['first_name']. " ". $row['mobile_number']. " ";
echo " ";
echo " ";
echo " "; echo " ";
echo " "; echo " ";
ec... | It looks like you've assigned the sql query string to a variable but not actually run it. if (isset($_POST['enter'])) { $_POST['employee_id_passport'] = $employee_id_passport; $_POST['first_name'] = $first_name; $_POST['surname'] = $surname; $_POST['mobile_number'] = $mobile_number; $sql_query_update = "UPDATE employee... | Update script not working and no error shows I am a newbie updating the database (i have skipped some steps so that i do some things quicker) I have this code but the database does not update and i do not get any error. ". $row['surname']. " ". $row['first_name']. " ". $row['mobile_number']. " ";
echo " ";
echo " ";
... | TITLE:
Update script not working and no error shows
QUESTION:
I am a newbie updating the database (i have skipped some steps so that i do some things quicker) I have this code but the database does not update and i do not get any error. ". $row['surname']. " ". $row['first_name']. " ". $row['mobile_number']. " ";
ech... | [
"php"
] | 0 | 1 | 244 | 2 | 0 | 2011-06-02T10:04:56.020000 | 2011-06-02T10:09:27.830000 |
6,213,061 | 6,213,216 | Kill Service After BootUp Start android | Hello How can i kill my service when my Mobile Boot ups. For example i want to achieve that my service starts on Boot up and after doing all its Task it should be Exit/Killed/Removed. PLease guide.! | stopSelf(); stopForground(true); both works for me! Thanks to capDroid! | Kill Service After BootUp Start android Hello How can i kill my service when my Mobile Boot ups. For example i want to achieve that my service starts on Boot up and after doing all its Task it should be Exit/Killed/Removed. PLease guide.! | TITLE:
Kill Service After BootUp Start android
QUESTION:
Hello How can i kill my service when my Mobile Boot ups. For example i want to achieve that my service starts on Boot up and after doing all its Task it should be Exit/Killed/Removed. PLease guide.!
ANSWER:
stopSelf(); stopForground(true); both works for me! Th... | [
"android",
"service"
] | 0 | 0 | 187 | 1 | 0 | 2011-06-02T10:05:03.057000 | 2011-06-02T10:20:30.637000 |
6,213,063 | 6,213,132 | Python read next() | next() in python does not work. What is an alternative to reading next line in Python? Here is a sample: filne = "D:/testtube/testdkanimfilternode.txt" f = open(filne, 'r+')
while 1: lines = f.readlines() if not lines: break for line in lines: print line if (line[:5] == "anim "): print 'next() ' ne = f.next() print ' ... | next() does not work in your case because you first call readlines() which basically sets the file iterator to point to the end of file. Since you are reading in all the lines anyway you can refer to the next line using an index: filne = "in" with open(filne, 'r+') as f: lines = f.readlines() for i in range(0, len(line... | Python read next() next() in python does not work. What is an alternative to reading next line in Python? Here is a sample: filne = "D:/testtube/testdkanimfilternode.txt" f = open(filne, 'r+')
while 1: lines = f.readlines() if not lines: break for line in lines: print line if (line[:5] == "anim "): print 'next() ' ne ... | TITLE:
Python read next()
QUESTION:
next() in python does not work. What is an alternative to reading next line in Python? Here is a sample: filne = "D:/testtube/testdkanimfilternode.txt" f = open(filne, 'r+')
while 1: lines = f.readlines() if not lines: break for line in lines: print line if (line[:5] == "anim "): p... | [
"python"
] | 23 | 25 | 218,655 | 6 | 0 | 2011-06-02T10:05:19.347000 | 2011-06-02T10:11:45.333000 |
6,213,075 | 6,223,085 | How to load aliases and environment variables for ansi-term/multi-term? | Do I have to set up something like.emacs.d/init_bash.sh (as for shell-mode), or can it read my ~/.bash_profile directly? If the latter, how do I set configure ansi-term/multi-term to source this file automatically on start-up? | Only login shells source.bash_profile automatically. Regular shell source only.bashrc. This shouldn't regularly be a problem, however, since all shells are usually spawned from the login shell and therefore inherit its environment. When I use ansi-term it requires no additional setup on my part and functions just like ... | How to load aliases and environment variables for ansi-term/multi-term? Do I have to set up something like.emacs.d/init_bash.sh (as for shell-mode), or can it read my ~/.bash_profile directly? If the latter, how do I set configure ansi-term/multi-term to source this file automatically on start-up? | TITLE:
How to load aliases and environment variables for ansi-term/multi-term?
QUESTION:
Do I have to set up something like.emacs.d/init_bash.sh (as for shell-mode), or can it read my ~/.bash_profile directly? If the latter, how do I set configure ansi-term/multi-term to source this file automatically on start-up?
AN... | [
"emacs"
] | 4 | 8 | 1,315 | 1 | 0 | 2011-06-02T10:06:46.647000 | 2011-06-03T04:53:14.490000 |
6,213,077 | 6,213,349 | How do I add the like facebook button to a silverlight application? | I'm new to silverlight 4 development. I need the facebook I like button to be integrated integrated on my website application? Can someone tell me how to do that? Can I download a library that will provide me a user control that is visible in my toolbox, and thus I will be able to just drag and drop this item on my pag... | You can just download a like button image from here and use the Facebook SDK to like the page. I haven't tried it myself but it should be possible. Another approach will be to use the Javascript API and call it from silverlight. Here's how: http://www.dotnetspider.com/tutorials/Silverlight-Tutorial-321.aspx http://www.... | How do I add the like facebook button to a silverlight application? I'm new to silverlight 4 development. I need the facebook I like button to be integrated integrated on my website application? Can someone tell me how to do that? Can I download a library that will provide me a user control that is visible in my toolbo... | TITLE:
How do I add the like facebook button to a silverlight application?
QUESTION:
I'm new to silverlight 4 development. I need the facebook I like button to be integrated integrated on my website application? Can someone tell me how to do that? Can I download a library that will provide me a user control that is vi... | [
"silverlight",
"silverlight-4.0",
"silverlight-toolkit"
] | 0 | 1 | 661 | 2 | 0 | 2011-06-02T10:06:57.187000 | 2011-06-02T10:31:38.250000 |
6,213,080 | 6,213,390 | Multithread performance | I created very simple app to figure out how boost::thread works. I found result of this test suprising. 4 threads of execution finish computation 2 times faster than 1 thread. I expected 4x boost. Another question is why 8 threads did not bring any performance boost? I'm using boost 1.46.1 and VS2008. Full source code ... | You may have 4 cores in your Core i5 750 machine, but you still have single data bus. All of the used data (13107200 * 3 * sizeof(float) = 157 MB) must pass through this data bus. And then there is a resulting vector of "mere" 13107200 * sizeof(float) = 52 MB, which takes the same resource. All this is heavy on the cac... | Multithread performance I created very simple app to figure out how boost::thread works. I found result of this test suprising. 4 threads of execution finish computation 2 times faster than 1 thread. I expected 4x boost. Another question is why 8 threads did not bring any performance boost? I'm using boost 1.46.1 and V... | TITLE:
Multithread performance
QUESTION:
I created very simple app to figure out how boost::thread works. I found result of this test suprising. 4 threads of execution finish computation 2 times faster than 1 thread. I expected 4x boost. Another question is why 8 threads did not bring any performance boost? I'm using ... | [
"c++",
"multithreading",
"performance",
"boost-thread"
] | 2 | 1 | 1,817 | 5 | 0 | 2011-06-02T10:07:03.603000 | 2011-06-02T10:35:42.523000 |
6,213,088 | 6,213,199 | subscribe to control's events in VBA | How do you subsribe to control's events in VBA? I am using MS Word 2010. I can see the public properties of the control in the properties window (F4), but I don't see any events there or an events window. | Assuming you mean events for controls on a userform; In the code editing window there are 2 combo-boxes at the very top, pick the control name from the left one and the event from the right and it will create a stub for you. | subscribe to control's events in VBA How do you subsribe to control's events in VBA? I am using MS Word 2010. I can see the public properties of the control in the properties window (F4), but I don't see any events there or an events window. | TITLE:
subscribe to control's events in VBA
QUESTION:
How do you subsribe to control's events in VBA? I am using MS Word 2010. I can see the public properties of the control in the properties window (F4), but I don't see any events there or an events window.
ANSWER:
Assuming you mean events for controls on a userform... | [
"events",
"vba",
"combobox"
] | 0 | 2 | 156 | 1 | 0 | 2011-06-02T10:07:47.073000 | 2011-06-02T10:18:28.640000 |
6,213,091 | 6,216,706 | grails acegi security constraints bypassed on forward | After googeling i found references that states that acegi security constraints isn't uphold upon forward. I tested it in my application, and i can confirm that i suffer from this issue. Does anyone know if the same issue is found in the recommended spring security plugin? If not, then it seems like it's time for me to ... | Spring Security is implemented using Servlet filters, so doing a server-side forward won't be checked since no filters are involved. A redirect would work (although it might not be appropriate for this use case) since it will result in a new request. Although this works the same in both the Acegi and Spring Security Co... | grails acegi security constraints bypassed on forward After googeling i found references that states that acegi security constraints isn't uphold upon forward. I tested it in my application, and i can confirm that i suffer from this issue. Does anyone know if the same issue is found in the recommended spring security p... | TITLE:
grails acegi security constraints bypassed on forward
QUESTION:
After googeling i found references that states that acegi security constraints isn't uphold upon forward. I tested it in my application, and i can confirm that i suffer from this issue. Does anyone know if the same issue is found in the recommended... | [
"grails",
"spring-security"
] | 0 | 1 | 174 | 1 | 0 | 2011-06-02T10:08:06.300000 | 2011-06-02T15:30:45.467000 |
6,213,098 | 6,214,570 | MYSQL ON DUPLICATE KEY UPDATE for copying table | I have 2 tables, temporary and permanent table. My objective is to copy temporary data into permanent table but must update the permanant table. Below are the tables ### Temp. table CREATE TABLE `tb_temp_data` ( `key_id` varchar(20) NOT NULL DEFAULT '', `h00` int(11) DEFAULT '0', `h01` int(11) DEFAULT '0', `h02` int(11... | INSERT INTO tb_permanant_data SELECT * FROM tb_temp_data ON DUPLICATE KEY UPDATE h00 = VALUES(h00), h01 = VALUES(h01), h02 = VALUES(h02), h03 = VALUES(h03), h04 = VALUES(h04), h05 = VALUES(h05), h06 = VALUES(h06), h07 = VALUES(h07), h08 = VALUES(h08), h09 = VALUES(h09), h10 = VALUES(h10), h11 = VALUES(h11), h12 = VALUE... | MYSQL ON DUPLICATE KEY UPDATE for copying table I have 2 tables, temporary and permanent table. My objective is to copy temporary data into permanent table but must update the permanant table. Below are the tables ### Temp. table CREATE TABLE `tb_temp_data` ( `key_id` varchar(20) NOT NULL DEFAULT '', `h00` int(11) DEFA... | TITLE:
MYSQL ON DUPLICATE KEY UPDATE for copying table
QUESTION:
I have 2 tables, temporary and permanent table. My objective is to copy temporary data into permanent table but must update the permanant table. Below are the tables ### Temp. table CREATE TABLE `tb_temp_data` ( `key_id` varchar(20) NOT NULL DEFAULT '', ... | [
"mysql"
] | 1 | 3 | 1,126 | 1 | 0 | 2011-06-02T10:08:26.790000 | 2011-06-02T12:35:35.853000 |
6,213,099 | 6,220,843 | Problem using Properties.Resources class? | I have an XO game. It needs three pictures: X, O and?. Program worked very well when pictures were near the exe bath. When I added three pictures to the resources, I have a null exception: private Bitmap xImage; private Bitmap oImage; private Bitmap initImage; this code is in constructor: // old code this.xImage = new ... | Check that the images are really in your resource file. Double-click on the Resources.resx file in your project, select "Images" from the top left, and verify that the three images are there, and that one of them is named "XImage". If they're not there, try re-adding them. If they're there with the wrong names, you can... | Problem using Properties.Resources class? I have an XO game. It needs three pictures: X, O and?. Program worked very well when pictures were near the exe bath. When I added three pictures to the resources, I have a null exception: private Bitmap xImage; private Bitmap oImage; private Bitmap initImage; this code is in c... | TITLE:
Problem using Properties.Resources class?
QUESTION:
I have an XO game. It needs three pictures: X, O and?. Program worked very well when pictures were near the exe bath. When I added three pictures to the resources, I have a null exception: private Bitmap xImage; private Bitmap oImage; private Bitmap initImage;... | [
"c#",
".net",
"resources"
] | 1 | 2 | 1,785 | 1 | 0 | 2011-06-02T10:08:34.880000 | 2011-06-02T21:56:12.747000 |
6,213,113 | 6,213,135 | Fixing the 'Use of unassigned local variable' with a null assignment. Why? | With a piece of code like this, the compiler complains on c.MyProperty: MyClass c;
try { throw new Exception(); } catch (Exception) { }
c.MyProperty = 2; // "Use of unassigned local variable 'c'". Yet it doesn't complain if you assign a null to c in initialization: MyClass c = null;
try { throw new Exception(); } ca... | When you assign null to the variable you're telling the compiler to back off because you know better than him so he should not complain about this. This is probably due to the fact that assigning null is considered to imply an explicit action by the developer. | Fixing the 'Use of unassigned local variable' with a null assignment. Why? With a piece of code like this, the compiler complains on c.MyProperty: MyClass c;
try { throw new Exception(); } catch (Exception) { }
c.MyProperty = 2; // "Use of unassigned local variable 'c'". Yet it doesn't complain if you assign a null t... | TITLE:
Fixing the 'Use of unassigned local variable' with a null assignment. Why?
QUESTION:
With a piece of code like this, the compiler complains on c.MyProperty: MyClass c;
try { throw new Exception(); } catch (Exception) { }
c.MyProperty = 2; // "Use of unassigned local variable 'c'". Yet it doesn't complain if y... | [
"c#",
"exception",
"variable-assignment"
] | 44 | 86 | 106,842 | 4 | 0 | 2011-06-02T10:10:14.920000 | 2011-06-02T10:12:08.690000 |
6,213,133 | 6,213,291 | Help needed for developing iPhone application | I have following system configuration: MAC OS X (10.5.8) XCode (3.1.4) iOS (3.0) 1) Can i develop application for iPhone 4 with this configuration? 2) If not then what are the basic system requirement for developing application for both iPhone 3 and iPhone 4. Thanks. | as per apple - To install Xcode 4, you must have an Intel-based Mac running Mac OS X v10.6 Snow Leopard. | Help needed for developing iPhone application I have following system configuration: MAC OS X (10.5.8) XCode (3.1.4) iOS (3.0) 1) Can i develop application for iPhone 4 with this configuration? 2) If not then what are the basic system requirement for developing application for both iPhone 3 and iPhone 4. Thanks. | TITLE:
Help needed for developing iPhone application
QUESTION:
I have following system configuration: MAC OS X (10.5.8) XCode (3.1.4) iOS (3.0) 1) Can i develop application for iPhone 4 with this configuration? 2) If not then what are the basic system requirement for developing application for both iPhone 3 and iPhone... | [
"iphone",
"configuration"
] | 0 | 1 | 57 | 2 | 0 | 2011-06-02T10:11:50.467000 | 2011-06-02T10:27:01.310000 |
6,213,137 | 6,254,257 | Binary OR not working in Symfony Propel Criteria | I am using Symfony 1.4 and Propel(ORM), i want to execute SQL query ( SELECT * FROM 'myblog' WHERE 'blog_title' LIKE '%symfony%' OR 'blog_post' LIKE '%symfony%' ) want to get all the records from myblog which contains the word symfony. I wrote the Symfony code as, $c = new Criteria(); $c->add(MyblogPeer::BLOG_TITLE, "%... | I think that in order to create an OR in the where closure, you need to create a Criterion and then add that criterion to the query, it should be something like this: $c = new Criteria(); $criterion = $c->getNewCriterion(MyblogPeer::BLOG_TITLE, "%symfony%", Criteria::LIKE); $criterion->addOr($c->getNewCriterion(MyblogP... | Binary OR not working in Symfony Propel Criteria I am using Symfony 1.4 and Propel(ORM), i want to execute SQL query ( SELECT * FROM 'myblog' WHERE 'blog_title' LIKE '%symfony%' OR 'blog_post' LIKE '%symfony%' ) want to get all the records from myblog which contains the word symfony. I wrote the Symfony code as, $c = n... | TITLE:
Binary OR not working in Symfony Propel Criteria
QUESTION:
I am using Symfony 1.4 and Propel(ORM), i want to execute SQL query ( SELECT * FROM 'myblog' WHERE 'blog_title' LIKE '%symfony%' OR 'blog_post' LIKE '%symfony%' ) want to get all the records from myblog which contains the word symfony. I wrote the Symfo... | [
"sql",
"symfony-1.4",
"propel"
] | 2 | 3 | 1,912 | 1 | 0 | 2011-06-02T10:12:12.577000 | 2011-06-06T15:22:39.217000 |
6,213,145 | 6,213,384 | How to get the value of a particular textView inside ListView in Android? | In my application I need to move from one activity to another depending on the list clicked. In each listview there will be three textview namely: Emp_id, Emp_name,Emp_address, so whenever I click on a particular list that should move to next activity of the corresponding Emp_id. So here I want to catch the Emp_id, whi... | Try like this: ListView lv_ArchivePartylist;
lv_ArchivePartylist = (ListView)findViewById(R.id.archive_ListView01); lv_ArchivePartylist.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position,long id) { // TODO Auto-generated method stub String m... | How to get the value of a particular textView inside ListView in Android? In my application I need to move from one activity to another depending on the list clicked. In each listview there will be three textview namely: Emp_id, Emp_name,Emp_address, so whenever I click on a particular list that should move to next act... | TITLE:
How to get the value of a particular textView inside ListView in Android?
QUESTION:
In my application I need to move from one activity to another depending on the list clicked. In each listview there will be three textview namely: Emp_id, Emp_name,Emp_address, so whenever I click on a particular list that shoul... | [
"android",
"listview"
] | 0 | 6 | 7,750 | 3 | 0 | 2011-06-02T10:12:34.397000 | 2011-06-02T10:34:36.097000 |
6,213,150 | 6,213,187 | How do I speed up a SQL UPDATE that also contains a JOIN on 25 million rows | the query i'd like to speed up (or replace with another process): UPDATE en_pages, keywords SET en_pages.keyword = keywords.keyword WHERE en_pages.keyword_id = keywords.id table en_pages has the proper structure but only has non-unique page_ids and keyword_ids in it. i'm trying to add the actual keywords(strings) to th... | I actually don't think you can speed up the process. You can still add brutal power to your database by cluserting new servers. | How do I speed up a SQL UPDATE that also contains a JOIN on 25 million rows the query i'd like to speed up (or replace with another process): UPDATE en_pages, keywords SET en_pages.keyword = keywords.keyword WHERE en_pages.keyword_id = keywords.id table en_pages has the proper structure but only has non-unique page_ids... | TITLE:
How do I speed up a SQL UPDATE that also contains a JOIN on 25 million rows
QUESTION:
the query i'd like to speed up (or replace with another process): UPDATE en_pages, keywords SET en_pages.keyword = keywords.keyword WHERE en_pages.keyword_id = keywords.id table en_pages has the proper structure but only has n... | [
"php",
"mysql",
"join",
"mysqli"
] | 2 | 2 | 239 | 3 | 0 | 2011-06-02T10:12:48.160000 | 2011-06-02T10:17:10.997000 |
6,213,153 | 6,213,174 | Using class in another class easily with an example | I have a php class that tells time like this (Time.class.php): timestamp = date('YmdHis'); return $this->timestamp; } }?> What I want to do is to call this time in a different class such as (Test.class.php): I'm new to PHP classes so I didn't understand what I've read on this subject. From what I've read this can be do... | You need to create an instance of the Time class first, then call the method on that instance. $mytime = new Time(); $timestamp = $mytime->timestamp(); Alternately you could look at static class methods. | Using class in another class easily with an example I have a php class that tells time like this (Time.class.php): timestamp = date('YmdHis'); return $this->timestamp; } }?> What I want to do is to call this time in a different class such as (Test.class.php): I'm new to PHP classes so I didn't understand what I've read... | TITLE:
Using class in another class easily with an example
QUESTION:
I have a php class that tells time like this (Time.class.php): timestamp = date('YmdHis'); return $this->timestamp; } }?> What I want to do is to call this time in a different class such as (Test.class.php): I'm new to PHP classes so I didn't underst... | [
"php",
"class"
] | 1 | 2 | 218 | 2 | 0 | 2011-06-02T10:13:35.067000 | 2011-06-02T10:15:57.267000 |
6,213,162 | 6,213,440 | Is Asynchronous file IO thread safe? | Is asynchronous file IO like FileStream.BeginWrite thread safe? If not, then it need to wrap with "SyncLock", that's mean it is still blocking thread. | FileStream.BeginWrite already starts a new thread to access the files. You don't need to start the FileStream.BeginWrite on a separate thread (because that will be thread in a thread). On the other hand, multiple FileStream.BeginWrite functions should not be accessing the same file at the same time. | Is Asynchronous file IO thread safe? Is asynchronous file IO like FileStream.BeginWrite thread safe? If not, then it need to wrap with "SyncLock", that's mean it is still blocking thread. | TITLE:
Is Asynchronous file IO thread safe?
QUESTION:
Is asynchronous file IO like FileStream.BeginWrite thread safe? If not, then it need to wrap with "SyncLock", that's mean it is still blocking thread.
ANSWER:
FileStream.BeginWrite already starts a new thread to access the files. You don't need to start the FileSt... | [
".net",
"file-io",
"asynchronous",
"filestream"
] | 3 | 4 | 912 | 3 | 0 | 2011-06-02T10:14:29.020000 | 2011-06-02T10:41:13.477000 |
6,213,164 | 6,213,928 | Internals of systemtap | I want to know what actually happens internally when the event written in the tap file occurs and how it is handled? | You should read the documents presented at the end of the SystemTap Documentation page, especially the Locating System Problems Using Dynamic Instrumentation OLS paper, to know a bit more about the internals. The Introduction to KProbes article at LWN is worth a read too. | Internals of systemtap I want to know what actually happens internally when the event written in the tap file occurs and how it is handled? | TITLE:
Internals of systemtap
QUESTION:
I want to know what actually happens internally when the event written in the tap file occurs and how it is handled?
ANSWER:
You should read the documents presented at the end of the SystemTap Documentation page, especially the Locating System Problems Using Dynamic Instrumenta... | [
"linux",
"kernel",
"systemtap"
] | 0 | 3 | 357 | 2 | 0 | 2011-06-02T10:14:46.287000 | 2011-06-02T11:29:19.797000 |
6,213,176 | 6,214,765 | Using MEF with asp.net web form application (SharePoint) | I'm trying to use MEF in my ASP.NET web form (SharePoint) application to load some controls from a directory at runtime. I'm not getting any error but the controls are not getting loaded. Here is my code - aspx.cs public partial class SampleMEF: System.Web.UI.Page { [ImportMany(typeof(IControlLoader))] IEnumerable > co... | Okay, I eventually found the issue. I'm able to load the part dlls only if I sign them and add the dlls to global assembly. But I don't understand what DirectoryCatalog does loading the folder. Bottom line: If the dlls are just in the parts folder and not in the GAC they are not getting loaded. | Using MEF with asp.net web form application (SharePoint) I'm trying to use MEF in my ASP.NET web form (SharePoint) application to load some controls from a directory at runtime. I'm not getting any error but the controls are not getting loaded. Here is my code - aspx.cs public partial class SampleMEF: System.Web.UI.Pag... | TITLE:
Using MEF with asp.net web form application (SharePoint)
QUESTION:
I'm trying to use MEF in my ASP.NET web form (SharePoint) application to load some controls from a directory at runtime. I'm not getting any error but the controls are not getting loaded. Here is my code - aspx.cs public partial class SampleMEF:... | [
"c#",
"asp.net",
"sharepoint",
"mef"
] | 1 | 2 | 1,231 | 2 | 0 | 2011-06-02T10:16:08.197000 | 2011-06-02T12:54:23.340000 |
6,213,182 | 6,213,705 | ,what is the use and benefit of Serialize() function in php | I know its Generates a storable representation of a value and used to access the objects across the php files but what if i dont use this function while storing the objects. | Let's say you have some post data, but your database/persistent storage can't be modified to store the new post data in separate fields. You could serialize your $_POST array and store it in the persistent storage you've got. It's useful for generating user-based CRUD applications. I've found the necessity of storing t... | ,what is the use and benefit of Serialize() function in php I know its Generates a storable representation of a value and used to access the objects across the php files but what if i dont use this function while storing the objects. | TITLE:
,what is the use and benefit of Serialize() function in php
QUESTION:
I know its Generates a storable representation of a value and used to access the objects across the php files but what if i dont use this function while storing the objects.
ANSWER:
Let's say you have some post data, but your database/persis... | [
"php"
] | 2 | 3 | 1,675 | 6 | 0 | 2011-06-02T10:16:43.807000 | 2011-06-02T11:04:58.263000 |
6,213,183 | 6,213,239 | Function not call when button click | i have create a UIBUtton editButton = [[UIButton alloc]initWithFrame:CGRectMake(width, -4, 30, 30)]; [editButton setImage:[UIImage imageNamed:@"DeleteButton.jpg"] forState:UIControlStateNormal]; [editButton addTarget:self action:@selector(deleteObjectViewImage:) forControlEvents:UIControlEventTouchUpInside]; editButton... | Use this line instead of line in your code (colon removed after function name), [editButton addTarget:self action:@selector(deleteObjectViewImage) forControlEvents:UIControlEventTouchUpInside]; | Function not call when button click i have create a UIBUtton editButton = [[UIButton alloc]initWithFrame:CGRectMake(width, -4, 30, 30)]; [editButton setImage:[UIImage imageNamed:@"DeleteButton.jpg"] forState:UIControlStateNormal]; [editButton addTarget:self action:@selector(deleteObjectViewImage:) forControlEvents:UICo... | TITLE:
Function not call when button click
QUESTION:
i have create a UIBUtton editButton = [[UIButton alloc]initWithFrame:CGRectMake(width, -4, 30, 30)]; [editButton setImage:[UIImage imageNamed:@"DeleteButton.jpg"] forState:UIControlStateNormal]; [editButton addTarget:self action:@selector(deleteObjectViewImage:) for... | [
"iphone",
"ipad"
] | 0 | 1 | 454 | 4 | 0 | 2011-06-02T10:16:49.637000 | 2011-06-02T10:22:05.573000 |
6,213,192 | 6,213,345 | Another "Retain, then Release" question | being a Cocoa/Obj-C newbie I am going through the "Cocoa Programming for Mac OS X" book by Aaron Hillegass and - leaving apart the fact that now we have also the chance to use GC to avoid all this reasoning - I am not sure I get the reason for some of those retains. In particular in one of the examples Aaron gives as g... | Retain means: I will be needing this object to stay around, it must not be deallocated. If x wouldn't be retained, the following is likely to happen: You assign x to foo, so foo now points to the address where your NSCalendarDate is. Someone releases or autoreleases this object, it's retain count eventually drops to 0 ... | Another "Retain, then Release" question being a Cocoa/Obj-C newbie I am going through the "Cocoa Programming for Mac OS X" book by Aaron Hillegass and - leaving apart the fact that now we have also the chance to use GC to avoid all this reasoning - I am not sure I get the reason for some of those retains. In particular... | TITLE:
Another "Retain, then Release" question
QUESTION:
being a Cocoa/Obj-C newbie I am going through the "Cocoa Programming for Mac OS X" book by Aaron Hillegass and - leaving apart the fact that now we have also the chance to use GC to avoid all this reasoning - I am not sure I get the reason for some of those reta... | [
"objective-c",
"cocoa",
"memory-management",
"retaincount"
] | 2 | 12 | 249 | 1 | 0 | 2011-06-02T10:17:50.083000 | 2011-06-02T10:31:30.327000 |
6,213,194 | 6,213,249 | Compare two strings of ints in java | I have two Strings that contain numbers and I want to see if the second string contains the same numbers as the first String, whether they are in order or not. If it has any number repeating than report false. Is there anyway in java other than using.charAt() because its not working for number after 10? String one = "1... | Looks like homework. So these steps you can follow: Trim both strings Convert both strings into ArrayList using space separator Sort both arrays numerically Compare both arrays | Compare two strings of ints in java I have two Strings that contain numbers and I want to see if the second string contains the same numbers as the first String, whether they are in order or not. If it has any number repeating than report false. Is there anyway in java other than using.charAt() because its not working ... | TITLE:
Compare two strings of ints in java
QUESTION:
I have two Strings that contain numbers and I want to see if the second string contains the same numbers as the first String, whether they are in order or not. If it has any number repeating than report false. Is there anyway in java other than using.charAt() becaus... | [
"java",
"string",
"compare"
] | 5 | 7 | 4,316 | 8 | 0 | 2011-06-02T10:18:15.927000 | 2011-06-02T10:23:17.693000 |
6,213,201 | 6,218,050 | Android GoogleTV display interaction from background process | I was wondering if it is possible inthe Android GoogleTV model to have a background process that interacts with the display. Can I display some sort of notifications on the screen when the user is watching video or engaging in a different app. | You should be able to display a Toast message. Otherwise you can't. Status Bar messages won't be displayed until you return to Home. | Android GoogleTV display interaction from background process I was wondering if it is possible inthe Android GoogleTV model to have a background process that interacts with the display. Can I display some sort of notifications on the screen when the user is watching video or engaging in a different app. | TITLE:
Android GoogleTV display interaction from background process
QUESTION:
I was wondering if it is possible inthe Android GoogleTV model to have a background process that interacts with the display. Can I display some sort of notifications on the screen when the user is watching video or engaging in a different ap... | [
"android",
"background-process",
"google-tv"
] | 0 | 0 | 438 | 1 | 0 | 2011-06-02T10:18:31.187000 | 2011-06-02T17:34:28.897000 |
6,213,223 | 6,213,464 | Problem of large size of .apk file in android? | I have a problem that arise due to large size and no. of images in app, my app stopped installing on emulator. It gives an error report " No Space Left". Size of.apk file is about 60MB. Now, I would like to ask the following questions: What could be done in this situation, so that it gets installed and doesn't gives th... | At Present limit of android market is 50 MB. so you can compress your images with some image compression and if you have used video or audio then also you can compress so you can achieved 50 MB. many compression tool is available. | Problem of large size of .apk file in android? I have a problem that arise due to large size and no. of images in app, my app stopped installing on emulator. It gives an error report " No Space Left". Size of.apk file is about 60MB. Now, I would like to ask the following questions: What could be done in this situation,... | TITLE:
Problem of large size of .apk file in android?
QUESTION:
I have a problem that arise due to large size and no. of images in app, my app stopped installing on emulator. It gives an error report " No Space Left". Size of.apk file is about 60MB. Now, I would like to ask the following questions: What could be done ... | [
"android"
] | 2 | 1 | 4,338 | 4 | 0 | 2011-06-02T10:20:55.933000 | 2011-06-02T10:43:53.897000 |
6,213,242 | 6,213,284 | Whats the point of DOCTYPE? | I know that different doctypes are essentially about how compliant the html is, but what difference does it make what doctype you specify? Do browsers handle the same code differently depending on the doctype? Thanks UPDATE - most answers mention quirks mode can be set off if no doctype is specified. But what would be ... | The biggest thing is having a doctype or not. If you don't, the browser will work in a "quirks" mode rather than standards mode and many things will be slightly different. If you have one — any — that typically activates more standards-compliant behavior in the browser. See this article for the details of what doctypes... | Whats the point of DOCTYPE? I know that different doctypes are essentially about how compliant the html is, but what difference does it make what doctype you specify? Do browsers handle the same code differently depending on the doctype? Thanks UPDATE - most answers mention quirks mode can be set off if no doctype is s... | TITLE:
Whats the point of DOCTYPE?
QUESTION:
I know that different doctypes are essentially about how compliant the html is, but what difference does it make what doctype you specify? Do browsers handle the same code differently depending on the doctype? Thanks UPDATE - most answers mention quirks mode can be set off ... | [
"html",
"doctype"
] | 9 | 9 | 3,587 | 8 | 0 | 2011-06-02T10:22:31.933000 | 2011-06-02T10:26:10.017000 |
6,213,247 | 6,213,632 | groovy list spreading | If you run the following Groovy code, the assertion passes def foo(a, b) { a + b }
assert 'aaabbb' == foo(['aaa', 'bbb']) This suggests that if a method is called with a List parameter that contains X elements, then the List will be spread and a method with X arguments will be invoked. Of course, this will only happen... | Going to be removed in Groovy 2 apparently: http://groovy.329449.n5.nabble.com/removing-features-in-Groovy-2-td4422494.html JT's first on the to-remove list and it seems everyone (with clout) on Groovy User agrees. | groovy list spreading If you run the following Groovy code, the assertion passes def foo(a, b) { a + b }
assert 'aaabbb' == foo(['aaa', 'bbb']) This suggests that if a method is called with a List parameter that contains X elements, then the List will be spread and a method with X arguments will be invoked. Of course,... | TITLE:
groovy list spreading
QUESTION:
If you run the following Groovy code, the assertion passes def foo(a, b) { a + b }
assert 'aaabbb' == foo(['aaa', 'bbb']) This suggests that if a method is called with a List parameter that contains X elements, then the List will be spread and a method with X arguments will be i... | [
"groovy"
] | 4 | 5 | 267 | 1 | 0 | 2011-06-02T10:23:15.550000 | 2011-06-02T10:58:47.903000 |
6,213,256 | 6,213,323 | trying to clone a branch using git, but it doesn't work | $ git clone gitosis@tony:stylingGit2.git Cloning into stylingGit2... ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly I'm trying to connect to a server, this happens and I wouldn't know what to do......does anybody knows how to solve this issue? | Either gitosis is misconfigured on the server, or you actually don't have access to it. You should check the configuration of the host "tony" (and possibly compare it to others). | trying to clone a branch using git, but it doesn't work $ git clone gitosis@tony:stylingGit2.git Cloning into stylingGit2... ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly I'm trying to connect to a server, this happens and I wouldn't know what to do......does anybody ... | TITLE:
trying to clone a branch using git, but it doesn't work
QUESTION:
$ git clone gitosis@tony:stylingGit2.git Cloning into stylingGit2... ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly I'm trying to connect to a server, this happens and I wouldn't know what to do.... | [
"git"
] | 0 | 1 | 77 | 2 | 0 | 2011-06-02T10:23:52.557000 | 2011-06-02T10:29:35.257000 |
6,213,268 | 6,213,360 | Black transparent modal alert on iOS, as seen in several apps | I'm looking for an API for a certain type of modal alert view (iOS), but I'm not entirely sure whether it's home-built or Apple-provided. It looks like a black transparent square, with rounded corners, usually one icon and a label below. For instance, it is used in the iPhone Twitter app. As observed, it only displays ... | MBProgressHUD is what you're looking for: https://github.com/matej/MBProgressHUD Apple does not reject applications using MBProgressHUD. | Black transparent modal alert on iOS, as seen in several apps I'm looking for an API for a certain type of modal alert view (iOS), but I'm not entirely sure whether it's home-built or Apple-provided. It looks like a black transparent square, with rounded corners, usually one icon and a label below. For instance, it is ... | TITLE:
Black transparent modal alert on iOS, as seen in several apps
QUESTION:
I'm looking for an API for a certain type of modal alert view (iOS), but I'm not entirely sure whether it's home-built or Apple-provided. It looks like a black transparent square, with rounded corners, usually one icon and a label below. Fo... | [
"ios",
"view",
"modal-dialog",
"alert"
] | 2 | 6 | 1,930 | 1 | 0 | 2011-06-02T10:24:56.830000 | 2011-06-02T10:32:26.067000 |
6,213,274 | 6,213,324 | ASP.NET Parser Error Cannot load code behind | Hey I am getting the following error Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type '_AddToCart'. Source Error: Li... | Specify the namespace of the Inherits property of Page directive Look at codebehind of your page. It looks like: namespace MyWebSite { public partial class _AddToCart: System.Web.UI.Page { //... } } So you must change Page directive to: <%@ Page Language="C#" AutoEventWireup="true" Codebehind="AddToCart.aspx.cs" Inheri... | ASP.NET Parser Error Cannot load code behind Hey I am getting the following error Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could... | TITLE:
ASP.NET Parser Error Cannot load code behind
QUESTION:
Hey I am getting the following error Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Er... | [
"asp.net"
] | 8 | 2 | 39,185 | 2 | 0 | 2011-06-02T10:25:22.307000 | 2011-06-02T10:29:38.440000 |
6,213,290 | 6,214,024 | symfony : myUser class => How to access custom property | I have enabled sfDoctrineGuardPlugin, so I have change myUser class to my class extends sfGuardSecurityUser. I have overrided sfGuardUser schema to add my own relation Personnage: local: id foreign: user_id type: one onUpdate: CASCADE onDelete: CASCADE When models are generated, if go on BasesfGuardUser.class.php, I ca... | You're mixing up two things: the myUser, aka. the session, and the doctrine user, aka. the user's database record. In symfony projects, the myUser class represents the current session (a wrapper on top of the $_SESSION superglobal). You can access the database record in you controller via $this->getUser()->getGuardUser... | symfony : myUser class => How to access custom property I have enabled sfDoctrineGuardPlugin, so I have change myUser class to my class extends sfGuardSecurityUser. I have overrided sfGuardUser schema to add my own relation Personnage: local: id foreign: user_id type: one onUpdate: CASCADE onDelete: CASCADE When models... | TITLE:
symfony : myUser class => How to access custom property
QUESTION:
I have enabled sfDoctrineGuardPlugin, so I have change myUser class to my class extends sfGuardSecurityUser. I have overrided sfGuardUser schema to add my own relation Personnage: local: id foreign: user_id type: one onUpdate: CASCADE onDelete: C... | [
"symfony1",
"sfdoctrineguard"
] | 0 | 5 | 1,235 | 1 | 0 | 2011-06-02T10:26:41.060000 | 2011-06-02T11:38:23.707000 |
6,213,300 | 6,213,695 | How to scan or decode QRCode and EAN_13 barcode using blackberry API 6? | How to scan or decode QRCode and EAN_13 barcode using blackberry API 6? Any help is appreciated. I have searched lot on google but haven't find any proper solution. My Code is..... formats.addElement(BarcodeFormat.QR_CODE); formats.addElement(BarcodeFormat.EAN_13); But i can't decode EAN_13 barcode but only QRCode. Tha... | if you want to decode EAN_13 barcode then you have to rotate scanded image in CW or give the image which is already rotated. | How to scan or decode QRCode and EAN_13 barcode using blackberry API 6? How to scan or decode QRCode and EAN_13 barcode using blackberry API 6? Any help is appreciated. I have searched lot on google but haven't find any proper solution. My Code is..... formats.addElement(BarcodeFormat.QR_CODE); formats.addElement(Barco... | TITLE:
How to scan or decode QRCode and EAN_13 barcode using blackberry API 6?
QUESTION:
How to scan or decode QRCode and EAN_13 barcode using blackberry API 6? Any help is appreciated. I have searched lot on google but haven't find any proper solution. My Code is..... formats.addElement(BarcodeFormat.QR_CODE); format... | [
"blackberry",
"qr-code"
] | 0 | 1 | 381 | 1 | 0 | 2011-06-02T10:27:46.360000 | 2011-06-02T11:03:28.030000 |
6,213,318 | 6,213,462 | Label enabled issue | I set Label component enabled property to "false", it still can interactive, when I click the label, the handleEnable() can always be invoked, I want Label behaves like Button component(if set Button enabled, user can't interactive with it), so how can I do? | After setting the enabled property to false, some components still respond to mouse interactions such as mouseOver. As a result, to fully disable UIComponents, you should also set the value of the mouseEnabled property to false. | Label enabled issue I set Label component enabled property to "false", it still can interactive, when I click the label, the handleEnable() can always be invoked, I want Label behaves like Button component(if set Button enabled, user can't interactive with it), so how can I do? | TITLE:
Label enabled issue
QUESTION:
I set Label component enabled property to "false", it still can interactive, when I click the label, the handleEnable() can always be invoked, I want Label behaves like Button component(if set Button enabled, user can't interactive with it), so how can I do?
ANSWER:
After setting ... | [
"apache-flex",
"actionscript-3"
] | 0 | 2 | 415 | 1 | 0 | 2011-06-02T10:29:13.523000 | 2011-06-02T10:43:50.437000 |
6,213,319 | 6,213,926 | asynchronous call using the NSOperationQueue | I am a beginner in developing iPhone applications. I was doing this sample program below and got an error- invalid use of void expression threadsss.h ------------ #import @interface threadsss: NSObject {
BOOL m_bRunThread; int a,b,c;
} -(void)Thread; -(void)add; -(void)display; @end
threadsss.m ------------
#import... | First, it would be easier to answer your question if you identified the line than the compiler was complaining about and showing only the relevant code. However, in this case it's pretty straight-forward. It's this line: [operation addDependency:[self add]]; The add method returns nothing (void). And you're telling ope... | asynchronous call using the NSOperationQueue I am a beginner in developing iPhone applications. I was doing this sample program below and got an error- invalid use of void expression threadsss.h ------------ #import @interface threadsss: NSObject {
BOOL m_bRunThread; int a,b,c;
} -(void)Thread; -(void)add; -(void)dis... | TITLE:
asynchronous call using the NSOperationQueue
QUESTION:
I am a beginner in developing iPhone applications. I was doing this sample program below and got an error- invalid use of void expression threadsss.h ------------ #import @interface threadsss: NSObject {
BOOL m_bRunThread; int a,b,c;
} -(void)Thread; -(vo... | [
"objective-c"
] | 0 | 2 | 1,306 | 1 | 0 | 2011-06-02T10:29:15.553000 | 2011-06-02T11:29:07.060000 |
6,213,328 | 6,213,378 | ASP.net c# Error, CS1061: 'Web2Print.ArtworkLabel' does not contain a definition for 'ID' and no extension method 'ID' | The error I am getting is: CS1061: 'Web2Print.ArtworkLabel' does not contain a definition for 'ID' and no extension method 'ID' accepting a first argument of type 'Web2Print.ArtworkLabel' could be found (are you missing a using directive or an assembly reference?) On the line: string FormVal = Request.Form["label" + Th... | The function throwing the error exists in namespace Web2Print, but the ArtworkLabel class does not exist in a namespace Everything must be in a namespace. Figure out what namespace ArtworkLabel is in, and refer to it as ArtworkLabelNameSpace.ArtworkLabel. Also check if there's a control called ArtworkLabel in your ASPX... | ASP.net c# Error, CS1061: 'Web2Print.ArtworkLabel' does not contain a definition for 'ID' and no extension method 'ID' The error I am getting is: CS1061: 'Web2Print.ArtworkLabel' does not contain a definition for 'ID' and no extension method 'ID' accepting a first argument of type 'Web2Print.ArtworkLabel' could be foun... | TITLE:
ASP.net c# Error, CS1061: 'Web2Print.ArtworkLabel' does not contain a definition for 'ID' and no extension method 'ID'
QUESTION:
The error I am getting is: CS1061: 'Web2Print.ArtworkLabel' does not contain a definition for 'ID' and no extension method 'ID' accepting a first argument of type 'Web2Print.ArtworkLa... | [
"c#",
"asp.net",
"visual-studio-2008",
"class"
] | 1 | 2 | 3,173 | 1 | 0 | 2011-06-02T10:30:26.037000 | 2011-06-02T10:34:20.900000 |
6,213,329 | 6,216,973 | Changing a flat image's color with jQuery | I have a flat white circular image (as in a seriously flat #ffffff image). Is there a way I can change it's color in the context of an HTML page (let's assume PNG, so we're working with an RGBA raster)? My environment uses jQuery, so I'm inclined to think within the jQuery mindset, but if something else makes this poss... | Ended up utilizing canvas after all. Scrapping the image idea, and just going with drawing the circles using canvas (and jCanvas to make it modular with the jQuery environ). Basically going with treating the tag itself as the equivalent, and maybe work with dynamically creating them as needed. To get it working with pr... | Changing a flat image's color with jQuery I have a flat white circular image (as in a seriously flat #ffffff image). Is there a way I can change it's color in the context of an HTML page (let's assume PNG, so we're working with an RGBA raster)? My environment uses jQuery, so I'm inclined to think within the jQuery mind... | TITLE:
Changing a flat image's color with jQuery
QUESTION:
I have a flat white circular image (as in a seriously flat #ffffff image). Is there a way I can change it's color in the context of an HTML page (let's assume PNG, so we're working with an RGBA raster)? My environment uses jQuery, so I'm inclined to think with... | [
"jquery",
"canvas"
] | 0 | 0 | 1,189 | 3 | 0 | 2011-06-02T10:30:28.830000 | 2011-06-02T15:56:14.930000 |
6,213,332 | 6,213,399 | Visual Studio 2010: Keyboard Shortcut to "Override Method" in C#? | In Visual Studio 2010, what is the keyboard shortcut to drop-down a list of C# virtual methods, and clicking them will generate an "override method" code? In IntelliJ IDEA, that feature's shortcut is CTRL+Shift+O. | If you type override space, or just ov tab space you will get this list. Select the one you want tab and it will generate the full override signature and place you in the body (the caret will be placed immediately before the base.blah(...) call it generates). | Visual Studio 2010: Keyboard Shortcut to "Override Method" in C#? In Visual Studio 2010, what is the keyboard shortcut to drop-down a list of C# virtual methods, and clicking them will generate an "override method" code? In IntelliJ IDEA, that feature's shortcut is CTRL+Shift+O. | TITLE:
Visual Studio 2010: Keyboard Shortcut to "Override Method" in C#?
QUESTION:
In Visual Studio 2010, what is the keyboard shortcut to drop-down a list of C# virtual methods, and clicking them will generate an "override method" code? In IntelliJ IDEA, that feature's shortcut is CTRL+Shift+O.
ANSWER:
If you type o... | [
"c#",
"visual-studio-2010",
"keyboard-shortcuts"
] | 40 | 88 | 38,460 | 2 | 0 | 2011-06-02T10:30:42.617000 | 2011-06-02T10:36:33.493000 |
6,213,334 | 6,213,405 | i-phone sending mail automatically | Possible Duplicate: How i send email from IPhone? I want to send a predefined mail through my i-phone app.I know we can use MFMailComposeViewController.but i dont want to open a separate MFMailComposeView.when user click the send button mail should send automatically.thanks in advance. | Unfortunately iOS does not allow sending emails without the user noticing. What you can do instead is use a server that sends the email for you. Like so: iPhone -> sends request to server that includes the recipient, body, subject of the email -> server will send the email for the user Note that this means that the sen... | i-phone sending mail automatically Possible Duplicate: How i send email from IPhone? I want to send a predefined mail through my i-phone app.I know we can use MFMailComposeViewController.but i dont want to open a separate MFMailComposeView.when user click the send button mail should send automatically.thanks in advance... | TITLE:
i-phone sending mail automatically
QUESTION:
Possible Duplicate: How i send email from IPhone? I want to send a predefined mail through my i-phone app.I know we can use MFMailComposeViewController.but i dont want to open a separate MFMailComposeView.when user click the send button mail should send automatically... | [
"iphone",
"cocoa-touch"
] | 0 | 1 | 109 | 1 | 0 | 2011-06-02T10:30:54.510000 | 2011-06-02T10:37:22.157000 |
6,213,336 | 6,213,416 | Reading file string into an array (In a pythonic way) | I'm reading lines from a file to then work with them. Each line is composed solely by float numbers. I have pretty much everything sorted up to convert the lines into arrays. I basically do (pseudopython code) line=file.readlines() line=line.split(' ') # Or whatever separator array=np.array(line) #And then iterate over... | Quick answer: arrays = [] for line in open(your_file): # no need to use readlines if you don't want to store them # use a list comprehension to build your array on the fly new_array = np.array((array.float(i) for i in line.split(' '))) arrays.append(new_array) If you process often this kind of data, the csv module will... | Reading file string into an array (In a pythonic way) I'm reading lines from a file to then work with them. Each line is composed solely by float numbers. I have pretty much everything sorted up to convert the lines into arrays. I basically do (pseudopython code) line=file.readlines() line=line.split(' ') # Or whatever... | TITLE:
Reading file string into an array (In a pythonic way)
QUESTION:
I'm reading lines from a file to then work with them. Each line is composed solely by float numbers. I have pretty much everything sorted up to convert the lines into arrays. I basically do (pseudopython code) line=file.readlines() line=line.split(... | [
"python",
"arrays",
"file-io",
"floating-point"
] | 4 | 7 | 23,309 | 5 | 0 | 2011-06-02T10:31:02.857000 | 2011-06-02T10:38:30.140000 |
6,213,337 | 6,310,264 | selector not working with layout and image view | I want to use selector for a layout and image view..But it is not working for me. When I changed image view to imagebutton or button, it works fine. Any help will be greatly appreciated.. Thanks in advance.. here is the xmls I used.. The layout xml: | I ran into this problem just now. You'll have to set the LinearLayout to clickable. You can either do this in the XML with android:clickable="true" Or in code with yourLinearLayout.setClickable(true); | selector not working with layout and image view I want to use selector for a layout and image view..But it is not working for me. When I changed image view to imagebutton or button, it works fine. Any help will be greatly appreciated.. Thanks in advance.. here is the xmls I used.. The layout xml: | TITLE:
selector not working with layout and image view
QUESTION:
I want to use selector for a layout and image view..But it is not working for me. When I changed image view to imagebutton or button, it works fine. Any help will be greatly appreciated.. Thanks in advance.. here is the xmls I used.. The layout xml:
ANS... | [
"android",
"layout",
"imageview"
] | 20 | 66 | 24,673 | 6 | 0 | 2011-06-02T10:31:03.240000 | 2011-06-10T17:55:03.277000 |
6,213,339 | 6,213,582 | <ul> Sprite Issue | I have the following code <%foreach (var pckg in Model) { %> li-text <%} %> and following is the sprite CSS.top-pkg1{ background-position: -184px 0; width: 36px; height: 36px; }.top-pkg2{ background-position: -270px 0; width: 36px; height: 36px; }.top-pkg3{ background-position: -356px 0; width: 36px; height: 36px; }.to... | @tassadaque; You already define background-position in your li image url top left background: url(/Content/images/TopMenu/topmenu.png) no-repeat top left; So remove top left position from your li image url and write like this: background: url(/Content/images/TopMenu/topmenu.png) no-repeat; Edit write: #menu li {backgro... | <ul> Sprite Issue I have the following code <%foreach (var pckg in Model) { %> li-text <%} %> and following is the sprite CSS.top-pkg1{ background-position: -184px 0; width: 36px; height: 36px; }.top-pkg2{ background-position: -270px 0; width: 36px; height: 36px; }.top-pkg3{ background-position: -356px 0; width: 36px; ... | TITLE:
<ul> Sprite Issue
QUESTION:
I have the following code <%foreach (var pckg in Model) { %> li-text <%} %> and following is the sprite CSS.top-pkg1{ background-position: -184px 0; width: 36px; height: 36px; }.top-pkg2{ background-position: -270px 0; width: 36px; height: 36px; }.top-pkg3{ background-position: -356p... | [
"css",
"graphics",
"sprite",
"css-sprites"
] | 2 | 1 | 115 | 2 | 0 | 2011-06-02T10:31:07.330000 | 2011-06-02T10:54:45.863000 |
6,213,341 | 6,213,367 | How to move the file pointer to next character through "ifstream" without "getting" any character, just like "fseek" does? | seekg uses ios as the second argument, and ios can be set to end or beg or some other values as shown here: http://www.cplusplus.com/reference/iostream/ios/ I just want the pointer to move to the next character, how is that to be accomplished through ifstream? EDIT Well, the problem is that I want a function in ifstrea... | ifstream fin(...); //...
fin.get(); // <--- move one character // or fin.ignore(); // <--- move one character | How to move the file pointer to next character through "ifstream" without "getting" any character, just like "fseek" does? seekg uses ios as the second argument, and ios can be set to end or beg or some other values as shown here: http://www.cplusplus.com/reference/iostream/ios/ I just want the pointer to move to the n... | TITLE:
How to move the file pointer to next character through "ifstream" without "getting" any character, just like "fseek" does?
QUESTION:
seekg uses ios as the second argument, and ios can be set to end or beg or some other values as shown here: http://www.cplusplus.com/reference/iostream/ios/ I just want the pointe... | [
"c++",
"file-io",
"ifstream"
] | 5 | 9 | 23,496 | 4 | 0 | 2011-06-02T10:31:15.523000 | 2011-06-02T10:33:20.653000 |
6,213,343 | 6,214,927 | How to checkout and reset using smartgit? | Need help in understanding the below 1). How do i check out to a particular commit and again revert back to the recent commit? Tried branch->checkout->same branch and check out to the previous commit, but when i did this the commits made after the one i checked out now got lost! Its not in the list to checkout to recen... | (1) Usually, branch refs won't be changed by a Check Out, so you may use Check Out again to switch back to your branch: simply select the corresponding branch for "Showing Branches" selector. If the branch ref to your old head is actually lost, you can open the Log and use Query|Load All Commits to display all such hea... | How to checkout and reset using smartgit? Need help in understanding the below 1). How do i check out to a particular commit and again revert back to the recent commit? Tried branch->checkout->same branch and check out to the previous commit, but when i did this the commits made after the one i checked out now got lost... | TITLE:
How to checkout and reset using smartgit?
QUESTION:
Need help in understanding the below 1). How do i check out to a particular commit and again revert back to the recent commit? Tried branch->checkout->same branch and check out to the previous commit, but when i did this the commits made after the one i checke... | [
"checkout",
"reset",
"smartgit"
] | 1 | 4 | 10,594 | 1 | 0 | 2011-06-02T10:31:20.247000 | 2011-06-02T13:09:33.400000 |
6,213,347 | 6,213,475 | Tab switching in android? | i have Tab host which is shown below, private TabHost myTabHost;......
setContentView(R.layout.vidtab);
Intent intent=getIntent();
intent = new Intent().setClass(this, RecordActivityGroup.class); myTabHost = (TabHost)this.findViewById(android.R.id.tabhost); myTabHost.setup(); TabSpec rectab = myTabHost.newTabSpec("R... | You can use an method in your main class like following public void switchToTab(int tabid){ myTabHost.setCurrentTab(tabid); } And now in Record class on your Button click call this YourStartCalss parentActivity; parentActivity= (YourStartCalss) this.getParent(); parentActivity.switchToTab(yourtabid); | Tab switching in android? i have Tab host which is shown below, private TabHost myTabHost;......
setContentView(R.layout.vidtab);
Intent intent=getIntent();
intent = new Intent().setClass(this, RecordActivityGroup.class); myTabHost = (TabHost)this.findViewById(android.R.id.tabhost); myTabHost.setup(); TabSpec rectab... | TITLE:
Tab switching in android?
QUESTION:
i have Tab host which is shown below, private TabHost myTabHost;......
setContentView(R.layout.vidtab);
Intent intent=getIntent();
intent = new Intent().setClass(this, RecordActivityGroup.class); myTabHost = (TabHost)this.findViewById(android.R.id.tabhost); myTabHost.setup... | [
"android",
"android-layout"
] | 0 | 1 | 175 | 1 | 0 | 2011-06-02T10:31:33.880000 | 2011-06-02T10:44:32.523000 |
6,213,350 | 6,213,369 | Is there a way in c++ to make sure that class member function isnt changing any of the class data members? | Lets say that I have a class Dictionary { vector words; void addWord(string word)//adds to words { /... } bool contains(string word)//only reads from words { //... } } Is there a way to make compiler check that contains isnt changing words vector. Ofc this is just an example with one class data member, I would like it ... | If you want the compiler to enforce this, then declare the member function const: bool contains(string word) const {... } A const function is not allowed to modify its member variables, and can only call other const member functions (either its own, or those of its member variables). The exception to this rule is if th... | Is there a way in c++ to make sure that class member function isnt changing any of the class data members? Lets say that I have a class Dictionary { vector words; void addWord(string word)//adds to words { /... } bool contains(string word)//only reads from words { //... } } Is there a way to make compiler check that co... | TITLE:
Is there a way in c++ to make sure that class member function isnt changing any of the class data members?
QUESTION:
Lets say that I have a class Dictionary { vector words; void addWord(string word)//adds to words { /... } bool contains(string word)//only reads from words { //... } } Is there a way to make comp... | [
"c++",
"syntax"
] | 3 | 16 | 233 | 5 | 0 | 2011-06-02T10:31:43.520000 | 2011-06-02T10:33:26.300000 |
6,213,354 | 6,213,425 | How can I eliminate spacing between inline elements in CSS? | I have a div with a bunch of image tags inside, here is an example: Because there is whitespace between the tags, browsers will display some whitespace between the images (Chrome decides on 4px). How can I tell the browser to show NO whitespace whatsoever between the images, without placing the > and < directly next to... | try to add img {margin:0;padding:0;float:left} in other words remove any default margin and padding of browsers for img and float them. Demo: http://jsfiddle.net/PZPbJ/ | How can I eliminate spacing between inline elements in CSS? I have a div with a bunch of image tags inside, here is an example: Because there is whitespace between the tags, browsers will display some whitespace between the images (Chrome decides on 4px). How can I tell the browser to show NO whitespace whatsoever betw... | TITLE:
How can I eliminate spacing between inline elements in CSS?
QUESTION:
I have a div with a bunch of image tags inside, here is an example: Because there is whitespace between the tags, browsers will display some whitespace between the images (Chrome decides on 4px). How can I tell the browser to show NO whitespa... | [
"html",
"css",
"whitespace",
"removing-whitespace"
] | 32 | 14 | 44,085 | 8 | 0 | 2011-06-02T10:31:56.800000 | 2011-06-02T10:39:54.833000 |
6,213,357 | 6,213,597 | Does Embarcadero RAD Studio XE license allow use on multiple machines? | In the past the Borland "no nonsense" license allowed one developer to do multiple installs. I'm tempted to upgrade to Embarcadero RAD Studio XE, professional edition, but am worried about licensing restrictions, and whether it will allow me to work in the same way as before. I downloaded a 30 day trial, and that will ... | Yes, you can legally install Rad Studio on more than one machine, as long as you are the only user. I'm specifically talking about the named user license. Check the section titled "Installing the product on multiple machines" here. | Does Embarcadero RAD Studio XE license allow use on multiple machines? In the past the Borland "no nonsense" license allowed one developer to do multiple installs. I'm tempted to upgrade to Embarcadero RAD Studio XE, professional edition, but am worried about licensing restrictions, and whether it will allow me to work... | TITLE:
Does Embarcadero RAD Studio XE license allow use on multiple machines?
QUESTION:
In the past the Borland "no nonsense" license allowed one developer to do multiple installs. I'm tempted to upgrade to Embarcadero RAD Studio XE, professional edition, but am worried about licensing restrictions, and whether it wil... | [
"delphi",
"licensing",
"upgrade"
] | 23 | 16 | 10,441 | 2 | 0 | 2011-06-02T10:32:23.930000 | 2011-06-02T10:55:47.307000 |
6,213,361 | 6,213,427 | python pyusb import usb.core doesn't work | I am following the tutorial(http://pyusb.sourceforge.net/docs/1.0/tutorial.html) I am on windows xp sp3, my python version is 2.7 and I downloaded and installed the pyusb-1.0.0-a1.zip and libusb-win32-bin-1.2.4.0.zip import usb works fine but import usb.core doesn't working at all it says Traceback (most recent call la... | In both cases error is: Traceback (most recent call last): File "D:\py\usb.py", line 1, in which means it has file usb.py in PATH earlier (probably in. which is D:\py\ in this case) than path to python modules. Did you install this module properly? Try rename this usb.py file to something else, you'll see if the error ... | python pyusb import usb.core doesn't work I am following the tutorial(http://pyusb.sourceforge.net/docs/1.0/tutorial.html) I am on windows xp sp3, my python version is 2.7 and I downloaded and installed the pyusb-1.0.0-a1.zip and libusb-win32-bin-1.2.4.0.zip import usb works fine but import usb.core doesn't working at ... | TITLE:
python pyusb import usb.core doesn't work
QUESTION:
I am following the tutorial(http://pyusb.sourceforge.net/docs/1.0/tutorial.html) I am on windows xp sp3, my python version is 2.7 and I downloaded and installed the pyusb-1.0.0-a1.zip and libusb-win32-bin-1.2.4.0.zip import usb works fine but import usb.core d... | [
"python",
"import",
"usb",
"pyusb"
] | 10 | 4 | 48,985 | 4 | 0 | 2011-06-02T10:32:30.370000 | 2011-06-02T10:40:06.347000 |
6,213,377 | 6,213,472 | Handle French Characters in Java | I Have a Page where I search for a term and it is displaying perfect. Whatever character type it is. Now when I have few checkboxes in JSP and I check it and submit. In these checkboxes I have one box name like ABC Farmacéutica Corporation. When I click on submit button, I am calling a function and will set all paramet... | This is an encoding problem, and the à clearly identify that this is UTF-8 text interpreted as ISO-Latin-1 (or one of its cousins). Ensure that your JSP-page at the top show that it uses UTF-8 encoding. | Handle French Characters in Java I Have a Page where I search for a term and it is displaying perfect. Whatever character type it is. Now when I have few checkboxes in JSP and I check it and submit. In these checkboxes I have one box name like ABC Farmacéutica Corporation. When I click on submit button, I am calling a ... | TITLE:
Handle French Characters in Java
QUESTION:
I Have a Page where I search for a term and it is displaying perfect. Whatever character type it is. Now when I have few checkboxes in JSP and I check it and submit. In these checkboxes I have one box name like ABC Farmacéutica Corporation. When I click on submit butto... | [
"java",
"javascript",
"encoding"
] | 6 | 2 | 22,520 | 5 | 0 | 2011-06-02T10:34:18.360000 | 2011-06-02T10:44:21.513000 |
6,213,380 | 6,213,726 | How to get the location of a place on google map | i'm developing an android application similar to Google places app. I want a functionality to obtain the location of a place on google maps in my application. How do i achieve this? This is the use case: Using GPS my current location's lat and long will be passed using the notification service. Then when i click on the... | What's the thing that you can't do - displaying the restaurant on the map, or having just the name of the place, you wish to find it's address/coordinates on the map? You can follow the official Android tutorial on the subject - Point 2 in this article: http://developer.android.com/resources/tutorials/views/ … Probably... | How to get the location of a place on google map i'm developing an android application similar to Google places app. I want a functionality to obtain the location of a place on google maps in my application. How do i achieve this? This is the use case: Using GPS my current location's lat and long will be passed using t... | TITLE:
How to get the location of a place on google map
QUESTION:
i'm developing an android application similar to Google places app. I want a functionality to obtain the location of a place on google maps in my application. How do i achieve this? This is the use case: Using GPS my current location's lat and long will... | [
"android"
] | 0 | 0 | 1,961 | 1 | 0 | 2011-06-02T10:34:32.667000 | 2011-06-02T11:07:10.510000 |
6,213,385 | 6,213,490 | In MS Access, how to select record on form1 after adding from form2? | This is my scenario (MS Access 2007): On Form1 I have a list of records (Orders). Form1 has a button that launches Form2. Form2 is used for creating new Orders. The "Save" button on Form2 uses VBA to save the record, close the form and requery Form1: DoCmd.RunCommand acCmdSaveRecord DoCmd.RunCommand acCmdCloseWindow Fo... | The answer would depend on whether the application has a single user or multiple users. In a multiuser scenario, simply getting the most recently added Order would not necessarily return the one YOU have just entered. But if it's only you, getting the most recently added value would do that. You can find the row with t... | In MS Access, how to select record on form1 after adding from form2? This is my scenario (MS Access 2007): On Form1 I have a list of records (Orders). Form1 has a button that launches Form2. Form2 is used for creating new Orders. The "Save" button on Form2 uses VBA to save the record, close the form and requery Form1: ... | TITLE:
In MS Access, how to select record on form1 after adding from form2?
QUESTION:
This is my scenario (MS Access 2007): On Form1 I have a list of records (Orders). Form1 has a button that launches Form2. Form2 is used for creating new Orders. The "Save" button on Form2 uses VBA to save the record, close the form a... | [
"forms",
"ms-access",
"select",
"record"
] | 0 | 1 | 513 | 1 | 0 | 2011-06-02T10:34:40.820000 | 2011-06-02T10:45:49.687000 |
6,213,394 | 6,213,486 | Displaying Unlimited Structure of Categories --> Subcategories --> etc? | I imagine this is a fairly common requirement for people when it comes to building any kind of application that relies on sorting and displaying data in categories - any CMS/Forums/Carts etc and I've been tearing my hair out trying to think of a way to show all categories and their children to no avail - the best I've ... | The structure you're talking about is essentially a tree. Iterating over a tree is relatively simple if you use recursion. I don't know what database access code you're using, but you should be able to extrapolate accordingly from the following psuedocode: function iterate_tree(arr) { foreach (item in arr) { print item... | Displaying Unlimited Structure of Categories --> Subcategories --> etc? I imagine this is a fairly common requirement for people when it comes to building any kind of application that relies on sorting and displaying data in categories - any CMS/Forums/Carts etc and I've been tearing my hair out trying to think of a wa... | TITLE:
Displaying Unlimited Structure of Categories --> Subcategories --> etc?
QUESTION:
I imagine this is a fairly common requirement for people when it comes to building any kind of application that relies on sorting and displaying data in categories - any CMS/Forums/Carts etc and I've been tearing my hair out tryin... | [
"php",
"structure",
"hierarchy",
"categories"
] | 3 | 1 | 1,756 | 3 | 0 | 2011-06-02T10:36:20.773000 | 2011-06-02T10:45:37.633000 |
6,213,396 | 6,213,453 | Not able to update the database in hibernate | I am new to hibernate and I am using hibernate 3.0 with MySQL and I want to make the simple database operations like insert update and delete with the database.I am getting the successful results for insert and delete but not able to update the particular field. I have persistent class named Employee with Fname,Lname,I... | I think you need to do your update before you commit the session So swapping your last two lines around should make it work:- session.update(contact); trx.commit(); | Not able to update the database in hibernate I am new to hibernate and I am using hibernate 3.0 with MySQL and I want to make the simple database operations like insert update and delete with the database.I am getting the successful results for insert and delete but not able to update the particular field. I have persi... | TITLE:
Not able to update the database in hibernate
QUESTION:
I am new to hibernate and I am using hibernate 3.0 with MySQL and I want to make the simple database operations like insert update and delete with the database.I am getting the successful results for insert and delete but not able to update the particular f... | [
"hibernate"
] | 0 | 0 | 1,924 | 2 | 0 | 2011-06-02T10:36:27.283000 | 2011-06-02T10:43:07.157000 |
6,213,400 | 6,213,441 | Set background color of a specific control | I have searched the net looking for a way to set background color a dialog control. I have managed to do this with this code: case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC) wParam; SetTextColor(hdcStatic, RGB(255,255,255)); SetBkColor(hdcStatic, RGB(0,0,0));
if (hbrBkgnd == NULL) { hbrBkgnd = CreateSolidBrush(RGB(0,0... | Check lParam matches the handle to the child that you want to change the colour of. | Set background color of a specific control I have searched the net looking for a way to set background color a dialog control. I have managed to do this with this code: case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC) wParam; SetTextColor(hdcStatic, RGB(255,255,255)); SetBkColor(hdcStatic, RGB(0,0,0));
if (hbrBkgnd == ... | TITLE:
Set background color of a specific control
QUESTION:
I have searched the net looking for a way to set background color a dialog control. I have managed to do this with this code: case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC) wParam; SetTextColor(hdcStatic, RGB(255,255,255)); SetBkColor(hdcStatic, RGB(0,0,0));... | [
"winapi",
"colors",
"background",
"dialog",
"controls"
] | 0 | 0 | 3,630 | 2 | 0 | 2011-06-02T10:36:48.503000 | 2011-06-02T10:41:15.613000 |
6,213,404 | 6,213,434 | How is the colon used when running a program in the command line? | I'm taking a Java assessment test. I do not understand the use of the colon in the command line. Could someone please elaborate? Thanks. Here is the question... Given: class One { int x = 0; {assert x == 1;} } public class Two { public static void main(String[] args) { int y = 0; assert y == 0; if(args.length > 0) new ... | The -ea is a command line argument to enables assertions. If you give a class after the -ea, it is enabled just for the classes listed. e.g. -ea:One turns on assertions for class One | How is the colon used when running a program in the command line? I'm taking a Java assessment test. I do not understand the use of the colon in the command line. Could someone please elaborate? Thanks. Here is the question... Given: class One { int x = 0; {assert x == 1;} } public class Two { public static void main(S... | TITLE:
How is the colon used when running a program in the command line?
QUESTION:
I'm taking a Java assessment test. I do not understand the use of the colon in the command line. Could someone please elaborate? Thanks. Here is the question... Given: class One { int x = 0; {assert x == 1;} } public class Two { public ... | [
"java",
"command-line"
] | 3 | 3 | 765 | 2 | 0 | 2011-06-02T10:37:05.737000 | 2011-06-02T10:40:44.873000 |
6,213,418 | 6,247,947 | LinkedIn API OAuth Problem | I'm using the PEAR OAuth Class to access the LinkedIn developer API and I've come across a bit of a problem. I can authorize my application but when it comes to getting an accessToken I'm receiving this error: Edit: Code after Adam's suggestions public function oauth_access() { session_start();
$token = $_GET['oauth_t... | You don't need to manually compute the signature, as pecl/oauth will do that for you. Also, you're telling the library to pass the data in the Authorization HTTP header. That is a good place to have it. Then you are passing it via a query parameter. That is permitted, but less optimal. (You may actually be passing it i... | LinkedIn API OAuth Problem I'm using the PEAR OAuth Class to access the LinkedIn developer API and I've come across a bit of a problem. I can authorize my application but when it comes to getting an accessToken I'm receiving this error: Edit: Code after Adam's suggestions public function oauth_access() { session_start(... | TITLE:
LinkedIn API OAuth Problem
QUESTION:
I'm using the PEAR OAuth Class to access the LinkedIn developer API and I've come across a bit of a problem. I can authorize my application but when it comes to getting an accessToken I'm receiving this error: Edit: Code after Adam's suggestions public function oauth_access(... | [
"php",
"oauth",
"linkedin-api"
] | 1 | 2 | 2,544 | 1 | 0 | 2011-06-02T10:38:51.120000 | 2011-06-06T05:03:41.433000 |
6,213,423 | 6,213,446 | Is ASMX WebService or WCF or aspx pages are async by default? | I involved my self within a bet, our feud is about - Async WebServices and the other stuff i mentioned above. I am thinking logically web service by default is sync, the other said that it is not correct. Who is right or wrong can any one explain it to me? Thanks in advance. | All of them are by default synchronous but you can write all of them asynchronously and you can call all of them asynchronously. You should always differ between synchronous/asynchronous call and between synchronous/asynchronous execution. Calls Synchronous - client calls the service/page and hangs on until the service... | Is ASMX WebService or WCF or aspx pages are async by default? I involved my self within a bet, our feud is about - Async WebServices and the other stuff i mentioned above. I am thinking logically web service by default is sync, the other said that it is not correct. Who is right or wrong can any one explain it to me? T... | TITLE:
Is ASMX WebService or WCF or aspx pages are async by default?
QUESTION:
I involved my self within a bet, our feud is about - Async WebServices and the other stuff i mentioned above. I am thinking logically web service by default is sync, the other said that it is not correct. Who is right or wrong can any one e... | [
"asp.net",
"wcf",
"asynchronous",
"asmx",
"synchronous"
] | 0 | 1 | 839 | 1 | 0 | 2011-06-02T10:39:45.877000 | 2011-06-02T10:42:33.523000 |
6,213,429 | 6,213,468 | How to save text of FCKEditor on database? | I am using FCKEditor on my page. and i want to save its content on database..but on doing this error A potentially dangerous Request.Form value was detected from the client (LongDescriptionVal=" hello.. "). occur on my page.. what i am doing is here:- aspx.cs:- protected void btnadd_Click(object sender, EventArgs e)
{... | add validateRequest="false" into your page; Sample; <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" ValidateRequest="false" Inherits="MyApp.Default" %> | How to save text of FCKEditor on database? I am using FCKEditor on my page. and i want to save its content on database..but on doing this error A potentially dangerous Request.Form value was detected from the client (LongDescriptionVal=" hello.. "). occur on my page.. what i am doing is here:- aspx.cs:- protected void ... | TITLE:
How to save text of FCKEditor on database?
QUESTION:
I am using FCKEditor on my page. and i want to save its content on database..but on doing this error A potentially dangerous Request.Form value was detected from the client (LongDescriptionVal=" hello.. "). occur on my page.. what i am doing is here:- aspx.cs... | [
"asp.net",
"fckeditor"
] | 1 | 1 | 1,740 | 3 | 0 | 2011-06-02T10:40:11.630000 | 2011-06-02T10:44:01.060000 |
6,213,444 | 6,213,567 | How to store drawable in an array | I want to download a bunch of images and would like to store it as drawable in an array. So I tried declaring a drawable array.But it returns me nullPointer exception when I access that array. My question is, how to declare an array type as drawable? | an array of drawables would be declared like: int numDrawables = 10; Drawable[] drawableArray = new Drawable[numDrawables]; to fill the array: for(int i = 0; i < numDrawables; i++){ // get a drawable from somewhere Drawable drawable = new Drawable(); drawableArray[i] = drawable; } to access the array: Drawable aDrawabl... | How to store drawable in an array I want to download a bunch of images and would like to store it as drawable in an array. So I tried declaring a drawable array.But it returns me nullPointer exception when I access that array. My question is, how to declare an array type as drawable? | TITLE:
How to store drawable in an array
QUESTION:
I want to download a bunch of images and would like to store it as drawable in an array. So I tried declaring a drawable array.But it returns me nullPointer exception when I access that array. My question is, how to declare an array type as drawable?
ANSWER:
an array... | [
"android",
"drawable"
] | 1 | 8 | 7,928 | 3 | 0 | 2011-06-02T10:42:21.647000 | 2011-06-02T10:53:09.970000 |
6,213,452 | 6,213,481 | Search $needle in $haystack | I'm using the following to retrieve the script name. <% String pageName = Request.FilePath; %> I'd like to be able to check this pageName to see if it contains the value "account". How do I do this with C#? | Use String.Contains method: if (pageName.Contains("account")) { // do something } | Search $needle in $haystack I'm using the following to retrieve the script name. <% String pageName = Request.FilePath; %> I'd like to be able to check this pageName to see if it contains the value "account". How do I do this with C#? | TITLE:
Search $needle in $haystack
QUESTION:
I'm using the following to retrieve the script name. <% String pageName = Request.FilePath; %> I'd like to be able to check this pageName to see if it contains the value "account". How do I do this with C#?
ANSWER:
Use String.Contains method: if (pageName.Contains("account... | [
"c#",
"asp.net",
"filepath"
] | 0 | 2 | 1,026 | 1 | 0 | 2011-06-02T10:43:06.707000 | 2011-06-02T10:45:20.377000 |
6,213,455 | 6,213,606 | In common-lisp how can i override/change evaluation behaviour for a specific type of object? | In common-lisp, I want to implement a kind of reference system like this: Suppose that I have: (defclass reference () ((host) (port) (file))) and also I have: (defun fetch-remote-value (reference)...) which fetches and deserializes a lisp object. How could I intervene in the evaluation process so as whenever a referenc... | In short: you cannot do this, except by rewriting the function eval and modifying your Lisp's compiler. The rules of evaluation are fixed Lisp standard. Edit After reading the augmented question, I don't think, that you can achieve full transperency for your references here. In a scenario like (defclass foo () (referen... | In common-lisp how can i override/change evaluation behaviour for a specific type of object? In common-lisp, I want to implement a kind of reference system like this: Suppose that I have: (defclass reference () ((host) (port) (file))) and also I have: (defun fetch-remote-value (reference)...) which fetches and deserial... | TITLE:
In common-lisp how can i override/change evaluation behaviour for a specific type of object?
QUESTION:
In common-lisp, I want to implement a kind of reference system like this: Suppose that I have: (defclass reference () ((host) (port) (file))) and also I have: (defun fetch-remote-value (reference)...) which fe... | [
"lisp",
"common-lisp",
"eval"
] | 3 | 2 | 620 | 4 | 0 | 2011-06-02T10:43:24.037000 | 2011-06-02T10:56:38.137000 |
6,213,457 | 6,214,312 | Best way to test FileNotFound handling | I'm relatively new to testing and still getting my head around some of the fundamentals. I have a method that I would like to test which basically creates a different file name if the supplied already exists (I've pasted the code below). I need a way of testing that the method returns a different (but also unique) name... | Here are two testing methods (using a Visual Studio unit testing project) for the two scenarios: // using System.IO;
[TestMethod] public void WhenFileExists() { // Create a file string existingFilename = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); using (File.Open(existingFilename, FileMode.CreateNew))... | Best way to test FileNotFound handling I'm relatively new to testing and still getting my head around some of the fundamentals. I have a method that I would like to test which basically creates a different file name if the supplied already exists (I've pasted the code below). I need a way of testing that the method ret... | TITLE:
Best way to test FileNotFound handling
QUESTION:
I'm relatively new to testing and still getting my head around some of the fundamentals. I have a method that I would like to test which basically creates a different file name if the supplied already exists (I've pasted the code below). I need a way of testing t... | [
"c#",
"visual-studio",
"unit-testing"
] | 0 | 2 | 1,652 | 3 | 0 | 2011-06-02T10:43:30.387000 | 2011-06-02T12:07:52.380000 |
6,213,466 | 6,213,485 | Saving Files c# - without overwriting? | I am saving data to a file every 60 secs, I have it saving every 60 secs ok but it deletes the previous data added. Is there a way in which it would add to the file rather than overwrite it. And without using save dialog as it is done in the background. Any feedback is greatly appreciated | It seems opening the File in Append mode will solve your problem. http://msdn.microsoft.com/en-us/library/3zc0w663.aspx | Saving Files c# - without overwriting? I am saving data to a file every 60 secs, I have it saving every 60 secs ok but it deletes the previous data added. Is there a way in which it would add to the file rather than overwrite it. And without using save dialog as it is done in the background. Any feedback is greatly app... | TITLE:
Saving Files c# - without overwriting?
QUESTION:
I am saving data to a file every 60 secs, I have it saving every 60 secs ok but it deletes the previous data added. Is there a way in which it would add to the file rather than overwrite it. And without using save dialog as it is done in the background. Any feedb... | [
"c#",
"file-io",
"save"
] | 1 | 3 | 2,470 | 6 | 0 | 2011-06-02T10:43:56.870000 | 2011-06-02T10:45:36.103000 |
6,213,471 | 6,213,492 | How to get element id using alias attribute in Mootools | How to get element id using alias attribute in Mootools | You can use the $$ function to return an element based on a css selector. You can use the css attribute selector syntax to retrieve elements based on an attribute. // Returns all inputs with an alias of school_name var els = $$('input[alias=school_name]'); This will return an array of elements. You can then do els[0].i... | How to get element id using alias attribute in Mootools How to get element id using alias attribute in Mootools | TITLE:
How to get element id using alias attribute in Mootools
QUESTION:
How to get element id using alias attribute in Mootools
ANSWER:
You can use the $$ function to return an element based on a css selector. You can use the css attribute selector syntax to retrieve elements based on an attribute. // Returns all in... | [
"javascript",
"mootools"
] | 0 | 0 | 1,893 | 1 | 0 | 2011-06-02T10:44:19.233000 | 2011-06-02T10:45:59.307000 |
6,213,478 | 6,213,496 | How to get the Enum Index value in C# | In C, enums, internally equates to an integer. Therefore we can treat data types of enum as integer also. How to achieve the same with C#? | Firstly, there could be two values that you're referring to: Underlying Value If you are asking about the underlying value, which could be any of these types: byte, sbyte, short, ushort, int, uint, long or ulong Then you can simply cast it to it's underlying type. Assuming it's an int, you can do it like this: int eVal... | How to get the Enum Index value in C# In C, enums, internally equates to an integer. Therefore we can treat data types of enum as integer also. How to achieve the same with C#? | TITLE:
How to get the Enum Index value in C#
QUESTION:
In C, enums, internally equates to an integer. Therefore we can treat data types of enum as integer also. How to achieve the same with C#?
ANSWER:
Firstly, there could be two values that you're referring to: Underlying Value If you are asking about the underlying... | [
"c#",
"c",
"enums",
"integer"
] | 75 | 113 | 215,533 | 9 | 0 | 2011-06-02T10:44:53.413000 | 2011-06-02T10:46:17.640000 |
6,213,498 | 6,213,935 | Custom Installer in .Net showing Form behind installer | [RunInstaller(true)] public partial class Installer1: Installer { public Installer1() { InitializeComponent(); }
public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); } private void Installer1_AfterInstall(object sender, InstallEventArgs e) { Form1 topmostForm = new Form1(... | If you want to show your own UI in the installer, you won't be able to use a setup and deployment project, because it lacks the features necessary to implement that. Consider using an installer toolkit like WiX or Inno Setup instead. Concerning the first part of your question, are you passing the custom dialog box in t... | Custom Installer in .Net showing Form behind installer [RunInstaller(true)] public partial class Installer1: Installer { public Installer1() { InitializeComponent(); }
public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); } private void Installer1_AfterInstall(object sende... | TITLE:
Custom Installer in .Net showing Form behind installer
QUESTION:
[RunInstaller(true)] public partial class Installer1: Installer { public Installer1() { InitializeComponent(); }
public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); } private void Installer1_AfterIn... | [
"c#",
"winforms",
"installation",
"windows-installer",
"custom-action"
] | 9 | 3 | 9,053 | 10 | 0 | 2011-06-02T10:46:26.320000 | 2011-06-02T11:29:59.797000 |
6,213,524 | 6,213,780 | Is it safe to store Tweet IDs as BIGINTs? | Moving forwards, am I going to have a problem at some point if I store Tweet IDs from the Twitter API as an unsigned BIGINT in MySQL? Am I better off using a CHAR(25) or something? The Tweet IDs are only going to get bigger and bigger over time. | an unsigned bigint can hold a value in the range of 0 to 18446744073709551615 (a really big number) if there are say approx. 52 billion tweets per year then: 18446744073709551615 / 52000000000 = 354745078 years worth of tweets so I think you'd be safe:P | Is it safe to store Tweet IDs as BIGINTs? Moving forwards, am I going to have a problem at some point if I store Tweet IDs from the Twitter API as an unsigned BIGINT in MySQL? Am I better off using a CHAR(25) or something? The Tweet IDs are only going to get bigger and bigger over time. | TITLE:
Is it safe to store Tweet IDs as BIGINTs?
QUESTION:
Moving forwards, am I going to have a problem at some point if I store Tweet IDs from the Twitter API as an unsigned BIGINT in MySQL? Am I better off using a CHAR(25) or something? The Tweet IDs are only going to get bigger and bigger over time.
ANSWER:
an un... | [
"mysql",
"twitter"
] | 13 | 22 | 3,163 | 2 | 0 | 2011-06-02T10:48:25.880000 | 2011-06-02T11:13:24.750000 |
6,213,538 | 6,213,637 | Can't create handler inside thread that has not called Looper.prepare() | I get this error "Can't create handler inside thread that has not called Looper.prepare()" Can you tell me how to fix it? public class PaymentActivity extends BaseActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.payment);
final Button bu... | You should know that when you try to modify your UI, the only thread who can do that is the UiThread. So if you want to modify your UI in another thread, try to use the method: Activity.runOnUiThread(new Runnable); Your code should be like this: new Thread() { public void run() { YourActivity.this.runOnUiThread(new Run... | Can't create handler inside thread that has not called Looper.prepare() I get this error "Can't create handler inside thread that has not called Looper.prepare()" Can you tell me how to fix it? public class PaymentActivity extends BaseActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate... | TITLE:
Can't create handler inside thread that has not called Looper.prepare()
QUESTION:
I get this error "Can't create handler inside thread that has not called Looper.prepare()" Can you tell me how to fix it? public class PaymentActivity extends BaseActivity { @Override public void onCreate(Bundle savedInstanceState... | [
"java",
"android",
"handler"
] | 21 | 34 | 52,405 | 6 | 0 | 2011-06-02T10:50:56.377000 | 2011-06-02T10:58:57.967000 |
6,213,539 | 6,213,616 | On printing webpage , it prints all the images of image slider | I have got a jquery image slider on my webpage, when i try to print that page all the images of that slider are printed, I want to print the current slide image, how can i acheive that, Below is the website: Duxbury Caravans | It seems your stylesheet isn't being applied on print. I've had the same problem before. Adding an explicit "print" stylesheet fixed it: Actually looking at your source, you are specifically saying media="screen", so maybe changing that to media="all" will work too. | On printing webpage , it prints all the images of image slider I have got a jquery image slider on my webpage, when i try to print that page all the images of that slider are printed, I want to print the current slide image, how can i acheive that, Below is the website: Duxbury Caravans | TITLE:
On printing webpage , it prints all the images of image slider
QUESTION:
I have got a jquery image slider on my webpage, when i try to print that page all the images of that slider are printed, I want to print the current slide image, how can i acheive that, Below is the website: Duxbury Caravans
ANSWER:
It se... | [
"jquery",
"printing",
"slider",
"image-rotation"
] | 0 | 2 | 3,292 | 3 | 0 | 2011-06-02T10:50:57.363000 | 2011-06-02T10:57:45.503000 |
6,213,542 | 6,215,585 | search tree in scala | I'm trying to put my first steps into Scala, and to practice I took a look at the google code jam storecredit excersize. I tried it in java first, which went well enough, and now I'm trying to port it to Scala. Now with the java collections framework, I could try to do a straight syntax conversion, but I'd end up writi... | I'm wondering what you are trying to accomplish using sophisticated data structures such as PriorityQueue and Deque for a problem such as this. It can be solved with a pair of nested loops: for { i <- 2 to I j <- 1 until i if i!= j && P(i-1) + P(j - 1) == C } println("Case #%d: %d %d" format (n, j, i)) Worse than linea... | search tree in scala I'm trying to put my first steps into Scala, and to practice I took a look at the google code jam storecredit excersize. I tried it in java first, which went well enough, and now I'm trying to port it to Scala. Now with the java collections framework, I could try to do a straight syntax conversion,... | TITLE:
search tree in scala
QUESTION:
I'm trying to put my first steps into Scala, and to practice I took a look at the google code jam storecredit excersize. I tried it in java first, which went well enough, and now I'm trying to port it to Scala. Now with the java collections framework, I could try to do a straight ... | [
"sorting",
"scala",
"collections",
"traversal"
] | 0 | 1 | 517 | 1 | 0 | 2011-06-02T10:51:01.153000 | 2011-06-02T14:00:30.307000 |
6,213,545 | 6,213,681 | ScrollViewer won't scroll on empty parts of the Grid | I have a Grid with a ScrollViewer around it: I the code-behind I fill this Grid with a dynamic amount of RowDefinitions. In the first column, I always put a TextBlock displaying a certain time of day (08:00, 08:10,...): http://www.youth-area.ch/users/finnland/times.png My problem now is the scolling. When I mousescroll... | I think you might just have to set a background on your Grid? | ScrollViewer won't scroll on empty parts of the Grid I have a Grid with a ScrollViewer around it: I the code-behind I fill this Grid with a dynamic amount of RowDefinitions. In the first column, I always put a TextBlock displaying a certain time of day (08:00, 08:10,...): http://www.youth-area.ch/users/finnland/times.p... | TITLE:
ScrollViewer won't scroll on empty parts of the Grid
QUESTION:
I have a Grid with a ScrollViewer around it: I the code-behind I fill this Grid with a dynamic amount of RowDefinitions. In the first column, I always put a TextBlock displaying a certain time of day (08:00, 08:10,...): http://www.youth-area.ch/user... | [
"c#",
"wpf",
"silverlight",
"xaml",
"mousewheel"
] | 0 | 2 | 175 | 1 | 0 | 2011-06-02T10:51:43.693000 | 2011-06-02T11:02:33.787000 |
6,213,547 | 6,213,649 | How to properly list items from array after splice | I have some example code: var array = []; array[0] = {id:0}; array[1] = {id:1}; array[2] = {id:2}; Now array looks like [Object{id=0}, Object{id=1}, Object{id=2}] I use splice: array.splice(0,1); And we have: [Object{id=1}, Object{id=2}] When I try for or for... in length will be only 2 and I can't iterate it in normal... | What did you try? If I issue var array = []; array[0] = {id:0}; array[1] = {id:1}; array[2] = {id:2}; array.splice(0,1); for (var i = 0, len = array.length; i < len; i++) console.log(i + ":", array[i]); the engine correctly outputs 0: Object { id=1 } 1: Object { id=2 } (but the array indices change to 0 and 1, perhaps ... | How to properly list items from array after splice I have some example code: var array = []; array[0] = {id:0}; array[1] = {id:1}; array[2] = {id:2}; Now array looks like [Object{id=0}, Object{id=1}, Object{id=2}] I use splice: array.splice(0,1); And we have: [Object{id=1}, Object{id=2}] When I try for or for... in len... | TITLE:
How to properly list items from array after splice
QUESTION:
I have some example code: var array = []; array[0] = {id:0}; array[1] = {id:1}; array[2] = {id:2}; Now array looks like [Object{id=0}, Object{id=1}, Object{id=2}] I use splice: array.splice(0,1); And we have: [Object{id=1}, Object{id=2}] When I try fo... | [
"javascript",
"arrays",
"for-loop"
] | 2 | 3 | 3,726 | 1 | 0 | 2011-06-02T10:51:57.517000 | 2011-06-02T10:59:54.923000 |
6,213,549 | 6,214,223 | determine if an application is shutting down normally | is there a way to determing if a jvm is shutting down normally? Shutdown hook can only spawn a thread, is there a way to determine if the JVM is existing normally or abnormally at that time? | I remembered a similar question being asked time ago. One possible course of action is the use of SignalHandler. You can read the full article here. It appears to be related to IBM JVM but I think it is equally valid for Java Hotspot. A little-known feature of Java is the ability of an application to install its own si... | determine if an application is shutting down normally is there a way to determing if a jvm is shutting down normally? Shutdown hook can only spawn a thread, is there a way to determine if the JVM is existing normally or abnormally at that time? | TITLE:
determine if an application is shutting down normally
QUESTION:
is there a way to determing if a jvm is shutting down normally? Shutdown hook can only spawn a thread, is there a way to determine if the JVM is existing normally or abnormally at that time?
ANSWER:
I remembered a similar question being asked time... | [
"java",
"jvm",
"shutdown"
] | 2 | 0 | 1,042 | 4 | 0 | 2011-06-02T10:52:00.267000 | 2011-06-02T11:59:51.970000 |
6,213,550 | 6,213,667 | rails form - 2 fields with same id in a form - how to disable second field when first field is selected | I have in my rails form the following code: Fruit: <%= f.select(:IST_FRUIT, [['Apple', 'Apple'], ['Orange', 'Orange'], ['Kiwi', 'Kiwi'], ['Other', 'Other'] ],{:prompt => "Please select"},{:onchange => "if (this.value == 'Other') {document.getElementById('otherTissue').style.display = 'block'; } "} ) %> If other, please... | First, be aware that rails posts are based on fields' name, not ids. In your case, you should use a virtual attribute to store the potential other fruit value. Your model could look like: attr_accessor:other_fruit
before_save:check_fruits
def check_fruits #if other_fruit is not nil, it means that you want to store it... | rails form - 2 fields with same id in a form - how to disable second field when first field is selected I have in my rails form the following code: Fruit: <%= f.select(:IST_FRUIT, [['Apple', 'Apple'], ['Orange', 'Orange'], ['Kiwi', 'Kiwi'], ['Other', 'Other'] ],{:prompt => "Please select"},{:onchange => "if (this.value... | TITLE:
rails form - 2 fields with same id in a form - how to disable second field when first field is selected
QUESTION:
I have in my rails form the following code: Fruit: <%= f.select(:IST_FRUIT, [['Apple', 'Apple'], ['Orange', 'Orange'], ['Kiwi', 'Kiwi'], ['Other', 'Other'] ],{:prompt => "Please select"},{:onchange ... | [
"ruby-on-rails"
] | 0 | 1 | 1,273 | 2 | 0 | 2011-06-02T10:52:00.730000 | 2011-06-02T11:01:05.563000 |
6,213,553 | 6,217,680 | Performance: Better to unzip from hard disk? | I'm about to make a design decision that could potentially have visible performance implications. Generally speaking, how do libraries handle unzipping; is it cheaper to unzip a file from memory or from hard disk? I imagine this varies from library to library, but what about zlib — just an example of a more popular lib... | By default, zlib will read a file "chunk by chunk" dependent on a predefined buffer size; this allows it to compress/uncompress data larger than available system memory. Since reads from disk are expensive (when compared to reads from memory), loading a file into memory first would provide an improvement in performance... | Performance: Better to unzip from hard disk? I'm about to make a design decision that could potentially have visible performance implications. Generally speaking, how do libraries handle unzipping; is it cheaper to unzip a file from memory or from hard disk? I imagine this varies from library to library, but what about... | TITLE:
Performance: Better to unzip from hard disk?
QUESTION:
I'm about to make a design decision that could potentially have visible performance implications. Generally speaking, how do libraries handle unzipping; is it cheaper to unzip a file from memory or from hard disk? I imagine this varies from library to libra... | [
"zip",
"unzip"
] | 0 | 1 | 292 | 1 | 0 | 2011-06-02T10:52:19.417000 | 2011-06-02T17:02:06.637000 |
6,213,554 | 6,216,736 | Querying JSON API with node.js | How should querying a JSON API be done best in node.js? Is there a module that will simplify this? I am trying to get the City location from http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452 I would use jQuery to query the API in client-side because it vastly simplifies things. Is there somet... | The request module makes http-request very easy. Just place a GET request to your URL and JSON.parse() the response. You might want to use encodeURIComponent() for your query parameters. | Querying JSON API with node.js How should querying a JSON API be done best in node.js? Is there a module that will simplify this? I am trying to get the City location from http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452 I would use jQuery to query the API in client-side because it vastly si... | TITLE:
Querying JSON API with node.js
QUESTION:
How should querying a JSON API be done best in node.js? Is there a module that will simplify this? I am trying to get the City location from http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452 I would use jQuery to query the API in client-side be... | [
"json",
"api",
"node.js"
] | 9 | 10 | 8,177 | 1 | 0 | 2011-06-02T10:52:20.030000 | 2011-06-02T15:33:28.503000 |
6,213,563 | 6,213,605 | How to split and concatenate a string | I have a filename in a string. I want to split the given string into 2 (1 is filename without extension, 2 is only extension) strings. Then add _dev to the end of first string and concatenate with 2nd one. ex: Dim name as string="abc.txt" Dim finalName as string The finalName should be like this "abc_dev.txt" Any sugge... | Try the following: Dim newName as String = oldName.Insert(oldName.LastIndexOf("."), "_dev") Refer to: String.Insert Method String.IndexOf Method (String) String.LastIndexOf Method (String) | How to split and concatenate a string I have a filename in a string. I want to split the given string into 2 (1 is filename without extension, 2 is only extension) strings. Then add _dev to the end of first string and concatenate with 2nd one. ex: Dim name as string="abc.txt" Dim finalName as string The finalName shoul... | TITLE:
How to split and concatenate a string
QUESTION:
I have a filename in a string. I want to split the given string into 2 (1 is filename without extension, 2 is only extension) strings. Then add _dev to the end of first string and concatenate with 2nd one. ex: Dim name as string="abc.txt" Dim finalName as string T... | [
".net",
"vb.net"
] | 0 | 0 | 773 | 3 | 0 | 2011-06-02T10:52:45.243000 | 2011-06-02T10:56:36.877000 |
6,213,565 | 6,213,670 | Remove repetition from if-else statement | I have written an if...else statement which uses an array myArr and a string myStr as follows: If myArr.Length > 0 AndAlso myArr(0) = "-1" Then 'Do stuff 1 ElseIf myStr= "xyz" Then 'Do stuff 2 ElseIf myArr.Length > 0 Then 'Do Stuff 3 Else 'Do Nothing End If It works exactly as I need. But It looks really confusing, mos... | I don't think you'll be able to get exactly the same flow in a simpler way. Either you're going to end up doing things different things, or doing duplicate things. eg: If myArr.Length > 0 Then If myArr(0) = "-1" Then 'Do stuff Else 'Do stuff End If ElseIf myStr= "xyz" Then 'Do stuff Else 'Do Nothing End If This will ca... | Remove repetition from if-else statement I have written an if...else statement which uses an array myArr and a string myStr as follows: If myArr.Length > 0 AndAlso myArr(0) = "-1" Then 'Do stuff 1 ElseIf myStr= "xyz" Then 'Do stuff 2 ElseIf myArr.Length > 0 Then 'Do Stuff 3 Else 'Do Nothing End If It works exactly as I... | TITLE:
Remove repetition from if-else statement
QUESTION:
I have written an if...else statement which uses an array myArr and a string myStr as follows: If myArr.Length > 0 AndAlso myArr(0) = "-1" Then 'Do stuff 1 ElseIf myStr= "xyz" Then 'Do stuff 2 ElseIf myArr.Length > 0 Then 'Do Stuff 3 Else 'Do Nothing End If It ... | [
"vb.net",
"if-statement"
] | 1 | 2 | 1,068 | 6 | 0 | 2011-06-02T10:52:54.167000 | 2011-06-02T11:01:20.167000 |
6,213,574 | 6,213,612 | Database Design Best Practice - Order processing database - Where updates to products could effectively change a closed invoice | just after some insight on best practice here. I'm building an order processing database, which manages stock, orders and invoices. In my design so far, the invoices and orders have foreign key references to a products table. If the products were to be updated after the creation of an order / invoice, then the list of ... | This is related to the "Slowly Changing Dimension" problem in data warehouses. There are a half-dozen standard solutions. http://en.wikipedia.org/wiki/Slowly_changing_dimension Your "freeze a copy" is like the Type 4 algorithm. | Database Design Best Practice - Order processing database - Where updates to products could effectively change a closed invoice just after some insight on best practice here. I'm building an order processing database, which manages stock, orders and invoices. In my design so far, the invoices and orders have foreign ke... | TITLE:
Database Design Best Practice - Order processing database - Where updates to products could effectively change a closed invoice
QUESTION:
just after some insight on best practice here. I'm building an order processing database, which manages stock, orders and invoices. In my design so far, the invoices and orde... | [
"database-design"
] | 6 | 9 | 1,987 | 2 | 0 | 2011-06-02T10:53:42.163000 | 2011-06-02T10:57:32.680000 |
6,213,575 | 6,213,608 | Android Random string generated from int | Basically Im trying to generate a random string when the page loads up. The problem is I dont know how to make the created random integer as a variable for my switch case. Can anyone modify my code and help me? CODE import java.util.Random;
import android.app.Activity; import android.os.Bundle; import android.widget.T... | You shouldn't switch on random, you should first get an int: Random rand = new Random(); int myRandom = rand.nextInt() % 3; or, as you implemented it Random myRandom = new Random(); //... switch(myRandom.nextInt() %3) { | Android Random string generated from int Basically Im trying to generate a random string when the page loads up. The problem is I dont know how to make the created random integer as a variable for my switch case. Can anyone modify my code and help me? CODE import java.util.Random;
import android.app.Activity; import a... | TITLE:
Android Random string generated from int
QUESTION:
Basically Im trying to generate a random string when the page loads up. The problem is I dont know how to make the created random integer as a variable for my switch case. Can anyone modify my code and help me? CODE import java.util.Random;
import android.app.... | [
"android",
"string",
"random",
"int"
] | 0 | 2 | 2,445 | 2 | 0 | 2011-06-02T10:53:49.030000 | 2011-06-02T10:56:41.887000 |
6,213,580 | 6,214,387 | __dopostback not working as expected | Scenario 1 (That Works) This is a POC i created. I have a script manager, a html textbox, an ASP.NET button, an updatepanel with async trigger set for Click event of above mentioned button. For html textbox i have, onkeyup='__doPostBack('<%=ASPBUTTON.ClientID%>',''). AND IT WORKS, the Click event of button is hit, and ... | Use the UniqueID instead: __doPostBack('<%=btnDateRangeCallback.UniqueID %>',... | __dopostback not working as expected Scenario 1 (That Works) This is a POC i created. I have a script manager, a html textbox, an ASP.NET button, an updatepanel with async trigger set for Click event of above mentioned button. For html textbox i have, onkeyup='__doPostBack('<%=ASPBUTTON.ClientID%>',''). AND IT WORKS, t... | TITLE:
__dopostback not working as expected
QUESTION:
Scenario 1 (That Works) This is a POC i created. I have a script manager, a html textbox, an ASP.NET button, an updatepanel with async trigger set for Click event of above mentioned button. For html textbox i have, onkeyup='__doPostBack('<%=ASPBUTTON.ClientID%>',''... | [
"jquery",
"asp.net",
"visual-studio",
"updatepanel"
] | 7 | 7 | 5,660 | 4 | 0 | 2011-06-02T10:54:36.597000 | 2011-06-02T12:17:40.800000 |
6,213,581 | 6,213,730 | jQuery pagination plugin | hi could you help me with jquery pagination plugin. I wanna hide pagination panel (prev, curent, next buttons) when items on the page is too few to showed up the next page, I mean when items are only for first page. this id from - https://github.com/gbirke/jquery_pagination JS CODE (function($){ /** * @class Class for ... | https://github.com/gbirke/jquery_pagination Available Options next_show_always If this is set to false, the "Next"-link is only shown when the page number can be increased. Default: true prev_show_always If this is set to false, the "Previous"-link is only shown when the page number can be decreased. Default: true num_... | jQuery pagination plugin hi could you help me with jquery pagination plugin. I wanna hide pagination panel (prev, curent, next buttons) when items on the page is too few to showed up the next page, I mean when items are only for first page. this id from - https://github.com/gbirke/jquery_pagination JS CODE (function($)... | TITLE:
jQuery pagination plugin
QUESTION:
hi could you help me with jquery pagination plugin. I wanna hide pagination panel (prev, curent, next buttons) when items on the page is too few to showed up the next page, I mean when items are only for first page. this id from - https://github.com/gbirke/jquery_pagination JS... | [
"jquery"
] | 0 | 2 | 3,719 | 1 | 0 | 2011-06-02T10:54:45.253000 | 2011-06-02T11:07:34.313000 |
6,213,583 | 6,220,247 | Tuples in .net 4.0.When Should I use them | I have come across Tuples in net 4.0. I have seen few example on msdn,however it's still not clear to me about the purpose of it and when to use them. Is it the idea that if i want to create a collections of mix types I should use a tuple? Any clear examples out there I can relate to? When did you last use them? Thanks... | Tuples are just used on the coding process by a developer. If you want to return two informations instead of one, then you can use a Tuple for fast coding, but I recoment you make yourself a type that will contain both properties, with appropriate naming, and documentation. Tuples are not used to mix types as you imagi... | Tuples in .net 4.0.When Should I use them I have come across Tuples in net 4.0. I have seen few example on msdn,however it's still not clear to me about the purpose of it and when to use them. Is it the idea that if i want to create a collections of mix types I should use a tuple? Any clear examples out there I can rel... | TITLE:
Tuples in .net 4.0.When Should I use them
QUESTION:
I have come across Tuples in net 4.0. I have seen few example on msdn,however it's still not clear to me about the purpose of it and when to use them. Is it the idea that if i want to create a collections of mix types I should use a tuple? Any clear examples o... | [
"c#-4.0"
] | 2 | 1 | 193 | 2 | 0 | 2011-06-02T10:54:54.410000 | 2011-06-02T20:51:48.693000 |
6,213,592 | 6,259,207 | Is that possible to call method that uses "content_tag" from controller in Rails 3? | In my Rails 3 application I use Ajax to get a formatted HTML: $.get("/my/load_page?page=5", function(data) { alert(data); });
class MyController < ApplicationController def load_page render:js => get_page(params[:page].to_i) end end get_page uses the content_tag method and should be available also in app/views/my/inde... | Helpers are really view code and aren't supposed to be used in controllers, which explains why it's so hard to make it happen. Another (IMHO, better) way to do this would be to build a view or partial with the HTML that you want wrapped around the params[:page].to_i. Then, in your controller, you can use render_to_stri... | Is that possible to call method that uses "content_tag" from controller in Rails 3? In my Rails 3 application I use Ajax to get a formatted HTML: $.get("/my/load_page?page=5", function(data) { alert(data); });
class MyController < ApplicationController def load_page render:js => get_page(params[:page].to_i) end end ge... | TITLE:
Is that possible to call method that uses "content_tag" from controller in Rails 3?
QUESTION:
In my Rails 3 application I use Ajax to get a formatted HTML: $.get("/my/load_page?page=5", function(data) { alert(data); });
class MyController < ApplicationController def load_page render:js => get_page(params[:page... | [
"ruby-on-rails",
"ruby-on-rails-3",
"content-tag"
] | 15 | 2 | 11,620 | 3 | 0 | 2011-06-02T10:55:17.137000 | 2011-06-06T23:34:44.753000 |
6,213,595 | 6,213,682 | Dynamics controls lost on postback | This old chestnut again. My page is constructed as follows; I have a dropdownlist which is databound on first load. When the user selects a value from this, a postback is performed which then databinds a repeater control. The ItemTemplate of this repeater control contains a placeholder control. In code behind in the It... | The problem is when you hit the save button probabily you dont re-bind the repeater and the controls you have added at run time withint the ItemDataBound event are not longer available(because they don't exist anymore) Why don't you add those control at design time using the Eval function the set up the value of the hi... | Dynamics controls lost on postback This old chestnut again. My page is constructed as follows; I have a dropdownlist which is databound on first load. When the user selects a value from this, a postback is performed which then databinds a repeater control. The ItemTemplate of this repeater control contains a placeholde... | TITLE:
Dynamics controls lost on postback
QUESTION:
This old chestnut again. My page is constructed as follows; I have a dropdownlist which is databound on first load. When the user selects a value from this, a postback is performed which then databinds a repeater control. The ItemTemplate of this repeater control con... | [
"c#",
"asp.net",
"postback",
"repeater",
"page-lifecycle"
] | 3 | 0 | 1,580 | 2 | 0 | 2011-06-02T10:55:45.910000 | 2011-06-02T11:02:34.207000 |
6,213,600 | 6,215,470 | error: "fatal: I don't handle protocol ``git` when using bundle install | I have the following line in my GemFile: gem 'rails',:git => 'git://github.com/rails/rails.git' I get the following error: Fetching git://github.com/rails/rails.git fatal: I don't handle protocol ''git' Git error: command `git clone 'git://github.com/rails/rails.git'... but when I run gem install 'rails' it works fine.... | It's the issue with the newer version of the Bundler 1.0.14. I needed to revert to 1.0.13 to make it work. They apparently had some issues dealing with escape characters in Windows. See here > https://github.com/carlhuda/bundler/issues/1212 | error: "fatal: I don't handle protocol ``git` when using bundle install I have the following line in my GemFile: gem 'rails',:git => 'git://github.com/rails/rails.git' I get the following error: Fetching git://github.com/rails/rails.git fatal: I don't handle protocol ''git' Git error: command `git clone 'git://github.c... | TITLE:
error: "fatal: I don't handle protocol ``git` when using bundle install
QUESTION:
I have the following line in my GemFile: gem 'rails',:git => 'git://github.com/rails/rails.git' I get the following error: Fetching git://github.com/rails/rails.git fatal: I don't handle protocol ''git' Git error: command `git clo... | [
"ruby",
"git",
"rubygems",
"bundler"
] | 5 | 0 | 4,624 | 2 | 0 | 2011-06-02T10:55:54.457000 | 2011-06-02T13:52:44.097000 |
6,213,607 | 6,213,687 | Stop toggle in treenode in winforms | i have a treeview in winforms. When i double click on treenode,its childnode gets disappear.Again when i click on that very node its child nodes gets expand. Any body please help me out. | If you want to disable double click alltogether you will have handle directly the WM_LBUTTONDBLCLK (0x0203). To do that create a MyTreeView control inheriting from System.Windows.Forms.TreeView and override the WndProc(ref Message m) method. public class MyTreeView: TreeView { protected override void WndProc(ref Messag... | Stop toggle in treenode in winforms i have a treeview in winforms. When i double click on treenode,its childnode gets disappear.Again when i click on that very node its child nodes gets expand. Any body please help me out. | TITLE:
Stop toggle in treenode in winforms
QUESTION:
i have a treeview in winforms. When i double click on treenode,its childnode gets disappear.Again when i click on that very node its child nodes gets expand. Any body please help me out.
ANSWER:
If you want to disable double click alltogether you will have handle d... | [
"c#",
"winforms",
"toggle",
"treenode"
] | 2 | 4 | 665 | 1 | 0 | 2011-06-02T10:56:38.173000 | 2011-06-02T11:02:57.313000 |
6,213,614 | 6,213,957 | PHP/MySQL - Performance considerations querying (select only) 48k rows | I am currently attempting to build a web application that relies quite heavily on postcode data (supplied from OS CodePoint Open ). The postcode database has 120 tables which breaks down the initial postcode prefix (i.e. SE, WS, B). Inside these tables there are between 11k - 48k rows with 3 fields (Postcode, Lat, Lng)... | If I understand correct, there is a SE table, a WS one, a B one, etc. In all, 120 tables with same structure (Postcode, Lat, Lng). I strongly propose you normalize the tables. You can have either one table: postcode( prefix, postcode, lat, lng) or two: postcode( prefixid, postcode, lat, lng )
prefix( prefixid, prefix ... | PHP/MySQL - Performance considerations querying (select only) 48k rows I am currently attempting to build a web application that relies quite heavily on postcode data (supplied from OS CodePoint Open ). The postcode database has 120 tables which breaks down the initial postcode prefix (i.e. SE, WS, B). Inside these tab... | TITLE:
PHP/MySQL - Performance considerations querying (select only) 48k rows
QUESTION:
I am currently attempting to build a web application that relies quite heavily on postcode data (supplied from OS CodePoint Open ). The postcode database has 120 tables which breaks down the initial postcode prefix (i.e. SE, WS, B)... | [
"php",
"mysql"
] | 3 | 1 | 199 | 4 | 0 | 2011-06-02T10:57:41.977000 | 2011-06-02T11:32:03.813000 |
6,213,621 | 6,263,796 | ExtJs4 - Load grid columns dynamically? | I was successfully able to load grid columns dynamically in ExtJs3. However, I have failed to get it working in ExtJs4. I can load the columns dynamically but I cannot get them to display in the grid. When the store loads I build a Column Model, I then set the grids columns as this Column Model. After setting the grids... | In order to change the grid columns, you need to call grid. reconfigure, you cannot just change the columns property. Reconfigure should trigger all the relevant refresh and redisplay events for you. ergo, your code should read: store.on('load', function(st){ var columnModel = store.data.items; grid.reconfigure(store, ... | ExtJs4 - Load grid columns dynamically? I was successfully able to load grid columns dynamically in ExtJs3. However, I have failed to get it working in ExtJs4. I can load the columns dynamically but I cannot get them to display in the grid. When the store loads I build a Column Model, I then set the grids columns as th... | TITLE:
ExtJs4 - Load grid columns dynamically?
QUESTION:
I was successfully able to load grid columns dynamically in ExtJs3. However, I have failed to get it working in ExtJs4. I can load the columns dynamically but I cannot get them to display in the grid. When the store loads I build a Column Model, I then set the g... | [
"javascript",
"extjs",
"extjs4"
] | 2 | 2 | 6,608 | 1 | 0 | 2011-06-02T10:58:01.037000 | 2011-06-07T10:18:14.727000 |
6,213,628 | 6,218,165 | Keep getting 'You have requested a non-existent service "test.client"' in Symfony2 Beta3 | I'm trying to setup a unit test but whenever I run "phpunit -c app" I get this error: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "test.client". The code in my test case is just: public function testNonAuthenticatedPathsIndex() { $client = $this->c... | Have you enabled the framework.test option in config_test.yml? framework: test: ~ | Keep getting 'You have requested a non-existent service "test.client"' in Symfony2 Beta3 I'm trying to setup a unit test but whenever I run "phpunit -c app" I get this error: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "test.client". The code in my... | TITLE:
Keep getting 'You have requested a non-existent service "test.client"' in Symfony2 Beta3
QUESTION:
I'm trying to setup a unit test but whenever I run "phpunit -c app" I get this error: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "test.clien... | [
"php",
"symfony",
"phpunit"
] | 39 | 84 | 15,932 | 5 | 0 | 2011-06-02T10:58:36.483000 | 2011-06-02T17:44:30.067000 |
6,213,638 | 6,271,650 | What are the endpoint and namespace of liferay's users Webservice | I have to consume the User's CRUD SOAP Webservice that liferay exposes. How can I know which is this service's endpoint? What's the address of the wsdl given the address where the portal stands? | http://www.example.com/tunnel-web/axis - If you're not accessing from localhost (e.g. x.x.x.x), you need to allow access for the client in one of these: tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP,x.x.x.x axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP,x.x.x.x You'll find the WSDL there (add these settings to your ... | What are the endpoint and namespace of liferay's users Webservice I have to consume the User's CRUD SOAP Webservice that liferay exposes. How can I know which is this service's endpoint? What's the address of the wsdl given the address where the portal stands? | TITLE:
What are the endpoint and namespace of liferay's users Webservice
QUESTION:
I have to consume the User's CRUD SOAP Webservice that liferay exposes. How can I know which is this service's endpoint? What's the address of the wsdl given the address where the portal stands?
ANSWER:
http://www.example.com/tunnel-we... | [
"java",
"web-services",
"soap",
"wsdl",
"liferay"
] | 0 | 0 | 330 | 1 | 0 | 2011-06-02T10:59:12.620000 | 2011-06-07T21:04:48.073000 |
6,213,642 | 6,214,400 | Using jQuery UI to style a div | I have the jQuery UI "smoothness" theme and I would like to use the "look" to style divs on my page. E.g. apply the gray, shaded, rounded-corner effect to a regular div that ISN'T an accordion, button, etc. I thought it would be easy! Perhaps it is?! Thanks! | Have a look at jQuery UI themeroller. You can select an existing theme or customize one, then using Chrome or Firefox/Firebug, for example, Right-click → Inspect element and copy the class names. ui-widget, ui-widget-content and ui-corner-all are the most likely class names you will be looking for. | Using jQuery UI to style a div I have the jQuery UI "smoothness" theme and I would like to use the "look" to style divs on my page. E.g. apply the gray, shaded, rounded-corner effect to a regular div that ISN'T an accordion, button, etc. I thought it would be easy! Perhaps it is?! Thanks! | TITLE:
Using jQuery UI to style a div
QUESTION:
I have the jQuery UI "smoothness" theme and I would like to use the "look" to style divs on my page. E.g. apply the gray, shaded, rounded-corner effect to a regular div that ISN'T an accordion, button, etc. I thought it would be easy! Perhaps it is?! Thanks!
ANSWER:
Hav... | [
"jquery-ui"
] | 4 | 6 | 4,819 | 2 | 0 | 2011-06-02T10:59:24.143000 | 2011-06-02T12:18:36.977000 |
6,213,656 | 6,213,897 | Filter data for last 24 hours using c#? | Here i am calculating the server restart count. i need the server restart count for last 24 hours. string logType = "System"; EventLog ev = new EventLog(logType, System.Environment.MachineName); int count=0; for (int i = ev.Entries.Count - 1; i >= 0; i--) { EventLogEntry CurrentEntry = ev.Entries[i]; if (CurrentEntry.S... | var ev = new EventLog("system", System.Environment.MachineName); var count = ev.Entries.Cast ().Where (e => e.TimeGenerated >= DateTime.Now.AddDays(-1) && e.Source.Equals("USER32", StringComparison.CurrentCultureIgnoreCase)).Count(); Edit: Considering jCoder's comment about the enteries being sorted on TimeGenerated. U... | Filter data for last 24 hours using c#? Here i am calculating the server restart count. i need the server restart count for last 24 hours. string logType = "System"; EventLog ev = new EventLog(logType, System.Environment.MachineName); int count=0; for (int i = ev.Entries.Count - 1; i >= 0; i--) { EventLogEntry CurrentE... | TITLE:
Filter data for last 24 hours using c#?
QUESTION:
Here i am calculating the server restart count. i need the server restart count for last 24 hours. string logType = "System"; EventLog ev = new EventLog(logType, System.Environment.MachineName); int count=0; for (int i = ev.Entries.Count - 1; i >= 0; i--) { Even... | [
"c#"
] | 0 | 3 | 2,822 | 3 | 0 | 2011-06-02T11:00:24.380000 | 2011-06-02T11:26:28.873000 |
6,213,665 | 6,213,716 | Javascript: replace <select> with <div>? | Is there any way to replace tag to a with hidden that drops down when clicked? Not a full solution, but maybe some js or jQuery library/plugin to do this. I can spend a day developing it, but maybe someone did have already did it? The reason i need it is the joomla administrative interface — the dropdown list contains ... | I tried out quite a few select replacement JQuery plugins, and settled on select-box - be sure to check out the demo page as well. There's a wide variety of plugins for this purpose, so if this one doesn't meet your needs I'm sure you'll find one that does with a little Google-fu. | Javascript: replace <select> with <div>? Is there any way to replace tag to a with hidden that drops down when clicked? Not a full solution, but maybe some js or jQuery library/plugin to do this. I can spend a day developing it, but maybe someone did have already did it? The reason i need it is the joomla administrativ... | TITLE:
Javascript: replace <select> with <div>?
QUESTION:
Is there any way to replace tag to a with hidden that drops down when clicked? Not a full solution, but maybe some js or jQuery library/plugin to do this. I can spend a day developing it, but maybe someone did have already did it? The reason i need it is the jo... | [
"javascript",
"html"
] | 1 | 4 | 3,065 | 1 | 0 | 2011-06-02T11:01:02.290000 | 2011-06-02T11:05:54.707000 |
6,213,669 | 6,225,117 | How to extract value from selected TextBlock element in a ListBox? | I'm using a ListBox to display all values contained in Dictionary<> object: Content is filled by the following code: Dictionary contacts = new Dictionary (); this.ContactsListBox.ItemsSource = contacts; Now, I would like to 'know' which specific "Contact" in ListBox is currently selected, either by knowing its Key, or ... | There are several problems: In Xaml you probably don't want to display the class name, but a reasonable string, for example: In the selection processing the selected item is KeyValuePair<...>. You could easily find it yourself, if you looked at the returned type in debugger. (Should be kind of a reflex for a programmer... | How to extract value from selected TextBlock element in a ListBox? I'm using a ListBox to display all values contained in Dictionary<> object: Content is filled by the following code: Dictionary contacts = new Dictionary (); this.ContactsListBox.ItemsSource = contacts; Now, I would like to 'know' which specific "Contac... | TITLE:
How to extract value from selected TextBlock element in a ListBox?
QUESTION:
I'm using a ListBox to display all values contained in Dictionary<> object: Content is filled by the following code: Dictionary contacts = new Dictionary (); this.ContactsListBox.ItemsSource = contacts; Now, I would like to 'know' whic... | [
"c#",
"silverlight",
"xaml",
"windows-phone-7",
"silverlight-4.0"
] | 2 | 0 | 3,564 | 5 | 0 | 2011-06-02T11:01:17.827000 | 2011-06-03T09:09:38.633000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.