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,247,040 | 6,247,416 | Out of Memory Exception When Using HttpWebRequest to Stream Large File | I get an Out of Memory Exception when using Http.Put of a large file. I am using an asynchronous model as shown in the code. I am trying to send 8K blocks of data to a Windows 2008 R2 server. The exception consistently occurs when I attempt to write a block of data that exceeds 536,868,864 bytes. The exception occurs o... | You apparently have this documented problem. When AllowWriteStreamBuffering is true, it buffers all the data written to the request! So, the "solution" is to set that property to false: To work around this issue, set the HttpWebRequest.AllowWriteStreamBuffering property to false. | Out of Memory Exception When Using HttpWebRequest to Stream Large File I get an Out of Memory Exception when using Http.Put of a large file. I am using an asynchronous model as shown in the code. I am trying to send 8K blocks of data to a Windows 2008 R2 server. The exception consistently occurs when I attempt to write... | TITLE:
Out of Memory Exception When Using HttpWebRequest to Stream Large File
QUESTION:
I get an Out of Memory Exception when using Http.Put of a large file. I am using an asynchronous model as shown in the code. I am trying to send 8K blocks of data to a Windows 2008 R2 server. The exception consistently occurs when ... | [
"c#",
"streaming",
"out-of-memory"
] | 8 | 18 | 10,007 | 1 | 0 | 2011-06-06T01:17:05.533000 | 2011-06-06T02:54:41.680000 |
6,247,045 | 6,247,200 | PHP session.save_path when using database | I've just moved to storing my sessions in a database. My PHP code uses session_set_save_handler() to supply the required functions and all seems to be ok. But do I need to change my php.ini as well? For example, session.save_handler still has the value of "files". Also, do I still need to make sure that session.save_pa... | If you use session_set_save_handler(), then no, you don't need to specify session.save_path | PHP session.save_path when using database I've just moved to storing my sessions in a database. My PHP code uses session_set_save_handler() to supply the required functions and all seems to be ok. But do I need to change my php.ini as well? For example, session.save_handler still has the value of "files". Also, do I st... | TITLE:
PHP session.save_path when using database
QUESTION:
I've just moved to storing my sessions in a database. My PHP code uses session_set_save_handler() to supply the required functions and all seems to be ok. But do I need to change my php.ini as well? For example, session.save_handler still has the value of "fil... | [
"php",
"session"
] | 0 | 5 | 1,240 | 1 | 0 | 2011-06-06T01:18:27.147000 | 2011-06-06T01:57:24.563000 |
6,247,063 | 6,247,569 | How to do this in generics? | I am starting to use generics and been unable to really find the simple beginners guide to them yet so I am just doing trial and error. I want to convert this public void CreateTask(Task task, Student student) { Task convertToUtcTime = task.ConvertToUtcTime(student); session.Save(convertToUtcTime); }
public static Tas... | Now what confuses the heck out of me is how do I cast "entity" to a Task object but now only that but other objects that I need to convert like an Appointment that needs a timezone. You DO NOT need to cast if you are using generics. Or put this in another way: the reason you are using generics is because you do not wan... | How to do this in generics? I am starting to use generics and been unable to really find the simple beginners guide to them yet so I am just doing trial and error. I want to convert this public void CreateTask(Task task, Student student) { Task convertToUtcTime = task.ConvertToUtcTime(student); session.Save(convertToUt... | TITLE:
How to do this in generics?
QUESTION:
I am starting to use generics and been unable to really find the simple beginners guide to them yet so I am just doing trial and error. I want to convert this public void CreateTask(Task task, Student student) { Task convertToUtcTime = task.ConvertToUtcTime(student); sessio... | [
"c#",
"c#-4.0",
"generics"
] | 0 | 1 | 193 | 2 | 0 | 2011-06-06T01:22:50.867000 | 2011-06-06T03:43:00.057000 |
6,247,064 | 6,247,071 | python/django function returning identical value every time | I have a function that looks like this: def getCurrentShow(hour=(localtime().tm_hour),day=datetime.datetime.now().strftime('%A')): return Schedule.objects.get(hour=hour,day=day).show so I can call it with or without a time or day. My problem is that when I call it with no arguments ie: print getCurrentShow() It always ... | The default values for your function arguments are calculated the first time the function is loaded by the interpreter. What you want is the following: def getCurrentShow(hour=None, day=None): hour = hour or localtime().tm_hour day = day or datetime.datetime.now().strftime('%A') return Schedule.objects.get(hour=hour, d... | python/django function returning identical value every time I have a function that looks like this: def getCurrentShow(hour=(localtime().tm_hour),day=datetime.datetime.now().strftime('%A')): return Schedule.objects.get(hour=hour,day=day).show so I can call it with or without a time or day. My problem is that when I cal... | TITLE:
python/django function returning identical value every time
QUESTION:
I have a function that looks like this: def getCurrentShow(hour=(localtime().tm_hour),day=datetime.datetime.now().strftime('%A')): return Schedule.objects.get(hour=hour,day=day).show so I can call it with or without a time or day. My problem ... | [
"python",
"django"
] | 0 | 6 | 125 | 1 | 0 | 2011-06-06T01:23:22.257000 | 2011-06-06T01:25:13.480000 |
6,247,065 | 6,259,986 | C# AJAX or Java response HTML scraping | Is there a way in C# to get the output of AJAX or Java? What I'm trying to do is grab the specifics of items on a webpage, however the webpage does not load it into the original source. Does anybody have a good tutorial or a good place to start? For example, I would want to get all the car listings from http://www.madi... | If you need to just "load" it, then you'll need to understand how the page functions and try making the AJAX call yourself. Firebug and other similar tools allow you to see what requests are made by the browser. There is no reason you cannot make the same web request from C# that the original page is making from Javasc... | C# AJAX or Java response HTML scraping Is there a way in C# to get the output of AJAX or Java? What I'm trying to do is grab the specifics of items on a webpage, however the webpage does not load it into the original source. Does anybody have a good tutorial or a good place to start? For example, I would want to get al... | TITLE:
C# AJAX or Java response HTML scraping
QUESTION:
Is there a way in C# to get the output of AJAX or Java? What I'm trying to do is grab the specifics of items on a webpage, however the webpage does not load it into the original source. Does anybody have a good tutorial or a good place to start? For example, I wo... | [
"c#"
] | 1 | 1 | 3,371 | 4 | 0 | 2011-06-06T01:24:10.880000 | 2011-06-07T02:11:41.383000 |
6,247,066 | 6,247,166 | PHP - Reasons to use Iterators? | I was perusing the manual today and noticed the various iterators. To me, it seems like they are all somewhat pointless; I don't see a reason to use them unless you prefer their syntax, or don't know how to write a recursive function. Are there any reasons to use built-in iterators in PHP over just writing a loop or ma... | I believe the main reason is versatility. They don't make things more readable and you can accomplish most of what the spl iterators do with a simple foreach. But iterators can serve as sort of a compacted loop or loop source that you can pass around. You can have more diverse data sources than just a list/array. And t... | PHP - Reasons to use Iterators? I was perusing the manual today and noticed the various iterators. To me, it seems like they are all somewhat pointless; I don't see a reason to use them unless you prefer their syntax, or don't know how to write a recursive function. Are there any reasons to use built-in iterators in PH... | TITLE:
PHP - Reasons to use Iterators?
QUESTION:
I was perusing the manual today and noticed the various iterators. To me, it seems like they are all somewhat pointless; I don't see a reason to use them unless you prefer their syntax, or don't know how to write a recursive function. Are there any reasons to use built-... | [
"php",
"iterator"
] | 27 | 20 | 9,946 | 5 | 0 | 2011-06-06T01:24:29.813000 | 2011-06-06T01:50:37.837000 |
6,247,070 | 6,247,242 | Error implementing "AND" and "OR" in c++ | With reference to my previous question, How can i implement AND and OR operations in c++ My next question is, Sometimes it outputs some weird numbers for example 110010 & 010101 = 110591. Why does that happen? #include #include using namespace std;
int main () { long int s; long int l; long int r;
cin>>s; cout< >l; c... | For the question -- how to input binary numbers instead of decimal. You can read them as strings, and then convert them assuming that they are base 2. So, code like this (not tested!): std::string s_str;
cin >> s_str;... // now convert as if it's a binary string, thats what the last arg following does s = strtol(s_str... | Error implementing "AND" and "OR" in c++ With reference to my previous question, How can i implement AND and OR operations in c++ My next question is, Sometimes it outputs some weird numbers for example 110010 & 010101 = 110591. Why does that happen? #include #include using namespace std;
int main () { long int s; lon... | TITLE:
Error implementing "AND" and "OR" in c++
QUESTION:
With reference to my previous question, How can i implement AND and OR operations in c++ My next question is, Sometimes it outputs some weird numbers for example 110010 & 010101 = 110591. Why does that happen? #include #include using namespace std;
int main ()... | [
"c++",
"mips",
"instructions"
] | 1 | 1 | 1,269 | 6 | 0 | 2011-06-06T01:25:09.477000 | 2011-06-06T02:07:34.697000 |
6,247,077 | 6,247,109 | background:url is not displayed properly | I'm stuck. I created an image and want it to be a background image accessed through CSS for the navigation menu with text placed over it in HTML. Here is my CSS:.menu_item { background:url(../images/menu_normal.png) no-repeat; } Here is the HTML: Quotation Form About Services For Translators Free Quotation Here is the ... | You'll need something like:.menu_item { background: url("../images/menu_normal.png") no-repeat scroll 0 0 transparent; float: left; height: 53px; line-height: 53px; list-style: none; text-align: center; width: 227px; } | background:url is not displayed properly I'm stuck. I created an image and want it to be a background image accessed through CSS for the navigation menu with text placed over it in HTML. Here is my CSS:.menu_item { background:url(../images/menu_normal.png) no-repeat; } Here is the HTML: Quotation Form About Services Fo... | TITLE:
background:url is not displayed properly
QUESTION:
I'm stuck. I created an image and want it to be a background image accessed through CSS for the navigation menu with text placed over it in HTML. Here is my CSS:.menu_item { background:url(../images/menu_normal.png) no-repeat; } Here is the HTML: Quotation Form... | [
"html",
"css"
] | 0 | 2 | 121 | 3 | 0 | 2011-06-06T01:27:14.160000 | 2011-06-06T01:35:03.620000 |
6,247,085 | 6,247,222 | Right way to escape strings in PHP when making XML | Possible Duplicate: How do you make strings XML“safe”? I am making xml and part of the code looks like this: echo 'description="'.$description. '" '; When there are apostrophes is the description variable, the code works fine, but when there are apostrophized, the code breaks. What is the right way for me to escape the... | I would avoid CDATA like the plague, especially if the contents of your XML is to be acted well upon. CDATA simply hides whatever it wraps away. I always use htmlentities() to make sure, although most often you'll get into trouble with ampersands. Also, you can't CDATA parameters, so the other suggestions doesn't addre... | Right way to escape strings in PHP when making XML Possible Duplicate: How do you make strings XML“safe”? I am making xml and part of the code looks like this: echo 'description="'.$description. '" '; When there are apostrophes is the description variable, the code works fine, but when there are apostrophized, the code... | TITLE:
Right way to escape strings in PHP when making XML
QUESTION:
Possible Duplicate: How do you make strings XML“safe”? I am making xml and part of the code looks like this: echo 'description="'.$description. '" '; When there are apostrophes is the description variable, the code works fine, but when there are apost... | [
"php"
] | 0 | 1 | 3,156 | 3 | 0 | 2011-06-06T01:29:29.963000 | 2011-06-06T02:03:12.660000 |
6,247,091 | 6,247,103 | User authentication in RoR - should it be in the User handler or its own Authentication handler? | I'm writing user authentication (sign in/sign out) right now in RoR and am wondering if its better to put it in the User handler, or make its own handler. Anyone who has used RoR, what's your take on this? | I would make it so that any model can utilize the authentication, thus create it like a gem. However, i would highly recommend that you use a ready made solution, like Devise. | User authentication in RoR - should it be in the User handler or its own Authentication handler? I'm writing user authentication (sign in/sign out) right now in RoR and am wondering if its better to put it in the User handler, or make its own handler. Anyone who has used RoR, what's your take on this? | TITLE:
User authentication in RoR - should it be in the User handler or its own Authentication handler?
QUESTION:
I'm writing user authentication (sign in/sign out) right now in RoR and am wondering if its better to put it in the User handler, or make its own handler. Anyone who has used RoR, what's your take on this?... | [
"ruby-on-rails",
"authentication"
] | 0 | 0 | 79 | 1 | 0 | 2011-06-06T01:31:23.787000 | 2011-06-06T01:33:10.717000 |
6,247,092 | 6,247,186 | Sharepoint 2010 Exclusive columns? | Does anyone know a way to have two columns in a SP2010 list that are exclusive? I need to ensure that there is only a value for ONE column, not both. Basically I need the following structure: Category List -> SubCategory List (with a lookup to Category) -> Value (with a lookup to SubCategory). But, if there is no SubCa... | Using either a list Event Receiver (SPItemEventReceiver) or a Custom Workflow should be able to achieve these desired semantics. I do not believe the model itself can represent such relationships. An alternative might be to have different content types, for which only one of the columns applies (to each). Happy coding. | Sharepoint 2010 Exclusive columns? Does anyone know a way to have two columns in a SP2010 list that are exclusive? I need to ensure that there is only a value for ONE column, not both. Basically I need the following structure: Category List -> SubCategory List (with a lookup to Category) -> Value (with a lookup to SubC... | TITLE:
Sharepoint 2010 Exclusive columns?
QUESTION:
Does anyone know a way to have two columns in a SP2010 list that are exclusive? I need to ensure that there is only a value for ONE column, not both. Basically I need the following structure: Category List -> SubCategory List (with a lookup to Category) -> Value (wit... | [
"sharepoint",
"sharepoint-2010",
"sharepoint-2007"
] | 2 | 1 | 90 | 1 | 0 | 2011-06-06T01:31:28.273000 | 2011-06-06T01:54:37.040000 |
6,247,101 | 6,247,306 | Default Eclipse Theme for Android Development Spinners? | The color of my Spinner widgets change from phone to phone based on there settings,I would like to keep them the same between all phones and I would like to have it be the default eclipse uses in its emulators the color is silverish. Can you please let me know how to apply this specific theme to my Spinner in xml. Than... | download the images used in for the spinner from the android source code: spinner_press.9.png, spinner_select.9.png, spinner_normal.9.png then create selector using those. this is the default selector: | Default Eclipse Theme for Android Development Spinners? The color of my Spinner widgets change from phone to phone based on there settings,I would like to keep them the same between all phones and I would like to have it be the default eclipse uses in its emulators the color is silverish. Can you please let me know how... | TITLE:
Default Eclipse Theme for Android Development Spinners?
QUESTION:
The color of my Spinner widgets change from phone to phone based on there settings,I would like to keep them the same between all phones and I would like to have it be the default eclipse uses in its emulators the color is silverish. Can you plea... | [
"android",
"xml",
"android-xml"
] | 2 | 0 | 536 | 2 | 0 | 2011-06-06T01:33:10.053000 | 2011-06-06T02:23:43.840000 |
6,247,111 | 6,247,223 | Creating functions over Enumerations | I just started learning Haskell. I think I've got the basics down, but I want to make sure I'm actually forcing myself to think functionally too. data Dir = Right | Left | Front | Back | Up | Down deriving (Show, Eq, Enum) inv Right = Left inv Front = Back inv Up = Down Anyway, the jist of what I'm trying to do is to c... | If the pairing between Up and Down and so on is an important feature then maybe this knowledge should be reflected in the type. data Axis = UpDown | LeftRight | FrontBack data Sign = Positive | Negative data Dir = Dir Axis Sign inv is now easy. | Creating functions over Enumerations I just started learning Haskell. I think I've got the basics down, but I want to make sure I'm actually forcing myself to think functionally too. data Dir = Right | Left | Front | Back | Up | Down deriving (Show, Eq, Enum) inv Right = Left inv Front = Back inv Up = Down Anyway, the ... | TITLE:
Creating functions over Enumerations
QUESTION:
I just started learning Haskell. I think I've got the basics down, but I want to make sure I'm actually forcing myself to think functionally too. data Dir = Right | Left | Front | Back | Up | Down deriving (Show, Eq, Enum) inv Right = Left inv Front = Back inv Up =... | [
"haskell",
"algebraic-data-types"
] | 13 | 18 | 368 | 5 | 0 | 2011-06-06T01:35:58.877000 | 2011-06-06T02:03:30.753000 |
6,247,112 | 6,247,143 | Why is there a gap in my layout? | Its been a few hours now and I cannot figure out why there is a gap in my layout. picture: http://dl.dropbox.com/u/4123377/gap.png html: http://pastebin.com/7WktN5EA css: http://pastebin.com/Fj8rukJ8 The button is "#login" | The #login ul ul seems to be setting a top value of 50, which applies to the first element as well as all the others - so the first element seems to be causing the gap. #login ul ul { background-image: url(../assets/loggeddarkfill.png); background-repeat: no-repeat; position: absolute; top: 50px; /* this guy */ visibil... | Why is there a gap in my layout? Its been a few hours now and I cannot figure out why there is a gap in my layout. picture: http://dl.dropbox.com/u/4123377/gap.png html: http://pastebin.com/7WktN5EA css: http://pastebin.com/Fj8rukJ8 The button is "#login" | TITLE:
Why is there a gap in my layout?
QUESTION:
Its been a few hours now and I cannot figure out why there is a gap in my layout. picture: http://dl.dropbox.com/u/4123377/gap.png html: http://pastebin.com/7WktN5EA css: http://pastebin.com/Fj8rukJ8 The button is "#login"
ANSWER:
The #login ul ul seems to be setting ... | [
"html",
"css"
] | 0 | 1 | 102 | 2 | 0 | 2011-06-06T01:36:06.267000 | 2011-06-06T01:45:47.423000 |
6,247,114 | 6,248,122 | Adding a Navigation Controller to an existing project | I'm sure this is something stupid (it nearly always is when I finally decide to post:) but I can't seem to figure it out, so here goes: I have a project which contains a UITableViewController (among others) which works fine, but I decided I wanted to enable editing on it and that means it needs to be contained within a... | In your AppDelegate.h class UINavigationController *navigationController; In your AppDelegate.m class - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [self.w... | Adding a Navigation Controller to an existing project I'm sure this is something stupid (it nearly always is when I finally decide to post:) but I can't seem to figure it out, so here goes: I have a project which contains a UITableViewController (among others) which works fine, but I decided I wanted to enable editing ... | TITLE:
Adding a Navigation Controller to an existing project
QUESTION:
I'm sure this is something stupid (it nearly always is when I finally decide to post:) but I can't seem to figure it out, so here goes: I have a project which contains a UITableViewController (among others) which works fine, but I decided I wanted ... | [
"iphone",
"uinavigationcontroller",
"uitableview"
] | 0 | 0 | 664 | 4 | 0 | 2011-06-06T01:36:56.650000 | 2011-06-06T05:33:43.293000 |
6,247,133 | 6,247,273 | Why doesn't XDocument.Parse() parse my XML properly? | I am trying to use XDocument.Parse(string s) to parse some XML that is being returned from a REST based API. After the XML is parsed, it creates a new XDocument, but the document doesn't contain the properly parsed XML nodes. The name of the first node is the correct node name, but the value is the the concatenation of... | That's the expected behavior. The Value of a an XML element is concatenation of values of all its children. If you want to actually access the XML, read something about LINQ to XML or classes in the System.Xml.Linq namespace. | Why doesn't XDocument.Parse() parse my XML properly? I am trying to use XDocument.Parse(string s) to parse some XML that is being returned from a REST based API. After the XML is parsed, it creates a new XDocument, but the document doesn't contain the properly parsed XML nodes. The name of the first node is the correct... | TITLE:
Why doesn't XDocument.Parse() parse my XML properly?
QUESTION:
I am trying to use XDocument.Parse(string s) to parse some XML that is being returned from a REST based API. After the XML is parsed, it creates a new XDocument, but the document doesn't contain the properly parsed XML nodes. The name of the first n... | [
"c#",
".net",
"linq"
] | 0 | 2 | 613 | 2 | 0 | 2011-06-06T01:42:24.547000 | 2011-06-06T02:14:37.570000 |
6,247,141 | 6,247,651 | Core Graphics Vs Images for a custom button | When should I go with core graphics over images for making a custom UIButton? Is core graphics faster? Other than resolution independence, are there any other major benefits? | Pros of Core Graphics: Code for drawing a button will probably be smaller than an image file. Allows dynamic modification, slight changes without adding a complete second image. As you mentioned, resolution independent. Less memory intensive (doesn't allocate memory to hold every pixel). Pros of images: Creating the im... | Core Graphics Vs Images for a custom button When should I go with core graphics over images for making a custom UIButton? Is core graphics faster? Other than resolution independence, are there any other major benefits? | TITLE:
Core Graphics Vs Images for a custom button
QUESTION:
When should I go with core graphics over images for making a custom UIButton? Is core graphics faster? Other than resolution independence, are there any other major benefits?
ANSWER:
Pros of Core Graphics: Code for drawing a button will probably be smaller ... | [
"iphone",
"ios"
] | 6 | 11 | 1,416 | 2 | 0 | 2011-06-06T01:45:30.950000 | 2011-06-06T04:02:22.210000 |
6,247,142 | 6,247,999 | Multiline Combobox in WPF | I'm trying to find an example of a multi line user editable combobox for WPF. We've tried various things with a custom template but can't make it work. The specific problem we're trying to solve is displaying a list of addresses in a drop down where the user can type in new ones at the same time. Typing into a combobox... | If we want show Textbox in ComboBox we can override the ItemTemplate of ComboBox. And to display multiline text we can set AcceptReturn="True" for TextBox. Is this what you need or am I missing something? | Multiline Combobox in WPF I'm trying to find an example of a multi line user editable combobox for WPF. We've tried various things with a custom template but can't make it work. The specific problem we're trying to solve is displaying a list of addresses in a drop down where the user can type in new ones at the same ti... | TITLE:
Multiline Combobox in WPF
QUESTION:
I'm trying to find an example of a multi line user editable combobox for WPF. We've tried various things with a custom template but can't make it work. The specific problem we're trying to solve is displaying a list of addresses in a drop down where the user can type in new o... | [
"wpf",
"combobox"
] | 2 | 1 | 3,535 | 1 | 0 | 2011-06-06T01:45:35.887000 | 2011-06-06T05:11:18.527000 |
6,247,144 | 6,247,181 | How to load a folder from a .jar? | OK. So I have a pretty simple question: I want to be able to load a resource (a whole folder) from inside a running.jar file, but I have not been able to get it to work. This is what I have tried (if the class name were "myClass" and the folder being called "myFolder"), but it always throws a NullPointerException: URL ... | There's no way this will work. You're trying to create a File object from a resource inside a JAR. That isn't going to happen. The best method to load resources is to make one your package folders a resource folder, then make a Resources.jar in it or something, dump your resources in the same dir, and then use Resource... | How to load a folder from a .jar? OK. So I have a pretty simple question: I want to be able to load a resource (a whole folder) from inside a running.jar file, but I have not been able to get it to work. This is what I have tried (if the class name were "myClass" and the folder being called "myFolder"), but it always t... | TITLE:
How to load a folder from a .jar?
QUESTION:
OK. So I have a pretty simple question: I want to be able to load a resource (a whole folder) from inside a running.jar file, but I have not been able to get it to work. This is what I have tried (if the class name were "myClass" and the folder being called "myFolder"... | [
"java",
"url",
"resources",
"directory"
] | 7 | 22 | 16,562 | 4 | 0 | 2011-06-06T01:45:55.920000 | 2011-06-06T01:53:42.517000 |
6,247,145 | 6,247,164 | How to query a first name and last name string in MySql | I'm new to database and querying in MySql. I have a table in my database with id, fistname, middlename and lastname. In my webapp, I have a search box so that I can search my database using the firstname, middlename and lastname and it will display the result in my web app. Do I need to use SELECT statement to do this ... | select id, firstname, middlename, lastname where firstname like '%searchterm%' or middlename like '%searchterm%' or lastname like '%searchterm%' this will give you a very broad result, as it matches on the search term anywhere within any of the name fields. you can also use 'searchterm%' to match ones starting with the... | How to query a first name and last name string in MySql I'm new to database and querying in MySql. I have a table in my database with id, fistname, middlename and lastname. In my webapp, I have a search box so that I can search my database using the firstname, middlename and lastname and it will display the result in m... | TITLE:
How to query a first name and last name string in MySql
QUESTION:
I'm new to database and querying in MySql. I have a table in my database with id, fistname, middlename and lastname. In my webapp, I have a search box so that I can search my database using the firstname, middlename and lastname and it will displ... | [
"mysql"
] | 0 | 2 | 2,838 | 1 | 0 | 2011-06-06T01:45:59.203000 | 2011-06-06T01:50:07.747000 |
6,247,146 | 6,247,313 | WebView NOT opening android default video player? | when I view this page on my android device' default web browser and click the first video, it triggers the default video player of my device. It loads and play. However when I view the same link in my app, using a WebView, it does not open the default video player. What could be the problem? I'm using the webview code ... | You have to attach your own WebViewClient and override shouldOverrideUrlLoading() if you detect a URL with a supported video mimetype return true and then launch the default activity with the URL. Here is an untested sample. mWebView.setWebViewClient(new WebViewClient(){
public boolean shouldOverrideUrlLoading(Webview... | WebView NOT opening android default video player? when I view this page on my android device' default web browser and click the first video, it triggers the default video player of my device. It loads and play. However when I view the same link in my app, using a WebView, it does not open the default video player. What... | TITLE:
WebView NOT opening android default video player?
QUESTION:
when I view this page on my android device' default web browser and click the first video, it triggers the default video player of my device. It loads and play. However when I view the same link in my app, using a WebView, it does not open the default ... | [
"java",
"android",
"webview"
] | 5 | 3 | 12,684 | 2 | 0 | 2011-06-06T01:46:01.550000 | 2011-06-06T02:25:01.553000 |
6,247,148 | 6,247,249 | tmpfile() on windows 7 x64 | Running the following code on Windows 7 x64 #include #include int main() { int i; FILE *tmp; for (i = 0; i < 10000; i++) { errno = 0; if(!(tmp = tmpfile())) printf("Fail %d, err %d\n", i, errno); fclose(tmp); } return 0; } Gives errno 13 (Permission denied), on the 637th and 1004th call, it works fine on XP (haven't tr... | A bit of a refresher from the manpage of on tmpfile(), which returns a FILE*: The file will be automatically deleted when it is closed or the program terminates. My verdict for this issue: Deleting a file on Windows is weird. When you delete a file on Windows, for as long as something holds a handle, you can't call Cre... | tmpfile() on windows 7 x64 Running the following code on Windows 7 x64 #include #include int main() { int i; FILE *tmp; for (i = 0; i < 10000; i++) { errno = 0; if(!(tmp = tmpfile())) printf("Fail %d, err %d\n", i, errno); fclose(tmp); } return 0; } Gives errno 13 (Permission denied), on the 637th and 1004th call, it w... | TITLE:
tmpfile() on windows 7 x64
QUESTION:
Running the following code on Windows 7 x64 #include #include int main() { int i; FILE *tmp; for (i = 0; i < 10000; i++) { errno = 0; if(!(tmp = tmpfile())) printf("Fail %d, err %d\n", i, errno); fclose(tmp); } return 0; } Gives errno 13 (Permission denied), on the 637th and... | [
"c",
"windows-7-x64",
"errno",
"temporary-files"
] | 2 | 3 | 3,833 | 2 | 0 | 2011-06-06T01:46:43.140000 | 2011-06-06T02:09:00.193000 |
6,247,153 | 6,247,163 | Angle from 2D unit vector? | Given unit vector (0.5, 0.5) how could I find the angle (its direction)? Is it cos(x) + sin(y)? | Given y and x, the angle with the x axis is given by: atan2(y, x) // note that Y is first With (0.5, 0.5) the angle is: radians: In [2]: math.atan2(0.5, 0.5) Out[2]: 0.7853981633974483 degrees: In [3]: math.atan2(0.5, 0.5)*180/math.pi Out[3]: 45.0 | Angle from 2D unit vector? Given unit vector (0.5, 0.5) how could I find the angle (its direction)? Is it cos(x) + sin(y)? | TITLE:
Angle from 2D unit vector?
QUESTION:
Given unit vector (0.5, 0.5) how could I find the angle (its direction)? Is it cos(x) + sin(y)?
ANSWER:
Given y and x, the angle with the x axis is given by: atan2(y, x) // note that Y is first With (0.5, 0.5) the angle is: radians: In [2]: math.atan2(0.5, 0.5) Out[2]: 0.78... | [
"c++",
"vector",
"angle"
] | 49 | 115 | 101,025 | 3 | 0 | 2011-06-06T01:47:36.393000 | 2011-06-06T01:49:59.897000 |
6,247,174 | 6,247,190 | Add time to javascript clock | I want to be able to add a specified time to a javascript clock and have it keep updating. I have managed to chuck the below together. function leadTimer(leadTime) { var d1 = new Date (), d2 = new Date ( d1 ); d2.setMinutes ( d1.getMinutes() + leadTime ); currentHours = d2.getHours(); currentMins = d2.getMinutes(); // ... | You've almost got it; the preferred way to use setInterval is to give it a function as the first argument, so try changing your last line to this instead: setInterval(function(){leadTimer(leadTime)}, 10000); | Add time to javascript clock I want to be able to add a specified time to a javascript clock and have it keep updating. I have managed to chuck the below together. function leadTimer(leadTime) { var d1 = new Date (), d2 = new Date ( d1 ); d2.setMinutes ( d1.getMinutes() + leadTime ); currentHours = d2.getHours(); curre... | TITLE:
Add time to javascript clock
QUESTION:
I want to be able to add a specified time to a javascript clock and have it keep updating. I have managed to chuck the below together. function leadTimer(leadTime) { var d1 = new Date (), d2 = new Date ( d1 ); d2.setMinutes ( d1.getMinutes() + leadTime ); currentHours = d2... | [
"javascript"
] | 2 | 5 | 415 | 1 | 0 | 2011-06-06T01:51:53.300000 | 2011-06-06T01:55:26.873000 |
6,247,180 | 6,247,285 | How to have the 'string line' in the same scope as the 'getline(in,line)' in a 'while(getline(...))' loop? | Example: std::ifstream in("some_file.txt"); std::string line; // must be outside? while(getline(in,line)){ // how to make 'line' only available inside of 'while'? } Do-while loops won't work for the first iteration: std::ifstream in("some_fule.txt");
do{ std::string line; // line will be empty on first iteration }whil... | A for loop will work, I do this all the time: for (std::string line; getline(in,line); ) { } | How to have the 'string line' in the same scope as the 'getline(in,line)' in a 'while(getline(...))' loop? Example: std::ifstream in("some_file.txt"); std::string line; // must be outside? while(getline(in,line)){ // how to make 'line' only available inside of 'while'? } Do-while loops won't work for the first iteratio... | TITLE:
How to have the 'string line' in the same scope as the 'getline(in,line)' in a 'while(getline(...))' loop?
QUESTION:
Example: std::ifstream in("some_file.txt"); std::string line; // must be outside? while(getline(in,line)){ // how to make 'line' only available inside of 'while'? } Do-while loops won't work for ... | [
"c++",
"scope",
"while-loop",
"getline"
] | 2 | 3 | 230 | 3 | 0 | 2011-06-06T01:53:13.490000 | 2011-06-06T02:17:26.910000 |
6,247,188 | 6,247,250 | all services on one port, or each service on its own port? | need to make a bunch (20+) of services (usually single purpose services - such as user management - with multiple methods). is it better for each service to be on its own port / in its own project in visual studio OR do them all at once on a single port in a single project? what is the best from scaling point of view? ... | When it comes to web services the physical TCP/IP port is really not important, you should shoot for the standard HTTP port (80) and make sure you have adequate load balancing on the web server for the expected user load. Performance on a server gets degraded when resources (memory or processing power) are on high dema... | all services on one port, or each service on its own port? need to make a bunch (20+) of services (usually single purpose services - such as user management - with multiple methods). is it better for each service to be on its own port / in its own project in visual studio OR do them all at once on a single port in a si... | TITLE:
all services on one port, or each service on its own port?
QUESTION:
need to make a bunch (20+) of services (usually single purpose services - such as user management - with multiple methods). is it better for each service to be on its own port / in its own project in visual studio OR do them all at once on a s... | [
"web-services",
"visual-studio-2010",
"iis",
"port"
] | 0 | 2 | 304 | 1 | 0 | 2011-06-06T01:54:50.660000 | 2011-06-06T02:09:15.200000 |
6,247,221 | 6,247,238 | CSS selectors cannot match numerical attribute values? why? | I have set up a simple test page to illustrate the problem I have encountered. Briefly, this works as expected (text is formatted in bold, underlined red): hello And this does not (text stays black, no formatting applied): hello The only thing I changed between the two examples is the attribute value (in both the CSS a... | Wrap the string to match in quotes... [abc="1"] {... } jsFiddle. Attribute values must be CSS identifiers or strings. Source. When you wrap it in quotes, you are telling it to match a string. When you don't quote it, it is looking for an identifier. In CSS, identifiers (including element names, classes, and IDs in sele... | CSS selectors cannot match numerical attribute values? why? I have set up a simple test page to illustrate the problem I have encountered. Briefly, this works as expected (text is formatted in bold, underlined red): hello And this does not (text stays black, no formatting applied): hello The only thing I changed betwee... | TITLE:
CSS selectors cannot match numerical attribute values? why?
QUESTION:
I have set up a simple test page to illustrate the problem I have encountered. Briefly, this works as expected (text is formatted in bold, underlined red): hello And this does not (text stays black, no formatting applied): hello The only thin... | [
"html",
"css",
"css-selectors"
] | 9 | 13 | 5,075 | 4 | 0 | 2011-06-06T02:02:36.027000 | 2011-06-06T02:07:00.190000 |
6,247,224 | 6,247,366 | Beginner C Pointer Problem | I am a new C user have problems with pointers. The function add_word(*word_to_add) should take a c string and add it to the appropriate word_node linked list. However, subsequent additions seem to be overwriting the word element of all nodes in the hash table. I think this is happening because I am setting each nodes w... | You cannot just equate two strings or character pointers like: char* p1, p2; p1=p2; // THIS IS INVALID In your code you have done this mistake two times:-- p->word = word_to_add; and q->word = word_to_add; This says that you are making p->word point to word_to_add which is a pointer.It will just start referring to the ... | Beginner C Pointer Problem I am a new C user have problems with pointers. The function add_word(*word_to_add) should take a c string and add it to the appropriate word_node linked list. However, subsequent additions seem to be overwriting the word element of all nodes in the hash table. I think this is happening becaus... | TITLE:
Beginner C Pointer Problem
QUESTION:
I am a new C user have problems with pointers. The function add_word(*word_to_add) should take a c string and add it to the appropriate word_node linked list. However, subsequent additions seem to be overwriting the word element of all nodes in the hash table. I think this i... | [
"c",
"string",
"pointers"
] | 2 | 0 | 672 | 4 | 0 | 2011-06-06T02:03:34.647000 | 2011-06-06T02:41:11.997000 |
6,247,237 | 6,247,261 | HTML/CSS Image Navigation Bar | I'm making a navigation bar for my website. The navigation bar is a picture, and I'm wondering if in CSS you can section off parts of the image to link to different pages. Is this possible? If so, how? The map tag suggestion worked perfectly. Thanks! | You can use an html MAP tag, see http://www.w3.org/wiki/HTML/Elements/map | HTML/CSS Image Navigation Bar I'm making a navigation bar for my website. The navigation bar is a picture, and I'm wondering if in CSS you can section off parts of the image to link to different pages. Is this possible? If so, how? The map tag suggestion worked perfectly. Thanks! | TITLE:
HTML/CSS Image Navigation Bar
QUESTION:
I'm making a navigation bar for my website. The navigation bar is a picture, and I'm wondering if in CSS you can section off parts of the image to link to different pages. Is this possible? If so, how? The map tag suggestion worked perfectly. Thanks!
ANSWER:
You can use ... | [
"css",
"html"
] | 0 | 1 | 3,281 | 3 | 0 | 2011-06-06T02:06:47.570000 | 2011-06-06T02:12:12.780000 |
6,247,245 | 6,247,297 | rewrite query string | i have a url "www.abc.com/index.php?page/Secure" and i want to access it with "www.abc.com/secure" im trying to add.htaccess loging for "index.php?page/Secure" but I was told i need to use LocationMatch and to do that i need to rewrite the url. @mike, thanks your solution worked But now im getting a 500 error when i tr... | For that specific page: # Enable Rewrite Engine RewriteEngine on
#Create friendly URL RewriteRule ^secure$ index.php?page/secure [L] Try using: http://turnkey-buddy.com/mod_rewrite_tool/ It's a free rewrite generator. Works like a charm. | rewrite query string i have a url "www.abc.com/index.php?page/Secure" and i want to access it with "www.abc.com/secure" im trying to add.htaccess loging for "index.php?page/Secure" but I was told i need to use LocationMatch and to do that i need to rewrite the url. @mike, thanks your solution worked But now im getting ... | TITLE:
rewrite query string
QUESTION:
i have a url "www.abc.com/index.php?page/Secure" and i want to access it with "www.abc.com/secure" im trying to add.htaccess loging for "index.php?page/Secure" but I was told i need to use LocationMatch and to do that i need to rewrite the url. @mike, thanks your solution worked B... | [
"apache",
"url-rewriting"
] | 0 | 0 | 105 | 1 | 0 | 2011-06-06T02:08:09.227000 | 2011-06-06T02:20:16.730000 |
6,247,246 | 6,247,362 | Making back button for root view in UINavigationController | So I created a UINavigationController manually, set it as my UIWindow's rootViewController, and I would like to use a back button to exit the UINavigationController and load another viewController in its place. However, the backItem property of the UINavigationBar is readonly, so I don't know how to set it properly (it... | You can do this in a different approach. Go to the method: - (void)viewDidLoad Hide the back button with [self.navigationItem setHidesBackButton:YES animated:YES]; Create a new UIButton or a UIBarButtonItem, and place it in place of the back button. You can then use an action when you click the button - (IBAction) clic... | Making back button for root view in UINavigationController So I created a UINavigationController manually, set it as my UIWindow's rootViewController, and I would like to use a back button to exit the UINavigationController and load another viewController in its place. However, the backItem property of the UINavigation... | TITLE:
Making back button for root view in UINavigationController
QUESTION:
So I created a UINavigationController manually, set it as my UIWindow's rootViewController, and I would like to use a back button to exit the UINavigationController and load another viewController in its place. However, the backItem property o... | [
"objective-c",
"ios",
"uinavigationcontroller"
] | 11 | 16 | 8,661 | 3 | 0 | 2011-06-06T02:08:54.540000 | 2011-06-06T02:40:15.010000 |
6,247,248 | 6,247,293 | The grand, unified theory of PHP error handling | aka, Seeking generic Error Handler (ΟΚ to use commercially) I doubt that I am the best PHP programmer around, so, although I have my own generic error handler for set_error_handler(), I wondered what others do and if there is a "best" (sorry if that sounds subjective - I just want to draw out general approaches (but ev... | I suggest to go the "Exceptions" way. Throw exceptions when there's a user error, and you can convert php errors into exceptions, like this: function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_han... | The grand, unified theory of PHP error handling aka, Seeking generic Error Handler (ΟΚ to use commercially) I doubt that I am the best PHP programmer around, so, although I have my own generic error handler for set_error_handler(), I wondered what others do and if there is a "best" (sorry if that sounds subjective - I ... | TITLE:
The grand, unified theory of PHP error handling
QUESTION:
aka, Seeking generic Error Handler (ΟΚ to use commercially) I doubt that I am the best PHP programmer around, so, although I have my own generic error handler for set_error_handler(), I wondered what others do and if there is a "best" (sorry if that soun... | [
"php",
"error-handling"
] | 23 | 28 | 1,801 | 3 | 0 | 2011-06-06T02:09:00.003000 | 2011-06-06T02:19:47.267000 |
6,247,260 | 6,247,274 | Add whitespace after comma | I'm having some trouble figuring this out. I have the following CSV string hello world, hello world, hello The middle value has excess whitespaces. I'm trimming that using preg_replace('/( )+/', ' ', $string) The function is excellent but it removes the whitespaces after the commas as well. It becomes.. hello world,hel... | This will match 2 or more spaces together and replace with a singular space. It won't match a space after a comma. preg_replace('/(? RegExr | Add whitespace after comma I'm having some trouble figuring this out. I have the following CSV string hello world, hello world, hello The middle value has excess whitespaces. I'm trimming that using preg_replace('/( )+/', ' ', $string) The function is excellent but it removes the whitespaces after the commas as well. I... | TITLE:
Add whitespace after comma
QUESTION:
I'm having some trouble figuring this out. I have the following CSV string hello world, hello world, hello The middle value has excess whitespaces. I'm trimming that using preg_replace('/( )+/', ' ', $string) The function is excellent but it removes the whitespaces after the... | [
"php",
"arrays",
"string",
"function"
] | 4 | 5 | 12,873 | 3 | 0 | 2011-06-06T02:12:09.957000 | 2011-06-06T02:14:43.510000 |
6,247,266 | 6,247,351 | Using jQuery .Live to persist .Net UpdatePanel partial Postback Not Working | I am new to jQuery. I am trying to convert this jQuery code so that it persists after I call a.Net Ajax partial postback in my page. The code below runs when the page initially loads, but not after I do a postback in the updatePanel. Do I need to use the.live function somewhere else in my code to get this to work? Code... | A better bet might be to hook the add_pageLoaded event of the PageRequestManager. This is an article that describes how to do it. Then put the jQuery stuff in a method and call it in the event. | Using jQuery .Live to persist .Net UpdatePanel partial Postback Not Working I am new to jQuery. I am trying to convert this jQuery code so that it persists after I call a.Net Ajax partial postback in my page. The code below runs when the page initially loads, but not after I do a postback in the updatePanel. Do I need ... | TITLE:
Using jQuery .Live to persist .Net UpdatePanel partial Postback Not Working
QUESTION:
I am new to jQuery. I am trying to convert this jQuery code so that it persists after I call a.Net Ajax partial postback in my page. The code below runs when the page initially loads, but not after I do a postback in the updat... | [
"jquery",
"asp.net",
"ajax",
"updatepanel"
] | 1 | 1 | 1,793 | 1 | 0 | 2011-06-06T02:12:49.443000 | 2011-06-06T02:36:19.230000 |
6,247,276 | 6,247,301 | JQuery .ajax with Chrome | I get a jQuery AJAX response from localhost with var ajaxsrc = $.ajax({type:"GET", url: "http://localhost:4540/get.aspx?i=<%=Request.QueryString["i"] %>",data:"",dataType: "html"}).responseText; alert(ajaxsrc); IE alerts the correct text but Chrome alerts empty strings. When I check with developer console I see that it... | From the jQuery.ajax page: Note that this usage - returning the result of the call into a variable - requires a synchronous (blocking) request! (async:false) You need to have async: false in the settings object if you're going to do that kind of assignment with.responseText. You're probably better off passing a success... | JQuery .ajax with Chrome I get a jQuery AJAX response from localhost with var ajaxsrc = $.ajax({type:"GET", url: "http://localhost:4540/get.aspx?i=<%=Request.QueryString["i"] %>",data:"",dataType: "html"}).responseText; alert(ajaxsrc); IE alerts the correct text but Chrome alerts empty strings. When I check with develo... | TITLE:
JQuery .ajax with Chrome
QUESTION:
I get a jQuery AJAX response from localhost with var ajaxsrc = $.ajax({type:"GET", url: "http://localhost:4540/get.aspx?i=<%=Request.QueryString["i"] %>",data:"",dataType: "html"}).responseText; alert(ajaxsrc); IE alerts the correct text but Chrome alerts empty strings. When I... | [
"jquery",
"ajax",
"google-chrome"
] | 0 | 1 | 753 | 2 | 0 | 2011-06-06T02:15:19.990000 | 2011-06-06T02:22:29.900000 |
6,247,280 | 6,247,304 | imagestring issue with PHP 5.3 | Here is my function: imagestring($destination, 4, 68, 90, $text, black); That function had always worked for the past 2 years, but since I updated PHP to 5.3, the following error message is displayed: Warning: imagestring() expects parameter 6 to be long, string given in /home/... on line... What is wrong and what corr... | imagestring($destination, 4, 68, 90, $text, black); Unless you have defined black as a constant, this is the wrong syntax anyway. This should've been wrong for the past two years, but I suppose PHP's error checking became stricter in 5.3 and/or warnings became enabled. It just happened to produce the desired result thr... | imagestring issue with PHP 5.3 Here is my function: imagestring($destination, 4, 68, 90, $text, black); That function had always worked for the past 2 years, but since I updated PHP to 5.3, the following error message is displayed: Warning: imagestring() expects parameter 6 to be long, string given in /home/... on line... | TITLE:
imagestring issue with PHP 5.3
QUESTION:
Here is my function: imagestring($destination, 4, 68, 90, $text, black); That function had always worked for the past 2 years, but since I updated PHP to 5.3, the following error message is displayed: Warning: imagestring() expects parameter 6 to be long, string given in... | [
"php"
] | 0 | 2 | 2,094 | 3 | 0 | 2011-06-06T02:16:25.073000 | 2011-06-06T02:23:03.290000 |
6,247,281 | 6,247,345 | SQL CE Codefirst not generating columns for enum types | This is somewhat new territory for me. I'm using MVC3 with SQL CompactEdition version 4.0 and EntityFramework version 4.1 (with CodeFirst), and MVC Scaffolding by Steven Sanderson (although I don't think that last point is relevant). I've got several different model classes that have properties that are enums. I find t... | EF does not support enums, plain and simple. The easiest workaround is having a mapped property that converts the enum to/from a string or int (depending on how you want to store the values) The alternative, of course, is choosing a more mature framework (NHibernate is the one I like, but there are others) | SQL CE Codefirst not generating columns for enum types This is somewhat new territory for me. I'm using MVC3 with SQL CompactEdition version 4.0 and EntityFramework version 4.1 (with CodeFirst), and MVC Scaffolding by Steven Sanderson (although I don't think that last point is relevant). I've got several different mode... | TITLE:
SQL CE Codefirst not generating columns for enum types
QUESTION:
This is somewhat new territory for me. I'm using MVC3 with SQL CompactEdition version 4.0 and EntityFramework version 4.1 (with CodeFirst), and MVC Scaffolding by Steven Sanderson (although I don't think that last point is relevant). I've got seve... | [
"entity-framework",
"ef-code-first",
"sql-server-ce"
] | 0 | 3 | 416 | 1 | 0 | 2011-06-06T02:16:30.607000 | 2011-06-06T02:33:09.363000 |
6,247,290 | 6,247,371 | How to display a Subclass of UIControl on the screen | I have created a subclass of UIControl called ToggleImageControl via the following code (with reference to the following post Checkbox image toggle in UITableViewCell ) @interface ToggleImageControl: UIControl { BOOL photoIsStarred; UIImageView *imageView; UIImage *normalImage; UIImage *selectedImage; }
@property (non... | Make sure to call [super initWithFrame:frame] in your initWithFrame: method. e.x. self = [super initWithFrame:frame]; if (self) {
// Initialization
}
return self; | How to display a Subclass of UIControl on the screen I have created a subclass of UIControl called ToggleImageControl via the following code (with reference to the following post Checkbox image toggle in UITableViewCell ) @interface ToggleImageControl: UIControl { BOOL photoIsStarred; UIImageView *imageView; UIImage *n... | TITLE:
How to display a Subclass of UIControl on the screen
QUESTION:
I have created a subclass of UIControl called ToggleImageControl via the following code (with reference to the following post Checkbox image toggle in UITableViewCell ) @interface ToggleImageControl: UIControl { BOOL photoIsStarred; UIImageView *ima... | [
"objective-c",
"ios",
"uiimage",
"subclass",
"uicontrol"
] | 2 | 5 | 1,220 | 1 | 0 | 2011-06-06T02:18:34.193000 | 2011-06-06T02:42:36.633000 |
6,247,302 | 6,248,114 | Integrate YAF.NET in my existing ASP.NET WebForm project | Ok so I have a website and I want to integrate it with YAF.NET, I'd like YAF.NET to use the same Membership Provider as my web application already does, and I was wondering what would be the best way to achieve this result. I have both the webapp and YAF working perfectly fine on their own. I thought maybe the best way... | Yet Another Forum.NET uses standard ASP.NET Membership defined in the web.config. Change the membership provider in web.config file. | Integrate YAF.NET in my existing ASP.NET WebForm project Ok so I have a website and I want to integrate it with YAF.NET, I'd like YAF.NET to use the same Membership Provider as my web application already does, and I was wondering what would be the best way to achieve this result. I have both the webapp and YAF working ... | TITLE:
Integrate YAF.NET in my existing ASP.NET WebForm project
QUESTION:
Ok so I have a website and I want to integrate it with YAF.NET, I'd like YAF.NET to use the same Membership Provider as my web application already does, and I was wondering what would be the best way to achieve this result. I have both the webap... | [
"asp.net",
"integration",
"yaf"
] | 0 | 0 | 1,205 | 1 | 0 | 2011-06-06T02:22:49.177000 | 2011-06-06T05:32:14.700000 |
6,247,315 | 6,247,601 | jQuery UI: Loading Dialog While Images are Loaded | I have a website made in ASP.NET MVC3 with the Razor rendering view. Within this site I create charts (System.Web.UI.DataVisualization.Charting.Chart) and serve them as images with a controller to my view. It can take anywhere from 1 to 5 seconds to load the charts. Therefore, I wish to show a loading modal dialog to g... | If you have Separate URL for each image that you can load via jQuery you can hook into the load event and when it's done hide the wait image. Would this approach work for you? If so I'll edit and add code. | jQuery UI: Loading Dialog While Images are Loaded I have a website made in ASP.NET MVC3 with the Razor rendering view. Within this site I create charts (System.Web.UI.DataVisualization.Charting.Chart) and serve them as images with a controller to my view. It can take anywhere from 1 to 5 seconds to load the charts. The... | TITLE:
jQuery UI: Loading Dialog While Images are Loaded
QUESTION:
I have a website made in ASP.NET MVC3 with the Razor rendering view. Within this site I create charts (System.Web.UI.DataVisualization.Charting.Chart) and serve them as images with a controller to my view. It can take anywhere from 1 to 5 seconds to lo... | [
"javascript",
"html",
"jquery-ui",
"asp.net-mvc-3",
"jquery-ui-dialog"
] | 0 | 0 | 867 | 2 | 0 | 2011-06-06T02:25:48.900000 | 2011-06-06T03:53:02.757000 |
6,247,316 | 6,247,353 | How to make the * wildcard work in Java url API | Good day! I made a filter servlet and I am trying to not include the css and js. So I wrote this code: if (url.equals("/login.jsp") || url.equals("/login") ||url.equals("/AddApplicantServlet") ||url.equals("css/*") || url.equals("js/*") ||url.equals("/index.jsp") { chain.doFilter(request, response); } else {.... } My X... | The String.equals method checks for strict equality. You should call startsWith. You can also call matches to test it against a regex. | How to make the * wildcard work in Java url API Good day! I made a filter servlet and I am trying to not include the css and js. So I wrote this code: if (url.equals("/login.jsp") || url.equals("/login") ||url.equals("/AddApplicantServlet") ||url.equals("css/*") || url.equals("js/*") ||url.equals("/index.jsp") { chain.... | TITLE:
How to make the * wildcard work in Java url API
QUESTION:
Good day! I made a filter servlet and I am trying to not include the css and js. So I wrote this code: if (url.equals("/login.jsp") || url.equals("/login") ||url.equals("/AddApplicantServlet") ||url.equals("css/*") || url.equals("js/*") ||url.equals("/in... | [
"url",
"servlets",
"wildcard",
"servlet-filters"
] | 1 | 2 | 1,366 | 1 | 0 | 2011-06-06T02:25:59.783000 | 2011-06-06T02:36:52.407000 |
6,247,319 | 6,247,397 | PHP date into mySQL database isn't working as planned | So I've been trying to solve this one on my own for a few hours and it's driving me crazy. I'm just trying to put a date into a mySQL database, the code looks like this: $timeStarted = date("Y-m-d H:i:s", time()); $sqlquery = "INSERT INTO deviceStats (currTime,...) VALUES ($timeStarted,...)"; mysql_query($sqlquery); ec... | Your problem is that date strings in MySQL are exactly that, strings and as such must either be quoted (single quotes) or preferably, passed as parameters. Using PDO, this would be quite simple $stmt = $pdo->prepare('INSERT INTO `deviceStats` (`currTime`,...) VALUES (?,...)'); $ts = date('Y-m-d H:i:s'); $stmt->bindPara... | PHP date into mySQL database isn't working as planned So I've been trying to solve this one on my own for a few hours and it's driving me crazy. I'm just trying to put a date into a mySQL database, the code looks like this: $timeStarted = date("Y-m-d H:i:s", time()); $sqlquery = "INSERT INTO deviceStats (currTime,...) ... | TITLE:
PHP date into mySQL database isn't working as planned
QUESTION:
So I've been trying to solve this one on my own for a few hours and it's driving me crazy. I'm just trying to put a date into a mySQL database, the code looks like this: $timeStarted = date("Y-m-d H:i:s", time()); $sqlquery = "INSERT INTO deviceSta... | [
"php",
"mysql",
"datetime",
"time"
] | 1 | 2 | 155 | 2 | 0 | 2011-06-06T02:26:12.827000 | 2011-06-06T02:49:39.863000 |
6,247,321 | 6,247,328 | how can i count how many consonants are in a string so far i have this | int countConsonant(string str, int consonant) { int length = str.length(); consonant = 0;
for (int i = 0; i < length; i++) { if(str[i] == 'b'&& str[i] == 'c' && str[i] == 'd'&& str[i] == 'f' && str[i] == 'g'&& str[i] == 'h'&& str[i] == 'j' && str[i] == 'k'&& str[i] == 'l'&& str[i] == 'm' && str[i] == 'n'&& str[i] == '... | You were close, but should check with logical-or ||, not logical-and && ( str[i] simply can't be equal to two different things). The C++03 Standard allows you to use the keywords and and or - and not, xor etc - instead of these cryptic (for new programmers) symbols, but this hasn't caught on widely - perhaps because Mi... | how can i count how many consonants are in a string so far i have this int countConsonant(string str, int consonant) { int length = str.length(); consonant = 0;
for (int i = 0; i < length; i++) { if(str[i] == 'b'&& str[i] == 'c' && str[i] == 'd'&& str[i] == 'f' && str[i] == 'g'&& str[i] == 'h'&& str[i] == 'j' && str[i... | TITLE:
how can i count how many consonants are in a string so far i have this
QUESTION:
int countConsonant(string str, int consonant) { int length = str.length(); consonant = 0;
for (int i = 0; i < length; i++) { if(str[i] == 'b'&& str[i] == 'c' && str[i] == 'd'&& str[i] == 'f' && str[i] == 'g'&& str[i] == 'h'&& str[... | [
"c++",
"string"
] | 0 | 8 | 6,688 | 8 | 0 | 2011-06-06T02:26:56.463000 | 2011-06-06T02:30:15.877000 |
6,247,329 | 6,247,469 | How to Copy/Paste with Format | How can I Copy any content like this question as example and Paste it into RichtextBox or TextBlock in a WPF application With content decorations like bold, italic, images, links, HTML.., etc? Please point me to a solution or even a WPF control or anything related I just want an html container!! | TinyMCE is a platform independent WYSIWYG form plug in and it does exactly what you describe: http://tinymce.moxiecode.com/tryit/full.php Try copying your question and pasting it into the example above to see the results. Hope this helps. | How to Copy/Paste with Format How can I Copy any content like this question as example and Paste it into RichtextBox or TextBlock in a WPF application With content decorations like bold, italic, images, links, HTML.., etc? Please point me to a solution or even a WPF control or anything related I just want an html conta... | TITLE:
How to Copy/Paste with Format
QUESTION:
How can I Copy any content like this question as example and Paste it into RichtextBox or TextBlock in a WPF application With content decorations like bold, italic, images, links, HTML.., etc? Please point me to a solution or even a WPF control or anything related I just ... | [
"wpf",
"richtextbox",
"copy-paste",
"textblock"
] | 1 | 0 | 677 | 1 | 0 | 2011-06-06T02:30:34.957000 | 2011-06-06T03:13:18.550000 |
6,247,344 | 6,247,435 | Why isn't my form being submitted? | I've got a simple HTML form, thus: When the user clicks submit, I expect to see the result come back via the upload_file.php script. But on FF 4.01 on the mac, absolutely nothing happens. The URL in the address bar stays the same, and my php script doesn't get called on the server. I can get it to submit the form if I ... | Oh, ok I seem to have worked it out. I had created a few dummy files to test the script I was going to use to check file name validity. But I created them just by going to the terminal and doing touch testfile.txt testfile2.txt testfile3.txt so the files were all zero bytes. This, it seems doesn't work for FF on the ma... | Why isn't my form being submitted? I've got a simple HTML form, thus: When the user clicks submit, I expect to see the result come back via the upload_file.php script. But on FF 4.01 on the mac, absolutely nothing happens. The URL in the address bar stays the same, and my php script doesn't get called on the server. I ... | TITLE:
Why isn't my form being submitted?
QUESTION:
I've got a simple HTML form, thus: When the user clicks submit, I expect to see the result come back via the upload_file.php script. But on FF 4.01 on the mac, absolutely nothing happens. The URL in the address bar stays the same, and my php script doesn't get called... | [
"html",
"macos",
"forms",
"firefox",
"enctype"
] | 0 | 1 | 355 | 1 | 0 | 2011-06-06T02:33:04.993000 | 2011-06-06T03:01:38.097000 |
6,247,346 | 6,247,592 | Is it possible to statically create the data for a UITableView? | Is it possible to set up a UITableView/UITableViewController with static data? Or is it always required to fill out the UITableViewDataSource protocol and return individual entries and create cells on demand? In this case, what I'd like to do is just use a quick tableview controller to have a user pick from a short lis... | By "static data" do you mean hard coded rather than from a data source? Either way the process is the same. You have to return cells via cellAtIndexPath: You can do this quite simply with an "if block" assuming all you want is a couple of hard coded rows. For example: // How many sections in the table? Hard coded to 1 ... | Is it possible to statically create the data for a UITableView? Is it possible to set up a UITableView/UITableViewController with static data? Or is it always required to fill out the UITableViewDataSource protocol and return individual entries and create cells on demand? In this case, what I'd like to do is just use a... | TITLE:
Is it possible to statically create the data for a UITableView?
QUESTION:
Is it possible to set up a UITableView/UITableViewController with static data? Or is it always required to fill out the UITableViewDataSource protocol and return individual entries and create cells on demand? In this case, what I'd like t... | [
"ios",
"uitableview",
"uikit"
] | 1 | 3 | 1,474 | 1 | 0 | 2011-06-06T02:33:15.470000 | 2011-06-06T03:50:33.630000 |
6,247,352 | 6,260,310 | Best data store for dealing with real time queries against billions of rows of sequential data? | This is similar to another question that was asked, but there are key differences in my requirements. I need to store billions of rows, but they will only be searched on per user_id, and any given user is not likely to have more than a 10 million rows of data. Given that I'm never searching across the entire dataset, d... | Storing billions of rows generally becomes a problem because you run out of disk space on a single server and partitioning non-trivial datasets can be difficult. You don't have this problem because rather than one huge dataset you have a thousand more reasonably sized datasets. I'd recommend using a data store that let... | Best data store for dealing with real time queries against billions of rows of sequential data? This is similar to another question that was asked, but there are key differences in my requirements. I need to store billions of rows, but they will only be searched on per user_id, and any given user is not likely to have ... | TITLE:
Best data store for dealing with real time queries against billions of rows of sequential data?
QUESTION:
This is similar to another question that was asked, but there are key differences in my requirements. I need to store billions of rows, but they will only be searched on per user_id, and any given user is n... | [
"database",
"database-design",
"nosql"
] | 1 | 1 | 1,840 | 2 | 0 | 2011-06-06T02:36:38.673000 | 2011-06-07T03:23:55.073000 |
6,247,354 | 6,247,399 | jQuery ID Number Range | I am trying to write a jQuery script that will add a class to list items within a certain ID range. I use numbers in my ID's and want to adjust a range of ID's. Something Something Something Something Something I want to add a class to say items 16 through 19. How would I do this? jQuery('li#item-[16-19]).addClass('the... | this is what the jquery.slice() method was designed for. Given a jQuery object that represents a set of DOM elements, the.slice() method constructs a new jQuery object from a subset of the matching elements. The supplied start index identifies the position of one of the elements in the set; if end is omitted, all eleme... | jQuery ID Number Range I am trying to write a jQuery script that will add a class to list items within a certain ID range. I use numbers in my ID's and want to adjust a range of ID's. Something Something Something Something Something I want to add a class to say items 16 through 19. How would I do this? jQuery('li#item... | TITLE:
jQuery ID Number Range
QUESTION:
I am trying to write a jQuery script that will add a class to list items within a certain ID range. I use numbers in my ID's and want to adjust a range of ID's. Something Something Something Something Something I want to add a class to say items 16 through 19. How would I do thi... | [
"javascript",
"jquery"
] | 4 | 3 | 3,813 | 4 | 0 | 2011-06-06T02:37:03.213000 | 2011-06-06T02:50:11.107000 |
6,247,355 | 6,247,380 | Object reference is not set to an instance of an object | I'm trying to pass a value from DetailsView to FormView but I always get an error: Object reference is not set to an instance of an object. Somehow it did pass a value and I could still perform an insert. Its my first time programming in C#. Any hep would be much appreciated! Thanks in advance Here I've attached a code... | There are a few places you can check for null. 1) If your cast is incorrect: TextBox bookid = FormView1.FindControl("bookidTextBox") as TextBox; if (bookid!= null) bookid.Text = ((DataRowView)DetailsView1.DataItem)["bookid"].ToString();
TextBox employee = FormView1.FindControl("EmployeeIDTextBox") as TextBox; if (empl... | Object reference is not set to an instance of an object I'm trying to pass a value from DetailsView to FormView but I always get an error: Object reference is not set to an instance of an object. Somehow it did pass a value and I could still perform an insert. Its my first time programming in C#. Any hep would be much ... | TITLE:
Object reference is not set to an instance of an object
QUESTION:
I'm trying to pass a value from DetailsView to FormView but I always get an error: Object reference is not set to an instance of an object. Somehow it did pass a value and I could still perform an insert. Its my first time programming in C#. Any ... | [
"c#",
"asp.net"
] | 0 | 2 | 2,947 | 3 | 0 | 2011-06-06T02:37:30.470000 | 2011-06-06T02:45:21.827000 |
6,247,359 | 6,247,441 | How can i create property sheet inheritance with Ant? | I'd like to create a build system in Ant which makes heavy use of property inheritance. I see that Ant allows in a.properties file as input, however, i'd like to input multiple properties files perhaps with some values overriding others. Is this even possible using Ant or do i need to write it myself and to create the ... | You can certainly use multiple properties files - the important thing to keep in mind though, is that Ant properties are immutable - once set, they cannot be changed. So the first properties file to set a property wins. Given this, you should begin with the 'most specific' file first and include the default or the pare... | How can i create property sheet inheritance with Ant? I'd like to create a build system in Ant which makes heavy use of property inheritance. I see that Ant allows in a.properties file as input, however, i'd like to input multiple properties files perhaps with some values overriding others. Is this even possible using ... | TITLE:
How can i create property sheet inheritance with Ant?
QUESTION:
I'd like to create a build system in Ant which makes heavy use of property inheritance. I see that Ant allows in a.properties file as input, however, i'd like to input multiple properties files perhaps with some values overriding others. Is this ev... | [
"inheritance",
"ant",
"multiple-inheritance"
] | 1 | 1 | 112 | 1 | 0 | 2011-06-06T02:39:05.153000 | 2011-06-06T03:03:53.510000 |
6,247,367 | 6,247,410 | How to condense values from 150 1536 well plates into one value per coordinate in perl | I have 150 32 by 48 matrices of values that represent color intensities from images of yeast plates. I would like to take for example coordinate (x,y) from each plate generate an average and then create a new plate out of that. Right now I have all of the values in a file in the following format: EA_D01_5-8 30,22 -0.39... | Maybe I'm misunderstanding what you want. I think you want an "average" plate, where 0,0 has the average of the 0,0 values of all 150 plates, 0,1 has the average of the 0,1 values, etc. If so, you don't want a hash by long name, you want just a hash by coords: my %coords_total; my %coords_count; while(my $line = ) { ch... | How to condense values from 150 1536 well plates into one value per coordinate in perl I have 150 32 by 48 matrices of values that represent color intensities from images of yeast plates. I would like to take for example coordinate (x,y) from each plate generate an average and then create a new plate out of that. Right... | TITLE:
How to condense values from 150 1536 well plates into one value per coordinate in perl
QUESTION:
I have 150 32 by 48 matrices of values that represent color intensities from images of yeast plates. I would like to take for example coordinate (x,y) from each plate generate an average and then create a new plate ... | [
"arrays",
"perl",
"hash",
"matrix"
] | 1 | 4 | 118 | 1 | 0 | 2011-06-06T02:41:14.170000 | 2011-06-06T02:53:10.803000 |
6,247,368 | 6,247,388 | How do I access Registry from C# for a proxy? | So I've previously asked this question: How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET. Please help in Visual C#.NET. I got a response telling me that "WebBrowser is just an interface over IE. To set the IE proxy settings, you c... | As I commented in the previous question. using Microsoft.Win32; See http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey(v=VS.80).aspx | How do I access Registry from C# for a proxy? So I've previously asked this question: How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET. Please help in Visual C#.NET. I got a response telling me that "WebBrowser is just an interfac... | TITLE:
How do I access Registry from C# for a proxy?
QUESTION:
So I've previously asked this question: How do I point a socket to the proxy ip/port using the winforms webbrowser control? The standard web browser that comes with Visual C#.NET. Please help in Visual C#.NET. I got a response telling me that "WebBrowser i... | [
"c#",
"proxy",
"registry"
] | 1 | 4 | 3,809 | 1 | 0 | 2011-06-06T02:41:19.573000 | 2011-06-06T02:47:44.540000 |
6,247,370 | 6,287,146 | How to display one of Drupal's default forms | I have a module that I want to use to display a modified version of one of Drupal 7's default forms. I believe the form ID is user_profile_form and it is the form used to edit a user's account information. So this is the structure of my module: hook_menu with a page callback to a function --> user_exe_edit() --> functi... | You won't need your input_simple_form(), but you will need to include the user module's pages: global $user; // if the user is logged in, otherwise anonymous users will see it if ($user->uid > 0) { module_load_include('inc', 'user', 'user.pages'); return user_edit($user); } | How to display one of Drupal's default forms I have a module that I want to use to display a modified version of one of Drupal 7's default forms. I believe the form ID is user_profile_form and it is the form used to edit a user's account information. So this is the structure of my module: hook_menu with a page callback... | TITLE:
How to display one of Drupal's default forms
QUESTION:
I have a module that I want to use to display a modified version of one of Drupal 7's default forms. I believe the form ID is user_profile_form and it is the form used to edit a user's account information. So this is the structure of my module: hook_menu wi... | [
"drupal",
"drupal-modules",
"drupal-7",
"drupal-theming"
] | 1 | 0 | 111 | 1 | 0 | 2011-06-06T02:41:44.767000 | 2011-06-09T01:32:00.593000 |
6,247,379 | 6,247,405 | Please help me chose a hash | I am trying to create a hash for a string of 10 or 16 bytes. These strings are either ethernet mac address + ip address (6 + 4 bytes) or just a ipv6 ip (16 bytes). I would ideally like to keep my cake and eat it. Absolute minimum collisions would be the priority. Hash must be less than 16 bytes long and be fairly quick... | Perhaps I'm missing something, but if your data to hash is no longer than your hash, the obvious candidate is to use the data itself as hash - padded with,say, zeroes if shorter than 16 bytes: I doubt anything could beat that in terms of simplicity or collisions. | Please help me chose a hash I am trying to create a hash for a string of 10 or 16 bytes. These strings are either ethernet mac address + ip address (6 + 4 bytes) or just a ipv6 ip (16 bytes). I would ideally like to keep my cake and eat it. Absolute minimum collisions would be the priority. Hash must be less than 16 by... | TITLE:
Please help me chose a hash
QUESTION:
I am trying to create a hash for a string of 10 or 16 bytes. These strings are either ethernet mac address + ip address (6 + 4 bytes) or just a ipv6 ip (16 bytes). I would ideally like to keep my cake and eat it. Absolute minimum collisions would be the priority. Hash must ... | [
"algorithm",
"hash"
] | 2 | 7 | 386 | 2 | 0 | 2011-06-06T02:44:56.890000 | 2011-06-06T02:52:33.760000 |
6,247,385 | 6,247,420 | How can I bring multiple class objects into one class using DataContext? | I am making a Winodws Phone 7 program, I've got another question. So, my question concerns, how would I bring in two classes using one datacontext? My code currently looks like: public MainPage() { InitializeComponent();
DataContext = App.ViewModel; } Now, what I want to do is add another Model: public MainPage() { In... | You will need an object that contains both. DataContext = new { VM1 = App.ViewModel, VM2 = App.ViewModel2 } I would not use an anonymous type, just an example, since you want support for INotifyPropertyChanged. Basically you are looking for composition. | How can I bring multiple class objects into one class using DataContext? I am making a Winodws Phone 7 program, I've got another question. So, my question concerns, how would I bring in two classes using one datacontext? My code currently looks like: public MainPage() { InitializeComponent();
DataContext = App.ViewMod... | TITLE:
How can I bring multiple class objects into one class using DataContext?
QUESTION:
I am making a Winodws Phone 7 program, I've got another question. So, my question concerns, how would I bring in two classes using one datacontext? My code currently looks like: public MainPage() { InitializeComponent();
DataCon... | [
"c#",
"silverlight",
"windows-phone-7"
] | 1 | 3 | 306 | 1 | 0 | 2011-06-06T02:46:22.473000 | 2011-06-06T02:56:31.067000 |
6,247,391 | 6,247,507 | Caching login forms with Ruby on Rails | I have a Rails 3 website, for which the home page is static content plus a login form. I want to use HTTP caching on this page (we’re on Heroku - behind Varnish), but then the login form's authenticity token is cached which triggers forgery protection and prevents login for all but the first session. I think my best co... | Bad things could happen, theres a reason CSRF is on by default. http://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests | Caching login forms with Ruby on Rails I have a Rails 3 website, for which the home page is static content plus a login form. I want to use HTTP caching on this page (we’re on Heroku - behind Varnish), but then the login form's authenticity token is cached which triggers forgery protection and prevents login for all bu... | TITLE:
Caching login forms with Ruby on Rails
QUESTION:
I have a Rails 3 website, for which the home page is static content plus a login form. I want to use HTTP caching on this page (we’re on Heroku - behind Varnish), but then the login form's authenticity token is cached which triggers forgery protection and prevent... | [
"ruby-on-rails",
"csrf",
"http-caching"
] | 4 | 1 | 861 | 1 | 0 | 2011-06-06T02:48:31.807000 | 2011-06-06T03:22:35.987000 |
6,247,396 | 6,247,439 | string::find is not finding match | Im trying to use the string::find method to determine if the string " hello " (with space before and after) exists in a line of a.txt file. if it does, its supposed to print out the line number(position isnt important). the problem is, its not finding the string. please help. int main() { string key (" hello "); ifstre... | What it seems to be doing as you have it is just counting the number of lines that have that string in them. You should increment the line number var in every iteration of the loop, not just when the string is found. int main() { std::string key (" hello "); ifstream myReadFile; myReadFile.open("test.txt");
if (myRead... | string::find is not finding match Im trying to use the string::find method to determine if the string " hello " (with space before and after) exists in a line of a.txt file. if it does, its supposed to print out the line number(position isnt important). the problem is, its not finding the string. please help. int main(... | TITLE:
string::find is not finding match
QUESTION:
Im trying to use the string::find method to determine if the string " hello " (with space before and after) exists in a line of a.txt file. if it does, its supposed to print out the line number(position isnt important). the problem is, its not finding the string. plea... | [
"c++",
"string"
] | 1 | 0 | 4,618 | 3 | 0 | 2011-06-06T02:49:30.810000 | 2011-06-06T03:03:26.717000 |
6,247,425 | 6,258,252 | Possibility of implementing node.js using PHP interpreter in place of JavaScript v8? | I have a command line application developed in PHP that currently utilizes files and DB content for input. I have need for more universal interoperability and have stumbled upon Node.js. I see that it would allow me to very quickly create a RESTful or SOAP interface that would be scalable on the front end with minimal ... | Thanks to everyone who have contributed in great depth to this topic:) To sum up as I understand from all the above discussions: 1.) The lack of event driven behavior within PHP makes it a challenge to leverage it in an async. non-blocking IO pattern that is utilized within Node.js 2.) If it were possible to support ev... | Possibility of implementing node.js using PHP interpreter in place of JavaScript v8? I have a command line application developed in PHP that currently utilizes files and DB content for input. I have need for more universal interoperability and have stumbled upon Node.js. I see that it would allow me to very quickly cre... | TITLE:
Possibility of implementing node.js using PHP interpreter in place of JavaScript v8?
QUESTION:
I have a command line application developed in PHP that currently utilizes files and DB content for input. I have need for more universal interoperability and have stumbled upon Node.js. I see that it would allow me t... | [
"php",
"rest",
"soap",
"node.js"
] | 1 | 0 | 1,198 | 6 | 0 | 2011-06-06T02:57:43.587000 | 2011-06-06T21:30:32.920000 |
6,247,426 | 6,247,694 | Where can I get the 9 patch for the Spinner used in the Android OS in the Eclipse-Android Emulator? | I am looking for a png for each state, I looked in the source code and the 9 patches provided there all dont look like spinner when used as a background for one. Please help. Thanks in advance | Take a look in the density-specific drawable directories in the distribution. For instance, all the 9-patches for medium density in my 2.3 distribution are at: C:\android-sdk-windows\platforms\android-9\data\res\drawable-mdpi\spinner_*.9.png | Where can I get the 9 patch for the Spinner used in the Android OS in the Eclipse-Android Emulator? I am looking for a png for each state, I looked in the source code and the 9 patches provided there all dont look like spinner when used as a background for one. Please help. Thanks in advance | TITLE:
Where can I get the 9 patch for the Spinner used in the Android OS in the Eclipse-Android Emulator?
QUESTION:
I am looking for a png for each state, I looked in the source code and the 9 patches provided there all dont look like spinner when used as a background for one. Please help. Thanks in advance
ANSWER:
... | [
"android",
"android-layout",
"android-image"
] | 1 | 4 | 4,415 | 2 | 0 | 2011-06-06T02:58:32.620000 | 2011-06-06T04:14:26.420000 |
6,247,427 | 6,247,478 | BlockReentrancy in ObservableCollection<T> | Could someone please be kind enough to explain to me what the purpose of the BlockReentrancy Method is in the ObservableCollection? MSDN shows the following as an example: //The typical usage is to wrap an OnCollectionChanged call within a using scope, as in the following example:
using (BlockReentrancy()) { // OnColl... | An ObservableCollection implements INotifyCollectionChanged and so it has a CollectionChanged event. If there is a subscriber to this event, they could further modify the collection while the collection is already in the process of notification. Since the CollectionChanged event keeps track of exactly what changed, thi... | BlockReentrancy in ObservableCollection<T> Could someone please be kind enough to explain to me what the purpose of the BlockReentrancy Method is in the ObservableCollection? MSDN shows the following as an example: //The typical usage is to wrap an OnCollectionChanged call within a using scope, as in the following exam... | TITLE:
BlockReentrancy in ObservableCollection<T>
QUESTION:
Could someone please be kind enough to explain to me what the purpose of the BlockReentrancy Method is in the ObservableCollection? MSDN shows the following as an example: //The typical usage is to wrap an OnCollectionChanged call within a using scope, as in ... | [
"c#",
".net",
"events",
"collections",
"observablecollection"
] | 25 | 28 | 7,612 | 4 | 0 | 2011-06-06T02:58:45.833000 | 2011-06-06T03:16:32.013000 |
6,247,447 | 6,260,085 | Upload photos to Facebook Album from an app | I've used 'req_perms' => 'publish_stream,status_update' The error I'm getting is Fatal error: Uncaught CurlException: 26: failed creating formpost data thrown in facebook.php on line 589 My upload code: $facebook->setFileUploadSupport(true); $args = array('message' => 'My Friend\'s'); $args['image'] = '@'. realpath('ht... | I tried the code below, and it worked perfectly. $facebook->setFileUploadSupport(true);
$album_details = array( 'message'=> 'album description goes here', 'name'=> 'album name goes here' ); $create_album = $facebook->api('/me/albums', 'post', $album_details);
// Upload a picture $photo_details = array( 'message'=> 'p... | Upload photos to Facebook Album from an app I've used 'req_perms' => 'publish_stream,status_update' The error I'm getting is Fatal error: Uncaught CurlException: 26: failed creating formpost data thrown in facebook.php on line 589 My upload code: $facebook->setFileUploadSupport(true); $args = array('message' => 'My Fri... | TITLE:
Upload photos to Facebook Album from an app
QUESTION:
I've used 'req_perms' => 'publish_stream,status_update' The error I'm getting is Fatal error: Uncaught CurlException: 26: failed creating formpost data thrown in facebook.php on line 589 My upload code: $facebook->setFileUploadSupport(true); $args = array('m... | [
"php",
"facebook",
"facebook-graph-api"
] | 1 | 5 | 14,050 | 3 | 0 | 2011-06-06T03:07:22.560000 | 2011-06-07T02:28:26.807000 |
6,247,451 | 6,247,719 | Sharing run configurations across multiple projects in the same eclipse workspace | I have an eclipse workspace containing two projects, which I'll call foo-lib and foo-app. Most of the code is in foo-lib, while foo-app is just a small shell which runs the code in foo-lib. foo-lib compiles to a jar file, while foo-app links against foo-lib and compiles to a program. OK so now I have a run configuratio... | Go to: Preferences->Run/Debug/Launching. There you can configure the launch operation to Always launch the previous application. | Sharing run configurations across multiple projects in the same eclipse workspace I have an eclipse workspace containing two projects, which I'll call foo-lib and foo-app. Most of the code is in foo-lib, while foo-app is just a small shell which runs the code in foo-lib. foo-lib compiles to a jar file, while foo-app li... | TITLE:
Sharing run configurations across multiple projects in the same eclipse workspace
QUESTION:
I have an eclipse workspace containing two projects, which I'll call foo-lib and foo-app. Most of the code is in foo-lib, while foo-app is just a small shell which runs the code in foo-lib. foo-lib compiles to a jar file... | [
"eclipse"
] | 0 | 2 | 714 | 1 | 0 | 2011-06-06T03:08:27.853000 | 2011-06-06T04:19:41.540000 |
6,247,460 | 6,247,474 | best way to select a first sibling's first child in jquery? | I'm trying to select the first child of a first sibling in jquery but having some trouble getting it right: I have a handler attached to tr.foo and I want to do something to the td, but I'm not getting the selector right. | Try this: $("tr.foo").next("tr").children("td").first() Check out the JQuery traversing documentation. | best way to select a first sibling's first child in jquery? I'm trying to select the first child of a first sibling in jquery but having some trouble getting it right: I have a handler attached to tr.foo and I want to do something to the td, but I'm not getting the selector right. | TITLE:
best way to select a first sibling's first child in jquery?
QUESTION:
I'm trying to select the first child of a first sibling in jquery but having some trouble getting it right: I have a handler attached to tr.foo and I want to do something to the td, but I'm not getting the selector right.
ANSWER:
Try this: $... | [
"jquery-selectors"
] | 1 | 4 | 6,641 | 2 | 0 | 2011-06-06T03:09:54.990000 | 2011-06-06T03:14:29.283000 |
6,247,464 | 6,247,528 | std::transform and move semantics | I'm using Boost.Filesystem to create a listing of files in a directory. I use boost::filesystem::recursive_directory_iterator and std::copy to put each path into a std::vector as a boost::filesystem::directory_entry object. I wish to output to the file as std::strings though, so I did the following (\n to avoid the use... | This looks like a job for make_move_iterator: std::transform(make_move_iterator(buffer.begin()), make_move_iterator(buffer.end()), buffer_native.begin(), [](boost::filesystem::directory_entry&& de) -> std::string { // still makes copy:/ perhaps native() would work better, I don't know std::string temp = de.path().strin... | std::transform and move semantics I'm using Boost.Filesystem to create a listing of files in a directory. I use boost::filesystem::recursive_directory_iterator and std::copy to put each path into a std::vector as a boost::filesystem::directory_entry object. I wish to output to the file as std::strings though, so I did ... | TITLE:
std::transform and move semantics
QUESTION:
I'm using Boost.Filesystem to create a listing of files in a directory. I use boost::filesystem::recursive_directory_iterator and std::copy to put each path into a std::vector as a boost::filesystem::directory_entry object. I wish to output to the file as std::strings... | [
"c++",
"stl",
"c++11"
] | 12 | 15 | 5,092 | 1 | 0 | 2011-06-06T03:12:04.193000 | 2011-06-06T03:27:38.200000 |
6,247,476 | 6,247,524 | Java archive file distribution and execution | I've made a Java program I would like to make available to people of every stripe of computer (Windows, Linux, and OSX). So, as far as I know, all I have to do is make a Java archive, and the end users are able to run it with their particular flavor of Java.exe file. If the above is correct, my questions are: 1) Is it ... | These days, java is considered a mainstream OS add on, like adobe reader, flash, and other very common "plugins". Including java with your distribution is a very bad idea. Mainly because it's big and you then take on supporting latest releases. Just send out the jars etc and perhaps a some shell scripts (.bat for windo... | Java archive file distribution and execution I've made a Java program I would like to make available to people of every stripe of computer (Windows, Linux, and OSX). So, as far as I know, all I have to do is make a Java archive, and the end users are able to run it with their particular flavor of Java.exe file. If the ... | TITLE:
Java archive file distribution and execution
QUESTION:
I've made a Java program I would like to make available to people of every stripe of computer (Windows, Linux, and OSX). So, as far as I know, all I have to do is make a Java archive, and the end users are able to run it with their particular flavor of Java... | [
"java",
"distribution"
] | 1 | 2 | 285 | 2 | 0 | 2011-06-06T03:16:01.447000 | 2011-06-06T03:26:56.473000 |
6,247,481 | 6,247,798 | Why I can't resolve client url for css files? | Here is my asp code: And here it's the html rendered: Espace de travail Why asp can resolve url for my.js script file but not for my css file? | The URL returned by this method is relative to the folder containing the source file in which the control is instantiated. Use ResolveUrl or Url.Content helper method instead. The first link got encoded because of runat="server" attribute on head tag. Consider removing attribute or try this solution. | Why I can't resolve client url for css files? Here is my asp code: And here it's the html rendered: Espace de travail Why asp can resolve url for my.js script file but not for my css file? | TITLE:
Why I can't resolve client url for css files?
QUESTION:
Here is my asp code: And here it's the html rendered: Espace de travail Why asp can resolve url for my.js script file but not for my css file?
ANSWER:
The URL returned by this method is relative to the folder containing the source file in which the contro... | [
"asp.net",
"asp.net-mvc",
"asp.net-mvc-2",
"asp.net-mvc-3"
] | 3 | 5 | 5,704 | 5 | 0 | 2011-06-06T03:16:45.323000 | 2011-06-06T04:36:27.607000 |
6,247,485 | 6,247,527 | Core Data: Executing fetch requests in loadView? | I have a UIViewController subclass which is having its view created programmatically within the loadView method. The primary purpose of the view is to display information that is fetched from a store via core data. How the view is created will be different depending on how many entities are received from the fetch, so ... | If you are loading data once per setup-tear down cycle of the View Controller then putting it in loadView should be fine. However if you have any buttons or UI inputs that may cause it to be reloaded, you may want to create your own reloadData method in your View Controller. Take a look at some examples of UITableView ... | Core Data: Executing fetch requests in loadView? I have a UIViewController subclass which is having its view created programmatically within the loadView method. The primary purpose of the view is to display information that is fetched from a store via core data. How the view is created will be different depending on h... | TITLE:
Core Data: Executing fetch requests in loadView?
QUESTION:
I have a UIViewController subclass which is having its view created programmatically within the loadView method. The primary purpose of the view is to display information that is fetched from a store via core data. How the view is created will be differ... | [
"ios",
"core-data",
"uiviewcontroller"
] | 0 | 0 | 323 | 3 | 0 | 2011-06-06T03:17:27.210000 | 2011-06-06T03:27:28.483000 |
6,247,490 | 6,247,512 | Entity Framework - Loop through properties for update | I am trying to find a way to loop through the properties of an EF object and update the values of these properties. More specifically I have 50 fields that are populated by up to 50 dropdownlists. All 50 may or may not need to be populated. To solve this I have a repeater that will create up to 50 DDL. The user will se... | You could do something like this. var properties = typeof(EFType).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var property in properties) { var control = (DropDownList)rep1.FindControl("ddlControl" + property.Name); property.SetValue(efObject, control.SelectedValue, null); } SelectedValue is st... | Entity Framework - Loop through properties for update I am trying to find a way to loop through the properties of an EF object and update the values of these properties. More specifically I have 50 fields that are populated by up to 50 dropdownlists. All 50 may or may not need to be populated. To solve this I have a re... | TITLE:
Entity Framework - Loop through properties for update
QUESTION:
I am trying to find a way to loop through the properties of an EF object and update the values of these properties. More specifically I have 50 fields that are populated by up to 50 dropdownlists. All 50 may or may not need to be populated. To solv... | [
"c#",
".net",
"asp.net",
"entity-framework",
"properties"
] | 3 | 11 | 5,395 | 1 | 0 | 2011-06-06T03:18:21.780000 | 2011-06-06T03:24:08.017000 |
6,247,491 | 6,247,575 | rails 3: display link as button? | On some non-form pages, I have a few links that would look better as a button than a hyperlink... I thought button_to instead of link_to would work, but buton_to seems to always be treated as a post. Is there an easy way to simply replace a (non-submit) link with a button? | All you have to do is add a:method => "get" to the end of your button_to to get it to be treated like a link The button_to Way Using a users_path <%= button_to "BUTTON: link version", users_path,:method => "get" %> The CSS Way Or instead of actually inserting a form into your html (which is what button_to actually does... | rails 3: display link as button? On some non-form pages, I have a few links that would look better as a button than a hyperlink... I thought button_to instead of link_to would work, but buton_to seems to always be treated as a post. Is there an easy way to simply replace a (non-submit) link with a button? | TITLE:
rails 3: display link as button?
QUESTION:
On some non-form pages, I have a few links that would look better as a button than a hyperlink... I thought button_to instead of link_to would work, but buton_to seems to always be treated as a post. Is there an easy way to simply replace a (non-submit) link with a but... | [
"ruby-on-rails",
"button",
"hyperlink"
] | 39 | 82 | 65,391 | 4 | 0 | 2011-06-06T03:18:43.243000 | 2011-06-06T03:45:07.227000 |
6,247,495 | 6,247,510 | Git committing unchanged files | Long story short, I have a situation where egit allows unchanged files to be committed. If I commit, will this corrupt the git repository? | Unchanged files are always committed in git. Each commit is the entire tree of files along with a commit message. Unless you have a specific strange situation which is not adequately captured by the description "unchanged files" there will be no problem. | Git committing unchanged files Long story short, I have a situation where egit allows unchanged files to be committed. If I commit, will this corrupt the git repository? | TITLE:
Git committing unchanged files
QUESTION:
Long story short, I have a situation where egit allows unchanged files to be committed. If I commit, will this corrupt the git repository?
ANSWER:
Unchanged files are always committed in git. Each commit is the entire tree of files along with a commit message. Unless yo... | [
"git",
"commit",
"egit"
] | 2 | 4 | 5,136 | 2 | 0 | 2011-06-06T03:19:44.623000 | 2011-06-06T03:23:48.767000 |
6,247,498 | 6,261,562 | serializing/deserializing derived objects using JSON.NET without using JsonProperty? | I'm using the NewtonSoft JSON.NET library for serializing the following class where DTOBase can hold derived instances. public class Command { public DTOBase CommandDTO { get; set; } } Per this article you need to include the JsonProperty attribute so that the derived instances get deserialized properly public class Co... | The TypeNameHandling property can be set on JsonSerializerSettings when you call JsonConvert.SerializeObject(value, settings). If you only want the name included for derived objects set TypeNameHandling to TypeNameHandling.Auto. | serializing/deserializing derived objects using JSON.NET without using JsonProperty? I'm using the NewtonSoft JSON.NET library for serializing the following class where DTOBase can hold derived instances. public class Command { public DTOBase CommandDTO { get; set; } } Per this article you need to include the JsonPrope... | TITLE:
serializing/deserializing derived objects using JSON.NET without using JsonProperty?
QUESTION:
I'm using the NewtonSoft JSON.NET library for serializing the following class where DTOBase can hold derived instances. public class Command { public DTOBase CommandDTO { get; set; } } Per this article you need to inc... | [
"json.net"
] | 4 | 4 | 8,118 | 1 | 0 | 2011-06-06T03:20:24.290000 | 2011-06-07T06:50:26.650000 |
6,247,500 | 6,247,545 | MVC Scaffolding error: "Value cannot be null. Parameter name: source" | I followed the instruction in this post, but when I try to add a product I get this error: Server Error in '/' Application. --------------------------------------------------------------------------------
Value cannot be null. Parameter name: source Description: An unhandled exception occurred during the execution of ... | Your problem is the following: You assign this property within the Controller: ViewBag.PossibleCategory = context.Categories; Then, in your View you try to read this dynamic ViewBag property: ViewBag.PossibleCategories Can you see the error? You're giving different names... You do not get compile time checking because ... | MVC Scaffolding error: "Value cannot be null. Parameter name: source" I followed the instruction in this post, but when I try to add a product I get this error: Server Error in '/' Application. --------------------------------------------------------------------------------
Value cannot be null. Parameter name: source... | TITLE:
MVC Scaffolding error: "Value cannot be null. Parameter name: source"
QUESTION:
I followed the instruction in this post, but when I try to add a product I get this error: Server Error in '/' Application. --------------------------------------------------------------------------------
Value cannot be null. Para... | [
"asp.net-mvc",
"asp.net-mvc-3",
"html.dropdownlistfor",
"scaffolding"
] | 6 | 11 | 8,790 | 2 | 0 | 2011-06-06T03:20:33.053000 | 2011-06-06T03:34:05.160000 |
6,247,506 | 6,247,547 | Return the same random int 3 times and repeat | I'm working on an assignment and it's going fairly well, but I am confused about one thing so far. The point is to learn about inheritance and reading through existing code. Without adding another method, I need to make the getMove() method return the same random number three times in a row, and then pick a new random ... | Not that it's a "problem", but your fields should be instance fields (ie not static). However, to isolate the problem from your classes, here's code that works. Note that you can get the same move on subsequent calls to rand(). private static int direction = rand(); private static int count;
public static int getMove(... | Return the same random int 3 times and repeat I'm working on an assignment and it's going fairly well, but I am confused about one thing so far. The point is to learn about inheritance and reading through existing code. Without adding another method, I need to make the getMove() method return the same random number thr... | TITLE:
Return the same random int 3 times and repeat
QUESTION:
I'm working on an assignment and it's going fairly well, but I am confused about one thing so far. The point is to learn about inheritance and reading through existing code. Without adding another method, I need to make the getMove() method return the same... | [
"java",
"return"
] | 0 | 3 | 812 | 2 | 0 | 2011-06-06T03:21:49.843000 | 2011-06-06T03:34:42.880000 |
6,247,508 | 6,247,612 | Code Igniter: returning data from DB, where to put this parsing/output logic | I'm returning a list of people from MySQL So I have a model, a controller and a view. As I'm outputting the list of people on a page, I need to check the length of the person's name and dynamically add a class to the that it's displayed in. Before this was CI, I created a simple function called 'name_class' and put tha... | It seems more logical to me that this belongs as a function within your view. If what your doing has something to do with how you are displaying the data, then it should be in the view layer of your code. Though CodeIgniter is geared towards web applications, you should always consider the fact that the MVC design patt... | Code Igniter: returning data from DB, where to put this parsing/output logic I'm returning a list of people from MySQL So I have a model, a controller and a view. As I'm outputting the list of people on a page, I need to check the length of the person's name and dynamically add a class to the that it's displayed in. Be... | TITLE:
Code Igniter: returning data from DB, where to put this parsing/output logic
QUESTION:
I'm returning a list of people from MySQL So I have a model, a controller and a view. As I'm outputting the list of people on a page, I need to check the length of the person's name and dynamically add a class to the that it'... | [
"php",
"codeigniter"
] | 0 | 2 | 142 | 3 | 0 | 2011-06-06T03:22:58.640000 | 2011-06-06T03:55:20.157000 |
6,247,513 | 6,248,123 | protobuf-net inheritance | Marc mentioned on stackoverflow that it will be possible in v2 of protobuf-net to use ProtoInclude attribute (or similar approach) to serialize/deserialize class hierarchy without a need to specify each subtype in the base class. Is this implemented yet? We have a plugin interface that can be derived in external librar... | If you can't specify the subtypes in attributes (because it isn't known at compile-time) you have 2 options (both of which only apply to "v2", available as beta): use a RuntimeTypeModel, rather than the static Serializer methods (which are now just a short-cut to RuntimeTypeModel.Default ); tell the model about the inh... | protobuf-net inheritance Marc mentioned on stackoverflow that it will be possible in v2 of protobuf-net to use ProtoInclude attribute (or similar approach) to serialize/deserialize class hierarchy without a need to specify each subtype in the base class. Is this implemented yet? We have a plugin interface that can be d... | TITLE:
protobuf-net inheritance
QUESTION:
Marc mentioned on stackoverflow that it will be possible in v2 of protobuf-net to use ProtoInclude attribute (or similar approach) to serialize/deserialize class hierarchy without a need to specify each subtype in the base class. Is this implemented yet? We have a plugin inter... | [
"c#",
"protocol-buffers",
"protobuf-net"
] | 14 | 20 | 9,130 | 4 | 0 | 2011-06-06T03:24:09.577000 | 2011-06-06T05:33:48.803000 |
6,247,517 | 6,247,678 | Why is there no Picture in my Panel/Window? | whats wrong with my code? I just want to have a Picture in my Window... //class ImagePanel:
public class ImagePanel extends JPanel {
private static final long serialVersionUID = -7664761101121497912L;
public Image i;
public ImagePanel(Image i) { this.i = i; }
@Override public void paintComponents(Graphics g) { sup... | You must override paintComponent(Graphics g) instead of paintComponent s (Graphics g). | Why is there no Picture in my Panel/Window? whats wrong with my code? I just want to have a Picture in my Window... //class ImagePanel:
public class ImagePanel extends JPanel {
private static final long serialVersionUID = -7664761101121497912L;
public Image i;
public ImagePanel(Image i) { this.i = i; }
@Override p... | TITLE:
Why is there no Picture in my Panel/Window?
QUESTION:
whats wrong with my code? I just want to have a Picture in my Window... //class ImagePanel:
public class ImagePanel extends JPanel {
private static final long serialVersionUID = -7664761101121497912L;
public Image i;
public ImagePanel(Image i) { this.i =... | [
"java",
"image",
"swing",
"jframe",
"jpanel"
] | 1 | 5 | 140 | 4 | 0 | 2011-06-06T03:24:39.593000 | 2011-06-06T04:11:18.400000 |
6,247,521 | 6,247,933 | Method works in rails console, but rspec says method is undefined | In my rails 3 app, I have a lib folder: /lib /lib/abc/some_class.rb /lib/abc/some_class/other.rb some_class.rb: module ABC class SomeClass end end other.rb module ABC class SomeClass::Other def self.hello(a,b,c,) false end end end If I fire up rails console I can do: ABC::SomeClass::Other.hello(1,2,3) and it outputs fa... | What are the require's in the rspec file? It needs to be including some_class.rb and some_class\other.rb (you may need to modify the load path to include both) | Method works in rails console, but rspec says method is undefined In my rails 3 app, I have a lib folder: /lib /lib/abc/some_class.rb /lib/abc/some_class/other.rb some_class.rb: module ABC class SomeClass end end other.rb module ABC class SomeClass::Other def self.hello(a,b,c,) false end end end If I fire up rails cons... | TITLE:
Method works in rails console, but rspec says method is undefined
QUESTION:
In my rails 3 app, I have a lib folder: /lib /lib/abc/some_class.rb /lib/abc/some_class/other.rb some_class.rb: module ABC class SomeClass end end other.rb module ABC class SomeClass::Other def self.hello(a,b,c,) false end end end If I ... | [
"ruby-on-rails",
"ruby",
"rspec"
] | 2 | 1 | 532 | 1 | 0 | 2011-06-06T03:25:46.127000 | 2011-06-06T05:01:43.517000 |
6,247,522 | 6,247,644 | cocos2d schedule selector error | i have an error when scheduling a method. (to display how many star you get according to your score. i have addStar0 addStar1 addStar2 addStar3 methods) [self schedule:@selector(addStar0) interval:0.2f]; and the methods are: -(void) addstar0 { [self unschedule:_cmd];
if (star > starProgress) { starProgress++; [self sc... | You are using 'addStar0' for selector [self schedule:@selector(addStar0) interval:0.2f]; then -(void) addstar0 { should be -(void) addStar0 { | cocos2d schedule selector error i have an error when scheduling a method. (to display how many star you get according to your score. i have addStar0 addStar1 addStar2 addStar3 methods) [self schedule:@selector(addStar0) interval:0.2f]; and the methods are: -(void) addstar0 { [self unschedule:_cmd];
if (star > starProg... | TITLE:
cocos2d schedule selector error
QUESTION:
i have an error when scheduling a method. (to display how many star you get according to your score. i have addStar0 addStar1 addStar2 addStar3 methods) [self schedule:@selector(addStar0) interval:0.2f]; and the methods are: -(void) addstar0 { [self unschedule:_cmd];
i... | [
"iphone",
"objective-c",
"cocos2d-iphone",
"schedule"
] | 1 | 3 | 1,170 | 3 | 0 | 2011-06-06T03:25:57.113000 | 2011-06-06T04:01:25.953000 |
6,247,529 | 6,247,554 | Simple SFML/C++ question, confused about literal strings and static members | I'm a bit confused by the code at http://www.sfml-dev.org/tutorials/1.6/graphics-sprite.php Namely the code at the bottom detailing the class "Missile": class Missile { public:
static bool Init(const std::string& ImageFile) { return Image.LoadFromFile(ImageFile); }
Missile() { Sprite.SetImage(Image); // every sprite ... | From the term, long verbose error, I am just guessing that you might have got confused with linker error. That's because, you might have either forgot to define, static sf::Image Image; in a.cpp file or forgot to link that.cpp file with your compilation where it's included. Define your static member in appropriate.cpp ... | Simple SFML/C++ question, confused about literal strings and static members I'm a bit confused by the code at http://www.sfml-dev.org/tutorials/1.6/graphics-sprite.php Namely the code at the bottom detailing the class "Missile": class Missile { public:
static bool Init(const std::string& ImageFile) { return Image.Load... | TITLE:
Simple SFML/C++ question, confused about literal strings and static members
QUESTION:
I'm a bit confused by the code at http://www.sfml-dev.org/tutorials/1.6/graphics-sprite.php Namely the code at the bottom detailing the class "Missile": class Missile { public:
static bool Init(const std::string& ImageFile) {... | [
"c++",
"sfml"
] | 1 | 1 | 244 | 1 | 0 | 2011-06-06T03:27:49.653000 | 2011-06-06T03:37:00.397000 |
6,247,530 | 6,247,603 | Affect a server with remote PHP | I'm currently trying to allow my remote server(B) to affect my local server(A) with a php include. As a small test I put a php file in server A that include a file from server B, I allowed including urls via php.ini and changed my user agent. The file on server B include code to create a small test file that is suppose... | On Server B, place the following line in your.htaccess file: AddType text/plain.php You need the code to be output by Server B to be read by Server A. At the moment it's being processed on Server A. This will make your code visible to the public. It will also prevent any other PHP from being executed in that directory.... | Affect a server with remote PHP I'm currently trying to allow my remote server(B) to affect my local server(A) with a php include. As a small test I put a php file in server A that include a file from server B, I allowed including urls via php.ini and changed my user agent. The file on server B include code to create a... | TITLE:
Affect a server with remote PHP
QUESTION:
I'm currently trying to allow my remote server(B) to affect my local server(A) with a php include. As a small test I put a php file in server A that include a file from server B, I allowed including urls via php.ini and changed my user agent. The file on server B includ... | [
"php",
"server-side-includes"
] | 0 | 0 | 120 | 2 | 0 | 2011-06-06T03:27:56.923000 | 2011-06-06T03:53:46.710000 |
6,247,542 | 6,252,105 | Extracting keywords from an article | I have articles and keywords stored inside MySQL. The site will preprocess the new articles to find how many matching keywords there are and then update a table which stores the relevant keywords related to the article. This will then be used on the front-end by highlighting keywords within the article and will link us... | I've never used PHP to do it, but in.NET, I'll usually do what was alluded to by samxli. I load all keywords into a hashtable. I've done it with up to 120,000 keywords and it works pretty fast. The.NET hashtable object has a contains([key]) method. So for each word in the article I'll just call: theHashTable.contains(t... | Extracting keywords from an article I have articles and keywords stored inside MySQL. The site will preprocess the new articles to find how many matching keywords there are and then update a table which stores the relevant keywords related to the article. This will then be used on the front-end by highlighting keywords... | TITLE:
Extracting keywords from an article
QUESTION:
I have articles and keywords stored inside MySQL. The site will preprocess the new articles to find how many matching keywords there are and then update a table which stores the relevant keywords related to the article. This will then be used on the front-end by hig... | [
"php",
"mysql",
"full-text-search",
"nlp",
"text-processing"
] | 0 | 0 | 807 | 2 | 0 | 2011-06-06T03:33:20.700000 | 2011-06-06T12:37:15.600000 |
6,247,553 | 6,247,594 | jQuery stopPropagation not effective | I'm just completely stumped, I looked over a lot of the similar questions but I can't figure out why this click event keeps propagating. Here is the code: $("#view-radio").buttonset().bind('click', function(e) { redraw(Testimonials); e.stopPropagation(); }); Here is the radio buttons Grid View List View You can find th... | I can't swear it because it's difficult to test in your live site, but I think that what's happening is that you bound the click event of the view-radio div instead of each of the two radio buttons inside it. I'd try something like: $("#view-radio").buttonset(). // Turn radio buttons of the div in a buttonset find('inp... | jQuery stopPropagation not effective I'm just completely stumped, I looked over a lot of the similar questions but I can't figure out why this click event keeps propagating. Here is the code: $("#view-radio").buttonset().bind('click', function(e) { redraw(Testimonials); e.stopPropagation(); }); Here is the radio button... | TITLE:
jQuery stopPropagation not effective
QUESTION:
I'm just completely stumped, I looked over a lot of the similar questions but I can't figure out why this click event keeps propagating. Here is the code: $("#view-radio").buttonset().bind('click', function(e) { redraw(Testimonials); e.stopPropagation(); }); Here i... | [
"javascript",
"jquery",
"events",
"jquery-events"
] | 0 | 2 | 2,682 | 1 | 0 | 2011-06-06T03:36:29.077000 | 2011-06-06T03:50:57.333000 |
6,247,556 | 6,247,585 | Generate changes script | Let's imagine I added new column for some table in SQL Server Management Studio. Is there any way to get change script which is executed when I press save? What I want to achieve is to apply the same change to other databases (we have a separate database for each developer for debuggin purposes). | I assume you are using table designer in MS SSMS. Do the changes in the designer and just before hitting Save, go to the Table Designer menu and select Generate Change Script.... | Generate changes script Let's imagine I added new column for some table in SQL Server Management Studio. Is there any way to get change script which is executed when I press save? What I want to achieve is to apply the same change to other databases (we have a separate database for each developer for debuggin purposes)... | TITLE:
Generate changes script
QUESTION:
Let's imagine I added new column for some table in SQL Server Management Studio. Is there any way to get change script which is executed when I press save? What I want to achieve is to apply the same change to other databases (we have a separate database for each developer for ... | [
"sql",
"sql-server",
"sql-server-2008",
"ssms"
] | 6 | 7 | 731 | 1 | 0 | 2011-06-06T03:38:22.643000 | 2011-06-06T03:48:22.383000 |
6,247,559 | 6,247,637 | How to display default group icons in ExpandableListView? | I'm finding lots of discussion about how to replace the default group icons in an ExpandableListView, but I'm not coming up with anything on how to get the defaults to display in the first place. The defaults (as shown here, if that's what they look like [new to Android, this is my first ExpandableListView]) will be fi... | If you are using custom layouts for your group rows the default icons are overridden by your layout. You'll need to add them to your layout in order for them to display. | How to display default group icons in ExpandableListView? I'm finding lots of discussion about how to replace the default group icons in an ExpandableListView, but I'm not coming up with anything on how to get the defaults to display in the first place. The defaults (as shown here, if that's what they look like [new to... | TITLE:
How to display default group icons in ExpandableListView?
QUESTION:
I'm finding lots of discussion about how to replace the default group icons in an ExpandableListView, but I'm not coming up with anything on how to get the defaults to display in the first place. The defaults (as shown here, if that's what they... | [
"android",
"android-layout",
"expandablelistview"
] | 1 | 0 | 2,790 | 2 | 0 | 2011-06-06T03:39:42.283000 | 2011-06-06T03:59:16.533000 |
6,247,561 | 6,247,619 | mysql simple subquery problem | table user ____________________________________________ id name nickname info_id 1 john apple 11 2 paul banana 12 3 pauline melon 13
table info _____________________________________________ id job location 11 model usa 12 engineer russia 13 seller brazil
result I want ______________________________________________ 1 ... | SELECT a.`name`, a.`nickname`, b.`job`, b.`location` FROM `user` AS a LEFT JOIN `info` AS b ON ( a.`info_id` = b.`id` ) That should be pretty efficient. Try using MySQL EXPLAIN if you are concerned (also make sure there are indexes on the ID fields): http://dev.mysql.com/doc/refman/5.1/en/using-explain.html UPDATE Afte... | mysql simple subquery problem table user ____________________________________________ id name nickname info_id 1 john apple 11 2 paul banana 12 3 pauline melon 13
table info _____________________________________________ id job location 11 model usa 12 engineer russia 13 seller brazil
result I want ___________________... | TITLE:
mysql simple subquery problem
QUESTION:
table user ____________________________________________ id name nickname info_id 1 john apple 11 2 paul banana 12 3 pauline melon 13
table info _____________________________________________ id job location 11 model usa 12 engineer russia 13 seller brazil
result I want _... | [
"mysql",
"subquery"
] | 0 | 2 | 125 | 1 | 0 | 2011-06-06T03:40:07.493000 | 2011-06-06T03:55:54.590000 |
6,247,565 | 6,259,864 | Spring MVC IllegalStateException Error | I'm trying to create a simple test website using spring MVC and I cannot seem to get past the most simple case. I have a jsp website that is a "login" that has 2 inputs and a submit button, but it will not display anything except an error message. Using Spring 3.0.2 and Tomcat 6.0.29 Stand-alone. IndexController.java: ... | I cannot believe I was so stupid. I figured out my own problem. This is why I hate Annotations... in my servlet.xml file, I had the component-scan scanning the wrong package, so none of my annotations were being picked up. Refactoring is a pain, eh? TL;DR: Make sure you list the correct package in your servlet.xml unde... | Spring MVC IllegalStateException Error I'm trying to create a simple test website using spring MVC and I cannot seem to get past the most simple case. I have a jsp website that is a "login" that has 2 inputs and a submit button, but it will not display anything except an error message. Using Spring 3.0.2 and Tomcat 6.0... | TITLE:
Spring MVC IllegalStateException Error
QUESTION:
I'm trying to create a simple test website using spring MVC and I cannot seem to get past the most simple case. I have a jsp website that is a "login" that has 2 inputs and a submit button, but it will not display anything except an error message. Using Spring 3.... | [
"java",
"spring",
"jsp",
"tomcat"
] | 1 | 1 | 842 | 3 | 0 | 2011-06-06T03:41:58.983000 | 2011-06-07T01:45:52.263000 |
6,247,572 | 6,250,189 | Variable array index not possible in webgl shaders? | As the title says, I can't do vector_array[foo] (assuming foo is in-range and integer) in webgl vertex shaders, correct? Are textures the best alternative, or is there a workaround or some better way to mimick a lookup table? | http://www.khronos.org/registry/webgl/specs/latest/#DYNAMIC_INDEXING_OF_ARRAYS "WebGL only allows dynamic indexing with constant expressions, loop indices or a combination. The only exception is for uniform access in vertex shaders, which can be indexed using any expression." Did you try it? If it didn't work, there ar... | Variable array index not possible in webgl shaders? As the title says, I can't do vector_array[foo] (assuming foo is in-range and integer) in webgl vertex shaders, correct? Are textures the best alternative, or is there a workaround or some better way to mimick a lookup table? | TITLE:
Variable array index not possible in webgl shaders?
QUESTION:
As the title says, I can't do vector_array[foo] (assuming foo is in-range and integer) in webgl vertex shaders, correct? Are textures the best alternative, or is there a workaround or some better way to mimick a lookup table?
ANSWER:
http://www.khro... | [
"glsl",
"webgl"
] | 17 | 12 | 12,040 | 2 | 0 | 2011-06-06T03:43:48.723000 | 2011-06-06T09:43:12.963000 |
6,247,573 | 6,247,771 | Tools/recommendations to create and check if address falls within a specified boundary on a map? | Abstract problem: Define some (non-rectangular, non-circular) topologically closed area on a map. Find out way to query that map such that it returns true if longitude/latitude within the boundary. Applied problem: Let's say we're dealing with newspaper boy coverage. A coverage area is defined for each newspaper boy, a... | We have a mapping software at work where we implemented this exact problem (obviously in a different domain than paperboy coverage). We could not find an out of the box solution, so we implemented our own. We solved this problem by defining the geographical areas as set of points (given in latitude and longitude) and u... | Tools/recommendations to create and check if address falls within a specified boundary on a map? Abstract problem: Define some (non-rectangular, non-circular) topologically closed area on a map. Find out way to query that map such that it returns true if longitude/latitude within the boundary. Applied problem: Let's sa... | TITLE:
Tools/recommendations to create and check if address falls within a specified boundary on a map?
QUESTION:
Abstract problem: Define some (non-rectangular, non-circular) topologically closed area on a map. Find out way to query that map such that it returns true if longitude/latitude within the boundary. Applied... | [
"algorithm",
"geospatial"
] | 1 | 2 | 248 | 1 | 0 | 2011-06-06T03:44:22.187000 | 2011-06-06T04:32:58.390000 |
6,247,580 | 6,248,021 | Javascript error using this on a object | My page shows a window with a confirmation. If I choose Yes, the method Method1 runs but an error is generated saying that the object [Object DOMWindow] has no method 'Method2'. How can I solve this? Testes Javascript O.O. Javascript error Start test | Edited Sorry, first answer was not correct. Your issue is in the constructor. Since you are passing methods to other functions for them to call, they need to keep a reference to the instance in a closure. > var Obj1 = function () { > this.Method1 = function () { > MsgBoxSimNao("Show message?", > this.Msg1, > this.Msg2 ... | Javascript error using this on a object My page shows a window with a confirmation. If I choose Yes, the method Method1 runs but an error is generated saying that the object [Object DOMWindow] has no method 'Method2'. How can I solve this? Testes Javascript O.O. Javascript error Start test | TITLE:
Javascript error using this on a object
QUESTION:
My page shows a window with a confirmation. If I choose Yes, the method Method1 runs but an error is generated saying that the object [Object DOMWindow] has no method 'Method2'. How can I solve this? Testes Javascript O.O. Javascript error Start test
ANSWER:
Ed... | [
"javascript",
"jquery",
"object",
"mobile"
] | 0 | 0 | 366 | 3 | 0 | 2011-06-06T03:47:33.277000 | 2011-06-06T05:14:10.477000 |
6,247,595 | 6,247,634 | Order of calling base class constructor from derived class initialization list | struct B { int b1, b2; B(int, int); };
struct D: B { int d1, d2; // which is technically better? D (int i, int j, int k, int l): B(i,j), d1(k), d2(l) {} // 1st Base // or D (int i, int j, int k, int l): d1(k), d2(l), B(i,j) {} // last Base }; Above is just a pseudo code. In actual, I wanted to know that does the order... | The order you refer in your question is not the "order of calling base constructor". In fact, you can't call a constructor. Constructors are not callable by the user. Only compiler can call constructors. What you can do is to specify initializers. In this case (constructor initializer list) you are specifying initializ... | Order of calling base class constructor from derived class initialization list struct B { int b1, b2; B(int, int); };
struct D: B { int d1, d2; // which is technically better? D (int i, int j, int k, int l): B(i,j), d1(k), d2(l) {} // 1st Base // or D (int i, int j, int k, int l): d1(k), d2(l), B(i,j) {} // last Base ... | TITLE:
Order of calling base class constructor from derived class initialization list
QUESTION:
struct B { int b1, b2; B(int, int); };
struct D: B { int d1, d2; // which is technically better? D (int i, int j, int k, int l): B(i,j), d1(k), d2(l) {} // 1st Base // or D (int i, int j, int k, int l): d1(k), d2(l), B(i,j... | [
"c++",
"inheritance",
"constructor",
"base-class",
"initialization-list"
] | 11 | 22 | 13,470 | 3 | 0 | 2011-06-06T03:51:21.017000 | 2011-06-06T03:58:33.007000 |
6,247,596 | 6,248,031 | Panorama Page Layout Change? Windows Phone 7 | Is there a way to know when the panorama view gets changed from say a current title "Settings" to "Help"? I need this so I know what view to open if they click the add button or remove appbar buttons. So lets say we got a panerama view like: How can we know when the user changed from the recent part to the part the pho... | The Panorama control raises a SelectionChanged event each time the user navigates from one PanoramaItem to the next. You can then determine the index of the current page by inspecting the SelectedIndex property. | Panorama Page Layout Change? Windows Phone 7 Is there a way to know when the panorama view gets changed from say a current title "Settings" to "Help"? I need this so I know what view to open if they click the add button or remove appbar buttons. So lets say we got a panerama view like: How can we know when the user cha... | TITLE:
Panorama Page Layout Change? Windows Phone 7
QUESTION:
Is there a way to know when the panorama view gets changed from say a current title "Settings" to "Help"? I need this so I know what view to open if they click the add button or remove appbar buttons. So lets say we got a panerama view like: How can we know... | [
"c#",
"silverlight",
"windows-phone-7"
] | 4 | 7 | 1,036 | 2 | 0 | 2011-06-06T03:51:41.390000 | 2011-06-06T05:15:44.377000 |
6,247,600 | 6,247,824 | Javascript hover close not working on the right area | Can anyone tell me what I'm doing wrong with my dropdown menu? It needs to close when I move the mouse away from 'WEDDINGS', but it will only close when I move the mouse away from the top menu. http://www.wedevents.com.au/weddings.asp Any help will be greatly appreciated. HTML: Grand Package Premium Package Platinum Be... | $(document).ready(function(){ $("ul.topnav li.ddmhover").hover(function() { //When trigger is hovered...
//Following events are applied to the subnav itself (moving subnav up and down) $(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on hover
// Right here you are attaching to.ddmho... | Javascript hover close not working on the right area Can anyone tell me what I'm doing wrong with my dropdown menu? It needs to close when I move the mouse away from 'WEDDINGS', but it will only close when I move the mouse away from the top menu. http://www.wedevents.com.au/weddings.asp Any help will be greatly appreci... | TITLE:
Javascript hover close not working on the right area
QUESTION:
Can anyone tell me what I'm doing wrong with my dropdown menu? It needs to close when I move the mouse away from 'WEDDINGS', but it will only close when I move the mouse away from the top menu. http://www.wedevents.com.au/weddings.asp Any help will ... | [
"javascript",
"hover"
] | 0 | 0 | 273 | 2 | 0 | 2011-06-06T03:52:46.047000 | 2011-06-06T04:39:58.397000 |
6,247,602 | 6,247,712 | How to refer to the input document context within the context of an external document? | In the example above, the context on line 2 (xsl:if) will be with respect to document('external.xml'). But what I really want is to test an element from the input XML. Is there a way to refer to the input document? Currently I'm forced to pass the entire node tree of the input document as an argument to the template, a... | In the example above, the context on line 2 ( xsl:if ) will be with respect to document('external.xml'). But what I really want is to test an element from the input XML. Is there a way to refer to the input document? Whenever I find myself in such situation, I prefer to have a global variable (say named $vMainDoc ) tha... | How to refer to the input document context within the context of an external document? In the example above, the context on line 2 (xsl:if) will be with respect to document('external.xml'). But what I really want is to test an element from the input XML. Is there a way to refer to the input document? Currently I'm forc... | TITLE:
How to refer to the input document context within the context of an external document?
QUESTION:
In the example above, the context on line 2 (xsl:if) will be with respect to document('external.xml'). But what I really want is to test an element from the input XML. Is there a way to refer to the input document? ... | [
"xslt",
"xpath"
] | 1 | 2 | 784 | 1 | 0 | 2011-06-06T03:53:31.790000 | 2011-06-06T04:18:38.667000 |
6,247,605 | 6,247,700 | Zend Framework Bootstrap Issue | I have been working on a new installation of a Zend Framework application for a while now, and I cannot figure out what's going on. I have two custom action helpers I would like to use and I would like to initialize those in the bootstrap. But it seems as though my _init functions are not being called at all. In the in... | You're not using the helper broker correctly. addPrefix() is used to add pluginloader prefix paths, not actual classes. If you want to add concrete helpers (to use their dispatch hooks presumably), then place something like this in your Bootstrap class protected function _initActionHelpers() { $helper = new My_Helper; ... | Zend Framework Bootstrap Issue I have been working on a new installation of a Zend Framework application for a while now, and I cannot figure out what's going on. I have two custom action helpers I would like to use and I would like to initialize those in the bootstrap. But it seems as though my _init functions are not... | TITLE:
Zend Framework Bootstrap Issue
QUESTION:
I have been working on a new installation of a Zend Framework application for a while now, and I cannot figure out what's going on. I have two custom action helpers I would like to use and I would like to initialize those in the bootstrap. But it seems as though my _init... | [
"zend-framework",
"init",
"bootstrapping"
] | 3 | 3 | 2,927 | 1 | 0 | 2011-06-06T03:54:48.200000 | 2011-06-06T04:16:52.180000 |
6,247,608 | 6,247,786 | Why is my new Git branch not empty? | Suppose we start with a brand new setup. touch somefile git init. git add. git commit -m "initial commit" git branch dev git checkout dev After doing git status, I get nothing to commit (working directory clean) After doing git merge master, I get Already up-to-date. Why is that? I thought new branch starts clean (and ... | Branches in Git are nothing more than pointers to commits. When you create a branch as you did, it is pointing to the same commit as the other branch. Once you commit something after that is when you will see them differ. Most other version control systems don't work on snapshot-based approaches like this. Thus, when y... | Why is my new Git branch not empty? Suppose we start with a brand new setup. touch somefile git init. git add. git commit -m "initial commit" git branch dev git checkout dev After doing git status, I get nothing to commit (working directory clean) After doing git merge master, I get Already up-to-date. Why is that? I t... | TITLE:
Why is my new Git branch not empty?
QUESTION:
Suppose we start with a brand new setup. touch somefile git init. git add. git commit -m "initial commit" git branch dev git checkout dev After doing git status, I get nothing to commit (working directory clean) After doing git merge master, I get Already up-to-date... | [
"git",
"git-branch",
"branching-and-merging"
] | 0 | 4 | 205 | 3 | 0 | 2011-06-06T03:55:01.403000 | 2011-06-06T04:34:50.180000 |
6,247,611 | 6,247,663 | Displaying a list over an image: the text goes to the right of it | I have an img element that I am using as the background of a navbar, I then will display the navigation links over the top of the img element. My problem as you will see in the images below is that the ul that holds the links get displayed to the right of the nav bar & not over it. Why does it do this & how can I get m... | you need to make the navbar background a background image to the div rather than an image that's part of the html. This is the cleanest way to display the image underneath the text. You can set a height and width in the css to the div to ensure the entire image appears as well. | Displaying a list over an image: the text goes to the right of it I have an img element that I am using as the background of a navbar, I then will display the navigation links over the top of the img element. My problem as you will see in the images below is that the ul that holds the links get displayed to the right o... | TITLE:
Displaying a list over an image: the text goes to the right of it
QUESTION:
I have an img element that I am using as the background of a navbar, I then will display the navigation links over the top of the img element. My problem as you will see in the images below is that the ul that holds the links get displa... | [
"javascript",
"html",
"css"
] | 0 | 2 | 174 | 1 | 0 | 2011-06-06T03:55:16.893000 | 2011-06-06T04:06:08.947000 |
6,247,623 | 6,247,672 | In a simple script to return the minimum of a list in scheme only the first value of the list is being returned by my solution. What's the bug? | (define (minim lst) (COND ((NULL? (CDR lst)) (CAR lst)) (< (CAR lst) (minim (CDR lst)) (CAR lst)) (ELSE (minim (CDR lst)))) ) (minim '(3 4 2 9 3 8)) 3 I've figured out that it is the second line that is being evaluated and returning the (CAR of any list). What am I missing? | You are missing parenthesis in the second condition. This makes the "<" operator operate over three elements rather than two. The correct code looks like: (define (minim lst) (cond ((null? (cdr lst)) (car lst)) ((< (car lst) (minim (cdr lst))) (car lst)) (else (minim (cdr lst)))) )
(minim '(3 4 2 9 3 8)) One note thou... | In a simple script to return the minimum of a list in scheme only the first value of the list is being returned by my solution. What's the bug? (define (minim lst) (COND ((NULL? (CDR lst)) (CAR lst)) (< (CAR lst) (minim (CDR lst)) (CAR lst)) (ELSE (minim (CDR lst)))) ) (minim '(3 4 2 9 3 8)) 3 I've figured out that it ... | TITLE:
In a simple script to return the minimum of a list in scheme only the first value of the list is being returned by my solution. What's the bug?
QUESTION:
(define (minim lst) (COND ((NULL? (CDR lst)) (CAR lst)) (< (CAR lst) (minim (CDR lst)) (CAR lst)) (ELSE (minim (CDR lst)))) ) (minim '(3 4 2 9 3 8)) 3 I've fi... | [
"list",
"scheme"
] | 4 | 8 | 13,365 | 1 | 0 | 2011-06-06T03:56:52.677000 | 2011-06-06T04:08:38.877000 |
6,247,625 | 6,247,763 | Confusing Result with @Session["something_here"] (C#/Razor) | I am testing a few things here in a basic webpage, and I noticed something very odd. I'm not sure if this behavior is to be expected, but it does make me wonder... I know I can get the Current User ID of the person currently logged in, like so: @WebSecurity.CurrentUserId And just to see how Sessions are used, I thought... | It probably has nothing to do with Session. Try to store the @WebSecurity.CurrentUserId some other way to ensure that the CurrentUserId has actually been set after the user logs in (maybe by logging it to a file or use a static variable for testing). | Confusing Result with @Session["something_here"] (C#/Razor) I am testing a few things here in a basic webpage, and I noticed something very odd. I'm not sure if this behavior is to be expected, but it does make me wonder... I know I can get the Current User ID of the person currently logged in, like so: @WebSecurity.Cu... | TITLE:
Confusing Result with @Session["something_here"] (C#/Razor)
QUESTION:
I am testing a few things here in a basic webpage, and I noticed something very odd. I'm not sure if this behavior is to be expected, but it does make me wonder... I know I can get the Current User ID of the person currently logged in, like s... | [
"c#",
"asp.net",
"session",
"razor",
"webmatrix"
] | 1 | 3 | 1,189 | 2 | 0 | 2011-06-06T03:57:11.290000 | 2011-06-06T04:31:29.773000 |
6,247,626 | 6,247,649 | Joining two tables twice in MySQL. Possible or Not??? | The table structures for the tables users,messages are like bellow, Users - ID, Name
Messages - ID, Sender, Receiver, Message I want to join two tables twice like joining the messages.sender with users.id and messages.receiver with users.id. Is it possible to get the result with sender's id, sender's name, receiver's ... | Yes you can do it by naming an inner join: select id, s.Name, r.Name from Messages inner join users as s on (message.sender = s.id) inner join users as r on (merssage.receiver = r.id) | Joining two tables twice in MySQL. Possible or Not??? The table structures for the tables users,messages are like bellow, Users - ID, Name
Messages - ID, Sender, Receiver, Message I want to join two tables twice like joining the messages.sender with users.id and messages.receiver with users.id. Is it possible to get t... | TITLE:
Joining two tables twice in MySQL. Possible or Not???
QUESTION:
The table structures for the tables users,messages are like bellow, Users - ID, Name
Messages - ID, Sender, Receiver, Message I want to join two tables twice like joining the messages.sender with users.id and messages.receiver with users.id. Is it... | [
"mysql",
"join"
] | 1 | 3 | 430 | 2 | 0 | 2011-06-06T03:57:15.197000 | 2011-06-06T04:01:58.407000 |
6,247,627 | 6,247,665 | Can VB.NET be used as a game engine? | I know VB.NET, and I've been planning on creating a simple 2d game engine. I got no problems with creating such engine and running the actual game. However, I've been told that VB.NET might not be the best choice for "working too much with graphics". I'd like to know if that's true. Can VB.NET truly not manage efficien... | I have found that people generally view VB.NET as a subpar language, and mostly associate it with Visual Basic 6.0 (or earlier). In the.NET world, VB.NET is a first class citizen that simply has a verbose syntax. It's particularly because of the verbosity that I would probably choose C#, if not going with C++. Still, y... | Can VB.NET be used as a game engine? I know VB.NET, and I've been planning on creating a simple 2d game engine. I got no problems with creating such engine and running the actual game. However, I've been told that VB.NET might not be the best choice for "working too much with graphics". I'd like to know if that's true.... | TITLE:
Can VB.NET be used as a game engine?
QUESTION:
I know VB.NET, and I've been planning on creating a simple 2d game engine. I got no problems with creating such engine and running the actual game. However, I've been told that VB.NET might not be the best choice for "working too much with graphics". I'd like to kn... | [
"vb.net"
] | 3 | 14 | 10,148 | 7 | 0 | 2011-06-06T03:57:22.117000 | 2011-06-06T04:06:58.783000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.