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,253,261 | 6,253,313 | Alarm class in C# | Is there a pre-defined Alarm class in C#? I was reading C# Simple Event Handler for Setting Alarm and can't figure out how if it exists. | No, there is no pre-defined Alarm class in C#. However, you can find it in this msdn article: Raising an Event | Alarm class in C# Is there a pre-defined Alarm class in C#? I was reading C# Simple Event Handler for Setting Alarm and can't figure out how if it exists. | TITLE:
Alarm class in C#
QUESTION:
Is there a pre-defined Alarm class in C#? I was reading C# Simple Event Handler for Setting Alarm and can't figure out how if it exists.
ANSWER:
No, there is no pre-defined Alarm class in C#. However, you can find it in this msdn article: Raising an Event | [
"c#",
"alarm"
] | 0 | 1 | 3,819 | 3 | 0 | 2011-06-06T14:08:03.687000 | 2011-06-06T14:12:03.203000 |
6,253,264 | 6,253,305 | WPF MVVM DialogService close modal dialog? | I use the MVVM-pattern in my WPF-application. Now I show a dialog with my dialogService: _dialogService.ShowDialog(Me, settingsViewModel) The mapping (which view should be shown to this ViewModel) was set in the WindowViewModelMappings class. My question is now: How can I close the dialog from the settingsViewModel? Th... | Without knowing more about the implementation, I'd recommend you to return a token (guid,...), that represents that dialog. And then you have a call to close the dialog where you pass in that token. | WPF MVVM DialogService close modal dialog? I use the MVVM-pattern in my WPF-application. Now I show a dialog with my dialogService: _dialogService.ShowDialog(Me, settingsViewModel) The mapping (which view should be shown to this ViewModel) was set in the WindowViewModelMappings class. My question is now: How can I clos... | TITLE:
WPF MVVM DialogService close modal dialog?
QUESTION:
I use the MVVM-pattern in my WPF-application. Now I show a dialog with my dialogService: _dialogService.ShowDialog(Me, settingsViewModel) The mapping (which view should be shown to this ViewModel) was set in the WindowViewModelMappings class. My question is n... | [
"wpf",
"mvvm",
"dialog",
"modal-dialog"
] | 0 | 0 | 1,542 | 1 | 0 | 2011-06-06T14:08:27.090000 | 2011-06-06T14:11:27.407000 |
6,253,285 | 6,254,066 | Django Date-Based Generic Views: How to Access Variables | I have a series of urls tied to Django's generic date views. In the extra_context parameter, I'd like to pass in a queryset based off the year/ month variables in the URLs, but I'm not sure how to access them. For example, in url(r'^archive/(?P 20[1-2][0-9])/?$', archive_year, {'queryset': Article.objects.all(), 'date_... | You create a wrapper around the generic view: # myapp/views.py
def my_archive_year(request, year): # Logic to get the articles here
return archive_year(request, year=year, date_field='publication_date', template_name='articles/archive-date-list.html', extra_context = {'content': articles} )
# urls.py
url(r'^archive... | Django Date-Based Generic Views: How to Access Variables I have a series of urls tied to Django's generic date views. In the extra_context parameter, I'd like to pass in a queryset based off the year/ month variables in the URLs, but I'm not sure how to access them. For example, in url(r'^archive/(?P 20[1-2][0-9])/?$',... | TITLE:
Django Date-Based Generic Views: How to Access Variables
QUESTION:
I have a series of urls tied to Django's generic date views. In the extra_context parameter, I'd like to pass in a queryset based off the year/ month variables in the URLs, but I'm not sure how to access them. For example, in url(r'^archive/(?P ... | [
"django",
"django-generic-views"
] | 0 | 2 | 274 | 1 | 0 | 2011-06-06T14:10:03.610000 | 2011-06-06T15:07:15.097000 |
6,253,304 | 6,253,341 | Error with on click view | In my app i need to show dialogs for a lot of buttons. Therefore i decided to use 1 onClick for a series of buttons. Only the first line where we implement, there is an error. My code is as follows: import android.app.Activity; import android.os.Bundle; import android.app.AlertDialog; import android.view.View; public c... | You need to have the following in your class: @Override public void onClick(View v) { // TODO Auto-generated method stub
}} | Error with on click view In my app i need to show dialogs for a lot of buttons. Therefore i decided to use 1 onClick for a series of buttons. Only the first line where we implement, there is an error. My code is as follows: import android.app.Activity; import android.os.Bundle; import android.app.AlertDialog; import an... | TITLE:
Error with on click view
QUESTION:
In my app i need to show dialogs for a lot of buttons. Therefore i decided to use 1 onClick for a series of buttons. Only the first line where we implement, there is an error. My code is as follows: import android.app.Activity; import android.os.Bundle; import android.app.Aler... | [
"android"
] | 0 | 4 | 2,157 | 3 | 0 | 2011-06-06T14:11:06.760000 | 2011-06-06T14:14:00.987000 |
6,253,306 | 6,253,376 | Using jQuery binds for "everything"? | I've been falling in love with jQuery bind. The reason is that it grants me easy access to the event - and a uniform way to make functionality accessible. Here are examples: $menu = $(' ');
$menu.bind('populate', function() { // put stuff in the menu }
$menu.trigger('populate'); Which is exactly the same as this: $me... | The advantage of doing things that way is that it decouples your independent blocks of code, and makes it possible to trigger behavior without the code having to even know if such behavior is present on a particular page. There's a cost, as you say, but depending on your application it may be worth it. If the code need... | Using jQuery binds for "everything"? I've been falling in love with jQuery bind. The reason is that it grants me easy access to the event - and a uniform way to make functionality accessible. Here are examples: $menu = $(' ');
$menu.bind('populate', function() { // put stuff in the menu }
$menu.trigger('populate'); W... | TITLE:
Using jQuery binds for "everything"?
QUESTION:
I've been falling in love with jQuery bind. The reason is that it grants me easy access to the event - and a uniform way to make functionality accessible. Here are examples: $menu = $(' ');
$menu.bind('populate', function() { // put stuff in the menu }
$menu.trig... | [
"javascript",
"jquery",
"jquery-plugins",
"jquery-events"
] | 2 | 1 | 202 | 1 | 0 | 2011-06-06T14:11:36.510000 | 2011-06-06T14:16:39.133000 |
6,253,311 | 6,253,979 | Python access remote printer over socket connection | Have been asked to print to a remote printer via a socket connection, and struggling with how to approach this. I'm already passing data back and forth to a computer on the same network (also via a socket connection), and generating a PDF and/or HTML file with it when necessary. The idea is for me to send that file fro... | I am not sure that this is a good idea. If I understand the question correctly, this is about printing from a web application. I suggest the users simply use the browser's built-in print function for printing the generated HTML (or the PDF reader's in the case of PDFs). UPDATE If you need to automatically print from yo... | Python access remote printer over socket connection Have been asked to print to a remote printer via a socket connection, and struggling with how to approach this. I'm already passing data back and forth to a computer on the same network (also via a socket connection), and generating a PDF and/or HTML file with it when... | TITLE:
Python access remote printer over socket connection
QUESTION:
Have been asked to print to a remote printer via a socket connection, and struggling with how to approach this. I'm already passing data back and forth to a computer on the same network (also via a socket connection), and generating a PDF and/or HTML... | [
"python",
"sockets",
"printing"
] | 0 | 1 | 2,611 | 1 | 0 | 2011-06-06T14:11:54.600000 | 2011-06-06T14:58:57.240000 |
6,253,320 | 6,253,401 | Validation on onCellChange with Slickgrid | I have just started to use slickgrid (++ to the author btw) - running into a few small issues - I want to dynamically update some fields using the in-context editing. Once editing is done I wish to send this to the server which also should validate what was sent. If there is an error I would like to handle the error in... | Ajax requests are, by default, asynchronous, which means that if(!status) { return false; } grid.invalidateRow(data.length); data.push(item); grid.updateRowCount(); grid.render(); will probably be executed before the success callback. A couple different solutions: Make the ajax request synchronous ( not recommended ): ... | Validation on onCellChange with Slickgrid I have just started to use slickgrid (++ to the author btw) - running into a few small issues - I want to dynamically update some fields using the in-context editing. Once editing is done I wish to send this to the server which also should validate what was sent. If there is an... | TITLE:
Validation on onCellChange with Slickgrid
QUESTION:
I have just started to use slickgrid (++ to the author btw) - running into a few small issues - I want to dynamically update some fields using the in-context editing. Once editing is done I wish to send this to the server which also should validate what was se... | [
"slickgrid"
] | 2 | 2 | 7,350 | 2 | 0 | 2011-06-06T14:12:38.307000 | 2011-06-06T14:18:35.610000 |
6,253,323 | 6,253,369 | Unable to create instance of class | Unable to create instance of class TestClass. Error: System.UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\TestProject' is denied. System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) System.IO.FileStream.Init(String path,... | You're getting this error because as the exception message says the current user doesn't have access to the file in question. You need to adjust the permissions of that file and it's parent directories to allow access to the user in question Part of the problem is your choice of location. It looks like you are attempti... | Unable to create instance of class Unable to create instance of class TestClass. Error: System.UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\TestProject' is denied. System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) Sys... | TITLE:
Unable to create instance of class
QUESTION:
Unable to create instance of class TestClass. Error: System.UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\TestProject' is denied. System.IO.__Error.WinIOError(Int32 errorCode, String ... | [
"c#",
".net",
"exception",
"selenium"
] | 1 | 2 | 9,454 | 3 | 0 | 2011-06-06T14:12:47.463000 | 2011-06-06T14:15:55.717000 |
6,253,347 | 6,253,409 | jQuery 1.3.2 remove empty values | Hello I use this code to remove empty input text fields from my form: $('input:text[value=\"\"]', '#submForm').remove(); How do I achieve the same but with empty dropdown values like the below one? I need to remove the empty dropdown with the jQuery remove(); How do I do that? Thank you! | how about this (I don't think you can use it with the attributes because the value is on the option. Do you want to remove the option or the select item? $("select").each(function(){ if($(this).val() == "") $(this).remove(); }); | jQuery 1.3.2 remove empty values Hello I use this code to remove empty input text fields from my form: $('input:text[value=\"\"]', '#submForm').remove(); How do I achieve the same but with empty dropdown values like the below one? I need to remove the empty dropdown with the jQuery remove(); How do I do that? Thank you... | TITLE:
jQuery 1.3.2 remove empty values
QUESTION:
Hello I use this code to remove empty input text fields from my form: $('input:text[value=\"\"]', '#submForm').remove(); How do I achieve the same but with empty dropdown values like the below one? I need to remove the empty dropdown with the jQuery remove(); How do I ... | [
"jquery"
] | 2 | 1 | 5,165 | 2 | 0 | 2011-06-06T14:14:25.217000 | 2011-06-06T14:19:37.070000 |
6,253,351 | 6,253,386 | Can't use "not", "or", or "plus" as identifier? | I tried to compile this: enum class conditional_operator { plus, or, not }; But apparently GCC (4.6) thinks these are special, while I can't find a standard that says they are (neither C++0x n3290 or C99 n2794). I'm compiling with g++ -pedantic -std=c++0x. Is this a compiler convenience? How do I turn it off? Shouldn't... | Look at 2.5. They are alternative tokens for || and!. There is a bunch of other alternative tokens BTW. Edit: The rationale for their inclusion is the same as the one of trigraphs: allow the use of non ASCII character sets. The committee has tried to get rid of them (at least of trigraphs, I don't remember for alternat... | Can't use "not", "or", or "plus" as identifier? I tried to compile this: enum class conditional_operator { plus, or, not }; But apparently GCC (4.6) thinks these are special, while I can't find a standard that says they are (neither C++0x n3290 or C99 n2794). I'm compiling with g++ -pedantic -std=c++0x. Is this a compi... | TITLE:
Can't use "not", "or", or "plus" as identifier?
QUESTION:
I tried to compile this: enum class conditional_operator { plus, or, not }; But apparently GCC (4.6) thinks these are special, while I can't find a standard that says they are (neither C++0x n3290 or C99 n2794). I'm compiling with g++ -pedantic -std=c++0... | [
"c++",
"c++11",
"keyword",
"reserved-words"
] | 12 | 15 | 401 | 5 | 0 | 2011-06-06T14:14:38.833000 | 2011-06-06T14:17:17.947000 |
6,253,353 | 6,263,042 | Why does Zend mark a subpage as in-active? | I'm having issues setting up my breadcrumbs and menu using Zend_Navigation. First I set up my pages using a XML config object: Home Index index home default CRM Crm Index index crm Crm Crm Personen Persons index (...)etc.(...) Then in my bootstrap: //Bootstrap.php $view = $layout -> getView(); $config = new Zend_Config... | After a some (a lot) of tinkering, I figured out I needed to define the page within the XML before Zend would recognize the structure. Home Index index home default CRM Crm Index index crm Crm Crm Personen Persons index <--- this will make Zend recognize the page Crm Persoon Persons inspect (...)etc(...) Note that I di... | Why does Zend mark a subpage as in-active? I'm having issues setting up my breadcrumbs and menu using Zend_Navigation. First I set up my pages using a XML config object: Home Index index home default CRM Crm Index index crm Crm Crm Personen Persons index (...)etc.(...) Then in my bootstrap: //Bootstrap.php $view = $lay... | TITLE:
Why does Zend mark a subpage as in-active?
QUESTION:
I'm having issues setting up my breadcrumbs and menu using Zend_Navigation. First I set up my pages using a XML config object: Home Index index home default CRM Crm Index index crm Crm Crm Personen Persons index (...)etc.(...) Then in my bootstrap: //Bootstra... | [
"model-view-controller",
"zend-framework",
"zend-navigation"
] | 0 | 0 | 278 | 2 | 0 | 2011-06-06T14:15:09.317000 | 2011-06-07T09:12:42.080000 |
6,253,355 | 6,253,475 | What is the best way to storing and then comparing personality questions? | I am working on a small dating site for my local area, and I am wondering the best way I can go about storing, retrieving, and then comparing the answers to another person. It wont just be one question, I will be creating over 1000 questions to be more specific on matches. How would I go about doing this? | Here is a database approach: First, you need a table to hold the questions. It would have an ID column plus another column for the question text. Then you need a table that holds user information. It would have a lot more columns, but the important one is the user ID. Then you need a UserAnswer table to hold the users'... | What is the best way to storing and then comparing personality questions? I am working on a small dating site for my local area, and I am wondering the best way I can go about storing, retrieving, and then comparing the answers to another person. It wont just be one question, I will be creating over 1000 questions to b... | TITLE:
What is the best way to storing and then comparing personality questions?
QUESTION:
I am working on a small dating site for my local area, and I am wondering the best way I can go about storing, retrieving, and then comparing the answers to another person. It wont just be one question, I will be creating over 1... | [
"php"
] | 0 | 0 | 41 | 1 | 0 | 2011-06-06T14:15:11.613000 | 2011-06-06T14:23:50.647000 |
6,253,366 | 6,254,209 | How to automatically update MS-Access 2007 application | I have a front-end Access 2007 apllication which talks to MySql server. I want to have a feature where the application on the user's computer can detect that there is a new version on the network (which is not difficult) and download the latest version to the local drive and launch it. Does anybody has any knowledge or... | Do you actually need to find out if there is a newer version? We have a similar setup as well, and we just copy the frontend and all related files every time someone starts the application. Our users don't start Access or the frontend itself. They actually start a batch file which looks something like this: @echo off x... | How to automatically update MS-Access 2007 application I have a front-end Access 2007 apllication which talks to MySql server. I want to have a feature where the application on the user's computer can detect that there is a new version on the network (which is not difficult) and download the latest version to the local... | TITLE:
How to automatically update MS-Access 2007 application
QUESTION:
I have a front-end Access 2007 apllication which talks to MySql server. I want to have a feature where the application on the user's computer can detect that there is a new version on the network (which is not difficult) and download the latest ve... | [
"ms-access"
] | 5 | 5 | 2,615 | 3 | 0 | 2011-06-06T14:15:48.987000 | 2011-06-06T15:18:50.330000 |
6,253,372 | 6,253,530 | Converting vector of digits from base to base | How can I convert a vector in base a to vector in base b without the use of a library like gmp? The contain the digits of the numbers. a and b are less than 1024. a can be smaller or larger than b. I thought about using the standard base conversion algorithm but the numbers won't fit even in long long. | I thought about using the standard base conversion algorithm but the numbers won't fit even in long long. This is the correct (as in: “clean”) approach. Since the numbers won’t fit in a native number type, and you don’t want to use existing libraries, you essentially need to implement your own number type, or at least ... | Converting vector of digits from base to base How can I convert a vector in base a to vector in base b without the use of a library like gmp? The contain the digits of the numbers. a and b are less than 1024. a can be smaller or larger than b. I thought about using the standard base conversion algorithm but the numbers... | TITLE:
Converting vector of digits from base to base
QUESTION:
How can I convert a vector in base a to vector in base b without the use of a library like gmp? The contain the digits of the numbers. a and b are less than 1024. a can be smaller or larger than b. I thought about using the standard base conversion algorit... | [
"c++",
"radix"
] | 3 | 0 | 348 | 2 | 0 | 2011-06-06T14:16:20.550000 | 2011-06-06T14:28:55.323000 |
6,253,378 | 6,253,510 | problem in comparing two Strings in android | in my app i have two editbox in which the user types the email and password. The values are send to an URL and if the return values is success i am moving to a new activity, else if the return value is Email And Password Not Match! i want to show an alert box that emailand pwd mismatches. For this, after getting the xm... | Well when comparing 2 strings its always a good idea to use s1.compareToIgnoreCase(s2); reading your post I would suggest you use enum or constants public static final ERROR_CODE_INVALIDE_LOGGIN = 1; to compare rather that strings. Comparing strings is tedious (have to be careful that your comparing the characters and ... | problem in comparing two Strings in android in my app i have two editbox in which the user types the email and password. The values are send to an URL and if the return values is success i am moving to a new activity, else if the return value is Email And Password Not Match! i want to show an alert box that emailand pw... | TITLE:
problem in comparing two Strings in android
QUESTION:
in my app i have two editbox in which the user types the email and password. The values are send to an URL and if the return values is success i am moving to a new activity, else if the return value is Email And Password Not Match! i want to show an alert bo... | [
"android",
"equals"
] | 0 | 2 | 2,238 | 1 | 0 | 2011-06-06T14:16:45.013000 | 2011-06-06T14:27:32.573000 |
6,253,382 | 6,253,419 | MSQL: How to overwrite entry only if new one is higher? else create new entry | I have table named "highscore" like this: nameQL scoreQL piotr 50 And flash game with NAME and SCORE exported to PHP with this names. How to make this in PHP file: IF (NAME exists in database (nameQL) AND SCORE> this.name.scoreQL){Raplace scoreQL with SCORE WHERE nameQL=NAME} IF (NAME doesn't exists){Create new row wit... | I would use insert.. on duplicate key update... statement. Something like this: insert into highscore set name =:name, score =:new_score on duplicate key update score = greatest(score,:new_score) name column should be indexed as unique. Test script: create table player ( name varchar(32) primary key, score int not null... | MSQL: How to overwrite entry only if new one is higher? else create new entry I have table named "highscore" like this: nameQL scoreQL piotr 50 And flash game with NAME and SCORE exported to PHP with this names. How to make this in PHP file: IF (NAME exists in database (nameQL) AND SCORE> this.name.scoreQL){Raplace sco... | TITLE:
MSQL: How to overwrite entry only if new one is higher? else create new entry
QUESTION:
I have table named "highscore" like this: nameQL scoreQL piotr 50 And flash game with NAME and SCORE exported to PHP with this names. How to make this in PHP file: IF (NAME exists in database (nameQL) AND SCORE> this.name.sc... | [
"php",
"mysql",
"flash"
] | 0 | 5 | 79 | 1 | 0 | 2011-06-06T14:16:55.673000 | 2011-06-06T14:20:04.170000 |
6,253,389 | 6,253,598 | bind checkbox enable property to code behind method | I have a check box on a page. I want to set it's enable property from a codebehind method. I have done this Enabled= '<%#IsSMSEnabled()%>' /> IsSMSEnabled returns true or false depending on some logic. Check box is alwyas enabled no matter what is returned by IsSMSEnabled()% | The <%# expressions are evaluated at DataBind() time and are not evaluated at all if DataBind() is not called. You can call DataBind() in PreRenderComplete protected void Page_PreRenderComplete(object sender, EventArgs e) { DataBind(); } | bind checkbox enable property to code behind method I have a check box on a page. I want to set it's enable property from a codebehind method. I have done this Enabled= '<%#IsSMSEnabled()%>' /> IsSMSEnabled returns true or false depending on some logic. Check box is alwyas enabled no matter what is returned by IsSMSEna... | TITLE:
bind checkbox enable property to code behind method
QUESTION:
I have a check box on a page. I want to set it's enable property from a codebehind method. I have done this Enabled= '<%#IsSMSEnabled()%>' /> IsSMSEnabled returns true or false depending on some logic. Check box is alwyas enabled no matter what is re... | [
"c#",
"asp.net"
] | 1 | 1 | 786 | 4 | 0 | 2011-06-06T14:17:33.423000 | 2011-06-06T14:33:37.123000 |
6,253,392 | 6,253,453 | Redirect to www with .htaccess not redirecting | Im have absolutely no experience with.htaccess and i tried something today. I basicly wanted all my pages starting with http://www. to redirect to http:// so i did a search on the internet and found this link: http://forum.joomla.org/viewtopic.php?p=2437275 again i had absolutely no idea what i was doing and i just cop... | You have to have RewriteEngine on At the beginning of your file. This may be obvious but since you have no experience, just in case, you have to replace example.com with your domain name. Be sure you actually have and Apache server. Be sure to name your file ".htaccess" (with the dot, without the "") So, this should wo... | Redirect to www with .htaccess not redirecting Im have absolutely no experience with.htaccess and i tried something today. I basicly wanted all my pages starting with http://www. to redirect to http:// so i did a search on the internet and found this link: http://forum.joomla.org/viewtopic.php?p=2437275 again i had abs... | TITLE:
Redirect to www with .htaccess not redirecting
QUESTION:
Im have absolutely no experience with.htaccess and i tried something today. I basicly wanted all my pages starting with http://www. to redirect to http:// so i did a search on the internet and found this link: http://forum.joomla.org/viewtopic.php?p=24372... | [
"php",
".htaccess",
"mod-rewrite"
] | 1 | 4 | 1,187 | 2 | 0 | 2011-06-06T14:17:47.870000 | 2011-06-06T14:22:32.863000 |
6,253,396 | 6,253,558 | Can't run pycparser: Needs ply.yacc? | I downloaded pycparser and ran python setup.py install, but whenever I try to run anything, I get:... from.c_parser import CParser File "C:\Program Files\Python 3.2\lib\site-packages\pycparser\c_parser.py", line 11, in import ply.yacc ImportError: No module named ply.yacc What's wrong? I'm pretty sure I followed the Re... | Looks like it depends on ply. Download and install, and you should be fine. | Can't run pycparser: Needs ply.yacc? I downloaded pycparser and ran python setup.py install, but whenever I try to run anything, I get:... from.c_parser import CParser File "C:\Program Files\Python 3.2\lib\site-packages\pycparser\c_parser.py", line 11, in import ply.yacc ImportError: No module named ply.yacc What's wro... | TITLE:
Can't run pycparser: Needs ply.yacc?
QUESTION:
I downloaded pycparser and ran python setup.py install, but whenever I try to run anything, I get:... from.c_parser import CParser File "C:\Program Files\Python 3.2\lib\site-packages\pycparser\c_parser.py", line 11, in import ply.yacc ImportError: No module named p... | [
"python",
"yacc",
"pycparser"
] | 0 | 1 | 4,829 | 2 | 0 | 2011-06-06T14:18:00.070000 | 2011-06-06T14:30:44.217000 |
6,253,399 | 6,253,975 | how does the undecided generic type represents in ghci's runtime | I'm clear about the generic functions and generic data-types. In the generic type: data SB = forall x. (show x) => SB x instance Show SB where show (SB x) = show x so for any given type x, if it has a signature of Show, and there sure be a show function corresponds to it. but when typing in ghci, e.g.:t 1 outputs 1:: N... | As Don Stewart said, type classes in GHC are implemented using "dictionaries". That means that the type class Num is represented as a record of functions (I'm gonna skip the Eq and Show constraints here): class Num a where fromInteger:: Integer -> a... becomes data Num a = Num { fromInteger:: Integer -> a,... } When yo... | how does the undecided generic type represents in ghci's runtime I'm clear about the generic functions and generic data-types. In the generic type: data SB = forall x. (show x) => SB x instance Show SB where show (SB x) = show x so for any given type x, if it has a signature of Show, and there sure be a show function c... | TITLE:
how does the undecided generic type represents in ghci's runtime
QUESTION:
I'm clear about the generic functions and generic data-types. In the generic type: data SB = forall x. (show x) => SB x instance Show SB where show (SB x) = show x so for any given type x, if it has a signature of Show, and there sure be... | [
"generics",
"haskell",
"types",
"functional-programming",
"runtime"
] | 3 | 4 | 317 | 2 | 0 | 2011-06-06T14:18:08.087000 | 2011-06-06T14:58:44.227000 |
6,253,402 | 6,253,447 | UTF8 and jsp, trying to understand what is going on | I created the following jsp: <% byte[] oe1 = {-61,-123}; byte[] oe2 = {-123,-61}; byte[] oe3 = "œ".getBytes("UTF-8"); %> byte[] oe1 = {-61,-123}: '<%=new String(oe1, "UTF-8")%>' byte[] oe2 = {-123,-61}: '<%=new String(oe2, "UTF-8")%>' byte[] oe3 = "œ".getBytes("UTF-8"): '<%=new String(oe3, "UTF-8")%>' oe3[0], oe3[1]: <... | Add this to the top of the JSP to let it print characters using UTF-8 and let the browser interpret the response as UTF-8. <%@ page pageEncoding="UTF-8" %> The tag doesn't do that. Even more, it's ignored when the page is served over HTTP. See also: Unicode - How to get the characters right? | UTF8 and jsp, trying to understand what is going on I created the following jsp: <% byte[] oe1 = {-61,-123}; byte[] oe2 = {-123,-61}; byte[] oe3 = "œ".getBytes("UTF-8"); %> byte[] oe1 = {-61,-123}: '<%=new String(oe1, "UTF-8")%>' byte[] oe2 = {-123,-61}: '<%=new String(oe2, "UTF-8")%>' byte[] oe3 = "œ".getBytes("UTF-8"... | TITLE:
UTF8 and jsp, trying to understand what is going on
QUESTION:
I created the following jsp: <% byte[] oe1 = {-61,-123}; byte[] oe2 = {-123,-61}; byte[] oe3 = "œ".getBytes("UTF-8"); %> byte[] oe1 = {-61,-123}: '<%=new String(oe1, "UTF-8")%>' byte[] oe2 = {-123,-61}: '<%=new String(oe2, "UTF-8")%>' byte[] oe3 = "œ... | [
"java",
"utf-8",
"character-encoding"
] | 3 | 4 | 300 | 2 | 0 | 2011-06-06T14:18:40.400000 | 2011-06-06T14:22:05.967000 |
6,253,406 | 6,253,531 | Prevent page redirect when using hash tag | Is there any way to redirect a page to a specific hash but prevent the redirect if the page is reloaded with a hash already present? Preferably with javascript? For example: typing in www.mysite.com redirects to ---> www.mysite.com/index.html#news then the user clicks a link that navigates to a new location further dow... | You can inspect the window.location.hash property and set the location href based on its value. For example: Incidentally, it seems that you can use either window.location or document.location which appear to do the same thing. It is unclear which is the preferred target (window or document). | Prevent page redirect when using hash tag Is there any way to redirect a page to a specific hash but prevent the redirect if the page is reloaded with a hash already present? Preferably with javascript? For example: typing in www.mysite.com redirects to ---> www.mysite.com/index.html#news then the user clicks a link th... | TITLE:
Prevent page redirect when using hash tag
QUESTION:
Is there any way to redirect a page to a specific hash but prevent the redirect if the page is reloaded with a hash already present? Preferably with javascript? For example: typing in www.mysite.com redirects to ---> www.mysite.com/index.html#news then the use... | [
"javascript",
"redirect",
"hashcode"
] | 0 | 1 | 2,280 | 2 | 0 | 2011-06-06T14:19:18.730000 | 2011-06-06T14:28:55.380000 |
6,253,416 | 6,253,438 | C# 'is' operator Clarification | Does the is operator indicate whether or not an object is an instance of a certain class, or only if it can be casted to that class? Assume I have a DbCommand called command that has actually has been initialized as a SqlCommand. What is the result of command is OracleCommand? ( SqlCommand and OracleCommand both inheri... | It checks if the object is a member of that type, or a type that inherits from or implements the base type or interface. In a way, it does check if the object can be cast to said type. command is OracleCommand returns false as it's an SqlCommand, not an OracleCommand. However, both command is SqlCommand and command is ... | C# 'is' operator Clarification Does the is operator indicate whether or not an object is an instance of a certain class, or only if it can be casted to that class? Assume I have a DbCommand called command that has actually has been initialized as a SqlCommand. What is the result of command is OracleCommand? ( SqlComman... | TITLE:
C# 'is' operator Clarification
QUESTION:
Does the is operator indicate whether or not an object is an instance of a certain class, or only if it can be casted to that class? Assume I have a DbCommand called command that has actually has been initialized as a SqlCommand. What is the result of command is OracleCo... | [
"c#"
] | 9 | 18 | 343 | 6 | 0 | 2011-06-06T14:19:55.467000 | 2011-06-06T14:21:34.853000 |
6,253,418 | 6,253,461 | JavaScript loops | I have the following code that I want to slim down. $('#1').hover(function() { $('#hiddenMenu1').css('display', 'block'); }, function() { $('#hiddenMenu1').css('display', 'none'); }); $('#2').hover(function() { $('#hiddenMenu2').css('display', 'block'); }, function() { $('#hiddenMenu2').css('display', 'none'); }); $('#... | Your code is not working because you created closures in the for loop ( hover functions are executed later and when that happens they are accessing outer function i variable which is always equal 10 (the loop finished executing)). more explanation here: http://jibbering.com/faq/notes/closures/ What you can do is trap t... | JavaScript loops I have the following code that I want to slim down. $('#1').hover(function() { $('#hiddenMenu1').css('display', 'block'); }, function() { $('#hiddenMenu1').css('display', 'none'); }); $('#2').hover(function() { $('#hiddenMenu2').css('display', 'block'); }, function() { $('#hiddenMenu2').css('display', ... | TITLE:
JavaScript loops
QUESTION:
I have the following code that I want to slim down. $('#1').hover(function() { $('#hiddenMenu1').css('display', 'block'); }, function() { $('#hiddenMenu1').css('display', 'none'); }); $('#2').hover(function() { $('#hiddenMenu2').css('display', 'block'); }, function() { $('#hiddenMenu2... | [
"javascript",
"jquery",
"css"
] | 0 | 4 | 102 | 3 | 0 | 2011-06-06T14:20:04.027000 | 2011-06-06T14:23:00.343000 |
6,253,420 | 6,253,470 | How to debug .NET embedded js-files in WebStorm? | I'm wondered is it possible to debug.net embedded js files in WebStorm? Because, actually, breakpoints in the real file doesn't work. And.NET WebApplication sends it's own (zipped) content with no references to original file. How I can debug js in that case, using WebStorm debugger? UPDATE (for better understanding of ... | Use a browser debugger and debug client-side. Chrome and IE9 come with a good one one built-in, and Firefox has a decent one available as a plugin. Yes. I'm pretty experienced with Firebug... But when I met WebStorm IDE, I felt in love. So I want to use JetBrains' debugger, not built-in one. Also I have experience with... | How to debug .NET embedded js-files in WebStorm? I'm wondered is it possible to debug.net embedded js files in WebStorm? Because, actually, breakpoints in the real file doesn't work. And.NET WebApplication sends it's own (zipped) content with no references to original file. How I can debug js in that case, using WebSto... | TITLE:
How to debug .NET embedded js-files in WebStorm?
QUESTION:
I'm wondered is it possible to debug.net embedded js files in WebStorm? Because, actually, breakpoints in the real file doesn't work. And.NET WebApplication sends it's own (zipped) content with no references to original file. How I can debug js in that ... | [
"javascript",
".net",
"webstorm"
] | 2 | 1 | 653 | 2 | 0 | 2011-06-06T14:20:05.417000 | 2011-06-06T14:23:40.890000 |
6,253,425 | 6,253,517 | Is it possible to use the STL multimap value_type function with a multiple argument C++ constructor | Good morning, In Scott Meyers book Effective STL, Mr Meyers explains how the map::value_type function saves the cost of construction and deletion of a temporary object. We are trying use Mr. Meyers technique with a multimap where the class Range has two constructors: class Range { public: explicit Range(int item){........ | The third option would be available as emplace in a compiler supporting C++0x, like gcc 4.5 or 4.6. Currently std::pair can only be constructed with two parameters. Variadic templates will change that and offer new possibilities, as will rvalue references and perfect forwarding. | Is it possible to use the STL multimap value_type function with a multiple argument C++ constructor Good morning, In Scott Meyers book Effective STL, Mr Meyers explains how the map::value_type function saves the cost of construction and deletion of a temporary object. We are trying use Mr. Meyers technique with a multi... | TITLE:
Is it possible to use the STL multimap value_type function with a multiple argument C++ constructor
QUESTION:
Good morning, In Scott Meyers book Effective STL, Mr Meyers explains how the map::value_type function saves the cost of construction and deletion of a temporary object. We are trying use Mr. Meyers tech... | [
"c++",
"linux",
"stl"
] | 0 | 1 | 589 | 2 | 0 | 2011-06-06T14:20:34.963000 | 2011-06-06T14:28:09.770000 |
6,253,466 | 6,253,501 | display images side by side | I am trying to display 2 arrow links side by side but am getting some css errors. My html code is below: CSS:.down_arrow{ display:block; background: url(../images/down_arrow.png) no-repeat left center; }.up_arrow{ display:block; background: url(../images/up_arrow.png) no-repeat left center; } Currently, the images are ... | To make the images float you have to specify a width of the element and set the float property. The CSS must look like this.down_arrow{ display:block; background: url(../images/down_arrow.png) no-repeat left center; float:left; width:100px; }.up_arrow{ display:block; background: url(../images/up_arrow.png) no-repeat le... | display images side by side I am trying to display 2 arrow links side by side but am getting some css errors. My html code is below: CSS:.down_arrow{ display:block; background: url(../images/down_arrow.png) no-repeat left center; }.up_arrow{ display:block; background: url(../images/up_arrow.png) no-repeat left center; ... | TITLE:
display images side by side
QUESTION:
I am trying to display 2 arrow links side by side but am getting some css errors. My html code is below: CSS:.down_arrow{ display:block; background: url(../images/down_arrow.png) no-repeat left center; }.up_arrow{ display:block; background: url(../images/up_arrow.png) no-re... | [
"css"
] | 1 | 3 | 1,813 | 2 | 0 | 2011-06-06T14:23:19.103000 | 2011-06-06T14:26:26.473000 |
6,253,467 | 6,253,527 | Django - DoesNotExist Error - How can I say to allow this? | I have two models like this: class Collar(models.Model): num_tags = models.BigIntegerField()
class Dog(models.Model): num_legs = models.BigIntegerField() collar = models.OneToOneField(Collar,null=True,blank=True) Whenever I try to do something like: dog = Dog.objects.all()[0] if dog.collar: #do something... I get a Do... | Use a try..except block: try: if dog.collar: # Do something except Collar.DoesNotExist: # Do something else Also, never assume that all() will always return something. In ideal circumstances, sure, but life is never ideal. You need to catch the potential IndexError with a statement like that, and have a contingency pla... | Django - DoesNotExist Error - How can I say to allow this? I have two models like this: class Collar(models.Model): num_tags = models.BigIntegerField()
class Dog(models.Model): num_legs = models.BigIntegerField() collar = models.OneToOneField(Collar,null=True,blank=True) Whenever I try to do something like: dog = Dog.... | TITLE:
Django - DoesNotExist Error - How can I say to allow this?
QUESTION:
I have two models like this: class Collar(models.Model): num_tags = models.BigIntegerField()
class Dog(models.Model): num_legs = models.BigIntegerField() collar = models.OneToOneField(Collar,null=True,blank=True) Whenever I try to do somethin... | [
"django",
"django-models"
] | 0 | 2 | 1,092 | 3 | 0 | 2011-06-06T14:23:31.753000 | 2011-06-06T14:28:36.473000 |
6,253,476 | 6,254,056 | What is the best way to do a POST web service request in Grails? | I want to do a POST request to a web service in grails, but it seems like the available JAVA solutions are on a very low abstraction level, like building the POST request myself (here is the sample I found: http://www.exampledepot.com/egs/java.net/Post.html ) Is there a better solution for this problem in Grails? I sea... | There's the Groovy-specific HTTPBuilder, which provides a nice interface built on the Apache HTTPClient. It even has a REST client, if that's appropriate for the service your are trying to access. There's even a Grails plugin to wrap that all up for you. If the service is REST-enabled there are a range of Java projects... | What is the best way to do a POST web service request in Grails? I want to do a POST request to a web service in grails, but it seems like the available JAVA solutions are on a very low abstraction level, like building the POST request myself (here is the sample I found: http://www.exampledepot.com/egs/java.net/Post.ht... | TITLE:
What is the best way to do a POST web service request in Grails?
QUESTION:
I want to do a POST request to a web service in grails, but it seems like the available JAVA solutions are on a very low abstraction level, like building the POST request myself (here is the sample I found: http://www.exampledepot.com/eg... | [
"web-services",
"grails",
"post"
] | 5 | 8 | 2,121 | 2 | 0 | 2011-06-06T14:23:54.603000 | 2011-06-06T15:06:05.347000 |
6,253,486 | 6,253,653 | WCF DataMember EmitDefaultValue on value type? (but set my own default value) | I have the following: [DataContract] public class Foo { [DataMember(EmitDefaultValue = true) public bool Bar { get; set; } } 2 Questions: What really happens here because my bool can't really be null, so if I emit the default value then what? How do I make it so that if someone passes a message without the Bar part the... | EmitDefaultValue is true by default. You can try to use DefaultValue attribute from System.ComponentModel but I'm not sure if it works. I just tested DefaultValue attribute and it doesn't work. It means that you cannot change default value - default value of the data type will be always used. If you want to set your Ba... | WCF DataMember EmitDefaultValue on value type? (but set my own default value) I have the following: [DataContract] public class Foo { [DataMember(EmitDefaultValue = true) public bool Bar { get; set; } } 2 Questions: What really happens here because my bool can't really be null, so if I emit the default value then what?... | TITLE:
WCF DataMember EmitDefaultValue on value type? (but set my own default value)
QUESTION:
I have the following: [DataContract] public class Foo { [DataMember(EmitDefaultValue = true) public bool Bar { get; set; } } 2 Questions: What really happens here because my bool can't really be null, so if I emit the defaul... | [
"wcf",
"soap",
"boolean",
"default-value",
"datamember"
] | 2 | 7 | 5,262 | 1 | 0 | 2011-06-06T14:24:30.363000 | 2011-06-06T14:37:41.830000 |
6,253,488 | 6,253,537 | How to create button with image & text | Friends, I want to display a button in android like mentioned in screenshot. Could anyone guide me through how to achieve this? | There is the ImageButton which you can use for that. But I'm not sure how to make the Text on the button look like the Text in your screenshot. I would simply create the image with the text and then use it for the ImageButton. | How to create button with image & text Friends, I want to display a button in android like mentioned in screenshot. Could anyone guide me through how to achieve this? | TITLE:
How to create button with image & text
QUESTION:
Friends, I want to display a button in android like mentioned in screenshot. Could anyone guide me through how to achieve this?
ANSWER:
There is the ImageButton which you can use for that. But I'm not sure how to make the Text on the button look like the Text in... | [
"android",
"imageview"
] | 2 | 0 | 1,823 | 4 | 0 | 2011-06-06T14:24:41.487000 | 2011-06-06T14:29:19.297000 |
6,253,498 | 6,253,756 | Declaring Session Max Life Time in htaccess | I am wondering whether we can declare session.gc_maxlifetime setting in.htaccess for the one particular project instead of whole web server? If so, how can we do that? Like the following code? php_value session.gc_maxlifetime 2000 I've tried it and it didn't work and also I created a php.ini file in the same directory ... | Yes, session.gc_maxlifetime is a PHP_INI_ALL setting so it can be overidden in.htaccess: php_value session.gc_maxlifetime 2000 Also make sure that entry in your Apache configuration supports override: AllowOverride Options It also may be possible that you misunderstood the purpose of this option. This option will not s... | Declaring Session Max Life Time in htaccess I am wondering whether we can declare session.gc_maxlifetime setting in.htaccess for the one particular project instead of whole web server? If so, how can we do that? Like the following code? php_value session.gc_maxlifetime 2000 I've tried it and it didn't work and also I c... | TITLE:
Declaring Session Max Life Time in htaccess
QUESTION:
I am wondering whether we can declare session.gc_maxlifetime setting in.htaccess for the one particular project instead of whole web server? If so, how can we do that? Like the following code? php_value session.gc_maxlifetime 2000 I've tried it and it didn't... | [
"php",
"session"
] | 7 | 20 | 30,249 | 2 | 0 | 2011-06-06T14:26:20.200000 | 2011-06-06T14:44:31.537000 |
6,253,505 | 6,253,607 | XAML XMLNS:Local C# | I am working through an MVVM tutorial, and I have the following code, written in Xaml: The xmlns:local line is complaining saying that WPFMVVM assembly is not referenced. Although it is the assembly that I am working in. Anybody know why? Thanks | You must not have spaces in there & if it's the assembly you work in just do not specify assembly. xmlns:local="clr-namespace:WPFMVVM" The assembly parameter is for referenced assemblies. Also see the MSDN article on XAML namespaces. assembly can be omitted if the clr-namespace referenced is being defined within the sa... | XAML XMLNS:Local C# I am working through an MVVM tutorial, and I have the following code, written in Xaml: The xmlns:local line is complaining saying that WPFMVVM assembly is not referenced. Although it is the assembly that I am working in. Anybody know why? Thanks | TITLE:
XAML XMLNS:Local C#
QUESTION:
I am working through an MVVM tutorial, and I have the following code, written in Xaml: The xmlns:local line is complaining saying that WPFMVVM assembly is not referenced. Although it is the assembly that I am working in. Anybody know why? Thanks
ANSWER:
You must not have spaces in... | [
"c#",
"wpf",
"xaml",
"xml-namespaces"
] | 6 | 13 | 33,498 | 4 | 0 | 2011-06-06T14:26:54.140000 | 2011-06-06T14:34:05.183000 |
6,253,506 | 6,264,183 | Unknown Build Error 'key cannot be null' | I have a data template for my listbox and I must use project resources for all the labels. If I remove the reference to the resource and just type in the text for the labels there are no errors. If I try to use the resources I get the above error. Here is the data template: One thing to note we are using the resources ... | We are working on this project in a team and I just copied the line for using resources... I just forgot to copy the xmlns attribute as well. What I find strange is that the error isn't really descriptive and doesn't give any real hints as to what the problem is. Moral of the story: if copying lines of code make sure t... | Unknown Build Error 'key cannot be null' I have a data template for my listbox and I must use project resources for all the labels. If I remove the reference to the resource and just type in the text for the labels there are no errors. If I try to use the resources I get the above error. Here is the data template: One ... | TITLE:
Unknown Build Error 'key cannot be null'
QUESTION:
I have a data template for my listbox and I must use project resources for all the labels. If I remove the reference to the resource and just type in the text for the labels there are no errors. If I try to use the resources I get the above error. Here is the d... | [
"xaml"
] | 31 | 65 | 14,800 | 2 | 0 | 2011-06-06T14:27:02.703000 | 2011-06-07T10:57:45.127000 |
6,253,513 | 6,253,603 | Database in android? | I want to know how it is better to work with databases in android: with _id integer primary key autoincrement or without autoincrement? In my app I have 2 tables, one with lists,and one with products. If I delete a list and I don't use autoincrement the new list I will do will have the products of the lists I deleted. ... | SQLIte db table always has autoincrement field rowid. You can refer docs: ROWID | Database in android? I want to know how it is better to work with databases in android: with _id integer primary key autoincrement or without autoincrement? In my app I have 2 tables, one with lists,and one with products. If I delete a list and I don't use autoincrement the new list I will do will have the products of ... | TITLE:
Database in android?
QUESTION:
I want to know how it is better to work with databases in android: with _id integer primary key autoincrement or without autoincrement? In my app I have 2 tables, one with lists,and one with products. If I delete a list and I don't use autoincrement the new list I will do will hav... | [
"android",
"database",
"auto-increment"
] | 0 | 1 | 146 | 2 | 0 | 2011-06-06T14:27:45.027000 | 2011-06-06T14:33:58.523000 |
6,253,522 | 6,254,439 | uiscrollview not scrolling uiimageview | I'm trying to insert one more image in my UIScrollView. The problem is: all my old content is still scrollable, but this image stay static in the top of the page. Does anybody know a solution? Code: - (void)viewDidLoad {
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f); myImage = [[UIImageView alloc] initWi... | I'm guessing that your "old content" is encapsulated in a view and it's that view that is your UIScrollView's subview for content. If that's the case, you should add your new image to that "contentView", adjust its frame and update the scrollview's contentSize based on the new width and height of the content view. If m... | uiscrollview not scrolling uiimageview I'm trying to insert one more image in my UIScrollView. The problem is: all my old content is still scrollable, but this image stay static in the top of the page. Does anybody know a solution? Code: - (void)viewDidLoad {
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 109.0f)... | TITLE:
uiscrollview not scrolling uiimageview
QUESTION:
I'm trying to insert one more image in my UIScrollView. The problem is: all my old content is still scrollable, but this image stay static in the top of the page. Does anybody know a solution? Code: - (void)viewDidLoad {
CGRect myImageRect = CGRectMake(0.0f, 0.0... | [
"iphone",
"uiscrollview"
] | 1 | 0 | 1,317 | 1 | 0 | 2011-06-06T14:28:20.637000 | 2011-06-06T15:36:05.393000 |
6,253,525 | 6,253,787 | UITable cell's different view | i'm a beginner programmer and i'm currently working on a basic navigation app. I have a UITable with 3 items (for now) in my Firste level every item (cell) open another 2 items list (2 cells) in my Second level. What i want is that every 1 of this 2 items point to different view. Example: first will open some xib and t... | The UITableViewDelegate has a method tableView:didSelectRowAtIndexPath: In that you could set up a switch like so: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { switch (indexPath.row) { case 0: { //do something } break; case 1: { //do something else } break; default: brea... | UITable cell's different view i'm a beginner programmer and i'm currently working on a basic navigation app. I have a UITable with 3 items (for now) in my Firste level every item (cell) open another 2 items list (2 cells) in my Second level. What i want is that every 1 of this 2 items point to different view. Example: ... | TITLE:
UITable cell's different view
QUESTION:
i'm a beginner programmer and i'm currently working on a basic navigation app. I have a UITable with 3 items (for now) in my Firste level every item (cell) open another 2 items list (2 cells) in my Second level. What i want is that every 1 of this 2 items point to differe... | [
"ios",
"uiview",
"uitableview"
] | 0 | 0 | 180 | 2 | 0 | 2011-06-06T14:28:32.250000 | 2011-06-06T14:46:46.290000 |
6,253,532 | 6,254,006 | Objective C getting pickerview values | another Objective-C one for you, probably pretty obvious but I have been at this for a few days now, and can't get it to work after trawling through similar problems on here and elsewhere! Pretty much I have a 5 segment picker which, when a button is clicked, an alert sheet is shown which once accepted grabs the values... | An alternative answer: thePickerView is nil. I don't see you assigning a value to it, right? | Objective C getting pickerview values another Objective-C one for you, probably pretty obvious but I have been at this for a few days now, and can't get it to work after trawling through similar problems on here and elsewhere! Pretty much I have a 5 segment picker which, when a button is clicked, an alert sheet is show... | TITLE:
Objective C getting pickerview values
QUESTION:
another Objective-C one for you, probably pretty obvious but I have been at this for a few days now, and can't get it to work after trawling through similar problems on here and elsewhere! Pretty much I have a 5 segment picker which, when a button is clicked, an a... | [
"iphone",
"objective-c",
"xcode",
"uipickerview"
] | 0 | 1 | 5,783 | 4 | 0 | 2011-06-06T14:28:55.503000 | 2011-06-06T15:01:13.730000 |
6,253,541 | 6,253,856 | Pass arguments to Zope browser page | In my Zope instance, I have a Python script registered as a browser page. I have the following code as its registry: This function, "PyTest.CallPy" is defined as: def CallPy(self, data):... I then use JavaScript to call the function, passing data in: $.ajax({ url: "@@test", data: ({data: "mydata"}), dataType: "text", s... | You're missing rather a lot of detail on your method. Is it a method of a class? Or standalone? Normally, self would refer to an instance of the class PyTest - which would be a subclass of BrowserView. Then, the data you pass to the view ( @@test ) is retrieved from the Request object, which is available in self.reques... | Pass arguments to Zope browser page In my Zope instance, I have a Python script registered as a browser page. I have the following code as its registry: This function, "PyTest.CallPy" is defined as: def CallPy(self, data):... I then use JavaScript to call the function, passing data in: $.ajax({ url: "@@test", data: ({d... | TITLE:
Pass arguments to Zope browser page
QUESTION:
In my Zope instance, I have a Python script registered as a browser page. I have the following code as its registry: This function, "PyTest.CallPy" is defined as: def CallPy(self, data):... I then use JavaScript to call the function, passing data in: $.ajax({ url: "... | [
"python",
"parameter-passing",
"zope"
] | 1 | 3 | 376 | 1 | 0 | 2011-06-06T14:29:38.307000 | 2011-06-06T14:51:54.277000 |
6,253,542 | 6,254,877 | "Request is not available in this context" on Masterpage Page's design mode | I'm using VS.net 2010 ASP.net C# 4.0 and I've got many pages who use the same Masterpage. But for some reasons I didn't find for now, some pages never display in design mode of Visual Studio. Instead of seeing my designed page, I only see a Gray Square where we can read Error creating control - ContentPlaceHolder1 Requ... | Not sure but this post looks like the same issue you are facing. Take a look. Hope this helps. Check This | "Request is not available in this context" on Masterpage Page's design mode I'm using VS.net 2010 ASP.net C# 4.0 and I've got many pages who use the same Masterpage. But for some reasons I didn't find for now, some pages never display in design mode of Visual Studio. Instead of seeing my designed page, I only see a Gra... | TITLE:
"Request is not available in this context" on Masterpage Page's design mode
QUESTION:
I'm using VS.net 2010 ASP.net C# 4.0 and I've got many pages who use the same Masterpage. But for some reasons I didn't find for now, some pages never display in design mode of Visual Studio. Instead of seeing my designed page... | [
"visual-studio-2010"
] | 1 | 2 | 1,841 | 1 | 0 | 2011-06-06T14:29:40.083000 | 2011-06-06T16:09:52.320000 |
6,253,543 | 6,253,779 | Where to validate data in a web app (using Spring) | This is a follow-on to my question Spring Web MVC - validate individual request params. I've figured out how to invoke the Spring Validator on domain objects that have been created from my inputs and how to have that validator honor the JSR-303 annotations on my classes themselves. The part I can't figure out is where ... | When you encapsule the validation logic inside of a ValidationService you can use it inside your controllers and services. As you want the user to interact with the input and to correct invalid information you should be able to display validation problems in your web view. Sometimes you might have data (CommandObjects,... | Where to validate data in a web app (using Spring) This is a follow-on to my question Spring Web MVC - validate individual request params. I've figured out how to invoke the Spring Validator on domain objects that have been created from my inputs and how to have that validator honor the JSR-303 annotations on my classe... | TITLE:
Where to validate data in a web app (using Spring)
QUESTION:
This is a follow-on to my question Spring Web MVC - validate individual request params. I've figured out how to invoke the Spring Validator on domain objects that have been created from my inputs and how to have that validator honor the JSR-303 annota... | [
"java",
"spring",
"validation",
"spring-mvc"
] | 3 | 1 | 1,270 | 4 | 0 | 2011-06-06T14:29:40.823000 | 2011-06-06T14:46:19.537000 |
6,253,547 | 6,253,631 | Need a map from enum (class) to std::binary_function | I have this enum (class) enum class conditional_operator { plus_op, or_op, not_op } And I'd like a std::map that represents these mappings: std::map > conditional_map = { { conditional_operator::plus_op, std::logical_and }, { conditional_operator::or_op, std::logical_or }, { conditional_operator::not_op, std::binary_ne... | You really want std::function, not std::binary_function. That only exists for typedefs and stuff in C++03. Secondly, I'd just use a lambda- they're short enough and much clearer. The std::logical_and and stuff only exists for C++03 function object creation, and I'd use a lambda over them any day. std::map > conditional... | Need a map from enum (class) to std::binary_function I have this enum (class) enum class conditional_operator { plus_op, or_op, not_op } And I'd like a std::map that represents these mappings: std::map > conditional_map = { { conditional_operator::plus_op, std::logical_and }, { conditional_operator::or_op, std::logical... | TITLE:
Need a map from enum (class) to std::binary_function
QUESTION:
I have this enum (class) enum class conditional_operator { plus_op, or_op, not_op } And I'd like a std::map that represents these mappings: std::map > conditional_map = { { conditional_operator::plus_op, std::logical_and }, { conditional_operator::o... | [
"c++",
"dictionary",
"c++11",
"functional-programming"
] | 4 | 4 | 319 | 2 | 0 | 2011-06-06T14:29:53.913000 | 2011-06-06T14:36:13.747000 |
6,253,551 | 6,253,595 | C# reference member variable | In C#, is there a way to keep a reference as a member variable in an object (like an object pointer in C++), not just as a parameter? EDIT: How can I make a pointer or reference to an object as a member variable? | If you mean ref the argument passing convention, then no, you cannot store this. From the first note on MSDN: Do not confuse the concept of passing by reference with the concept of reference types. The two concepts are not the same... Edit: based on your updated question, C# has different nomenclature about pointers an... | C# reference member variable In C#, is there a way to keep a reference as a member variable in an object (like an object pointer in C++), not just as a parameter? EDIT: How can I make a pointer or reference to an object as a member variable? | TITLE:
C# reference member variable
QUESTION:
In C#, is there a way to keep a reference as a member variable in an object (like an object pointer in C++), not just as a parameter? EDIT: How can I make a pointer or reference to an object as a member variable?
ANSWER:
If you mean ref the argument passing convention, th... | [
"c#",
"pointers",
"reference"
] | 10 | 4 | 36,079 | 5 | 0 | 2011-06-06T14:30:24 | 2011-06-06T14:33:19.970000 |
6,253,555 | 6,253,604 | How to debug a class redefinition in PHP? | I'm getting a PHP Fatal error: Cannot redeclare class Foo in /directory/ on line 20 error, but I have no idea where it's coming from. I'm always using require_once for this class file, and I'm not sure how to debug it. Can I get some kind of inclusion stack trace somehow? I'm running PHP 5, so case sensitivity such as ... | Use debug_backtrace in file where is class declared, but before it's declaration | How to debug a class redefinition in PHP? I'm getting a PHP Fatal error: Cannot redeclare class Foo in /directory/ on line 20 error, but I have no idea where it's coming from. I'm always using require_once for this class file, and I'm not sure how to debug it. Can I get some kind of inclusion stack trace somehow? I'm r... | TITLE:
How to debug a class redefinition in PHP?
QUESTION:
I'm getting a PHP Fatal error: Cannot redeclare class Foo in /directory/ on line 20 error, but I have no idea where it's coming from. I'm always using require_once for this class file, and I'm not sure how to debug it. Can I get some kind of inclusion stack tr... | [
"php",
"debugging",
"stack-trace",
"require-once"
] | 1 | 3 | 2,074 | 2 | 0 | 2011-06-06T14:30:37.390000 | 2011-06-06T14:34:00.610000 |
6,253,561 | 6,260,094 | Arithmetic overflow error converting expression to data type datetime | I am using SQL query to pull some student records from SQL database. I am getting the error Arithmetic overflow error converting expression to data type datetime. It looks like there is a column for student number which is char(15) type and throwing this error every time I put a letter in front of the student number (w... | SQL is converting the student number to an integer in the background, so your first examples works, but your second one won't. Check what data-type student number is, it should be numeric type, INT, BIGINT etc.. Also, you should be querying without the quotes for the student number, saves SQL converting Select * from S... | Arithmetic overflow error converting expression to data type datetime I am using SQL query to pull some student records from SQL database. I am getting the error Arithmetic overflow error converting expression to data type datetime. It looks like there is a column for student number which is char(15) type and throwing ... | TITLE:
Arithmetic overflow error converting expression to data type datetime
QUESTION:
I am using SQL query to pull some student records from SQL database. I am getting the error Arithmetic overflow error converting expression to data type datetime. It looks like there is a column for student number which is char(15) ... | [
"sql",
"sql-server",
"t-sql"
] | 1 | 0 | 1,608 | 1 | 0 | 2011-06-06T14:30:50.777000 | 2011-06-07T02:31:32.717000 |
6,253,565 | 6,253,672 | Loop through all the attributes of a node using XDocument | I have the following xml that stores table definations. How can I loop through each column of the passed tablename (only one occurrence of each table) and their attributes using XDocument (C# 3.5) Ex: If user passes CurrencySummary, I want to read each column and all it's attributes like HeaderDescription, HeaderName e... | It depends a little on how many s there are and if their place matters. var summ = doc.Descendants("CurrencySummary").First();
foreach (var col in summ.Elements())... | Loop through all the attributes of a node using XDocument I have the following xml that stores table definations. How can I loop through each column of the passed tablename (only one occurrence of each table) and their attributes using XDocument (C# 3.5) Ex: If user passes CurrencySummary, I want to read each column an... | TITLE:
Loop through all the attributes of a node using XDocument
QUESTION:
I have the following xml that stores table definations. How can I loop through each column of the passed tablename (only one occurrence of each table) and their attributes using XDocument (C# 3.5) Ex: If user passes CurrencySummary, I want to r... | [
"c#",
"xml",
"linq",
".net-3.5",
"linq-to-xml"
] | 2 | 5 | 12,677 | 2 | 0 | 2011-06-06T14:31:18.177000 | 2011-06-06T14:38:48.913000 |
6,253,567 | 6,253,616 | Javascript - If Last Character of a URL string is "+" then remove it...How? | This is a continuation from an existing question. Javascript - Goto URL based on Drop Down Selections (continued!) I am using dropdown selects to allow my users to build a URL and then hit "Go" to goto it. Is there any way to add an additional function that checks the URL before going to it? My URLs sometimes include t... | function removeLastPlus (myUrl) { if (myUrl.substring(myUrl.length-1) == "+") { myUrl = myUrl.substring(0, myUrl.length-1); }
return myUrl; }
$(window).load(function(){ $('form').submit(function(e){ var newUrl = $('#dd0').val() + $('#dd1').val()+ $('#dd2').val()+ $('#dd3').val(); newUrl = removeLastPlus(newUrl); wind... | Javascript - If Last Character of a URL string is "+" then remove it...How? This is a continuation from an existing question. Javascript - Goto URL based on Drop Down Selections (continued!) I am using dropdown selects to allow my users to build a URL and then hit "Go" to goto it. Is there any way to add an additional ... | TITLE:
Javascript - If Last Character of a URL string is "+" then remove it...How?
QUESTION:
This is a continuation from an existing question. Javascript - Goto URL based on Drop Down Selections (continued!) I am using dropdown selects to allow my users to build a URL and then hit "Go" to goto it. Is there any way to ... | [
"javascript",
"string"
] | 25 | 36 | 40,388 | 6 | 0 | 2011-06-06T14:31:23.723000 | 2011-06-06T14:34:51.447000 |
6,253,574 | 6,253,600 | Uncaught exception in a callback from a 3rd party static library | I am compiling my program with a 3rd party library. That library contains an error callback if an error occurs internally. Inside that error callback I am throwing an exception and I have a unit test to verify that when I do something invalid that the exception is thrown. This all works beautifully in Windows, but when... | When you interface with third-party libraries you usually have to catch all exception on the border between your code and their code: int yourCallback( params ) { try { doStuff( params ); return Okay; } catch (...) { return Error; } } The reason is you can't be sure that library is written in C++ or it uses the very sa... | Uncaught exception in a callback from a 3rd party static library I am compiling my program with a 3rd party library. That library contains an error callback if an error occurs internally. Inside that error callback I am throwing an exception and I have a unit test to verify that when I do something invalid that the exc... | TITLE:
Uncaught exception in a callback from a 3rd party static library
QUESTION:
I am compiling my program with a 3rd party library. That library contains an error callback if an error occurs internally. Inside that error callback I am throwing an exception and I have a unit test to verify that when I do something in... | [
"c++",
"exception",
"static-libraries",
"abort"
] | 0 | 2 | 1,044 | 2 | 0 | 2011-06-06T14:31:44.343000 | 2011-06-06T14:33:48.383000 |
6,253,577 | 6,253,739 | Using PL/SQL to invoke a java method that uses JDBC to connect to a SQL server database | I would like to be able to connect an Oracle database with a SQL server database. I am aware of DG4ODBC and HSODBC but i cant use those drivers for several reasons. I understand that it is possible to call java code from within PL/SQL as described here http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/chthre... | So long as you can load the SQL Server JDBC driver into the Oracle database using the loadjava utility, yes, that should be possible. That will depend on the version of Oracle (different versions of the database have different versions of the internal JVM) and the JVM version that your SQL Server JDBC driver requires, ... | Using PL/SQL to invoke a java method that uses JDBC to connect to a SQL server database I would like to be able to connect an Oracle database with a SQL server database. I am aware of DG4ODBC and HSODBC but i cant use those drivers for several reasons. I understand that it is possible to call java code from within PL/S... | TITLE:
Using PL/SQL to invoke a java method that uses JDBC to connect to a SQL server database
QUESTION:
I would like to be able to connect an Oracle database with a SQL server database. I am aware of DG4ODBC and HSODBC but i cant use those drivers for several reasons. I understand that it is possible to call java cod... | [
"java",
"sql-server",
"database",
"oracle",
"heterogeneous-services"
] | 2 | 3 | 3,016 | 2 | 0 | 2011-06-06T14:31:54.980000 | 2011-06-06T14:43:12.433000 |
6,253,581 | 6,254,316 | php edit for Cufon font replacement | I am trying to change the color of the menu items on my website but i don't know where in this to add the color code #c3c3c3 that i want to use ***NOTE this is a wordpress theme with font replacement by cufon and it replaces whatever is in the css so changing the css does nothing when i do it | Your code indicates that the theme probably fetches the colors from database, which means theme author probably made it easy for you to edit these colors via WordPress dashboard, so choice 1 is look around the admin part for these options. On the other hand, you can do it in a quick'n dirty (but perfectly valid) way, s... | php edit for Cufon font replacement I am trying to change the color of the menu items on my website but i don't know where in this to add the color code #c3c3c3 that i want to use ***NOTE this is a wordpress theme with font replacement by cufon and it replaces whatever is in the css so changing the css does nothing whe... | TITLE:
php edit for Cufon font replacement
QUESTION:
I am trying to change the color of the menu items on my website but i don't know where in this to add the color code #c3c3c3 that i want to use ***NOTE this is a wordpress theme with font replacement by cufon and it replaces whatever is in the css so changing the cs... | [
"php",
"wordpress",
"html",
"cufon"
] | 0 | 1 | 766 | 2 | 0 | 2011-06-06T14:32:17.760000 | 2011-06-06T15:27:31.060000 |
6,253,586 | 6,253,606 | Python Vertical Array Slicing | Can anyone show me how to slice the structure below: [[1, A], [2, B], [3,C]] Into two separate lists: [1, 2, 3] [A, B, C] I can obviously do this using code, but wondered if Python was able to do it natively? | my_list = [[1, A], [2, B], [3, C]] a, b = zip(*my_list) Note that a and b will end up being tuples. | Python Vertical Array Slicing Can anyone show me how to slice the structure below: [[1, A], [2, B], [3,C]] Into two separate lists: [1, 2, 3] [A, B, C] I can obviously do this using code, but wondered if Python was able to do it natively? | TITLE:
Python Vertical Array Slicing
QUESTION:
Can anyone show me how to slice the structure below: [[1, A], [2, B], [3,C]] Into two separate lists: [1, 2, 3] [A, B, C] I can obviously do this using code, but wondered if Python was able to do it natively?
ANSWER:
my_list = [[1, A], [2, B], [3, C]] a, b = zip(*my_list... | [
"python"
] | 4 | 13 | 1,770 | 1 | 0 | 2011-06-06T14:32:49.413000 | 2011-06-06T14:34:04.970000 |
6,253,589 | 6,253,635 | c++: call overloaded function for derived classes as arguments too (without explicit cast) | Imagine the following scenario: template void myFunction(T *) { //do nothing }
void myFunction(myBase * _base) { //do something with _base }
int main( int argc, const char* argv[] ) { myDerivedFromBase * ptr = new myDerivedFromBase; myFunction(ptr); //calls the templated version
myFunction(static_cast (ptr)); //call... | Use type traits to prevent the template from binding: template typename std::enable_if::value, void>::type myFunction(T*) { } If you can't use C++0x, use Boost's type traits library instead. | c++: call overloaded function for derived classes as arguments too (without explicit cast) Imagine the following scenario: template void myFunction(T *) { //do nothing }
void myFunction(myBase * _base) { //do something with _base }
int main( int argc, const char* argv[] ) { myDerivedFromBase * ptr = new myDerivedFrom... | TITLE:
c++: call overloaded function for derived classes as arguments too (without explicit cast)
QUESTION:
Imagine the following scenario: template void myFunction(T *) { //do nothing }
void myFunction(myBase * _base) { //do something with _base }
int main( int argc, const char* argv[] ) { myDerivedFromBase * ptr =... | [
"c++",
"casting",
"overloading"
] | 2 | 6 | 668 | 2 | 0 | 2011-06-06T14:32:51.993000 | 2011-06-06T14:36:28.457000 |
6,253,601 | 6,253,669 | how to multidimesional array as follows in javascript | I want to make array like this var ImageArray = [ {image:"/image1.jpg"}, {image:"/image1.jpg"}, {image:"/image1.jpg"} ] I want to make above structure of array from div containing images using each function of jquery. so that I can retrieve it like ImageArray[index].image | var ImageArray = [];
$('div img').each(function(){ ImageArray.push({image:this.src}); }); this div part of the selector should be altered to match the div you want to use as the container.. | how to multidimesional array as follows in javascript I want to make array like this var ImageArray = [ {image:"/image1.jpg"}, {image:"/image1.jpg"}, {image:"/image1.jpg"} ] I want to make above structure of array from div containing images using each function of jquery. so that I can retrieve it like ImageArray[index]... | TITLE:
how to multidimesional array as follows in javascript
QUESTION:
I want to make array like this var ImageArray = [ {image:"/image1.jpg"}, {image:"/image1.jpg"}, {image:"/image1.jpg"} ] I want to make above structure of array from div containing images using each function of jquery. so that I can retrieve it like... | [
"javascript",
"jquery",
"multidimensional-array"
] | 0 | 6 | 183 | 3 | 0 | 2011-06-06T14:33:55.650000 | 2011-06-06T14:38:37.440000 |
6,253,605 | 6,253,706 | Can't find uploaded files in temp directory after script execution ends | I am trying out a tutorial on W3 schools to learn how to create forms for PHP uploads. To this end, I have the following two files as shown on W3 schools: The HTML file: Filename: and the corresponding PHP file as follows: 0) { echo "Error: ". $_FILES["file"]["error"]. " "; } else { echo "Upload: ". $_FILES["file"]["na... | The /tmp/ folder is a folder to temporarily store the file for processing or reading. If you want to access the file later on, you need to save the file to the server with the move_uploaded_file function | Can't find uploaded files in temp directory after script execution ends I am trying out a tutorial on W3 schools to learn how to create forms for PHP uploads. To this end, I have the following two files as shown on W3 schools: The HTML file: Filename: and the corresponding PHP file as follows: 0) { echo "Error: ". $_FI... | TITLE:
Can't find uploaded files in temp directory after script execution ends
QUESTION:
I am trying out a tutorial on W3 schools to learn how to create forms for PHP uploads. To this end, I have the following two files as shown on W3 schools: The HTML file: Filename: and the corresponding PHP file as follows: 0) { ec... | [
"php",
"html",
"phpmyadmin"
] | 3 | 9 | 6,903 | 3 | 0 | 2011-06-06T14:34:03.327000 | 2011-06-06T14:41:26.370000 |
6,253,611 | 6,253,661 | How to get the ID of a just created record in Django? | I'm using Django 1.3 for one of my projects and I need to get the ID of a record just saved in the database. I have something like the code below to save a record in the database: n = MyData.objects.create(record_title=title, record_content=content) n.save() The ID of the record just saved auto-increments. Is there a w... | Use n.id after the save. See " Auto-incrementing primary keys ". | How to get the ID of a just created record in Django? I'm using Django 1.3 for one of my projects and I need to get the ID of a record just saved in the database. I have something like the code below to save a record in the database: n = MyData.objects.create(record_title=title, record_content=content) n.save() The ID ... | TITLE:
How to get the ID of a just created record in Django?
QUESTION:
I'm using Django 1.3 for one of my projects and I need to get the ID of a record just saved in the database. I have something like the code below to save a record in the database: n = MyData.objects.create(record_title=title, record_content=content... | [
"django",
"django-models"
] | 111 | 148 | 112,944 | 6 | 0 | 2011-06-06T14:34:31.097000 | 2011-06-06T14:38:06.967000 |
6,253,617 | 6,253,880 | How can I store data to a data dictionary in Python when headings are in mixed up order | I'd like to store the following data in a data dictionary so that I can easily export it to a CSV file. The problem is that the columns for each school id are not always in the same order: text = """ school id= 28392 name|year|degree|age|race Susan A. Smith|2007|PhD|27|white Fred Collins|2006|PhD|26|hispanic Amber Real... | This actually seems pretty easy. Process the file into a data structure, then export it into a csv. school = None headers = None data = {} for line in text.splitlines(): if line.startswith("school id"): school = line.split('=')[1].strip() headers = None continue if school is not None and headers is None: headers = line... | How can I store data to a data dictionary in Python when headings are in mixed up order I'd like to store the following data in a data dictionary so that I can easily export it to a CSV file. The problem is that the columns for each school id are not always in the same order: text = """ school id= 28392 name|year|degre... | TITLE:
How can I store data to a data dictionary in Python when headings are in mixed up order
QUESTION:
I'd like to store the following data in a data dictionary so that I can easily export it to a CSV file. The problem is that the columns for each school id are not always in the same order: text = """ school id= 283... | [
"python",
"csv",
"dictionary",
"export-to-csv"
] | 4 | 6 | 4,368 | 1 | 0 | 2011-06-06T14:35:00.263000 | 2011-06-06T14:53:24.240000 |
6,253,619 | 6,253,759 | max and group by question with LINQ | I want to group the below query by GetSetDomainName and select the row which has the maximum GetSetKalanGun.In other words, I am trying to get the row with the maximum KALANGUN among those which have the same DOMAINNAME. var kayitlar3 = ( from rows in islemDetayKayitListesi select new { KAYITNO = rows.GetSetKayitNo, HE... | You could use: var kayitlar3 = islemDetayKayitListesi. Select(rows => new { KAYITNO = rows.GetSetKayitNo, HESAPADI = rows.GetSetHesapAdi, URUNNO = rows.GetSetUrunNo, URUNADI = rows.GetSetUrunAdi, URUNMIKTAR = rows.GetSetUrunMiktar,
ISLEMTARIHI = rows.GetSetIslemTarihi, HIZMETDURUMU = rows.GetSetHizmetDurumu, TOPLAMTUT... | max and group by question with LINQ I want to group the below query by GetSetDomainName and select the row which has the maximum GetSetKalanGun.In other words, I am trying to get the row with the maximum KALANGUN among those which have the same DOMAINNAME. var kayitlar3 = ( from rows in islemDetayKayitListesi select ne... | TITLE:
max and group by question with LINQ
QUESTION:
I want to group the below query by GetSetDomainName and select the row which has the maximum GetSetKalanGun.In other words, I am trying to get the row with the maximum KALANGUN among those which have the same DOMAINNAME. var kayitlar3 = ( from rows in islemDetayKayi... | [
"c#",
"linq",
"group-by",
"max"
] | 2 | 4 | 3,477 | 4 | 0 | 2011-06-06T14:35:05.767000 | 2011-06-06T14:44:34.933000 |
6,253,620 | 6,254,004 | What is the depth image received from Kinect | When I ran this Matlab code to get the depth image, the result I got is a matrix of 480x640. The min element value is 0 and the max element value is 2711. What does 2711 mean? Is that the distance from the camera to the farthest part of the image. But what is the unit of 2711. Is that meter of feet or?? | I don't know what the Matlab code exactly does to the depth, but it probably does some processing on it because the depth sent by the Kinect is on 11 bits, so it shouldn't be higher than 2048. Try to find out what it does, or to get access to the raw data sent by the Kinect. The data sent by the Kinect is not a proper ... | What is the depth image received from Kinect When I ran this Matlab code to get the depth image, the result I got is a matrix of 480x640. The min element value is 0 and the max element value is 2711. What does 2711 mean? Is that the distance from the camera to the farthest part of the image. But what is the unit of 271... | TITLE:
What is the depth image received from Kinect
QUESTION:
When I ran this Matlab code to get the depth image, the result I got is a matrix of 480x640. The min element value is 0 and the max element value is 2711. What does 2711 mean? Is that the distance from the camera to the farthest part of the image. But what ... | [
"matlab",
"kinect",
"color-depth"
] | 2 | 5 | 9,066 | 2 | 0 | 2011-06-06T14:35:09.143000 | 2011-06-06T15:01:09.393000 |
6,253,626 | 6,254,266 | Pre-check a box in a Create View in MVC 3 with C# | I'm working on a site using MVC 3 and C#. I have a simple boolean field that is set with a checkbox. I can create and edit just fine and the values of the boolean field update alright. My only question is: Can I make it so the CheckBox is automatically checked when the user reaches the page? It's a more common situatio... | What is the value of model.Tbd? If it's not already True, try init it to True and seeing if that makes a difference | Pre-check a box in a Create View in MVC 3 with C# I'm working on a site using MVC 3 and C#. I have a simple boolean field that is set with a checkbox. I can create and edit just fine and the values of the boolean field update alright. My only question is: Can I make it so the CheckBox is automatically checked when the ... | TITLE:
Pre-check a box in a Create View in MVC 3 with C#
QUESTION:
I'm working on a site using MVC 3 and C#. I have a simple boolean field that is set with a checkbox. I can create and edit just fine and the values of the boolean field update alright. My only question is: Can I make it so the CheckBox is automatically... | [
"c#",
"asp.net-mvc-3",
"checkboxfor"
] | 0 | 1 | 1,153 | 1 | 0 | 2011-06-06T14:35:39.057000 | 2011-06-06T15:23:27.643000 |
6,253,633 | 6,253,698 | Cookies vs. sessions in PHP | I started using PHP a couple of months ago. For the sake of creating a login system for my website, I read about cookies and sessions and their differences (cookies are stored in the user's browser and sessions on the server). At that time, I preferred cookies (and who does not like cookies?!) and just said: "who cares... | The concept is storing persistent data across page loads for a web visitor. Cookies store it directly on the client. Sessions use a cookie as a key of sorts, to associate with the data that is stored on the server side. It is preferred to use sessions because the actual values are hidden from the client, and you contro... | Cookies vs. sessions in PHP I started using PHP a couple of months ago. For the sake of creating a login system for my website, I read about cookies and sessions and their differences (cookies are stored in the user's browser and sessions on the server). At that time, I preferred cookies (and who does not like cookies?... | TITLE:
Cookies vs. sessions in PHP
QUESTION:
I started using PHP a couple of months ago. For the sake of creating a login system for my website, I read about cookies and sessions and their differences (cookies are stored in the user's browser and sessions on the server). At that time, I preferred cookies (and who does... | [
"php",
"session",
"cookies"
] | 239 | 282 | 233,894 | 15 | 0 | 2011-06-06T14:36:25.803000 | 2011-06-06T14:40:50.867000 |
6,253,639 | 6,255,132 | Java = Return Object list/array vs. Result-Object (the same with method parameters) | This might seem to be a strange question: I am struggling to decide whether it is a good practice and "efficient" to work with "Typed Objects" on a very granular level. public Object[] doSomething() { Object[] resultList = new Object[] {new Foo(), new Bar()}; return resultList; } versus public Result doSomething() { Re... | I'd have to do an experiment to really know, but I'd guess that the object array would not be significantly faster. It might even be slower. After all, in either case you have to create an object: either the array object or the Result object. With the Result object you have to read the class definition from disk the fi... | Java = Return Object list/array vs. Result-Object (the same with method parameters) This might seem to be a strange question: I am struggling to decide whether it is a good practice and "efficient" to work with "Typed Objects" on a very granular level. public Object[] doSomething() { Object[] resultList = new Object[] ... | TITLE:
Java = Return Object list/array vs. Result-Object (the same with method parameters)
QUESTION:
This might seem to be a strange question: I am struggling to decide whether it is a good practice and "efficient" to work with "Typed Objects" on a very granular level. public Object[] doSomething() { Object[] resultLi... | [
"java",
"oop"
] | 3 | 1 | 3,744 | 3 | 0 | 2011-06-06T14:36:45.657000 | 2011-06-06T16:30:55.723000 |
6,253,644 | 6,253,800 | How to get user submission to post to page | Hey guys... I'm working on creating one of my first websites and currently have it only in HTML/CSS which is great for displaying some basic material on my site. However, I'd like to add in the option to submit something basic like a quote to the page. I'd like to start with just a simple form to submit a name and a qu... | You need a script which receives the posted information and some place to store the quotes. The script can be written in ASP.NET, PHP, python or whatever else your webserver supports and you want to learn. The database can be as simple as a directory with textfiles or a full-blown SQL database like postgresql or mssql.... | How to get user submission to post to page Hey guys... I'm working on creating one of my first websites and currently have it only in HTML/CSS which is great for displaying some basic material on my site. However, I'd like to add in the option to submit something basic like a quote to the page. I'd like to start with j... | TITLE:
How to get user submission to post to page
QUESTION:
Hey guys... I'm working on creating one of my first websites and currently have it only in HTML/CSS which is great for displaying some basic material on my site. However, I'd like to add in the option to submit something basic like a quote to the page. I'd li... | [
"html",
"css"
] | 2 | 1 | 93 | 2 | 0 | 2011-06-06T14:37:05.487000 | 2011-06-06T14:47:37.757000 |
6,253,647 | 6,261,525 | Codeigniter. extract XLS file to array or similar | I'm using CI 2.0.2 and am trying to import a simple XLS file for my site. Eventually, I'll be inserting that data into a DB, but for now, I just need an array of the data. (I'm going to be running checks on the data first).. I've never written a plugin for CI and am greatly confused by all the dependancies of these sug... | Handling XLS files is an utter nightmare... I've tried lots of libraries (both CI and native PHP) and found nothing that works. Is saving as a CSV a possibility? | Codeigniter. extract XLS file to array or similar I'm using CI 2.0.2 and am trying to import a simple XLS file for my site. Eventually, I'll be inserting that data into a DB, but for now, I just need an array of the data. (I'm going to be running checks on the data first).. I've never written a plugin for CI and am gre... | TITLE:
Codeigniter. extract XLS file to array or similar
QUESTION:
I'm using CI 2.0.2 and am trying to import a simple XLS file for my site. Eventually, I'll be inserting that data into a DB, but for now, I just need an array of the data. (I'm going to be running checks on the data first).. I've never written a plugin... | [
"php",
"codeigniter",
"import",
"xls"
] | 0 | 0 | 990 | 1 | 0 | 2011-06-06T14:37:19.117000 | 2011-06-07T06:46:42.570000 |
6,253,651 | 6,262,302 | VBS script to detect a user prompt | Is there a way to detect when a user prompt appears using a VBscript? I have a script running that's using sendkeys to respond to user prompts, but one of the prompts is heavily variable in how long it will appear. Thanks -Neil | I'm not exactly sure what you mean with user prompt, but I'm assuming in this answer that it's some kind of window/dialog that appears to the user. If that's the case, you could probably just do some kind of loop in your script and repeatedly look if it exists. You can do this using Windows API functions. Which ones wo... | VBS script to detect a user prompt Is there a way to detect when a user prompt appears using a VBscript? I have a script running that's using sendkeys to respond to user prompts, but one of the prompts is heavily variable in how long it will appear. Thanks -Neil | TITLE:
VBS script to detect a user prompt
QUESTION:
Is there a way to detect when a user prompt appears using a VBscript? I have a script running that's using sendkeys to respond to user prompts, but one of the prompts is heavily variable in how long it will appear. Thanks -Neil
ANSWER:
I'm not exactly sure what you ... | [
"vbscript",
"sendkeys"
] | 0 | 0 | 464 | 1 | 0 | 2011-06-06T14:37:28.820000 | 2011-06-07T08:05:32.307000 |
6,253,656 | 6,253,685 | how do I join two lists using linq or lambda expressions | I have two lists List and List I would like join the two lists on the workorder number as detailed below. In other words I have a list of planned work but I need to know the description of the work for the workOrderNumber. I am new to both linq and lambda expressions, and I haven't quite got my head wrapped around them... | It sounds like you want something like: var query = from order in workOrders join plan in plans on order.WorkOrderNumber equals plan.WorkOrderNumber select new { order.WorkOrderNumber, order.Description, plan.ScheduledDate }; | how do I join two lists using linq or lambda expressions I have two lists List and List I would like join the two lists on the workorder number as detailed below. In other words I have a list of planned work but I need to know the description of the work for the workOrderNumber. I am new to both linq and lambda express... | TITLE:
how do I join two lists using linq or lambda expressions
QUESTION:
I have two lists List and List I would like join the two lists on the workorder number as detailed below. In other words I have a list of planned work but I need to know the description of the work for the workOrderNumber. I am new to both linq ... | [
"c#"
] | 72 | 111 | 188,117 | 3 | 0 | 2011-06-06T14:37:53.983000 | 2011-06-06T14:39:49.240000 |
6,253,660 | 6,253,747 | jquery show next div of same class? | I have a bunch of div's like MiniDo - Adobe Air App - Simplistic design wrapped around a simple iOS style window built for the Windows environment using Adobe Air. and a bunch of jquery $(document).ready(function(){ $(".slides").hide();
var length = $(".slides").length; var ran = Math.floor(Math.random()*length); $(".... | You should use for previous $(this).closest('.slides').prevAll('.slides').eq(0).show(); and for next $(this).closest('.slides').nextAll('.slides').eq(0).show(); And the most important is to hide the.slides before you show the next one. So the $('.slides').hide(); should be before the.show() commands otherwise, you just... | jquery show next div of same class? I have a bunch of div's like MiniDo - Adobe Air App - Simplistic design wrapped around a simple iOS style window built for the Windows environment using Adobe Air. and a bunch of jquery $(document).ready(function(){ $(".slides").hide();
var length = $(".slides").length; var ran = Ma... | TITLE:
jquery show next div of same class?
QUESTION:
I have a bunch of div's like MiniDo - Adobe Air App - Simplistic design wrapped around a simple iOS style window built for the Windows environment using Adobe Air. and a bunch of jquery $(document).ready(function(){ $(".slides").hide();
var length = $(".slides").le... | [
"jquery"
] | 5 | 10 | 6,168 | 1 | 0 | 2011-06-06T14:38:05.267000 | 2011-06-06T14:43:52.947000 |
6,253,665 | 6,253,881 | How to determine if a string is a valid IPv6 address in C++? | Possible Duplicate: IPv6 parsing in C I need to check strings if they are valid IPv6 addresses in C++. There are elegant solutions for C# here and rather ugly regex here. Is there a good way to do this in C++? I'm currently using this, but it doesn't work on Windows XP (inet_pton() is missing): unsigned char buf[sizeof... | You can use getaddrinfo in Linux, or in Windows since Windows 2000. (See the section of that document page entitled "Example code using AI_NUMERICHOST") | How to determine if a string is a valid IPv6 address in C++? Possible Duplicate: IPv6 parsing in C I need to check strings if they are valid IPv6 addresses in C++. There are elegant solutions for C# here and rather ugly regex here. Is there a good way to do this in C++? I'm currently using this, but it doesn't work on ... | TITLE:
How to determine if a string is a valid IPv6 address in C++?
QUESTION:
Possible Duplicate: IPv6 parsing in C I need to check strings if they are valid IPv6 addresses in C++. There are elegant solutions for C# here and rather ugly regex here. Is there a good way to do this in C++? I'm currently using this, but i... | [
"c++",
"visual-studio-2008",
"windows-xp",
"ip-address",
"ipv6"
] | 1 | 2 | 4,718 | 2 | 0 | 2011-06-06T14:38:17.617000 | 2011-06-06T14:53:27.123000 |
6,253,666 | 6,253,699 | Make a two-digit string from a single-digit integer | How can I have a two-digit integer in a a string, even if the integer is less than 10? [NSString stringWithFormat:@"%d", 1] //should be @"01" | I believe that the stringWithFormat specifiers are the standard IEEE printf specifiers. Have you tried [NSString stringWithFormat:@"%02d", 1]; | Make a two-digit string from a single-digit integer How can I have a two-digit integer in a a string, even if the integer is less than 10? [NSString stringWithFormat:@"%d", 1] //should be @"01" | TITLE:
Make a two-digit string from a single-digit integer
QUESTION:
How can I have a two-digit integer in a a string, even if the integer is less than 10? [NSString stringWithFormat:@"%d", 1] //should be @"01"
ANSWER:
I believe that the stringWithFormat specifiers are the standard IEEE printf specifiers. Have you tr... | [
"objective-c",
"string",
"cocoa",
"nsstring",
"number-formatting"
] | 93 | 307 | 46,221 | 3 | 0 | 2011-06-06T14:38:28.273000 | 2011-06-06T14:40:51.940000 |
6,253,671 | 6,253,813 | How to create a Mac/PC server app that interacts with iPhone/iPad App? | Can someone please point me in the right direction to create a Mac/PC server app that runs in the background and connects to an iPad app over the local WiFi network? No matter how I phrase a search on Google it just brings up various apps like Remote Mouse and whatnot and no tutorials or even a hint of where to start. ... | OK, then. It actually depends on what you really need. I made the assumption you need real-time and perhaps binary data transfer. Your best bet is to write your server application using standard C or C++ so it compiles on both as simply as possible. If you want to avoid all the burden of writing a protocol for service ... | How to create a Mac/PC server app that interacts with iPhone/iPad App? Can someone please point me in the right direction to create a Mac/PC server app that runs in the background and connects to an iPad app over the local WiFi network? No matter how I phrase a search on Google it just brings up various apps like Remot... | TITLE:
How to create a Mac/PC server app that interacts with iPhone/iPad App?
QUESTION:
Can someone please point me in the right direction to create a Mac/PC server app that runs in the background and connects to an iPad app over the local WiFi network? No matter how I phrase a search on Google it just brings up vario... | [
"iphone",
"ipad",
"wifi"
] | 3 | 1 | 1,080 | 1 | 0 | 2011-06-06T14:38:48.220000 | 2011-06-06T14:48:23.243000 |
6,253,677 | 6,253,887 | Minimal grouping algorithm | I have a set of values, each value has a possible group. The value can ve repeating but in different group. What will be an optimal algorithm to get minimum number of groups A sample set: (12, group b) (38, group a) (12, group a) Desired outcome: (38, group a) (12, group a) (only one group is used) -- edit: I need an a... | If I understand the question correctly, this is the Set cover problem The greedy algorithm as described in the link starts with group a and then terminates, as this already covers all. Note that in general it yields only an approximation to the optimal solution. | Minimal grouping algorithm I have a set of values, each value has a possible group. The value can ve repeating but in different group. What will be an optimal algorithm to get minimum number of groups A sample set: (12, group b) (38, group a) (12, group a) Desired outcome: (38, group a) (12, group a) (only one group is... | TITLE:
Minimal grouping algorithm
QUESTION:
I have a set of values, each value has a possible group. The value can ve repeating but in different group. What will be an optimal algorithm to get minimum number of groups A sample set: (12, group b) (38, group a) (12, group a) Desired outcome: (38, group a) (12, group a) ... | [
"algorithm",
"grouping",
"graph-algorithm"
] | 0 | 1 | 230 | 1 | 0 | 2011-06-06T14:39:15.210000 | 2011-06-06T14:53:48.533000 |
6,253,684 | 6,253,774 | LinearLayout problem | I have this code: Can somebody helps me. Why android:layout_gravity="bottom" doesn't work? If you have the better solution, please help me. | A vertical LinearLayout will only honor horizontal gravity; a horizontal LinearLayout will only honor vertical gravity. Use RelativeLayout, or else use android:layout_weight to distribute extra vertical space where you want it. | LinearLayout problem I have this code: Can somebody helps me. Why android:layout_gravity="bottom" doesn't work? If you have the better solution, please help me. | TITLE:
LinearLayout problem
QUESTION:
I have this code: Can somebody helps me. Why android:layout_gravity="bottom" doesn't work? If you have the better solution, please help me.
ANSWER:
A vertical LinearLayout will only honor horizontal gravity; a horizontal LinearLayout will only honor vertical gravity. Use Relative... | [
"android",
"layout"
] | 0 | 2 | 279 | 3 | 0 | 2011-06-06T14:39:49.427000 | 2011-06-06T14:45:57.080000 |
6,253,690 | 6,253,773 | Why does IsUTF8String return false? | I have some simple code: procedure TForm1.Button1Click(Sender:TObject); var x: RawByteString; begin x:= UTF8Encode('testing utf8'); if (IsUTF8String(x)) then Memo1.Lines.Add('true'); end; This returns False, am I doing something wrong? | There are no special characters in that string that would require UTF-8 encoding — there are no multibyte UTF-8 sequences in the string. It looks like a plain ASCII string. If there's anything you can do to the design of your program that would eliminate the need to guess about the encodings of your strings, I recommen... | Why does IsUTF8String return false? I have some simple code: procedure TForm1.Button1Click(Sender:TObject); var x: RawByteString; begin x:= UTF8Encode('testing utf8'); if (IsUTF8String(x)) then Memo1.Lines.Add('true'); end; This returns False, am I doing something wrong? | TITLE:
Why does IsUTF8String return false?
QUESTION:
I have some simple code: procedure TForm1.Button1Click(Sender:TObject); var x: RawByteString; begin x:= UTF8Encode('testing utf8'); if (IsUTF8String(x)) then Memo1.Lines.Add('true'); end; This returns False, am I doing something wrong?
ANSWER:
There are no special ... | [
"delphi",
"delphi-xe"
] | 1 | 5 | 800 | 1 | 0 | 2011-06-06T14:40:11.843000 | 2011-06-06T14:45:55.477000 |
6,253,694 | 6,253,785 | Java: simple JAR project, when run, cannot find an imported class in a second simple JAR project even though second JAR passed via -classpath | I have written two simple Java classes (one of them containing "main()", and the other called by "main()"). Class #1 (containing "main()"): package daniel347x.outerjar; import daniel347x.innerjar.Funky; public class App { public static void main( String[] args ) { Funky.foo(); } } Class #2 (called by "main()"): package... | The classpath is ignored when using the -jar option. A way to run your app would be java -classpath "P:\_Dan\work\JavaProjects\JarFuckup\innerjar\target\innerjar-1.0-SNAPSHOT.jar";"P:\_Dan\work\JavaProjects\JarFuckup\outerjar\target\outerjar-1.0-SNAPSHOT.jar" daniel347x.outerjar.App | Java: simple JAR project, when run, cannot find an imported class in a second simple JAR project even though second JAR passed via -classpath I have written two simple Java classes (one of them containing "main()", and the other called by "main()"). Class #1 (containing "main()"): package daniel347x.outerjar; import da... | TITLE:
Java: simple JAR project, when run, cannot find an imported class in a second simple JAR project even though second JAR passed via -classpath
QUESTION:
I have written two simple Java classes (one of them containing "main()", and the other called by "main()"). Class #1 (containing "main()"): package daniel347x.o... | [
"java",
"maven",
"classpath"
] | 0 | 2 | 815 | 2 | 0 | 2011-06-06T14:40:32.293000 | 2011-06-06T14:46:34.783000 |
6,253,695 | 6,253,720 | Process.TotalProcessorTime exceeds the actual time passing | I want to calculate the average CPU usage % between two points of time. I use the ratio between t1-t0 and Process.TotalProcessorTime1 - Process.TotalProcessorTime0 (where t is the actual DateTime.Now at that point) but sometimes when the computer is busy I get the TotalProcessorTime difference in Ticks is larger than t... | If a single process uses more than one processor, it can use processor time in faster than real time. | Process.TotalProcessorTime exceeds the actual time passing I want to calculate the average CPU usage % between two points of time. I use the ratio between t1-t0 and Process.TotalProcessorTime1 - Process.TotalProcessorTime0 (where t is the actual DateTime.Now at that point) but sometimes when the computer is busy I get ... | TITLE:
Process.TotalProcessorTime exceeds the actual time passing
QUESTION:
I want to calculate the average CPU usage % between two points of time. I use the ratio between t1-t0 and Process.TotalProcessorTime1 - Process.TotalProcessorTime0 (where t is the actual DateTime.Now at that point) but sometimes when the compu... | [
"c#",
".net"
] | 2 | 4 | 1,666 | 2 | 0 | 2011-06-06T14:40:37.133000 | 2011-06-06T14:41:54.777000 |
6,253,701 | 6,253,940 | Thunderbird compose email in a batch script - continue to next command | Using the following line in a batch script to call thunderbird and compose an email: thunderbird.exe -compose "to='email@domain.com',subject='Some Subject',preselectid='id1',body='Message Body',attachment='File.txt'" The command performs perfectly fine, however the batch script will not continue until the application t... | use start /b before the command, and the batch script will continue to execute after launching the process. | Thunderbird compose email in a batch script - continue to next command Using the following line in a batch script to call thunderbird and compose an email: thunderbird.exe -compose "to='email@domain.com',subject='Some Subject',preselectid='id1',body='Message Body',attachment='File.txt'" The command performs perfectly f... | TITLE:
Thunderbird compose email in a batch script - continue to next command
QUESTION:
Using the following line in a batch script to call thunderbird and compose an email: thunderbird.exe -compose "to='email@domain.com',subject='Some Subject',preselectid='id1',body='Message Body',attachment='File.txt'" The command pe... | [
"batch-file",
"thunderbird"
] | 6 | 4 | 25,622 | 1 | 0 | 2011-06-06T14:41:07.423000 | 2011-06-06T14:56:54.183000 |
6,253,711 | 6,265,082 | Scroll event on a ListView in ExtJS3.x | I have a ListView in ExtJs3.1 and I have been trying to listen on the 'scroll' event. Most examples I've seen for controls such as panels specify the following: panel.body.on('scroll', function(a, b, c){ //put logic here }); now the problem with the ListView is that it doesn't have a body attribute, not that I have see... | I found a workaround! Although the listView does not expose a body attribute as such, that isn't to say we cannot access the body. using CSS selectors I got the body of the listView by doing the following: var body = listView.el.child('.x-list-body'); That body variable is of XType Ext.Element and I can now listen on t... | Scroll event on a ListView in ExtJS3.x I have a ListView in ExtJs3.1 and I have been trying to listen on the 'scroll' event. Most examples I've seen for controls such as panels specify the following: panel.body.on('scroll', function(a, b, c){ //put logic here }); now the problem with the ListView is that it doesn't hav... | TITLE:
Scroll event on a ListView in ExtJS3.x
QUESTION:
I have a ListView in ExtJs3.1 and I have been trying to listen on the 'scroll' event. Most examples I've seen for controls such as panels specify the following: panel.body.on('scroll', function(a, b, c){ //put logic here }); now the problem with the ListView is t... | [
"listview",
"extjs",
"scroll"
] | 4 | 2 | 592 | 2 | 0 | 2011-06-06T14:41:33.033000 | 2011-06-07T12:23:11.903000 |
6,253,712 | 6,253,810 | How to create like button when you not eligable for a URL | I have just created a facebook business page and currently thus have no likes at minute. I want to create a 'Like box' for my website where people simply can click 'Like from my website'. The problem is I have no URL(href) to put into the 'Like' box field 'URL to Like' URL during the creation. I cant create a username(... | Your page should still have a url, of the form "facebook.com/pages/nameOfPage/randomNumber", which you can use. Also, to get your own url, you only need to have 25 people like your page, can you suggest the page to some of your friends and coworkers? | How to create like button when you not eligable for a URL I have just created a facebook business page and currently thus have no likes at minute. I want to create a 'Like box' for my website where people simply can click 'Like from my website'. The problem is I have no URL(href) to put into the 'Like' box field 'URL t... | TITLE:
How to create like button when you not eligable for a URL
QUESTION:
I have just created a facebook business page and currently thus have no likes at minute. I want to create a 'Like box' for my website where people simply can click 'Like from my website'. The problem is I have no URL(href) to put into the 'Like... | [
"facebook"
] | 0 | 0 | 217 | 1 | 0 | 2011-06-06T14:41:36.603000 | 2011-06-06T14:48:06.380000 |
6,253,719 | 6,253,757 | Understanding this SWf link | I'd like to knwo what the parameters in the following SWF link froma HTML document mean: mprev_2k8.swf?thisId=smovie1&fName=composer_mp3_2977/swf& thisId=smovie1 — Sets thisId variable inside the SWF to "smovie1". fName=composer_mp3_2977 — Sets fName to "composer_mp3_2977". /swf& — This I don't understand. Is it part o... | Everything between two ampersands ( & ) is a single key/value pair. So, fName=composer_mp3_2977/swf means that the fname key has the value composer_mp3_2977/swf. | Understanding this SWf link I'd like to knwo what the parameters in the following SWF link froma HTML document mean: mprev_2k8.swf?thisId=smovie1&fName=composer_mp3_2977/swf& thisId=smovie1 — Sets thisId variable inside the SWF to "smovie1". fName=composer_mp3_2977 — Sets fName to "composer_mp3_2977". /swf& — This I do... | TITLE:
Understanding this SWf link
QUESTION:
I'd like to knwo what the parameters in the following SWF link froma HTML document mean: mprev_2k8.swf?thisId=smovie1&fName=composer_mp3_2977/swf& thisId=smovie1 — Sets thisId variable inside the SWF to "smovie1". fName=composer_mp3_2977 — Sets fName to "composer_mp3_2977".... | [
"html",
"flash"
] | 1 | 2 | 76 | 1 | 0 | 2011-06-06T14:41:51.830000 | 2011-06-06T14:44:32.200000 |
6,253,722 | 6,254,277 | Are there any ASP .Net membership managers (FOSS) available? | I have a website that uses ASP.Net membership and roles using the SqlMembershipProvider and SqlRoleProvider. Right now I am only using this for a small section of the site that only 2 people have access to. The site may expand in the near future and the number of users could grow into the thousands. My question is, is ... | Take a look at MyWSAT on CodePlex. http://mywsat.codeplex.com/ MyWSAT aka ASP.NET WSAT is a WebForms based Website Starter Kit for the ASP.NET Membership Provider with Forms Authentication. It provides you with all the security features required for a site out of the box so you start focusing on building your pages. It... | Are there any ASP .Net membership managers (FOSS) available? I have a website that uses ASP.Net membership and roles using the SqlMembershipProvider and SqlRoleProvider. Right now I am only using this for a small section of the site that only 2 people have access to. The site may expand in the near future and the numbe... | TITLE:
Are there any ASP .Net membership managers (FOSS) available?
QUESTION:
I have a website that uses ASP.Net membership and roles using the SqlMembershipProvider and SqlRoleProvider. Right now I am only using this for a small section of the site that only 2 people have access to. The site may expand in the near fu... | [
"asp.net",
"authentication",
"asp.net-membership"
] | 0 | 1 | 452 | 1 | 0 | 2011-06-06T14:42:04.413000 | 2011-06-06T15:24:36.493000 |
6,253,729 | 6,253,817 | kmeans with L1 distance in python | Given an NxM feature vectors as numpy matrix. Is there any routine that can cluster it by Kmeans algorithm using L1 distance (Manhattan distance)? | I don't think this is offered explicitly in scipy, but you should take a look at the following: http://projects.scipy.org/scipy/ticket/612 | kmeans with L1 distance in python Given an NxM feature vectors as numpy matrix. Is there any routine that can cluster it by Kmeans algorithm using L1 distance (Manhattan distance)? | TITLE:
kmeans with L1 distance in python
QUESTION:
Given an NxM feature vectors as numpy matrix. Is there any routine that can cluster it by Kmeans algorithm using L1 distance (Manhattan distance)?
ANSWER:
I don't think this is offered explicitly in scipy, but you should take a look at the following: http://projects.... | [
"python",
"numpy",
"k-means"
] | 2 | 1 | 9,496 | 4 | 0 | 2011-06-06T14:42:37.977000 | 2011-06-06T14:48:50.690000 |
6,253,730 | 6,262,030 | libcurl: Detect chunk boundaries of chunk-encoded responses | I am using libcurl, currently the easy api. I am making a request to a web server that responds with HTTP Chunked Encoding. I would like to know if there is a way to know when a chunk from the server has finished. I was looking for some type of callback. DEBUGDATA didn't seem to include it, and CHUNK_END_FUNCTION seeme... | If you use the CURLOPT_DEBUGFUNCTION option you will get the data "un-chunked" and then you can scan and parse the data yourself as you see fit and thus track the end of chunks or whatever you like. () As "n.m." already said, libcurl has no API that exposes chunks as it tries to make the transfer encoding completely tr... | libcurl: Detect chunk boundaries of chunk-encoded responses I am using libcurl, currently the easy api. I am making a request to a web server that responds with HTTP Chunked Encoding. I would like to know if there is a way to know when a chunk from the server has finished. I was looking for some type of callback. DEBUG... | TITLE:
libcurl: Detect chunk boundaries of chunk-encoded responses
QUESTION:
I am using libcurl, currently the easy api. I am making a request to a web server that responds with HTTP Chunked Encoding. I would like to know if there is a way to know when a chunk from the server has finished. I was looking for some type ... | [
"c++",
"libcurl",
"chunked-encoding",
"chunks"
] | 2 | 4 | 1,562 | 2 | 0 | 2011-06-06T14:42:45.667000 | 2011-06-07T07:40:45.470000 |
6,253,731 | 6,253,758 | jQuery - change checkbox state | I read many topics here about it, but can't understand why my code does not work I have <%= Html.CheckBoxList("CategoryCheckboxes", values, labels, null)%> result of HTML: (IN) Insight CBT (Computer Based Testing) NG Ideas Module Typing Test | Your selector is wrong, there isn't any tags called checkbox. You have an input with the type checkbox Use ( example on jsFiddle ) $(':checkbox') | jQuery - change checkbox state I read many topics here about it, but can't understand why my code does not work I have <%= Html.CheckBoxList("CategoryCheckboxes", values, labels, null)%> result of HTML: (IN) Insight CBT (Computer Based Testing) NG Ideas Module Typing Test | TITLE:
jQuery - change checkbox state
QUESTION:
I read many topics here about it, but can't understand why my code does not work I have <%= Html.CheckBoxList("CategoryCheckboxes", values, labels, null)%> result of HTML: (IN) Insight CBT (Computer Based Testing) NG Ideas Module Typing Test
ANSWER:
Your selector is wro... | [
"jquery",
"asp.net-mvc"
] | 0 | 1 | 735 | 1 | 0 | 2011-06-06T14:42:46.207000 | 2011-06-06T14:44:33.180000 |
6,253,735 | 6,253,767 | What is the most efficient way to traverse up in jQuery | I'm trying to close a parent container when an internally nested button is clicked. In my UI -- I have many of these parent containers (I'm rendering preview windows of my product catalogue on a product category page). As you can see from my mark-up below -- the CLOSE button is deeply nested in the DOM. When the user c... | The best method to use is closest, which finds the nearest ancestor element that matches a selector: $this.closest('div.box-1').hide(); | What is the most efficient way to traverse up in jQuery I'm trying to close a parent container when an internally nested button is clicked. In my UI -- I have many of these parent containers (I'm rendering preview windows of my product catalogue on a product category page). As you can see from my mark-up below -- the C... | TITLE:
What is the most efficient way to traverse up in jQuery
QUESTION:
I'm trying to close a parent container when an internally nested button is clicked. In my UI -- I have many of these parent containers (I'm rendering preview windows of my product catalogue on a product category page). As you can see from my mark... | [
"javascript",
"jquery",
"dom-traversal"
] | 6 | 7 | 3,952 | 4 | 0 | 2011-06-06T14:42:56.170000 | 2011-06-06T14:45:22.220000 |
6,253,737 | 6,253,766 | C++: How to read and write multi-byte integer values in a platform-independent way? | I'm developing a simple protocol that is used to read/write integer values from/to a buffer. The vast majority of integers are below 128, but much larger values are possible, so I'm looking at some form of multi-byte encoding to store the values in a concise way. What is the simplest and fastest way to read/write multi... | XDR format might help you there. If I had to summarize it in one sentence, it's a kind of binary UTF-8 for integers. Edit: As mentioned in my comment below, I "know" XDR because I use several XDR-related functions in my office job. Only after your comment I realized that the "packed XDR" format I use every day isn't ev... | C++: How to read and write multi-byte integer values in a platform-independent way? I'm developing a simple protocol that is used to read/write integer values from/to a buffer. The vast majority of integers are below 128, but much larger values are possible, so I'm looking at some form of multi-byte encoding to store t... | TITLE:
C++: How to read and write multi-byte integer values in a platform-independent way?
QUESTION:
I'm developing a simple protocol that is used to read/write integer values from/to a buffer. The vast majority of integers are below 128, but much larger values are possible, so I'm looking at some form of multi-byte e... | [
"c++",
"protocols",
"multibyte"
] | 1 | 3 | 1,449 | 5 | 0 | 2011-06-06T14:42:59.700000 | 2011-06-06T14:45:18.303000 |
6,253,738 | 6,253,907 | Find open Windows in XAML | I need a functionality to get all existing (open) instances of some conrete WPF window. I create those windows programatically in few places in code. Is there a XAML/WPF solution for that? Something like GetInstancesByType(type)? | You can use the Application.Windows property: foreach( var window in Application.Current.Windows.OfType () ) { // do stuff } As H.B. pointed out, you would need to include System.Linq to get the OfType extension method, but it's not necessary. | Find open Windows in XAML I need a functionality to get all existing (open) instances of some conrete WPF window. I create those windows programatically in few places in code. Is there a XAML/WPF solution for that? Something like GetInstancesByType(type)? | TITLE:
Find open Windows in XAML
QUESTION:
I need a functionality to get all existing (open) instances of some conrete WPF window. I create those windows programatically in few places in code. Is there a XAML/WPF solution for that? Something like GetInstancesByType(type)?
ANSWER:
You can use the Application.Windows p... | [
"c#",
".net",
"wpf"
] | 3 | 4 | 368 | 1 | 0 | 2011-06-06T14:43:02.073000 | 2011-06-06T14:54:53.233000 |
6,253,749 | 6,253,848 | Struts2 - Linking to external URL on JSP *excluding* local context path? | Using Struts2, I compute a link in my java code and expose the link's string in a getter for the JSP page. I try to link to this external link using a Link. Sadly, Struts always puts the local context before this link, so the resulting link looks like a Link. Note: I also tried using and with includeContext="false"... ... | Struts always puts the local context before this link uh? If you really write a plain element a Link in your jsp, then Struts2 will not add anything, Struts2 does not even know that there is a link there, the property tag is just a general "echo the value of this property" instruction. You can check that by copying the... | Struts2 - Linking to external URL on JSP *excluding* local context path? Using Struts2, I compute a link in my java code and expose the link's string in a getter for the JSP page. I try to link to this external link using a Link. Sadly, Struts always puts the local context before this link, so the resulting link looks ... | TITLE:
Struts2 - Linking to external URL on JSP *excluding* local context path?
QUESTION:
Using Struts2, I compute a link in my java code and expose the link's string in a getter for the JSP page. I try to link to this external link using a Link. Sadly, Struts always puts the local context before this link, so the res... | [
"jsp",
"tomcat",
"struts2"
] | 1 | 3 | 2,688 | 1 | 0 | 2011-06-06T14:44:00.830000 | 2011-06-06T14:51:12.900000 |
6,253,768 | 6,254,241 | Efficient Fisher's Exact Test in Java | I need a library/function/method to perform a Fisher's exact test in Java, and provide the right, left and two-tailed probabilities. Simple Googling shows a solution within the packages of Tassel, but the method inside simply applies the test steps with no optimization, and therefore it's extremely slow. Moreover, it u... | See if this helps: http://www.users.zetnet.co.uk/hopwood/tools/StatTests.java The formula is quite simple. There's a very simple (two-tailed) implementation here: http://javanus.com/blogs/?p=51 (see the comment by Discretoboy for a much cleaner implementation) You can also take a look at the test implementation in Java... | Efficient Fisher's Exact Test in Java I need a library/function/method to perform a Fisher's exact test in Java, and provide the right, left and two-tailed probabilities. Simple Googling shows a solution within the packages of Tassel, but the method inside simply applies the test steps with no optimization, and therefo... | TITLE:
Efficient Fisher's Exact Test in Java
QUESTION:
I need a library/function/method to perform a Fisher's exact test in Java, and provide the right, left and two-tailed probabilities. Simple Googling shows a solution within the packages of Tassel, but the method inside simply applies the test steps with no optimiz... | [
"java",
"statistics"
] | 5 | 5 | 4,158 | 2 | 0 | 2011-06-06T14:45:30.083000 | 2011-06-06T15:20:58.570000 |
6,253,775 | 6,255,221 | Two @XmlJavaTypeAdapters for one @XmlAttribute in JAXB? | I have a class like this: @XmlRootElement(name = "PricingGroup") public class PricingGroup {...
@XmlAttribute(name = "partyName") @XmlJavaTypeAdapter(CustomerGroupRelationships.Adapter.class) private List billtoCustomers = new ArrayList ();
@XmlAttribute(name = "partyName") @XmlJavaTypeAdapter(PartyNames.Adapter.clas... | You could map one of the properties ( partyName ) and then use an afterUnmarshal event to derive the other property ( billToCustomers ): @XmlRootElement(name = "PricingGroup") public class PricingGroup {...
@XmlTransient private List billtoCustomers = new ArrayList ();
@XmlAttribute(name = "partyName") @XmlJavaTypeAd... | Two @XmlJavaTypeAdapters for one @XmlAttribute in JAXB? I have a class like this: @XmlRootElement(name = "PricingGroup") public class PricingGroup {...
@XmlAttribute(name = "partyName") @XmlJavaTypeAdapter(CustomerGroupRelationships.Adapter.class) private List billtoCustomers = new ArrayList ();
@XmlAttribute(name = ... | TITLE:
Two @XmlJavaTypeAdapters for one @XmlAttribute in JAXB?
QUESTION:
I have a class like this: @XmlRootElement(name = "PricingGroup") public class PricingGroup {...
@XmlAttribute(name = "partyName") @XmlJavaTypeAdapter(CustomerGroupRelationships.Adapter.class) private List billtoCustomers = new ArrayList ();
@Xm... | [
"java",
"jaxb"
] | 1 | 2 | 891 | 1 | 0 | 2011-06-06T14:46:02.827000 | 2011-06-06T16:40:15.180000 |
6,253,778 | 6,253,844 | How to mock an interface property with JustMock in VB.NET | I am using JustMock to mock interfaces for unit testing, but perhaps I'm not doing it right. I have an interface: Public Interface IFoo Property Bar as int End Interface I want to mock this interface and set that property so that it can be read by consumers of the interface. Beginning with: Dim mockFoo as IFoo = Mock.C... | Mock.Arrange( () => mockFoo.Bar ).Returns(1); See Telerik's documentation: http://www.telerik.com/help/justmock/basic-usage-mock-returns.html | How to mock an interface property with JustMock in VB.NET I am using JustMock to mock interfaces for unit testing, but perhaps I'm not doing it right. I have an interface: Public Interface IFoo Property Bar as int End Interface I want to mock this interface and set that property so that it can be read by consumers of t... | TITLE:
How to mock an interface property with JustMock in VB.NET
QUESTION:
I am using JustMock to mock interfaces for unit testing, but perhaps I'm not doing it right. I have an interface: Public Interface IFoo Property Bar as int End Interface I want to mock this interface and set that property so that it can be read... | [
"vb.net",
"interface",
"mocking",
"telerik",
"justmock"
] | 1 | 4 | 983 | 1 | 0 | 2011-06-06T14:46:18.583000 | 2011-06-06T14:50:54.460000 |
6,253,792 | 6,253,923 | Where do I store files on Vista/Win7 for all users with read/write permission | Possible Duplicate: Where to put common writable application files? In my application I have some setting-files, which needs read/write permission and should be accessable by all users. So far I found in the net is, that microsoft gives you some special folders in Win Vista/7, but none of them fulfills my needs: 1) CSI... | on a system wide installation, you have to write them to CSIDL_COMMON_APPDATA. but you have also to set the permissions within your setup. don't give rights to "everybody" - "authenticated" is better if you are using windows installer, then you have to take care of users and system installations. if it is a user instal... | Where do I store files on Vista/Win7 for all users with read/write permission Possible Duplicate: Where to put common writable application files? In my application I have some setting-files, which needs read/write permission and should be accessable by all users. So far I found in the net is, that microsoft gives you s... | TITLE:
Where do I store files on Vista/Win7 for all users with read/write permission
QUESTION:
Possible Duplicate: Where to put common writable application files? In my application I have some setting-files, which needs read/write permission and should be accessable by all users. So far I found in the net is, that mic... | [
"delphi",
"windows-7",
"windows-vista"
] | 2 | 7 | 1,815 | 1 | 0 | 2011-06-06T14:47:02.930000 | 2011-06-06T14:55:48.747000 |
6,253,807 | 6,257,081 | android surfaceview onDraw vs thread.onDraw | What is better for a android game to use: a SurfaceView with a rendering thread or a SurfaceView with a thread that calls the SurfaceView function doDraw() Thanks. | The drawing in a SurfaceView is already handled in a separate thread. You do not need to spawn a new one. See the API doc about it: One of the purposes of this class is to provide a surface in which a secondary thread can render into the screen. If you are going to use it this way, you need to be aware of some threadin... | android surfaceview onDraw vs thread.onDraw What is better for a android game to use: a SurfaceView with a rendering thread or a SurfaceView with a thread that calls the SurfaceView function doDraw() Thanks. | TITLE:
android surfaceview onDraw vs thread.onDraw
QUESTION:
What is better for a android game to use: a SurfaceView with a rendering thread or a SurfaceView with a thread that calls the SurfaceView function doDraw() Thanks.
ANSWER:
The drawing in a SurfaceView is already handled in a separate thread. You do not need... | [
"android",
"surfaceview",
"ondraw"
] | 2 | 1 | 3,673 | 1 | 0 | 2011-06-06T14:48:01.643000 | 2011-06-06T19:38:44.813000 |
6,253,814 | 6,253,868 | Insert double quotes into SQL output | After I run a query and view the output, for example select * from People My output is as follows First Last Email Ray Smith raysmith@whatever.itis How would I export this data so that it looks as follows? "Ray","Smith","raysmith@whatever.itis" Or is there a way to do this within SQL to modify records to contain quotes... | If the columns you're interested in are 128 characters or less, you could use the QUOTENAME function. Be careful with this as anything over 128 characters will return NULL. SELECT QUOTENAME(First, '"'), QUOTENAME(Last, '"'), QUOTENAME(Email, '"') FROM People | Insert double quotes into SQL output After I run a query and view the output, for example select * from People My output is as follows First Last Email Ray Smith raysmith@whatever.itis How would I export this data so that it looks as follows? "Ray","Smith","raysmith@whatever.itis" Or is there a way to do this within SQ... | TITLE:
Insert double quotes into SQL output
QUESTION:
After I run a query and view the output, for example select * from People My output is as follows First Last Email Ray Smith raysmith@whatever.itis How would I export this data so that it looks as follows? "Ray","Smith","raysmith@whatever.itis" Or is there a way to... | [
"sql",
"sql-server",
"t-sql",
"sql-server-2008"
] | 21 | 24 | 106,976 | 6 | 0 | 2011-06-06T14:48:28.390000 | 2011-06-06T14:52:31.657000 |
6,253,819 | 6,253,970 | Interactive 3d modelling program | Question: I look for a program that can do the job for the following questions: On a website the user can see a animated 'movie' of a house exterior He can rotate the house left-right, up-down When he clicks on, lets say a door, a price and some text will show up. About the framework the program uses: Please no unity3d... | You could use Flash for this. There are several open source 3D libraries such as: http://away3d.com/ http://blog.papervision3d.org/ http://www.flashsandy.org/ http://alternativaplatform.com/en/... Furthermore, you will be able to leverage GPU acceleration natively in the Flash Player 11.0 release. Cheers | Interactive 3d modelling program Question: I look for a program that can do the job for the following questions: On a website the user can see a animated 'movie' of a house exterior He can rotate the house left-right, up-down When he clicks on, lets say a door, a price and some text will show up. About the framework th... | TITLE:
Interactive 3d modelling program
QUESTION:
Question: I look for a program that can do the job for the following questions: On a website the user can see a animated 'movie' of a house exterior He can rotate the house left-right, up-down When he clicks on, lets say a door, a price and some text will show up. Abou... | [
"silverlight",
"flash",
"3d",
"shockwave"
] | 0 | 1 | 141 | 1 | 0 | 2011-06-06T14:48:52.323000 | 2011-06-06T14:58:19.903000 |
6,253,826 | 6,254,801 | How does rails determine incoming request format? | I'm just wondering how rails knows the format of the request as to correctly enter in the famous: respond_to do |format| format.html format.xml format.json end As an example consider this situation I have faced up. Suppose that via javascript (using jQuery) I make a POST request expliciting dataType: json $.ajax({ type... | From ActionController::MimeResponds: "Rails determines the desired response format from the HTTP Accept header submitted by the client." | How does rails determine incoming request format? I'm just wondering how rails knows the format of the request as to correctly enter in the famous: respond_to do |format| format.html format.xml format.json end As an example consider this situation I have faced up. Suppose that via javascript (using jQuery) I make a POS... | TITLE:
How does rails determine incoming request format?
QUESTION:
I'm just wondering how rails knows the format of the request as to correctly enter in the famous: respond_to do |format| format.html format.xml format.json end As an example consider this situation I have faced up. Suppose that via javascript (using jQ... | [
"ruby-on-rails",
"controller",
"format"
] | 15 | 10 | 14,063 | 2 | 0 | 2011-06-06T14:49:31.187000 | 2011-06-06T16:03:33.693000 |
6,253,827 | 6,254,750 | Change the Width of UISearchBars on a TableView | I am required to create two UISearchBars in my tableView. I want both of them of equal width on top of the table (side-by-side). I have created two outlets of UISearchBar, and property and de alloc for them. I am finding it hard to place (I mean fit) both of them in the view. I get only one search bar expanding to the ... | You are simply reassigning it when you do self.tableView.tableHeaderView= searchBar;. You will have to build a view that contains both the search bars and then set it to the table's header view. Something like this, searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 200, 45)]; zipSearchBar = [[UISearchBar ... | Change the Width of UISearchBars on a TableView I am required to create two UISearchBars in my tableView. I want both of them of equal width on top of the table (side-by-side). I have created two outlets of UISearchBar, and property and de alloc for them. I am finding it hard to place (I mean fit) both of them in the v... | TITLE:
Change the Width of UISearchBars on a TableView
QUESTION:
I am required to create two UISearchBars in my tableView. I want both of them of equal width on top of the table (side-by-side). I have created two outlets of UISearchBar, and property and de alloc for them. I am finding it hard to place (I mean fit) bot... | [
"iphone",
"objective-c",
"xcode",
"ios",
"tableview"
] | 0 | 3 | 1,999 | 1 | 0 | 2011-06-06T14:49:31.017000 | 2011-06-06T15:59:52.843000 |
6,253,834 | 6,254,733 | Eclipse C++ Running/Debugging problems with console IO | I've been trying to get into C++ programming with Eclipse, but I'm having problems setting up Eclipse. I have MinGW installed and in the environment path, and I created the simple C++ project with the following source code: #include int main(void) { std::cout << "what is your name? "; std::string name; std::cin >> name... | Is there an alternative method to have Windows find the dll's in MinGW's bin folder rather than have to copy them over each time? Set the PATH environment variable in the run configuration settings (Run -> Run Configurations... -> Environment). | Eclipse C++ Running/Debugging problems with console IO I've been trying to get into C++ programming with Eclipse, but I'm having problems setting up Eclipse. I have MinGW installed and in the environment path, and I created the simple C++ project with the following source code: #include int main(void) { std::cout << "w... | TITLE:
Eclipse C++ Running/Debugging problems with console IO
QUESTION:
I've been trying to get into C++ programming with Eclipse, but I'm having problems setting up Eclipse. I have MinGW installed and in the environment path, and I created the simple C++ project with the following source code: #include int main(void)... | [
"c++",
"eclipse",
"eclipse-cdt"
] | 0 | 2 | 991 | 1 | 0 | 2011-06-06T14:50:22.030000 | 2011-06-06T15:58:48.277000 |
6,253,837 | 6,254,021 | subset data frame based on percentage | i have a data frame that contains a data like this: V1 V2 V3 1 2 0.34 1 3 0.31 1 4 0.12 1 5 0.12 the data frame is bigger but that's an example. i want to take a subset of this data frame that has the lowest 20% of V3. how this can be done? thanks for help | The subset() function is handy because (among other benefits) it allows you to avoid having to repeatedly mention the name of the data-frame: subset(dataFrame, V3 <= quantile(V3, 0.2)) | subset data frame based on percentage i have a data frame that contains a data like this: V1 V2 V3 1 2 0.34 1 3 0.31 1 4 0.12 1 5 0.12 the data frame is bigger but that's an example. i want to take a subset of this data frame that has the lowest 20% of V3. how this can be done? thanks for help | TITLE:
subset data frame based on percentage
QUESTION:
i have a data frame that contains a data like this: V1 V2 V3 1 2 0.34 1 3 0.31 1 4 0.12 1 5 0.12 the data frame is bigger but that's an example. i want to take a subset of this data frame that has the lowest 20% of V3. how this can be done? thanks for help
ANSWER... | [
"r",
"subset"
] | 6 | 21 | 16,324 | 2 | 0 | 2011-06-06T14:50:27.010000 | 2011-06-06T15:03:29.230000 |
6,253,840 | 6,253,994 | How to allow only for 180 degrees of autorotation? | For my iPad app, I intend to disable autorotation. However I heard that apple will reject the app as they expect the app to at least be able to rotate 180 degrees. Has anyone experienced this before? Any truth in this? In any case, can anyone advise me on how I can set the autorotation to only for portrait mode? i.e. o... | In your view controller, override shouldAutorotateToInterfaceOrientation - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations. return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientatio... | How to allow only for 180 degrees of autorotation? For my iPad app, I intend to disable autorotation. However I heard that apple will reject the app as they expect the app to at least be able to rotate 180 degrees. Has anyone experienced this before? Any truth in this? In any case, can anyone advise me on how I can set... | TITLE:
How to allow only for 180 degrees of autorotation?
QUESTION:
For my iPad app, I intend to disable autorotation. However I heard that apple will reject the app as they expect the app to at least be able to rotate 180 degrees. Has anyone experienced this before? Any truth in this? In any case, can anyone advise m... | [
"cocoa-touch",
"ios",
"autorotate"
] | 1 | 2 | 276 | 2 | 0 | 2011-06-06T14:50:42.530000 | 2011-06-06T15:00:23.957000 |
6,253,843 | 6,253,932 | Change text in editpreference by code | Hi I have an edit preference and I want to change the value stored in it by code, is this possible? I tried this but it didn't work String input1 = hello; prefs.getString("location", "").replace(prefs.getString("location", ""), input1); | prefs.edit().putString("location", MODIFIED_STRING_HERE).commit(); | Change text in editpreference by code Hi I have an edit preference and I want to change the value stored in it by code, is this possible? I tried this but it didn't work String input1 = hello; prefs.getString("location", "").replace(prefs.getString("location", ""), input1); | TITLE:
Change text in editpreference by code
QUESTION:
Hi I have an edit preference and I want to change the value stored in it by code, is this possible? I tried this but it didn't work String input1 = hello; prefs.getString("location", "").replace(prefs.getString("location", ""), input1);
ANSWER:
prefs.edit().putSt... | [
"android",
"preferences"
] | 0 | 2 | 329 | 2 | 0 | 2011-06-06T14:50:54.167000 | 2011-06-06T14:56:21.740000 |
6,253,850 | 6,254,437 | Windows Service and multithreading | Im working on a Windows Service in which I would like to have two threads. One thread should look for updates (in a RSS feed) and insert rows into a DB when updates is found. When updates are found I would like to send notification via another thread, that accesses the DB, gets the messages and the recipients and then ... | The major reason to make an application or service multithreaded is to perform database or other background operations without blocking (i.e. hanging) a presentation element like a Windows form. If your service depends on very rapid polling or expects db inserts to take a very long time, it might make sense to use two ... | Windows Service and multithreading Im working on a Windows Service in which I would like to have two threads. One thread should look for updates (in a RSS feed) and insert rows into a DB when updates is found. When updates are found I would like to send notification via another thread, that accesses the DB, gets the me... | TITLE:
Windows Service and multithreading
QUESTION:
Im working on a Windows Service in which I would like to have two threads. One thread should look for updates (in a RSS feed) and insert rows into a DB when updates is found. When updates are found I would like to send notification via another thread, that accesses t... | [
"c#-4.0",
"windows-services"
] | 1 | 2 | 3,815 | 1 | 0 | 2011-06-06T14:51:20.580000 | 2011-06-06T15:36:03.693000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.