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,306,813 | 6,306,820 | How to set overflow-x with jQuery? Or: How to set css-properties with a '-' (dash)? | I would like to set the overflow-x css property with jQuery, but it doesn't work: $('.mySelector').css({ color: 'Red', overflow: 'auto', overflow-x: 'scroll' }); How would I set properties that have a '-' (dash) in them? | You could use either camel-case: $('.mySelector').css({ color: 'Red', overflow: 'auto', overflowX: 'scroll' }); Or quoted keys: $('.mySelector').css({ color: 'Red', overflow: 'auto', 'overflow-x': 'scroll' }); I would recommend quoted keys, I find it easier to tell 'at a glance' what a rule is compared to camel-casing. | How to set overflow-x with jQuery? Or: How to set css-properties with a '-' (dash)? I would like to set the overflow-x css property with jQuery, but it doesn't work: $('.mySelector').css({ color: 'Red', overflow: 'auto', overflow-x: 'scroll' }); How would I set properties that have a '-' (dash) in them? | TITLE:
How to set overflow-x with jQuery? Or: How to set css-properties with a '-' (dash)?
QUESTION:
I would like to set the overflow-x css property with jQuery, but it doesn't work: $('.mySelector').css({ color: 'Red', overflow: 'auto', overflow-x: 'scroll' }); How would I set properties that have a '-' (dash) in the... | [
"javascript",
"html",
"events",
"dom"
] | 21 | 29 | 40,196 | 2 | 0 | 2011-06-10T13:10:30.297000 | 2011-06-10T13:11:05.783000 |
6,306,827 | 6,309,177 | API to get a provisioning profile from Apple dev site | I'm wondering if it's possible to get the latest provisioning profile from Apple Developer Portal using API? I've set up CI for iOS project but I have to update provisioning profile manually every time when it is changed so I'd be glad to automate this process as well. Thanks | I'm afraid not. You should be able to get it done by scraping the HTML, but that's about it. Apple are terrible when it comes to the web (client-side excepted). | API to get a provisioning profile from Apple dev site I'm wondering if it's possible to get the latest provisioning profile from Apple Developer Portal using API? I've set up CI for iOS project but I have to update provisioning profile manually every time when it is changed so I'd be glad to automate this process as we... | TITLE:
API to get a provisioning profile from Apple dev site
QUESTION:
I'm wondering if it's possible to get the latest provisioning profile from Apple Developer Portal using API? I've set up CI for iOS project but I have to update provisioning profile manually every time when it is changed so I'd be glad to automate ... | [
"ios",
"ios4",
"continuous-integration"
] | 9 | 1 | 5,366 | 5 | 0 | 2011-06-10T13:11:47.327000 | 2011-06-10T16:15:12.943000 |
6,306,852 | 6,306,870 | How to handle C# .NET GET / POST? | As I'm new to.NET after coming from PHP I chose C# to work with and its coming along nicely. I have a question though regarding the handling of GET and POST. So far I've established that I can put this in the codefile behind the aspx page: if (Request.HttpMethod.ToString() == "POST") {
Response.Write("You sent a post!... | The.Net version of $_GET[] is: Request.QueryString["parameter1"] You do not require to do this IF condition. The.Net version of $_POST[] is: Request.Form["paramName"]; Still no need the IF condition. BUT in Asp.Net webform you do not require to use all the time Request class because the PostBack to the page will contai... | How to handle C# .NET GET / POST? As I'm new to.NET after coming from PHP I chose C# to work with and its coming along nicely. I have a question though regarding the handling of GET and POST. So far I've established that I can put this in the codefile behind the aspx page: if (Request.HttpMethod.ToString() == "POST") {... | TITLE:
How to handle C# .NET GET / POST?
QUESTION:
As I'm new to.NET after coming from PHP I chose C# to work with and its coming along nicely. I have a question though regarding the handling of GET and POST. So far I've established that I can put this in the codefile behind the aspx page: if (Request.HttpMethod.ToStr... | [
"c#",
".net",
"post",
"get"
] | 22 | 34 | 58,058 | 6 | 0 | 2011-06-10T13:13:45.923000 | 2011-06-10T13:16:06.247000 |
6,306,855 | 6,308,858 | DMV Query using sys.dm_exec_sql_text fails if any Databases in Single-User mode | Using the following Query to look @ Query Plans However I have found when I have any Single-User only Database on the instance I encounter the following error if it already has a user in it Msg 924, Level 14, State 1, Line 1 Database '' is already open and can only have one user at a time. SELECT DB_NAME(st.dbid) AS da... | Here is a version that doesn't rely on deprecated compatibility views (sysprocesses won't exist forever). It is a little more convoluted than your original query but I have tested it and plans from single_user or restricted_user databases are not returned (they are if the database is returned to multi_user). You may al... | DMV Query using sys.dm_exec_sql_text fails if any Databases in Single-User mode Using the following Query to look @ Query Plans However I have found when I have any Single-User only Database on the instance I encounter the following error if it already has a user in it Msg 924, Level 14, State 1, Line 1 Database '' is ... | TITLE:
DMV Query using sys.dm_exec_sql_text fails if any Databases in Single-User mode
QUESTION:
Using the following Query to look @ Query Plans However I have found when I have any Single-User only Database on the instance I encounter the following error if it already has a user in it Msg 924, Level 14, State 1, Line... | [
"sql",
"sql-server-2008"
] | 0 | 2 | 1,508 | 1 | 0 | 2011-06-10T13:14:14.330000 | 2011-06-10T15:49:37.243000 |
6,306,856 | 6,306,892 | Problem styling Option[selected] in a select field | I have a select box in which it is very important that the background for each option has a specific color. The problem is that the select box is clicked, the selected option appears blue (same as the selected text color). I've tried using a lot of selectors (:active,:focus,::selection, [selected]) and I cannot find th... | Unfortunately, no, there isn't a dynamic CSS pseudo-class that changes selection depending on which option is selected. option[selected] only matches whichever option s have the selected attribute as defined by the markup. | Problem styling Option[selected] in a select field I have a select box in which it is very important that the background for each option has a specific color. The problem is that the select box is clicked, the selected option appears blue (same as the selected text color). I've tried using a lot of selectors (:active,:... | TITLE:
Problem styling Option[selected] in a select field
QUESTION:
I have a select box in which it is very important that the background for each option has a specific color. The problem is that the select box is clicked, the selected option appears blue (same as the selected text color). I've tried using a lot of se... | [
"css",
"css-selectors"
] | 1 | 1 | 857 | 2 | 0 | 2011-06-10T13:14:15.987000 | 2011-06-10T13:18:30.230000 |
6,306,865 | 6,306,923 | Using a variable to access a Map in JSP EL | I would like to use a JSP variable to access the elements of a Map in JSP, but I can't make it work. Here is what I tried: 1. ${backups["2011-06-09_web05"]} 2. ${backups[$key]} I thought the two to be equivalent, but the first expression prints the value contained in the index specified, while the second doesn't print ... | Remove the $ prefix. It is invalid. You probably had PHP in mind. 2. ${backups[key]} | Using a variable to access a Map in JSP EL I would like to use a JSP variable to access the elements of a Map in JSP, but I can't make it work. Here is what I tried: 1. ${backups["2011-06-09_web05"]} 2. ${backups[$key]} I thought the two to be equivalent, but the first expression prints the value contained in the index... | TITLE:
Using a variable to access a Map in JSP EL
QUESTION:
I would like to use a JSP variable to access the elements of a Map in JSP, but I can't make it work. Here is what I tried: 1. ${backups["2011-06-09_web05"]} 2. ${backups[$key]} I thought the two to be equivalent, but the first expression prints the value cont... | [
"java",
"jsp",
"el"
] | 0 | 1 | 2,735 | 1 | 0 | 2011-06-10T13:15:43.280000 | 2011-06-10T13:21:02.053000 |
6,306,895 | 6,307,051 | How to make a file using UNICODE like Jar files? | I just want to know if this is possible to jar files? thanks! | Unicode defines encoding of text. Jar is a binary compression/container format, so this doesn't make any sense. | How to make a file using UNICODE like Jar files? I just want to know if this is possible to jar files? thanks! | TITLE:
How to make a file using UNICODE like Jar files?
QUESTION:
I just want to know if this is possible to jar files? thanks!
ANSWER:
Unicode defines encoding of text. Jar is a binary compression/container format, so this doesn't make any sense. | [
"java"
] | 0 | 2 | 161 | 1 | 0 | 2011-06-10T13:18:37.517000 | 2011-06-10T13:30:54.207000 |
6,306,906 | 6,306,951 | Making a background of a UIViewController less "alpha" | I have an image that I want to use as the background of my UIViewController. I can add it as a UIView. The point is that I want to add some transparency to it. I don't want the image to be as opaque as the original image, because it has some graphics on it and would be way too distracting. So I want to make it faded, s... | you can set alpha of the uiview from the xib else you can use [self.view setAlpha:0.5] | Making a background of a UIViewController less "alpha" I have an image that I want to use as the background of my UIViewController. I can add it as a UIView. The point is that I want to add some transparency to it. I don't want the image to be as opaque as the original image, because it has some graphics on it and woul... | TITLE:
Making a background of a UIViewController less "alpha"
QUESTION:
I have an image that I want to use as the background of my UIViewController. I can add it as a UIView. The point is that I want to add some transparency to it. I don't want the image to be as opaque as the original image, because it has some graph... | [
"iphone",
"ios",
"uiview",
"uiviewcontroller"
] | 0 | 1 | 1,284 | 1 | 0 | 2011-06-10T13:19:32.657000 | 2011-06-10T13:23:29.230000 |
6,306,910 | 6,306,969 | Send email intent chooser | When I want to send some text with an email client on the device, is it possible to see what email client (e.g. Gmail or Yahoo mail) has been chosen before I set the email text in the intent? | Unfortunately, no. When you launch the chooser intent, it's up to the user to decide where to go/what to use. All data has to be set before launching the intent, and you have no control until the activity returns. In other words, you cannot affect the text of the message based on their choice in the dialog. | Send email intent chooser When I want to send some text with an email client on the device, is it possible to see what email client (e.g. Gmail or Yahoo mail) has been chosen before I set the email text in the intent? | TITLE:
Send email intent chooser
QUESTION:
When I want to send some text with an email client on the device, is it possible to see what email client (e.g. Gmail or Yahoo mail) has been chosen before I set the email text in the intent?
ANSWER:
Unfortunately, no. When you launch the chooser intent, it's up to the user ... | [
"android",
"email",
"android-intent",
"send"
] | 2 | 3 | 1,115 | 3 | 0 | 2011-06-10T13:20:07.837000 | 2011-06-10T13:25:00.990000 |
6,306,913 | 6,306,965 | Declaring a new static variable outside of Class | Is there a way declaring new static variables outside of that class even if it's not set in class? // Using this class as a static object. Class someclass { // There is no definition for static variables. }
// This can be initialized Class classA { public function __construct() { // Some codes goes here } }
/* Declar... | This can't be done, because static variables, well... are STATIC and therefore cannot be declared dynamically. EDIT: You might want to try using a registry. class Registry {
/** * * Array of instances * @var array */ private static $instances = array();
/** * * Returns an instance of a given class. * @param string $c... | Declaring a new static variable outside of Class Is there a way declaring new static variables outside of that class even if it's not set in class? // Using this class as a static object. Class someclass { // There is no definition for static variables. }
// This can be initialized Class classA { public function __con... | TITLE:
Declaring a new static variable outside of Class
QUESTION:
Is there a way declaring new static variables outside of that class even if it's not set in class? // Using this class as a static object. Class someclass { // There is no definition for static variables. }
// This can be initialized Class classA { pub... | [
"php",
"declaration",
"static-variables"
] | 5 | 2 | 2,365 | 2 | 0 | 2011-06-10T13:20:12.350000 | 2011-06-10T13:24:57.297000 |
6,306,920 | 6,307,056 | Table view inside a table view | In my app i am having a table view in which i am having buttons in which images are shown.Now what i want is that when i click on any image(button).then another table view has to be shown inside the first table view.Then i need to click on the images present in the second table view.How can i achieve that.Is it possibl... | It's definitely possible, but Apple advises not putting a UITableView inside another UITableView (it makes touch tracking and behavior significantly more complex). The best solution depends on your exact situation, but if the sub-view contains a lot of data, you can move it off into it's own modal view, or you can crea... | Table view inside a table view In my app i am having a table view in which i am having buttons in which images are shown.Now what i want is that when i click on any image(button).then another table view has to be shown inside the first table view.Then i need to click on the images present in the second table view.How c... | TITLE:
Table view inside a table view
QUESTION:
In my app i am having a table view in which i am having buttons in which images are shown.Now what i want is that when i click on any image(button).then another table view has to be shown inside the first table view.Then i need to click on the images present in the secon... | [
"objective-c",
"ipad",
"uiview",
"uitableview"
] | 0 | 2 | 525 | 1 | 0 | 2011-06-10T13:20:40.893000 | 2011-06-10T13:31:14.960000 |
6,306,924 | 6,307,074 | Why does the Application class (App) have both xaml and code behind files? | In WPF applications all the views are inherited from System.Windows.Window and have an associated xaml and codebehind file. That seems logical. However I'm confused that why does the App file, inherited from System.Windows.Application, have a xaml file? Although it is an application and not a view (It is not visible)? ... | However I'm confused that why does the App file, inherited from System.Windows.Application, have a xaml file? Although it is an application and not a view (It is not visible)? Remember that XAML is not a UI language, but a general declarative language. While it's true that it's mostly used to represent UI for WPF or Si... | Why does the Application class (App) have both xaml and code behind files? In WPF applications all the views are inherited from System.Windows.Window and have an associated xaml and codebehind file. That seems logical. However I'm confused that why does the App file, inherited from System.Windows.Application, have a xa... | TITLE:
Why does the Application class (App) have both xaml and code behind files?
QUESTION:
In WPF applications all the views are inherited from System.Windows.Window and have an associated xaml and codebehind file. That seems logical. However I'm confused that why does the App file, inherited from System.Windows.Appl... | [
"wpf",
"xaml"
] | 3 | 5 | 206 | 2 | 0 | 2011-06-10T13:21:25.340000 | 2011-06-10T13:32:59.990000 |
6,306,940 | 6,306,977 | File age in Java | I need to find the age of a file based on its name. Alle the files keep to a naming convention like this: DD-MM-YYYY. I can make a program to come up with the filenames based on how many days/months has passed etc, using the modulus operator, but i can't seem to wrap my head around how to calculate the age from the nam... | You can use a DateFormat to parse a date as well as format one. Untested: String name = file.getName(); String datePortion = /*extract date portion*/;
DateFormat fmt = new SimpleDateFormat("dd-MM-yyyy"); Date fileDate = fmt.parse(datePortion); long msBetweenDates = new Date().getTime() - fileDate.getTime(); How you ex... | File age in Java I need to find the age of a file based on its name. Alle the files keep to a naming convention like this: DD-MM-YYYY. I can make a program to come up with the filenames based on how many days/months has passed etc, using the modulus operator, but i can't seem to wrap my head around how to calculate the... | TITLE:
File age in Java
QUESTION:
I need to find the age of a file based on its name. Alle the files keep to a naming convention like this: DD-MM-YYYY. I can make a program to come up with the filenames based on how many days/months has passed etc, using the modulus operator, but i can't seem to wrap my head around ho... | [
"java",
"file",
"modulo"
] | 2 | 8 | 5,839 | 2 | 0 | 2011-06-10T13:22:28.257000 | 2011-06-10T13:25:46.837000 |
6,306,949 | 6,307,099 | jQuery: Give each form field a chronological increasing number | There is a dynamically generated form. For each form input field ('.questions'). I would like to show the number of the field(chronological). So the first field shows 1 the second 2 end so on. I think I've almost got it in this code, but now it give for each element every number so input field one =1234 and two=1234 wh... | Or you can use $('.questions').each(function(index) { var num = index + 1; $(' '+num+' ').insertBefore($(this)); }); The issue is that when you are using the insertBefore method, you are again selecting all the elements by using the '.questions' selector. Whereas you actually want to insert it just before the current e... | jQuery: Give each form field a chronological increasing number There is a dynamically generated form. For each form input field ('.questions'). I would like to show the number of the field(chronological). So the first field shows 1 the second 2 end so on. I think I've almost got it in this code, but now it give for eac... | TITLE:
jQuery: Give each form field a chronological increasing number
QUESTION:
There is a dynamically generated form. For each form input field ('.questions'). I would like to show the number of the field(chronological). So the first field shows 1 the second 2 end so on. I think I've almost got it in this code, but n... | [
"jquery",
"each",
"increment"
] | 0 | 1 | 282 | 2 | 0 | 2011-06-10T13:23:06.743000 | 2011-06-10T13:35:39.410000 |
6,306,961 | 6,307,048 | LEFT JOIN 3 columns to get username | I have three columns I need to join which comes from 3 different tables, Contributions table: +-----------+---------------------+ | record_id | contributor_user_id | +-----------+---------------------+ | 1 | 2 | +-----------+---------------------+ | 1 | 5 | +-----------+---------------------+ Members table: +----------... | Try nesting the join for contributing users inside of the left join to contributions. SELECT u.username, u.user_id, r.record_id, u2.username as ContributorName, u2.user_id as ContributorId FROM records r INNER JOIN members u ON r.user_id = u.user_id LEFT JOIN contributions c INNER JOIN members u2 ON c.contributor_user_... | LEFT JOIN 3 columns to get username I have three columns I need to join which comes from 3 different tables, Contributions table: +-----------+---------------------+ | record_id | contributor_user_id | +-----------+---------------------+ | 1 | 2 | +-----------+---------------------+ | 1 | 5 | +-----------+-------------... | TITLE:
LEFT JOIN 3 columns to get username
QUESTION:
I have three columns I need to join which comes from 3 different tables, Contributions table: +-----------+---------------------+ | record_id | contributor_user_id | +-----------+---------------------+ | 1 | 2 | +-----------+---------------------+ | 1 | 5 | +-------... | [
"mysql",
"left-join"
] | 3 | 3 | 178 | 2 | 0 | 2011-06-10T13:24:26.197000 | 2011-06-10T13:30:47.170000 |
6,306,992 | 6,307,022 | file path using C# | I have a windows service which is using a method from a class library with same asp.net solution. in class library, I have a method with following line: reader = XmlReader.Create(HttpContext.Current.Server.MapPath("~/TestDevice/Data.xml"), settings); When control comes to this line. I get exception. I tried to debug th... | http://msdn.microsoft.com/en-us/library/aa457089.aspx string path; path = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase ); | file path using C# I have a windows service which is using a method from a class library with same asp.net solution. in class library, I have a method with following line: reader = XmlReader.Create(HttpContext.Current.Server.MapPath("~/TestDevice/Data.xml"), settings); When control comes to this line. I get exception. ... | TITLE:
file path using C#
QUESTION:
I have a windows service which is using a method from a class library with same asp.net solution. in class library, I have a method with following line: reader = XmlReader.Create(HttpContext.Current.Server.MapPath("~/TestDevice/Data.xml"), settings); When control comes to this line.... | [
"c#",
"asp.net",
"windows-services"
] | 1 | 3 | 2,573 | 3 | 0 | 2011-06-10T13:26:42.817000 | 2011-06-10T13:29:02.343000 |
6,306,994 | 6,307,909 | Validation to site.domain fieald | I import from django.contrib.sites.models import Site in models.py file. In have this following in admin.py file: class SitesAdmin(admin.ModelAdmin): pass
admin.site.unregister(Site) admin.site.register(Site, SitesAdmin)** I want to attach validation to the site.domain field in admin.py, How i can accomplish this? ple... | First, specifying an empty ModelAdmin class is unnecessary, the following will work if you don't need to customize the admin: admin.site.register(Site) # Notice that no ModelAdmin is passed Now, to your question. You have to create a custom form. Then, you override the clean_domain method of the ModelForm. You can vali... | Validation to site.domain fieald I import from django.contrib.sites.models import Site in models.py file. In have this following in admin.py file: class SitesAdmin(admin.ModelAdmin): pass
admin.site.unregister(Site) admin.site.register(Site, SitesAdmin)** I want to attach validation to the site.domain field in admin.p... | TITLE:
Validation to site.domain fieald
QUESTION:
I import from django.contrib.sites.models import Site in models.py file. In have this following in admin.py file: class SitesAdmin(admin.ModelAdmin): pass
admin.site.unregister(Site) admin.site.register(Site, SitesAdmin)** I want to attach validation to the site.domai... | [
"python",
"django"
] | 0 | 1 | 81 | 1 | 0 | 2011-06-10T13:26:43.440000 | 2011-06-10T14:39:46.473000 |
6,306,998 | 6,307,014 | How to set custom template for home page? | I've tried to set 1column template for home page using my local.xml file: But this is doesn't work. How can I do this? | Homepage is a CMS page. Unfortunately, you can't assign root template for CMS pages using layout, because they have own attribute "root_template" (cms_page table). You can change this attribute in the backend (CMS - Pages). Or you can change it in code: $homePage = Mage::getModel('cms/page')->load('home', 'identifier')... | How to set custom template for home page? I've tried to set 1column template for home page using my local.xml file: But this is doesn't work. How can I do this? | TITLE:
How to set custom template for home page?
QUESTION:
I've tried to set 1column template for home page using my local.xml file: But this is doesn't work. How can I do this?
ANSWER:
Homepage is a CMS page. Unfortunately, you can't assign root template for CMS pages using layout, because they have own attribute "r... | [
"layout",
"magento"
] | 1 | 3 | 2,234 | 3 | 0 | 2011-06-10T13:27:16.887000 | 2011-06-10T13:28:17.870000 |
6,307,006 | 6,308,677 | How can I use a WinForms PropertyGrid to edit a list of strings? | In my application I have a property grid to allow users to change settings. This works fine for strings and other value properties, but what I need now is a list of strings that can be edited by users. The problem is that if I have MyPropertyGrid.SelectedObject = new { Test = new List () }; in my code and the user atte... | Yes, you can specify an System.ComponentModel.Editor attribute on your list of strings, with StringCollectionEditor as the editor. You need to add a reference to System.Design.Dll to your project, in order for this to compile. Example, suppose your object is like this: [DefaultProperty("Name")] public class CustomObjec... | How can I use a WinForms PropertyGrid to edit a list of strings? In my application I have a property grid to allow users to change settings. This works fine for strings and other value properties, but what I need now is a list of strings that can be edited by users. The problem is that if I have MyPropertyGrid.Selected... | TITLE:
How can I use a WinForms PropertyGrid to edit a list of strings?
QUESTION:
In my application I have a property grid to allow users to change settings. This works fine for strings and other value properties, but what I need now is a list of strings that can be edited by users. The problem is that if I have MyPro... | [
"c#",
"string",
"winforms",
"propertygrid"
] | 23 | 52 | 20,964 | 3 | 0 | 2011-06-10T13:27:54.323000 | 2011-06-10T15:35:30.983000 |
6,307,011 | 6,307,085 | JPA Hibernate Maven testing --> unknown class | I'm trying to run a simple dataImport class which is using JPA and Hibernate. If I run my class, i always have the following error: Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: ch.itartis.relman.entities.code.ReferenceCode at org.hibernate.ejb.AbstractEntityManagerImpl.persist(Abstract... | You are running the code from your own main method, which I am guessing means it isn't being run by maven. The code in test is not included as part of the artifact generated by maven, it is only included during mavens test phase for running unit tests. If you are using maven, why not simply create JUnit tests that mave... | JPA Hibernate Maven testing --> unknown class I'm trying to run a simple dataImport class which is using JPA and Hibernate. If I run my class, i always have the following error: Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: ch.itartis.relman.entities.code.ReferenceCode at org.hibernate.... | TITLE:
JPA Hibernate Maven testing --> unknown class
QUESTION:
I'm trying to run a simple dataImport class which is using JPA and Hibernate. If I run my class, i always have the following error: Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: ch.itartis.relman.entities.code.ReferenceCode... | [
"java",
"hibernate",
"maven",
"jpa-2.0"
] | 0 | 3 | 851 | 2 | 0 | 2011-06-10T13:28:15.883000 | 2011-06-10T13:34:31.710000 |
6,307,012 | 6,307,013 | Visual Studio 2010 suddenly slow | Recently, the editor for VS2010 suddenly became slow when I installed some extensions then uninstalled them. The program itself is running fine and starts up in seconds. Jumping around the menus is lightning fast, but editing code, there is a 1 second lag between the keyboard and the editor. This happens on a brand new... | I would find a rollback point before you installed the plug ins. You could have malware that installed with the plugin but was not part of the uninstall. It could just be that the uninstall did not remove something it installed that was causing the problem. It is most likely going to be far faster for you to find a rol... | Visual Studio 2010 suddenly slow Recently, the editor for VS2010 suddenly became slow when I installed some extensions then uninstalled them. The program itself is running fine and starts up in seconds. Jumping around the menus is lightning fast, but editing code, there is a 1 second lag between the keyboard and the ed... | TITLE:
Visual Studio 2010 suddenly slow
QUESTION:
Recently, the editor for VS2010 suddenly became slow when I installed some extensions then uninstalled them. The program itself is running fine and starts up in seconds. Jumping around the menus is lightning fast, but editing code, there is a 1 second lag between the k... | [
"performance",
"visual-studio-2010",
"ide",
"editor"
] | 3 | 2 | 3,258 | 3 | 0 | 2011-06-10T10:57:45.177000 | 2011-06-10T11:57:28.067000 |
6,307,017 | 6,307,041 | use $(this) in ajax callback jquery | i'm doing a jQuery.post to a php file, and the file return's me a value. the question is: why the $(this) dosent work in the callback function? any alert passing something to show, using $(this), return's me null $(".class").live("focusout", function(){
jQuery.post("phpfile.php", { someValue: someValue }, function(dat... | In that case this is not the same object anymore. Save a reference before and use later: $(".class").live("focusout", function(){ var $this = $(this); jQuery.post("phpfile.php", { someValue: someValue }, function(data) { // 'this' inside this scope refers to xhr object (wrapped in jQuery object) var x = $this; } ) }); | use $(this) in ajax callback jquery i'm doing a jQuery.post to a php file, and the file return's me a value. the question is: why the $(this) dosent work in the callback function? any alert passing something to show, using $(this), return's me null $(".class").live("focusout", function(){
jQuery.post("phpfile.php", { ... | TITLE:
use $(this) in ajax callback jquery
QUESTION:
i'm doing a jQuery.post to a php file, and the file return's me a value. the question is: why the $(this) dosent work in the callback function? any alert passing something to show, using $(this), return's me null $(".class").live("focusout", function(){
jQuery.post... | [
"javascript",
"jquery"
] | 5 | 15 | 6,299 | 2 | 0 | 2011-06-10T13:28:37.150000 | 2011-06-10T13:30:28.830000 |
6,307,028 | 6,307,081 | Stop jQuery from repeating, example attached | I have to attach a jQuery to an invoice. Sometimes I have to print multiple invoices as once in a batch. When this happens my exact same jQuery appears for every invoice and it runs each time creating extra elements I do not need. Is there a way to have a jQuery that appears more then once only run once when it is the ... | Change your repeating template to include a check: Now it should run only once. Another thing to try, where we remove the classes as we go... | Stop jQuery from repeating, example attached I have to attach a jQuery to an invoice. Sometimes I have to print multiple invoices as once in a batch. When this happens my exact same jQuery appears for every invoice and it runs each time creating extra elements I do not need. Is there a way to have a jQuery that appears... | TITLE:
Stop jQuery from repeating, example attached
QUESTION:
I have to attach a jQuery to an invoice. Sometimes I have to print multiple invoices as once in a batch. When this happens my exact same jQuery appears for every invoice and it runs each time creating extra elements I do not need. Is there a way to have a j... | [
"jquery",
"repeat"
] | 0 | 1 | 1,127 | 1 | 0 | 2011-06-10T13:29:23.223000 | 2011-06-10T13:34:00.410000 |
6,307,036 | 6,307,990 | Every other Visual Studio "run test" attempt results in "Unable to start program QTAgent32.exe" | Whenever I run a test, and then try to run a test again, I get the following error: Failed to queue test run. Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'. If I run the test again after that, it proceeds as normal. In other words, I get this error every other t... | Apparently this is a known issue at Microsoft, according this Page it happens on 64bit systems while testing with Visual Studio 2010. The page also describes a number of workarounds you can try. | Every other Visual Studio "run test" attempt results in "Unable to start program QTAgent32.exe" Whenever I run a test, and then try to run a test again, I get the following error: Failed to queue test run. Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe'. If I run ... | TITLE:
Every other Visual Studio "run test" attempt results in "Unable to start program QTAgent32.exe"
QUESTION:
Whenever I run a test, and then try to run a test again, I get the following error: Failed to queue test run. Unable to start program 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent... | [
".net",
"visual-studio",
"visual-studio-2010",
".net-4.0"
] | 5 | 4 | 2,486 | 2 | 0 | 2011-06-10T13:30:09.617000 | 2011-06-10T14:45:19.153000 |
6,307,040 | 6,307,067 | Remove elements from array1 that are in array2 | I have arrays that looks like this: $array1 = array( 'peter@example.com' => array( 'peter' => 'Smith', ), 'john@example.com' => array( 'john' => 'Smith', ), 'louis@example.com' => array( 'louis' => 'Smith', ), 'jane@example.com' => array( 'jane' => 'Smith', ), );
$array2 = array( '0' => 'peter@example.com', '1' => 'jo... | As simple as: $diff = array_diff_key($array1, array_flip($array2)); | Remove elements from array1 that are in array2 I have arrays that looks like this: $array1 = array( 'peter@example.com' => array( 'peter' => 'Smith', ), 'john@example.com' => array( 'john' => 'Smith', ), 'louis@example.com' => array( 'louis' => 'Smith', ), 'jane@example.com' => array( 'jane' => 'Smith', ), );
$array2 ... | TITLE:
Remove elements from array1 that are in array2
QUESTION:
I have arrays that looks like this: $array1 = array( 'peter@example.com' => array( 'peter' => 'Smith', ), 'john@example.com' => array( 'john' => 'Smith', ), 'louis@example.com' => array( 'louis' => 'Smith', ), 'jane@example.com' => array( 'jane' => 'Smith... | [
"php",
"arrays"
] | 0 | 9 | 412 | 2 | 0 | 2011-06-10T13:30:27.680000 | 2011-06-10T13:32:05.623000 |
6,307,047 | 6,308,164 | Different folder as website subfolder | I need some help with URL rewriting. The case is similar with this one. I have a working Zend Framework site. Now I must add a blog in Wordpress (also working). I've chosen not to indulge in ZF controller-/action-/route-making; I've seen a couple of tutorials about this and I consider them too much for a "plain" redire... | www.site.com (points to /var/www/zf) www.site.com/blog (points to /var/www/wp) The easiset way to achive this, where you want a sub-url to point outside the VirtualHost's DocumentRoot directory, is to create an Alias... Inside the VirtualHost block add: Alias /blog /var/www/wp Options All AllowOverride All order allow,... | Different folder as website subfolder I need some help with URL rewriting. The case is similar with this one. I have a working Zend Framework site. Now I must add a blog in Wordpress (also working). I've chosen not to indulge in ZF controller-/action-/route-making; I've seen a couple of tutorials about this and I consi... | TITLE:
Different folder as website subfolder
QUESTION:
I need some help with URL rewriting. The case is similar with this one. I have a working Zend Framework site. Now I must add a blog in Wordpress (also working). I've chosen not to indulge in ZF controller-/action-/route-making; I've seen a couple of tutorials abou... | [
"apache",
"wordpress",
"zend-framework",
"mod-rewrite",
"virtualhost"
] | 27 | 60 | 60,881 | 2 | 0 | 2011-06-10T13:30:41.783000 | 2011-06-10T14:59:30.697000 |
6,307,049 | 6,309,014 | How to implement Multistate CheckBox in WPF for MVVM | I have a requirement for which i need a MultiState Checkboxes in WPF... Also as i am using MVVM so handling binding and Commands should follow the same as i will use it in my Views. I have seen a Multistate checkbox in DotnetNuke(made in ASP.NET) but how to make it in WPF some inputs in this regards will be helpful Som... | Checkboxes have specific functionality (checked, unchecked, and optionally indeterminate). Based on your comment, I would think it would be easiest to just do it as a button. I don't have time now to test out an actual example, but here some pseudocode to get you going: XAML ViewModel (leaving out MVVM implementation d... | How to implement Multistate CheckBox in WPF for MVVM I have a requirement for which i need a MultiState Checkboxes in WPF... Also as i am using MVVM so handling binding and Commands should follow the same as i will use it in my Views. I have seen a Multistate checkbox in DotnetNuke(made in ASP.NET) but how to make it i... | TITLE:
How to implement Multistate CheckBox in WPF for MVVM
QUESTION:
I have a requirement for which i need a MultiState Checkboxes in WPF... Also as i am using MVVM so handling binding and Commands should follow the same as i will use it in my Views. I have seen a Multistate checkbox in DotnetNuke(made in ASP.NET) bu... | [
"wpf",
"mvvm",
"checkbox"
] | 2 | 2 | 1,722 | 2 | 0 | 2011-06-10T13:30:49.737000 | 2011-06-10T16:01:55.050000 |
6,307,057 | 6,307,088 | How do I prevent a C# console application from taking priority as the active window? | I'm sorry if this has been asked but I cannot find an answer to it. I may not be searching the right terms. I have a console program that needs to be run in the background. The user needs the console to stay open white it runs, but need it to not become the active window when it starts. They would like to continue what... | You can programmatically minimize/restore console windows using below code: using System; using System.IO;
namespace ConsoleApplication1 { class Class1 { [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); private const int SW_MINIMIZE = 6; private... | How do I prevent a C# console application from taking priority as the active window? I'm sorry if this has been asked but I cannot find an answer to it. I may not be searching the right terms. I have a console program that needs to be run in the background. The user needs the console to stay open white it runs, but nee... | TITLE:
How do I prevent a C# console application from taking priority as the active window?
QUESTION:
I'm sorry if this has been asked but I cannot find an answer to it. I may not be searching the right terms. I have a console program that needs to be run in the background. The user needs the console to stay open whit... | [
"c#",
"console"
] | 6 | 6 | 668 | 2 | 0 | 2011-06-10T13:31:18.303000 | 2011-06-10T13:34:37.877000 |
6,307,058 | 6,309,226 | Adding Launch Checkboxes to MSI Installer | I am trying to achieve something like this: Run exe after msi installation? However my problem is that I need 2 check boxes to launch 2 different exes. I duplicated the code and attempted to make changes. Leaving me to wonder: What fields are unique to each checkbox? Or is it just not feasible? Partial js file: //First... | A checkbox control has multiple attributes unique to it, but you are mostly interested in the property name, property value and text. The checkbox property value is used to determine if the custom action which launches your file is executed or not. If you are encountering problems, you should offer more details about w... | Adding Launch Checkboxes to MSI Installer I am trying to achieve something like this: Run exe after msi installation? However my problem is that I need 2 check boxes to launch 2 different exes. I duplicated the code and attempted to make changes. Leaving me to wonder: What fields are unique to each checkbox? Or is it j... | TITLE:
Adding Launch Checkboxes to MSI Installer
QUESTION:
I am trying to achieve something like this: Run exe after msi installation? However my problem is that I need 2 check boxes to launch 2 different exes. I duplicated the code and attempted to make changes. Leaving me to wonder: What fields are unique to each ch... | [
"visual-studio-2008",
"windows-installer",
"setup-project",
"custom-action"
] | 0 | 0 | 1,158 | 1 | 0 | 2011-06-10T13:31:18.707000 | 2011-06-10T16:19:21.393000 |
6,307,070 | 6,307,090 | A question about class definition in C++ " : 1" | Possible Duplicate: What does 'unsigned temp:3' means I encountered a problem when I'm reading the code of Clang. class LangOptions { public: unsigned Trigraphs: 1; // Trigraphs in source files. unsigned BCPLComment: 1; // BCPL-style '//' comments.... }; This is the first time I saw the syntax ": 1", what's the ": 1" s... | It's a bitfield, which means that the value will only use one bit, instead of 32 (or whatever sizeof(unsigned) * is on your platform). Bitfields are useful for writing compact binary data structures, although they come with some performance cost as the compiler/CPU cannot update a single bit, but needs to perform AND/O... | A question about class definition in C++ " : 1" Possible Duplicate: What does 'unsigned temp:3' means I encountered a problem when I'm reading the code of Clang. class LangOptions { public: unsigned Trigraphs: 1; // Trigraphs in source files. unsigned BCPLComment: 1; // BCPL-style '//' comments.... }; This is the first... | TITLE:
A question about class definition in C++ " : 1"
QUESTION:
Possible Duplicate: What does 'unsigned temp:3' means I encountered a problem when I'm reading the code of Clang. class LangOptions { public: unsigned Trigraphs: 1; // Trigraphs in source files. unsigned BCPLComment: 1; // BCPL-style '//' comments.... };... | [
"c++",
"clang"
] | 8 | 7 | 178 | 3 | 0 | 2011-06-10T13:32:41.887000 | 2011-06-10T13:34:39.223000 |
6,307,075 | 6,307,108 | How to insert 3 arrays into 2 MySql tables? | I have 3 simple arrays with same number of items $id= array(1, 2, 3, 4, 5); $fruit= array('apple', 'banana', 'ananas', 'orange', 'lemon'); $price= array(32, 54, 26, 97, 47); I have two MySql tables. First table 'fruits' which contain rows 'id' and 'name' and second table 'prices' which contain rows 'fruit' and 'price'.... | $id= array(1, 2, 3, 4, 5); $fruit= array('apple', 'banana', 'ananas', 'orange', 'lemon'); $price= array(32, 54, 26, 97, 47);
foreach($fruit as $key => $fruitName) { $query = ' INSERT INTO fruits (id, name) VALUES ('.$id[$key].', '.$fruit[$key].') '; // execute $query = ' INSERT INTO prices (id, price) VALUES ('.$id[$k... | How to insert 3 arrays into 2 MySql tables? I have 3 simple arrays with same number of items $id= array(1, 2, 3, 4, 5); $fruit= array('apple', 'banana', 'ananas', 'orange', 'lemon'); $price= array(32, 54, 26, 97, 47); I have two MySql tables. First table 'fruits' which contain rows 'id' and 'name' and second table 'pri... | TITLE:
How to insert 3 arrays into 2 MySql tables?
QUESTION:
I have 3 simple arrays with same number of items $id= array(1, 2, 3, 4, 5); $fruit= array('apple', 'banana', 'ananas', 'orange', 'lemon'); $price= array(32, 54, 26, 97, 47); I have two MySql tables. First table 'fruits' which contain rows 'id' and 'name' and... | [
"php",
"mysql",
"arrays",
"foreach",
"insert-update"
] | 0 | 6 | 262 | 2 | 0 | 2011-06-10T13:33:01.690000 | 2011-06-10T13:36:22.343000 |
6,307,836 | 6,307,878 | Fatal error: cannot mkdir R_TempDir | When attempting to run R, I get this error: Fatal error: cannot mkdir R_TempDir I found two possible fixes for this problem by googling around. The first was to ensure my tmp directory didn't contain a load of subdirectories - it doesn't and it's virtually empty. The second fix was to ensure that TMP, TMPDIR, and R_USE... | Your default temporary directory appears to have the wrong permissions. Here I have $ ls -ld /tmp drwxrwxrwt 22 root root 4096 2011-06-10 09:17 /tmp The key part is 'everybody' can read or write. You need that too. It certainly can contain subdirectories. Are you running something like AppArmor or SE Linux? Edit 2011-0... | Fatal error: cannot mkdir R_TempDir When attempting to run R, I get this error: Fatal error: cannot mkdir R_TempDir I found two possible fixes for this problem by googling around. The first was to ensure my tmp directory didn't contain a load of subdirectories - it doesn't and it's virtually empty. The second fix was t... | TITLE:
Fatal error: cannot mkdir R_TempDir
QUESTION:
When attempting to run R, I get this error: Fatal error: cannot mkdir R_TempDir I found two possible fixes for this problem by googling around. The first was to ensure my tmp directory didn't contain a load of subdirectories - it doesn't and it's virtually empty. Th... | [
"r"
] | 26 | 24 | 33,730 | 10 | 0 | 2011-06-10T14:34:27.353000 | 2011-06-10T14:37:29.653000 |
6,307,859 | 6,307,953 | why 32 bit drivers do not work on 64 bit | From past readings it seems most 32 bit drivers won't work on 64 bit. At a purely conceptual level, I see a 64 bit machine as having extra 'room' when using 32 bit drivers so am trying to determine why most often they will not work. (me coming from user-space) I have read this wiki article on x86-64 which states Pushes... | Put simply, you can't store a 64-bit address in a 32-bit pointer. So if your code involves passing pointers back and forth to the operating system, as device drivers typically do, it's not going to end well. Drivers are often about moving data between phyiscal devices (eg, a disk) and memory. The driver will be asked t... | why 32 bit drivers do not work on 64 bit From past readings it seems most 32 bit drivers won't work on 64 bit. At a purely conceptual level, I see a 64 bit machine as having extra 'room' when using 32 bit drivers so am trying to determine why most often they will not work. (me coming from user-space) I have read this w... | TITLE:
why 32 bit drivers do not work on 64 bit
QUESTION:
From past readings it seems most 32 bit drivers won't work on 64 bit. At a purely conceptual level, I see a 64 bit machine as having extra 'room' when using 32 bit drivers so am trying to determine why most often they will not work. (me coming from user-space) ... | [
"x86",
"64-bit",
"x86-64",
"cpu-architecture"
] | 7 | 7 | 16,962 | 4 | 0 | 2011-06-10T14:36:11.650000 | 2011-06-10T14:43:06.073000 |
6,307,866 | 6,308,010 | How to clean a data file from binary junk? | I have this data file, which is supposed to be a normal ASCII file. However, it has some junk in the end of the first line. It only shows when I look at it with vi or less --> y mon d h XX11 XX22 XX33 XX44 XX55 XX66^@ 2011 6 6 10 14.0 15.5 14.3 11.3 16.2 16.1 grep is also saying that it's a binary file: Binary file dat... | Grep is trying to be smart and, when it sees an unprintable character, switches to "binary" mode. Add "-a" or "--text" to force grep to stay in "text" mode. As for sed, try sed -e 's/\([^ -~]*\)//g', which says, "change everything not between space and tilde (chars 0x20 and 0x7E, respectively) into nothing". That'll st... | How to clean a data file from binary junk? I have this data file, which is supposed to be a normal ASCII file. However, it has some junk in the end of the first line. It only shows when I look at it with vi or less --> y mon d h XX11 XX22 XX33 XX44 XX55 XX66^@ 2011 6 6 10 14.0 15.5 14.3 11.3 16.2 16.1 grep is also sayi... | TITLE:
How to clean a data file from binary junk?
QUESTION:
I have this data file, which is supposed to be a normal ASCII file. However, it has some junk in the end of the first line. It only shows when I look at it with vi or less --> y mon d h XX11 XX22 XX33 XX44 XX55 XX66^@ 2011 6 6 10 14.0 15.5 14.3 11.3 16.2 16.1... | [
"linux",
"perl",
"file",
"binary"
] | 0 | 1 | 1,652 | 5 | 0 | 2011-06-10T14:36:37.617000 | 2011-06-10T14:47:04.580000 |
6,307,879 | 6,308,250 | Finding the position of occurring of a node whose attributes values we have in AS3 | I have an XML I have the value of id as section02_05. How can I find the position of corresponding p node using XML or E4X. Assume that the root node for this. | If have understand your question, you can use the method childIndex var xml:XML= trace(xml.p.(@id=="section02_05").childIndex()) | Finding the position of occurring of a node whose attributes values we have in AS3 I have an XML I have the value of id as section02_05. How can I find the position of corresponding p node using XML or E4X. Assume that the root node for this. | TITLE:
Finding the position of occurring of a node whose attributes values we have in AS3
QUESTION:
I have an XML I have the value of id as section02_05. How can I find the position of corresponding p node using XML or E4X. Assume that the root node for this.
ANSWER:
If have understand your question, you can use the ... | [
"xml",
"flash",
"actionscript-3"
] | 1 | 3 | 777 | 2 | 0 | 2011-06-10T14:37:32.153000 | 2011-06-10T15:05:48.770000 |
6,307,885 | 6,307,966 | jquery show/hide function | i've used the JQuery function show_hide to hide a box and then display it when the link is clicked. This all works fine. If i wanted to hide a second box's i would simply re-write the function and rename the class and function (simplest way of doing it), However say i have a table, and the content of the table loops th... | You could use next() like this: $('.show_hide').click(function(e){ e.preventDefault(); $(this).next(".SlidingDiv").slideToggle(); }); example: http://jsfiddle.net/niklasvh/sx5TM/ | jquery show/hide function i've used the JQuery function show_hide to hide a box and then display it when the link is clicked. This all works fine. If i wanted to hide a second box's i would simply re-write the function and rename the class and function (simplest way of doing it), However say i have a table, and the con... | TITLE:
jquery show/hide function
QUESTION:
i've used the JQuery function show_hide to hide a box and then display it when the link is clicked. This all works fine. If i wanted to hide a second box's i would simply re-write the function and rename the class and function (simplest way of doing it), However say i have a ... | [
"jquery"
] | 0 | 2 | 738 | 2 | 0 | 2011-06-10T14:38:17.650000 | 2011-06-10T14:43:55.317000 |
6,307,904 | 6,308,312 | How can I calculate differences (luminosity, brightness, color) between two colors? | How can I calculate the luminosity contrast ratio, the difference in brightness, and the difference in color between two given colors? Example: Input color 1: #99ccff color 2: #225588 Output luminosity contrast ratio: 4.57: 1 difference in brightness: 119 difference in color: 357 | Convert each colour from (R, G, B) to (H, S, V) [or (H, S, L)] coordinates. You can find formulae at Wikipedia. I have written Pascal functions for this: function RGBToHSV(const Color: TRGB): THSV; var cmax, cmin, cdiff: real; begin cmax:= MaxComponent(Color); cmin:= MinComponent(Color); cdiff:= cmax - cmin;
with Colo... | How can I calculate differences (luminosity, brightness, color) between two colors? How can I calculate the luminosity contrast ratio, the difference in brightness, and the difference in color between two given colors? Example: Input color 1: #99ccff color 2: #225588 Output luminosity contrast ratio: 4.57: 1 difference... | TITLE:
How can I calculate differences (luminosity, brightness, color) between two colors?
QUESTION:
How can I calculate the luminosity contrast ratio, the difference in brightness, and the difference in color between two given colors? Example: Input color 1: #99ccff color 2: #225588 Output luminosity contrast ratio: ... | [
"math",
"colors",
"brightness"
] | 1 | 1 | 1,271 | 1 | 0 | 2011-06-10T14:39:23.307000 | 2011-06-10T15:10:35.880000 |
6,307,907 | 6,309,164 | Hudson won't execute windows batch commands after running a .bat script | In hudson, after running a.bat script my slave refuses to run anything that comes afterward. It instead just said that it finished with a success. | Trying do a call yourscript.bat instead of just a yourscript.bat | Hudson won't execute windows batch commands after running a .bat script In hudson, after running a.bat script my slave refuses to run anything that comes afterward. It instead just said that it finished with a success. | TITLE:
Hudson won't execute windows batch commands after running a .bat script
QUESTION:
In hudson, after running a.bat script my slave refuses to run anything that comes afterward. It instead just said that it finished with a success.
ANSWER:
Trying do a call yourscript.bat instead of just a yourscript.bat | [
"batch-file",
"automation",
"hudson"
] | 1 | 2 | 1,026 | 1 | 0 | 2011-06-10T14:39:45.477000 | 2011-06-10T16:14:19.840000 |
6,307,915 | 6,307,987 | How do I make draggable divs with different functions? | I have four divs that are draggable. And a div where I drop the daggable divs. My code is basically just an API I've downloaded and modify a little form jQuery's sites. My problem is that all the divs have the same function when they are dropped. How can I make individual functions to individual divs? It looks like thi... | In your 'if' statements you need to do something like: if(ui.draggable.attr('id') === 'draggable') { // do stuff } | How do I make draggable divs with different functions? I have four divs that are draggable. And a div where I drop the daggable divs. My code is basically just an API I've downloaded and modify a little form jQuery's sites. My problem is that all the divs have the same function when they are dropped. How can I make ind... | TITLE:
How do I make draggable divs with different functions?
QUESTION:
I have four divs that are draggable. And a div where I drop the daggable divs. My code is basically just an API I've downloaded and modify a little form jQuery's sites. My problem is that all the divs have the same function when they are dropped. ... | [
"jquery-ui",
"jquery-plugins",
"drag-and-drop",
"draggable",
"jquery-ui-droppable"
] | 1 | 0 | 130 | 1 | 0 | 2011-06-10T14:40:06.350000 | 2011-06-10T14:45:14.240000 |
6,307,926 | 6,308,028 | Calling a Java Web Service from a .Net Project - Handling arrays | I am trying to call some web services written in Java from my asp.net code. I don't know Java. There are several methods each with multiple properties. These methods are then passed to one controlling method. The problem occurs with how to handle arrays. I cannot seem to get the syntax quite right. For example, there c... | int length =...; WebReferenceMERegistration.Locations[] _myLocations = new WebReferenceMERegistration.Locations[length]; | Calling a Java Web Service from a .Net Project - Handling arrays I am trying to call some web services written in Java from my asp.net code. I don't know Java. There are several methods each with multiple properties. These methods are then passed to one controlling method. The problem occurs with how to handle arrays. ... | TITLE:
Calling a Java Web Service from a .Net Project - Handling arrays
QUESTION:
I am trying to call some web services written in Java from my asp.net code. I don't know Java. There are several methods each with multiple properties. These methods are then passed to one controlling method. The problem occurs with how ... | [
"java",
"asp.net",
"arrays",
"service"
] | 0 | 0 | 215 | 1 | 0 | 2011-06-10T14:40:38.863000 | 2011-06-10T14:48:53.780000 |
6,307,934 | 6,307,988 | Is there a disadvantage of using `display:table-cell`on divs? | What I am trying to accomplish is having a fixed-width first div and a fluid second div which will fill up the rest width of the parent div's width. some content some more content and on this one everything seems alright and fluid. some content some more content I want to go ahead with the second one but i feel like th... | display: table-cell is perfectly fine to use, with just one downside.. It doesn't work in IE7 (or IE6, but who cares?): http://caniuse.com/#search=css-table If you don't need to support IE7, then feel free to use it. IE7 still has some usage, but you should check your Analytics, and then make a decision. To answer your... | Is there a disadvantage of using `display:table-cell`on divs? What I am trying to accomplish is having a fixed-width first div and a fluid second div which will fill up the rest width of the parent div's width. some content some more content and on this one everything seems alright and fluid. some content some more con... | TITLE:
Is there a disadvantage of using `display:table-cell`on divs?
QUESTION:
What I am trying to accomplish is having a fixed-width first div and a fluid second div which will fill up the rest width of the parent div's width. some content some more content and on this one everything seems alright and fluid. some con... | [
"html",
"css",
"css-float",
"tablecell"
] | 17 | 31 | 20,910 | 4 | 0 | 2011-06-10T14:41:10.917000 | 2011-06-10T14:45:14.527000 |
6,307,937 | 6,307,995 | Problems using MERGE INTO statements in php for a MySQL database | I'm trying to use a MERGE INTO statement in my php file to update or insert into a MySQL database for a multiplayer game. Here's a full description of what I'm trying to accomplish: The php file is called with the following line from a javascript file: xmlhttp.open('GET', "phpsqlajax_genxml.php?" + "lat=" + lla[0] + "&... | PHP's database libraries invariably have their various function calls return FALSE if anything failed during the call. Assuming you're on mysql_ /mysqli_, then you shoudl be doing something like this: $sql = "MERGE INTO...."; $result = mysql_query($sql); if ($result === FALSE) { die(mysql_error()); } It is poor practic... | Problems using MERGE INTO statements in php for a MySQL database I'm trying to use a MERGE INTO statement in my php file to update or insert into a MySQL database for a multiplayer game. Here's a full description of what I'm trying to accomplish: The php file is called with the following line from a javascript file: xm... | TITLE:
Problems using MERGE INTO statements in php for a MySQL database
QUESTION:
I'm trying to use a MERGE INTO statement in my php file to update or insert into a MySQL database for a multiplayer game. Here's a full description of what I'm trying to accomplish: The php file is called with the following line from a j... | [
"php",
"mysql",
"database",
"merge"
] | 1 | 4 | 753 | 1 | 0 | 2011-06-10T14:41:51.813000 | 2011-06-10T14:45:35.783000 |
6,307,941 | 6,308,043 | Confusion with the GO statement, uncommitted transactions and alter procedure | I would like to get to the bottom of this because it's confusing me. Can anyone explain when I should use the GO statement in my scripts? As I understand it the GO statement is not part of the T-SQL language, instead it is used to send a batch of statements to SQL server for processing. When I run the following script ... | In your first script, COMMIT is part of the stored procedure... The BEGIN and END in the stored proc do not define the scope (start+finish of the stored proc body): the batch does, which is the next GO (or end of script) So, changing spacing and adding comments BEGIN TRANSACTION; GO --start of batch. This comment is pa... | Confusion with the GO statement, uncommitted transactions and alter procedure I would like to get to the bottom of this because it's confusing me. Can anyone explain when I should use the GO statement in my scripts? As I understand it the GO statement is not part of the T-SQL language, instead it is used to send a batc... | TITLE:
Confusion with the GO statement, uncommitted transactions and alter procedure
QUESTION:
I would like to get to the bottom of this because it's confusing me. Can anyone explain when I should use the GO statement in my scripts? As I understand it the GO statement is not part of the T-SQL language, instead it is u... | [
"sql",
"sql-server-2005",
"sql-server-2008"
] | 2 | 5 | 4,944 | 2 | 0 | 2011-06-10T14:42:08.407000 | 2011-06-10T14:50:13.167000 |
6,307,948 | 6,307,999 | How can I find the last visible <td> in a table? | I am using a table with one row and several s inside it and am using hide/show on td s. Every td has a unique id. Is there any way to recognize the last visible td from that table? | Yes, that's pretty trivial with jQuery $('td:visible:last') See this fiddle | How can I find the last visible <td> in a table? I am using a table with one row and several s inside it and am using hide/show on td s. Every td has a unique id. Is there any way to recognize the last visible td from that table? | TITLE:
How can I find the last visible <td> in a table?
QUESTION:
I am using a table with one row and several s inside it and am using hide/show on td s. Every td has a unique id. Is there any way to recognize the last visible td from that table?
ANSWER:
Yes, that's pretty trivial with jQuery $('td:visible:last') See... | [
"javascript",
"jquery",
"html",
"extjs",
"html-table"
] | 3 | 4 | 1,347 | 2 | 0 | 2011-06-10T14:42:42.493000 | 2011-06-10T14:46:08.613000 |
6,307,954 | 6,308,447 | How to expose a property from a fluent interface with boost::python? | I have a C++ class which presents a fluent interface, something like: class Foo { public: int bar() const { return m_bar; }; Foo& bar(int value) { m_bar = value; return *this; };
private: int m_bar; }; I'd like to wrap the bar() functions as a property in my Python class. So I wrote: class_ ("Foo").add_property( "bar"... | I ended up writting the following template function: template void make_nonfluent_setter(BaseClass& self, T value) { (self.*method)(value); } And now I can type: class_ ("Foo").add_property( "bar", (int (Foo::*)())&Foo::bar, make_nonfluent_setter ); And it works fine:) | How to expose a property from a fluent interface with boost::python? I have a C++ class which presents a fluent interface, something like: class Foo { public: int bar() const { return m_bar; }; Foo& bar(int value) { m_bar = value; return *this; };
private: int m_bar; }; I'd like to wrap the bar() functions as a proper... | TITLE:
How to expose a property from a fluent interface with boost::python?
QUESTION:
I have a C++ class which presents a fluent interface, something like: class Foo { public: int bar() const { return m_bar; }; Foo& bar(int value) { m_bar = value; return *this; };
private: int m_bar; }; I'd like to wrap the bar() fun... | [
"c++",
"python",
"boost-python"
] | 1 | 2 | 463 | 1 | 0 | 2011-06-10T14:43:07.837000 | 2011-06-10T15:20:47.130000 |
6,307,969 | 6,308,430 | Android update SQLite with GSON response ... how should I parse nested JSON? | I have tried to figure this out on my own... starting with two excellent tutorials on GSON parsing from High-Speed Blog and Java Code Geeks. Several [answers] (http://stackoverflow.com/questions/3763937/gson-and-deserializing-an-array-of-objects-with-arrays-in-it/6300251#6300251) on stackoverflow are relevant, but I ne... | Gson doesn't know that you want to bind the jsonPlots.PlantArray attribute to the "Plants" JSON element, because the names don't match and there isn't any configuration information (e.g., @SerializedName("Plants") ) to otherwise let Gson know to bind them. | Android update SQLite with GSON response ... how should I parse nested JSON? I have tried to figure this out on my own... starting with two excellent tutorials on GSON parsing from High-Speed Blog and Java Code Geeks. Several [answers] (http://stackoverflow.com/questions/3763937/gson-and-deserializing-an-array-of-objec... | TITLE:
Android update SQLite with GSON response ... how should I parse nested JSON?
QUESTION:
I have tried to figure this out on my own... starting with two excellent tutorials on GSON parsing from High-Speed Blog and Java Code Geeks. Several [answers] (http://stackoverflow.com/questions/3763937/gson-and-deserializing... | [
"android",
"sqlite",
"arraylist",
"gson"
] | 1 | 1 | 2,323 | 1 | 0 | 2011-06-10T14:44:03.263000 | 2011-06-10T15:19:33.853000 |
6,307,971 | 6,308,006 | Force close a stream | I have an issue from time to time, I have a few StreamReader s and StreamWriter s in my program that read info and write it. They go right about 99% of the time, but once in a while I end up with a StreamWriter that won't close, on a piece of code I've run multiple times. This tends to happen if I spam a function, but ... | try a using statement MSDN using (StreamWriter stream = new StreamWriter(Initialization)){
//your code
} this can be useful: Closing Stream Read and Stream Writer when the form exits Also you could use a Try Block try { //Declare your streamwriter StreamWriter sw = new StreamWriter(Initialization); } catch { //Handle... | Force close a stream I have an issue from time to time, I have a few StreamReader s and StreamWriter s in my program that read info and write it. They go right about 99% of the time, but once in a while I end up with a StreamWriter that won't close, on a piece of code I've run multiple times. This tends to happen if I ... | TITLE:
Force close a stream
QUESTION:
I have an issue from time to time, I have a few StreamReader s and StreamWriter s in my program that read info and write it. They go right about 99% of the time, but once in a while I end up with a StreamWriter that won't close, on a piece of code I've run multiple times. This ten... | [
"c#",
"io",
"filestream"
] | 4 | 3 | 2,255 | 3 | 0 | 2011-06-10T14:44:13.803000 | 2011-06-10T14:46:47.810000 |
6,307,972 | 6,308,482 | Where is this rogue white-space coming from? | This is a screenshot from Opera using FireFly. It clearly illustrates the padding (5px) and margin (0px) of the textbox. However, to the right of the textbox is an unidentified black space of approximately 10px that isn't HTML whitespace, td padding, textbox margin or anything else I can think of. The spacing also exis... | Even the best of us can blank completely... The reason for my problem is obviously that the width of the textbox isn't set to a width that will fill the td. Increasing the width fixed that problem. Setting it to 100% for some reason pushes it beyond the bounds of the td though, but that's a different problem. @Tim Post... | Where is this rogue white-space coming from? This is a screenshot from Opera using FireFly. It clearly illustrates the padding (5px) and margin (0px) of the textbox. However, to the right of the textbox is an unidentified black space of approximately 10px that isn't HTML whitespace, td padding, textbox margin or anythi... | TITLE:
Where is this rogue white-space coming from?
QUESTION:
This is a screenshot from Opera using FireFly. It clearly illustrates the padding (5px) and margin (0px) of the textbox. However, to the right of the textbox is an unidentified black space of approximately 10px that isn't HTML whitespace, td padding, textbo... | [
"css",
"opera",
"padding",
"margins"
] | 1 | 0 | 394 | 2 | 0 | 2011-06-10T14:44:14.007000 | 2011-06-10T15:23:23.567000 |
6,307,981 | 6,308,049 | CSS Child Selector | I understand the difference between child and descendants just fine. I am having an issue with the child selector however. Perhaps I am not understanding something correctly. Take the following HTML as an example. This is a 3 tier navigation menu. Menu Item 1 Menu Item 2 Sub Menu Item 1 Sub Menu Item 2 Sub Sub Menu Ite... | nav ul.menu > li {} /* main navigation items only */ correct #nav ul.menu > li > ul.sub-menu li {} /* the 2nd tier only */ wrong - You are selecting the ul.menu child li which has child ul.sub-menu, all the li elements under it. If you want to restrict it to that level only, use this: #nav ul.menu > li > ul.sub-menu > ... | CSS Child Selector I understand the difference between child and descendants just fine. I am having an issue with the child selector however. Perhaps I am not understanding something correctly. Take the following HTML as an example. This is a 3 tier navigation menu. Menu Item 1 Menu Item 2 Sub Menu Item 1 Sub Menu Item... | TITLE:
CSS Child Selector
QUESTION:
I understand the difference between child and descendants just fine. I am having an issue with the child selector however. Perhaps I am not understanding something correctly. Take the following HTML as an example. This is a 3 tier navigation menu. Menu Item 1 Menu Item 2 Sub Menu It... | [
"css",
"drop-down-menu",
"css-selectors"
] | 3 | 5 | 1,870 | 3 | 0 | 2011-06-10T14:44:57.070000 | 2011-06-10T14:50:34.017000 |
6,307,984 | 6,308,030 | "Simulating" a 64-bit integer with two 32-bit integers | I'm writing a very computationally intense procedure for a mobile device and I'm limited to 32-bit CPUs. In essence, I'm performing dot products of huge sets of data (>12k signed 16-bit integers). Floating point operations are just too slow, so I've been looking for a way to perform the same computation with integer ty... | I'm pretty sure that the JVM must support a 64-bit arithmetic long type, and if the platform doesn't support it, then the VM must emulate it. However, if you can't afford to use float for performance problems, then a JVM will probably destroy you. Most C and C++ implementations will provide 64-bit arithmetic emulated f... | "Simulating" a 64-bit integer with two 32-bit integers I'm writing a very computationally intense procedure for a mobile device and I'm limited to 32-bit CPUs. In essence, I'm performing dot products of huge sets of data (>12k signed 16-bit integers). Floating point operations are just too slow, so I've been looking fo... | TITLE:
"Simulating" a 64-bit integer with two 32-bit integers
QUESTION:
I'm writing a very computationally intense procedure for a mobile device and I'm limited to 32-bit CPUs. In essence, I'm performing dot products of huge sets of data (>12k signed 16-bit integers). Floating point operations are just too slow, so I'... | [
"java",
"c++",
"c",
"32bit-64bit",
"large-data-volumes"
] | 6 | 8 | 2,482 | 5 | 0 | 2011-06-10T14:45:04.493000 | 2011-06-10T14:49:07.380000 |
6,307,992 | 6,308,840 | "Best" way to integrate Django with an Ajax library | Obviously, horses for courses, but what are some good ways to integrate javascript libraries with one's Django application? I'm planning on using jQuery, mostly because it seems popular and looks powerful (but I'm open to other suggestions). Are there python-side libraries that are very helpful or essential? Or is it b... | On python side, I'd suggest to look at piston and tastypie. (Starting with AJAX + Django myself, I also found Dajax, but went with piston —felt more ‘unix-way’ for me, don't like these all-in-one solutions. Though piston wasn't updated for a long time now, so I'd recommend tastypie, which is actively maintained.) EDIT.... | "Best" way to integrate Django with an Ajax library Obviously, horses for courses, but what are some good ways to integrate javascript libraries with one's Django application? I'm planning on using jQuery, mostly because it seems popular and looks powerful (but I'm open to other suggestions). Are there python-side libr... | TITLE:
"Best" way to integrate Django with an Ajax library
QUESTION:
Obviously, horses for courses, but what are some good ways to integrate javascript libraries with one's Django application? I'm planning on using jQuery, mostly because it seems popular and looks powerful (but I'm open to other suggestions). Are ther... | [
"jquery",
"python",
"ajax",
"django",
"json"
] | 8 | 2 | 4,754 | 5 | 0 | 2011-06-10T14:45:28.643000 | 2011-06-10T15:48:26.923000 |
6,307,993 | 6,308,037 | Find the Checkbox in Sibling <td> and check it using jQuery | $('.answerlabel').click(function() { $(this).siblings('.answer').find('input:checkbox').attr("checked","checked"); }); There "answer" is one class and "answerlabel" another class.Both will be in same.But it is not working. Any suggestions.. Here is my HTML Code Product 5 Product Description 5 Price 5 | Try this to get the functionality: $('.answerlabel label').click(function(){ $(this).parents('.answerlabel:first').siblings('.answer').find('input:checkbox').attr("checked","checked"); }); | Find the Checkbox in Sibling <td> and check it using jQuery $('.answerlabel').click(function() { $(this).siblings('.answer').find('input:checkbox').attr("checked","checked"); }); There "answer" is one class and "answerlabel" another class.Both will be in same.But it is not working. Any suggestions.. Here is my HTML Cod... | TITLE:
Find the Checkbox in Sibling <td> and check it using jQuery
QUESTION:
$('.answerlabel').click(function() { $(this).siblings('.answer').find('input:checkbox').attr("checked","checked"); }); There "answer" is one class and "answerlabel" another class.Both will be in same.But it is not working. Any suggestions.. H... | [
"jquery"
] | 2 | 4 | 8,924 | 2 | 0 | 2011-06-10T14:45:32.617000 | 2011-06-10T14:49:42.040000 |
6,308,000 | 6,308,056 | Determine device public ip | Does anyone know how I could get the public ip address of an android device? I am trying to run a server socket (just experimenting with simple p2p). This requires informing the local and remote users of each others public ip. I did find this thread How to get IP address of the device from code? which contains a link t... | Just visit http://automation.whatismyip.com/n09230945.asp and scrape it? whatismyip.com is perfect for getting the IP, though the site requests you only hit it about once every 5 minutes. UPDATE FEB 2015 WhatIsMyIp now exposes a developer API that you can use. | Determine device public ip Does anyone know how I could get the public ip address of an android device? I am trying to run a server socket (just experimenting with simple p2p). This requires informing the local and remote users of each others public ip. I did find this thread How to get IP address of the device from co... | TITLE:
Determine device public ip
QUESTION:
Does anyone know how I could get the public ip address of an android device? I am trying to run a server socket (just experimenting with simple p2p). This requires informing the local and remote users of each others public ip. I did find this thread How to get IP address of ... | [
"android",
"networking"
] | 19 | 13 | 42,612 | 17 | 0 | 2011-06-10T14:46:24.910000 | 2011-06-10T14:50:51.500000 |
6,308,018 | 6,308,075 | Performance Implications of Using Spaces Instead of Tabs for Indentation | I currently use soft tabs (i.e. spaces) for indenting my Ruby code, if I were to use hard tabs would it increase the performance when the code is interpreted? I assume it's faster to read one tab character than parse 4 space characters (however negligible). | Do you have an idea of all the phases involved in interpreting from source? Only the very first one, lexical analysis, has to deal with whitespace, and in the case of whitespace, "deal with" means "ignore it". This phase only takes a tiny fraction of the total time, it's generally done using regular expression and pret... | Performance Implications of Using Spaces Instead of Tabs for Indentation I currently use soft tabs (i.e. spaces) for indenting my Ruby code, if I were to use hard tabs would it increase the performance when the code is interpreted? I assume it's faster to read one tab character than parse 4 space characters (however ne... | TITLE:
Performance Implications of Using Spaces Instead of Tabs for Indentation
QUESTION:
I currently use soft tabs (i.e. spaces) for indenting my Ruby code, if I were to use hard tabs would it increase the performance when the code is interpreted? I assume it's faster to read one tab character than parse 4 space char... | [
"ruby",
"coding-style"
] | 9 | 11 | 955 | 3 | 0 | 2011-06-10T14:47:48.130000 | 2011-06-10T14:52:14.690000 |
6,308,032 | 6,308,133 | How to approach this exercise? (C) | "Have a program request the user to enter an uppercase letter. Use nested loops to produce a pyramid pattern like this: A
ABA
ABCBA
ABCDCBA
ABCDEDCBA The pattern should extend to the character entered. For example, the preceding pattern would result from an input value of E." So far I've been doing this for a good ... | You are so close, you only need to take a breath and you'll see it. When you print out your character, it has to be done after this part while(ch2 < (ch-(rows-2))) { printf("%c", ch2); ch2++; } or it won't fall at the end of the string. What you need is another loop that starts at the character that's one below the las... | How to approach this exercise? (C) "Have a program request the user to enter an uppercase letter. Use nested loops to produce a pyramid pattern like this: A
ABA
ABCBA
ABCDCBA
ABCDEDCBA The pattern should extend to the character entered. For example, the preceding pattern would result from an input value of E." So f... | TITLE:
How to approach this exercise? (C)
QUESTION:
"Have a program request the user to enter an uppercase letter. Use nested loops to produce a pyramid pattern like this: A
ABA
ABCBA
ABCDCBA
ABCDEDCBA The pattern should extend to the character entered. For example, the preceding pattern would result from an input... | [
"c"
] | 3 | 1 | 2,150 | 4 | 0 | 2011-06-10T14:49:30.950000 | 2011-06-10T14:57:33.717000 |
6,308,033 | 6,308,111 | How to kill several child processes spawned from same parent? | For testing purpose I am running several (few 100s ) expect scripts. All are spawned from the same parent (sometimes its pid is 1 ). Is there any way to kill them at one stretch without changing their source code and without killing the parent process itself? Something like: [root@devx-csb4 expect_scripts] kill -9 All ... | Give them all a name with a common substring and use pkill(1) Use ps, get the parent process ID, and kill all the PIDs attached to the parent process. This is undesirable when the parent process is 1. Notice that your notion of using kill -9 pid= suffers from the same problem -- all the system daemon processes are chil... | How to kill several child processes spawned from same parent? For testing purpose I am running several (few 100s ) expect scripts. All are spawned from the same parent (sometimes its pid is 1 ). Is there any way to kill them at one stretch without changing their source code and without killing the parent process itself... | TITLE:
How to kill several child processes spawned from same parent?
QUESTION:
For testing purpose I am running several (few 100s ) expect scripts. All are spawned from the same parent (sometimes its pid is 1 ). Is there any way to kill them at one stretch without changing their source code and without killing the par... | [
"unix",
"process",
"kill"
] | 2 | 2 | 1,022 | 1 | 0 | 2011-06-10T14:49:32.353000 | 2011-06-10T14:55:48.623000 |
6,308,038 | 6,308,094 | Problem controlling the flow of an application | I have a Windows Forms application that I'm working on, but I'm having trouble when I start the application. The application should load saved information from a config file, and then check for new items. When I start the application, it starts looking for new items before it has finished loading saved items. Because o... | Is there any reason why the check is not in the constructor? public MainForm() { InitializeComponent(); a = new A(); a.ItemsFound += new A.NewItemsFoundEventHandler(a_FoundItems); a.ItemsLoaded += new A.ItemsLoadedEventHandler(a_ItemsLoaded); a.LoadItems(); a.CheckForUpdates(); } | Problem controlling the flow of an application I have a Windows Forms application that I'm working on, but I'm having trouble when I start the application. The application should load saved information from a config file, and then check for new items. When I start the application, it starts looking for new items before... | TITLE:
Problem controlling the flow of an application
QUESTION:
I have a Windows Forms application that I'm working on, but I'm having trouble when I start the application. The application should load saved information from a config file, and then check for new items. When I start the application, it starts looking fo... | [
"c#",
"windows",
"events",
"event-handling"
] | 1 | 2 | 58 | 2 | 0 | 2011-06-10T14:49:43.310000 | 2011-06-10T14:54:12.513000 |
6,308,051 | 6,308,090 | WCF Serialization Information outside class definition | Suppose this simple scenario: My client has an already working.net application and he/she wants to expose some functionality through WCF. So he gives me an assembly, containg a public class that exposes the followig method. OrderDetail GetOrderDetail (int orderId) // Suppose OrderDetail has {ProductId, Quantity, Amount... | Don't send the clients objects across the wire, create a DTO from the clients object containing only the information that you want to send and send that instead. This allows you to control exactly what information gets sent, and is in keeping with the WCF intentions of passing messages and not objects So create an Orde... | WCF Serialization Information outside class definition Suppose this simple scenario: My client has an already working.net application and he/she wants to expose some functionality through WCF. So he gives me an assembly, containg a public class that exposes the followig method. OrderDetail GetOrderDetail (int orderId) ... | TITLE:
WCF Serialization Information outside class definition
QUESTION:
Suppose this simple scenario: My client has an already working.net application and he/she wants to expose some functionality through WCF. So he gives me an assembly, containg a public class that exposes the followig method. OrderDetail GetOrderDet... | [
"wcf",
"datamember",
"datacontracts"
] | 3 | 4 | 329 | 2 | 0 | 2011-06-10T14:50:42.213000 | 2011-06-10T14:53:38.417000 |
6,308,053 | 6,308,280 | Nvigation within a GWT application | I intend to build a web application where users can enter their time every week and have been struggling to get my head around the concept of a single page in GWT that gets repainted with data depending on the user actions. After researching a lot on this site and google, I found one link that I would like to emulate b... | A single page application layout is actually quite easy to achieve. The first thing you do is define the general layout, using GWTs layout panels. For your layout, I'd suggest using a DockLayoutPanel. Content content = new Content(); Button switchContent = new Button(content); Navigation navigation = new Navigation(); ... | Nvigation within a GWT application I intend to build a web application where users can enter their time every week and have been struggling to get my head around the concept of a single page in GWT that gets repainted with data depending on the user actions. After researching a lot on this site and google, I found one ... | TITLE:
Nvigation within a GWT application
QUESTION:
I intend to build a web application where users can enter their time every week and have been struggling to get my head around the concept of a single page in GWT that gets repainted with data depending on the user actions. After researching a lot on this site and go... | [
"gwt",
"gwt-ext"
] | 0 | 0 | 443 | 2 | 0 | 2011-06-10T14:50:43.337000 | 2011-06-10T15:08:14.233000 |
6,308,054 | 6,309,471 | Why would you want to deploy a Web Service as a Web Role on Azure? | I was under the impression that a Web Service that should be run under a worker role. I just found out that a web service can be setup using the web role. What are the advantages to using one role over the other? | I answered a similar question here. Note that, even with a Web Role, you'll have your choice of hosting your web service via IIS or on your own with a Service Host. Back in March, there was an update to input port handling, so now you can spread your input ports out across your roles in any fashion you like, even havin... | Why would you want to deploy a Web Service as a Web Role on Azure? I was under the impression that a Web Service that should be run under a worker role. I just found out that a web service can be setup using the web role. What are the advantages to using one role over the other? | TITLE:
Why would you want to deploy a Web Service as a Web Role on Azure?
QUESTION:
I was under the impression that a Web Service that should be run under a worker role. I just found out that a web service can be setup using the web role. What are the advantages to using one role over the other?
ANSWER:
I answered a ... | [
"wcf",
"azure",
"azure-worker-roles",
"azure-web-roles"
] | 4 | 2 | 406 | 2 | 0 | 2011-06-10T14:50:49.923000 | 2011-06-10T16:38:39.533000 |
6,308,079 | 6,308,676 | Device AlphaBlend state in XNA 4.0 | I'm having a problem getting the BlendState on the graphics device to work properly and display the alpha blending correctly. In some cases you can see the leaves through other leaves, in other cases you cannot. And the trunk is also always obscured. I've tried so many different combinations of setting up the BlendStat... | First of all you want to either sort your geometry or use alpha-testing, because you cannot combine Z-buffer (aka: depth-buffer) based rendering with transparency. There is no way to "blend" a Z-buffer value - so it always uses the topmost value, blocking off the things behind, even when the colour you are rendering is... | Device AlphaBlend state in XNA 4.0 I'm having a problem getting the BlendState on the graphics device to work properly and display the alpha blending correctly. In some cases you can see the leaves through other leaves, in other cases you cannot. And the trunk is also always obscured. I've tried so many different combi... | TITLE:
Device AlphaBlend state in XNA 4.0
QUESTION:
I'm having a problem getting the BlendState on the graphics device to work properly and display the alpha blending correctly. In some cases you can see the leaves through other leaves, in other cases you cannot. And the trunk is also always obscured. I've tried so ma... | [
"xna",
"alphablending"
] | 0 | 4 | 3,754 | 1 | 0 | 2011-06-10T14:52:38.997000 | 2011-06-10T15:35:22.947000 |
6,308,087 | 6,309,060 | PHP / MySQL character encoding incompatible? | I'm having what I believe to be an encoding issue with a mysql connection from php, print shows the query fine, and if I run the printed query on phpmyadmin, it returns results, but comes back empty from my script, does anyone know where can I look to figure out what's going on? this is the offending query: SELECT id F... | This was apparently caused by differently encoded whitespace. | PHP / MySQL character encoding incompatible? I'm having what I believe to be an encoding issue with a mysql connection from php, print shows the query fine, and if I run the printed query on phpmyadmin, it returns results, but comes back empty from my script, does anyone know where can I look to figure out what's going... | TITLE:
PHP / MySQL character encoding incompatible?
QUESTION:
I'm having what I believe to be an encoding issue with a mysql connection from php, print shows the query fine, and if I run the printed query on phpmyadmin, it returns results, but comes back empty from my script, does anyone know where can I look to figur... | [
"php",
"mysql",
"character-encoding"
] | 0 | 0 | 338 | 2 | 0 | 2011-06-10T14:53:26.643000 | 2011-06-10T16:06:38.170000 |
6,308,089 | 6,308,152 | Added Row in Datatable not shown? | I've a simple code, here I add a row to my a datatable which is in my dataset: DigiLocalDataSet dataset = new DigiLocalDataSet();
DataRow newClientsRow = dataset.Tables["clients"].NewRow();
newClientsRow ["clientnr"] = "123"; newClientsRow ["name"] = "Pascal"; newClientsRow ["city"] = "London";
dataset.Tables["clien... | Your call to TableAdapter.Fill is filling your 'clients' DataTable with data retrieved from your data source, so you're losing the record you manually added to the DataTable. | Added Row in Datatable not shown? I've a simple code, here I add a row to my a datatable which is in my dataset: DigiLocalDataSet dataset = new DigiLocalDataSet();
DataRow newClientsRow = dataset.Tables["clients"].NewRow();
newClientsRow ["clientnr"] = "123"; newClientsRow ["name"] = "Pascal"; newClientsRow ["city"] ... | TITLE:
Added Row in Datatable not shown?
QUESTION:
I've a simple code, here I add a row to my a datatable which is in my dataset: DigiLocalDataSet dataset = new DigiLocalDataSet();
DataRow newClientsRow = dataset.Tables["clients"].NewRow();
newClientsRow ["clientnr"] = "123"; newClientsRow ["name"] = "Pascal"; newCl... | [
"c#",
"wpf",
"database",
"datatable",
"dataset"
] | 0 | 1 | 591 | 5 | 0 | 2011-06-10T14:53:29.487000 | 2011-06-10T14:58:46.953000 |
6,308,092 | 6,308,666 | Finder Methods Related Controllers | I have two controllers, orders and tasks - each order has many tasks. In my orders show view, I list all the related tasks for the order. My issue is that I want to restrict the output - eg. only list tasks with a status = 1 In my orders controller I tried this: @tasks = Task.find(:all,:conditions => [:status => '1']) ... | You really need to check query interface in rails 3 http://railscasts.com/episodes/202-active-record-queries-in-rails-3 http://railscasts.com/episodes/215-advanced-queries-in-rails-3 Btwn your solution is:- @tasks = Task.where(['status =? ', 0]) | Finder Methods Related Controllers I have two controllers, orders and tasks - each order has many tasks. In my orders show view, I list all the related tasks for the order. My issue is that I want to restrict the output - eg. only list tasks with a status = 1 In my orders controller I tried this: @tasks = Task.find(:al... | TITLE:
Finder Methods Related Controllers
QUESTION:
I have two controllers, orders and tasks - each order has many tasks. In my orders show view, I list all the related tasks for the order. My issue is that I want to restrict the output - eg. only list tasks with a status = 1 In my orders controller I tried this: @tas... | [
"ruby-on-rails-3"
] | 1 | 1 | 148 | 2 | 0 | 2011-06-10T14:54:03.147000 | 2011-06-10T15:34:49.530000 |
6,308,095 | 6,308,507 | Compiling all .c files in .obj files using GNU make and Microsoft Visual Studio compiler | can anyone tell me what is wrong with this code: CC = "C:\Program Files\Microsoft Visual Studio\VC98\Bin\CL.EXE" CFLAGS = /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(OBJ_PATH)\$(EXECUTABLE).pch" /YX /Fo"$(OBJ_PATH)\\" /Fd"$(OBJ_PATH)\\" /FD /GZ /c
$(OBJ_PATH)\%.obj: $(SOURCE_... | The backslashes are interpreted as escapes by GNU make and disable the special meaning of %. Try doubling the backslashes or replacing them by forward slashes. | Compiling all .c files in .obj files using GNU make and Microsoft Visual Studio compiler can anyone tell me what is wrong with this code: CC = "C:\Program Files\Microsoft Visual Studio\VC98\Bin\CL.EXE" CFLAGS = /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(OBJ_PATH)\$(EXECUTABLE... | TITLE:
Compiling all .c files in .obj files using GNU make and Microsoft Visual Studio compiler
QUESTION:
can anyone tell me what is wrong with this code: CC = "C:\Program Files\Microsoft Visual Studio\VC98\Bin\CL.EXE" CFLAGS = /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(OBJ_... | [
"c",
"visual-studio",
"compilation",
"gnu-make",
"object-files"
] | 0 | 1 | 835 | 1 | 0 | 2011-06-10T14:54:19.840000 | 2011-06-10T15:24:45.163000 |
6,308,106 | 6,308,338 | View Inflation and custom views | I have a custom view in my app that I draw using the onDraw() function in the View. Also it needs some data from the ACtivity to draw the graphic. So instead of using the standard setContentView(R.layout.myview) I am using the following - MyView mv = new MyView(this, userData); setContentView(mv); This seemed to work u... | What you should have here is a layout that contains the TextView and your MyView and then inside your activity, find your custom view and pass in your user data. Your MyView can then use this during its onDraw(). Perhaps something like this: res/layout/main.xml: src/my/package/MyView.java: public class MyView extends V... | View Inflation and custom views I have a custom view in my app that I draw using the onDraw() function in the View. Also it needs some data from the ACtivity to draw the graphic. So instead of using the standard setContentView(R.layout.myview) I am using the following - MyView mv = new MyView(this, userData); setConten... | TITLE:
View Inflation and custom views
QUESTION:
I have a custom view in my app that I draw using the onDraw() function in the View. Also it needs some data from the ACtivity to draw the graphic. So instead of using the standard setContentView(R.layout.myview) I am using the following - MyView mv = new MyView(this, us... | [
"android",
"android-layout"
] | 4 | 4 | 5,747 | 2 | 0 | 2011-06-10T14:55:28.623000 | 2011-06-10T15:12:31.013000 |
6,308,108 | 6,308,180 | Accessing key in an Array using JavaScript | RaceArray: [{ Unknown: 0, Caucasian: 1, AfricanAmerican: 2, AmericanIndian: 3, Asian: 4, Hispanic: 5, Other: 6 }] How can i access the key's alone in my JavaScript and form it as an separate array. Desired outcome... RaceArray = ['Unknown','Caucasian'] | var RaceObj = [{ Unknown: 0, Caucasian: 1, AfricanAmerican: 2, AmericanIndian: 3, Asian: 4, Hispanic: 5, Other: 6 }];
var obj = RaceObj[0], Keys = []; for(var key in obj){ if(obj.hasOwnProperty(key)){ Keys.push(key); } } | Accessing key in an Array using JavaScript RaceArray: [{ Unknown: 0, Caucasian: 1, AfricanAmerican: 2, AmericanIndian: 3, Asian: 4, Hispanic: 5, Other: 6 }] How can i access the key's alone in my JavaScript and form it as an separate array. Desired outcome... RaceArray = ['Unknown','Caucasian'] | TITLE:
Accessing key in an Array using JavaScript
QUESTION:
RaceArray: [{ Unknown: 0, Caucasian: 1, AfricanAmerican: 2, AmericanIndian: 3, Asian: 4, Hispanic: 5, Other: 6 }] How can i access the key's alone in my JavaScript and form it as an separate array. Desired outcome... RaceArray = ['Unknown','Caucasian']
ANSWE... | [
"javascript"
] | 0 | 5 | 5,979 | 2 | 0 | 2011-06-10T14:55:35.283000 | 2011-06-10T15:00:29.200000 |
6,308,118 | 6,308,336 | my javascript cookie works for my show and hide, but doesn't work for my toggle? | I have a cookie that remembers if my drop down is hidden or visible or not. Then I added a image to the drop down, and toggling the the photos also, but the cookie doesn't seem to remember what state the toggle is in. | Here is a better cookie script Usage: stateTog = objTog.className; setCookie("State",state,expiryDate); setCookie("StateTog",stateTog,expiryDate);
function readCookie() { state = getCookie("State"); stateTog = getCookie("StateTog");
} // cookie.js file var daysToKeep = 14; // default cookie life... theCookie = ''; to... | my javascript cookie works for my show and hide, but doesn't work for my toggle? I have a cookie that remembers if my drop down is hidden or visible or not. Then I added a image to the drop down, and toggling the the photos also, but the cookie doesn't seem to remember what state the toggle is in. | TITLE:
my javascript cookie works for my show and hide, but doesn't work for my toggle?
QUESTION:
I have a cookie that remembers if my drop down is hidden or visible or not. Then I added a image to the drop down, and toggling the the photos also, but the cookie doesn't seem to remember what state the toggle is in.
AN... | [
"javascript",
"cookies"
] | 0 | 0 | 249 | 2 | 0 | 2011-06-10T14:56:24.833000 | 2011-06-10T15:12:22.497000 |
6,308,124 | 6,308,260 | javascript detect user is viewing the page | Currently my website keep auto reload a javascript function for every 10 seconds by setInterval( "checklatestmsgidLive();", 10000 ); I think the function will still keep reloading the function even when the user is viewing other website on other tab. How to make it reload the function only when the user is viewing my w... | var tId, idleTimer; function initReload() { clearInterval(tId); tId = setInterval(checklatestmsgidLive, 10000 );
} window.onload=window.onfocus=function() { initReload() } window.onblur=function() { clearInterval(tId); } window.onmousemove=function() { clearTimeout(idleTimer); idleTimer = setTimeout(function() { clear... | javascript detect user is viewing the page Currently my website keep auto reload a javascript function for every 10 seconds by setInterval( "checklatestmsgidLive();", 10000 ); I think the function will still keep reloading the function even when the user is viewing other website on other tab. How to make it reload the ... | TITLE:
javascript detect user is viewing the page
QUESTION:
Currently my website keep auto reload a javascript function for every 10 seconds by setInterval( "checklatestmsgidLive();", 10000 ); I think the function will still keep reloading the function even when the user is viewing other website on other tab. How to m... | [
"javascript"
] | 5 | 8 | 9,150 | 3 | 0 | 2011-06-10T14:56:32.383000 | 2011-06-10T15:06:21.687000 |
6,308,125 | 6,308,171 | Java: Graphics or Graphics2D? | I am new to Java and have been trying to make some simple games in it with lots of images on screen. Since then I have been using the 'Graphics' class to draw these images, strings and shapes, but I recently came across Graphics2D which seems to be the same sort of thing.. Could anyone tell me what the difference is be... | The Graphics that is passed to paint(Graphics) is actually a Graphics2D object. If you want to use any of the Graphics2D functionality, just cast it and make the calls you need. | Java: Graphics or Graphics2D? I am new to Java and have been trying to make some simple games in it with lots of images on screen. Since then I have been using the 'Graphics' class to draw these images, strings and shapes, but I recently came across Graphics2D which seems to be the same sort of thing.. Could anyone tel... | TITLE:
Java: Graphics or Graphics2D?
QUESTION:
I am new to Java and have been trying to make some simple games in it with lots of images on screen. Since then I have been using the 'Graphics' class to draw these images, strings and shapes, but I recently came across Graphics2D which seems to be the same sort of thing.... | [
"java",
"graphics",
"graphics2d"
] | 12 | 18 | 10,796 | 2 | 0 | 2011-06-10T14:56:40.697000 | 2011-06-10T14:59:55.253000 |
6,308,132 | 6,308,172 | Automatically move user after a certain period of time in a View | I have a simple MVC 3 application. I want the site to automatically redirect the user somewhere else after they have logged out and been on the logout page for a few seconds. I would like this implemented into the View, but I cannot figure out how to work MVC conventions into something to do this. I know I can use this... | You could use the Url.Action helper which will take care of generating the proper url based on your routes setup. Example with Razor: and with WebForms: "> Alternatively you could use javascript to perform the redirect instead of a meta tag: | Automatically move user after a certain period of time in a View I have a simple MVC 3 application. I want the site to automatically redirect the user somewhere else after they have logged out and been on the logout page for a few seconds. I would like this implemented into the View, but I cannot figure out how to work... | TITLE:
Automatically move user after a certain period of time in a View
QUESTION:
I have a simple MVC 3 application. I want the site to automatically redirect the user somewhere else after they have logged out and been on the logout page for a few seconds. I would like this implemented into the View, but I cannot figu... | [
"c#",
"html",
"asp.net-mvc-3"
] | 7 | 21 | 5,351 | 2 | 0 | 2011-06-10T14:57:29.950000 | 2011-06-10T15:00:04.643000 |
6,308,135 | 6,309,206 | Accessing Light userdata in Lua | I may be misunderstanding their use or misread the documentation, but how do I access members of a struct or class passed to Lua as light userdata? For example if a vector using the following struct typedef struct Foo { int x; int y; } Foo; was declared as 'test' and defined as something like x = 413 and y = 612, and p... | Light userdata in Lua is just a pointer. Lua has no understanding of how to read the contents of the object referenced by the pointer. The purpose of this data is to allow one C API call to pass a reference to another API call. If you want to work with data in Lua, you need to push it onto the stack, and in your case I... | Accessing Light userdata in Lua I may be misunderstanding their use or misread the documentation, but how do I access members of a struct or class passed to Lua as light userdata? For example if a vector using the following struct typedef struct Foo { int x; int y; } Foo; was declared as 'test' and defined as something... | TITLE:
Accessing Light userdata in Lua
QUESTION:
I may be misunderstanding their use or misread the documentation, but how do I access members of a struct or class passed to Lua as light userdata? For example if a vector using the following struct typedef struct Foo { int x; int y; } Foo; was declared as 'test' and de... | [
"c++",
"lua",
"lua-userdata"
] | 3 | 11 | 5,962 | 2 | 0 | 2011-06-10T14:57:35.970000 | 2011-06-10T16:17:39.697000 |
6,308,148 | 6,308,472 | When is an active record really inserted into the database | We have a server setup where a rails server is writting into the same database as an java enterprise server. We have an api for the enterprise server implemented on the rails server that will create a user. It looks like this: user = User.new user.name = "Test" user.save() The problem we are facing now is that when the... | You would want to use ActiveRecord callbacks for this. They let you perform an action after the save takes place. | When is an active record really inserted into the database We have a server setup where a rails server is writting into the same database as an java enterprise server. We have an api for the enterprise server implemented on the rails server that will create a user. It looks like this: user = User.new user.name = "Test"... | TITLE:
When is an active record really inserted into the database
QUESTION:
We have a server setup where a rails server is writting into the same database as an java enterprise server. We have an api for the enterprise server implemented on the rails server that will create a user. It looks like this: user = User.new ... | [
"mysql",
"ruby-on-rails",
"ruby",
"activerecord"
] | 3 | 2 | 92 | 1 | 0 | 2011-06-10T14:58:27.653000 | 2011-06-10T15:22:45.563000 |
6,308,158 | 6,308,552 | How to assert that an input element is empty in Ruby on Rails tests | I want to ensure that the password fields are empty when editing a user. How do I do this in a functional test? I've tried both of these variants: assert_select "input[name=?][value=?]", 'user[password1]', '' and assert_tag:tag => "input",:attributes => {:name => "user[password1]",:value => ""} Both fail because there ... | Try this: assert_select 'input:not([value])[name="user[password1]"]', true | How to assert that an input element is empty in Ruby on Rails tests I want to ensure that the password fields are empty when editing a user. How do I do this in a functional test? I've tried both of these variants: assert_select "input[name=?][value=?]", 'user[password1]', '' and assert_tag:tag => "input",:attributes =... | TITLE:
How to assert that an input element is empty in Ruby on Rails tests
QUESTION:
I want to ensure that the password fields are empty when editing a user. How do I do this in a functional test? I've tried both of these variants: assert_select "input[name=?][value=?]", 'user[password1]', '' and assert_tag:tag => "in... | [
"html",
"ruby-on-rails",
"forms",
"testing"
] | 3 | 5 | 1,143 | 2 | 0 | 2011-06-10T14:58:54.873000 | 2011-06-10T15:27:58.327000 |
6,308,177 | 6,308,264 | How could I make an extension that open a url when the icon is clicked? | There will be an icon in Chrome's extension bar, I'd like to open a link in a new tab when the icon is clicked(instead of popup a popup page). How could I do that? | In your background page: chrome.browserAction.onClicked.addListener(function() { chrome.tabs.create({url: "http://www.google.com"}); }); Google documentation for chrome.browserAction.onClicked chrome.tabs.create | How could I make an extension that open a url when the icon is clicked? There will be an icon in Chrome's extension bar, I'd like to open a link in a new tab when the icon is clicked(instead of popup a popup page). How could I do that? | TITLE:
How could I make an extension that open a url when the icon is clicked?
QUESTION:
There will be an icon in Chrome's extension bar, I'd like to open a link in a new tab when the icon is clicked(instead of popup a popup page). How could I do that?
ANSWER:
In your background page: chrome.browserAction.onClicked.a... | [
"javascript",
"google-chrome-extension"
] | 0 | 2 | 107 | 1 | 0 | 2011-06-10T15:00:14.900000 | 2011-06-10T15:06:36.087000 |
6,308,178 | 6,308,235 | What is the main difference between Inheritance and Polymorphism? | I was presented with this question in an end of module open book exam today and found myself lost. I was reading Head first Java and both definitions seemed to be exactly the same. I was just wondering what the MAIN difference was for my own piece of mind. I know there are a number of similar questions to this but, non... | Inheritance is when a 'class' derives from an existing 'class'. So if you have a Person class, then you have a Student class that extends Person, Student inherits all the things that Person has. There are some details around the access modifiers you put on the fields/methods in Person, but that's the basic idea. For ex... | What is the main difference between Inheritance and Polymorphism? I was presented with this question in an end of module open book exam today and found myself lost. I was reading Head first Java and both definitions seemed to be exactly the same. I was just wondering what the MAIN difference was for my own piece of min... | TITLE:
What is the main difference between Inheritance and Polymorphism?
QUESTION:
I was presented with this question in an end of module open book exam today and found myself lost. I was reading Head first Java and both definitions seemed to be exactly the same. I was just wondering what the MAIN difference was for m... | [
"java",
"oop",
"inheritance",
"polymorphism"
] | 200 | 321 | 306,290 | 18 | 0 | 2011-06-10T15:00:18.020000 | 2011-06-10T15:04:34.897000 |
6,308,183 | 6,308,210 | C# format currency with leading spaces? | I am trying to duplicate a text report that was written in Icon in C#. The report has: Blah Blah........ $ 10,938.09 Blah Blah........ $ 3.88 Blah Blah........ $ 102,398.11 I am able to use multiple formatting calls to achieve this result with out issue, for example: Console.WriteLine(string.Format("Blah Blah.....${0,1... | You do it like so: Console.WriteLine(string.Format("Blah Blah.....${0,10:#,##0.00}", number)); Update: This is the relevant part of the documentation. | C# format currency with leading spaces? I am trying to duplicate a text report that was written in Icon in C#. The report has: Blah Blah........ $ 10,938.09 Blah Blah........ $ 3.88 Blah Blah........ $ 102,398.11 I am able to use multiple formatting calls to achieve this result with out issue, for example: Console.Writ... | TITLE:
C# format currency with leading spaces?
QUESTION:
I am trying to duplicate a text report that was written in Icon in C#. The report has: Blah Blah........ $ 10,938.09 Blah Blah........ $ 3.88 Blah Blah........ $ 102,398.11 I am able to use multiple formatting calls to achieve this result with out issue, for exa... | [
"c#",
"string",
"formatting",
"currency"
] | 3 | 8 | 4,254 | 1 | 0 | 2011-06-10T15:00:36.510000 | 2011-06-10T15:02:52.320000 |
6,308,185 | 6,308,948 | English lemmatizer databases? | Do you know any big enough lemmatizer database that returns correct result for following sample words: geese: goose plantes: //not found Wordnet's morphological analyzer is not sufficient, since it gives the following incorrect results: geese: //not found plantes: plant | MorphAdorner seems to be better at this, but it still finds the incorrect result for "plantes" plantes: plante geese: goose Maybe you'd like to use MorphAdorner to do the lemmatization, and then check its results against WordNet. You can use the WordNet API to perform lookups without first performing lemmatization by c... | English lemmatizer databases? Do you know any big enough lemmatizer database that returns correct result for following sample words: geese: goose plantes: //not found Wordnet's morphological analyzer is not sufficient, since it gives the following incorrect results: geese: //not found plantes: plant | TITLE:
English lemmatizer databases?
QUESTION:
Do you know any big enough lemmatizer database that returns correct result for following sample words: geese: goose plantes: //not found Wordnet's morphological analyzer is not sufficient, since it gives the following incorrect results: geese: //not found plantes: plant
... | [
"nlp",
"stemming",
"lemmatization",
"morphological-analysis"
] | 4 | 2 | 2,456 | 2 | 0 | 2011-06-10T15:00:50.800000 | 2011-06-10T15:56:30.057000 |
6,308,187 | 6,308,251 | jquery running to soon. working only in chrome | I have set blog text in my page to opacity 0, so that it fades in to opacity 1 on page load with this code. $(document).ready(function(){ $('.entry').animate({opacity:1},700); }); the text only fades in on chrome, in firefox the text is already set to opactiy 1 with no visible fade in effect. I have tried to put the co... | It's a little hacky but you can try setting a timeout after the page has loaded... $(document).ready(function(){ setTimeout(function(){ $('.entry').animate({opacity:1},700); },1000); }); | jquery running to soon. working only in chrome I have set blog text in my page to opacity 0, so that it fades in to opacity 1 on page load with this code. $(document).ready(function(){ $('.entry').animate({opacity:1},700); }); the text only fades in on chrome, in firefox the text is already set to opactiy 1 with no vis... | TITLE:
jquery running to soon. working only in chrome
QUESTION:
I have set blog text in my page to opacity 0, so that it fades in to opacity 1 on page load with this code. $(document).ready(function(){ $('.entry').animate({opacity:1},700); }); the text only fades in on chrome, in firefox the text is already set to opa... | [
"jquery",
"jquery-animate",
"opacity"
] | 3 | 1 | 120 | 3 | 0 | 2011-06-10T15:00:52.903000 | 2011-06-10T15:05:49.653000 |
6,308,193 | 6,308,355 | Parsing JSON string in android | Parsing JSON seems like it is a pretty common topic of discussion on here. I have looked around and still have not found what I am looking for. Here is my code for my HttpClient public class CreateJsonRequest {
public static String SendJsonRequest(String URL, Map params){ try{ DefaultHttpClient httpClient = new Defaul... | In this case you can use the keys method of the JSONObject class. It will basically returns an Iterator of the keys, that you can then iterate to get and put the values in a map: try { JSONObject jsonObject = new JSONObject(theJsonString); Iterator keys = jsonObject.keys(); Map map = new HashMap (); while (keys.hasNext... | Parsing JSON string in android Parsing JSON seems like it is a pretty common topic of discussion on here. I have looked around and still have not found what I am looking for. Here is my code for my HttpClient public class CreateJsonRequest {
public static String SendJsonRequest(String URL, Map params){ try{ DefaultHtt... | TITLE:
Parsing JSON string in android
QUESTION:
Parsing JSON seems like it is a pretty common topic of discussion on here. I have looked around and still have not found what I am looking for. Here is my code for my HttpClient public class CreateJsonRequest {
public static String SendJsonRequest(String URL, Map params... | [
"java",
"android",
"json",
"parsing"
] | 7 | 20 | 15,100 | 2 | 0 | 2011-06-10T15:01:19.777000 | 2011-06-10T15:13:53.353000 |
6,308,208 | 6,308,289 | Can a C# program read a text file into memory and then pass that object to a method that requires a filename? | In a C# program I am importing a large text file (300mb) into a MySQL database via the MySqlBulkLoader function of the MySql.Net Connector. The import takes quite a long time and results in almost 100% disk usage on the Windows 2003 Server it is running on. In an attempt to speed up the import the program nows splits t... | Memory isn't a file, so the short answer is no. The alternatives are: Read through the file, writing it out as a temporary file ( System.IO.Path.GetTempFileName() is your friend here, for the name to give the partial file) and passing that filename to MySqlBulkLoader Use a "RAM Disk" tool to create a memory based disk ... | Can a C# program read a text file into memory and then pass that object to a method that requires a filename? In a C# program I am importing a large text file (300mb) into a MySQL database via the MySqlBulkLoader function of the MySql.Net Connector. The import takes quite a long time and results in almost 100% disk usa... | TITLE:
Can a C# program read a text file into memory and then pass that object to a method that requires a filename?
QUESTION:
In a C# program I am importing a large text file (300mb) into a MySQL database via the MySqlBulkLoader function of the MySql.Net Connector. The import takes quite a long time and results in al... | [
"c#",
"mysql",
".net-4.0",
"text-files",
"import"
] | 2 | 1 | 1,938 | 2 | 0 | 2011-06-10T15:02:44.237000 | 2011-06-10T15:08:43.080000 |
6,308,220 | 6,308,311 | C file not showing in code hinting | I've got an iphone project that I've added a.c file and corresponding.h file. In my app delegate I do the normal #include "MyCfile.h". But when I try to create a variable of type "MyCfile" it doesnt appear in the code hinting. It's almost like xcode doesnt know it's there. What am I doing wrong? | Is there an actual class or struct named MyCfile? Just having a source file by this name doesn't do anything; you didn't mention a class so I'm going to assume you just haven't defined one in that header file. | C file not showing in code hinting I've got an iphone project that I've added a.c file and corresponding.h file. In my app delegate I do the normal #include "MyCfile.h". But when I try to create a variable of type "MyCfile" it doesnt appear in the code hinting. It's almost like xcode doesnt know it's there. What am I d... | TITLE:
C file not showing in code hinting
QUESTION:
I've got an iphone project that I've added a.c file and corresponding.h file. In my app delegate I do the normal #include "MyCfile.h". But when I try to create a variable of type "MyCfile" it doesnt appear in the code hinting. It's almost like xcode doesnt know it's ... | [
"iphone",
"c",
"xcode"
] | 0 | 0 | 60 | 1 | 0 | 2011-06-10T15:03:39.737000 | 2011-06-10T15:10:34.790000 |
6,308,225 | 6,308,746 | TPL architectural question | I'm currently working on a project, where we have the challenge to process items in parallel. So far not a big deal;) Now to the problem. We have a list of IDs, where we periodically (every 2 sec's) what to call a StoredProcedure for each ID. The 2 sec's need to be checked for each item individually, as they are added ... | I don't think you actually need to get down and dirty with direct TPL Tasks for this. For starters I would set up a BlockingCollection around a ConcurrentQueue (the default) with no BoundedCapacity set on the BlockingCollection to store the IDs that need to be processed. // Setup the blocking collection somewhere when ... | TPL architectural question I'm currently working on a project, where we have the challenge to process items in parallel. So far not a big deal;) Now to the problem. We have a list of IDs, where we periodically (every 2 sec's) what to call a StoredProcedure for each ID. The 2 sec's need to be checked for each item indiv... | TITLE:
TPL architectural question
QUESTION:
I'm currently working on a project, where we have the challenge to process items in parallel. So far not a big deal;) Now to the problem. We have a list of IDs, where we periodically (every 2 sec's) what to call a StoredProcedure for each ID. The 2 sec's need to be checked f... | [
"c#",
".net",
"task-parallel-library"
] | 6 | 9 | 1,804 | 2 | 0 | 2011-06-10T15:03:57.647000 | 2011-06-10T15:41:23.307000 |
6,308,226 | 6,308,350 | How do change listeners work | I regularly see the following code in blackberry development. It registers a listener on a field and when the listener is fired(in below example when focus is on a field) some code is executed. Is this part of a design pattern? How is focusChanged actually called? FocusChangeListener focusListener = new FocusChangeList... | Focus change is called by the OS, or some BB APIs that sit close to the OS. Whenever someone scrolls through, or touches a field the focus changes. Think of it kind of like tabbing through a window in a desktop app. As you move through the controls, your app gets notified of the focus change, which notifies your base m... | How do change listeners work I regularly see the following code in blackberry development. It registers a listener on a field and when the listener is fired(in below example when focus is on a field) some code is executed. Is this part of a design pattern? How is focusChanged actually called? FocusChangeListener focusL... | TITLE:
How do change listeners work
QUESTION:
I regularly see the following code in blackberry development. It registers a listener on a field and when the listener is fired(in below example when focus is on a field) some code is executed. Is this part of a design pattern? How is focusChanged actually called? FocusCha... | [
"java",
"blackberry"
] | 1 | 2 | 450 | 1 | 0 | 2011-06-10T15:04:00.797000 | 2011-06-10T15:13:16.983000 |
6,308,234 | 6,308,367 | MS Word VBA - select range, check spelling and accept first suggest | i'd like to write a macro that selects the next word to the right of the cursor, checks its spelling and replaces an error with the first suggestion.. can anyone with more VBA knowledge than me (..laugh) help out. i tried the macro recorder but did not get any farther than this: Sub FirstSuggest() Selection.MoveLeft Un... | Dim r As Range Set r = Selection.GoToNext(wdGoToSpellingError)
With r.GetSpellingSuggestions() If.Count > 0 Then r.Text =.Item(1).Name End If End With | MS Word VBA - select range, check spelling and accept first suggest i'd like to write a macro that selects the next word to the right of the cursor, checks its spelling and replaces an error with the first suggestion.. can anyone with more VBA knowledge than me (..laugh) help out. i tried the macro recorder but did not... | TITLE:
MS Word VBA - select range, check spelling and accept first suggest
QUESTION:
i'd like to write a macro that selects the next word to the right of the cursor, checks its spelling and replaces an error with the first suggestion.. can anyone with more VBA knowledge than me (..laugh) help out. i tried the macro re... | [
"vba",
"ms-word",
"range",
"spell-checking"
] | 0 | 2 | 1,961 | 1 | 0 | 2011-06-10T15:04:24.543000 | 2011-06-10T15:14:47.127000 |
6,308,239 | 6,308,405 | How to Call this Generic Method with a Generic Type? | I have this code at the moment: Method1 >();
public void Method1 () { // process } Class1 needs a generic type itself ( Class2 ). I have to call the Method1 about 10 times for all of which Class2 would be the same type. So how could I call Method1 with something like following: Method1 >(); Where J is a generic type i... | You can use the using directive in your class file to alias either one or both of your classes. using J = Class2; using MyClass = Class1; (Apply appropriate namespaces as necessary to the class names, like Foo.Bar.Class1, etc.) Now you can invoke your method with any of the following statements Method1 >(); Method1 >()... | How to Call this Generic Method with a Generic Type? I have this code at the moment: Method1 >();
public void Method1 () { // process } Class1 needs a generic type itself ( Class2 ). I have to call the Method1 about 10 times for all of which Class2 would be the same type. So how could I call Method1 with something lik... | TITLE:
How to Call this Generic Method with a Generic Type?
QUESTION:
I have this code at the moment: Method1 >();
public void Method1 () { // process } Class1 needs a generic type itself ( Class2 ). I have to call the Method1 about 10 times for all of which Class2 would be the same type. So how could I call Method1 ... | [
"c#",
"generics"
] | 0 | 0 | 119 | 3 | 0 | 2011-06-10T15:04:54.090000 | 2011-06-10T15:17:40.460000 |
6,308,253 | 6,309,478 | Creating table diagrams in MSSMS without the internal tool? | My tables are based on MSSMS 2000 and I'm accessing them with 2008. (I also have VS 2005, 2008, and 2010) The internal feature does not work with MSSMS 2000. Please recommend a free third-party/opensource tool, that will only read and not install stuff on the DB server to create a visual display of a subset of the tabl... | Before I bit the bullet and bought a full blown license for ERStudio from Embarcadero I used to use the free version of Toad Data Modeler. It worked quite well, especially considering it's freeware. I haven't used it since Quest took Toad over but Quest has a pretty good reputation in the biz. | Creating table diagrams in MSSMS without the internal tool? My tables are based on MSSMS 2000 and I'm accessing them with 2008. (I also have VS 2005, 2008, and 2010) The internal feature does not work with MSSMS 2000. Please recommend a free third-party/opensource tool, that will only read and not install stuff on the ... | TITLE:
Creating table diagrams in MSSMS without the internal tool?
QUESTION:
My tables are based on MSSMS 2000 and I'm accessing them with 2008. (I also have VS 2005, 2008, and 2010) The internal feature does not work with MSSMS 2000. Please recommend a free third-party/opensource tool, that will only read and not ins... | [
"sql",
"sql-server",
"database",
"sql-server-2008",
"database-design"
] | 1 | 0 | 98 | 1 | 0 | 2011-06-10T15:06:02.903000 | 2011-06-10T16:38:57.397000 |
6,308,258 | 6,308,380 | UItableviewController doesn't load data | Hi guys i have a UITableviewcontroller class, i am calling it from otherview and pushing it on the navigationcontroller. Streets_view_Controller_iPhone * street_controller = [[Streets_view_Controller_iPhone alloc]initWithStyle:UITableViewStylePlain]; street_controller.riding_number = [assignment objectForKey:@"Riding_N... | Nothing will show up in your table because of the following: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 0; } You must have at least one section in your table for it to show any data. Try return 1; and see if it works. | UItableviewController doesn't load data Hi guys i have a UITableviewcontroller class, i am calling it from otherview and pushing it on the navigationcontroller. Streets_view_Controller_iPhone * street_controller = [[Streets_view_Controller_iPhone alloc]initWithStyle:UITableViewStylePlain]; street_controller.riding_numb... | TITLE:
UItableviewController doesn't load data
QUESTION:
Hi guys i have a UITableviewcontroller class, i am calling it from otherview and pushing it on the navigationcontroller. Streets_view_Controller_iPhone * street_controller = [[Streets_view_Controller_iPhone alloc]initWithStyle:UITableViewStylePlain]; street_cont... | [
"cocoa-touch",
"uitableview"
] | 0 | 2 | 399 | 1 | 0 | 2011-06-10T15:06:18.327000 | 2011-06-10T15:15:47.173000 |
6,308,262 | 6,308,330 | Haskell - Assigning a value to user defined types | Question I have defined a user defined type as type asd = [(Char,Int)] How can i assigin a value to a type asd such as asd= [("Hello",1)] (Not in run time) to keep hard code a value in source code is this possible?, becouse there is no variable concept in functional programming | You are defining a constant. An example would be: -- A type of lists of pairs type ASD = [(String,Int)]
-- A value of type ASD asd:: ASD asd = [("Hello", 1)] That is, you just declare what the value of asd is. | Haskell - Assigning a value to user defined types Question I have defined a user defined type as type asd = [(Char,Int)] How can i assigin a value to a type asd such as asd= [("Hello",1)] (Not in run time) to keep hard code a value in source code is this possible?, becouse there is no variable concept in functional pro... | TITLE:
Haskell - Assigning a value to user defined types
QUESTION:
Question I have defined a user defined type as type asd = [(Char,Int)] How can i assigin a value to a type asd such as asd= [("Hello",1)] (Not in run time) to keep hard code a value in source code is this possible?, becouse there is no variable concept... | [
"haskell",
"user-defined-types"
] | 1 | 7 | 448 | 1 | 0 | 2011-06-10T15:06:30.573000 | 2011-06-10T15:11:52.577000 |
6,308,269 | 6,309,119 | PHP Localization and dynamic data | So I need to make a site available in different languages. Using PHP 5.x and MySQL 5.x. I believe I will be using gettext which seems fine for static text throughout the site but what about dynamic data that is stored in the db? Im referring to things like stories, events business listings etc. How do I get those to di... | If you want the stories to be correct in all languages, then you need them stored in all languages and provide the backend to do the translations or enter the stories on different languages as you initially thought. If you don't like that, you might add the google translate element in your pages, to provide automatic (... | PHP Localization and dynamic data So I need to make a site available in different languages. Using PHP 5.x and MySQL 5.x. I believe I will be using gettext which seems fine for static text throughout the site but what about dynamic data that is stored in the db? Im referring to things like stories, events business list... | TITLE:
PHP Localization and dynamic data
QUESTION:
So I need to make a site available in different languages. Using PHP 5.x and MySQL 5.x. I believe I will be using gettext which seems fine for static text throughout the site but what about dynamic data that is stored in the db? Im referring to things like stories, ev... | [
"php",
"localization",
"dynamic-data"
] | 0 | 0 | 470 | 2 | 0 | 2011-06-10T15:06:55.360000 | 2011-06-10T16:10:43.270000 |
6,308,270 | 6,308,480 | Making an executable GEM from a script | I started developing ruby lately and I really like it, But I feel somehow lost. I developed a script that does "whatever" and that scripts requires many gems like nokogiri and colorize. I now want to deploy the script, so after reading a while I found many people saying that deploying as a gem is the best approach. So ... | Building a gem consists of basically creating a simple directory structure for your script, and a special file known as a gemspec that will list all its dependencies. That gemspec can be used with rubygems to create a gem file (*.gem), which can be installed using rubygems or uploaded to rubygems.org for public consump... | Making an executable GEM from a script I started developing ruby lately and I really like it, But I feel somehow lost. I developed a script that does "whatever" and that scripts requires many gems like nokogiri and colorize. I now want to deploy the script, so after reading a while I found many people saying that deplo... | TITLE:
Making an executable GEM from a script
QUESTION:
I started developing ruby lately and I really like it, But I feel somehow lost. I developed a script that does "whatever" and that scripts requires many gems like nokogiri and colorize. I now want to deploy the script, so after reading a while I found many people... | [
"ruby",
"rubygems"
] | 3 | 5 | 485 | 2 | 0 | 2011-06-10T15:07:08.563000 | 2011-06-10T15:23:13.300000 |
6,308,273 | 6,308,372 | How can i use a one form/table for multiple MVC's? | I cant really wrap my head around how to do this since I'm new at RoR.I have a Price model which is the only table i want to use for forms. I want to have 2 other MVCs that are UserData and Search. The scenario is Users can input Prices and these Prices have 3 places to go. It can be their Data area, Search area or bot... | Hi If you're using rails 3 check http://railscasts.com/episodes/269-template-inheritance if older version you should create folder shared under your views directory and place there partial _price_form and render it on page http://guides.rubyonrails.org/layouts_and_rendering.html - guide on rendering If your have any co... | How can i use a one form/table for multiple MVC's? I cant really wrap my head around how to do this since I'm new at RoR.I have a Price model which is the only table i want to use for forms. I want to have 2 other MVCs that are UserData and Search. The scenario is Users can input Prices and these Prices have 3 places t... | TITLE:
How can i use a one form/table for multiple MVC's?
QUESTION:
I cant really wrap my head around how to do this since I'm new at RoR.I have a Price model which is the only table i want to use for forms. I want to have 2 other MVCs that are UserData and Search. The scenario is Users can input Prices and these Pric... | [
"ruby-on-rails"
] | 0 | 1 | 62 | 1 | 0 | 2011-06-10T15:07:44.620000 | 2011-06-10T15:15:18.317000 |
6,308,277 | 6,308,411 | Combine arrays in PHP | Possible Duplicate: Transposing multidimensional arrays in PHP I have three arrays: $a = (a1, a2, a3); $b = (b1, b2, b3); $c = (c1, c2, c3); I want to combine these arrays to create: $newa = (a1, b1, c1); $newb = (a2, b2, c2); $newc = (a3, b3, c3); | I changed things a little. I didn't use $newA, #newB, $newC, but used a $m array instead. $a = array( "a1", "a2", "a3"); $b = array( "b1", "b2", "b3"); $c = array( "c1", "c2", "c3");
$count = count($a); $i = 0; $m = array(); for($i;$i < $count; $i++) { $m[] = array( $a[$i], $b[$i], $c[$i]); }
print_r($m); Outputs: Ar... | Combine arrays in PHP Possible Duplicate: Transposing multidimensional arrays in PHP I have three arrays: $a = (a1, a2, a3); $b = (b1, b2, b3); $c = (c1, c2, c3); I want to combine these arrays to create: $newa = (a1, b1, c1); $newb = (a2, b2, c2); $newc = (a3, b3, c3); | TITLE:
Combine arrays in PHP
QUESTION:
Possible Duplicate: Transposing multidimensional arrays in PHP I have three arrays: $a = (a1, a2, a3); $b = (b1, b2, b3); $c = (c1, c2, c3); I want to combine these arrays to create: $newa = (a1, b1, c1); $newb = (a2, b2, c2); $newc = (a3, b3, c3);
ANSWER:
I changed things a lit... | [
"php",
"arrays"
] | 0 | 1 | 291 | 4 | 0 | 2011-06-10T15:07:54.580000 | 2011-06-10T15:18:08.720000 |
6,308,292 | 6,308,399 | Mysql2::Error: Operand should contain 1 column(s) | This line in my controller: @feedback = Feedback.where("reviewer_id =?, reviewee_id =?, strength_id =?", current_user.id, @report_for.id, @context ).first produces this error when I attempt to display @feedback.something: Mysql2::Error: Operand should contain 1 column(s): SELECT `feedbacks`.* FROM `feedbacks` WHERE (re... | I think your SQL is wrong, try this @feedback = Feedback.where("reviewer_id =? and reviewee_id =? and strength_id =?", current_user.id, @report_for.id, @context ).first | Mysql2::Error: Operand should contain 1 column(s) This line in my controller: @feedback = Feedback.where("reviewer_id =?, reviewee_id =?, strength_id =?", current_user.id, @report_for.id, @context ).first produces this error when I attempt to display @feedback.something: Mysql2::Error: Operand should contain 1 column(s... | TITLE:
Mysql2::Error: Operand should contain 1 column(s)
QUESTION:
This line in my controller: @feedback = Feedback.where("reviewer_id =?, reviewee_id =?, strength_id =?", current_user.id, @report_for.id, @context ).first produces this error when I attempt to display @feedback.something: Mysql2::Error: Operand should ... | [
"mysql",
"ruby-on-rails-3"
] | 2 | 5 | 5,166 | 1 | 0 | 2011-06-10T15:08:54.960000 | 2011-06-10T15:16:58.183000 |
6,308,310 | 6,308,395 | Creating extension method using CodeDOM | I'm trying to create an extension method using CodeDOM. There doesn't seem to be any support for them and using ExtensionAttribute (which C# uses internally to mark extension methods) is not allowed. It's possible to use a trick to specify the this modifier, but how do I make the containing class static, so that the co... | I'm pretty sure you're looking for: var staticClass = new CodeTypeDeclaration("Extensions") { Attributes = MemberAttributes.Public|MemberAttributes.Static }; However, this appears not to work. Interestingly enough: provider.Supports(GeneratorSupport.StaticConstructors); // True
provider.Supports(GeneratorSupport.Publi... | Creating extension method using CodeDOM I'm trying to create an extension method using CodeDOM. There doesn't seem to be any support for them and using ExtensionAttribute (which C# uses internally to mark extension methods) is not allowed. It's possible to use a trick to specify the this modifier, but how do I make the... | TITLE:
Creating extension method using CodeDOM
QUESTION:
I'm trying to create an extension method using CodeDOM. There doesn't seem to be any support for them and using ExtensionAttribute (which C# uses internally to mark extension methods) is not allowed. It's possible to use a trick to specify the this modifier, but... | [
"c#",
".net",
"extension-methods",
"codedom"
] | 4 | 8 | 2,774 | 4 | 0 | 2011-06-10T15:10:29.790000 | 2011-06-10T15:16:41.230000 |
6,308,321 | 6,308,483 | HTML5 attribute priority | Html5 has new attributes like the novalidation attribute for the form element and the required element for an input element. When using both of this type of attributes, what sort of attribute have a higher priority, the form attributes or the input attributes? | The novalidate attribute specifies that the form should not be validated when submitted. If this attribute is present the form will not validate form input. (source: http://www.w3schools.com/html5/att_form_novalidate.asp ) This means it won't validate required input items, the format of email and url input types and so... | HTML5 attribute priority Html5 has new attributes like the novalidation attribute for the form element and the required element for an input element. When using both of this type of attributes, what sort of attribute have a higher priority, the form attributes or the input attributes? | TITLE:
HTML5 attribute priority
QUESTION:
Html5 has new attributes like the novalidation attribute for the form element and the required element for an input element. When using both of this type of attributes, what sort of attribute have a higher priority, the form attributes or the input attributes?
ANSWER:
The nov... | [
"forms",
"html",
"input",
"attributes"
] | 2 | 2 | 465 | 3 | 0 | 2011-06-10T15:11:06.657000 | 2011-06-10T15:23:24.523000 |
6,308,328 | 6,308,397 | Type of conditional expression cannot be determined (Func) | When assigning a method to a Func -type, I get the compilation error Type of conditional expression cannot be determined because there is no implicit conversion between 'method group' and 'method group'. This only happens with the?: operator. The code: public class Test { public static string One(int value) { value += ... | You need to explicitly provide the signature of at least one method group. However, after doing it the compiler will allow you to declare action as an implicitly-typed local: var action = which? (Func )One: Two; The reason this happens is that the return type of operator?: is not deduced based on what you are trying to... | Type of conditional expression cannot be determined (Func) When assigning a method to a Func -type, I get the compilation error Type of conditional expression cannot be determined because there is no implicit conversion between 'method group' and 'method group'. This only happens with the?: operator. The code: public c... | TITLE:
Type of conditional expression cannot be determined (Func)
QUESTION:
When assigning a method to a Func -type, I get the compilation error Type of conditional expression cannot be determined because there is no implicit conversion between 'method group' and 'method group'. This only happens with the?: operator. ... | [
"c#",
"generics",
"delegates"
] | 23 | 35 | 6,199 | 3 | 0 | 2011-06-10T15:11:37.867000 | 2011-06-10T15:16:42.520000 |
6,308,332 | 6,308,517 | A way to print rows in a alternate directions in Java without using 2D arrays..ArrayLists, LinkedLists | for practice purposes, I'm trying to find a way to print rows of numbers in alternate for each row etc.. 100 99 98 97 96 95 94 93 92 91 81 82 83 84 85 86 87 88 89 90 80 79 78 77 76 75 74 73..........without the use of 2D arrays, ArrayLists, LinkedLists.. so far I've done it, but my solution to this is quite long and ca... | Try something like this for(int i = 9; i>=0; i--){ boolean right = (i%2 == 0); for(int j = (right?1:10); j!=0 && j!=11; j = j + (right?1:-1)){ System.out.print(i*10 + j); System.out.print("\t");
} System.out.println(); } | A way to print rows in a alternate directions in Java without using 2D arrays..ArrayLists, LinkedLists for practice purposes, I'm trying to find a way to print rows of numbers in alternate for each row etc.. 100 99 98 97 96 95 94 93 92 91 81 82 83 84 85 86 87 88 89 90 80 79 78 77 76 75 74 73..........without the use of... | TITLE:
A way to print rows in a alternate directions in Java without using 2D arrays..ArrayLists, LinkedLists
QUESTION:
for practice purposes, I'm trying to find a way to print rows of numbers in alternate for each row etc.. 100 99 98 97 96 95 94 93 92 91 81 82 83 84 85 86 87 88 89 90 80 79 78 77 76 75 74 73............. | [
"java",
"rows",
"alternate"
] | 0 | 0 | 835 | 2 | 0 | 2011-06-10T15:12:00.807000 | 2011-06-10T15:25:39.420000 |
6,308,334 | 6,308,451 | Regex - Find all matching words that don't begin with a specific prefix | How would I construct a regular expression to find all words that end in a string but don't begin with a string? e.g. Find all words that end in 'friend' that don't start with the word 'girl' in the following sentence: "A boyfriend and girlfriend gained a friend when they asked to befriend them" The items in bold shoul... | Off the top of my head, you could try: \b # word boundary - matches start of word (?!girl) # negative lookahead for literal 'girl' \w* # zero or more letters, numbers, or underscores friend # literal 'friend' \b # word boundary - matches end of word Update Here's another non-obvious approach which should work in any mo... | Regex - Find all matching words that don't begin with a specific prefix How would I construct a regular expression to find all words that end in a string but don't begin with a string? e.g. Find all words that end in 'friend' that don't start with the word 'girl' in the following sentence: "A boyfriend and girlfriend g... | TITLE:
Regex - Find all matching words that don't begin with a specific prefix
QUESTION:
How would I construct a regular expression to find all words that end in a string but don't begin with a string? e.g. Find all words that end in 'friend' that don't start with the word 'girl' in the following sentence: "A boyfrien... | [
"regex"
] | 24 | 29 | 41,652 | 5 | 0 | 2011-06-10T15:12:08.677000 | 2011-06-10T15:20:51.723000 |
6,308,341 | 6,308,370 | Export gridview to excel in VB.Net not taking provided filename? | I have the following code to export a gridview to excel and the export works just fine. The issue is that no mater what I do it names the file the name of the webform.xls instead of the name I am providing in the code (Team.xls). Protected Sub btnExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ... | You have forgotten to mention filename=Team.xls It should be "attachment;filename=Team.xls" instead of attachment;Team.xls | Export gridview to excel in VB.Net not taking provided filename? I have the following code to export a gridview to excel and the export works just fine. The issue is that no mater what I do it names the file the name of the webform.xls instead of the name I am providing in the code (Team.xls). Protected Sub btnExcel_Cl... | TITLE:
Export gridview to excel in VB.Net not taking provided filename?
QUESTION:
I have the following code to export a gridview to excel and the export works just fine. The issue is that no mater what I do it names the file the name of the webform.xls instead of the name I am providing in the code (Team.xls). Protect... | [
"asp.net",
"vb.net",
"excel",
"gridview",
"export-to-excel"
] | 1 | 4 | 8,889 | 1 | 0 | 2011-06-10T15:12:55.750000 | 2011-06-10T15:15:07.833000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.